From 8d558cb173873004cd8a0d6c12f37865f03d7a4f Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期三, 22 十月 2025 10:32:15 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/SpeStackerCraneJob.cs |   56 +++++++++++++++++++++++++++-----------------------------
 1 files changed, 27 insertions(+), 29 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/SpeStackerCraneJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/SpeStackerCraneJob.cs"
index 6790f09..c47f71c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/SpeStackerCraneJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/SpeStackerCraneJob.cs"
@@ -624,8 +624,14 @@
             Dt_Task Muche2Task = _taskService.ObtainMuChetask(ZicheinnerSide.MotherCardeputy.ToString());
             if (Muche2Task == null) return null;
 
+            //鑾峰彇瀛愯溅鏄惁鏈変换鍔�
             Dt_Task zicheTASK = _taskService.GetChariotTaskBool(ZicheinnerSide.ChildPosiDeviceCode);
             if (zicheTASK != null) return null;
+
+            //鑾峰彇2宸烽亾瀛愯溅鏄惁鏈変换鍔�
+            var muche1 = _agvStationService.GetMothervehicle(ZicheinnerSide.MotherCarDeviceCode);
+            Dt_Task Muche1 = _taskService.GetChariotTaskBool(muche1.ChildPosiDeviceCode.ToString());
+            if(Muche1!=null) return null;
 
             return Muche2Task;
         }
@@ -635,15 +641,11 @@
             Dt_Task Muche3Task = _taskService.ObtainMuChetask(ZicheinnerSide.MotherCarDeviceCode.ToString());
             if (Muche3Task == null) return null;
 
-            //鍒ゆ柇瀛愯溅鏄惁鏈夋湁闇�瑕佸彇璐х殑浠诲姟
-            Dt_Task zicheTASK = _taskService.GetChariotTaskBool(ZicheinnerSide.ChildPosiDeviceCode);
+            //鍒ゆ柇瀛愯溅鏄惁鏈夎鍙朒CJ浠诲姟
+            Dt_Task zicheTASK = _taskService.GetHCJTaskBool(ZicheinnerSide.ChildPosiDeviceCode, ZicheinnerSide.HCJStorageaddress);
             if (zicheTASK != null) return null;
 
-            if (curraddZiChe == ZicheinnerSide.WaitmomentTwo || curraddZiChe == ZicheinnerSide.WaitmomentOne)
-            {
-                return Muche3Task;
-            }
-            return null;
+            return Muche3Task;
         }
         public Dt_Task? OutboundSideAisle4(int curraddZiChe, AGVStation ZicheinnerSide)
         {
@@ -651,25 +653,16 @@
             Dt_Task Muche4Task = _taskService.ObtainMuChetask(ZicheinnerSide.MotherCardeputy.ToString());
             if (Muche4Task == null) return null;
 
+            //鍒ゆ柇鏄惁鏈夐渶瑕佸彇HCJ鐨勪换鍔�
             Dt_Task zicheTASK = _taskService.GetChariotTaskBool(ZicheinnerSide.ChildPosiDeviceCode);
             if (zicheTASK != null) return null;
 
-            if (curraddZiChe == ZicheinnerSide.WaitmomentOne)
-            {
+            //鍒ゆ柇3宸烽亾鏄惁鏈夊嚭搴撶殑浠诲姟
+            var muche3 = _agvStationService.GetMothervehicle(ZicheinnerSide.MotherCarDeviceCode);
+            Dt_Task muchetask = _taskService.OutMothermaTask(muche3.ChildPosiDeviceCode);
+            if (muchetask != null) return null;
 
-            }
-
-            
-
-            
-
-
-
-            if ( || curraddZiChe == ZicheinnerSide.WaitmomentTwo)
-            {
-                return Muche4Task;
-            }
-            return null;
+            return Muche4Task;
         }
 
         #endregion
@@ -901,7 +894,7 @@
                     {
                         RGVMovetask(GdZiche.WaitmomentOne, GdZiche.ChildPosiDeviceCode);
                     }
-                    else if (GdZiche.MotherCardeputy == RGVCurrentlocation && RGVCurrentlocation == 1171)
+                    else if (GdZiche.MotherCardeputy == RGVCurrentlocation || RGVCurrentlocation == 1171)
                     {
                         RGVMovetask(GdZiche.WaitmomentTwo, GdZiche.ChildPosiDeviceCode);
                     }
@@ -918,14 +911,19 @@
             {
                 if (GdZiche.Station_Area == 5)
                 {
-                    if (GdZiche.MotherCarDeviceCode == RGVCurrentlocation || GdZiche.HCJStorageaddress == RGVCurrentlocation)
+                    Dt_Task task = _taskService.GetChariotTaskBool(GdZiche.ChildPosiDeviceCode);
+                    if (task == null && RgvCraneStatusValue == (int)RgvEquipmentStatus.NoCargo)
                     {
-                        RGVMovetask(GdZiche.WaitmomentOne, GdZiche.ChildPosiDeviceCode);
+                        if (GdZiche.MotherCarDeviceCode == RGVCurrentlocation || GdZiche.HCJStorageaddress == RGVCurrentlocation)
+                        {
+                            RGVMovetask(GdZiche.WaitmomentOne, GdZiche.ChildPosiDeviceCode);
+                        }
+                        else if (GdZiche.MotherCardeputy == RGVCurrentlocation)
+                        {
+                            RGVMovetask(GdZiche.WaitmomentTwo, GdZiche.ChildPosiDeviceCode);
+                        }
                     }
-                    else if (GdZiche.MotherCardeputy == RGVCurrentlocation)
-                    {
-                        RGVMovetask(GdZiche.WaitmomentTwo, GdZiche.ChildPosiDeviceCode);
-                    }
+                        
                 }
                 else
                 {

--
Gitblit v1.9.3