#
Junjie
2025-05-15 cadb481188032daabaabbda2259b98afead2c41b
src/main/java/com/zy/asrs/task/TaskLogScheduler.java
@@ -18,6 +18,7 @@
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
@@ -35,14 +36,10 @@
    @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
@@ -51,12 +48,16 @@
    @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
@@ -118,7 +119,8 @@
                }
            } 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) {//入库任务