From 8467804705615f7614c29e7ef7ac3e99f5c13a54 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 11 二月 2025 13:53:05 +0800 Subject: [PATCH] 优化WMS接口日志记录,添加接口名称和接口描述 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" index 922ed3a..bb08ce0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" @@ -15,7 +15,6 @@ using System.Threading.Tasks; using WIDESEAWCS_Common.StackerCraneEnum; using WIDESEAWCS_Common.TaskEnum; -using WIDESEAWCS_Common.WMSInfo; using WIDESEAWCS_Core; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_IShuttleCar; @@ -31,12 +30,11 @@ using WIDESEAWCS_TaskInfoService; using WIDESEAWCS_Tasks.ConveyorLineJob; using WIDESEAWCS_Tasks.StackerCraneJob; -using static WIDESEAWCS_Common.WMSInfo.RequestWMS; namespace WIDESEAWCS_Tasks { [DisallowConcurrentExecution] - public partial class CommonStackerCraneJob : IJob + public partial class CommonStackerCraneJob : JobBase, IJob { private readonly ITaskService _taskService; private readonly ITaskExecuteDetailService _taskExecuteDetailService; @@ -104,9 +102,13 @@ } else { + task.ShuttleCarCode = ShuttleCar?.ShuttleCarCode; + _taskService.UpdateData(task); SendTask(commonStackerCrane, task);//涓嬪彂鍫嗗灈鏈轰换鍔� } } + else + SendTask(commonStackerCrane, task);//涓嬪彂鍫嗗灈鏈轰换鍔� } } @@ -135,7 +137,7 @@ { if (commonStackerCrane.SetValue(StackerCraneDBName.CommandSend, sendFlag)) { - commonStackerCrane.LastTaskType = task.TaskType; + if (task.TaskType != (int)TaskOtherTypeEnum.RelocationCar) commonStackerCrane.LastTaskType = task.TaskType; _taskService.UpdateTaskStatusToNext(task.TaskNum); } } @@ -169,9 +171,12 @@ { if (commonStackerCrane != null) { + //if (_taskService.GetTaskInfo(commonStackerCrane.CurrentTaskNum) != null) + //{ Console.Out.WriteLine($"鍫嗗灈鏈轰换鍔″畬鎴愶細[{commonStackerCrane.CurrentTaskNum}]锛泏DateTime.Now}"); - var Status = _taskService.StackCraneTaskCompleted(commonStackerCrane.CurrentTaskNum).Status;///闇�淇敼锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒 + var Status = _taskService.StackCraneTaskCompleted(commonStackerCrane.CurrentTaskNum).Status; commonStackerCrane.SetValue(StackerCraneDBName.ConfirmComplete, Status); + //} } } /// <summary> @@ -226,7 +231,7 @@ task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); } } - if (task != null && task.TargetAddress != "SC01") return task;//鍏ュ簱浠诲姟鍒ゆ柇鏄惁宸插垎閰嶈揣浣嶏紝WMS鍒ゆ柇璐т綅鐘舵�佹槸鍚﹀厑璁告斁璐� + if (task != null && !string.IsNullOrEmpty(task.TargetAddress)) return task;//鍏ュ簱浠诲姟鍒ゆ柇鏄惁宸插垎閰嶈揣浣嶏紝WMS鍒ゆ柇璐т綅鐘舵�佹槸鍚﹀厑璁告斁璐� return task; } @@ -330,7 +335,7 @@ return null; } } - else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) + else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup) { string[] targetCodes = task.NextAddress.Split("-"); if (targetCodes.Length == 3) -- Gitblit v1.9.3