From 9ec715d2deb18a269dd49c48da91a36632d08c81 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 18 六月 2025 00:56:26 +0800
Subject: [PATCH] 最新代码上传,优化功能等

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/ConveyorLineJob_PP.cs |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
index df75641..1ab72e2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
@@ -73,18 +73,38 @@
                         {
                             if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
                             {
-                                if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
+                                string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode);
+
+                                if (!string.IsNullOrEmpty(boxcode))
                                 {
-                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
+                                    string sc = device.Communicator.Read<string>("DB900.578.0");
+                                    WriteError(device.DeviceName, $"璇诲彇鍊硷細{boxcode},瀵规瘮{sc}");
+                                    string boxEndCode = "";
+                                    if (boxcode.LastIndexOf(",PO:") >= 0)
+                                    {
+                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",PO:")) + sc.Substring(sc.IndexOf(",PO:")).Replace("\0", "");
+                                    }
+
+                                    //鍏ュ簱鐢宠浠诲姟
+                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode, boxEndCode);
                                     if (content.Status)
                                     {
                                         device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                     }
                                 }
+                                //if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
+                                //{
+                                //    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
+                                //    if (content.Status)
+                                //    {
+                                //        device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+                                //    }
+                                //}
                             }
                             else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
                             {
-                                Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
+                                string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode);
+                                Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && boxcode.Contains(x.PalletCode) && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
                                 if (task != null)
                                 {
                                     _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress);

--
Gitblit v1.9.3