From a15ae8a6b341558ca6cf3cf9631210728ef9c181 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 13 五月 2024 19:27:08 +0800
Subject: [PATCH] 优化空托入库逻辑

---
 代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs  |    2 +-
 代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/EmptyTrayIn.cs |    5 +++++
 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs             |    8 +++++---
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs"
index 389772f..22961fb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs"
@@ -433,15 +433,17 @@
                             {
                                 remark = "鏌ユ壘搴撳唴绌烘墭浣�";
                                 EmptyStation = GetStation.EmptyPalletStation(area);
+                                if (EmptyStation != null)
+                                    if (agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any()) return;
                             }
 
 
                             if (EmptyStation != null)
                             {
                                 #region 鍚屼竴涓┖鎵樹綅鍙兘鍚屾椂鐢熸垚涓�涓┖鎵樹换鍔�
-                                remark = "鏌ヨ绌烘墭浣嶆槸鍚﹀瓨鍦ㄤ换鍔�";
-                                if (agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any())
-                                    return;
+                                //remark = "鏌ヨ绌烘墭浣嶆槸鍚﹀瓨鍦ㄤ换鍔�";
+                                //if (agvtaskService.Find(x => x.agv_fromaddress == EmptyStation.stationCode || x.agv_toaddress == EmptyStation.stationCode).Any())
+                                //    return;
                                 #endregion
                                 dt_agvtask agvtask = new dt_agvtask()
                                 {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/EmptyTrayIn.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/EmptyTrayIn.cs"
index 1cf4107..8fc4ab7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/EmptyTrayIn.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/EmptyTrayIn.cs"
@@ -38,6 +38,11 @@
                 WriteDBLog.Success("鍒涘缓鍙犵洏浣嶇┖鎵樺叆搴撲换鍔�", $"閿欒淇℃伅锛歿ex.Message}", "PCS");
             }
         }
+        /// <summary>
+        /// 鍒涘缓绌烘墭鍙犵洏鍏ュ簱浠诲姟
+        /// </summary>
+        /// <param name="stationinfoRepository"></param>
+        /// <param name="EmptyStation"></param>
         public static void CreateEmptyTrayIn(Idt_stationinfoRepository stationinfoRepository, dt_stationinfo EmptyStation)
         {
             VOLContext Context = new VOLContext();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs"
index ed0b8f3..908a517 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs"
@@ -156,7 +156,7 @@
             Idt_management_timeRepository timeRepository = new dt_management_timeRepository(Context);
             try
             {
-                if (agvtask.agv_tasktype == AGVTaskTypeEnum.TaskType_EmptyPallet.ToString())//绌烘墭浠诲姟
+                if (agvtask.agv_tasktype == AGVTaskTypeEnum.TaskType_EmptyPallet.ToString())//琛ョ┖鎵樹换鍔�
                 {
                     var val = timeRepository.Find(x => x.management_name == AGVTaskTypeEnum.TaskType_EmptyPallet.ToString()).FirstOrDefault().management_numericalvalue;
                     if (agvtask.agv_fromaddress == "" && agvtask.agv_toaddress.Contains("W"))

--
Gitblit v1.9.3