From 5be0f5bc3b9a83a3b30c9915bd5309279d140244 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期三, 27 十一月 2024 08:39:17 +0800 Subject: [PATCH] WMS入库单功能和页面优化 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 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 e71f6a8..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);//涓嬪彂鍫嗗灈鏈轰换鍔� } } @@ -130,12 +132,12 @@ if (stackerCraneTaskCommand != null) { bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand); - bool worktype = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, task.TaskType == (int)TaskOtherTypeEnum.RelocationCar ? 2 : 1); + bool worktype = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, task.TaskType == (int)TaskOtherTypeEnum.RelocationCar ? (short)WorkType.Car : (short)WorkType.Cargo); if (sendFlag && worktype) { 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; } @@ -271,10 +276,7 @@ { StackerCraneTaskCommandW stackerCraneTaskCommand = new StackerCraneTaskCommandW(); - stackerCraneTaskCommand.Barcode = task.PalletCode; stackerCraneTaskCommand.TaskNum = task.TaskNum; - stackerCraneTaskCommand.WorkType = (short)WorkType.Cargo; - stackerCraneTaskCommand.TrayType = 0; if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔� { List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway); @@ -333,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