md
This commit is contained in:
parent
940035cad3
commit
04ddb8bb27
@ -106,6 +106,8 @@ public interface IEmisWaybillService extends IDataAuditService
|
|||||||
*/
|
*/
|
||||||
public int draftSubmitOrder(EmisWaybill emisWaybill,boolean isOms) throws EmisBizError;
|
public int draftSubmitOrder(EmisWaybill emisWaybill,boolean isOms) throws EmisBizError;
|
||||||
|
|
||||||
|
public int draftSubmitOrderByOms(EmisWaybill emisWaybill,boolean isOms) throws EmisBizError;
|
||||||
|
|
||||||
|
|
||||||
public int realMatchOrderApi(EmisWaybill emisWaybillSave) throws EmisBizError;
|
public int realMatchOrderApi(EmisWaybill emisWaybillSave) throws EmisBizError;
|
||||||
|
|
||||||
|
|||||||
@ -373,6 +373,62 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OMS 草稿方式批量下单
|
||||||
|
* @param emisWaybillSave
|
||||||
|
* @param isOms
|
||||||
|
* @return
|
||||||
|
* @throws EmisBizError
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int draftSubmitOrderByOms(EmisWaybill emisWaybillSave,boolean isOms) throws EmisBizError {
|
||||||
|
|
||||||
|
// 如果没有单号就生成单号,如果有单号需要判断是否重复
|
||||||
|
if( !StringUtils.isEmpty(emisWaybillSave.getBillCode()) ) {
|
||||||
|
|
||||||
|
String billCode=WaybillHelper.formatQueryValue(emisWaybillSave.getBillCode());
|
||||||
|
emisWaybillSave.setBillCode(billCode);
|
||||||
|
|
||||||
|
boolean isExists = this.checkWaybillIsExists(emisWaybillSave.getBillCode());
|
||||||
|
if (isExists) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.EXISTS, "运单号重复");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换草稿数据到真实数据
|
||||||
|
cvtWaybillDraftToReal(emisWaybillSave,isOms);
|
||||||
|
|
||||||
|
String sendSiteCode=null;
|
||||||
|
// 生成运单
|
||||||
|
if(!isOms){
|
||||||
|
sendSiteCode=SecurityUtils.getLoginUser().getUser().getOwnerSiteCode();
|
||||||
|
emisWaybillSave.setSendSiteCode(sendSiteCode);
|
||||||
|
}else{
|
||||||
|
sendSiteCode=emisWaybillSave.getSendSiteCode();
|
||||||
|
emisWaybillSave.setSendSiteCode(sendSiteCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isEmpty(sendSiteCode)){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "寄件地址不在网点服务区");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isEmpty(emisWaybillSave.getBillCode()) ) {
|
||||||
|
// 生成新的运单号
|
||||||
|
String waybillNo = emisElectronicSitePagService.realMatchWaybill(sendSiteCode, "T7080");
|
||||||
|
emisWaybillSave.setBillCode(waybillNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 开始下单
|
||||||
|
if(!isOms) {
|
||||||
|
addNewWaybill(emisWaybillSave);
|
||||||
|
}else{
|
||||||
|
addNewWaybillByOms(emisWaybillSave);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API下单方式
|
* API下单方式
|
||||||
* @param emisWaybillSave
|
* @param emisWaybillSave
|
||||||
@ -2754,10 +2810,10 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
userEmpCode=emisWaybillSave.getTakePieceEmployeeCode();
|
userEmpCode=emisWaybillSave.getTakePieceEmployeeCode();
|
||||||
}
|
}
|
||||||
if(!StringUtils.isEmpty(userEmpCode)) {
|
if(!StringUtils.isEmpty(userEmpCode)) {
|
||||||
sendNoticeToEmpUser(userEmpCode, title, title, "d24/orderManagement/UserOrderList");
|
sendNoticeToEmpUser(userEmpCode, title, title, "/d24/orderManagement/UserOrderList");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sendNoticeToSite(emisWaybillSave.getSendSiteCode(), title, title, "d24/orderManagement/UserOrderList");
|
sendNoticeToSite(emisWaybillSave.getSendSiteCode(), title, title, "/d24/orderManagement/UserOrderList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user