From 42303480306331e793d006d10039183e181fe0fb Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 22 Sep 2023 15:40:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=9B=B4=E4=BE=9B=E4=BB=B6HBPO=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E5=AF=BC=E5=85=A5=E4=BB=B7=E6=A0=BC=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=8F=AA=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E4=BB=B7=E6=A0=BC=E6=98=AF=E5=90=A6=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/PUB_SA_SERVICE.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs index dde85e06..1625a098 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs @@ -599,10 +599,21 @@ namespace Win.Sfs.SettleAccount.Entities.BQ pubSaDetail.BillNum = pubSaBillNum; pubSaDetail.Site = site; }); - //不可结算 结算分组号码(根据价格区分结算、不可结算) - var pubNotSaGroupNums = pubSaDetails.FindAll(t => t.Price == default(decimal)).Select(t => t.GroupNum).Distinct(); - var pubSaDetailsCanSes = pubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == false); - var pubSaDetailsNotCanSes = pubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == true); + + var pubSaDetailsCanSes = new List(); + var pubSaDetailsNotCanSes = new List(); + if (businessType == EnumBusinessType.ZhiGongJianHBPO) + { + pubSaDetailsCanSes = pubSaDetails.FindAll(t => t.Price != default); + pubSaDetailsNotCanSes = pubSaDetails.FindAll(t => t.Price == default); + } + else + { + //不可结算 结算分组号码(根据价格区分结算、不可结算) + var pubNotSaGroupNums = pubSaDetails.FindAll(t => t.Price == default(decimal)).Select(t => t.GroupNum).Distinct(); + pubSaDetailsCanSes = pubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == false); + pubSaDetailsNotCanSes = pubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == true); + } //可结算明细 var pubCanSaDetails = ObjectMapper.Map, List>(pubSaDetailsCanSes); From fdf449930c906a8c7805548868aace4cd271e17e Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 22 Sep 2023 16:19:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=87=E4=BB=B6=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5=E6=89=A9=E5=B1=95=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=B7=BB=E5=8A=A0=E5=90=88=E5=90=8C=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs index 1625a098..2a6a2bfe 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs @@ -526,7 +526,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ .OrderByDescending(t => t.Date) .ThenByDescending(t => t.CreationTime) .FirstOrDefault(); - importPubSaDetail.Price = priceListEntity?.Price ?? 0; + if (priceListEntity != null) + { + importPubSaDetail.Price = priceListEntity.Price; + importPubSaDetail.ExtraProperties.TryAdd("ContractNo", priceListEntity.ContractNo); + } }); } #endregion