From 80f2457f459b32054543b05d7856c40e4c51e664 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 06 三月 2026 20:05:45 +0800
Subject: [PATCH] 优化成品库外检失败任务
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
index 58e2b7d..184c486 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
@@ -92,10 +92,17 @@
if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵Rgv.content.taskID}銆�");
if (Rgv.messageType == 72)//灏忚溅椤惰捣璐х墿
{
- TaskFromCompleted(task, deviceTypeEnum);
- //缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
- var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice ?? throw new Exception("鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�");
- device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
+ if (task.TaskType == (int)TaskTypeEnum.CPInbound && task.TaskState == (int)TaskStatusEnum.Execut)
+ {
+ task.TaskState = (int)TaskStatusEnum.WaiCheckShape;
+ BaseDal.UpdateData(task);//缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
+ var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice ?? throw new Exception("鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�");
+ device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
+ }
+ else
+ {
+ TaskFromCompleted(task, deviceTypeEnum);
+ }
}
else if (Rgv.messageType == 10)
{
--
Gitblit v1.9.3