任务创建添加算法实例关联(补)

main
陈伟 2 weeks ago
parent 7d8e0c5fb8
commit 966eee0b65

@ -421,15 +421,18 @@ namespace OpenAuth.App.ServiceApp
task.PlanExecuteDuration = airLine.ScheduleTime;
task.ExpectedFileCount = airLine.PictureTotal;
var flag = await db.LasaTask.InsertAsync(task);
var aiInspection = new LasaAiInspection
if (!string.IsNullOrEmpty(task.AIInspection))
{
Id = Guid.NewGuid().ToString(),
TaskId = task.Id,
AlgoInstanceId = task.AlgoInstanceId,
WarningTitle = task.WarningTitle,
WarningContent = task.WarningContent
};
await db.LasaAiInspection.InsertAsync(aiInspection);
var aiInspection = new LasaAiInspection
{
Id = Guid.NewGuid().ToString(),
TaskId = task.Id,
AlgoInstanceId = task.AlgoInstanceId,
WarningTitle = task.WarningTitle,
WarningContent = task.WarningContent
};
await db.LasaAiInspection.InsertAsync(aiInspection);
}
// //{"0":"立即任务","1":"定时任务",
var type = task.TaskType;
if (type.Equals(1) || type.Equals(2)) // 定时任务

Loading…
Cancel
Save