This commit is contained in:
linfso 2024-05-26 17:24:51 +08:00
parent 037f8863cf
commit dfd52c389f

View File

@ -608,12 +608,28 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
if(StringUtils.isAnyEmpty(emisWaybill.getProductType(), if(StringUtils.isAnyEmpty(emisWaybill.getProductType(),
emisWaybill.getSendSiteCode(), emisWaybill.getSendSiteCode(),
emisWaybill.getDispatchUnderlingSiteCode(), emisWaybill.getDispatchUnderlingSiteCode(),
emisWaybill.getCalcFeeType() emisWaybill.getCalcFeeType(),
emisWaybill.getCustomsClear(),
emisWaybill.getCustomsEclaration()
) )
){ ){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "参数不完整"); 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<EmisQuotePrice> emisQuotePriceList=getValidQuotePriceList(emisWaybill.getTransLineType(),emisWaybill.getProductType(), List<EmisQuotePrice> emisQuotePriceList=getValidQuotePriceList(emisWaybill.getTransLineType(),emisWaybill.getProductType(),
emisWaybill.getSendSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(), emisWaybill.getSendSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(),
emisWaybill.getCalcFeeType()); emisWaybill.getCalcFeeType());
@ -638,15 +654,21 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 判断是否要计算报关费 只有一般贸易报关需要收取报关费 // 判断是否要计算报关费 只有一般贸易报关需要收取报关费
// 2002-报关费 3-一般报关 // 2002-报关费 3-一般报关
if( !( "3".equals(emisWaybill.getCustomsEclaration()) && "2002".equals(quoteItem.getFeeType()) ) ){ if( "2002".equals(quoteItem.getFeeType()) ){
continue; if( !"3".equals(emisWaybill.getCustomsEclaration()) ){
} continue;
}
}
// 2003-清关费 3-一般贸易清关 // 2003-清关费 3-一般贸易清关
if( !( "3".equals(emisWaybill.getCustomsClear()) && "2003".equals(quoteItem.getFeeType()) ) ){ if( "2003".equals(quoteItem.getFeeType()) ){
continue; if(!"3".equals(emisWaybill.getCustomsClear())){
continue;
}
} }
EmisWaybillFeeitem feeItem = new EmisWaybillFeeitem(); EmisWaybillFeeitem feeItem = new EmisWaybillFeeitem();
// 重量计费 , 一口价 // 重量计费 , 一口价
if("1".equals(calcFeeType) || "3".equals(calcFeeType)){ if("1".equals(calcFeeType) || "3".equals(calcFeeType)){
@ -778,9 +800,13 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "参数不完整"); throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "参数不完整");
} }
if(emisWaybill.getBillWeight().floatValue()<=0.0f
&& emisWaybill.getTotalVolume().floatValue()<=0.0f){ if(emisWaybill.getBillWeight().floatValue()<=0.0f){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "重量和体积需要大于0"); emisWaybill.setBillWeight(BigDecimal.ZERO);
}
if(emisWaybill.getTotalVolume().floatValue()<=0.0f){
emisWaybill.setTotalVolume(BigDecimal.ZERO);
} }
// 获取产品 // 获取产品