| | |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.model.MesPakinParam; |
| | | import com.zy.common.model.MesPakoutParam; |
| | |
| | | if (null == docType) { |
| | | return SUCCESS; |
| | | } |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | // 入库完成上报 |
| | | if (docType.getPakin() == 1) { |
| | | MesPakinParam pakinParam = new MesPakinParam(); |
| | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | // if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | // throw new CoolException("服务器内部错误,请联系管理员"); |
| | | // } |
| | | OrderInAndOutUtil.updateOrder(order.getPakinPakoutStatus$(),order.getId(),6L,null); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(pakinParam), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | // if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | // throw new CoolException("服务器内部错误,请联系管理员"); |
| | | // } |
| | | OrderInAndOutUtil.updateOrder(order.getPakinPakoutStatus$(),order.getId(),6L,null); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKOUT_URL, JSON.toJSONString(pakoutParam), response); |
| | | throw new CoolException("上报mes系统失败"); |