From c7f877081aafcb636b745aff7a8b0f66aef33237 Mon Sep 17 00:00:00 2001 From: qian Date: Tue, 19 Nov 2024 14:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9F=A5=E8=AF=A2=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E6=9C=AA=E5=AE=8C=E6=88=90=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/Controller/SCP_ASK_CONTROLLER.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs index bde0249..ad45120 100644 --- a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs @@ -13,6 +13,7 @@ using System.Web; using CK.SCP.Models.AppBoxEntity; using System.Data.SqlClient; using System.Collections; +using ChangKeTec.Wms.Models.Wms; namespace CK.SCP.Controller { @@ -639,10 +640,12 @@ namespace CK.SCP.Controller if (p_list.Count > 0) { //var _detail = p_list[0]; + var asklist = p_list.Select(q => q.AskBillNum).ToList(); + var arvdetail = db.TB_ARRIVE_DETAIL.Where(p => asklist.Contains(p.Remark) && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == 3).ToList(); foreach (V_TB_INCOMPLETE_ASK _detail in p_list) { - var reject = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == _detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.BillType == 3).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); + var reject = arvdetail.Where(p => p.Remark == _detail.AskBillNum).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode }).Select(p => new { RejectSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode }); reject.ToList().ForEach(itm => { if (_detail.AskBillNum == itm.Remark && _detail.PoLine == itm.PoLine && _detail.PartCode == itm.PartCode) @@ -1371,7 +1374,7 @@ namespace CK.SCP.Controller } else { - _lst.Add(new TA_VEND_PART() + _lst.Add(new Models.ScpEntity.TA_VEND_PART() { VendPackQty = _itm.PackQty == 0 ? 1 : _itm.PackQty, PartCode = _itm.PartCode,