md
This commit is contained in:
parent
f4f8efa713
commit
113cfe3d7c
@ -143,32 +143,42 @@ public class EmisWaybillController extends EmisBaseController
|
||||
@PostMapping(value = "/draftSubmitOrder")
|
||||
public AjaxResult draftSubmitOrder(@RequestBody EmisWaybill emisWaybillSave)
|
||||
{
|
||||
|
||||
JSONObject jObjOut = new JSONObject();
|
||||
String result="success";
|
||||
String msg="下单成功";
|
||||
try {
|
||||
|
||||
emisWaybillService.draftSubmitOrder(emisWaybillSave);
|
||||
|
||||
JSONObject jObjOut = new JSONObject();
|
||||
jObjOut.put("billCode", emisWaybillSave.getBillCode());
|
||||
jObjOut.put("billDetail", emisWaybillSave);
|
||||
|
||||
return AjaxResult.success("下单成功", jObjOut);
|
||||
}catch(EmisBizError ex){
|
||||
ex.printStackTrace();
|
||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||
|
||||
result="fail";
|
||||
msg=ex.getErrorCode()+":"+ex.getMessage();
|
||||
|
||||
}
|
||||
catch (DuplicateKeyException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error("运单号重复!");
|
||||
result="fail";
|
||||
msg="运单号重复";
|
||||
|
||||
}
|
||||
catch (Exception ex){
|
||||
result="fail";
|
||||
ex.printStackTrace();
|
||||
msg="系统异常:"+ex.getMessage();
|
||||
// 返回子定义异常
|
||||
if(ex instanceof EmisBizError){
|
||||
return AjaxResult.error("("+((EmisBizError)ex).getErrorCode()+")"+ex.getMessage());
|
||||
msg=((EmisBizError)ex).getErrorCode()+":"+ex.getMessage();
|
||||
}
|
||||
|
||||
return AjaxResult.error("服务器异常,联系客服");
|
||||
}
|
||||
jObjOut.put("result", result);
|
||||
jObjOut.put("msg", msg);
|
||||
return AjaxResult.success("成功", jObjOut);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user