From e2d6a43d4f7d083233896755573d2c55444fb66f Mon Sep 17 00:00:00 2001 From: 野心家 <1051256694@qq.com> Date: 星期五, 14 三月 2025 09:40:07 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/task/TaskLogScheduler.java | 45 +++++++++++++++++++++++++-------------------- 1 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/TaskLogScheduler.java b/src/main/java/com/zy/asrs/task/TaskLogScheduler.java index 8463ff2..c3c5024 100644 --- a/src/main/java/com/zy/asrs/task/TaskLogScheduler.java +++ b/src/main/java/com/zy/asrs/task/TaskLogScheduler.java @@ -51,30 +51,35 @@ 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; + /** + * 鍏ュ嚭搴撲换鍔¤浆鍘嗗彶妗� + * @throws IOException + */ @Scheduled(cron = "0/3 * * * * ? ") public void execute() throws IOException { - for (TaskWrk taskWrk : taskWrkService.selectToBeHistoryData()) { - if (taskWrk.getStatus().equals(TaskStatusType.OVER.id)||taskWrk.getStatus()==7) {//瀹屾垚 - //鍖哄垎鍏ュ嚭搴� - TaskWrkLog taskWrkLog = new TaskWrkLog(taskWrk); - if (!wrkLogService.insert(taskWrkLog)) { - throw new CoolException("杞巻鍙叉。澶辫触" + taskWrkLog); - } - if (!taskWrkService.deleteById(taskWrk)) { - throw new CoolException("浠诲姟妗e垹闄ゅけ璐�" + taskWrkLog); - } - } else if (taskWrk.getStatus().equals(TaskStatusType.CANCEL.id)) { - TaskWrkLog taskWrkLog=new TaskWrkLog(taskWrk); - if(!wrkLogService.insert(taskWrkLog)){ - throw new CoolException("杞巻鍙叉。澶辫触"+taskWrkLog); - } - if(!taskWrkService.deleteById(taskWrk)){ - throw new CoolException("浠诲姟妗e垹闄ゅけ璐�"+taskWrkLog); - } + //鍏ュ簱7杞巻鍙叉。,绉诲簱7杞巻鍙叉。,鍑哄簱18杞� + List<TaskWrk> taskWrkList = taskWrkService.selectList(new EntityWrapper<TaskWrk>().in("wrk_sts", 7,18)); + for (TaskWrk taskWrk : taskWrkList) { + TaskWrkLog taskWrkLog = new TaskWrkLog(taskWrk); + if(taskWrkLog.getIoType().equals(2)){ + taskWrkLog.setWrkSts(19); + }else{ + taskWrkLog.setWrkSts(8); } - + taskWrkLog.setModiTime(new Date()); + if (!wrkLogService.insert(taskWrkLog)) { + throw new CoolException("杞巻鍙叉。澶辫触" + taskWrkLog); + } + if (!taskWrkService.deleteById(taskWrk)) { + throw new CoolException("浠诲姟妗e垹闄ゅけ璐�" + taskWrkLog); + } } } - } -- Gitblit v1.9.1