From be99dea0c47c9a86eae906b46d67e14081191ad8 Mon Sep 17 00:00:00 2001 From: zhangc <zc@123> Date: 星期六, 12 四月 2025 12:53:45 +0800 Subject: [PATCH] 1 --- src/main/java/com/zy/asrs/task/WrkMastScheduler.java | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/WrkMastScheduler.java b/src/main/java/com/zy/asrs/task/WrkMastScheduler.java index e2eceb7..5c4a431 100644 --- a/src/main/java/com/zy/asrs/task/WrkMastScheduler.java +++ b/src/main/java/com/zy/asrs/task/WrkMastScheduler.java @@ -1,7 +1,6 @@ package com.zy.asrs.task; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.zy.asrs.domain.enums.NotifyMsgType; import com.zy.asrs.entity.LocMast; @@ -10,13 +9,9 @@ import com.zy.asrs.service.WrkMastLogService; import com.zy.asrs.service.WrkMastService; import com.zy.asrs.utils.NotifyUtils; -import com.zy.common.utils.HttpHandler; import com.zy.core.enums.LocStsType; -import com.zy.core.enums.SlaveType; import com.zy.core.enums.WrkIoType; import com.zy.core.enums.WrkStsType; -import com.zy.system.entity.Config; -import com.zy.system.service.ConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; @@ -42,7 +37,7 @@ @Scheduled(cron = "0/1 * * * * ? ") @Transactional - public void executeIn(){ + public void executeIn() { List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_INBOUND.sts)); if (wrkMasts.isEmpty()) { return; @@ -85,7 +80,7 @@ @Scheduled(cron = "0/1 * * * * ? ") @Transactional - public void executeOut(){ + public void executeOut() { List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_OUTBOUND.sts)); if (wrkMasts.isEmpty()) { return; @@ -128,7 +123,7 @@ @Scheduled(cron = "0/1 * * * * ? ") @Transactional - public void executeLocMove(){ + public void executeLocMove() { List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_LOC_MOVE.sts)); if (wrkMasts.isEmpty()) { return; @@ -148,7 +143,7 @@ continue; } - LocMast sourceLocMast= locMastService.queryByLoc(sourceLocNo); + LocMast sourceLocMast = locMastService.queryByLoc(sourceLocNo); if (sourceLocMast == null) { log.info("[workNo={}]搴撲綅涓嶅瓨鍦�", wrkMast.getWrkNo()); continue; @@ -191,7 +186,7 @@ @Scheduled(cron = "0/1 * * * * ? ") @Transactional - public void executeMove(){ + public void executeMove() { List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() .in("wrk_sts" , WrkStsType.COMPLETE_MOVE.sts @@ -205,6 +200,18 @@ } for (WrkMast wrkMast : wrkMasts) { + WrkMast main = wrkMastService.selectByWorkNo(wrkMast.getMainWrkNo()); + if (main != null) { + if (main.getIoType() == WrkIoType.IN.id) { + main.setWrkSts(WrkStsType.INBOUND_SHUTTLE_RUN_COMPLETE.sts); + } else if (main.getIoType() == WrkIoType.OUT.id) { + main.setWrkSts(WrkStsType.OUTBOUND_LIFT_RUN_COMPLETE.sts); + } + main.setModiTime(new Date()); + if (wrkMastService.updateById(main)) { + log.info("鏇存柊涓诲伐浣滄。[workNo={}]澶辫触", wrkMast.getWrkNo()); + } + } // 淇濆瓨宸ヤ綔涓绘。鍘嗗彶妗� if (!wrkMastLogService.save(wrkMast.getWrkNo())) { log.info("淇濆瓨宸ヤ綔鍘嗗彶妗workNo={}]澶辫触", wrkMast.getWrkNo()); @@ -218,7 +225,7 @@ @Scheduled(cron = "0/1 * * * * ? ") @Transactional - public void executeCharge(){ + public void executeCharge() { List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.COMPLETE_CHARGE.sts)); if (wrkMasts.isEmpty()) { return; @@ -241,7 +248,7 @@ @Scheduled(cron = "0/1 * * * * ? ") @Transactional - public void executeCancelTask(){ + public void executeCancelTask() { List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("mk", "taskCancel")); if (wrkMasts.isEmpty()) { return; -- Gitblit v1.9.1