This commit is contained in:
linfso 2024-07-15 19:42:41 +08:00
parent a9b7a58822
commit e9879295f2

View File

@ -308,9 +308,6 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
*/
private void cvtWaybillDraftToReal(EmisWaybill emisWaybillSave,Boolean isOms) throws EmisBizError {
// 货物名称必填
if(StringUtils.isEmpty(emisWaybillSave.getGoodsInfo())){
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "产品名称不能为空");
@ -379,6 +376,16 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
emisWaybillSave.setSendCity(sendCityCode);
emisWaybillSave.setSendCounty(sendDistrictCode);
// oms 计算发件网点
if(isOms){
// 计算目的地
EmisDestination sendDestination=calcSendSiteByBase(sendCountryCode,transLine.getLineCode(),sendProviceCode,sendCityCode,sendDistrictCode,emisWaybillSave.getSendAddress());
if(sendDestination==null){
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "寄件地址不在服务区");
}
emisWaybillSave.setSendSiteCode(sendDestination.getSiteCode());
emisWaybillSave.setSendSiteName(sendDestination.getSiteName());
}
// 取件方式
String pickupMethod=DictUtils.getDictValue("emis_qujian_fangshi",emisWaybillSave.getPickupMethod());
@ -518,6 +525,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
}
// 计算目的地
EmisDestination destination=calcDestSiteByBase(receiveCountryCode,transLine.getLineCode(),rcvProviceCode,rcvCityCode,rcvDistrictCode,emisWaybillSave.getReceiveAddress());
if(destination==null){