From 496587e50f17049126bdda6ab1ce06d2c07848a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 20 Sep 2023 11:09:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/INVOICE_SERVICE.cs | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs index 61b329c2..12433f66 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs @@ -189,9 +189,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ else if (invs.FirstOrDefault().BusinessType == EnumBusinessType.BeiJian) { var B = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); - B.OrderBy(p => p.LineCode); - List BMap = new List(); foreach (var itm in B) { @@ -225,32 +223,32 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //var BMap = ObjectMapper.Map, List>(B); var bjquery = from itm in BMap - join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum - join itm2 in materialList on itm.LU equals itm2.SettleMaterialCode into temp - from tm in temp.DefaultIfEmpty() - select - new INVOICE_WAIT_DETAIL_BJ_DTO() - { - PartDesc = tm == null ? string.Empty : itm.PartDesc, - InvDate = itm1.CreationTime, - RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, - //Version = itm.Version, - InvbillNum = itm.InvbillNum, - InvGroupNum = itm.InvGroupNum, - LU = itm.LU, - PartCode = itm.PartCode, - PRICE = itm.PRICE, - Qty = itm.Qty, - Amt = itm.Amt, - DeliveryNumber = itm.DeliveryNumber , - VendorCode = itm.VendorCode , - VendorName = itm.VendorName , - // PurchaseOrderNumber = itm.PurchaseOrderNumber, - DeliveryIndexNumber =itm.DeliveryIndexNumber , - Extend1 = itm.Extend1, - BeginDate = itm.BeginDate, - EndDate = itm.EndDate, - }; + join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum + join itm2 in materialList on itm.LU equals itm2.SettleMaterialCode into temp + from tm in temp.DefaultIfEmpty() + select + new INVOICE_WAIT_DETAIL_BJ_DTO() + { + PartDesc = tm == null ? string.Empty : itm.PartDesc, + InvDate = itm1.CreationTime, + RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, + //Version = itm.Version, + InvbillNum = itm.InvbillNum, + InvGroupNum = itm.InvGroupNum, + LU = itm.LU, + PartCode = itm.PartCode, + PRICE = itm.PRICE, + Qty = itm.Qty, + Amt = itm.Amt, + DeliveryNumber = itm.DeliveryNumber, + VendorCode = itm.VendorCode, + VendorName = itm.VendorName, + // PurchaseOrderNumber = itm.PurchaseOrderNumber, + DeliveryIndexNumber = itm.DeliveryIndexNumber, + Extend1 = itm.Extend1, + BeginDate = itm.BeginDate, + EndDate = itm.EndDate, + }; entity.INVOICE_WAIT_DETAIL_BJ = bjquery.ToList(); } else