From 6719ba73c7f0c97abfc9da2bd35a265c0e3d325b Mon Sep 17 00:00:00 2001
From: lsh <lsh>
Date: 星期四, 25 七月 2024 16:32:29 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/task/BareBoardScheduler.java |   38 ++++++++++++++++++++++++++++++--------
 1 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/BareBoardScheduler.java b/src/main/java/com/zy/asrs/task/BareBoardScheduler.java
index 5c2cb5c..35c9ce7 100644
--- a/src/main/java/com/zy/asrs/task/BareBoardScheduler.java
+++ b/src/main/java/com/zy/asrs/task/BareBoardScheduler.java
@@ -37,6 +37,8 @@
     private WrkMastStaService wrkMastStaService;
     @Autowired
     private SlaveWmsParameterProperties slaveWmsParameterProperties;
+    @Autowired
+    private WrkMastService wrkMastService;
 
 //    @Scheduled(cron = "0/3 * * * * ? ")
 //    private void execute(){//鑷姩璋冪┖鏉垮嚭搴� 2妤肩爜鍨涗綅缃�
@@ -88,12 +90,30 @@
     @Scheduled(cron = "0/3 * * * * ? ")
     private void execute1(){//鑷姩璋冪┖鏉垮嚭搴� 鐓滄槦浜屾ゼ灏忔枡绠�  172
         if (slaveWmsParameterProperties.isAutomaticFillingBoardStaNosBoolean()){
+            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")){
-                int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 160).le("dev_no", 172).eq("loading", "Y"));
+                int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 160).le("dev_no", devNo).eq("loading", "Y"));
                 int count = 10;
-                if (loadIngCount<=count){
-                    bareBoardHandler.startYx(172,count);
+                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);
+                }
+            }
+        }
+    }
+
+    @Scheduled(cron = "0/3 * * * * ? ")
+    private void execute3(){//鑷姩璋冪┖鏉垮嚭搴� 鐓滄槦浜屾ゼ灏忔枡绠�  172
+        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")){
+                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));
+                if (loadIngCount+wrkCount<count){
+                    bareBoardHandler.startYx(devNo,count+5);
                 }
             }
         }
@@ -102,12 +122,14 @@
     @Scheduled(cron = "0/3 * * * * ? ")
     private void execute2(){//鑷姩璋冪┖鏉垮嚭搴� 鐓滄槦涓�妤�
         if (slaveWmsParameterProperties.isAutomaticFillingBoardStaNosBoolean()){
-            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard448"));
+            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")){
-                int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 421).le("dev_no", 448).eq("loading", "Y"));
-                int count = 25;
-                if (loadIngCount<=count){
-                    bareBoardHandler.startYx(448,count);
+                int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 422).le("dev_no", devNo).eq("loading", "Y"));
+                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