From be14322d1b20857082dd47aeb895bd976dca13e0 Mon Sep 17 00:00:00 2001
From: liuying <1427574514@qq.com>
Date: 周六, 30 11月 2024 17:40:50 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/LA24030-LuLI_PackageLine

---
 CC/iWareCC_ASRS/ThreadService/05_BZ30(齐套验证)/DataProcess_ValidateQiTao.cs |   84 +-----------------------------------------
 1 files changed, 2 insertions(+), 82 deletions(-)

diff --git "a/CC/iWareCC_ASRS/ThreadService/05_BZ30\050\351\275\220\345\245\227\351\252\214\350\257\201\051/DataProcess_ValidateQiTao.cs" "b/CC/iWareCC_ASRS/ThreadService/05_BZ30\050\351\275\220\345\245\227\351\252\214\350\257\201\051/DataProcess_ValidateQiTao.cs"
index 9757dee..a88ad98 100644
--- "a/CC/iWareCC_ASRS/ThreadService/05_BZ30\050\351\275\220\345\245\227\351\252\214\350\257\201\051/DataProcess_ValidateQiTao.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/05_BZ30\050\351\275\220\345\245\227\351\252\214\350\257\201\051/DataProcess_ValidateQiTao.cs"
@@ -105,7 +105,7 @@
 
                             //澶勭悊琛�  mes_order_gather
                             var errmsg = "";
-                            var result = HandlerOrderGather(wmsDB, package, qitaoValue, _UnlinePerson, out errmsg);
+                            var result = MyExtendHelper.HandlerOrderGather(wmsDB, package, qitaoValue, _UnlinePerson, out errmsg);
                             if (result == false)
                             {
                                 SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = errmsg;
@@ -136,86 +136,6 @@
             }
         }
 
-        /// <summary>
-        /// 澶勭悊 琛� mes_order_gather
-        /// </summary>
-        /// <param name="wmsDB"></param>
-        /// <param name="package"></param>
-        /// <param name="qitaoValue"></param>
-        /// <param name="_UnlinePerson"></param>
-        /// <param name="errMsg"></param>
-        /// <returns></returns>
-        public static bool HandlerOrderGather(WmsDBModel wmsDB, mes_package_gather package, string qitaoValue, string _UnlinePerson, out string errMsg)
-        {
-            errMsg = "";
-            //澶勭悊琛�  mes_order_gather
-            var isAddOrder = false;
-            var packageList = wmsDB.mes_package_gather.Where(x => x.Info5 == package.Info5).ToList();
-            if (packageList == null || packageList?.Count == 0)
-            {
-                errMsg = $"娌℃湁鎵惧埌鐢熶骇鍗曞彿{package.Info5}鐨勬眹鎬绘暟鎹�";
-                return false;
-            }
-            var order = wmsDB.mes_order_gather.Where(x => x.Info5 == package.Info5).FirstOrDefault();
-            if (order != null)
-            {
-
-            }
-            else
-            {
-                order = new mes_order_gather()
-                {
-                    Id = Yitter.IdGenerator.YitIdHelper.NextId(),
-                    Info5 = package.Info5,
-                    OrderId = package.OrderId,
-                    PlanNo = package.PlanNo,
-                };
-                isAddOrder = true;
-            }
-            order.PackageNum = packageList.Count();
-            order.UnLinePackageNum = packageList.Where(x => x.UpiStatus == (int)UpiStatusEnum.宸蹭笅绾�).Count();
-            order.NoUnLinePackageNum = order.PackageNum - order.UnLinePackageNum;
-
-            order.AllPackageArea = packageList.Sum(x => Convert.ToDecimal(x.Info13));
-            order.ScanPackageArea = packageList.Where(x => x.UpiStatus == (int)UpiStatusEnum.宸蹭笅绾�).Sum(x => Convert.ToDecimal(x.Info13));
-            order.NoScanPackageArea = order.AllPackageArea - order.ScanPackageArea;
-            order.IsKitting = qitaoValue == "榻愬" ? true : false;
-
-            var order_unLine = false;
-            //鏌ヨ涓嬩竴涓寘鏄笉鏄睘浜庤璁㈠崟
-            var newLineQueue = wmsDB.mes_package_linequeue.OrderBy(x => x.Id).FirstOrDefault();
-            if (newLineQueue != null && newLineQueue.Info5 != order.Info5)
-            {
-                //琛ㄧず鏄� 鍒囨崲 鏂拌鍗曚簡锛岃璁㈠崟瑕佹洿鏂颁负 宸蹭笅绾裤��
-                order_unLine = true;
-            }
-            else
-            {
-                //鍒ゆ柇璇ヨ鍗曟槸鍚﹀凡涓嬬嚎
-                if (order.PackageNum == order.UnLinePackageNum)
-                {
-                    order_unLine = true;
-                }
-            }
-            //鍒ゆ柇璇ヨ鍗曟槸鍚﹀凡涓嬬嚎
-            if (order_unLine)
-            {
-                order.IsUnline = true;
-                order.UnlineTime = DateTime.Now;
-                order.UnlinePerson = _UnlinePerson;
-            }
-            else
-            {
-                order.IsUnline = false;
-            }
-
-            if (isAddOrder)
-            {
-                wmsDB.mes_order_gather.Add(order);
-            }
-
-            return true;
-        }
-
+   
     }
 }

--
Gitblit v1.9.3