From c0a09a7aced8640a8a9ed55442e4dffb7624cec3 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 09 八月 2024 16:20:29 +0800
Subject: [PATCH] #优化

---
 src/main/java/com/zy/asrs/task/BareBoardScheduler.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/BareBoardScheduler.java b/src/main/java/com/zy/asrs/task/BareBoardScheduler.java
index 736cedd..5f9243c 100644
--- a/src/main/java/com/zy/asrs/task/BareBoardScheduler.java
+++ b/src/main/java/com/zy/asrs/task/BareBoardScheduler.java
@@ -93,6 +93,12 @@
             Integer devNo = 173;
             Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard172"));
             if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){
+                BasDevp basDevp = basDevpService.selectById(160);
+                if (basDevp.getLoading().equals("Y")
+                        || !basDevp.getAutoing().equals("Y")
+                        || (!Cools.isEmpty(basDevp.getWrkNo()) && basDevp.getWrkNo()!=0) ){
+                    return;
+                }
                 int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 160).le("dev_no", devNo).eq("loading", "Y"));
                 int count = 10;
                 int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", devNo).eq("wrk_sts",11L));
@@ -104,11 +110,17 @@
     }
 
     @Scheduled(cron = "0/3 * * * * ? ")
-    private void execute3(){//鑷姩璋冪┖鏉垮嚭搴� 鐓滄槦浜屾ゼ灏忔枡绠�  172
+    private void execute3(){//鑷姩璋冪┖鏉垮嚭搴� 鐓滄槦浜屾ゼ灏忔枡绠�  272
         if (slaveWmsParameterProperties.isAutomaticFillingBoardStaNosBoolean()){
             Integer devNo = 272;
             Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard272"));
             if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){
+                BasDevp basDevp = basDevpService.selectById(266);
+                if (basDevp.getLoading().equals("Y")
+                        || !basDevp.getAutoing().equals("Y")
+                        || (!Cools.isEmpty(basDevp.getWrkNo()) && basDevp.getWrkNo()!=0) ){
+                    return;
+                }
                 int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 266).le("dev_no", devNo).eq("loading", "Y"));
                 int count = 5;
                 int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", devNo).eq("wrk_sts",11L));
@@ -125,8 +137,14 @@
             Integer devNo = 445;
             Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard445"));
             if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){
+                BasDevp basDevp = basDevpService.selectById(422);
+                if (basDevp.getLoading().equals("Y")
+                        || !basDevp.getAutoing().equals("Y")
+                        || (!Cools.isEmpty(basDevp.getWrkNo()) && basDevp.getWrkNo()!=0) ){
+                    return;
+                }
                 int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 422).le("dev_no", devNo).eq("loading", "Y"));
-                int count = 20;
+                int count = 15;
                 int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", devNo).eq("wrk_sts",11L));
                 if (loadIngCount+wrkCount<count){
                     bareBoardHandler.startYx(devNo,count);

--
Gitblit v1.9.1