From 4f39dcc195f28fa275fc2d065fbf1bf6a46c21b7 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 17 六月 2025 00:41:18 +0800 Subject: [PATCH] 优化出入库逻辑 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" index b1b84a9..c06132e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" @@ -50,15 +50,24 @@ Dt_Task? task = GetTask(speStackerCrane); if (task != null) { - StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task); - if (stackerCraneTaskCommand != null) + bool sendFlag = true; + if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.PalletOutbound.ObjToInt()) { - bool sendFlag = getStackerObject.SendCommand(stackerCraneTaskCommand); - if (sendFlag) + //鍚慦MS鐢宠鍑哄叆搴撳彛鏄惁鏈夌┖鎵樼洏 + sendFlag = false; + } + if(sendFlag) + { + StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task); + if (stackerCraneTaskCommand != null) { - speStackerCrane.SetValue(StackerCraneDBName.CommandSend, 1);//鍚姩鍛戒护 - speStackerCrane.LastTaskType = task.TaskType; - _taskService.UpdateTaskStatusToNext(task.TaskNum); + sendFlag = getStackerObject.SendCommand(stackerCraneTaskCommand); + if (sendFlag) + { + speStackerCrane.SetValue(StackerCraneDBName.CommandSend, 1);//鍚姩鍛戒护 + speStackerCrane.LastTaskType = task.TaskType; + _taskService.UpdateTaskStatusToNext(task.TaskNum); + } } } } @@ -85,7 +94,7 @@ if (speStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CommandSend) != 2) { speStackerCrane.SetValue(StackerCraneDBName.CommandSend, 2); - _taskService.StackCraneTaskCompleted(e.TaskNum); + _taskService.StackCraneTaskCompleted(e.TaskNum, "鍫嗗灈鏈�"); } } } -- Gitblit v1.9.3