From 31101f632c27c05d15f30ca3084e3ed3da2a29af Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 08 十二月 2023 11:42:08 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java |   48 ++++++++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index de38cb9..136c668 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -14,6 +14,7 @@
 import com.example.springboot.mapper.SpianMapper;
 import com.example.springboot.service.JdbcConnections;
 import com.example.springboot.service.North_Glass_Buffer1Service;
+import com.example.springboot.service.OutSliceServive;
 import com.example.springboot.service.SpianService;
 
 
@@ -21,6 +22,7 @@
 
     @Autowired
     private HomeMapper homeMapper;
+    private OutSliceServive outSliceServive;
     private SpianMapper spianMapper;
     private SpianService spianService;
     private North_Glass_Buffer1Service north_Glass_Buffer1Service;
@@ -47,6 +49,7 @@
             homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
             spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
             spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
+            outSliceServive = WebSocketServer.applicationContext.getBean(OutSliceServive.class);
             north_Glass_Buffer1Service = WebSocketServer.applicationContext.getBean(North_Glass_Buffer1Service.class);
             // 绗煎瓙浣跨敤鎯呭喌
             List<StorageCage> tableData = homeMapper.selectAll();
@@ -69,24 +72,24 @@
             List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo();
             jsonObject.append("alarmmg", alarmmg);
             // 璇诲幓Plc杩涚墖杞︿笌鍑虹墖杞︿綅缃甒
-            // List<String> addressList = new ArrayList<String>();
-            // addressList.add("DB106.12");
-            // addressList.add("DB106.0");
-            // List<Short> paramlist = S7control.getinstance().ReadWord(addressList);
-            // if (paramlist != null) {
-            // jsonObject.append("params", paramlist);
-            // }
-            // // 鑾峰彇杩涚墖杞︾姸鎬�
-            // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
-            // 1);// 鑾峰彇杩涚墖杞︾姸鎬�
-            // boolean exist1 = datas1ListState.contains((short) 0);
-            // jsonObject.append("zhuangtai", exist1);
-            // //鑾峰彇杩涚墖鐜荤拑淇℃伅
-            // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
-            // if (inglassInfo != null) {
-            // if (inglassInfo.size() > 0)
-            // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
-            // }
+             List<String> addressList = new ArrayList<String>();
+             addressList.add("DB106.12");
+             addressList.add("DB106.0");
+             List<Short> paramlist = S7control.getinstance().ReadWord(addressList);
+             if (paramlist != null) {
+             jsonObject.append("params", paramlist);
+             }
+             // 鑾峰彇杩涚墖杞︾姸鎬�
+             List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8",
+             1);// 鑾峰彇杩涚墖杞︾姸鎬�
+             boolean exist1 = datas1ListState.contains((short) 0);
+             jsonObject.append("zhuangtai", exist1);
+             //鑾峰彇杩涚墖鐜荤拑淇℃伅
+             List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1);
+             if (inglassInfo != null) {
+             if (inglassInfo.size() > 0)
+             jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
+             }
             
             // 浼� 鑾峰彇杩涙槸鍚︽湁寰呯‘璁ょ殑鐜荤拑id
             String queid = spianMapper.Selectqueueid();
@@ -103,10 +106,11 @@
                 jsonObject.append("form3", form3);
             }
             // 鑾峰彇鍑虹墖闃熷垪淇℃伅
-            List<Out_slice> listoutslice = homeMapper.SelectProductionqueue();
-            for (Out_slice out_slice : listoutslice) {
-                out_slice.setstorageCage(homeMapper.SelectStorageGlassById(out_slice.getGlassId()));
-            }
+            List<Out_slice> listoutslice=outSliceServive.SelectProductionqueue();
+            // List<Out_slice> listoutslice = homeMapper.SelectProductionqueue();
+            // for (Out_slice out_slice : listoutslice) {
+            //     out_slice.setstorageCage(homeMapper.SelectStorageGlassById(out_slice.getGlassId()));
+            // }
             jsonObject.append("listoutslice", listoutslice);
             //鑾峰彇褰撳墠鍑虹墖闃熷垪鐘舵��
             jsonObject.append("isAllowQueue",Plchome.isAllowQueue);

--
Gitblit v1.8.0