From b353ca2a8f8a30c48297cbe2502ca52b1a2d3285 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期五, 31 五月 2024 16:43:47 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java                      |    6 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java                              |    7 
 hangzhoumesParent/common/pom.xml                                                                                                 |   20 +
 UI-Project/src/views/UnLoadGlass/Landingindication.vue                                                                           |   57 ++++--
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java                                   |   56 ++++-
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java   |    7 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java                                            |   14 -
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/mapper/UpWorkstationMapper.java                |    2 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml                                               |    4 
 hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java                        |    1 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/WebSocketConfig.java                                    |   18 ++
 UI-Project/src/views/Caching/cachingun.vue                                                                                       |    2 
 /dev/null                                                                                                                        |  176 -------------------
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownCacheGlassTask.java                              |   18 -
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/GlassInfo.java                                       |   15 +
 UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue                                                                        |   55 +++--
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/OptimizeGlassinfo.java                               |   10 +
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java                       |    3 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/UpWorkstation.java                      |    1 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java         |   18 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml                                                                        |    6 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/entity/EdgStorageCageDetails.java          |    5 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java                        |    3 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java |   11 -
 24 files changed, 208 insertions(+), 307 deletions(-)

diff --git a/UI-Project/src/views/Caching/cachingun.vue b/UI-Project/src/views/Caching/cachingun.vue
index 7b7eec1..acd7647 100644
--- a/UI-Project/src/views/Caching/cachingun.vue
+++ b/UI-Project/src/views/Caching/cachingun.vue
@@ -39,7 +39,7 @@
     );  
     if (confirmResult === 'confirm') {  
       // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛  
-      var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id;
+      var url="/unLoadGlass/downStorage/deleteDownStorageCage?downStorageCageId="+row.id;
       console.log(url);
       const response = await request.post(url, {
         esdId: row.esdId
diff --git a/UI-Project/src/views/UnLoadGlass/Landingindication.vue b/UI-Project/src/views/UnLoadGlass/Landingindication.vue
index 9fc170a..2424c68 100644
--- a/UI-Project/src/views/UnLoadGlass/Landingindication.vue
+++ b/UI-Project/src/views/UnLoadGlass/Landingindication.vue
@@ -39,11 +39,11 @@
 import { initializeWebSocket } from '@/utils/WebSocketService';
  import { WebSocketHost } from '@/utils/constants';
 const racks = ref([
-  { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
+  { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456',downGlassInfoList:"" } },
  
-  { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } },
+  { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678',downGlassInfoList:"" } },
  
-  { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } }
+  { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' ,downGlassInfoList:""} }
   
 ]);
 
@@ -87,7 +87,8 @@
       content: itemData.item.content,
       fillColor: itemData.item.fillColor,
       width: itemData.item.width === 0 ? "" : 10,
-      height: itemData.item.height === 0 ? "" : 90
+      height: itemData.item.height === 0 ? "" : 90,
+      downGlassInfoList:itemData.item.downGlassInfoList
     };
 
     if (index === 2 && itemData.item.width > 0) {
@@ -112,8 +113,8 @@
     console.error(error);
   }
 };
-
-const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/unloadglass2`;
+const socketUrl = `ws://${WebSocketHost}:8085/api/talk/unloadglass2`;
+//const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/unloadglass2`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
 
@@ -126,7 +127,8 @@
       content: itemData.item.content,
       fillColor: itemData.item.fillColor,
       width: itemData.item.width === 0 ? "" : 10,
-      height: itemData.item.height === 0 ? "" : 90
+      height: itemData.item.height === 0 ? "" : 90,
+      downGlassInfoList:itemData.item.downGlassInfoList
     };
 
     if (index === 2 && itemData.item.width > 0) {
@@ -135,6 +137,7 @@
     }
 
     rack.item = newItem;
+
 
    // console.log("鏄剧ず鍥�1",racks.value); // 鎵撳嵃鏇存柊鍚庣殑 racks 鍊�
   }
@@ -147,29 +150,45 @@
   fetchFlowCardId(); // 鑾峰彇鏁版嵁
   initializeWebSocket(socketUrl, handleMessage);
 });
+const showCustomAlert = (downGlassInfoList) => {
+  let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
+  tableContent += '<tr><th style="background-color: #f2f2f2;">鐜荤拑ID</th><th style="background-color: #f2f2f2;">鑶滅郴</th><th style="background-color: #f2f2f2;">鍘氬害</th><th style="background-color: #f2f2f2;">瀹藉害</th><th style="background-color: #f2f2f2;">楂樺害</th></tr>';
 
+  downGlassInfoList.forEach(info => {
+    tableContent += `<tr>
+      <td>${info.glassId}</td>
+      <td>${info.Filmsid}</td>
+      <td>${info.thickness}</td>
+      <td>${info.width}</td>
+      <td>${info.height}</td>
+    </tr>`;
+  });
 
-const showCustomAlert = (content) => {
-  var str="鏋跺彿   :      111\n" +
-    "闀�     :      111\n" +
-    "瀹�     :      111\n" +
-    "鍘�     :      111\n"+
-    "鐜荤拑ID :      111\n"+
-    "鑶滅郴   :      111\n";
+  tableContent += '</table>';
 
   Swal.fire({
     title: '鐜荤拑淇℃伅',
-    html: '<pre>' + str + '</pre>',
+    html: tableContent,
     customClass: {
       popup: 'format-pre'
     }
   });
 };
 
-const showRectInfo = (rectInfo) => {
-  const content = rectInfo.item.content;
-  showCustomAlert(content);
-};
+
+    const showRectInfo = (rack) => {
+      const content = rack.item.content;
+      console.log(rack.item.downGlassInfoList[0].flowCardId)
+      console.log(content)
+   if(content==rack.item.downGlassInfoList[0].flowCardId){
+    const downGlassInfoList = rack.item.downGlassInfoList;
+      console.log(downGlassInfoList)
+      showCustomAlert(downGlassInfoList);
+
+   }
+ 
+    };
+
 
 </script>
 
diff --git a/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue b/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
index dfcfc48..74bdcb8 100644
--- a/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
+++ b/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
@@ -125,7 +125,8 @@
       content: itemData.item.content,
       fillColor: itemData.item.fillColor,
       width: itemData.item.width === 0 ? "" : 10,
-      height: itemData.item.height === 0 ? "" : 90
+      height: itemData.item.height === 0 ? "" : 90,
+      downGlassInfoList:itemData.item.downGlassInfoList
     };
 
     if (index === 2 && itemData.item.width > 0) {
@@ -146,30 +147,44 @@
   fetchFlowCardId(); // 鑾峰彇鏁版嵁
   initializeWebSocket(socketUrl, handleMessage);
 });
+const showCustomAlert = (downGlassInfoList) => {
+  let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
+  tableContent += '<tr><th style="background-color: #f2f2f2;">鐜荤拑ID</th><th style="background-color: #f2f2f2;">鑶滅郴</th><th style="background-color: #f2f2f2;">鍘氬害</th><th style="background-color: #f2f2f2;">瀹藉害</th><th style="background-color: #f2f2f2;">楂樺害</th></tr>';
 
+  downGlassInfoList.forEach(info => {
+    tableContent += `<tr>
+      <td>${info.glassId}</td>
+      <td>${info.Filmsid}</td>
+      <td>${info.thickness}</td>
+      <td>${info.width}</td>
+      <td>${info.height}</td>
+    </tr>`;
+  });
 
-// const showCustomAlert = (content) => {
-//   var str="鏋跺彿   :      111\n" +
-//     "闀�     :      111\n" +
-//     "瀹�     :      111\n" +
-//     "鍘�     :      111\n"+
-//     "鐜荤拑ID :      111\n"+
-//     "鑶滅郴   :      111\n";
+  tableContent += '</table>';
 
-//   Swal.fire({
-//     title: '鐜荤拑淇℃伅',
-//     html: '<pre>' + str + '</pre>',
-//     customClass: {
-//       popup: 'format-pre'
-//     }
-//   });
-// };
-
-const showRectInfo = (rectInfo) => {
-  const content = rectInfo.item.content;
-  showCustomAlert(content);
+  Swal.fire({
+    title: '鐜荤拑淇℃伅',
+    html: tableContent,
+    customClass: {
+      popup: 'format-pre'
+    }
+  });
 };
 
+
+    const showRectInfo = (rack) => {
+      const content = rack.item.content;
+      console.log(rack.item.downGlassInfoList[0].flowCardId)
+      console.log(content)
+   if(content==rack.item.downGlassInfoList[0].flowCardId){
+    const downGlassInfoList = rack.item.downGlassInfoList;
+      console.log(downGlassInfoList)
+      showCustomAlert(downGlassInfoList);
+
+   }
+ 
+    };
 </script>
 
 <style scoped>
diff --git a/hangzhoumesParent/common/pom.xml b/hangzhoumesParent/common/pom.xml
index 951b4ea..9da0bc0 100644
--- a/hangzhoumesParent/common/pom.xml
+++ b/hangzhoumesParent/common/pom.xml
@@ -191,16 +191,26 @@
             <version>1.2.33</version>
         </dependency>
 
-<!--        <dependency>-->
-<!--            <groupId>com.github.yulichang</groupId>-->
-<!--            <artifactId>mybatis-plus-join</artifactId>-->
-<!--            <version>1.2.4</version>-->
-<!--        </dependency>-->
+        <!--        <dependency>-->
+        <!--            <groupId>com.github.yulichang</groupId>-->
+        <!--            <artifactId>mybatis-plus-join</artifactId>-->
+        <!--            <version>1.2.4</version>-->
+        <!--        </dependency>-->
         <dependency>
             <groupId>com.github.yulichang</groupId>
             <artifactId>mybatis-plus-join-boot-starter</artifactId>
             <version>1.4.12</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+        </dependency>
     </dependencies>
 
 
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/WebSocketConfig.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/WebSocketConfig.java
new file mode 100644
index 0000000..387f053
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/WebSocketConfig.java
@@ -0,0 +1,18 @@
+package com.mes.common.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.socket.server.standard.ServerEndpointExporter;
+
+@Configuration
+public class WebSocketConfig {
+    /**
+     * bean娉ㄥ唽锛氫細鑷姩鎵弿甯︽湁@ServerEndpoint娉ㄨВ澹版槑鐨刉ebsocket Endpoint(绔偣)锛屾敞鍐屾垚涓篧ebsocket bean銆�
+     * 瑕佹敞鎰忥紝濡傛灉椤圭洰浣跨敤澶栫疆鐨剆ervlet瀹瑰櫒锛岃�屼笉鏄洿鎺ヤ娇鐢╯pringboot鍐呯疆瀹瑰櫒鐨勮瘽锛屽氨涓嶈娉ㄥ叆ServerEndpointExporter锛屽洜涓哄畠灏嗙敱瀹瑰櫒鑷繁鎻愪緵鍜岀鐞嗐��
+     */
+    @Bean
+    public ServerEndpointExporter serverEndpointExporter() {
+        return new ServerEndpointExporter();
+    }
+
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/GlassInfo.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
index f1fa50d..f69a142 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
@@ -2,13 +2,14 @@
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.io.Serializable;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.io.Serializable;
+
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author wu
@@ -57,6 +58,16 @@
     private String filmsid;
 
     /**
+     * 灞傛暟
+     */
+    private int layer;
+
+    /**
+     * 鎬诲眰鏁�
+     */
+    private int totalLayer;
+
+    /**
      * 纾ㄥ墠瀹�
      */
     private Double edgWidth;
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/OptimizeGlassinfo.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/OptimizeGlassinfo.java
index 622197a..19cb029 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/OptimizeGlassinfo.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/entity/OptimizeGlassinfo.java
@@ -43,6 +43,16 @@
     private String glassType;
 
     /**
+     * 灞傛暟
+     */
+    private int layer;
+
+    /**
+     * 鎬诲眰鏁�
+     */
+    private int totalLayer;
+
+    /**
      * 灏忕墖瀹斤紙鍔犵(閲忥級
      */
     private Double pWidth;
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
index 25fada5..f93019e 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
@@ -1,6 +1,7 @@
 package com.mes.glassinfo.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
+import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.query.MPJQueryWrapper;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.entity.OptimizeGlassinfo;
@@ -11,7 +12,6 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.github.yulichang.base.MPJBaseServiceImpl;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -35,7 +35,7 @@
         List<OptimizeGlassinfo> optimizeGlassinfos=null;
         if (engineeringId != null) {
             optimizeGlassinfos = optimizeProjectMapper.selectJoinList(OptimizeGlassinfo.class, new MPJQueryWrapper<OptimizeProject>()
-                    .select("b.process_id,t.type,b.width,b.height,t.glass_thickness,t.glass_type,b.p_width,b.p_height,b.stock_id,b.heat_layout_id,b.heat_layout_sort,b.x_axis,b.y_axis,b.project_no,b.glass_id")
+                    .select("b.process_id,t.type,b.width,b.height,t.glass_thickness,t.glass_type,b.p_width,b.p_height,b.layer, b.total_layer, b.stock_id,b.heat_layout_id,b.heat_layout_sort,b.x_axis,b.y_axis,b.project_no,b.glass_id")
                     .leftJoin("optimize_detail b on t.project_no=b.project_no")
                     .eq("t.state",100)
                     .eq("t.project_no", engineeringId));
@@ -56,6 +56,8 @@
                 glassInfo.setWidth(map.getWidth());
                 glassInfo.setHeight(map.getHeight());
                 glassInfo.setEdgWidth(map.getPWidth());
+                glassInfo.setLayer(map.getLayer());
+                glassInfo.setTotalLayer(map.getTotalLayer());
                 glassInfo.setEdgHeight(map.getPHeight());
                 glassInfo.setThickness(map.getGlassThickness());
                 glassInfo.setPatternSequence(map.getStockId());//
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/WebSocketServer.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
similarity index 91%
rename from hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/WebSocketServer.java
rename to hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
index 5fabafa..11ce5dd 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/WebSocketServer.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
@@ -1,4 +1,4 @@
-package com.mes.common;
+package com.mes.tools;
 
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
@@ -22,12 +22,6 @@
 
     public static ConfigurableApplicationContext applicationContext;
 
-    // 瑙e喅鏃犳硶娉ㄥ叆mapper闂 //浣跨敤鏂规硶
-    // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
-    public static void setApplicationContext(ConfigurableApplicationContext configurableApplicationContext) {
-        WebSocketServer.applicationContext = configurableApplicationContext;
-    }
-
     private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
     private List<String> messages;
     /**
@@ -35,8 +29,8 @@
      */
     public static final Map<String, ArrayList<WebSocketServer>> sessionMap = new ConcurrentHashMap<>();
 
-    String username;
-    Session session;
+    public String username;
+    public Session session;
 
     public WebSocketServer() {
         this.messages = new ArrayList<>();
@@ -111,8 +105,6 @@
         JSONObject jsonObject = new JSONObject();
         jsonObject.set("message", text);
         this.messages.add(text);
-        this.sendMessage(jsonObject.toString()); // JSONUtil.toJsonStr(jsonObject)
-
     }
 
     @OnError
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/entity/EdgStorageCageDetails.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/entity/EdgStorageCageDetails.java
index 6e85d25..8ec6a5a 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/entity/EdgStorageCageDetails.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/entity/EdgStorageCageDetails.java
@@ -31,6 +31,11 @@
     /**
      * 璁惧id
      */
+    private String engineerId;
+
+    /**
+     * 璁惧id
+     */
     private Integer deviceId;
 
     /**
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
deleted file mode 100644
index 9f8583a..0000000
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package com.mes.glassinfo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-
-/**
- * <p>
- *
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class GlassInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 鐜荤拑淇℃伅琛╥d
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 娴佺▼鍗�
-     */
-    private String flowCardId;
-
-    /**
-     * 娴佺▼鍗$幓鐠冪被鍨�
-     */
-    private Integer glassType;
-
-    /**
-     * 瀹�
-     */
-    private Double width;
-
-    /**
-     * 楂�
-     */
-    private Double height;
-
-    /**
-     * 鍘氬害
-     */
-    private Double thickness;
-
-    /**
-     * 鑶滅郴
-     */
-    private String filmsid;
-
-    /**
-     * 纾ㄥ墠瀹�
-     */
-    private Double edgWidth;
-
-    /**
-     * 纾ㄥ墠楂�
-     */
-    private Double edgHeight;
-
-    /**
-     * 鏄惁閰嶇墖
-     */
-    private Integer ismultiple;
-
-    /**
-     * 閰嶇墖鏈�澶у
-     */
-    private Double maxWidth;
-
-    /**
-     * 閰嶇墖鏈�澶ч珮
-     */
-    private Double maxHeight;
-
-    /**
-     * 閽㈠寲鏄惁鎺ュ彈妯斁
-     */
-    private Integer ishorizontal;
-
-    /**
-     * 鍘熺墖椤哄簭
-     */
-    private Integer patternSequence;
-
-    /**
-     * 閽㈠寲鐗堝浘id
-     */
-    private Integer temperingLayoutId;
-
-    /**
-     * 閽㈠寲鐗堝浘鐗囧簭
-     */
-    private Integer temperingFeedSequence;
-
-    /**
-     * x鍧愭爣
-     */
-    private Integer xCoordinate;
-
-    /**
-     * y鍧愭爣
-     */
-    private Integer yCoordinate;
-
-    /**
-     * 鏃嬭浆瑙掑害锛堥�嗘椂閽堬級
-     */
-    private Integer angle;
-
-    /**
-     * 宸ョ▼鍙�
-     */
-    private String engineerId;
-
-    /**
-     * 鐢熶骇瑙勫垯id
-     */
-    private Integer ruleId;
-
-    /**
-     * 鐜荤拑ID
-     */
-    private String glassId;
-
-
-}
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
index 365eb8d..61a5e69 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -6,7 +6,6 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.query.MPJQueryWrapper;
 import com.mes.common.S7object;
-import com.mes.common.WebSocketServer;
 import com.mes.common.config.Const;
 import com.mes.device.PlcParameterObject;
 import com.mes.edgglasstask.entity.EdgGlassTaskInfo;
@@ -19,6 +18,7 @@
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.taskcache.entity.TaskCache;
 import com.mes.taskcache.service.TaskCacheService;
+import com.mes.tools.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -142,37 +142,67 @@
      */
     private void inTo(String glassId, String confirmationWrodAddress, String currentSlot) {
         log.info("1銆佹寜鐓х幓鐠僫d:{}鑾峰彇鐜荤拑灏忕墖淇℃伅,褰撳墠鏍煎瓙涓�:{}", glassId, currentSlot);
-        GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId));
-        //TODO: 鏌ヨ鐜荤拑
-        if (glassInfo == null) {
-            log.info("2銆佹鐜荤拑缂栧彿涓嶅瓨鍦�");
-            return;
-        }
-        log.info("2銆佽幏鍙栧埌鐨勭幓鐠冧俊鎭负{}", glassInfo);
         //娣诲姞杩涚墖浠诲姟  鏌ユ壘绌烘牸
         EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(Integer.parseInt(currentSlot), Boolean.FALSE);
         Assert.isTrue(null != nearestEmpty, "鏍煎瓙宸叉弧");
-        log.info("3銆佹煡璇㈠崸寮忕悊鐗囩閲岄潰鐨勭┖鏍�:{}", nearestEmpty);
+        log.info("2銆佹煡璇㈠崸寮忕悊鐗囩閲岄潰鐨勭┖鏍�:{}", nearestEmpty);
 
-        log.info("4銆佸皢鐜荤拑淇℃伅鎻掑叆鍗у紡鐞嗙墖绗�,褰撳墠鐜荤拑淇℃伅:{}", glassInfo);
+        //鏌ヨ鐜荤拑骞惰繘琛屼氦鎹�
+        GlassInfo glassInfo = queryAndChangeGlass(glassId);
+        log.info("3銆佸皢鐜荤拑淇℃伅鎻掑叆鍗у紡鐞嗙墖绗�,褰撳墠鐜荤拑淇℃伅:{}", glassInfo);
         EdgStorageCageDetails details = new EdgStorageCageDetails();
         BeanUtils.copyProperties(glassInfo, details);
         details.setState(Const.GLASS_STATE_IN);
         details.setSlot(nearestEmpty.getSlot());
         details.setDeviceId(nearestEmpty.getDeviceId());
         edgStorageCageDetailsService.save(details);
-        log.info("5銆佺幓鐠冧俊鎭凡瀛樺叆鐞嗙墖绗艰鎯呰〃锛岀幓鐠冧俊鎭负{}", details);
+        log.info("4銆佺幓鐠冧俊鎭凡瀛樺叆鐞嗙墖绗艰鎯呰〃锛岀幓鐠冧俊鎭负{}", details);
         //娣诲姞杩涚墖浠诲姟
         boolean taskCache = saveTaskCache(details.getGlassId(), 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN);
-        log.info("6銆佺敓鎴愯繘鐗囦换鍔′俊鎭瓨鍏ヤ换鍔¤〃鏄惁瀹屾垚锛歿}", taskCache);
+        log.info("5銆佺敓鎴愯繘鐗囦换鍔′俊鎭瓨鍏ヤ换鍔¤〃鏄惁瀹屾垚锛歿}", taskCache);
 
         S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, (short) 1);
-        log.info("7銆佸彂閫佺‘璁ゅ瓧瀹屾垚");
+        log.info("6銆佸彂閫佺‘璁ゅ瓧瀹屾垚");
 
 
     }
 
     /**
+     * 鏌ヨ鐜荤拑骞惰繘琛屼氦鎹�
+     *
+     * @param glassId
+     * @return
+     */
+    public GlassInfo queryAndChangeGlass(String glassId) {
+        GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId));
+        Assert.isFalse(null == glassInfo, "鐜荤拑淇℃伅涓嶅瓨鍦�");
+        //鎸夌収鐜荤拑灏哄
+        LambdaQueryWrapper<GlassInfo> queryWrapper = new LambdaQueryWrapper<GlassInfo>()
+                .eq(GlassInfo::getWidth, glassInfo.getWidth())
+                .eq(GlassInfo::getHeight, glassInfo.getHeight())
+                .eq(GlassInfo::getThickness, glassInfo.getThickness())
+                .eq(GlassInfo::getFilmsid, glassInfo.getFilmsid())
+                .eq(GlassInfo::getTotalLayer, glassInfo.getTotalLayer())
+                .eq(GlassInfo::getLayer, glassInfo.getLayer())
+                .eq(GlassInfo::getEngineerId, glassInfo.getEngineerId())
+                .notInSql(GlassInfo::getGlassId, "select distinct glass_id from edg_storage_cage_details " +
+                        "where engineer_id = '" + glassInfo.getEngineerId() + "' and width = " + glassInfo.getWidth() + " and height = " + glassInfo.getHeight())
+                .orderByAsc(GlassInfo::getTemperingLayoutId)
+                .orderBy(Boolean.TRUE, sequenceOrder, GlassInfo::getTemperingFeedSequence)
+                .last("Limit 1");
+        GlassInfo swapGlassInfo = glassInfoService.getOne(queryWrapper);
+        if (swapGlassInfo != null && !glassInfo.getGlassId().equals(swapGlassInfo.getGlassId())) {
+            String swapGlassId = swapGlassInfo.getGlassId();
+            swapGlassInfo.setGlassId(glassId);
+            glassInfo.setGlassId(swapGlassId);
+            glassInfoService.updateById(swapGlassInfo);
+            glassInfoService.updateById(glassInfo);
+            return swapGlassInfo;
+        }
+        return glassInfo;
+    }
+
+    /**
      * 鍑虹墖浠诲姟
      *
      * @param out08Glassstate
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/common/WebSocketServer.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/common/WebSocketServer.java
deleted file mode 100644
index 5fabafa..0000000
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/common/WebSocketServer.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package com.mes.common;
-
-import cn.hutool.json.JSONObject;
-import cn.hutool.json.JSONUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.stereotype.Component;
-
-import javax.websocket.*;
-import javax.websocket.server.PathParam;
-import javax.websocket.server.ServerEndpoint;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-@ServerEndpoint(value = "/api/talk/{username}")
-@Component("webSocketServer")
-public class WebSocketServer {
-
-
-    public static ConfigurableApplicationContext applicationContext;
-
-    // 瑙e喅鏃犳硶娉ㄥ叆mapper闂 //浣跨敤鏂规硶
-    // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
-    public static void setApplicationContext(ConfigurableApplicationContext configurableApplicationContext) {
-        WebSocketServer.applicationContext = configurableApplicationContext;
-    }
-
-    private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
-    private List<String> messages;
-    /**
-     * 璁板綍褰撳墠鍦ㄧ嚎杩炴帴鏁�
-     */
-    public static final Map<String, ArrayList<WebSocketServer>> sessionMap = new ConcurrentHashMap<>();
-
-    String username;
-    Session session;
-
-    public WebSocketServer() {
-        this.messages = new ArrayList<>();
-    }
-
-    /**
-     * 杩炴帴寤虹珛鎴愬姛璋冪敤鐨勬柟娉�
-     */
-    @OnOpen
-    public void onOpen(Session session, @PathParam("username") String username) {
-        this.username = username;
-        this.session = session;
-        List<WebSocketServer> webSocketServers = sessionMap.get(username);
-        if (webSocketServers == null) {
-            ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>();
-            arrayListwebserver.add(this);
-            sessionMap.put(username, arrayListwebserver);
-        } else {
-            webSocketServers.add(this);
-        }
-
-        log.info("鏈夋柊鐢ㄦ埛鍔犲叆锛寀sername={}, 褰撳墠鍦ㄧ嚎浜烘暟涓猴細{}", username, sessionMap.get(username).size());
-
-        // JSONObject result = new JSONObject();
-        // JSONArray array = new JSONArray();
-        // result.set("users", array);
-        // for (Object key : sessionMap.keySet()) {
-        // JSONObject jsonObject = new JSONObject();
-        // jsonObject.set("username", key);
-        // array.add(jsonObject);
-        // }
-
-        // sendAllMessage(JSONUtil.toJsonStr(result)); // 鍚庡彴鍙戦�佹秷鎭粰鎵�鏈夌殑瀹㈡埛绔�
-    }
-
-    /**
-     * 杩炴帴鍏抽棴璋冪敤鐨勬柟娉�
-     */
-    @OnClose
-    public void onClose(Session session, @PathParam("username") String username) {
-        List<WebSocketServer> webSocketServers = sessionMap.get(username);
-        ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>();
-        if (webSocketServers.size() > 1) {
-            for (WebSocketServer webSocketServer : webSocketServers) {
-                if (webSocketServer != this) {
-                    arrayListwebserver.add(webSocketServer);
-                }
-            }
-            sessionMap.put(username, arrayListwebserver);
-            log.info("绉婚櫎username={}涓�鍚嶇敤鎴穝ession, {}鐨勫綋鍓嶅湪绾夸汉鏁颁负锛歿}", username, username, sessionMap.get(username).size());
-        } else {
-            sessionMap.remove(username);
-            log.info("绉婚櫎username={}涓�鍚嶇敤鎴穝ession, {}杩炴帴鍏抽棴, 褰撳墠杩炴帴鏁颁负锛歿}", username, username, sessionMap.size());
-        }
-
-    }
-
-    /**
-     * 鏀跺埌瀹㈡埛绔秷鎭悗璋冪敤鐨勬柟娉�
-     * 鍚庡彴鏀跺埌瀹㈡埛绔彂閫佽繃鏉ョ殑娑堟伅
-     * onMessage 鏄竴涓秷鎭殑涓浆绔�
-     * 鎺ュ彈 娴忚鍣ㄧ socket.send 鍙戦�佽繃鏉ョ殑 json鏁版嵁
-     *
-     * @param message 瀹㈡埛绔彂閫佽繃鏉ョ殑娑堟伅
-     */
-    @OnMessage
-    public void onMessage(String message, Session session, @PathParam("username") String username) {
-        log.info("鏈嶅姟绔敹鍒扮敤鎴穟sername={}鐨勬秷鎭�:{}", username, message);
-        JSONObject obj = JSONUtil.parseObj(message);
-        String text = obj.getStr("data");
-
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.set("message", text);
-        this.messages.add(text);
-        this.sendMessage(jsonObject.toString()); // JSONUtil.toJsonStr(jsonObject)
-
-    }
-
-    @OnError
-    public void onError(Session session, Throwable error) {
-        log.error("鍙戠敓閿欒");
-        error.printStackTrace();
-    }
-
-    /**
-     * 鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔�
-     */
-    public void sendMessage(String message) {
-        try {
-            // log.info("鏈嶅姟绔粰瀹㈡埛绔痆{}]鍙戦�佹秷鎭瘂}", this.session.getId(), message);
-            this.session.getBasicRemote().sendText(message);
-        } catch (Exception e) {
-            log.error("鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔け璐�", e);
-        }
-    }
-
-    // /**
-    //  * 鏈嶅姟绔彂閫佹秷鎭粰鎵�鏈夊鎴风
-    //  */
-    // public void sendAllMessage(String message) {
-    //     try {
-    //         for (WebSocketServer webSocketServer : sessionMap.values()) {
-    //             // log.info("鏈嶅姟绔粰瀹㈡埛绔痆{}]鍙戦�佹秷鎭瘂}", this.session.getId(), message);
-    //             webSocketServer.sendMessage(message);
-    //         }
-    //     } catch (Exception e) {
-    //         log.error("鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔け璐�", e);
-    //     }
-    // }
-
-    public List<String> getMessages() {
-        return messages;
-
-    }
-
-    public void clearMessages() {
-        messages.clear();
-    }
-
-
-}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
deleted file mode 100644
index c38d086..0000000
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.mes.glassinfo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class GlassInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 鐜荤拑淇℃伅琛╥d
-     */
-      @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 娴佺▼鍗�
-     */
-    private String flowcardId;
-
-    /**
-     * 娴佺▼鍗$幓鐠冪被鍨�
-     */
-    private Integer glassType;
-
-    /**
-     * 瀹�
-     */
-    private Double width;
-
-    /**
-     * 楂�
-     */
-    private Double height;
-
-    /**
-     * 鍘氬害
-     */
-    private Double thickness;
-
-    /**
-     * 鑶滅郴
-     */
-    private String filmsid;
-
-    /**
-     * 纾ㄥ墠瀹�
-     */
-    private Double edgWidth;
-
-    /**
-     * 纾ㄥ墠楂�
-     */
-    private Double edgHeight;
-
-    /**
-     * 鏄惁閰嶇墖
-     */
-    private Integer ismultiple;
-
-    /**
-     * 閰嶇墖鏈�澶у
-     */
-    private Double maxWidth;
-
-    /**
-     * 閰嶇墖鏈�澶ч珮
-     */
-    private Double maxHeight;
-
-    /**
-     * 閽㈠寲鏄惁鎺ュ彈妯斁
-     */
-    private Integer ishorizontal;
-
-    /**
-     * 鍘熺墖椤哄簭
-     */
-    private Integer patternSequence;
-
-    /**
-     * 閽㈠寲鐗堝浘id
-     */
-    private Integer temperingLayoutId;
-
-    /**
-     * 閽㈠寲鐗堝浘鐗囧簭
-     */
-    private Integer temperingFeedSequence;
-
-    /**
-     * x鍧愭爣
-     */
-    private Integer xCoordinate;
-
-    /**
-     * y鍧愭爣
-     */
-    private Integer yCoordinate;
-
-    /**
-     * 鏃嬭浆瑙掑害锛堥�嗘椂閽堬級
-     */
-    private Integer angle;
-
-    /**
-     * 宸ョ▼鍙�
-     */
-    private Long engineerId;
-
-    /**
-     * 鐢熶骇瑙勫垯id
-     */
-    private Integer ruleId;
-
-
-}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
index 1e9a559..f34d1a3 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
@@ -9,14 +9,13 @@
 import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService;
 import com.mes.bigstoragetask.service.BigStorageCageOutTaskService;
 import com.mes.common.S7object;
-import com.mes.common.WebSocketServer;
 import com.mes.device.PlcParameterObject;
 import com.mes.edgstoragetask.service.TaskCacheService;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.menu.service.SysMenuService;
+import com.mes.tools.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/WebSocketServer.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/WebSocketServer.java
deleted file mode 100644
index 5fabafa..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/WebSocketServer.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package com.mes.common;
-
-import cn.hutool.json.JSONObject;
-import cn.hutool.json.JSONUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.stereotype.Component;
-
-import javax.websocket.*;
-import javax.websocket.server.PathParam;
-import javax.websocket.server.ServerEndpoint;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-@ServerEndpoint(value = "/api/talk/{username}")
-@Component("webSocketServer")
-public class WebSocketServer {
-
-
-    public static ConfigurableApplicationContext applicationContext;
-
-    // 瑙e喅鏃犳硶娉ㄥ叆mapper闂 //浣跨敤鏂规硶
-    // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
-    public static void setApplicationContext(ConfigurableApplicationContext configurableApplicationContext) {
-        WebSocketServer.applicationContext = configurableApplicationContext;
-    }
-
-    private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
-    private List<String> messages;
-    /**
-     * 璁板綍褰撳墠鍦ㄧ嚎杩炴帴鏁�
-     */
-    public static final Map<String, ArrayList<WebSocketServer>> sessionMap = new ConcurrentHashMap<>();
-
-    String username;
-    Session session;
-
-    public WebSocketServer() {
-        this.messages = new ArrayList<>();
-    }
-
-    /**
-     * 杩炴帴寤虹珛鎴愬姛璋冪敤鐨勬柟娉�
-     */
-    @OnOpen
-    public void onOpen(Session session, @PathParam("username") String username) {
-        this.username = username;
-        this.session = session;
-        List<WebSocketServer> webSocketServers = sessionMap.get(username);
-        if (webSocketServers == null) {
-            ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>();
-            arrayListwebserver.add(this);
-            sessionMap.put(username, arrayListwebserver);
-        } else {
-            webSocketServers.add(this);
-        }
-
-        log.info("鏈夋柊鐢ㄦ埛鍔犲叆锛寀sername={}, 褰撳墠鍦ㄧ嚎浜烘暟涓猴細{}", username, sessionMap.get(username).size());
-
-        // JSONObject result = new JSONObject();
-        // JSONArray array = new JSONArray();
-        // result.set("users", array);
-        // for (Object key : sessionMap.keySet()) {
-        // JSONObject jsonObject = new JSONObject();
-        // jsonObject.set("username", key);
-        // array.add(jsonObject);
-        // }
-
-        // sendAllMessage(JSONUtil.toJsonStr(result)); // 鍚庡彴鍙戦�佹秷鎭粰鎵�鏈夌殑瀹㈡埛绔�
-    }
-
-    /**
-     * 杩炴帴鍏抽棴璋冪敤鐨勬柟娉�
-     */
-    @OnClose
-    public void onClose(Session session, @PathParam("username") String username) {
-        List<WebSocketServer> webSocketServers = sessionMap.get(username);
-        ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>();
-        if (webSocketServers.size() > 1) {
-            for (WebSocketServer webSocketServer : webSocketServers) {
-                if (webSocketServer != this) {
-                    arrayListwebserver.add(webSocketServer);
-                }
-            }
-            sessionMap.put(username, arrayListwebserver);
-            log.info("绉婚櫎username={}涓�鍚嶇敤鎴穝ession, {}鐨勫綋鍓嶅湪绾夸汉鏁颁负锛歿}", username, username, sessionMap.get(username).size());
-        } else {
-            sessionMap.remove(username);
-            log.info("绉婚櫎username={}涓�鍚嶇敤鎴穝ession, {}杩炴帴鍏抽棴, 褰撳墠杩炴帴鏁颁负锛歿}", username, username, sessionMap.size());
-        }
-
-    }
-
-    /**
-     * 鏀跺埌瀹㈡埛绔秷鎭悗璋冪敤鐨勬柟娉�
-     * 鍚庡彴鏀跺埌瀹㈡埛绔彂閫佽繃鏉ョ殑娑堟伅
-     * onMessage 鏄竴涓秷鎭殑涓浆绔�
-     * 鎺ュ彈 娴忚鍣ㄧ socket.send 鍙戦�佽繃鏉ョ殑 json鏁版嵁
-     *
-     * @param message 瀹㈡埛绔彂閫佽繃鏉ョ殑娑堟伅
-     */
-    @OnMessage
-    public void onMessage(String message, Session session, @PathParam("username") String username) {
-        log.info("鏈嶅姟绔敹鍒扮敤鎴穟sername={}鐨勬秷鎭�:{}", username, message);
-        JSONObject obj = JSONUtil.parseObj(message);
-        String text = obj.getStr("data");
-
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.set("message", text);
-        this.messages.add(text);
-        this.sendMessage(jsonObject.toString()); // JSONUtil.toJsonStr(jsonObject)
-
-    }
-
-    @OnError
-    public void onError(Session session, Throwable error) {
-        log.error("鍙戠敓閿欒");
-        error.printStackTrace();
-    }
-
-    /**
-     * 鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔�
-     */
-    public void sendMessage(String message) {
-        try {
-            // log.info("鏈嶅姟绔粰瀹㈡埛绔痆{}]鍙戦�佹秷鎭瘂}", this.session.getId(), message);
-            this.session.getBasicRemote().sendText(message);
-        } catch (Exception e) {
-            log.error("鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔け璐�", e);
-        }
-    }
-
-    // /**
-    //  * 鏈嶅姟绔彂閫佹秷鎭粰鎵�鏈夊鎴风
-    //  */
-    // public void sendAllMessage(String message) {
-    //     try {
-    //         for (WebSocketServer webSocketServer : sessionMap.values()) {
-    //             // log.info("鏈嶅姟绔粰瀹㈡埛绔痆{}]鍙戦�佹秷鎭瘂}", this.session.getId(), message);
-    //             webSocketServer.sendMessage(message);
-    //         }
-    //     } catch (Exception e) {
-    //         log.error("鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔け璐�", e);
-    //     }
-    // }
-
-    public List<String> getMessages() {
-        return messages;
-
-    }
-
-    public void clearMessages() {
-        messages.clear();
-    }
-
-
-}
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java
index 586a7b3..94df6c1 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/entity/Engineering.java
@@ -2,10 +2,11 @@
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.io.Serializable;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.io.Serializable;
+
 /**
  * <p>
  * 
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
index 132a0e5..8a5142b 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
@@ -11,13 +11,14 @@
 import com.mes.pp.mapper.OptimizeProjectMapper;
 import com.mes.uppattenusage.entity.OptimizeUpPattenUsage;
 import com.mes.uppattenusage.entity.UpPattenUsage;
-import com.mes.uppattenusage.service.UpPattenUsageService;
 import com.mes.uppattenusage.mapper.UpPattenUsageMapper;
+import com.mes.uppattenusage.service.UpPattenUsageService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -57,7 +58,7 @@
         List<OptimizeUpPattenUsage> upPattenUsageList = null;
         if (engineeringId != null) {
             upPattenUsageList = optimizeProjectMapper.selectJoinList(OptimizeUpPattenUsage.class, new MPJQueryWrapper<OptimizeProject>()
-                    .select("t.project_no,t.glass_type,b.width,b.height,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.stock_id")
+                    .select("t.project_no,t.glass_type,b.realwidth as width,b.realheight as height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.stock_id")
                     .leftJoin("optimize_layout b on t.project_no=b.project_no")
                     .eq("b.project_no", engineeringId));
         }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/GlassInfo.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/GlassInfo.java
deleted file mode 100644
index 78ccdb5..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/GlassInfo.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.mes.workstation.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class GlassInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 鐜荤拑淇℃伅琛╥d
-     */
-      @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 娴佺▼鍗�
-     */
-    private String flowcardId;
-
-    /**
-     * 娴佺▼鍗$幓鐠冪被鍨�
-     */
-    private Integer glassType;
-
-    /**
-     * 瀹�
-     */
-    private Double width;
-
-    /**
-     * 楂�
-     */
-    private Double height;
-
-    /**
-     * 鍘氬害
-     */
-    private Double thickness;
-
-    /**
-     * 鑶滅郴
-     */
-    private Integer filmsid;
-
-    /**
-     * 纾ㄥ墠瀹�
-     */
-    private Double edgWidth;
-
-    /**
-     * 纾ㄥ墠楂�
-     */
-    private Double edgHeight;
-
-    /**
-     * 鏄惁閰嶇墖
-     */
-    private Integer ismultiple;
-
-    /**
-     * 閰嶇墖鏈�澶у
-     */
-    private Double maxWidth;
-
-    /**
-     * 閰嶇墖鏈�澶ч珮
-     */
-    private Double maxHeight;
-
-    /**
-     * 閽㈠寲鏄惁鎺ュ彈妯斁
-     */
-    private Integer ishorizontal;
-
-    /**
-     * 鍘熺墖椤哄簭
-     */
-    private Integer patternSequence;
-
-    /**
-     * 閽㈠寲鐗堝浘id
-     */
-    private Integer temperingLayoutId;
-
-    /**
-     * 閽㈠寲鐗堝浘鐗囧簭
-     */
-    private Integer temperingFeedSequence;
-
-    /**
-     * x鍧愭爣
-     */
-    private Integer xCoordinate;
-
-    /**
-     * y鍧愭爣
-     */
-    private Integer yCoordinate;
-
-    /**
-     * 鏃嬭浆瑙掑害锛堥�嗘椂閽堬級
-     */
-    private Integer angle;
-
-    /**
-     * 宸ョ▼鍙�
-     */
-    private Long engineerId;
-
-    /**
-     * 鐢熶骇瑙勫垯id
-     */
-    private Integer ruleId;
-
-
-}
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/UpWorkstation.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/UpWorkstation.java
index b5265de..ed0bc83 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/UpWorkstation.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/UpWorkstation.java
@@ -2,7 +2,6 @@
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import io.swagger.annotations.ApiOperation;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/mapper/UpWorkstationMapper.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/mapper/UpWorkstationMapper.java
index 6c44a7d..d25be0d 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/mapper/UpWorkstationMapper.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/mapper/UpWorkstationMapper.java
@@ -5,8 +5,6 @@
 import com.mes.workstation.entity.UpWorkstation;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
-
 /**
  * <p>
  *  Mapper 鎺ュ彛
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
index 625cc04..94840e1 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -7,5 +7,5 @@
     name: loadGlass
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
-#   configuration:
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 鎵撳嵃sql璇彞
\ No newline at end of file
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java
index 9725c57..ee68635 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java
@@ -2,7 +2,6 @@
 
 import com.mes.engineering.entity.Engineering;
 import com.mes.engineering.service.EngineeringService;
-import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.pp.service.OptimizeProjectService;
 import com.mes.uppattenusage.entity.UpPattenUsage;
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/entity/GlassInfo.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/entity/GlassInfo.java
deleted file mode 100644
index 9ca72f2..0000000
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/entity/GlassInfo.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.mes.temperingglass.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class GlassInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 鐜荤拑淇℃伅琛╥d
-     */
-      @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 娴佺▼鍗�
-     */
-    private String flowcardId;
-
-    /**
-     * 娴佺▼鍗$幓鐠冪被鍨�
-     */
-    private Integer glassType;
-
-    /**
-     * 瀹�
-     */
-    private Double width;
-
-    /**
-     * 楂�
-     */
-    private Double height;
-
-    /**
-     * 鍘氬害
-     */
-    private Double thickness;
-
-    /**
-     * 鑶滅郴
-     */
-    private Integer filmsid;
-
-    /**
-     * 纾ㄥ墠瀹�
-     */
-    private Double edgWidth;
-
-    /**
-     * 纾ㄥ墠楂�
-     */
-    private Double edgHeight;
-
-    /**
-     * 鏄惁閰嶇墖
-     */
-    private Integer ismultiple;
-
-    /**
-     * 閰嶇墖鏈�澶у
-     */
-    private Double maxWidth;
-
-    /**
-     * 閰嶇墖鏈�澶ч珮
-     */
-    private Double maxHeight;
-
-    /**
-     * 閽㈠寲鏄惁鎺ュ彈妯斁
-     */
-    private Integer ishorizontal;
-
-    /**
-     * 鍘熺墖椤哄簭
-     */
-    private Integer patternSequence;
-
-    /**
-     * 閽㈠寲鐗堝浘id
-     */
-    private Integer temperingLayoutId;
-
-    /**
-     * 閽㈠寲鐗堝浘鐗囧簭
-     */
-    private Integer temperingFeedSequence;
-
-    /**
-     * x鍧愭爣
-     */
-    private Integer xCoordinate;
-
-    /**
-     * y鍧愭爣
-     */
-    private Integer yCoordinate;
-
-    /**
-     * 鏃嬭浆瑙掑害锛堥�嗘椂閽堬級
-     */
-    private Integer angle;
-
-    /**
-     * 宸ョ▼鍙�
-     */
-    private Long engineerId;
-
-    /**
-     * 鐢熶骇瑙勫垯id
-     */
-    private Integer ruleId;
-
-
-}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
index fcf1a62..c9fd5bc 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
@@ -30,12 +30,6 @@
             <artifactId>sqljdbc4</artifactId>
             <version>4.0</version>
         </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-websocket</artifactId>
-        </dependency>
-
     </dependencies>
 
     <properties>
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
index 9ce9047..fba11e1 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
@@ -1,12 +1,10 @@
 package com.mes;
 
-import com.mes.tools.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
@@ -23,11 +21,8 @@
 @EnableScheduling
 public class UnLoadGlassApplication {
 
-
     public static void main(String[] args) {
-        SpringApplication springApplication = new SpringApplication(UnLoadGlassApplication.class);
-        ConfigurableApplicationContext applicationContext = springApplication.run(args);
-        WebSocketServer.setApplicationContext(applicationContext);
+        SpringApplication.run(UnLoadGlassApplication.class, args);
     }
 
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
index 3cd3349..e5bf336 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
@@ -1,23 +1,12 @@
 package com.mes.downglassinfo.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.mes.downglassinfo.entity.DownGlassInfo;
-import com.mes.downglassinfo.entity.DownGlassTask;
 import com.mes.downglassinfo.mapper.DownGlassInfoMapper;
 import com.mes.downglassinfo.service.DownGlassInfoService;
-import com.mes.downglassinfo.service.DownGlassTaskService;
-import com.mes.downworkstation.entity.DownWorkstation;
-import com.mes.downworkstation.mapper.DownWorkstationMapper;
-import com.mes.downworkstation.service.DownWorkstationService;
-import com.mes.downworkstation.service.DownWorkstationTaskService;
-import com.mes.tools.WebSocketServer;
-import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
-
-import java.util.List;
 
 @Service
 public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService {
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
deleted file mode 100644
index 56172d8..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package com.mes.glassinfo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-
-/**
- * <p>
- *
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class GlassInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 鐜荤拑淇℃伅琛╥d
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 娴佺▼鍗�
-     */
-    @TableField("flow_card_Id")
-    private String flowCardId;
-
-    /**
-     * 娴佺▼鍗$幓鐠冪被鍨�
-     */
-    private Integer glassType;
-
-    /**
-     * 瀹�
-     */
-    private Double width;
-
-    /**
-     * 楂�
-     */
-    private Double height;
-
-    /**
-     * 鍘氬害
-     */
-    private Double thickness;
-
-    /**
-     * 鑶滅郴
-     */
-    private String filmsid;
-
-    /**
-     * 纾ㄥ墠瀹�
-     */
-    private Double edgWidth;
-
-    /**
-     * 纾ㄥ墠楂�
-     */
-    private Double edgHeight;
-
-    /**
-     * 鏄惁閰嶇墖
-     */
-    private Integer ismultiple;
-
-    /**
-     * 閰嶇墖鏈�澶у
-     */
-    private Double maxWidth;
-
-    /**
-     * 閰嶇墖鏈�澶ч珮
-     */
-    private Double maxHeight;
-
-    /**
-     * 閽㈠寲鏄惁鎺ュ彈妯斁
-     */
-    private Integer ishorizontal;
-
-    /**
-     * 鍘熺墖椤哄簭
-     */
-    private Integer patternSequence;
-
-    /**
-     * 閽㈠寲鐗堝浘id
-     */
-    private Integer temperingLayoutId;
-
-    /**
-     * 閽㈠寲鐗堝浘鐗囧簭
-     */
-    private Integer temperingFeedSequence;
-
-    /**
-     * x鍧愭爣
-     */
-    private Integer xCoordinate;
-
-    /**
-     * y鍧愭爣
-     */
-    private Integer yCoordinate;
-
-    /**
-     * 鏃嬭浆瑙掑害锛堥�嗘椂閽堬級
-     */
-    private Integer angle;
-
-    /**
-     * 宸ョ▼鍙�
-     */
-    private String engineerId;
-
-    /**
-     * 鐢熶骇瑙勫垯id
-     */
-    private Integer ruleId;
-    /**
-     * 鐜荤拑id
-     */
-    private String glassId;
-}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
index 12a1604..cd2bc4d 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
@@ -4,6 +4,8 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.yulichang.toolkit.JoinWrappers;
+import com.mes.downstorage.entity.DownStorageCage;
+import com.mes.downstorage.entity.DownStorageCageDetails;
 import com.mes.engineering.entity.Engineering;
 import com.mes.engineering.mapper.EngineeringMapper;
 import com.mes.glassinfo.entity.GlassInfo;
@@ -45,13 +47,13 @@
 
     @Override
     public List<Map<String, Object>> getFlowCardId() {
-
-        return glassInfoMapper.selectJoinMaps(JoinWrappers.lambda(GlassInfo.class)
-                .select(GlassInfo::getFlowCardId) // 閫夋嫨闇�瑕佹煡璇㈢殑瀛楁
-                .eq(GlassInfo::getEngineerId, Engineering::getEngineerId) // 璁剧疆鍏宠仈鏉′欢
-                .eq(Engineering::getState, 0)
-                .distinct()
-
+        return baseMapper.selectJoinMaps(JoinWrappers.lambda(GlassInfo.class)
+                .select(GlassInfo::getFlowCardId)
+                .leftJoin(Engineering.class, on -> on
+                        .eq(Engineering::getEngineerId, GlassInfo::getEngineerId)
+                        .eq(Engineering::getState, 0)
+                )
+                .groupBy(GlassInfo::getFlowCardId)
         );
     }
 
@@ -60,6 +62,8 @@
 
 
 
+
+
     @Override
     public GlassInfo selectGlassId(String id) {
         return baseMapper.selectOne(new QueryWrapper<GlassInfo>().lambda()
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownCacheGlassTask.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownCacheGlassTask.java
index d8361e1..8be3a8d 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownCacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownCacheGlassTask.java
@@ -1,37 +1,23 @@
 package com.mes.job;
 
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.lang.Assert;
-import cn.hutool.json.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.mes.common.S7object;
-import com.mes.common.config.Const;
-import com.mes.device.PlcParameterObject;
 import com.mes.downglassinfo.entity.DownGlassInfo;
-import com.mes.downglassinfo.mapper.DownGlassInfoMapper;
+import com.mes.downglassinfo.entity.DownGlassTask;
 import com.mes.downglassinfo.service.DownGlassInfoService;
-import com.mes.downstorage.entity.DownStorageCage;
+import com.mes.downglassinfo.service.DownGlassTaskService;
 import com.mes.downstorage.entity.DownStorageCageDetails;
 import com.mes.downstorage.service.DownStorageCageDetailsService;
 import com.mes.downstorage.service.DownStorageCageService;
 import com.mes.downworkstation.entity.DownWorkstation;
-import com.mes.downworkstation.entity.DownWorkstationTask;
 import com.mes.downworkstation.service.DownWorkstationService;
 import com.mes.downworkstation.service.DownWorkstationTaskService;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.service.GlassInfoService;
-import com.mes.downglassinfo.entity.DownGlassTask;
-import com.mes.downglassinfo.service.DownGlassTaskService;
-import com.mes.tools.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
-import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 /**
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketConfig.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketConfig.java
deleted file mode 100644
index 56fb341..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketConfig.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.mes.tools;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.socket.server.standard.ServerEndpointExporter;
-
-@Configuration
-public class WebSocketConfig {
-    
-
-     @Bean
-    public ServerEndpointExporter serverEndpointExporter() {
-        return new ServerEndpointExporter();
-    }
-
-}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketServer.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketServer.java
deleted file mode 100644
index b10efb4..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketServer.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package com.mes.tools;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.websocket.OnClose;
-import javax.websocket.OnError;
-import javax.websocket.OnMessage;
-import javax.websocket.OnOpen;
-import javax.websocket.Session;
-import javax.websocket.server.PathParam;
-import javax.websocket.server.ServerEndpoint;
-
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.stereotype.Component;
-
-import cn.hutool.json.JSONObject;
-import cn.hutool.json.JSONUtil;
-
-@ServerEndpoint(value = "/api/talk/{username}")
-@Component
-public class WebSocketServer {
-
-    // @Autowired
-    // HomeMapper homeMapper;
-
-    static ConfigurableApplicationContext applicationContext;
-
-    // 瑙e喅鏃犳硶娉ㄥ叆mapper闂 //浣跨敤鏂规硶
-    // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
-    public static void setApplicationContext(ConfigurableApplicationContext configurableApplicationContext) {
-        WebSocketServer.applicationContext = configurableApplicationContext;
-    }
-
-    private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
-    private List<String> messages;
-    /**
-     * 璁板綍褰撳墠鍦ㄧ嚎杩炴帴鏁�
-     */
-    public static final Map<String, ArrayList<WebSocketServer>> sessionMap = new ConcurrentHashMap<>();
-
-    String username;
-    public Session session;
-
-    public WebSocketServer() {
-        this.messages = new ArrayList<>();
-    }
-
-    /**
-     * 杩炴帴寤虹珛鎴愬姛璋冪敤鐨勬柟娉�
-     */
-    @OnOpen
-    public void onOpen(Session session, @PathParam("username") String username) {
-        this.username = username;
-        this.session = session;
-        List<WebSocketServer> webSocketServers = sessionMap.get(username);
-        if (webSocketServers == null) {
-            ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>();
-            arrayListwebserver.add(this);
-            sessionMap.put(username, arrayListwebserver);
-        } else {
-            webSocketServers.add(this);
-            // Short i=0;
-            // for (WebSocketServer webSocketServer : webSocketServers) {
-            //     if(webSocketServer==this){
-            //         i++;
-            //     }
-            // }
-            // if(i==0){
-            //     webSocketServers.add(this);
-            // }
-        }
-
-        log.info("鏈夋柊鐢ㄦ埛鍔犲叆锛寀sername={}, 褰撳墠鍦ㄧ嚎浜烘暟涓猴細{}", username, sessionMap.get(username).size());
-
-        // JSONObject result = new JSONObject();
-        // JSONArray array = new JSONArray();
-        // result.set("users", array);
-        // for (Object key : sessionMap.keySet()) {
-        // JSONObject jsonObject = new JSONObject();
-        // jsonObject.set("username", key);
-        // array.add(jsonObject);
-        // }
-
-        // sendAllMessage(JSONUtil.toJsonStr(result)); // 鍚庡彴鍙戦�佹秷鎭粰鎵�鏈夌殑瀹㈡埛绔�
-    }
-
-    /**
-     * 杩炴帴鍏抽棴璋冪敤鐨勬柟娉�
-     */
-    @OnClose
-    public void onClose(Session session, @PathParam("username") String username) {
-        List<WebSocketServer> webSocketServers = sessionMap.get(username);
-        ArrayList<WebSocketServer> arrayListwebserver = new ArrayList<WebSocketServer>();
-        if (webSocketServers.size()>1) {
-            for (WebSocketServer webSocketServer : webSocketServers) {
-                if(webSocketServer!=this){
-                    arrayListwebserver.add(webSocketServer);
-                }
-            }
-            sessionMap.put(username, arrayListwebserver);
-            log.info("绉婚櫎username={}涓�鍚嶇敤鎴穝ession, {}鐨勫綋鍓嶅湪绾夸汉鏁颁负锛歿}", username, username, sessionMap.get(username).size());
-        }else{
-            sessionMap.remove(username);
-            log.info("绉婚櫎username={}涓�鍚嶇敤鎴穝ession, {}杩炴帴鍏抽棴, 褰撳墠杩炴帴鏁颁负锛歿}", username, username, sessionMap.size());
-        }
-
-    }
-
-    /**
-     * 鏀跺埌瀹㈡埛绔秷鎭悗璋冪敤鐨勬柟娉�
-     * 鍚庡彴鏀跺埌瀹㈡埛绔彂閫佽繃鏉ョ殑娑堟伅
-     * onMessage 鏄竴涓秷鎭殑涓浆绔�
-     * 鎺ュ彈 娴忚鍣ㄧ socket.send 鍙戦�佽繃鏉ョ殑 json鏁版嵁
-     *
-     * @param message 瀹㈡埛绔彂閫佽繃鏉ョ殑娑堟伅
-     */
-    @OnMessage
-    public void onMessage(String message, Session session, @PathParam("username") String username) {
-        log.info("鏈嶅姟绔敹鍒扮敤鎴穟sername={}鐨勬秷鎭�:{}", username, message);
-        JSONObject obj = JSONUtil.parseObj(message);
-        String text = obj.getStr("data");
-
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.set("message", text);
-        this.messages.add(text);
-        this.sendMessage(jsonObject.toString()); // JSONUtil.toJsonStr(jsonObject)
-
-    }
-
-    @OnError
-    public void onError(Session session, Throwable error) {
-        log.error("鍙戠敓閿欒");
-        error.printStackTrace();
-    }
-
-    /**
-     * 鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔�
-     */
-    public void sendMessage(String message) {
-        try {
-            // log.info("鏈嶅姟绔粰瀹㈡埛绔痆{}]鍙戦�佹秷鎭瘂}", this.session.getId(), message);
-            this.session.getBasicRemote().sendText(message);
-        } catch (Exception e) {
-            log.error("鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔け璐�", e);
-        }
-    }
-
-    // /**
-    //  * 鏈嶅姟绔彂閫佹秷鎭粰鎵�鏈夊鎴风
-    //  */
-    // public void sendAllMessage(String message) {
-    //     try {
-    //         for (WebSocketServer webSocketServer : sessionMap.values()) {
-    //             // log.info("鏈嶅姟绔粰瀹㈡埛绔痆{}]鍙戦�佹秷鎭瘂}", this.session.getId(), message);
-    //             webSocketServer.sendMessage(message);
-    //         }
-    //     } catch (Exception e) {
-    //         log.error("鏈嶅姟绔彂閫佹秷鎭粰瀹㈡埛绔け璐�", e);
-    //     }
-    // }
-
-    public List<String> getMessages() {
-        return messages;
-
-    }
-
-    public void clearMessages() {
-        messages.clear();
-    }
-}

--
Gitblit v1.8.0