遗漏代码

feature-flyModify
陈伟 2025-07-18 13:48:38 +08:00
parent e329906d92
commit 17662e817b
1 changed files with 15 additions and 8 deletions

View File

@ -206,11 +206,11 @@ public class ConfigSubscribe : IJob
Console.WriteLine("进入文件上传处理"); Console.WriteLine("进入文件上传处理");
Console.WriteLine($"文件上传处理:{message}"); Console.WriteLine($"文件上传处理:{message}");
int flightType = data.flight_task.flight_type; int flightType = data.flight_task.flight_type;
if (flightType == 1) // 不处理一键起飞媒体信息 /*if (flightType == 1) // 不处理一键起飞媒体信息
{ {
// todo 后续可能要存 // todo 后续可能要存
break; break;
} }*/
string flightId = data.file.ext.flight_id; string flightId = data.file.ext.flight_id;
var taskAssign = _manageApp.GetTaskAssignByFlightId(flightId); var taskAssign = _manageApp.GetTaskAssignByFlightId(flightId);
@ -233,8 +233,7 @@ public class ConfigSubscribe : IJob
FlightId = flightId, FlightId = flightId,
TaskId = taskId, TaskId = taskId,
ParentKey = "", ParentKey = "",
ObjectKey = folderKey[0], WorkspaceId = executeTask.WorkspaceId,
WorkspaceId = executeTask.WorkspaceId, // todo 从任务中取来
Level = 1, Level = 1,
}; };
parents.Add(parent1); parents.Add(parent1);
@ -244,7 +243,6 @@ public class ConfigSubscribe : IJob
FlightId = flightId, FlightId = flightId,
TaskId = taskId, TaskId = taskId,
ParentKey = folderKey[0], ParentKey = folderKey[0],
ObjectKey = folderKey[1],
WorkspaceId = executeTask.WorkspaceId, WorkspaceId = executeTask.WorkspaceId,
Level = 2, Level = 2,
}; };
@ -255,7 +253,6 @@ public class ConfigSubscribe : IJob
FlightId = flightId, FlightId = flightId,
TaskId = taskId, TaskId = taskId,
ParentKey = folderKey[1], ParentKey = folderKey[1],
ObjectKey = folderKey[2],
WorkspaceId = executeTask.WorkspaceId, WorkspaceId = executeTask.WorkspaceId,
Level = 3, Level = 3,
}; };
@ -290,7 +287,10 @@ public class ConfigSubscribe : IJob
CreateTime = ((string)data.file.metadata.created_time).ToDateTime(), CreateTime = ((string)data.file.metadata.created_time).ToDateTime(),
WorkspaceId = executeTask.WorkspaceId, WorkspaceId = executeTask.WorkspaceId,
ParentKey = folderKey[2], ParentKey = folderKey[2],
Level = 4 Level = 4,
Tid = result.tid,
Bid = result.bid,
FlightType = flightType
}; };
// todo 添加事务 // todo 添加事务
await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync(); await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync();
@ -497,7 +497,7 @@ public class ConfigSubscribe : IJob
else else
{ {
// 任务开始执行 // 任务开始执行
taskRecordExecute.Status = 1; // 任务执行中 taskRecordExecute.Status = 0; // 任务执行中
Console.WriteLine($"任务执行响应 {code} {message}"); Console.WriteLine($"任务执行响应 {code} {message}");
} }
@ -507,6 +507,7 @@ public class ConfigSubscribe : IJob
break; break;
case "thing/product/*/osd": case "thing/product/*/osd":
// todo 处理保存 减少三位,保存
Console.WriteLine($"osd消息: {message}"); Console.WriteLine($"osd消息: {message}");
break; break;
default: default:
@ -515,6 +516,12 @@ public class ConfigSubscribe : IJob
} }
} }
public DateTime GetDateTimeFromSeconds(long miliseconds)
{
var seconds = miliseconds / 1000; // 去除末尾三位
return DateTimeOffset.FromUnixTimeSeconds(seconds).DateTime;
}
public static Dictionary<long, string> ErrorMap = new() public static Dictionary<long, string> ErrorMap = new()
{ {
{ 312014, "设备升级中,请勿重复操作" }, { 312014, "设备升级中,请勿重复操作" },