diff --git a/OpenAuth.App/ServiceApp/FlyTask/Request/CallAiModel.cs b/OpenAuth.App/ServiceApp/FlyTask/Request/CallAiModel.cs index 47ca6f8..f63c7c2 100644 --- a/OpenAuth.App/ServiceApp/FlyTask/Request/CallAiModel.cs +++ b/OpenAuth.App/ServiceApp/FlyTask/Request/CallAiModel.cs @@ -25,4 +25,6 @@ public class CallAiModel /// 告警内容 /// public string WarningContent { get; set; } + + public string UavSn { get; set; } } \ No newline at end of file diff --git a/OpenAuth.App/ServiceApp/ManageApp.cs b/OpenAuth.App/ServiceApp/ManageApp.cs index a987528..a003c5f 100644 --- a/OpenAuth.App/ServiceApp/ManageApp.cs +++ b/OpenAuth.App/ServiceApp/ManageApp.cs @@ -2563,16 +2563,24 @@ namespace OpenAuth.App.ServiceApp var config = ConfigHelper.GetConfigRoot(); var pushUrl = config["AIModelApi:PushUrl"]; // 取得无人机sn + 1 - var lasaDronePort = await Repository.AsSugarClient().Queryable() - .LeftJoin((a, b) => a.Id == b.PId) - .Where((a, b) => a.Id == task.TaskDronePort).Select( - (a, b) => new - { - UavSn = b.Sn, - b.TypeId - } - ).FirstAsync(); - pushUrl += lasaDronePort.UavSn + "1"; + if (string.IsNullOrEmpty(req.UavSn)) + { + var lasaDronePort = await Repository.AsSugarClient().Queryable() + .LeftJoin((a, b) => a.Id == b.PId) + .Where((a, b) => a.Id == task.TaskDronePort).Select( + (a, b) => new + { + UavSn = b.Sn, + b.TypeId + } + ).FirstAsync(); + pushUrl += lasaDronePort.UavSn + "1"; + } + else + { + pushUrl += req.UavSn + 1; + } + json.rtmp_url = req.RtmpUrl; // 无人机直播流 json.push_url = pushUrl; // 识别结果推流 json.imgsz = 640;