From 362910300e1197895e54a1c29e7fea63334226da Mon Sep 17 00:00:00 2001 From: linfso Date: Sun, 9 Jun 2024 00:35:03 +0800 Subject: [PATCH] md --- .../service/impl/EmisWaybillServiceImpl.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) 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 d2079c848..8f9c21e6f 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 @@ -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,"包装类型必填"); + } // 目的网点