From 2640679b2823cd68d74e255442cce1634aac773c Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 10 十二月 2025 12:40:03 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/HuaYiZhongHeng/BaiBuLiKu

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs |   25 ++++++-------------------
 1 files changed, 6 insertions(+), 19 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 28591d2..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,13 +173,13 @@
 
                     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_CW conveyorLine = (CommonConveyorLine_CW)device;
-                            conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Convert.ToInt16(1815), stationinfo.stationChildCode);
+                            conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Convert.ToInt16(4000), stationinfo.stationChildCode);
                             Thread.Sleep(100);
                             conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, 1000, stationinfo.stationChildCode);
                         }
@@ -334,24 +334,11 @@
                 else
                 {
                     IDevice? device = null;
-                    if (task.Roadway.Contains("GWSC3"))
+                    if (task.Roadway.Contains("GW"))
                     {
-                        device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "2025");
-                        if (device != null)
-                        {
-                            CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device;
-                            if (conveyorLine.IsOccupied(task.TargetAddress))//鍑哄簱绔欏彴鏈鍗犵敤
-                            {
-                                return task;
-                            }
-                        }
-                        else
-                        {
-                            _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵task.TargetAddress}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
-                        }
-                    } else 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