This commit is contained in:
linfso 2025-01-07 13:45:41 +08:00
parent cc3637acca
commit f714773801

View File

@ -1668,16 +1668,25 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"线路必填");
}
if( StringUtils.isAnyEmpty(emisWaybillSave.getProductType())) {
if( StringUtils.isEmpty(emisWaybillSave.getProductType())) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"产品必填");
}
// 检查产品停用的不能下单
EmisTransProduct emisTransProduct=getTransProductByCode(emisWaybillSave.getProductType())
if(emisTransProduct==null ){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"产品已失效,请重新选择产品");
}
if(emisTransProduct.getStatus()!=1){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"产品已停用,请重新选择产品");
}
// 检查数据
if(emisWaybillSave.getBillWeight()==null || emisWaybillSave.getBillWeight().floatValue()<=0.0f){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"实重必须大于0");
}
if(StringUtils.isEmpty(emisWaybillSave.getPickupMethod())){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"取件方式必填");
}
@ -1698,6 +1707,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"支付方式必填");
}
if(StringUtils.isEmpty(emisWaybillSave.getCalcFeeType())){
emisWaybillSave.setCalcFeeType("1");
}
@ -3700,14 +3711,6 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
emisWaybill.setFreight(totalRealFee);
}
// for (EmisWaybillFeeitem feeItem:emisWaybill.getFeeitemList()) {
// // 只取运输费的最低报价
// if("1001".equals(feeItem.getFeeCode()) ){
// estFeeMap.put("leastPrice",feeItem.getLeastPrice());
// break;
// }
// }
estFeeMap.put("estFee",emisWaybill.getFreight());
estFeeMap.put("orderNum",emisTransProduct.getOrderNum());