| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | |
| | |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | @Value("${wms.movePath}") |
| | | private String movePath; |
| | | @Value("${wms.inboundTaskApplyPath}") |
| | | private String inboundTaskApplyPath; |
| | | @Value("${wms.TaskExecCallback}") |
| | | private String TaskExecCallback; |
| | | @Value("${wms.taskStatusFeedbackPath}") |
| | | private String taskStatusFeedbackPath; |
| | | @Autowired |
| | | private NotifyUtils notifyUtils; |
| | | @Autowired |
| | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public void execute() throws IOException { |
| | | for (TaskWrk taskWrk : taskWrkService.selectToBeHistoryData()) { |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:ss:mm"); |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | headParam.put("taskNo", taskWrk.getTaskNo()); |
| | | headParam.put("barcode", taskWrk.getBarcode()); |
| | | headParam.put("reportTime", format.format(new Date())); |
| | | |
| | | NotifyMsgType notifyMsgType = null; |
| | | if (taskWrk.getStatus().equals(TaskStatusType.OVER.id) || taskWrk.getStatus().equals(TaskStatusType.MANUAL_OVER.id)) {//完成 |
| | | headParam.put("Result", 1);//完成 |
| | | headParam.put("status", TaskStatusType.OVER.id); |
| | | headParam.put("ioType", 1); |
| | | notifyMsgType = NotifyMsgType.TASK_COMPLETE; |
| | | |
| | | if (taskWrk.getIoType() == 1) {//入库任务完成库位为F |
| | |
| | | } |
| | | |
| | | } else if (taskWrk.getStatus().equals(TaskStatusType.CANCEL.id)) { |
| | | headParam.put("Result", 2);//取消 |
| | | headParam.put("status", TaskStatusType.CANCEL.id); |
| | | headParam.put("ioType", 2); |
| | | notifyMsgType = NotifyMsgType.TASK_CANCEL; |
| | | |
| | | if (taskWrk.getIoType() == 1) {//入库任务 |