From dfd52c389f5803bb768fbda039e593acd898e4d6 Mon Sep 17 00:00:00 2001 From: linfso Date: Sun, 26 May 2024 17:24:51 +0800 Subject: [PATCH] md --- .../service/impl/EmisWaybillServiceImpl.java | 44 +++++++++++++++---- 1 file changed, 35 insertions(+), 9 deletions(-) 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 4d2432e28..f6ccf848e 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 @@ -608,12 +608,28 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb if(StringUtils.isAnyEmpty(emisWaybill.getProductType(), emisWaybill.getSendSiteCode(), emisWaybill.getDispatchUnderlingSiteCode(), - emisWaybill.getCalcFeeType() + emisWaybill.getCalcFeeType(), + emisWaybill.getCustomsClear(), + emisWaybill.getCustomsEclaration() ) ){ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "参数不完整"); } + + if(emisWaybill.getBillWeight().floatValue()<=0.0f){ + emisWaybill.setBillWeight(BigDecimal.ZERO); + } + + if(emisWaybill.getTotalVolume().floatValue()<=0.0f){ + emisWaybill.setTotalVolume(BigDecimal.ZERO); + } + + if(emisWaybill.getSettlementWeight().floatValue()<=0.0f){ + emisWaybill.setSettlementWeight(BigDecimal.ZERO); + } + + List emisQuotePriceList=getValidQuotePriceList(emisWaybill.getTransLineType(),emisWaybill.getProductType(), emisWaybill.getSendSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(), emisWaybill.getCalcFeeType()); @@ -638,15 +654,21 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb // 判断是否要计算报关费 只有一般贸易报关需要收取报关费 // 2002-报关费 3-一般报关 - if( !( "3".equals(emisWaybill.getCustomsEclaration()) && "2002".equals(quoteItem.getFeeType()) ) ){ - continue; - } + if( "2002".equals(quoteItem.getFeeType()) ){ + if( !"3".equals(emisWaybill.getCustomsEclaration()) ){ + continue; + } + } + // 2003-清关费 3-一般贸易清关 - if( !( "3".equals(emisWaybill.getCustomsClear()) && "2003".equals(quoteItem.getFeeType()) ) ){ - continue; + if( "2003".equals(quoteItem.getFeeType()) ){ + if(!"3".equals(emisWaybill.getCustomsClear())){ + continue; + } } + EmisWaybillFeeitem feeItem = new EmisWaybillFeeitem(); // 重量计费 , 一口价 if("1".equals(calcFeeType) || "3".equals(calcFeeType)){ @@ -778,9 +800,13 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "参数不完整"); } - if(emisWaybill.getBillWeight().floatValue()<=0.0f - && emisWaybill.getTotalVolume().floatValue()<=0.0f){ - throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "重量和体积需要大于0"); + + if(emisWaybill.getBillWeight().floatValue()<=0.0f){ + emisWaybill.setBillWeight(BigDecimal.ZERO); + } + + if(emisWaybill.getTotalVolume().floatValue()<=0.0f){ + emisWaybill.setTotalVolume(BigDecimal.ZERO); } // 获取产品