| | |
| | | @Autowired(required = false) |
| | | private WmsServerFeignClient wmsServerFeignClient; |
| | | |
| | | |
| | | @ApiOperation("仓库信息同步") |
| | | @PostMapping("/wareHouse/sync") |
| | | public CommonResponse syncWareHouse(@RequestBody Object objParams) { |
| | |
| | | if ("200".equals(resultMsg)){ |
| | | return CommonResponse.ok(resultMsg); |
| | | } |
| | | return CommonResponse.ok(); |
| | | return CommonResponse.error(resultMsg); |
| | | } |
| | | |
| | | @ApiOperation("入/出库任务通知单") |
| | |
| | | return CommonResponse.ok(errorMsg.toString()); |
| | | } |
| | | |
| | | @ApiOperation("入/出库任务通知单(新链路)") |
| | | @PostMapping("/order/add/new") |
| | | public CommonResponse addOrderNew(@RequestBody Object objParams) { |
| | | if (Objects.isNull(objParams)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (SIMULATED_DATA_ENABLE.equals("1")) { |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | | JSONArray params = paramsFormat(objParams); |
| | | List<Order> orderList = JSON.parseArray(params.toJSONString(), Order.class); |
| | | StringBuffer msg = new StringBuffer(); |
| | | boolean allSuccess = true; |
| | | for (Order order : orderList) { |
| | | String result = erpReportService.addOrderToServerNew(order); |
| | | if ("200".equals(result)) { |
| | | msg.append(order.getOrderNo()).append("下发成功;"); |
| | | } else { |
| | | allSuccess = false; |
| | | msg.append(order.getOrderNo()).append("下发失败,原因:").append(result).append(";"); |
| | | } |
| | | } |
| | | return allSuccess ? CommonResponse.ok(msg.toString()) : CommonResponse.error(msg.toString()); |
| | | } |
| | | |
| | | @ApiOperation("订单信息上报(新链路)") |
| | | @PostMapping("/report/order/new") |
| | | public CommonResponse reportOrderNew(@RequestBody Object objParams) { |
| | | if (Objects.isNull(objParams)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (SIMULATED_DATA_ENABLE.equals("1")) { |
| | | return CommonResponse.ok(); |
| | | } |
| | | return erpReportService.reportOrderNew(objParams); |
| | | } |
| | | |
| | | @ApiOperation("入/出库任务通知单取消") |
| | | @PostMapping("/order/cancel") |
| | | public CommonResponse cancelOrder(@RequestBody Object objParams) { |