From 6c8bbda65905a9dd299062d725682a8bc896cd72 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 21 六月 2024 19:14:33 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   86 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 84 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 99755c1..cc21f70 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -4417,7 +4417,7 @@
                     continue;
                 }
                 BasJarMast jarMastByJarIdMax = basJarMastService.getJarMastByJarIdMax(jarSlave.getId().longValue());
-                if (jarMastByJarIdMax.getJarLocDigit()==7){
+                if (!Cools.isEmpty(jarMastByJarIdMax) && jarMastByJarIdMax.getJarLocDigit()==7){
                     continue;
                 }
                 jarGenerateWrkMastStaExecute(jarSlave);
@@ -4441,7 +4441,20 @@
             if (jarProtocol.modeType != JarModeType.AUTO){
                 return false;
             }
-            //  鐘舵�侊細绛夊緟纭 骞朵笖  浠诲姟瀹屾垚浣� = 1
+
+            JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
+            JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
+            if (jarOtherProtocol == null) {
+                return false;
+            }
+            if (jarOtherProtocol.modeType != JarModeType.AUTO){
+                return false;
+            }
+
+            //鑷姩銆佺┖闂层�佸彸闂ㄥ叧闂��
+            if (jarProtocol.isAutoing() && !jarProtocol.isRightDoor() && jarProtocol.jarErr==0 && !jarOtherProtocol.isLeftDoor() && jarOtherProtocol.jarErr==0){
+
+            }
 
         } catch (Exception e){
 //            log.error("鍫嗗灈鏈哄伐浣嶄簩瀹屾垚绛夊緟纭寮傚父,鍫嗗灈鏈哄彿={},寮傚父淇℃伅={},宸ヤ綅鍙�={}",crn.getId(),e.getMessage(),2);
@@ -4449,6 +4462,75 @@
         return false;
     }
 
+    /**
+     *  Jar浠诲姟鍒涘缓  鎵ц
+     */
+    public synchronized boolean jarGenerateWrkMastStaExecuteOne(JarSlave jarSlave) {
+        try{
+            // 鑾峰彇鍫嗗灈鏈轰俊鎭�
+            JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId());
+            JarProtocol jarProtocol = jarThread.getJarProtocol();
+            if (jarProtocol == null) {
+                return false;
+            }
+            if (jarProtocol.modeType != JarModeType.AUTO){
+                return false;
+            }
+
+            JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
+            JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
+            if (jarOtherProtocol == null) {
+                return false;
+            }
+            if (jarOtherProtocol.modeType != JarModeType.AUTO){
+                return false;
+            }
+
+            //鑷姩銆佺┖闂层�佸彸闂ㄥ叧闂��
+            if (jarProtocol.isAutoing() && !jarProtocol.isRightDoor() && jarProtocol.jarErr==0 && !jarOtherProtocol.isLeftDoor() && jarOtherProtocol.jarErr==0){
+
+            }
+
+        } catch (Exception e){
+//            log.error("鍫嗗灈鏈哄伐浣嶄簩瀹屾垚绛夊緟纭寮傚父,鍫嗗灈鏈哄彿={},寮傚父淇℃伅={},宸ヤ綅鍙�={}",crn.getId(),e.getMessage(),2);
+        }
+        return false;
+    }
+
+    /**
+     *  Jar浠诲姟鍒涘缓  鎵ц
+     */
+    public synchronized boolean jarGenerateWrkMastStaExecuteTwo(JarSlave jarSlave) {
+        try{
+            // 鑾峰彇鍫嗗灈鏈轰俊鎭�
+            JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId());
+            JarProtocol jarProtocol = jarThread.getJarProtocol();
+            if (jarProtocol == null) {
+                return false;
+            }
+            if (jarProtocol.modeType != JarModeType.AUTO){
+                return false;
+            }
+
+            JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
+            JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
+            if (jarOtherProtocol == null) {
+                return false;
+            }
+            if (jarOtherProtocol.modeType != JarModeType.AUTO){
+                return false;
+            }
+
+            //鑷姩銆佺┖闂层�佸彸闂ㄥ叧闂��
+            if (jarProtocol.isAutoing() && !jarProtocol.isRightDoor() && jarProtocol.jarErr==0 && !jarOtherProtocol.isLeftDoor() && jarOtherProtocol.jarErr==0){
+
+            }
+
+        } catch (Exception e){
+//            log.error("鍫嗗灈鏈哄伐浣嶄簩瀹屾垚绛夊緟纭寮傚父,鍫嗗灈鏈哄彿={},寮傚父淇℃伅={},宸ヤ綅鍙�={}",crn.getId(),e.getMessage(),2);
+        }
+        return false;
+    }
 
     /**
      *  Jar浠诲姟鎵ц

--
Gitblit v1.9.1