From 9e0565c5e880587b0144278206a966e4ba3f370e Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期日, 02 六月 2024 14:48:37 +0800 Subject: [PATCH] #111任务堵塞 --- src/main/java/com/zy/asrs/task/AutoMoveScheduler.java | 48 ++++++++++++++++++++++++++++++++++-------------- 1 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/AutoMoveScheduler.java b/src/main/java/com/zy/asrs/task/AutoMoveScheduler.java index cb64c93..2639d03 100644 --- a/src/main/java/com/zy/asrs/task/AutoMoveScheduler.java +++ b/src/main/java/com/zy/asrs/task/AutoMoveScheduler.java @@ -110,6 +110,7 @@ List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() .eq("wrk_sts", 22) .andNew().eq("io_type",111) + .orderBy("io_pri",false) .orderBy("appe_time",true) ); if (agvWrkMastList.isEmpty()) { @@ -201,22 +202,41 @@ */ @Scheduled(cron = "0/2 * * * * ? ") private void autoEmptyBack4(){ - // 鏌ヨ 涓嶄负1妤肩殑绌鸿揣鏋� - List<AgvLocMast> agvLocMasts = agvLocMastService.selectList( - new EntityWrapper<AgvLocMast>() - .ne("floor", 1) - .eq("loc_sts","D") - .eq("loc_type1",3)); - if (agvLocMasts.isEmpty()) { - return; - } - for (AgvLocMast agvLocMast : agvLocMasts) { - try{ - autoMoveHandler.autoEmptyBack4(agvLocMast); - } catch (Exception e){ - log.error("搴撲綅鍙�"+agvLocMast.getLocNo()+"绌烘澘鑷姩鍥炲簱 搴撲綅-鎺ラ┏鐐� 搴撲綅-鍚稿杞﹂棿,澶勭悊澶辫触锛�===銆嬪紓甯稿師鍥狅細"+e.getMessage()); +// if (determineFloorConnection(2)){ + // 鏌ヨ 涓嶄负1妤肩殑绌鸿揣鏋� + List<AgvLocMast> agvLocMasts = agvLocMastService.selectList( + new EntityWrapper<AgvLocMast>() + .ne("floor", 1) + .eq("loc_sts","D") + .eq("loc_type1",3)); + if (agvLocMasts.isEmpty()) { + return; } + for (AgvLocMast agvLocMast : agvLocMasts) { + try{ + autoMoveHandler.autoEmptyBack4(agvLocMast); + } catch (Exception e){ + log.error("搴撲綅鍙�"+agvLocMast.getLocNo()+"绌烘澘鑷姩鍥炲簱 搴撲綅-鎺ラ┏鐐� 搴撲綅-鍚稿杞﹂棿,澶勭悊澶辫触锛�===銆嬪紓甯稿師鍥狅細"+e.getMessage()); + } + } +// } + } + + private boolean determineFloorConnection(Integer floor){ + try{ + List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("floor", floor).like("dev_no", "DB_")); + if (!agvBasDevps.isEmpty()){ + for (AgvBasDevp agvBasDevp:agvBasDevps){ + if (agvBasDevp.getInEnable().equals("Y")){ + return false; + } + } + return true; + } + }catch (Exception e){ + log.error("鍒ゆ柇褰撳墠妤煎眰鎺ラ┏浣嶆槸鍚﹀叏閮ㄥ叧闂紝寮傚父"+e.getMessage()); } + return false; } /** -- Gitblit v1.9.1