From 0d5d4a8c55b562090f1a1ac48cda7fcab943979b Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 15 十月 2025 15:48:40 +0800
Subject: [PATCH] 更新二进制文件及新增异步POST方法

---
 CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index c0608b7..7275c18 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -426,6 +426,22 @@
                     conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode);
                     conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode);
                     conveyorLine.Communicator.Write(address, 1);
+
+
+                    var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode && x.stationArea == "Call" && x.stationType == 12);
+                    CommonConveyorLine_BZ? commonConveyorBZ = Storage.Devices.FirstOrDefault(x => x.DeviceCode == station.stationPLC) as CommonConveyorLine_BZ;
+                    if (commonConveyorBZ != null)
+                    {
+                        ConveyorLineTaskCommand_After readSignal = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(station.stationLocation);
+                        if (readSignal.Reserved5 == 1)
+                        {
+                            var tasks = _taskRepository.QueryData(x => x.TargetAddress == childDeviceCode);
+                            if (tasks.Count == 0)
+                            {
+                                commonConveyorBZ.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), station.stationLocation);
+                            }
+                        }
+                    }
                     WriteInfo($"{conveyorLine.DeviceName}杈撻�佺嚎鍑哄簱瀹屾垚", $"瀛愯妭鐐广�恵childDeviceCode}銆戞墭鐩樺彿锛氥�恵command.ConveyorLineBarcode}銆�");
                 }
                 else
@@ -473,6 +489,21 @@
                         conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode);
                         conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode);
                         conveyorLine.Communicator.Write(address, 1);
+
+                        var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode && x.stationArea == "Call" && x.stationType == 12);
+                        CommonConveyorLine_BZ? commonConveyorBZ = Storage.Devices.FirstOrDefault(x => x.DeviceCode == station.stationPLC) as CommonConveyorLine_BZ;
+                        if (commonConveyorBZ != null)
+                        {
+                            ConveyorLineTaskCommand_After readSignal = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(station.stationLocation);
+                            if (readSignal.Reserved5 == 1)
+                            {
+                                var tasks = _taskRepository.QueryData(x => x.TargetAddress == childDeviceCode);
+                                if (tasks.Count == 0)
+                                {
+                                    commonConveyorBZ.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), station.stationLocation);
+                                }
+                            }
+                        }
                         WriteInfo($"{conveyorLine.DeviceName}杈撻�佺嚎鍑哄簱瀹屾垚", $"瀛愯妭鐐广�恵childDeviceCode}銆戞墭鐩樺彿锛氥�恵command.ConveyorLineBarcode}銆�");
                     }
                 }

--
Gitblit v1.9.3