From 6efef82561e2cf14f09871d63e1581c6174cfe10 Mon Sep 17 00:00:00 2001 From: zwl <1051256694@qq.com> Date: 星期三, 25 六月 2025 15:01:53 +0800 Subject: [PATCH] 第二版本 --- src/main/java/com/zy/asrs/task/WorkMastScheduler.java | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/WorkMastScheduler.java b/src/main/java/com/zy/asrs/task/WorkMastScheduler.java index f39e2a5..0a92339 100644 --- a/src/main/java/com/zy/asrs/task/WorkMastScheduler.java +++ b/src/main/java/com/zy/asrs/task/WorkMastScheduler.java @@ -31,27 +31,18 @@ @Autowired private WorkMastHandler workMastHandler; @Autowired - private BasDevpService basDevpService; + private BasDevpService basDevpService; @Scheduled(cron = "0/3 * * * * ? ") private void execute() { + //鎷f枡鐩樼偣浠诲姟涓嬪彂 + WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().in("io_type",107,103).eq("wrk_sts",14).isNull("error_memo")); + if (!Cools.isEmpty(wrkMast1)) { + wrkMast1.setWrkSts(30L); + wrkMastService.updateById(wrkMast1); + } List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData(); if (wrkMasts.isEmpty()) { - List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>() - .eq("wrk_sts", 14) - .eq("io_type", 103)); - for (WrkMast wrkMast : wrkMasts1) { - BasDevp basDevp=basDevpService.selectOne(new EntityWrapper<BasDevp>() - .eq("dev_no",wrkMast.getStaNo()) - .eq("wrk_no",wrkMast.getWrkNo())); - if(basDevp==null){ - continue; - } - if (!Cools.isEmpty(wrkMast.getMemo())) { - wrkMast.setWrkSts(30L); - wrkMastService.updateById(wrkMast); - } - } return; } for (WrkMast wrkMast : wrkMasts) { @@ -65,6 +56,7 @@ } } } + } } -- Gitblit v1.9.1