This commit is contained in:
linfso 2024-06-09 00:35:03 +08:00
parent 81eea211b8
commit 362910300e

View File

@ -340,10 +340,33 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
emisWaybillSave.setRegisterDate(new Date());
}
if(emisWaybillSave.getFeeWeight().floatValue()<=0.0f){
if(emisWaybillSave.getFreight().floatValue()<=0.0f){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"运费必须大于0");
}
if(emisWaybillSave.getSettlementWeight().floatValue() <=0.0f
|| emisWaybillSave.getTotalVolume().floatValue() <=0.0f
|| emisWaybillSave.getBillWeight().floatValue() <=0.0f
|| emisWaybillSave.getVolumeWeight().floatValue() <=0.0f
){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"结算重量,体积,体积重量,实重必须大于0");
}
if(StringUtils.isAnyEmpty(
emisWaybillSave.getPickupMethod(),
emisWaybillSave.getDispatchMethod(),
emisWaybillSave.getCustomsEclaration(),
emisWaybillSave.getCustomsClear()
)
){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"取件方式,派送方式,报关方式,清关方式必填");
}
if(StringUtils.isEmpty(emisWaybillSave.getCalcFeeType())){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"计费方式必填");
}
if(StringUtils.isEmpty(emisWaybillSave.getSendSiteCode())){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"寄件网点必填");
}
@ -353,6 +376,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"寄件网点必填");
}
if(StringUtils.isEmpty(emisWaybillSave.getPackType())){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1,"包装类型必填");
}
// 目的网点