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 | 67 +++------------------------------ 1 files changed, 6 insertions(+), 61 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 cbfcc0f..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" @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Remoting.Messaging; using System.ServiceModel.Configuration; using System.Text; using System.Threading; @@ -103,69 +104,12 @@ //澶勭悊琛� 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) + var errmsg = ""; + var result = MyExtendHelper.HandlerOrderGather(wmsDB, package, qitaoValue, _UnlinePerson, out errmsg); + if (result == false) { - SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"娌℃湁鎵惧埌鐢熶骇鍗曞彿{package.Info5}鐨勬眹鎬绘暟鎹�"; + SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = errmsg; continue; - } - 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); } @@ -192,5 +136,6 @@ } } + } } -- Gitblit v1.9.3