From 5e5b8e6e8ccebeff871ceba7f4b96840da4d730a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Thu, 17 Jul 2025 09:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AA=92=E4=BD=93=E5=9B=9E=E4=BC=A0=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=A1=B9=E7=9B=AEid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ServiceApp/Subscribe/ConfigSubscribe.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs index 4486d0e..3c8a8ba 100644 --- a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs +++ b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs @@ -157,7 +157,7 @@ public class ConfigSubscribe : IJob // eb87b257-5af1-4bf1-9aba-4267be9fdb12 flight // http://175.27.168.120:6013/test/2025062209390863860047.kmz // md5 585c833012ddb794eaac1050ef71aa31 - // todo 这一小段运行异常 + // 这一小段运行异常 var taskAssign = await _sqlSugarClient .Queryable() .Where(x => x.FlightId == flightId) @@ -208,12 +208,16 @@ public class ConfigSubscribe : IJob int flightType = data.flight_task.flight_type; if (flightType == 1) // 不处理一键起飞媒体信息 { + // todo 后续可能要存 break; } string flightId = data.file.ext.flight_id; - var taskAssgin = _manageApp.GetTaskAssignByFlightId(flightId); - var taskId = taskAssgin.TaskId; + var taskAssign = _manageApp.GetTaskAssignByFlightId(flightId); + var taskId = taskAssign.TaskId; + var executeTask = await _sqlSugarClient + .Queryable() + .SingleAsync(a => a.Id == taskId); string objectKey = data.file.object_key; var folderKey = ((string)data.file.object_key).Split("/"); var parentKey = folderKey[^2]; @@ -230,7 +234,7 @@ public class ConfigSubscribe : IJob TaskId = taskId, ParentKey = "", ObjectKey = folderKey[0], - WorkspaceId = "", // todo 从任务中取来 + WorkspaceId = executeTask.WorkspaceId, // todo 从任务中取来 Level = 1, }; parents.Add(parent1); @@ -241,7 +245,7 @@ public class ConfigSubscribe : IJob TaskId = taskId, ParentKey = folderKey[0], ObjectKey = folderKey[1], - WorkspaceId = "", + WorkspaceId = executeTask.WorkspaceId, Level = 2, }; parents.Add(parent1); @@ -252,7 +256,7 @@ public class ConfigSubscribe : IJob TaskId = taskId, ParentKey = folderKey[1], ObjectKey = folderKey[2], - WorkspaceId = "", + WorkspaceId = executeTask.WorkspaceId, Level = 3, }; parents.Add(parent1); @@ -270,7 +274,7 @@ public class ConfigSubscribe : IJob { Id = Guid.NewGuid().ToString(), FlightId = flightId, // 计划id - TaskId = taskAssgin.TaskId, // 任务id + TaskId = taskAssign.TaskId, // 任务id DroneModelKey = data.file.ext.drone_model_key, // 无人机型号 IsOriginal = data.file.ext.is_original, MediaIndex = data.file.ext.media_index, @@ -284,6 +288,7 @@ public class ConfigSubscribe : IJob ObjectKey = data.file.object_key, Path = data.file.path, // 目前这个好像没有值 CreateTime = ((string)data.file.metadata.created_time).ToDateTime(), + WorkspaceId = executeTask.WorkspaceId, ParentKey = folderKey[2], Level = 4 };