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 26fdad5d4..ca249c236 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 @@ -2165,14 +2165,21 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"体积必须大于0"); } - if(emisWaybillSave.getSettlementWeight()==null || emisWaybillSave.getSettlementWeight().floatValue()<=0.0f){ - throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"结算重量必须大于0"); - } - if(emisWaybillSave.getVolumeWeight()==null || emisWaybillSave.getVolumeWeight().floatValue()<=0.0f){ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"体积重量必须大于0"); } + if(emisWaybillSave.getSettlementWeight()==null + || emisWaybillSave.getSettlementWeight().floatValue()<=0.0f + || emisWaybillSave.getSettlementWeight().compareTo(emisWaybillSave.getBillWeight()) < 0 + || emisWaybillSave.getSettlementWeight().compareTo(emisWaybillSave.getVolumeWeight()) < 0 + ){ + throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"结算重量错误,必须是【体积重量,实际重量】取大值"); + } + + // 结算重量必须等于实际重量和体积重量 + + if(StringUtils.isEmpty(emisWaybillSave.getPickupMethod())){ throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"取件方式必填"); }