From 8b3377273709a6abd89af0e5b2ff9618c167146e Mon Sep 17 00:00:00 2001
From: chenyong <chenyong@hnkhzn.com>
Date: 星期二, 09 十二月 2025 17:20:24 +0800
Subject: [PATCH] 重写库存导出方法

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 5d5f6c9..5b511f2 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -173,17 +173,17 @@
 
                     if (commonStackerCrane.DeviceCode.Contains("CW") && task.TaskType==(int)TaskOutboundTypeEnum.InToOut)
                     {
-                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1017" && x.stationType == 10 && x.Roadway == commonStackerCrane.DeviceCode);
+                        var stationinfo = _stationManagerRepository.QueryFirst(x => (x.stationPLC == "1017"||x.stationPLC=="1024") && x.stationType == 10 && x.Roadway == commonStackerCrane.DeviceCode);
 
                         IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationinfo.stationPLC);
                         if (device != null)
                         {
-                            CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device;
-                            conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Convert.ToInt16(1815), stationinfo.stationChildCode);
+                            CommonConveyorLine_CW conveyorLine = (CommonConveyorLine_CW)device;
+                            conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Convert.ToInt16(4000), stationinfo.stationChildCode);
                             Thread.Sleep(100);
                             conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, 1000, stationinfo.stationChildCode);
                         }
-                        WriteInfo(commonStackerCrane.DeviceName, $"銆愭墜鍔ㄥ嚭搴撹褰曘��");
+                        WriteInfo(commonStackerCrane.DeviceName, $"銆愭墜鍔ㄥ嚭搴撹褰曘�戜换鍔″彿銆恵e.TaskNum}銆戞墭鐩樺彿銆恵task.PalletCode}銆�");
                     }
 
 
@@ -319,7 +319,7 @@
                         device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == router.ChildPosiDeviceCode);
                         if (device != null)
                         {
-                            CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device;
+                            CommonConveyorLine_CW conveyorLine = (CommonConveyorLine_CW)device;
                             if (conveyorLine.IsOccupied(task.NextAddress))//鍑哄簱绔欏彴鏈鍗犵敤
                             {
                                 return task;
@@ -336,7 +336,9 @@
                     IDevice? device = null;
                     if (task.Roadway.Contains("GW"))
                     {
-                        device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1015");
+                        string targetDeviceCode = task.Roadway == "GWSC3" ? "2025" : "1015";
+                        device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == targetDeviceCode);
+
                         if (device != null)
                         {
                             CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device;

--
Gitblit v1.9.3