优化:智能巡检告警标题及内容判空处理

main
陈伟 6 days ago
parent 089123dea9
commit 93637f8759

@ -436,9 +436,16 @@ namespace OpenAuth.App.ServiceApp
Id = Guid.NewGuid().ToString(),
TaskId = task.Id,
AlgoInstanceId = task.AlgoInstanceId,
WarningTitle = task.WarningTitle,
WarningContent = task.WarningContent
};
if (!string.IsNullOrEmpty(task.WarningTitle))
{
aiInspection.WarningTitle = task.WarningTitle;
}
if (!string.IsNullOrEmpty(task.WarningContent))
{
aiInspection.WarningContent = task.WarningContent;
}
await db.LasaAiInspection.InsertAsync(aiInspection);
}
@ -2404,9 +2411,15 @@ namespace OpenAuth.App.ServiceApp
Id = Guid.NewGuid().ToString(),
TaskId = req.TaskId,
AlgoInstanceId = req.AlgoInstanceId,
WarningTitle = req.WarningTitle,
WarningContent = req.WarningContent
};
if (!string.IsNullOrEmpty(req.WarningContent))
{
aiInspection.WarningTitle = req.WarningTitle;
}
if (!string.IsNullOrEmpty(req.WarningContent))
{
aiInspection.WarningContent = req.WarningContent;
}
// 更新
await db.Updateable(aiInspection).IgnoreNullColumns().ExecuteCommandAsync();
}

Loading…
Cancel
Save