This commit is contained in:
linfso 2024-07-29 00:23:20 +08:00
parent ccfc0317f9
commit f85a5e0bbc
2 changed files with 20 additions and 5 deletions

View File

@ -242,6 +242,10 @@ public class EmisWaybillController extends EmisBaseController
return AjaxResult.error("订单号不能为空");
}
if(StringUtils.isEmpty(waybillOrder.getSendSiteCode()) ){
return AjaxResult.error("指派网点不能为空");
}
EmisWaybill emisWaybill = new EmisWaybill();
emisWaybill.setOrderSn(waybillOrder.getOrderSn());
emisWaybill.setSendSiteCode(waybillOrder.getSendSiteCode());
@ -273,6 +277,10 @@ public class EmisWaybillController extends EmisBaseController
return AjaxResult.error("订单号不能为空");
}
if(StringUtils.isEmpty(waybillOrder.getTakePieceEmployeeCode())){
return AjaxResult.error("取件员不能为空");
}
EmisWaybill emisWaybill = new EmisWaybill();
emisWaybill.setOrderSn(waybillOrder.getOrderSn());
emisWaybill.setTakePieceEmployeeCode(waybillOrder.getTakePieceEmployeeCode());

View File

@ -912,10 +912,15 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.FAIL,"订单已取消");
}
if(StringUtils.isEmpty(emisWaybillOld.getTakePieceEmployeeCode())){
throw new EmisBizError(EmisBizErrorType.FAIL,"取件员不能为空");
if(!"2".emisWaybillOld.getPickupMethod()){
throw new EmisBizError(EmisBizErrorType.FAIL,"非上门取件不需要指派取件员");
}
return emisWaybillMapper.assignTakeMan(emisWaybill);
}
@ -934,13 +939,15 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS,"订单不存在");
}
if(StringUtils.isEmpty(emisWaybill.getSendSiteCode())){
throw new EmisBizError(EmisBizErrorType.FAIL,"指派网点不能为空");
}
if(OrderStatus.CANCEL.statusCode.equals(emisWaybillOld.getOrderStatus())){
throw new EmisBizError(EmisBizErrorType.FAIL,"订单已取消");
}
if(StringUtils.isEmpty(emisWaybillOld.getSendSiteCode())){
throw new EmisBizError(EmisBizErrorType.FAIL,"指派网点不能为空");
}
return emisWaybillMapper.assignSendSite(emisWaybill);
}