From 23a2e30f0f70c1f526a04bffda38fd124ed47630 Mon Sep 17 00:00:00 2001 From: zhangc <zc@123> Date: 星期五, 18 四月 2025 14:51:52 +0800 Subject: [PATCH] 999 --- src/main/java/com/zy/asrs/task/WrkMastScheduler.java | 34 ++++++++++++++++++++++------------ 1 files changed, 22 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 ec24df3..7b825ed 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,18 +186,33 @@ @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 , WrkStsType.COMPLETE_MOVE_TRANSPORT_LIFT.sts , WrkStsType.COMPLETE_MOVE_TRANSPORT_LIFT_OUT.sts + , WrkStsType.MOVE_IN_NO_LIFT_14.sts + , WrkStsType.MOVE_OUT_NO_LIFT_13.sts )); if (wrkMasts.isEmpty()) { return; } for (WrkMast wrkMast : wrkMasts) { + WrkMast main = wrkMastService.selectByWorkNo(wrkMast.getMainWrkNo()); + if (main != null) { + if (main.getIoType() == WrkIoType.IN.id) { + main.setWrkSts(WrkStsType.COMPLETE_INBOUND.sts); + } else if (main.getIoType() == WrkIoType.OUT.id) { + main.setShuttleNo(wrkMast.getShuttleNo()); + main.setWrkSts(WrkStsType.OUTBOUND_SHUTTLE_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()); @@ -216,7 +226,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; @@ -239,7 +249,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