From 9cca3c83458907a3e2326689197a1a4d5d10dfaa Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Tue, 15 Jul 2025 15:00:18 +0800 Subject: [PATCH 1/9] =?UTF-8?q?demand:=20=20=E8=BF=90=E5=8D=95=E5=BD=95?= =?UTF-8?q?=E5=85=A5/=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9/=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5/=E7=BD=91?= =?UTF-8?q?=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=EF=BC=9A=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E5=9B=BD=E3=80=81=E4=BA=A7=E5=93=81=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=81=E5=AF=84=E4=BB=B6=E5=9B=BD=E5=AE=B6=E5=9C=B0=E5=8C=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=9C=80=E8=A6=81=E5=92=8C=E8=B5=B7=E5=A7=8B?= =?UTF-8?q?=E7=BD=91=E7=82=B9=E4=B8=80=E8=87=B4,=20=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91=E6=94=B9=E4=B8=BA=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E5=A7=8B=E5=8F=91=E7=BD=91=E7=82=B9=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/emis/service/IEmisWaybillService.java | 4 ++++ .../impl/EmisWaybillAjustApplyServiceImpl.java | 2 ++ .../emis/service/impl/EmisWaybillServiceImpl.java | 15 ++++++++++++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java index f2e9e2fad..5988b5ab6 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/IEmisWaybillService.java @@ -146,6 +146,10 @@ public interface IEmisWaybillService extends IDataAuditService public int realSubmitOrder(EmisWaybill emisWaybill) throws EmisBizError; + + public void checkCountry(EmisWaybill emisWaybill) throws EmisBizError; + + /** * OMS下单 * @param emisWaybill diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java index 4e927c315..b3e7fda57 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillAjustApplyServiceImpl.java @@ -134,6 +134,8 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements // 检查月结客户首次签约日期,首次签约之前开的不允许修改 checkFirstSigningDay(emisWaybillOld, getEmisWaybillNewFromJson(emisWaybillAjustApply)); + emisWaybillService.checkCountry(getEmisWaybillNewFromJson(emisWaybillAjustApply)); + // 检查月结/现金客户额度 // bug:1657 调整后逻辑:单证部同事 员工表标识“单证专属”岗位登记的网点费用申请,不用判断 现金额度和月结客户额度 boolean isDZZS=checkIsDZZS(emisWaybillAjustApply.getApplyManCode()); diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java index 2f7445acc..4bbf4d391 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java @@ -3287,13 +3287,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } } - private void checkCountry(EmisWaybill emisWaybillSave) throws EmisBizError { + public void checkCountry(EmisWaybill emisWaybillSave) throws EmisBizError { EmisTransLine emisTransLine = new EmisTransLine(); emisTransLine.setLineCode(emisWaybillSave.getTransLineType()); List emisTransLines = emisTransLineMapper.selectEmisTransLineList(emisTransLine); - if(CollectionUtil.isEmpty(emisTransLines)){ + EmisSite siteByCode = getSiteByCode(emisWaybillSave.getStartSiteCode()); + if(CollectionUtil.isEmpty(emisTransLines)||Objects.isNull(siteByCode)){ return; } + if(!siteByCode.getCountryCode().equals(emisTransLines.get(0).getFromCountry())){ + throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "始发网点与所选线路不匹配" ); + } if(emisWaybillSave.getSendCountry().equals(emisTransLines.get(0).getFromCountry())){ return; } @@ -3511,6 +3515,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb checkFeeWaybill.setTotalVolume(emisWaybillSave.getTotalVolume()); checkFeeWaybill.setSendSiteCode(emisWaybillSave.getSendSiteCode()); + checkFeeWaybill.setStartSiteCode(emisWaybillSave.getStartSiteCode()); checkFeeWaybill.setDispatchUnderlingSiteCode(emisWaybillSave.getDispatchUnderlingSiteCode()); checkFeeWaybill.setCustomsClear(emisWaybillSave.getCustomsClear()); checkFeeWaybill.setCustomsEclaration(emisWaybillSave.getCustomsEclaration()); @@ -3899,9 +3904,13 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb emisWaybill.setSendDate(new Date()); } + if (StringUtils.isBlank(emisWaybill.getStartSiteCode())) { + emisWaybill.setStartSiteCode(emisWaybill.getSendSiteCode()); + } + // bug: 1704 按照运单号开单日期去报价表抓取对应的报价进行计算 List emisQuotePriceList=getValidQuotePriceList(emisWaybill.getTransLineType(),emisWaybill.getProductType(), - emisWaybill.getSendSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(), + emisWaybill.getStartSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(), emisWaybill.getCalcFeeType(),emisWaybill.getCustomerCode(),emisWaybill.getCustNo(),emisWaybill.getSendDate() ); From 06ea898d8ad4d1a4a20337770fbe2620a2335d54 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Tue, 15 Jul 2025 19:15:25 +0800 Subject: [PATCH 2/9] =?UTF-8?q?demand:=20=20=E8=BF=90=E5=8D=95=E5=BD=95?= =?UTF-8?q?=E5=85=A5/=E8=BF=90=E5=8D=95=E4=BF=AE=E6=94=B9/=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5/=E7=BD=91?= =?UTF-8?q?=E7=82=B9=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7=EF=BC=9A=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E5=9B=BD=E3=80=81=E4=BA=A7=E5=93=81=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=81=E5=AF=84=E4=BB=B6=E5=9B=BD=E5=AE=B6=E5=9C=B0=E5=8C=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=9C=80=E8=A6=81=E5=92=8C=E8=B5=B7=E5=A7=8B?= =?UTF-8?q?=E7=BD=91=E7=82=B9=E4=B8=80=E8=87=B4,=20=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91=E6=94=B9=E4=B8=BA=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E5=A7=8B=E5=8F=91=E7=BD=91=E7=82=B9=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/emis/service/EmisBaseService.java | 8 ++--- .../impl/EmisTmsScanRecordServiceImpl.java | 4 +-- .../resources/mapper/EmisWaybillMapper.xml | 34 +++++++++++++------ 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java index da7574095..00eb1fa52 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java @@ -2619,8 +2619,8 @@ public class EmisBaseService { order.put("kdgs", "TANEX"); - // 获取起始网点 - EmisSite sendSite = getSiteByCode(waybill.getSendSiteCode()); + // 获取始发网点 + EmisSite startSite = getSiteByCode(waybill.getStartSiteCode()); // 计算三段码 目的网点2字码+目的地名称 String destSite2Code = ""; @@ -2636,7 +2636,7 @@ public class EmisBaseService { destName=destination.getDestName(); } - String package3dm=sendSite.getSiteName()+'-'+destName; + String package3dm=startSite.getSiteName()+'-'+destName; String packageWJC=destSite2Code; String pdfInfo="["+package3dm+"]["+packageWJC+"]"; order.put("pdfInfo", pdfInfo); @@ -2756,7 +2756,7 @@ public class EmisBaseService { extData.put("k7",WaybillHelper.removeUnSeeChar(k7)); - extData.put("k8",WaybillHelper.removeUnSeeChar(sendSite.getSiteNameEn())); + extData.put("k8",WaybillHelper.removeUnSeeChar(startSite.getSiteNameEn())); extData.put("k10",WaybillHelper.removeUnSeeChar(waybill.getSendSiteName())); extData.put("k9",WaybillHelper.removeUnSeeChar(destSite.getSiteNameEn())); diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java index 535e26516..4f64543d6 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsScanRecordServiceImpl.java @@ -2095,8 +2095,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm // } // } - emisTmsScanRecord.setScanSite(emisWaybill.getSendSiteName()); - emisTmsScanRecord.setScanSiteCode(emisWaybill.getSendSiteCode()); + emisTmsScanRecord.setScanSite(emisWaybill.getStartSiteName()); + emisTmsScanRecord.setScanSiteCode(emisWaybill.getStartSiteCode()); String dispatchOrSendManCode = MapUtils.getString(scanDataItem,"dispatchOrSendManCode",null); diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 14cbdf288..4b7bdcb26 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -814,6 +814,7 @@ and ( a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} and ( a.take_piece_employee_code=#{params.privEmpCode} or (a.pickup_method in('1','3') and a.operate_employee_code is null ) @@ -1110,7 +1111,7 @@ and ( - a.send_site_code=#{params.privSiteCode} + a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode} ) @@ -1299,7 +1300,8 @@ and payment_remark like concat('%', #{paymentRemark}, '%') and order_remark like concat('%', #{orderRemark}, '%') - and FIND_IN_SET(`send_site_code`,#{sendSiteCode}) + and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) + and a.remark like concat('%', #{remark}, '%') and a.create_by= #{createBy} @@ -1420,7 +1422,8 @@ select line_code from emis_trans_line etl where etl.trans_type=1 ) and bl_sign!='1' and waybill_status!='40' - and a.send_site_code=#{params.privSiteCode} and a.current_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) + and a.current_site_code=#{params.privSiteCode} @@ -1450,6 +1453,7 @@ a.send_site_code=#{params.privSiteCode} or a.dispatch_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode}) @@ -1512,6 +1516,7 @@ a.send_site_code=#{params.privSiteCode} or a.dispatch_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode}) @@ -1844,6 +1849,7 @@ and ( a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or a.dispatch_site_code=#{params.privSiteCode} or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode}) @@ -1929,6 +1935,7 @@ and ( a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or a.dispatch_underling_site_code=#{params.privSiteCode} ) @@ -1979,6 +1986,7 @@ and ( a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or a.dispatch_underling_site_code=#{params.privSiteCode} ) @@ -2293,7 +2301,8 @@ select line_code from emis_trans_line etl where etl.trans_type=1 ) and bl_sign!='1' and waybill_status!='40' - and a.send_site_code=#{params.privSiteCode} and a.current_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) + and a.current_site_code=#{params.privSiteCode} @@ -2309,6 +2318,7 @@ and ( a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or a.dispatch_site_code=#{params.privSiteCode} @@ -2500,6 +2510,7 @@ and ( a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode} or a.dispatch_site_code=#{params.privSiteCode} or @@ -2557,7 +2568,8 @@ and a.order_status in('0','3') and ( - a.send_site_code=#{params.privSiteCode} + (a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode}) and ( a.take_piece_employee_code=#{params.privEmpCode} or (a.pickup_method in('1','3') and a.operate_employee_code is null ) @@ -2579,7 +2591,8 @@ and a.waybill_status!='0' and a.order_status!='2' - and a.send_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode}) and ( a.operate_employee_code=#{params.privEmpCode} or a.take_piece_employee_code=#{params.privEmpCode} @@ -2599,7 +2612,8 @@ where a.del_flag='0' and a.order_status='2' - and a.send_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} + or a.start_site_code=#{params.privSiteCode}) and ( a.operate_employee_code=#{params.privEmpCode} or a.take_piece_employee_code=#{params.privEmpCode} @@ -2619,7 +2633,7 @@ where a.del_flag='0' and a.order_status in('0','3') - and a.send_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) and exists ( select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode} ) @@ -2637,7 +2651,7 @@ where a.del_flag='0' and a.waybill_status='40' - and a.send_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) and ( a.operate_employee_code=#{params.privEmpCode} or a.take_piece_employee_code=#{params.privEmpCode} @@ -2657,7 +2671,7 @@ where a.del_flag='0' and a.bl_sign='1' - and a.send_site_code=#{params.privSiteCode} + and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) and ( a.operate_employee_code=#{params.privEmpCode} or a.take_piece_employee_code=#{params.privEmpCode} From 1bd42c16afebb507af9f7389fb7fd1408358adb9 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 17 Jul 2025 10:15:20 +0800 Subject: [PATCH 3/9] =?UTF-8?q?demand:=20=20tms=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E7=AE=A1=E7=90=86-=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E5=BD=95=E5=85=A5/=E4=BF=AE=E6=94=B9/=E7=BD=91=E7=82=B9?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7-=E5=9B=BD=E5=AE=B6?= =?UTF-8?q?=E4=B8=8E=E7=9C=81=E4=BB=BD=E8=A6=81=E5=8C=B9=E9=85=8D=EF=BC=8C?= =?UTF-8?q?=E5=AF=B9=E5=BA=94APP=E7=AB=AF=E4=B9=9F=E8=A6=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xdadan/erp/web/emis/EmisRegionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisRegionController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisRegionController.java index 62af5a2ce..2a4f7e4ef 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisRegionController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisRegionController.java @@ -64,7 +64,7 @@ public class EmisRegionController extends EmisBaseController } // @PreAuthorize("@ss.hasPermi('emis:emisRegion:list')") - @JacksonFilter(include= {"id","regionCode","regionName","regionNameEn","parentCode"},value= EmisRegion.class,type= JacksonFilter.JscksonFilterType.RESPONSE) + @JacksonFilter(include= {"id","regionCode","regionName","regionNameEn","parentCode","countryCode"},value= EmisRegion.class,type= JacksonFilter.JscksonFilterType.RESPONSE) @GetMapping("/listSimple") public TableDataInfo listSimple(EmisRegion emisRegion) { From ad0899408fac115d96f82ae41dd19afc14efb984 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 17 Jul 2025 17:43:33 +0800 Subject: [PATCH 4/9] =?UTF-8?q?demand:=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E5=AF=84=E4=BB=B6=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2/?= =?UTF-8?q?=E5=AF=84=E4=BB=B6=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=96=B0?= =?UTF-8?q?/=E6=B4=BE=E4=BB=B6=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2/?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2=20-?= =?UTF-8?q?=E5=B7=B2=E5=81=9C=E7=94=A8=E7=9A=84=E6=9C=88=E7=BB=93=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=20=E5=85=81=E8=AE=B8=E6=A8=A1=E7=B3=8A=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=80=89=E6=8B=A9=EF=BC=8C=E5=B9=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9B=B8=E5=85=B3=E6=95=B0=E6=8D=AE=20=20=20?= =?UTF-8?q?=E8=B4=A7=E7=89=A9=E7=BB=84=E6=89=B9=E6=AC=A1=E8=BF=94=E8=B4=A7?= =?UTF-8?q?=E8=99=9A=E6=8B=9F=E5=8D=95=E4=B8=8D=E5=85=81=E8=AE=B8=E7=BB=84?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emis/EmisMonthpayAccountController.java | 2 +- .../impl/EmisTmsSiteBatchServiceImpl.java | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java index 140b80454..e92b0c106 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisMonthpayAccountController.java @@ -74,7 +74,7 @@ public class EmisMonthpayAccountController extends EmisBaseController * @param emisCustomerUser * @return */ - @JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE) + @JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName","status"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE) @GetMapping("/listAllSimple") public TableDataInfo listAllSimple(EmisCustomerUser emisCustomerUser) { diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsSiteBatchServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsSiteBatchServiceImpl.java index 13a4720a4..dd296af83 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsSiteBatchServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisTmsSiteBatchServiceImpl.java @@ -147,13 +147,25 @@ public class EmisTmsSiteBatchServiceImpl extends EmisBaseService implements IEmi public void checkSiteBatch(EmisTmsSiteBatch oldSiteBatch, String billCode) throws EmisBizError { EmisWaybill emisWaybill = emisWaybillMapper.selectEmisWaybillByBillCode(billCode); - if (Objects.nonNull(emisWaybill) && StringUtil.isNotBlank(emisWaybill.getVirtualRemark())) { - throw new EmisBizError(EmisBizErrorType.FAIL, billCode + "已绑定虚拟单,无法录入批次"); - } + checkVirtual(billCode, emisWaybill); checkTransPlanRule(oldSiteBatch, emisWaybill); checkUnique(oldSiteBatch, billCode); } + private static void checkVirtual(String billCode, EmisWaybill emisWaybill) throws EmisBizError { + if (Objects.isNull(emisWaybill)) { + return; + } + if ("0086".equals(emisWaybill.getSendCountry())) { + if (StringUtil.isNotBlank(emisWaybill.getVirtualRemark())) { + throw new EmisBizError(EmisBizErrorType.FAIL, billCode + "已绑定虚拟单,无法录入批次"); + } + } + if ("0086".equals(emisWaybill.getReceiveCountry()) && "1".equals(emisWaybill.getBlVirtual())) { + throw new EmisBizError(EmisBizErrorType.FAIL, billCode + "返货虚拟单,无法录入批次"); + } + } + private void checkTransPlanRule(EmisTmsSiteBatch oldSiteBatch, EmisWaybill emisWaybill) throws EmisBizError { EmisTransPlanRule emisTransPlanRule = new EmisTransPlanRule(); emisTransPlanRule.setStartSiteCode(oldSiteBatch.getStartSiteCode()); From bfa34ed61c9efdaf2d50d7c061fa7834fc2c5329 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 18 Jul 2025 16:40:58 +0800 Subject: [PATCH 5/9] =?UTF-8?q?demand:=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E6=8F=90=E6=88=90=E7=AE=A1=E7=90=86=20-=20=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E6=8F=90=E6=88=90=E6=96=B9=E6=A1=88=E9=85=8D=E7=BD=AE=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EmisCommissionProfitServiceImpl.java | 113 +++++++++++------- 1 file changed, 72 insertions(+), 41 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java index b3e126c16..c14a4034d 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java @@ -11,10 +11,7 @@ package com.xdadan.erp.emis.service.impl; import java.math.BigDecimal; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -546,14 +543,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ){ - calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem); - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString()); + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { + calcExprStr = getCalcFeeExpStr(usedWeight, exprItem); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0")); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } } @@ -680,14 +682,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) { - calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem); - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString()); + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { + calcExprStr = getCalcFeeExpStr(usedWeight, exprItem); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0")); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } } @@ -823,15 +830,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算-结算重量 else if ("2".equals(quoteItem.getCalcType())) { - - if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) { - calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem); - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString()); + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { + calcExprStr = getCalcFeeExpStr(usedWeight, exprItem); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0")); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } } @@ -975,16 +986,20 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - - if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) { - calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem); - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString()); + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { + calcExprStr = getCalcFeeExpStr(usedWeight, exprItem); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + waybill.getBillWeight().stripTrailingZeros().toPlainString()); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } } @@ -1121,16 +1136,21 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) { - calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem); - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString()); + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { + calcExprStr = getCalcFeeExpStr(usedWeight, exprItem); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + waybill.getBillWeight().stripTrailingZeros().toPlainString()); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } @@ -1263,18 +1283,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { + calcExprStr = getCalcFeeExpStr(usedWeight, exprItem); - if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) { - calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem); - - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString()); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + waybill.getBillWeight().stripTrailingZeros().toPlainString()); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } @@ -1424,18 +1448,25 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - calcExprStr = calcExp.replaceAll("w", waybill.getBillWeight().stripTrailingZeros().toPlainString()) + String transType = waybill.getTransType(); + BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + ? waybill.getSettlementWeight() + : waybill.getBillWeight(); + calcExprStr = calcExp + .replaceAll("w", + usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0") .replaceAll("s", exprItem.getInitialWeight().toString()) .replaceAll("d", exprItem.getAdditionalWeight().toString()); - log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString()); + log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + + waybill.getBillWeight().stripTrailingZeros().toPlainString()); Map env = new HashMap<>(); - env.put("w", waybill.getBillWeight()); + env.put("w", usedWeight); env.put("s", exprItem.getInitialWeight()); env.put("d", exprItem.getAdditionalWeight()); - profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString()); + profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString()); } // 体积计算 From faf538bfd3de51cca4cb2ad310503d5ae2eea731 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Sat, 19 Jul 2025 10:15:54 +0800 Subject: [PATCH 6/9] =?UTF-8?q?demand:=20=E5=AF=84=E4=BB=B6=E8=BF=90?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=97=A0=E6=B3=95=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AF=84=E4=BB=B6=E7=BD=91=E7=82=B9=E6=9F=A5=E8=AF=A2bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E9=9D=9E=E6=80=BB=E9=83=A8=E7=BD=91?= =?UTF-8?q?=E7=82=B9=E6=8F=90=E7=A4=BA=E6=97=A0=E6=9D=83=E9=99=90bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xdadan/erp/web/emis/EmisTransProductController.java | 2 +- emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTransProductController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTransProductController.java index 3d5d9d5f1..5135907d7 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTransProductController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisTransProductController.java @@ -54,7 +54,7 @@ public class EmisTransProductController extends EmisBaseController /** * 查询运输产品类型列表 */ - @PreAuthorize("@ss.hasPermi('emis:emisTransProduct:list')") +// @PreAuthorize("@ss.hasPermi('emis:emisTransProduct:list')") @GetMapping("/list") public TableDataInfo list(EmisTransProduct emisTransProduct) { diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 4b7bdcb26..c1e9e1053 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -1300,7 +1300,7 @@ and payment_remark like concat('%', #{paymentRemark}, '%') and order_remark like concat('%', #{orderRemark}, '%') - and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}) + and (a.send_site_code=#{sendSiteCode} or a.start_site_code=#{sendSiteCode}) and a.remark like concat('%', #{remark}, '%') From e2ed31140caa3261b5d5ab9a148c8d580a05df0a Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Sat, 19 Jul 2025 11:53:11 +0800 Subject: [PATCH 7/9] =?UTF-8?q?demand:=20=E9=B2=81=E6=B3=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=AF=B9=E6=8E=A5=E5=A7=8B=E5=8F=91=E7=BD=91=E7=82=B9?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4=E4=B8=8D=E8=83=BD=E9=9D=A2?= =?UTF-8?q?=E5=8D=95=E6=89=93=E5=8D=B0=E9=97=AE=E9=A2=98bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xdadan/erp/emis/service/EmisBaseService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java index 37b37a0be..5ce758f16 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java @@ -2620,6 +2620,9 @@ public class EmisBaseService { order.put("kdgs", "TANEX"); // 获取始发网点 + if (StringUtils.isBlank(waybill.getStartSiteCode())) { + waybill.setStartSiteCode(waybill.getSendSiteCode()); + } EmisSite startSite = getSiteByCode(waybill.getStartSiteCode()); // 计算三段码 目的网点2字码+目的地名称 From 7975dbf3d234257e1f6fb6b33f0667a5aeca94d6 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Sat, 19 Jul 2025 16:34:59 +0800 Subject: [PATCH 8/9] =?UTF-8?q?demand:=20=20=E8=B4=A2=E5=8A=A1=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=B4=B9=E7=94=A8=E5=AE=A1=E6=A0=B8=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E9=A9=B3=E5=9B=9E=E5=8E=9F=E5=9B=A0bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E4=B8=AD=E5=BF=83=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=A0=E6=B3=95=E6=A0=B9=E6=8D=AE=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E5=AF=84=E4=BB=B6=E7=BD=91=E7=82=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=20=E8=BF=90=E5=8D=95=E8=A1=A5=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E9=83=A8=E5=88=86=E6=A8=A1=E6=9D=BF=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=8F=96=E5=A7=8B=E5=8F=91=E7=BD=91=E7=82=B9bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xdadan/erp/web/emis/EmisWaybillAjustApplyController.java | 1 + .../java/com/xdadan/erp/emis/service/EmisBaseService.java | 5 ++++- emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustApplyController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustApplyController.java index 949ef3acb..859d9b958 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustApplyController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisWaybillAjustApplyController.java @@ -306,6 +306,7 @@ public class EmisWaybillAjustApplyController extends EmisBaseController EmisWaybillAjustApply emisWaybillAjustApply = new EmisWaybillAjustApply(); emisWaybillAjustApply.setId(id); emisWaybillAjustApply.setDestConfirmNote(spr.getDestConfirmNote()); + emisWaybillAjustApply.setCenterConfirmNote(spr.getCenterConfirmNote()); emisWaybillAjustApplyService.auditCenterNoPass(emisWaybillAjustApply); }catch (Exception ex){ diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java index 5ce758f16..63c531b98 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java @@ -2623,6 +2623,9 @@ public class EmisBaseService { if (StringUtils.isBlank(waybill.getStartSiteCode())) { waybill.setStartSiteCode(waybill.getSendSiteCode()); } + if(StringUtils.isBlank(waybill.getStartSiteName())){ + waybill.setStartSiteName(waybill.getSendSiteName()); + } EmisSite startSite = getSiteByCode(waybill.getStartSiteCode()); // 计算三段码 目的网点2字码+目的地名称 @@ -2760,7 +2763,7 @@ public class EmisBaseService { extData.put("k7",WaybillHelper.removeUnSeeChar(k7)); extData.put("k8",WaybillHelper.removeUnSeeChar(startSite.getSiteNameEn())); - extData.put("k10",WaybillHelper.removeUnSeeChar(waybill.getSendSiteName())); + extData.put("k10",WaybillHelper.removeUnSeeChar(waybill.getStartSiteName())); extData.put("k9",WaybillHelper.removeUnSeeChar(destSite.getSiteNameEn())); extData.put("k11",WaybillHelper.removeUnSeeChar(destSite.getSiteName())); diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index c1e9e1053..babd0ad05 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -1300,7 +1300,7 @@ and payment_remark like concat('%', #{paymentRemark}, '%') and order_remark like concat('%', #{orderRemark}, '%') - and (a.send_site_code=#{sendSiteCode} or a.start_site_code=#{sendSiteCode}) + and (FIND_IN_SET(`send_site_code`,#{sendSiteCode}) or FIND_IN_SET(`start_site_code`,#{sendSiteCode})) and a.remark like concat('%', #{remark}, '%') From 6b261c1c490607863ab64dbe3e9cf839bc08d13f Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Sat, 19 Jul 2025 16:39:07 +0800 Subject: [PATCH 9/9] =?UTF-8?q?demand:=20=20=E8=B4=A2=E5=8A=A1=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=B4=B9=E7=94=A8=E5=AE=A1=E6=A0=B8=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E9=A9=B3=E5=9B=9E=E5=8E=9F=E5=9B=A0bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E4=B8=AD=E5=BF=83=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=A0=E6=B3=95=E6=A0=B9=E6=8D=AE=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E5=AF=84=E4=BB=B6=E7=BD=91=E7=82=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=20=E8=BF=90=E5=8D=95=E8=A1=A5=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E9=83=A8=E5=88=86=E6=A8=A1=E6=9D=BF=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=8F=96=E5=A7=8B=E5=8F=91=E7=BD=91=E7=82=B9bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/emis/domain/EmisCommissionQuote.java | 2 ++ .../impl/EmisCommissionProfitServiceImpl.java | 28 +++++++++---------- .../mapper/EmisCommissionQuoteMapper.xml | 12 ++++++-- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java index 91f8d4d80..54405e46c 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java @@ -59,6 +59,8 @@ public class EmisCommissionQuote extends BaseEntity private String feeType; /* 计算类型 票,重量 emis_commission_type */ private String calcType; + /* 重量计算方式,1:按照结算重量计算计提,2:按照实际重量计算计提 */ + private String calcWeightType; /* 岗位类型:emis_commission_post */ private String postType; /* 快递类型:emis_biz_shipping_method */ diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java index c14a4034d..ed7745dea 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java @@ -543,8 +543,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { @@ -682,8 +682,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { @@ -830,8 +830,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算-结算重量 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { @@ -986,8 +986,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { @@ -1136,8 +1136,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { @@ -1283,8 +1283,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) { @@ -1448,8 +1448,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements } // 重量计算 else if ("2".equals(quoteItem.getCalcType())) { - String transType = waybill.getTransType(); - BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType)) + String calcWeightType = quoteItem.getCalcWeightType(); + BigDecimal usedWeight = ("1".equals(calcWeightType)) ? waybill.getSettlementWeight() : waybill.getBillWeight(); calcExprStr = calcExp diff --git a/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml b/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml index 23935e561..4259208fa 100644 --- a/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml @@ -16,6 +16,7 @@ + @@ -37,7 +38,7 @@ - select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote + select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, calc_weight_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote @@ -159,6 +163,7 @@ country, fee_type, calc_type, + calc_weight_type, post_type, trans_type, bl_open, @@ -189,6 +194,7 @@ #{country}, #{feeType}, #{calcType}, + #{calcWeightType}, #{postType}, #{transType}, #{blOpen}, @@ -224,6 +230,7 @@ fee_type = #{feeType}, calc_type = #{calcType}, + calc_weight_type = #{calcWeightType}, post_type = #{postType}, trans_type = #{transType}, bl_open = #{blOpen}, @@ -281,6 +288,7 @@ and fee_type=#{feeType} and bl_open=#{blOpen} and calc_type=#{calcType} + and calc_weight_type=#{calcWeightType} and post_type=#{postType} and ( trans_type = #{transType}