From 0b1706d9a7327bc08a641cf65fe7de7120d935da Mon Sep 17 00:00:00 2001 From: ddlucky Date: Wed, 18 Jan 2023 13:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=82=A8=E8=B4=B9=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E5=9C=A8=E6=B7=BB=E5=8A=A0=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E5=85=88=E9=80=89=E6=8B=A9=E4=BA=86=E4=BB=93?= =?UTF-8?q?=E5=82=A8=E8=B4=B9=E5=8D=95=E5=A4=B4=E8=A1=A8=E7=9A=84=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E5=AF=B9=E8=B1=A1=EF=BC=8C=E5=88=99=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E6=98=8E=E7=BB=86=E6=97=B6=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=AA=E6=B7=BB=E5=8A=A0=E5=BA=94=E6=94=B6?= =?UTF-8?q?=E4=BB=93=E5=82=A8=E8=B4=B9=E5=AF=B9=E8=B1=A1=E4=B8=BA=E8=AF=A5?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=AF=B9=E8=B1=A1=E7=9A=84=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=92=8C=E8=B4=B9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VW_OP_WMS_FEEDUI_STORAGE_CUSTService.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Vue.Net/VOL.WMS/Services/WMS/FEE/Partial/VW_OP_WMS_FEEDUI_STORAGE_CUSTService.cs b/Vue.Net/VOL.WMS/Services/WMS/FEE/Partial/VW_OP_WMS_FEEDUI_STORAGE_CUSTService.cs index 31871a18..c29d37a9 100644 --- a/Vue.Net/VOL.WMS/Services/WMS/FEE/Partial/VW_OP_WMS_FEEDUI_STORAGE_CUSTService.cs +++ b/Vue.Net/VOL.WMS/Services/WMS/FEE/Partial/VW_OP_WMS_FEEDUI_STORAGE_CUSTService.cs @@ -985,13 +985,22 @@ namespace VOL.WMS.Services var keys = base.GetWorkKeysStr(saveModel); var needaddFeebaseList_temp = Vw_Op_Wms_FeeBaseRepository.Instance.FindAsIQueryable(x => keys.Contains(x.GID.ToString())).OrderBy(o => o.FEESTARTDATE).ToList(); + //20230118 如果在从搜索结果中向对账单内添加业务时,对账单头表已经选择了结算对象 + //则只向对账单内添加应收仓储费对象ARCLIENTWMSOUT与【对账单头表的结算对象CUSTOMERNAME】相同的 + //如为空 则仍然计算时间段内全部可以收费的库存 + if (!string.IsNullOrWhiteSpace(head.CUSTOMERNAME)) + { + needaddFeebaseList_temp = needaddFeebaseList_temp.Where(x => x.ARCLIENTWMSOUT == head.CUSTOMERNAME).ToList(); + } var needaddFeebaseList = new List(); void feebaselist_add(Vw_Op_Wms_FeeBase item) { - if (!needaddFeebaseList.Exists(x => x.WMSID == item.WMSID && x.GID == item.GID)) + if (!needaddFeebaseList.Exists(x => x.WMSID == item.WMSID && x.GID == item.GID)) { needaddFeebaseList.Add(item); + + } } foreach (var item in needaddFeebaseList_temp) @@ -1011,6 +1020,16 @@ namespace VOL.WMS.Services { //var newreclist = Vw_Op_Wms_FeeBaseRepository.Instance.FindAsIQueryable(x => x.MBLNO == item.MBLNO && x.CUSTOMERNAME == item.CUSTOMERNAME && x.GOODSOWNER == item.GOODSOWNER && x.CORPID == item.CORPID).ToList(); var newreclist = Vw_Op_Wms_FeeBaseRepository.Instance.FindAsIQueryable(x => x.WMSID == item.WMSID ).ToList(); + + //20230118 如果在从搜索结果中向对账单内添加业务时,对账单头表已经选择了结算对象 + //则只向对账单内添加应收仓储费对象ARCLIENTWMSOUT与【对账单头表的结算对象CUSTOMERNAME】相同的 + //如为空 则仍然计算时间段内全部可以收费的库存 + if (!string.IsNullOrWhiteSpace(head.CUSTOMERNAME)) + { + newreclist = newreclist.Where(x => x.ARCLIENTWMSOUT == head.CUSTOMERNAME).ToList(); + } + + if (newreclist != null && newreclist.Count > 0) { foreach (var rec in newreclist)