From 3d60feb8502224e3936be304092f2f9625bbeeea Mon Sep 17 00:00:00 2001 From: yxFwq <1> Date: 星期四, 21 十一月 2024 15:12:35 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/task/WrkMastCrnScheduler.java | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/WrkMastCrnScheduler.java b/src/main/java/com/zy/asrs/task/WrkMastCrnScheduler.java index 164c4c6..91e8fb8 100644 --- a/src/main/java/com/zy/asrs/task/WrkMastCrnScheduler.java +++ b/src/main/java/com/zy/asrs/task/WrkMastCrnScheduler.java @@ -25,6 +25,7 @@ public class WrkMastCrnScheduler { private static final Logger log = LoggerFactory.getLogger(WorkMastScheduler.class); + private static Integer signSmallTurn = 0; @Autowired private WrkMastCrnHandler wrkMastCrnHandler; @@ -103,11 +104,25 @@ .eq("source_sta_no", staNo).eq("wrk_sts", 11L) .orderBy("io_pri",false)); for (WrkMast wrkMast:wrkMasts){ + if (wrkMast.getStaNoSign().equals(signSmallTurn)){ + continue; + } if (wrkMast.getIoType()==101){ - BasDevp basDevp = basDevpService.selectById(115); + BasDevp basDevp = basDevpService.selectById(119); if (basDevp.getLoading().equals("Y") || !basDevp.getAutoing().equals("Y") || (!Cools.isEmpty(basDevp.getWrkNo()) && basDevp.getWrkNo()!=0) ){ + continue; + } + int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 103).le("dev_no", 121).eq("loading", "Y")); + if (loadIngCount>8){ + continue; + } + RgvOneSign smallTurn = rgvOneSignService.selectOne(new EntityWrapper<RgvOneSign>().eq("rgv_one_type","smallTurn")); + if (Cools.isEmpty(smallTurn)){ + continue; + } + if (smallTurn.getRgvOneSign()>15){ continue; } } @@ -118,6 +133,10 @@ if (Cools.isEmpty(wrkMastCrn)){ ReturnT<String> result = wrkMastCrnHandler.start(wrkMast); if (result.isSuccess()) { + signSmallTurn++; + if (signSmallTurn > 2){ + signSmallTurn = 0; + } break; } } @@ -126,6 +145,12 @@ log.error("宸﹀彸鍙屽伐浣嶅爢鍨涙満鎵ц浠诲姟鐢熸垚====銆嬪嚭搴撲换鍔$敓鎴愬紓甯革細"+e.getMessage()); } } + if (!wrkMasts.isEmpty()){ + signSmallTurn++; + if (signSmallTurn > 2){ + signSmallTurn = 0; + } + } } } } -- Gitblit v1.9.1