优化手飞任务智能巡检判定

feature-flyModify
陈伟 2025-09-10 16:32:38 +08:00
parent a686e3ff9e
commit 8848c71b1b
1 changed files with 6 additions and 4 deletions

View File

@ -2379,7 +2379,7 @@ namespace OpenAuth.App.ServiceApp
TaskType = 0,
//0 计划任务 1 手飞任务
FlightTaskType = 1,
AIInspection = "true",
AIInspection = "false",
WorkspaceId = task.WorkspaceId,
FlightId = task.FlightId,
Status = 1, // 待执行
@ -2405,7 +2405,6 @@ namespace OpenAuth.App.ServiceApp
var task = await Repository
.ChangeRepository<SugarRepositiry<LasaTask>>()
.GetByIdAsync(req.TaskId);
;
using var db = Repository.AsSugarClient();
try
{
@ -2476,7 +2475,8 @@ namespace OpenAuth.App.ServiceApp
{
Id = req.TaskId,
Status = 6, // 智能巡检状态
PushUrl = pushUrl
PushUrl = pushUrl,
AIInspection = "true",
};
var tagIdArray = new List<string>();
foreach (var tagId in tagsIds)
@ -2721,7 +2721,9 @@ namespace OpenAuth.App.ServiceApp
public async Task<Response<bool>> EndAiInspection(string taskid)
{
var taskTemp = await Repository.ChangeRepository<SugarRepositiry<LasaTask>>()
.GetByIdAsync(taskid);
.AsQueryable()
.Where(r => r.AIInspection == "false")
.FirstAsync();
if (taskTemp == null)
{
return new Response<bool>()