md
This commit is contained in:
parent
a202e16be9
commit
e5db8a0df2
@ -117,29 +117,7 @@ public class Oms2cWaybillController extends BaseController
|
||||
@PostMapping(value = "/realSubmitOrder")
|
||||
public AjaxResult realSubmitOrder(@Valid @RequestBody WaybillOrder waybillOrder,Integer isModify)
|
||||
{
|
||||
try {
|
||||
EmisWaybill emisWaybillSave = waybillOrder.toDb();
|
||||
emisWaybillService.realSubmitOrder(emisWaybillSave);
|
||||
JSONObject jObjOut = new JSONObject();
|
||||
jObjOut.put("billCode", waybillOrder.getBillCode());
|
||||
return AjaxResult.success("下单成功", jObjOut);
|
||||
}catch(EmisBizError ex){
|
||||
ex.printStackTrace();
|
||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||
}
|
||||
catch (DuplicateKeyException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error("运单号重复!");
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if(ex instanceof EmisBizError){
|
||||
return AjaxResult.error("("+((EmisBizError)ex).getErrorCode()+")"+ex.getMessage());
|
||||
}
|
||||
|
||||
return AjaxResult.error("服务器异常,联系客服");
|
||||
}
|
||||
return this.iApiwebSvc.realMatchWaybill(waybillOrder,isModify);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@FeignClient(name = "${service.provider.name}",url = "${service.provider.url}",configuration = {FeignErrorDecoder.class})
|
||||
public interface IApiwebSvc {
|
||||
|
||||
@ -26,4 +28,14 @@ public interface IApiwebSvc {
|
||||
*/
|
||||
@PostMapping(value = "/apiweb/emisWaybill/preCalcWaybillFee")
|
||||
public AjaxResult preCalcWaybillFee(@RequestBody WaybillOrder waybillOrder);
|
||||
|
||||
|
||||
/**
|
||||
* OMS实时下单
|
||||
* @param waybillOrder
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/apiweb/emisWaybill/realSubmitOrderByOms")
|
||||
public AjaxResult realSubmitOrderByOms(@RequestBody WaybillOrder waybillOrder, Integer isModify);
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user