| | |
| | | import com.vincent.rsf.server.api.entity.constant.RcsConstant; |
| | | import com.vincent.rsf.server.api.entity.params.TaskItemParam; |
| | | import com.vincent.rsf.server.api.entity.params.WcsTaskParams; |
| | | import com.vincent.rsf.server.api.service.ReportMsgService; |
| | | import com.vincent.rsf.server.api.utils.LocUtils; |
| | | import com.vincent.rsf.server.common.constant.Constants; |
| | | import com.vincent.rsf.server.manager.controller.params.LocToTaskParams; |
| | |
| | | private RemotesInfoProperties.RcsApi rcsApi; |
| | | @Autowired |
| | | private BasStationService basStationService; |
| | | @Autowired |
| | | private ReportMsgService reportMsgService; |
| | | |
| | | /** |
| | | * @param |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @param |
| | | * @return |
| | |
| | | throw new CoolException("任务历史档保存失败!!"); |
| | | } |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | |
| | | taskItems.forEach(taskItem -> { |
| | | WkOrder order = asnOrderService.getById(taskItem.getOrderId()); |
| | | if (Objects.isNull(order)) { |
| | | throw new CoolException("数拓错误,单据不存在!!"); |
| | | } |
| | | if (order.getType().equals(OrderType.ORDER_OUT.type)) { |
| | | try { |
| | | //上报已完成订单至ERP、MES等三方系统 |
| | | reportMsgService.reportOrders(order); |
| | | order.setReportOnce(order.getReportOnce() + 1); |
| | | if (!asnOrderService.updateById(order)) { |
| | | log.error(order.getCode() + ",单据上传次数修改失败!!"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | List<TaskItemLog> itemLogs = new ArrayList<>(); |
| | | for (TaskItem item : taskItems) { |
| | | TaskItemLog itemLog = new TaskItemLog(); |