From 7e469b73ac4f022cb78689c6d2b0c4ddee26d18c Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 02 12月 2024 15:37:34 +0800
Subject: [PATCH] 优化

---
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs"
index da14603..4540825 100644
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs"
@@ -26,8 +26,8 @@
                 Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
                 try
-                {
-                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && SystemValue.isStartedModel)
+                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && 
+                    if (SystemValue.isStartedModel)
                     {
 
                         using (WmsDBModel wmsDB = new WmsDBModel())
@@ -43,8 +43,14 @@
                                 if (allCount == group.ToList().Count())
                                 {
                                     //婊¤冻榻愬锛屽嚭搴�
-                                    group.ToList().ForEach(x =>
+                                    //娉ㄦ剰锛氭帓搴忎弗鏍兼寜鐓� 娆″簭 杩涜鎺掑簭銆� 锛侊紒锛侊紒锛侊紒锛侊紒
+                                    var doList = upiList.Where(x => x.PackageCode == packageCode).OrderBy(x => x.Shelf).ToList();
+                                    foreach (var item in doList)
                                     {
+                                        item.UpiStatus = (int)UpiStatusEnum.宸查綈鍖�;
+                                        item.UpdateTime = DateTime.Now;
+
+                                        var x = group.ToList().Find(b => b.Upi == item.UPI);
                                         x.StockStatus = (int)StockStatusEnum.榻愬寘寰呭嚭搴�;
 
                                         //鐢熸垚鍑哄簱浠诲姟
@@ -60,7 +66,7 @@
                                             Length = x.Length,
                                             Width = x.Width,
                                             Thk = x.Thk,
-                                            IssueTime = DateTime.Now,
+                                            
                                             PlanNo = x.PlanNo,
                                             OrderId = x.OrderId,
                                             PackageCode = x.PackageCode,
@@ -69,7 +75,7 @@
                                             RbTaskTypeEnumName = RbTaskTypeEnum.鍑哄簱浠诲姟.ToString(),
                                             TaskStatus = (int)TaskStatusEnum.鏂板缓,
                                             TaskStatusName = TaskStatusEnum.鏂板缓.ToString(),
-                                            TaskMsg = "鍏ュ簱",
+                                            TaskMsg = "鍑哄簱浠诲姟",
 
 
                                             CreateTime = DateTime.Now,
@@ -82,7 +88,9 @@
 
                                         var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
                                         place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
-                                    });
+
+                                        Thread.Sleep(100);
+                                    }
                                 }
                             }
 

--
Gitblit v1.9.3