From 873114cc56fb6181db86fef920520e218257e235 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 11 四月 2024 10:41:45 +0800
Subject: [PATCH] 代码迁移

---
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/GlassInfoServiceImpl.java         |   22 
 hangzhoumesParent/gateway/src/main/resources/application.yml                                                                         |    2 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/GlassInfoService.java                  |    3 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassInfo.java                      |    7 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcAlarm.json                                          |  371 +++++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java                                       |   91 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterObject.java                               |  205 ++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcState.json                                          |  285 ++++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/Plchome.java                                          |   62 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/alarm.xlsx                                             |    0 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/ExcelToJsonConverter.java                              |  108 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/test.xlsx                                              |    0 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/mapper/DownWorkstationMapper.java            |   68 
 UI-Project/src/views/UnLoadGlass/loadmachinerack.vue                                                                                 |   47 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml                                  |   21 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java |   48 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java              |    3 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcMes.json                                            |   50 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java     |    2 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownGlassLogic.java                  |  156 ++
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml                                                  |   12 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcParameter.json                                      |  610 ++++++++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitObject.java                                     |  142 ++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml                                                 |   27 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java                                  |   10 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java                |   21 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java          |   14 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java                                  |   29 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/TokenTools.java                                        |   21 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/mapper/GlassInfoMapper.java                    |   14 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/InitUtil.java                                          |  128 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterInfo.java                                 |  128 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitInfo.java                                       |   75 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/Configuration.java                                     |   48 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/Plcframe.json                                          |   51 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/entity/DownWorkstation.java                  |    3 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml                                                                     |   22 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcSign.json                                           |  460 ++++++
 UI-Project/src/router/index.js                                                                                                       |   10 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java    |  121 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcTest.json                                           |  378 +++++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/sign.xlsx                                              |    0 
 hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml                                                                            |   12 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcRead.json                                           |  195 ++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketServer.java                                   |  164 ++
 45 files changed, 4,191 insertions(+), 55 deletions(-)

diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js
index 297bac1..fd505e1 100644
--- a/UI-Project/src/router/index.js
+++ b/UI-Project/src/router/index.js
@@ -27,11 +27,11 @@
           name: 'Temperedlayout',
           component: () => import('../views/TL/Temperedlayout/Temperedlayout.vue'),
           children:[
-            {
-             path: 'selectLayout',
-              name: 'selectLayout',
-              component: () => import('../views/TL/Temperedlayout/SelectLayout.vue'),
-            }
+            // {
+            //  path: 'selectLayout',
+            //   name: 'selectLayout',
+            //   component: () => import('../views/TL/Temperedlayout/SelectLayout.vue'),
+            // }
          ]
         },
       
diff --git a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
index 2795d46..04dc378 100644
--- a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
+++ b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -19,6 +19,49 @@
 const tableData = reactive([]);
 
 
+let socket;
+
+
+const initWebSocket = (token) =>{ //鍒濆鍖杦e
+
+let viewname = "unloadglass";
+
+if (typeof WebSocket === "undefined") {
+  console.log("鎮ㄧ殑娴忚鍣ㄤ笉鏀寔WebSocket");
+} else {
+  let socketUrl = "ws://" + "localhost"+":88" + "/api/unLoadGlass/api/talk/" + viewname;
+  if (socket != null) {
+    socket.close();
+    socket = null;
+  }
+
+  // 寮�鍚竴涓獁ebsocket鏈嶅姟
+  socket = new WebSocket(socketUrl);
+
+  // 鎵撳紑浜嬩欢
+  socket.onopen = function () {
+    console.log("websocket宸叉墦寮�");
+  };
+
+
+
+socket.onmessage = (msg) => {
+if (!msg.data) {
+return; // 濡傛灉鏀跺埌绌烘暟鎹紝鍒欑洿鎺ヨ繑鍥烇紝涓嶆墽琛屽悗缁�昏緫
+}
+
+
+
+    let obj = JSON.parse(msg.data);
+
+    
+      console.log('鏀跺埌娑堟伅锛�', obj.data);
+ 
+  }
+
+  }
+  }
+
 
 
 
@@ -157,9 +200,9 @@
 
 
 
-// initWebSocket();
+initWebSocket();
 onMounted(fetchTableData);
- setInterval(fetchTableData, 2000)
+//setInterval(fetchTableData, 2000)
 
 const open = () => {
   ElMessageBox.confirm(
diff --git a/hangzhoumesParent/gateway/src/main/resources/application.yml b/hangzhoumesParent/gateway/src/main/resources/application.yml
index 2e0b3d4..2f841e0 100644
--- a/hangzhoumesParent/gateway/src/main/resources/application.yml
+++ b/hangzhoumesParent/gateway/src/main/resources/application.yml
@@ -6,7 +6,7 @@
   cloud:
     nacos:
       discovery:
-        server-addr: 127.0.0.1:8848
+        server-addr: 192.168.6.128:8848
     gateway:
       discovery:
         locator:
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
index 437e3eb..86f564f 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -9,14 +9,14 @@
   cloud:
     nacos:
       discovery:
-        server-addr: 127.0.0.1:8848
+        server-addr: 10.153.19.150:8848
   application:
     name: cacheGlass
-  redis:
-    database: 0
-    host: 192.168.56.10
-    port: 6379
-    password:
+#  redis:
+#    database: 0
+#    host: 192.168.56.10
+#    port: 6379
+#    password:
   session:
     store-type: redis
 mybatis-plus:
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml
index f5d5404..cefd469 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml
@@ -2,18 +2,18 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>moduleService</artifactId>
-        <groupId>com.mes</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
+<parent>
+    <artifactId>moduleService</artifactId>
+    <groupId>com.mes</groupId>
+    <version>1.0-SNAPSHOT</version>
+</parent>
+<modelVersion>4.0.0</modelVersion>
 
-    <artifactId>cacheVerticalGlass</artifactId>
+<artifactId>cacheVerticalGlass</artifactId>
 
-    <properties>
-        <maven.compiler.source>8</maven.compiler.source>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
+<properties>
+    <maven.compiler.source>8</maven.compiler.source>
+    <maven.compiler.target>8</maven.compiler.target>
+</properties>
 
 </project>
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
index 4bf831d..2c49e6f 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
@@ -10,6 +10,18 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>unLoadGlass</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.9.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>3.5.2</version>
+        </dependency>
+    </dependencies>
 
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
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 361d74e..b909d67 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
@@ -1,9 +1,11 @@
 package com.mes;
 
+import com.mes.tools.WebSocketServer;
 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;
 
 /**
  * @Author : zhoush
@@ -14,7 +16,13 @@
 @EnableDiscoveryClient
 @MapperScan(basePackages = "com.mes.*.mapper")
 public class UnLoadGlassApplication {
+
+
+
     public static void main(String[] args) {
-        SpringApplication.run(UnLoadGlassApplication.class, args);
+        SpringApplication springApplication = new SpringApplication(UnLoadGlassApplication.class);
+        ConfigurableApplicationContext applicationContext = springApplication.run(args);
+        WebSocketServer.setApplicationContext(applicationContext);
     }
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java
new file mode 100644
index 0000000..a21fed9
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java
@@ -0,0 +1,91 @@
+package com.mes.common;
+
+import com.mes.device.PlcParameterObject;
+import com.mes.tools.InitUtil;
+import org.springframework.context.annotation.Configuration;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.mes.tools.InitUtil.readAndUpdateWordValues;
+
+public class PLCAutoMes extends Thread {
+
+    // 鐢ㄤ簬瀛樺偍搴旂敤绋嬪簭鐨勯厤缃俊鎭�
+    private Configuration config;
+    private static InitUtil initUtil;
+
+
+    // 鍗曚緥瀹炰緥
+    private static PLCAutoMes instance;
+    private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath();
+    private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath();
+    private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath();
+//    private static String PlcParameter = PLCAutomaticParameterSettingReview2.class
+//            .getResource("/JsonFile/PlcParameter.json").getPath();
+//    private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json")
+//            .getPath();
+//    private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json")
+//            .getPath();
+    private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath();
+   // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath();
+
+    // 璋冪敤initword鏂规硶
+
+//
+   // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm);
+    public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes);
+    public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead);
+    public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe);
+
+    // 绉佹湁鏋勯�犲嚱鏁�
+    public PLCAutoMes() throws IOException {
+
+        initUtil = new InitUtil();
+    }
+
+    // 鑾峰彇鍗曚緥瀹炰緥
+    public static synchronized PLCAutoMes getInstance() throws IOException {
+        if (instance == null) {
+            instance = new PLCAutoMes();
+        }
+        return instance;
+    }
+
+    @Override
+    public void run() {
+        while (this != null) {
+            try {
+                Thread.sleep(100);
+
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+
+            // System.out.println(jsonFilePath);
+
+          // readAndUpdateWordValues(PlcReadObject);
+            readAndUpdateWordValues(PlcMesObject);
+//      readAndUpdateWordValues(PlcframeObject);
+            // readAndUpdateWordValues(PlcframeObject);
+
+            // readAndUpdateWordValues(plcStateObject);
+          //  int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex();
+            // System.out.println(index);
+          //  PlcMesObject.getPlcParameter("AddStart").getAddress(index);
+            // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index));
+            List<String> addresses = new ArrayList<>();
+            addresses.add("FeedID");
+            addresses.add("AddStart");
+            // System.out.println(addresses);
+            // System.out.println(PlcMesObject.getPlcParameterValues(addresses));
+            List<String> addresses2 = new ArrayList<>();
+            addresses2.add("FeedID");
+            addresses2.add("FeedCarStatus");
+
+         //   System.out.println(PlcReadObject.getPlcParameterValues(addresses2));
+
+        }
+    }
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/Plchome.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/Plchome.java
new file mode 100644
index 0000000..32903a6
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/common/Plchome.java
@@ -0,0 +1,62 @@
+package com.mes.common;
+
+import cn.hutool.json.JSONObject;
+import com.mes.downworkstation.service.DownGlassLogic;
+import com.mes.tools.WebSocketServer;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.function.Supplier;
+
+@Component
+public class Plchome extends Thread {
+    private int i = 1;
+    private static final Logger log = LogManager.getLogger(Plchome.class);
+
+    private final Supplier<DownGlassLogic> plcServiceSupplier;
+
+    public Plchome() {
+        this.plcServiceSupplier = () -> WebSocketServer.applicationContext.getBean(DownGlassLogic.class);
+    }
+
+
+
+    @Override
+    public void run() {
+        while (!Thread.currentThread().isInterrupted()) {
+            try {
+                i++;
+                Thread.sleep(100);
+                DownGlassLogic plcService = plcServiceSupplier.get();
+               // plcService.performPlcActions();
+                //plcService.unloadpush();
+
+                //褰撲笅鐗囦换鍔¤〃鐘舵�佷负1鏃跺�欏皢鏁版嵁鎻掑叆鍒颁笅鐗囩幓鐠冧俊鎭〃
+                plcService.insertdownglassinfo();
+
+
+
+                //褰撴満姊版墜浠诲姟琛ㄤ腑鐘舵�佷负1 鏇存柊宸茬粡钀芥灦鏁伴噺锛屽苟涓旀妸涓嬬墖浠诲姟琛ㄧ殑閭f潯璁板綍鍒犳帀 宸ヤ綅琛ㄦ祦绋嬪崱缁戝畾浜嗘灦瀛�
+                plcService.downWorkstation();
+
+
+            } catch (InterruptedException e) {
+                Thread.currentThread().interrupt();
+                e.printStackTrace();
+            }
+
+            JSONObject jsonObject = new JSONObject();
+            // System.out.println(arraylist6);
+            jsonObject.append("data", 1);
+            ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
+            if (sendwServer != null) {
+                for (WebSocketServer webserver : sendwServer) {
+                    webserver.sendMessage(jsonObject.toString());
+                    log.info("鍑嗗鍚� WebSocket 鏈嶅姟鍣ㄥ彂閫佹秷鎭�: {}", jsonObject.toString());
+                }}
+
+        }
+    }
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java
new file mode 100644
index 0000000..a99b8ab
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/config/AppRunnerConfig.java
@@ -0,0 +1,29 @@
+package com.mes.config;
+
+import com.mes.common.PLCAutoMes;
+import com.mes.common.Plchome;
+
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+@Component
+@Order(1)
+
+public class AppRunnerConfig implements ApplicationRunner {
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        // TODO Auto-generated method stub
+        //
+        System.out.println("鍚姩瀹屾垚");
+
+
+
+       new PLCAutoMes().start();
+
+    new Plchome().start();
+
+    }
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitInfo.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitInfo.java
new file mode 100644
index 0000000..7ff0ee3
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitInfo.java
@@ -0,0 +1,75 @@
+package com.mes.device;
+
+public  class PlcBitInfo {
+
+        public PlcBitInfo(String startAddress) {
+            this.startAddress = startAddress;
+        }
+        private String startAddress;
+        // 鍙傛暟鏍囪瘑
+        private String codeId;
+
+        // 鍙傛暟鍚嶇О
+        private String name;
+
+        // 璇诲彇 鍙傛暟鍊�
+        private Boolean value;
+        // 鍙傛暟鍦板潃
+        private int addressIndex;
+
+        public String getCodeId() {
+            return this.codeId;
+        }
+
+        public void setCodeId(String codeId) {
+            this.codeId = codeId;
+        }
+
+        public String getName() {
+            return this.name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public Boolean getValue() {
+            return this.value;
+        }
+
+        public void setValue(Boolean value) {
+            this.value = value;
+        } 
+         
+
+        public int getAddressIndex() {
+            return this.addressIndex;
+        } 
+         /**
+     * 鑾峰彇鍦板潃
+     * 
+     * @param index 绱㈠紩鍦板潃
+     */
+        public String getAddress(int index) {
+            String[] stringdatas = this.startAddress.trim().split("\\.");
+            if (stringdatas.length < 2 )
+                return null;
+            int dbwindex = 0;
+            int bitindex = 0;
+             if (stringdatas.length == 3) {
+                dbwindex = Integer.parseInt(stringdatas[1]);
+                bitindex = Integer.parseInt(stringdatas[2]);
+            } else
+                return null; 
+              dbwindex+=index/8;
+              bitindex+=index%8;
+            return stringdatas[0]+"."+dbwindex+"."+bitindex;
+        }
+
+
+
+
+    public void setAddressIndex(int addressindex) {
+            this.addressIndex = addressindex;
+        } 
+    }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitObject.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitObject.java
new file mode 100644
index 0000000..e9eb1f7
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcBitObject.java
@@ -0,0 +1,142 @@
+package com.mes.device;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PlcBitObject {
+
+    // 璇ユā鍧楁暟鎹被鍨嬶紝鏁版嵁璧峰浣嶇疆
+    private String plcAddressBegin;
+    // 鏁版嵁鍦板潃闀垮害锛氱涓�鍙傛暟鍒版渶鍚庝竴涓弬鏁扮殑闀垮害
+    private int plcAddressLength;
+    private ArrayList<PlcBitInfo> plcBitList;
+
+    /**
+     * @return 鏁版嵁鍖哄紑濮嬪湴鍧�
+     */
+    public String getPlcAddressBegin() {
+        return plcAddressBegin;
+    }
+
+    /**
+     * @param plcAddressBegin 璁剧疆鏁版嵁鍖哄紑濮嬪湴鍧�
+     */
+    public void setPlcAddressBegin(String plcAddressBegin) {
+        this.plcAddressBegin = plcAddressBegin;
+    }
+
+    /**
+     * @return 鏁版嵁鍖� 璇诲彇鎵�鏈夋暟鎹墍闇�鐨勯暱搴︼紙浠yte绫诲瀷涓哄熀鍑嗭級
+     */
+    public int getPlcAddressLength() {
+        return plcAddressLength;
+    }
+
+    /**
+     * @return 璁剧疆锛氭暟鎹尯 璇诲彇鎵�鏈夋暟鎹墍闇�鐨勯暱搴︼紙浠yte绫诲瀷涓哄熀鍑嗭級
+     */
+    public void setPlcAddressLength(int plcAddressLength) {
+        this.plcAddressLength = plcAddressLength;
+    }
+
+    /**
+     * @return 鑾峰彇鍙傛暟瀹炰緥闆嗗悎
+     */
+    public ArrayList<PlcBitInfo> getBitList() {
+        return plcBitList;
+    }
+
+    /**
+     * 鏍规嵁鍙傛暟鏍囪瘑 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     * 
+     * @param codeid 鍙傛暟鏍囪瘑
+     * @return 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     */
+    public PlcBitInfo getPlcBit(String codeid) {
+        if (plcBitList != null) {
+            for (PlcBitInfo plcbitInfo : plcBitList) {
+                if (plcbitInfo.getCodeId().equals(codeid))
+                    return plcbitInfo;
+            }
+            return null;
+        } else
+            return null;
+    }
+
+    /**
+     * 鏍规嵁鍙傛暟鏍囪瘑 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     * 
+     * @param codeid 鍙傛暟鏍囪瘑
+     * @return 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     */
+    public List<Boolean> getPlcBitValues(List<String> codeids) {
+        List<Boolean> arrayList = new ArrayList<>();
+        if (plcBitList != null) {
+            Map<String, Boolean> resultMap = new LinkedHashMap<>(); // 浣跨敤 LinkedHashMap 淇濈暀鎻掑叆椤哄簭
+            for (PlcBitInfo plcBitInfo : plcBitList) {
+                if (codeids.contains(plcBitInfo.getCodeId().toString())) {
+                    resultMap.put(plcBitInfo.getCodeId().toString(), plcBitInfo.getValue());
+                }
+            }
+            for (String codeId : codeids) { // 鎸夌収浼犲叆鍙傛暟鐨勯『搴忛亶鍘�
+                Boolean value = resultMap.get(codeId);
+                if (value != null) {
+                    arrayList.add(value);
+                } else {
+                    arrayList.add(null); // 濡傛灉鎵句笉鍒板搴旂殑鍊硷紝娣诲姞 null
+                }
+            }
+        }
+        return arrayList;
+    }
+
+
+    public List<String> getAddressListByCodeId(List<String> codeIdList) {
+        List<String> addressList = new ArrayList<>();
+        for (String codeId : codeIdList) {
+            for (PlcBitInfo plcBitInfo : plcBitList) {
+                if (plcBitInfo.getCodeId().equals(codeId)) {
+                    int index = plcBitInfo.getAddressIndex();
+                    String address = plcBitInfo.getAddress(index);
+                    if (address != null) {
+                        addressList.add(address);
+                    }
+                }
+            }
+        }
+        return addressList;
+    }
+
+
+    /**
+     * 娣诲姞鍙傛暟瀹炰緥
+     * 
+     * @param param 鍙傛暟瀹炰緥
+     */
+    public void addPlcBit(PlcBitInfo param) {
+        if (plcBitList != null)
+            plcBitList.add(param);
+        else {
+            plcBitList = new ArrayList<PlcBitInfo>();
+            plcBitList.add(param);
+        }
+    }
+
+    /**
+     * 鏍规嵁PLC杩斿洖鐨勬暟鎹� 缁欏弬鏁板疄渚嬭祴鍊�
+     * 
+     * @param plcValueArray PLC璇诲彇鍥炴潵鐨刡yte绫诲瀷鏁版嵁闆嗗悎
+     */
+    public void setPlcBitList(List<Boolean> plcValueArray) {
+        if (plcBitList != null) {
+            for (PlcBitInfo plcbitInfo : plcBitList) {
+                plcbitInfo.setValue(plcValueArray.get(plcbitInfo.getAddressIndex()));
+            }
+        }
+    }
+   
+
+   
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterInfo.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterInfo.java
new file mode 100644
index 0000000..f4f3be0
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterInfo.java
@@ -0,0 +1,128 @@
+package com.mes.device;
+public  class PlcParameterInfo {
+      public PlcParameterInfo(String startAddress) {
+        this.startAddress = startAddress;
+      } 
+        private String startAddress;
+        // 鍙傛暟鏍囪瘑
+        private String codeId;
+
+        // 鍙傛暟鍚嶇О
+        private String name;
+
+        // 璇诲彇 鍙傛暟鍊�
+        private String value;
+
+        // // 鍐欏叆 鍙傛暟鍊�
+        // private String writeValue;
+
+        // 鍙傛暟鍗曚綅
+        private String unit;
+
+        // 鍙傛暟鍊艰浆鎹㈢郴鏁�
+        private int ratio;
+
+        // 鍙傛暟鍦板潃
+        private int addressIndex;
+
+        // 鍙傛暟鍦板潃浣嶉暱搴�
+        private int addressLength;
+
+        public String getCodeId() {
+            return this.codeId;
+        }
+
+        public void setCodeId(String codeId) {
+            this.codeId = codeId;
+        }
+
+        public String getName() {
+            return this.name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getValue() {
+            return this.value;
+        }
+
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        // public String getWriteValue() {
+        //     return this.writeValue;
+        // }
+
+        // public void setWriteValue(String writeValue) {
+        //     this.writeValue = writeValue;
+        // }
+
+        public String getUnit() {
+            return this.unit;
+        }
+
+        public void setUnit(String unit) {
+            this.unit = unit;
+        }
+
+        public int getAddressIndex() {
+            return this.addressIndex;
+        }
+
+        public void setAddressIndex(int addressindex) {
+            this.addressIndex = addressindex;
+        }
+
+        public int getAddressLength() {
+            return this.addressLength;
+        }
+
+        public void setAddressLength(int addresslength) {
+            this.addressLength = addresslength;
+        }
+
+        public int getRatio() {
+            return this.ratio;
+        }
+
+        public void setRatio(int ratio) {
+            this.ratio = ratio;
+        }
+
+           /**
+     * 鑾峰彇鍦板潃
+     * 
+     * @param index 绱㈠紩鍦板潃
+     */
+    public String getAddress(int index) {
+        String[] stringdatas = this.startAddress.trim().split("\\.");
+        int addressLength=this.addressLength;
+        if (addressLength < 2 ){
+            return null;
+        }
+
+        if (addressLength == 2 ) {
+            int wordindex = index;
+
+            return stringdatas[0] + "." + wordindex;
+        }
+        if (addressLength == 14 ) {
+            int wordindex = index;
+            int newIndex = wordindex + 13;
+            return stringdatas[0] + "." + wordindex +"-" + newIndex;
+        }
+        return null;
+    }
+
+    public int getPlcAddress() {
+
+        return addressIndex;
+    }
+
+    public String getAddress() {
+        return getAddress(this.addressIndex);
+    }
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterObject.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterObject.java
new file mode 100644
index 0000000..e4f45f6
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/device/PlcParameterObject.java
@@ -0,0 +1,205 @@
+package com.mes.device;
+
+import java.lang.reflect.Array;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class PlcParameterObject {
+
+    // 璇ユā鍧楁暟鎹被鍨嬶紝鏁版嵁璧峰浣嶇疆
+    private String plcAddressBegin;
+    // 鏁版嵁鍦板潃闀垮害锛氱涓�鍙傛暟鍒版渶鍚庝竴涓弬鏁扮殑闀垮害
+    private int plcAddressLength;
+    private ArrayList<PlcParameterInfo> plcParameterList;
+
+
+
+    /**
+     * @return 鏁版嵁鍖哄紑濮嬪湴鍧�
+     */
+    public String getPlcAddressBegin() {
+        return plcAddressBegin;
+    }
+
+    /**
+     * @param plcAddressBegin 璁剧疆鏁版嵁鍖哄紑濮嬪湴鍧�
+     */
+    public void setPlcAddressBegin(String plcAddressBegin) {
+        this.plcAddressBegin = plcAddressBegin;
+    }
+
+    /**
+     * @return 鏁版嵁鍖� 璇诲彇鎵�鏈夋暟鎹墍闇�鐨勯暱搴︼紙浠yte绫诲瀷涓哄熀鍑嗭級
+     */
+    public int getPlcAddressLength() {
+        return plcAddressLength;
+    }
+
+    /**
+     * @return 璁剧疆锛氭暟鎹尯 璇诲彇鎵�鏈夋暟鎹墍闇�鐨勯暱搴︼紙浠yte绫诲瀷涓哄熀鍑嗭級
+     */
+    public void setPlcAddressLength(int plcAddressLength) {
+        this.plcAddressLength = plcAddressLength;
+    }
+
+    /**
+     * @return 鑾峰彇鍙傛暟瀹炰緥闆嗗悎
+     */
+    public ArrayList<PlcParameterInfo> getPlcParameterList() {
+        return plcParameterList;
+    }
+
+    /**
+     * 鏍规嵁鍙傛暟鏍囪瘑 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     * 
+     * @param codeid 鍙傛暟鏍囪瘑
+     * @return 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     */
+    public PlcParameterInfo getPlcParameter(String codeid) {
+        if (plcParameterList != null) {
+            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
+                if (plcParameterInfo.getCodeId().equals(codeid))
+                    return plcParameterInfo;
+            }
+            return null;
+        } else
+            return null;
+    }
+
+
+
+    /**
+     * 鏍规嵁鍙傛暟鏍囪瘑 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     * 
+     * @param codeids 鍙傛暟鏍囪瘑
+     * @return 鑾峰彇鏌愪釜鍙傛暟瀹炰緥
+     */
+    public List<String> getPlcParameterValues(List<String> codeids) {
+        List<String> arrayList = new ArrayList<>();
+        if (plcParameterList != null) {
+            Map<String, PlcParameterInfo> resultMap = new LinkedHashMap<>(); // 浣跨敤 LinkedHashMap 淇濈暀鎻掑叆椤哄簭
+            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
+                if (codeids.contains(plcParameterInfo.getCodeId())) {
+                    resultMap.put(plcParameterInfo.getCodeId(), plcParameterInfo);
+                }
+            }
+            for (String codeId : codeids) { // 鎸夌収浼犲叆鍙傛暟鐨勯『搴忛亶鍘�
+                PlcParameterInfo plcParameterInfo = resultMap.get(codeId);
+                if (plcParameterInfo != null) {
+                    arrayList.add(plcParameterInfo.getValue());
+                } else {
+                    arrayList.add(null); // 濡傛灉鎵句笉鍒板搴旂殑鍊硷紝娣诲姞 null
+                }
+            }
+        }
+        return arrayList;
+    }
+
+
+    public List<String> getAddressListByCodeId(List<String> codeIdList) {
+        List<String> addressList = new ArrayList<>();
+        for (String codeId : codeIdList) {
+            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
+                if (plcParameterInfo.getCodeId().equals(codeId)) {
+                    int index = plcParameterInfo.getAddressIndex();
+                    String address = plcParameterInfo.getAddress(index);
+                    if (address != null) {
+                        addressList.add(address);
+                    }
+                }
+            }
+        }
+        return addressList;
+    }
+
+
+
+
+
+
+    /**
+     * 娣诲姞鍙傛暟瀹炰緥
+     * 
+     * @param param 鍙傛暟瀹炰緥
+     */
+    public void addPlcParameter(PlcParameterInfo param) {
+        if (plcParameterList != null)
+            plcParameterList.add(param);
+        else {
+            plcParameterList = new ArrayList<PlcParameterInfo>();
+            plcParameterList.add(param);
+        }
+    }
+
+    /**
+     * 鏍规嵁PLC杩斿洖鐨勬暟鎹� 缁欏弬鏁板疄渚嬭祴鍊�
+     * 
+     * @param plcValueArray PLC璇诲彇鍥炴潵鐨刡yte绫诲瀷鏁版嵁闆嗗悎
+     */
+    public void setPlcParameterList(byte[] plcValueArray) {
+        if (plcParameterList != null) {
+          
+            for (PlcParameterInfo plcParameterInfo : plcParameterList) {
+               
+                byte[] valueList = new byte[plcParameterInfo.getAddressLength()];
+
+//                System.out.println(plcParameterInfo.getAddressLength());
+
+                for (int i = 0; i < plcParameterInfo.getAddressLength(); i++) {
+                    Array.setByte(valueList, i, plcValueArray[plcParameterInfo.getAddressIndex() + i]);
+
+                }
+                if (plcParameterInfo.getAddressLength()==2) { 
+                      plcParameterInfo.setValue(String.valueOf(byte2short(valueList)));
+                }
+                else if (plcParameterInfo.getAddressLength()==14) {
+                    plcParameterInfo.setValue((byteToHexString(valueList)));
+                }
+
+                else
+                {
+                    String valuestr = new String(valueList);
+                    plcParameterInfo.setValue(valuestr);
+                }
+            }
+        }
+    }
+     /**
+     * short绫诲瀷杞琤yte[]
+     * 
+     * @param s short绫诲瀷鍊�
+     */
+    public static byte[] short2byte(short s){
+        byte[] b = new byte[2]; 
+        for(int i = 0; i < 2; i++){
+            int offset = 16 - (i+1)*8; //鍥犱负byte鍗�4涓瓧鑺傦紝鎵�浠ヨ璁$畻鍋忕Щ閲�
+            b[i] = (byte)((s >> offset)&0xff); //鎶�16浣嶅垎涓�2涓�8浣嶈繘琛屽垎鍒瓨鍌�
+        }
+        return b;
+   }
+     /**
+     * byte[]绫诲瀷杞瑂hort
+     * 
+     * @param b byte[]绫诲瀷鍊�
+     */
+   public static short byte2short(byte[] b){
+       short l = 0;
+       for (int i = 0; i < 2; i++) {
+           l<<=8; //<<=鍜屾垜浠殑 +=鏄竴鏍风殑锛屾剰鎬濆氨鏄� l = l << 8 
+           l |= (b[i] & 0xff); //鍜屼笂闈篃鏄竴鏍风殑  l = l | (b[i]&0xff)
+       }
+       return l;
+   }
+
+    public static String byteToHexString(byte[] bytes) {
+
+        String str = new String(bytes, StandardCharsets.UTF_8);
+        return str;
+    }
+
+
+
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassInfo.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassInfo.java
index 3aa224c..cbabf74 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassInfo.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassInfo.java
@@ -3,6 +3,7 @@
 import java.io.Serializable;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.stereotype.Component;
 
 /**
  * <p>
@@ -13,6 +14,7 @@
  * @since 2024-03-27
  */
 @Data
+@Component
 @EqualsAndHashCode(callSuper = false)
 public class DownGlassInfo implements Serializable {
 
@@ -21,7 +23,7 @@
     /**
      * 涓嬬墖鐜荤拑淇℃伅琛╥d
      */
-      private Integer id;
+      private int id;
 
     /**
      * 娴佺▼鍗″彿
@@ -49,4 +51,7 @@
     private Double thickness;
 
 
+    private int Filmsid;
+
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
index 7762f75..ede1a18 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
@@ -2,15 +2,20 @@
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.mes.downglassinfo.entity.DownGlassInfo;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
 
-/**
- * <p>
- *  Mapper 鎺ュ彛
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
+import java.util.List;
+
+@Repository
 public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> {
 
+    // 鏌ヨ涓嬬墖浠诲姟琛ㄤ腑鐘舵�佷负1鐨勪笅鐗囦俊鎭�
+    List<DownGlassInfo> selectunloadingtaskstate();
+
+    void updateTaskStateToZero(@Param("flowCardId") String flowCardId);
+
+    Integer getMaxSequenceByFlowCardId(@Param("flowCardId") String flowCardId);
+
+    void deletetask(@Param("flowCardId") String flowCardId);
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
index 37b6795..656f504 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.mes.downglassinfo.entity.DownGlassInfo;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * <p>
@@ -13,4 +14,6 @@
  */
 public interface DownGlassInfoService extends IService<DownGlassInfo> {
 
+
+
 }
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 9e972ba..a141494 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
@@ -17,4 +17,6 @@
 @Service
 public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService {
 
+
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
index d46e65e..1483cac 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
@@ -1,9 +1,17 @@
 package com.mes.downworkstation.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.mes.downworkstation.entity.DownWorkstation;
+import com.mes.downworkstation.service.DownWorkstationService;
+import com.mes.uppattenusage.service.GlassInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -13,9 +21,116 @@
  * @author zhoush
  * @since 2024-03-27
  */
+
 @RestController
-@RequestMapping("/downWorkstation")
+@RequestMapping("/api/downWorkstation")
 public class DownWorkstationController {
 
+    @Autowired
+    private DownWorkstationService downWorkstationService;
+    @Autowired
+    private GlassInfoService glassInfoService;
+
+    @GetMapping("/getone")
+    public ResponseEntity<?> getOneDownWorkstations() {
+        try {
+            List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations();
+            // 鏋勫缓绗﹀悎棰勬湡鏍煎紡鐨勫搷搴旀暟鎹�
+            Map<String, Object> responseData = new HashMap<>();
+            responseData.put("code", 200);
+            responseData.put("msg", "鎴愬姛");
+            responseData.put("data", data);
+            // 杩斿洖 ResponseEntity 瀵硅薄锛屽寘鍚搷搴旀暟鎹拰鐘舵�佺爜
+            return ResponseEntity.ok(responseData);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 濡傛灉鍑虹幇寮傚父锛岃繑鍥為敊璇俊鎭�
+            Map<String, Object> errorResponse = new HashMap<>();
+            errorResponse.put("code", 500);
+            errorResponse.put("msg", "鏈嶅姟鍣ㄥ唴閮ㄩ敊璇�");
+            return ResponseEntity.status(500).body(errorResponse);
+        }
+    }
+
+    @GetMapping("/gettwo")
+    public List<DownWorkstation> gettwoDownWorkstations() {
+        return downWorkstationService.gettwoDownWorkstations();
+    }
+    @GetMapping("/getflowCardId")
+    public ResponseEntity<Map<String, Object>> getflowCardId() {
+        Map<String, Object> responseData = new HashMap<>();
+        try {
+            List<Map<String, Object>> data = downWorkstationService.getflowCardId();
+            responseData.put("code", 200);
+            responseData.put("msg", "鎴愬姛");
+            responseData.put("data", data);
+            return ResponseEntity.ok(responseData);
+        } catch (Exception e) {
+            responseData.put("code", 500);
+            responseData.put("msg", "澶辫触");
+            responseData.put("data", null);
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData);
+        }
+    }
+
+
+
+
+    @PostMapping("/updateFlowCardId")
+    public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) {
+        // 浠� requestData 涓幏鍙栦紶鍏ョ殑 flowCardId
+        String flowCardId = (String) requestData.get("flowCardId");
+        int workstationId = (int) requestData.get("workstationId");
+
+        // 鏌ヨ瀵瑰簲 flowCardId 鐨勭幓鐠冧俊鎭�绘暟閲�
+        int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId);
+
+        // 鏇存柊 down_workstation 琛ㄤ腑鐨勬�绘暟閲�
+        glassInfoService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId);
+
+        // 鏋勫缓鍝嶅簲鏁版嵁
+        Map<String, Object> responseData = new HashMap<>();
+        responseData.put("message", "updated successfully");
+        responseData.put("code", 200);
+        // 杩斿洖澶勭悊缁撴灉
+        return ResponseEntity.ok(responseData);
+    }
+
+
+    @PostMapping("/clear")
+    public ResponseEntity<Map<String, Object>> clearWorkstationInfo(@RequestBody Map<String, Object> requestData) {
+        // 璋冪敤 DownWorkstationService 涓殑鏂规硶娓呴櫎鎸囧畾宸ヤ綅ID鐨勪俊鎭�
+        int workstationId = (int) requestData.get("workstationId");
+
+        int totalWorkstations = downWorkstationService.getTotalQuantity(workstationId);
+        int downWorkstations = downWorkstationService.getRacksNumber(workstationId);
+
+
+        if (downWorkstations == totalWorkstations) {
+            downWorkstationService.clearFlowCardId(workstationId);
+            Map<String, Object> responseData = new HashMap<>();
+            responseData.put("message", "cleared successfully");
+            responseData.put("code", 200);
+            // 杩斿洖澶勭悊缁撴灉
+            return ResponseEntity.ok(responseData);
+        }
+        else {
+            // 濡傛灉鎬绘暟閲忓拰钀芥灦鏁伴噺涓嶄竴鑷达紝杩斿洖閿欒鍝嶅簲
+            Map<String, Object> errorResponse = new HashMap<>();
+            errorResponse.put("message", "Total workstations count does not match down workstations count.");
+            errorResponse.put("code", 400);
+            return ResponseEntity.badRequest().body(errorResponse);
+        }
+
+
+        // 鏋勫缓鍝嶅簲鏁版嵁
+
+    }
+
+
+
+
+
+
 }
 
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/entity/DownWorkstation.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/entity/DownWorkstation.java
index 40e582f..802dd59 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/entity/DownWorkstation.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/entity/DownWorkstation.java
@@ -52,4 +52,7 @@
     private Integer workState;
 
 
+    private Integer Racksnumber;
+
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/mapper/DownWorkstationMapper.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/mapper/DownWorkstationMapper.java
index b8ddac6..0ebb1bd 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/mapper/DownWorkstationMapper.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/mapper/DownWorkstationMapper.java
@@ -1,7 +1,16 @@
 package com.mes.downworkstation.mapper;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mes.downglassinfo.entity.DownGlassInfo;
 import com.mes.downworkstation.entity.DownWorkstation;
+import org.apache.ibatis.annotations.*;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -11,6 +20,65 @@
  * @author zhoush
  * @since 2024-03-27
  */
+@Mapper
+@Repository
+@InterceptorIgnore(tenantLine = "true")
+@DS("hangzhoumes") // 鎸囧畾浣跨敤 hangzhoumes 鏁版嵁婧�
 public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> {
 
+
+//鏌ヨ宸ヤ綅琛ㄥ拰浠诲姟琛ㄤ腑鐘舵�佷负1鐨勬祦绋嬪崱鍙峰拰宸茶惤鏋舵暟閲�
+    @Select("SELECT dwt.flow_card_id,dw.id,dw.racks_number FROM down_workstation_task dwt JOIN down_workstation dw ON dwt.flow_card_id = dw.flow_card_id WHERE dwt.state = 1 LIMIT 1")
+    List<DownWorkstation> selectdownWorkstationstate();
+    //鏇存柊钀芥灦鏁伴噺
+    @Update("UPDATE down_workstation SET racks_number = #{racksNumber} " +
+            "WHERE flow_card_id = #{flowCardId}")
+    void  update_racks_number(@Param("flowCardId") String flowCardId,
+                              @Param("racksNumber") Integer racksNumber);
+
+    //鎻掑叆鏈烘浠诲姟琛�
+    @Insert("INSERT INTO down_workstation_task (flow_card_id, width, height, thickness, filmsid,state) " +
+            "VALUES (#{flowCardId}, #{width}, #{height}, #{thickness}, #{filmsid},1)")
+    void insertdownWorkstationtask(DownGlassInfo downGlassInfo);
+
+    //鏍规嵁宸ヤ綅id鏇存柊瀹炰綋绫绘帴鏀剁殑鏁版嵁
+    @Update("UPDATE down_workstation SET width = #{width}, height = #{height}, flow_card_id = #{flowCardId} WHERE workstation_id = #{workstationId}")
+    void updateFlowCardId(DownWorkstation downWorkstation);
+
+
+
+    //婊℃灦鎷夎蛋锛屾竻绌轰俊鎭�
+    @Update("UPDATE down_workstation SET width = null, height = null, flow_card_id = null WHERE workstation_id = #{workstationId}")
+    void clearFlowCardId(DownWorkstation downWorkstation);
+
+
+
+    @Update("UPDATE down_workstation_task SET state = 0 WHERE flow_card_id = #{flowCardId}")
+    void update_task_state_to_zero(@Param("flowCardId") String flowCardId);
+
+
+    @Select(" SELECT * FROM down_workstation WHERE workstation_id >= 1 AND workstation_id <= 5")
+    List<DownWorkstation> getoneDownWorkstations();
+
+
+    @Select(" SELECT * FROM down_workstation WHERE workstation_id >= 6 AND workstation_id <= 10")
+    List<DownWorkstation> gettwoDownWorkstations();
+
+
+
+    @Select("SELECT DISTINCT  flowcard_id from glass_info")
+    @ResultType(Map.class)
+    List<Map<String, Object>> getflowCardId();
+
+    @Update("UPDATE down_workstation SET flow_card_id = NULL, total_quantity = 0, racks_number = 0 WHERE workstation_id = #{workstationId}")
+    void clearFlowCardInfoByWorkstationId(@Param("workstationId") int workstationId);
+
+    // 鑾峰彇鎬绘暟閲�
+    @Select("SELECT total_quantity FROM down_workstation WHERE workstation_id = #{workstationId}")
+    int getTotalQuantity(@Param("workstationId") int workstationId);
+
+    // 鑾峰彇钀芥灦鏁伴噺
+    @Select("SELECT racks_number FROM down_workstation WHERE workstation_id = #{workstationId}")
+    int getRacksNumber(@Param("workstationId") int workstationId);
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownGlassLogic.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownGlassLogic.java
new file mode 100644
index 0000000..b7cd761
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownGlassLogic.java
@@ -0,0 +1,156 @@
+package com.mes.downworkstation.service;
+
+import com.mes.common.PLCAutoMes;
+import com.mes.downglassinfo.entity.DownGlassInfo;
+import com.mes.downglassinfo.service.DownGlassInfoService;
+import com.mes.downstorage.entity.DownStorageCageDetails;
+import com.mes.downworkstation.entity.DownWorkstation;
+import com.mes.device.PlcParameterObject;
+import com.mes.downglassinfo.mapper.DownGlassInfoMapper;
+import com.mes.downworkstation.mapper.DownWorkstationMapper;
+import com.mes.tools.WebSocketServer;
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Data
+@Service
+public class DownGlassLogic {
+    @Autowired
+    private DownGlassInfo downGlassInfo;
+    private DownWorkstation downWorkstation;
+    private DownGlassInfoMapper downGlassInfoMapper;
+    private DownGlassInfoService downGlassInfoService;
+    private DownWorkstationMapper downWorkstationMapper;
+    PlcParameterObject plcread = PLCAutoMes.PlcReadObject;
+    /**
+     * // 鏈烘鎵�1PLC璇锋眰瀛�
+     */
+    String robot1PLCrequestword = plcread.getPlcParameter("A01Position").getValue();
+    /**
+     * // 鏈烘鎵�2PLC璇锋眰瀛�
+     */
+    String robot2PLCrequestword = plcread.getPlcParameter("A01Position").getValue();
+    /**
+     * // 鐜荤拑id
+     */
+    String glassID = plcread.getPlcParameter("A01Position").getValue();
+    String glasswidth = plcread.getPlcParameter("A01Position").getValue();
+    String glassheight = plcread.getPlcParameter("A01Position").getValue();
+    //
+    String glassthickness = plcread.getPlcParameter("A01Position").getValue();
+    String pLcwancheng = plcread.getPlcParameter("A01Position").getValue();
+
+    /**
+     * // 瀛樻斁寰呭鐞嗙殑鐜荤拑淇℃伅
+     */
+    private List<DownGlassInfo> glassList;
+    /**
+     * 瀛樻斁鐜荤拑鏀剧疆鍦ㄧ紦瀛樼涓殑璇︾粏淇℃伅
+     */
+    private List<DownStorageCageDetails> cageDetailsList;
+
+    /**
+     * //褰撲笅鐗囦换鍔¤〃鐘舵�佷负1鏃跺�欏皢鏁版嵁鎻掑叆鍒颁笅鐗囩幓鐠冧俊鎭〃
+     */
+
+    public void insertdownglassinfo() {
+
+
+        downWorkstationMapper = WebSocketServer.applicationContext.getBean(DownWorkstationMapper.class);
+        downGlassInfoService = WebSocketServer.applicationContext.getBean(DownGlassInfoService.class);
+        downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class);
+        List<DownGlassInfo> taskdownGlassInf = downGlassInfoMapper.selectunloadingtaskstate();
+//
+        if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) {
+
+//
+
+
+            for (DownGlassInfo downGlassInfo : taskdownGlassInf) {
+                // 鍒涘缓鏂扮殑 DownGlassInfo 瀵硅薄骞惰缃浉鍏冲睘鎬�
+                DownGlassInfo newdownGlassInfo = new DownGlassInfo();
+
+                newdownGlassInfo.setFlowCardId(downGlassInfo.getFlowCardId());
+                Integer maxSequence = downGlassInfoMapper.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId());
+                // 鍒濆鍖栭『搴忓瓧娈靛��
+                int sequence = maxSequence != null ? maxSequence + 1 : 1;
+
+                newdownGlassInfo.setWidth(downGlassInfo.getWidth());
+                newdownGlassInfo.setHeight(downGlassInfo.getHeight());
+                newdownGlassInfo.setThickness(downGlassInfo.getThickness());
+                newdownGlassInfo.setFilmsid(downGlassInfo.getFilmsid());
+                // 璁剧疆椤哄簭瀛楁鍊�
+                newdownGlassInfo.setSequence(sequence);
+
+                // 鎻掑叆鏁版嵁鍒颁笅鐗囩幓鐠冧俊鎭〃
+                downGlassInfoMapper.insert(newdownGlassInfo);
+                //鎻掑叆鏁版嵁鍒版満姊版墜浠诲姟琛�
+                downWorkstationMapper.insertdownWorkstationtask(newdownGlassInfo);
+                //鏇存柊涓嬬墖浠诲姟琛ㄧ姸鎬佷负0
+                downGlassInfoMapper.updateTaskStateToZero(downGlassInfo.getFlowCardId());
+
+                sequence++; // 閫掑椤哄簭瀛楁鍊�
+
+
+            }
+        }
+    }
+
+
+    /**
+     * //褰撴満姊版墜浠诲姟琛ㄤ腑鐘舵�佷负1锛屽伐浣嶈〃娴佺▼鍗$粦瀹氫簡鏋跺瓙 鏇存柊宸茬粡钀芥灦鏁伴噺锛屽苟涓旀妸涓嬬墖浠诲姟琛ㄧ殑瀵瑰簲璁板綍鍒犳帀
+     */
+
+    public void downWorkstation() {
+
+
+        try {
+            //鏌ヨ涓嬬墖宸ヤ綅琛ㄤ腑鏋跺瓙鏄惁缁戝畾浜嗘祦绋嬪崱鍙� 宸ヤ綅琛ㄥ拰浠诲姟琛ㄤ腑鐘舵�佷负1鐨勬祦绋嬪崱鍙峰拰宸茶惤鏋舵暟閲�
+            List<DownWorkstation> taskdownWorkstation = downWorkstationMapper.selectdownWorkstationstate();
+            if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) {
+                //锛屽鏋滃凡缁忕粦瀹氬垯鏇存柊宸茶惤鏋舵暟閲�,骞朵笖鍒犻櫎涓嬬墖浠诲姟琛ㄤ腑鐨勮褰�
+                for (DownWorkstation downWorkstation : taskdownWorkstation) {
+
+                    //鏇存柊涓嬬墖宸ヤ綅琛ㄤ腑宸茶惤鏋舵暟閲�
+                    downWorkstationMapper.update_racks_number(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1);
+
+                    //鏇存柊鏈烘浠诲姟琛ㄤ腑鐘舵�佷负0
+                    downWorkstationMapper.update_task_state_to_zero(downWorkstation.getFlowCardId());
+                    //鍒犻櫎涓嬬墖浠诲姟琛ㄤ腑鐨勮褰�
+                    downGlassInfoMapper.deletetask(downWorkstation.getFlowCardId());
+
+                }
+            }
+        } catch (Exception e) {
+            // 鎵撳嵃寮傚父淇℃伅
+            e.printStackTrace();
+            // 鎴栬�呭彲浠ヨ繘琛屽叾浠栧紓甯稿鐞嗭紝姣斿璁板綍鏃ュ織鎴栬�呰繑鍥炵壒瀹氱殑閿欒淇℃伅
+        }
+
+
+    }
+
+
+    /**
+     * @param downWorkstation // 缁戝畾娴佺▼鍗″彿鏋跺瓙
+     */
+
+    public void bindingshelf(DownWorkstation downWorkstation) {
+        downWorkstationMapper.updateFlowCardId(downWorkstation);
+    }
+
+
+    /**
+     * @param downWorkstation // 婊℃灦鎷夎蛋 娓呴櫎娴佺▼鍗′俊鎭�
+     */
+
+    public void clearFlowCardId(DownWorkstation downWorkstation) {
+
+        downWorkstationMapper.clearFlowCardId(downWorkstation);
+    }
+
+
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
index 968ca6e..e26331f 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
@@ -3,6 +3,9 @@
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.mes.downworkstation.entity.DownWorkstation;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  *  鏈嶅姟绫�
@@ -13,4 +16,15 @@
  */
 public interface DownWorkstationService extends IService<DownWorkstation> {
 
+    List<DownWorkstation> getoneDownWorkstations();
+
+    List<DownWorkstation> gettwoDownWorkstations();
+
+    List<Map<String, Object>> getflowCardId();
+
+    int getTotalQuantity(int workstationId);
+
+    int getRacksNumber(int workstationId);
+
+    void clearFlowCardId(int workstationId);
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
index 0cedd56..865c54c 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
@@ -1,20 +1,50 @@
 package com.mes.downworkstation.service.impl;
 
-import com.mes.downworkstation.entity.DownWorkstation;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mes.downworkstation.entity.DownWorkstation;
 import com.mes.downworkstation.mapper.DownWorkstationMapper;
 import com.mes.downworkstation.service.DownWorkstationService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-/**
- * <p>
- *  鏈嶅姟瀹炵幇绫�
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
+import java.util.List;
+import java.util.Map;
+
 @Service
 public class DownWorkstationServiceImpl extends ServiceImpl<DownWorkstationMapper, DownWorkstation> implements DownWorkstationService {
 
+    @Autowired
+    private DownWorkstationMapper downWorkstationMapper;
+
+    @Override
+    public List<DownWorkstation> getoneDownWorkstations() {
+        return downWorkstationMapper.getoneDownWorkstations();
+    }
+
+    @Override
+    public List<DownWorkstation> gettwoDownWorkstations() {
+        return downWorkstationMapper.gettwoDownWorkstations();
+    }
+
+    @Override
+    public List<Map<String, Object>> getflowCardId() {
+        return downWorkstationMapper.getflowCardId();
+    }
+
+    @Override
+    public int getTotalQuantity(int workstationId) {
+        Integer totalQuantity = downWorkstationMapper.getTotalQuantity(workstationId);
+        return totalQuantity != null ? totalQuantity : 0;
+    }
+
+    @Override
+    public int getRacksNumber(int workstationId) {
+        Integer racksNumber = downWorkstationMapper.getRacksNumber(workstationId);
+        return racksNumber != null ? racksNumber : 0;
+    }
+
+    @Override
+    public void clearFlowCardId(int workstationId) {
+        downWorkstationMapper.clearFlowCardInfoByWorkstationId(workstationId);
+    }
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/Configuration.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/Configuration.java
new file mode 100644
index 0000000..1f64390
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/Configuration.java
@@ -0,0 +1,48 @@
+package com.mes.tools;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * @author SNG-012
+ *
+ *  Configuration 绫荤敤浜庡姞杞介厤缃枃浠跺苟鎻愪緵璁块棶閰嶇疆椤圭殑鏂规硶銆�
+ */
+public class Configuration {
+
+    /**
+     * // Properties 瀵硅薄锛岀敤浜庡瓨鍌ㄩ厤缃枃浠朵腑鐨勯敭鍊煎銆�
+     */
+    private Properties properties;
+
+    /**
+     * @param fileName
+     * @throws IOException
+     *     // 鏋勯�犲嚱鏁帮紝鏍规嵁浼犲叆鐨勬枃浠跺悕鍔犺浇閰嶇疆鏂囦欢銆�
+     */
+
+    public Configuration(String fileName) throws IOException {
+        // 浣跨敤绫诲姞杞藉櫒鑾峰彇璧勬簮鏂囦欢鐨勮緭鍏ユ祦銆�
+        InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName);
+        // 濡傛灉杈撳叆娴佷负null锛岃〃绀烘湭鎵惧埌鏂囦欢锛屾姏鍑篎ileNotFoundException銆�
+        if (inputStream == null) {
+            throw new FileNotFoundException("Property file '" + fileName + "' not found in the classpath");
+        }
+        // 瀹炰緥鍖朠roperties瀵硅薄銆�
+        properties = new Properties();
+        // 浠庤緭鍏ユ祦鍔犺浇閰嶇疆椤广��
+        properties.load(inputStream);
+    }
+
+    /**
+     * @param key
+     * @return
+     *     // 鏍规嵁閰嶇疆椤圭殑閿幏鍙栧叾瀵瑰簲鐨勫�笺��
+     */
+
+    public String getProperty(String key) {
+        return properties.getProperty(key);
+    }
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/ExcelToJsonConverter.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/ExcelToJsonConverter.java
new file mode 100644
index 0000000..e1ad35c
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/ExcelToJsonConverter.java
@@ -0,0 +1,108 @@
+package com.mes.tools;
+
+import com.google.gson.Gson;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+public class ExcelToJsonConverter {
+
+    public static void main(String[] args) {
+        String excelFilePath = "src/main/resources/JsonFile/alarm.xlsx";
+        String sheetName = "Sheet1";
+        int addressColumnIndex = 0;
+        int nameColumnIndex = 1;
+
+        //int unitColumnIndex = 2;
+        String outputFilePath = "src/main/resources/JsonFile/PlcAlarm.json";
+
+        try (Workbook workbook = new XSSFWorkbook(new FileInputStream(excelFilePath))) {
+            Sheet sheet = workbook.getSheet(sheetName);
+
+            List<LinkedHashMap<String, Object>> jsonList = new ArrayList<>();
+
+            Iterator<Row> rowIterator = sheet.iterator();
+            // Skip the header row
+            if (rowIterator.hasNext()) {
+                rowIterator.next();
+            }
+
+            int plcAddressLength = 0; // 璁板綍鎵�鏈� addressLenght 鐨勫拰
+            int addressIndex = 0; // 鑷鐨勫湴鍧�绱㈠紩
+            while (rowIterator.hasNext()) {
+                Row row = rowIterator.next();
+
+                Cell nameCell = row.getCell(nameColumnIndex);
+                Cell addressCell = row.getCell(addressColumnIndex);
+              //  Cell unitCell = row.getCell(unitColumnIndex);
+
+                String name = nameCell.getStringCellValue();
+                String address = addressCell.getStringCellValue();
+               // String unit = unitCell.getStringCellValue();
+
+              //  String addressIndex = extractAddressIndex(address);
+
+                LinkedHashMap<String, Object> jsonObject = new LinkedHashMap<>();
+                jsonObject.put("codeId", name);
+                jsonObject.put("addressIndex", addressIndex);
+
+                int addressLength = 0;
+                if (address.contains("~")) {
+                    addressLength = 14;
+                } else {
+                    addressLength = 2;
+                }
+               // jsonObject.put("addressLenght", String.valueOf(addressLength));
+
+                //jsonObject.put("unit", unit);
+
+                plcAddressLength += addressLength;
+
+                jsonList.add(jsonObject);
+                addressIndex++;
+            }
+
+            LinkedHashMap<String, Object> resultObject = new LinkedHashMap<>();
+            resultObject.put("plcAddressBegin", "DB100.0");
+            resultObject.put("plcAddressLenght", String.valueOf(plcAddressLength));
+           // resultObject.put("dataType", "word");
+            resultObject.put("dataType", "bit");
+            resultObject.put("parameteInfor", jsonList);
+
+            Gson gson = new Gson();
+            String jsonOutput = gson.toJson(resultObject);
+
+            try (FileWriter fileWriter = new FileWriter(outputFilePath)) {
+                fileWriter.write(jsonOutput);
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+
+
+    private static String extractAddressIndex(String address) {
+        // Assuming the address format is "DB103.DBW0" or "DB103.DBB100~DBB113"
+        if (address.startsWith("DB") && address.contains(".DBW")) {
+            int startIndex = address.indexOf(".DBW") + 4;
+            int endIndex = address.length();
+            return address.substring(startIndex, endIndex);
+        } else if (address.startsWith("DB") && address.contains(".DBB")) {
+            int startIndex2 = address.indexOf(".DBB") + 4;
+            int endIndex2 = address.indexOf("~");
+            return address.substring(startIndex2, endIndex2);
+        }
+        return "";
+    }
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/InitUtil.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/InitUtil.java
new file mode 100644
index 0000000..7cd4205
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/InitUtil.java
@@ -0,0 +1,128 @@
+package com.mes.tools;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import com.mes.device.PlcBitInfo;
+import com.mes.device.PlcBitObject;
+import com.mes.device.PlcParameterInfo;
+import com.mes.device.PlcParameterObject;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class InitUtil {
+    //鍒濆鍖杦ord
+    public static PlcParameterObject initword(String jsonFilePath) {
+        try {
+            FileReader fileReader = new FileReader(jsonFilePath);
+            BufferedReader bufferedReader = new BufferedReader(fileReader);
+
+            StringBuilder content = new StringBuilder();
+            String line;
+
+            while ((line = bufferedReader.readLine()) != null) {
+                content.append(line);
+            }
+
+            bufferedReader.close();
+            fileReader.close();
+
+            JSONObject jsonfileobj = new JSONObject(content.toString());
+            JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
+            PlcParameterObject plcParameterObject = new PlcParameterObject();
+            plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//璁剧疆璧峰浣嶅湴鍧�
+            plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//璁剧疆鍦板潃闀垮害
+
+            for (int i = 0; i < jsonArray.size(); i++) {
+                JSONObject parameterObj = jsonArray.getJSONObject(i);
+                PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //鍙傛暟瀹炰緥
+                String codeid = parameterObj.getStr("codeId");
+                plcParameterInfo.setCodeId(codeid);
+                plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
+                //plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio")));
+                plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght")));
+                plcParameterInfo.setUnit(parameterObj.getStr("unit"));
+                plcParameterObject.addPlcParameter(plcParameterInfo);
+            }
+           // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02};
+           // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
+           // plcParameterObject.setPlcParameterList(getplcvlues);
+
+            return plcParameterObject;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    //鍒濆鍖朾it
+    public static PlcBitObject initbit(String jsonFilePath) {
+        PlcBitObject plcBitObject = new PlcBitObject();
+
+        try {
+            FileReader fileReader = new FileReader(jsonFilePath);
+            BufferedReader bufferedReader = new BufferedReader(fileReader);
+
+            StringBuilder content = new StringBuilder();
+            String line;
+
+            while ((line = bufferedReader.readLine()) != null) {
+                content.append(line);
+            }
+
+            bufferedReader.close();
+            fileReader.close();
+
+            JSONObject jsonfileobj = new JSONObject(content.toString());
+            JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
+            plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//璁剧疆璧峰浣嶅湴鍧�
+            plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//璁剧疆鍦板潃闀垮害
+
+            for (int i = 0; i < jsonArray.size(); i++) {
+                JSONObject parameterObj = jsonArray.getJSONObject(i);
+
+                PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //鍙傛暟瀹炰緥
+                String codeid = parameterObj.getStr("codeId");
+                plcBitInfo.setCodeId(codeid);
+                plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
+
+                plcBitObject.addPlcBit(plcBitInfo);
+            }
+            System.out.println("");
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+           //Boolean[] values1 = { false, true, true, true, false, false, true, false,
+          //  false, true ,true };
+   // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1));
+
+//        List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength());
+//        plcBitObject.setPlcBitList(getplcvlues);
+        return plcBitObject;
+    }
+
+//
+    public static void readAndUpdateBitValues(PlcBitObject plcBitObject) {
+
+        Boolean[] values1 = { false, true, true, true, false, false, true, false,
+          false, true ,true };
+         List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1));
+        //List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength());
+        plcBitObject.setPlcBitList(getplcvlues);
+    }
+
+
+    public static void readAndUpdateWordValues(PlcParameterObject plcParameterObject) {
+
+         byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03,0x03};
+       // byte[] getplcvlues = MockS7PLC.getInstance().readByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
+        plcParameterObject.setPlcParameterList(getplcvlues);
+    }
+
+
+
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/TokenTools.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/TokenTools.java
new file mode 100644
index 0000000..1cb6dc2
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/TokenTools.java
@@ -0,0 +1,21 @@
+package com.mes.tools;
+
+import cn.hutool.core.date.DateUtil;
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.algorithms.Algorithm;
+
+import java.util.Date;
+
+public class TokenTools {
+
+    /**
+     * 鐢熸垚token
+     * @return
+     */
+    public  static String getToken(String userid,String sign){
+        return JWT.create().withAudience(userid) // 灏� user id 淇濆瓨鍒� token 閲岄潰,浣滀负杞借嵎
+                .withExpiresAt(DateUtil.offsetHour(new Date(), 24)) // 2灏忔椂鍚巘oken杩囨湡
+                .sign(Algorithm.HMAC256(sign)); // 浠� password 浣滀负 token 鐨勫瘑閽�
+
+    }
+}
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
new file mode 100644
index 0000000..13a3bde
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketServer.java
@@ -0,0 +1,164 @@
+package com.mes.tools;
+
+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 {
+
+    // @Autowired
+    // HomeMapper homeMapper;
+
+    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/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/mapper/GlassInfoMapper.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/mapper/GlassInfoMapper.java
index 6acb270..f47d7bc 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/mapper/GlassInfoMapper.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/mapper/GlassInfoMapper.java
@@ -1,7 +1,14 @@
 package com.mes.uppattenusage.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mes.downglassinfo.entity.DownGlassInfo;
 import com.mes.uppattenusage.entity.GlassInfo;
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +20,11 @@
  */
 public interface GlassInfoMapper extends BaseMapper<GlassInfo> {
 
+
+    @Select("SELECT COUNT(*) FROM glass_info WHERE flowcard_id = #{flowCardId}")
+    int getGlassInfoCountByFlowCardId(@Param("flowCardId") String flowCardId);
+
+    @Update("UPDATE down_workstation SET  total_quantity = #{glassInfoCount},flow_card_id=#{flowCardId} WHERE workstation_id = #{workstationId}")
+    int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount,@Param("workstationId")int workstationId);
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/GlassInfoService.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/GlassInfoService.java
index 8e380d7..57215a7 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/GlassInfoService.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/GlassInfoService.java
@@ -13,4 +13,7 @@
  */
 public interface GlassInfoService extends IService<GlassInfo> {
 
+    int getGlassInfoCountByFlowCardId(String flowCardId);
+
+    void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId);
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/GlassInfoServiceImpl.java
index ec38a54..5c1a9b6 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/GlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/GlassInfoServiceImpl.java
@@ -4,6 +4,7 @@
 import com.mes.uppattenusage.entity.GlassInfo;
 import com.mes.uppattenusage.mapper.GlassInfoMapper;
 import com.mes.uppattenusage.service.GlassInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 /**
@@ -17,4 +18,25 @@
 @Service
 public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService {
 
+    private GlassInfoMapper glassInfoMapper;
+
+    @Autowired
+    public GlassInfoServiceImpl(GlassInfoMapper glassInfoMapper) {
+        this.glassInfoMapper = glassInfoMapper;
+    }
+
+    @Override
+    public int getGlassInfoCountByFlowCardId(String flowCardId) {
+        return glassInfoMapper.getGlassInfoCountByFlowCardId(flowCardId);
+    }
+
+    @Override
+    public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) {
+        int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId);
+        if (rowsAffected > 0) {
+            System.out.println("鏇存柊鏋跺瓙涓婃祦绋嬪崱 ID 鍜屾暟閲忔垚鍔�");
+        } else {
+            System.out.println("鏇存柊鏋跺瓙涓婃祦绋嬪崱 ID 鍜屾暟閲忓け璐�");
+        }
+    }
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcAlarm.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcAlarm.json
new file mode 100644
index 0000000..a840092
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcAlarm.json
@@ -0,0 +1,371 @@
+{
+  "plcAddressBegin": "DB104.0.0",
+  "plcAddressLenght": "91",
+  "dataType": "bit",
+  "parameteInfor": [
+    {
+      "codeId": "D01VFDerror",
+      "addressIndex": 0
+    },
+    {
+      "codeId": "D02VFDerror",
+      "addressIndex": 1
+    },
+    {
+      "codeId": "D03VFDerror",
+      "addressIndex": 2
+    },
+    {
+      "codeId": "D04VFDerror",
+      "addressIndex": 3
+    },
+    {
+      "codeId": "D05VFDerror",
+      "addressIndex": 4
+    },
+    {
+      "codeId": "D06VFDerror",
+      "addressIndex": 5
+    },
+    {
+      "codeId": "B01VFDerror",
+      "addressIndex": 6
+    },
+    {
+      "codeId": "B02VFDerror",
+      "addressIndex": 7
+    },
+    {
+      "codeId": "A01VFDerror",
+      "addressIndex": 8
+    },
+    {
+      "codeId": "A02VFDerror",
+      "addressIndex": 9
+    },
+    {
+      "codeId": "A01servoturnerror",
+      "addressIndex": 10
+    },
+    {
+      "codeId": "A02servoturnerror",
+      "addressIndex": 11
+    },
+    {
+      "codeId": "A01servotravelerror",
+      "addressIndex": 12
+    },
+    {
+      "codeId": "A02servotravelerror",
+      "addressIndex": 13
+    },
+    {
+      "codeId": "B01servotravelerror",
+      "addressIndex": 14
+    },
+    {
+      "codeId": "B02servotravelerror",
+      "addressIndex": 15
+    },
+    {
+      "codeId": "D01DECerror",
+      "addressIndex": 16
+    },
+    {
+      "codeId": "D01poserror",
+      "addressIndex": 17
+    },
+    {
+      "codeId": "D02DECerror",
+      "addressIndex": 18
+    },
+    {
+      "codeId": "D02poserror",
+      "addressIndex": 19
+    },
+    {
+      "codeId": "D03DECerror",
+      "addressIndex": 20
+    },
+    {
+      "codeId": "D03poserror",
+      "addressIndex": 21
+    },
+    {
+      "codeId": "D04DECerror",
+      "addressIndex": 22
+    },
+    {
+      "codeId": "D04poserror",
+      "addressIndex": 23
+    },
+    {
+      "codeId": "D05DECerror",
+      "addressIndex": 24
+    },
+    {
+      "codeId": "D05poserror",
+      "addressIndex": 25
+    },
+    {
+      "codeId": "D06DECerror",
+      "addressIndex": 26
+    },
+    {
+      "codeId": "D06poserror",
+      "addressIndex": 27
+    },
+    {
+      "codeId": "A01DECerror",
+      "addressIndex": 28
+    },
+    {
+      "codeId": "A01poserror",
+      "addressIndex": 29
+    },
+    {
+      "codeId": "A02DECerror",
+      "addressIndex": 30
+    },
+    {
+      "codeId": "A02poserror",
+      "addressIndex": 31
+    },
+    {
+      "codeId": "B01INDECerror",
+      "addressIndex": 32
+    },
+    {
+      "codeId": "B01INposerror",
+      "addressIndex": 33
+    },
+    {
+      "codeId": "B01OUTDECerror",
+      "addressIndex": 34
+    },
+    {
+      "codeId": "B01OUTposerror",
+      "addressIndex": 35
+    },
+    {
+      "codeId": "B02INDECerror",
+      "addressIndex": 36
+    },
+    {
+      "codeId": "B02INposerror",
+      "addressIndex": 37
+    },
+    {
+      "codeId": "B02OUTDECerror",
+      "addressIndex": 38
+    },
+    {
+      "codeId": "B02OUTposerror",
+      "addressIndex": 39
+    },
+    {
+      "codeId": "D01Scanglassexceedinglimit",
+      "addressIndex": 40
+    },
+    {
+      "codeId": "emergencystopalarm",
+      "addressIndex": 41
+    },
+    {
+      "codeId": "Moreglassthanknown",
+      "addressIndex": 42
+    },
+    {
+      "codeId": "lessglassthanknown",
+      "addressIndex": 43
+    },
+    {
+      "codeId": "D01conveyortimeoutalarm",
+      "addressIndex": 44
+    },
+    {
+      "codeId": "D02conveyortimeoutalarm",
+      "addressIndex": 45
+    },
+    {
+      "codeId": "D03conveyortimeoutalarm",
+      "addressIndex": 46
+    },
+    {
+      "codeId": "D04conveyortimeoutalarm",
+      "addressIndex": 47
+    },
+    {
+      "codeId": "D05conveyortimeoutalarm",
+      "addressIndex": 48
+    },
+    {
+      "codeId": "D06conveyortimeoutalarm",
+      "addressIndex": 49
+    },
+    {
+      "codeId": "A01conveyortimeoutalarm",
+      "addressIndex": 50
+    },
+    {
+      "codeId": "A02conveyortimeoutalarm",
+      "addressIndex": 51
+    },
+    {
+      "codeId": "B01conveyortimeoutalarm",
+      "addressIndex": 52
+    },
+    {
+      "codeId": "B02conveyortimeoutalarm",
+      "addressIndex": 53
+    },
+    {
+      "codeId": "A01conveyorLeftsafetyalarm",
+      "addressIndex": 54
+    },
+    {
+      "codeId": "A01conveyorrightsafetyalarm",
+      "addressIndex": 55
+    },
+    {
+      "codeId": "A02conveyorLeftsafetyalarm",
+      "addressIndex": 56
+    },
+    {
+      "codeId": "A02conveyorrightsafetyalarm",
+      "addressIndex": 57
+    },
+    {
+      "codeId": "1#buffersafetyalarm",
+      "addressIndex": 58
+    },
+    {
+      "codeId": "2#buffersafetyalarm",
+      "addressIndex": 59
+    },
+    {
+      "codeId": "3#buffersafetyalarm",
+      "addressIndex": 60
+    },
+    {
+      "codeId": "4#buffersafetyalarm",
+      "addressIndex": 61
+    },
+    {
+      "codeId": "A01.SRrightinposerror",
+      "addressIndex": 62
+    },
+    {
+      "codeId": "A02.SRleftinposerror",
+      "addressIndex": 63
+    },
+    {
+      "codeId": "B01.SRleftinposerror",
+      "addressIndex": 64
+    },
+    {
+      "codeId": "B01.SRleftdecerror",
+      "addressIndex": 65
+    },
+    {
+      "codeId": "B01.SRrightdecerror",
+      "addressIndex": 66
+    },
+    {
+      "codeId": "B01.SRrightinposerror",
+      "addressIndex": 67
+    },
+    {
+      "codeId": "B02.SRleftinposerror",
+      "addressIndex": 68
+    },
+    {
+      "codeId": "B02.SRleftdecerror",
+      "addressIndex": 69
+    },
+    {
+      "codeId": "B02.SRrightdecerror",
+      "addressIndex": 70
+    },
+    {
+      "codeId": "B02.SRrightinposerror",
+      "addressIndex": 71
+    },
+    {
+      "codeId": "A01servoturnhomed",
+      "addressIndex": 72
+    },
+    {
+      "codeId": "A02servoturnhomed",
+      "addressIndex": 73
+    },
+    {
+      "codeId": "A01servotravelhomed",
+      "addressIndex": 74
+    },
+    {
+      "codeId": "A02servotravelhomed",
+      "addressIndex": 75
+    },
+    {
+      "codeId": "B01servotravelhomed",
+      "addressIndex": 76
+    },
+    {
+      "codeId": "B02servotravelhomed",
+      "addressIndex": 77
+    },
+    {
+      "codeId": "resetDelay",
+      "addressIndex": 78
+    },
+    {
+      "codeId": "A01travelNegativelimit",
+      "addressIndex": 79
+    },
+    {
+      "codeId": "A01travelPositivelimit",
+      "addressIndex": 80
+    },
+    {
+      "codeId": "A01turnuplimit",
+      "addressIndex": 81
+    },
+    {
+      "codeId": "A01turndownlimit",
+      "addressIndex": 82
+    },
+    {
+      "codeId": "A02travelNegativelimit",
+      "addressIndex": 83
+    },
+    {
+      "codeId": "A02travelPositivelimit",
+      "addressIndex": 84
+    },
+    {
+      "codeId": "A02turnuplimit",
+      "addressIndex": 85
+    },
+    {
+      "codeId": "A02turndownlimit",
+      "addressIndex": 86
+    },
+    {
+      "codeId": "B01travelNegativelimit",
+      "addressIndex": 87
+    },
+    {
+      "codeId": "B01travelPositivelimit",
+      "addressIndex": 88
+    },
+    {
+      "codeId": "B02travelNegativelimit",
+      "addressIndex": 89
+    },
+    {
+      "codeId": "B02travelPositivelimit",
+      "addressIndex": 90
+    }
+  ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcMes.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcMes.json
new file mode 100644
index 0000000..ab5d4cd
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcMes.json
@@ -0,0 +1,50 @@
+{
+   "plcAddressBegin":"DB105.0",
+   "plcAddressLenght":"12",
+   "dataType":"word",
+   "parameteInfor":[
+      {
+         "codeId": "OutActivate",
+         "addressIndex":"0",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+          "codeId": "Addgoal",
+          "addressIndex":"2",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"      
+       },
+       {
+          "codeId": "AddLength",
+          "addressIndex":"4",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"       
+       },
+       {
+          "codeId": "AddWidth",
+          "addressIndex":"6",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "AddCount",
+          "addressIndex":"8",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "OutStart",
+          "addressIndex":"10",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       }
+
+   ]
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcParameter.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcParameter.json
new file mode 100644
index 0000000..afbe090
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcParameter.json
@@ -0,0 +1,610 @@
+{
+   "plcAddressBegin":"DB100.0",
+   "plcAddressLenght":"198",
+   "dataType":"word",
+   "parameteInfor":[
+      {
+         "codeId": "conveyorVelocity(Max)",
+         "addressIndex":"0",
+         "addressLenght":"2",
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+          "codeId": "conveyorVelocity(AutoFAST)",
+          "addressIndex":"2",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"      
+       },
+       {
+          "codeId": "conveyorVelocity(AutoSLOW)",
+          "addressIndex":"4",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"       
+       },
+       {
+          "codeId": "conveyorVelocity(Manual)",
+          "addressIndex":"6",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "A01A02TURNJOGVelocity",
+          "addressIndex":"8",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "A01A02TRAVELJOGVelocity",
+          "addressIndex":"10",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "B01B02TRAVELJOGVelocity",
+          "addressIndex":"12",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "A01A02TURNPOSVelocityAUTO",
+          "addressIndex":"14",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "A01TURNPOSVelocitymanual",
+          "addressIndex":"16",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+         "codeId": "A01A02TRAVELPOSVelocityAUTO",
+         "addressIndex":"18",
+         "addressLenght":"2",
+         "ratio":"1",
+         "unit":"mm/S"
+      },
+     {
+       "codeId": "A01TRAVELPOSVelocitymanual",
+       "addressIndex":"20",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm/S"
+     },
+     {
+       "codeId": "B01B02TRAVELPOSVelocityAUTO",
+       "addressIndex":"22",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm/S"
+     },
+     {
+       "codeId": "B01TRAVELPOSVelocitymanual",
+       "addressIndex":"24",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm/S"
+     },
+     {
+       "codeId": "A01A02conveyorVelocity(Max)",
+       "addressIndex":"26",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "A01A02conveyorVelocity(AutoFAST)",
+       "addressIndex":"28",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "A01A02conveyorVelocity(AutoSLOW)",
+       "addressIndex":"30",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "B01B02conveyorVelocity(Manual)",
+       "addressIndex":"32",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "B01B02conveyorVelocity(Max)",
+       "addressIndex":"34",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "B01B02conveyorVelocity(AutoFAST)",
+       "addressIndex":"36",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "B01B02conveyorVelocity(AutoSLOW)",
+       "addressIndex":"38",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "B01B02conveyorVelocity(Manual)",
+       "addressIndex":"40",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"m/min"
+     },
+     {
+       "codeId": "gridspacing",
+       "addressIndex":"42",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01Spliceaddresssetting",
+       "addressIndex":"44",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A02Spliceaddresssetting",
+       "addressIndex":"46",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A011#gridaddress",
+       "addressIndex":"48",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0122#gridaddress",
+       "addressIndex":"50",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0143#gridaddress",
+       "addressIndex":"52",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0164#gridaddress",
+       "addressIndex":"54",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0185#gridaddress",
+       "addressIndex":"56",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01106#gridaddress",
+       "addressIndex":"58",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01127#gridaddress",
+       "addressIndex":"60",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01148#gridaddress",
+       "addressIndex":"62",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01169#gridaddress",
+       "addressIndex":"64",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01190#gridaddress",
+       "addressIndex":"66",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A021#gridaddress",
+       "addressIndex":"68",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0222#gridaddress",
+       "addressIndex":"70",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0243#gridaddress",
+       "addressIndex":"72",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0264#gridaddress",
+       "addressIndex":"74",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A0285#gridaddress",
+       "addressIndex":"76",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A02106#gridaddress",
+       "addressIndex":"78",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A02127#gridaddress",
+       "addressIndex":"80",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A02148#gridaddress",
+       "addressIndex":"82",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A02169#gridaddress",
+       "addressIndex":"84",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A02190#gridaddress",
+       "addressIndex":"86",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B011#gridaddress",
+       "addressIndex":"88",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B0122#gridaddress",
+       "addressIndex":"90",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B0143#gridaddress",
+       "addressIndex":"92",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B0164#gridaddress",
+       "addressIndex":"94",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B0185#gridaddress",
+       "addressIndex":"96",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B02106#gridaddress",
+       "addressIndex":"98",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B02127#gridaddress",
+       "addressIndex":"100",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B02148#gridaddress",
+       "addressIndex":"102",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B02169#gridaddress",
+       "addressIndex":"104",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "B02190#gridaddress",
+       "addressIndex":"106",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"mm"
+     },
+     {
+       "codeId": "A01Targetgrid(Manual)",
+       "addressIndex":"108",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": " A02Targetgrid(Manual)",
+       "addressIndex":"110",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "B01Targetgrid(Manual)",
+       "addressIndex":"112",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "B02Targetgrid(Manual)",
+       "addressIndex":"114",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "A01turnTargetAngle(Manual)",
+       "addressIndex":"116",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A02turnTargetAngle(Manual)",
+       "addressIndex":"118",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A01turnAngle1",
+       "addressIndex":"120",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A01turnAngle2",
+       "addressIndex":"122",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A01turnAngle3",
+       "addressIndex":"124",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A01turnAngle4",
+       "addressIndex":"126",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A02turnAngle1",
+       "addressIndex":"128",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A02turnAngle2",
+       "addressIndex":"130",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A02turnAngle3",
+       "addressIndex":"132",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "A02turnAngle4",
+       "addressIndex":"134",
+       "addressLenght":"2",
+       "ratio":"1",
+       "unit":"掳"
+     },
+     {
+       "codeId": "Minimumglasslength",
+       "addressIndex":"136",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Minimumglassheight",
+       "addressIndex":"138",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Maximumglasslength",
+       "addressIndex":"140",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Maximumglassheight",
+       "addressIndex":"142",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "A01cellsGlassNum",
+       "addressIndex":"144",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "A02cellsGlassNum",
+       "addressIndex":"146",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "A01ID",
+       "addressIndex":"148",
+       "addressLenght":"14",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "A02ID",
+       "addressIndex":"162",
+       "addressLenght":"14",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "A02TRAVELPOSVelocitymanual",
+       "addressIndex":"176",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "B02TRAVELPOSVelocitymanual",
+       "addressIndex":"178",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Startingpositionofthefeedca",
+       "addressIndex":"180",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Targetpositionofthefeedcar",
+       "addressIndex":"182",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Lengthofincomingglass",
+       "addressIndex":"184",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Widthofincomingglass",
+       "addressIndex":"186",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     },
+     {
+       "codeId": "Startingpositionoftheexitcar",
+       "addressIndex":"188",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     }, {
+       "codeId": "Exitcartargetposition",
+       "addressIndex":"190",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     }
+     , {
+       "codeId": "A02TURNPOSVelocitymanual",
+       "addressIndex":"192",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     }
+     , {
+       "codeId": "A01delayTime",
+       "addressIndex":"194",
+       "addressLenght":"2",
+       "ratio":"1"
+
+     }
+
+
+   ]
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcRead.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcRead.json
new file mode 100644
index 0000000..f3ebb33
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcRead.json
@@ -0,0 +1,195 @@
+{
+   "plcAddressBegin": "DB106.0",
+   "plcAddressLenght": "66",
+   "dataType": "word",
+   "parameteInfor": [{
+         "codeId": "A01Position",
+         "addressIndex": "0",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A01FlipPosition",
+         "addressIndex": "2",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A01QuestStartPosition",
+         "addressIndex": "4",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A01EndPosition",
+         "addressIndex": "6",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "FeedCarStatus",
+         "addressIndex": "8",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A02QuestOver",
+         "addressIndex": "10",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A02Position",
+         "addressIndex": "12",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A02FlipPosition",
+         "addressIndex": "14",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A02QuestStartPosition",
+         "addressIndex": "16",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A02EndPosition",
+         "addressIndex": "18",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "ExitCarStatus",
+         "addressIndex": "20",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "A02QuestOver",
+         "addressIndex": "22",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "FeedRequest",
+         "addressIndex": "24",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "FeedID",
+         "addressIndex": "26",
+         "addressLenght":"14", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B01Position",
+         "addressIndex": "40",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B01QuestPosition",
+         "addressIndex": "42",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B01CurrentTaskMode",
+         "addressIndex": "44",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B01CarStatus",
+         "addressIndex": "46",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B01CarTaskStatus",
+         "addressIndex": "48",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B02Position",
+         "addressIndex": "50",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B02CarCurrentTask",
+         "addressIndex": "52",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B02CurrentTaskMode",
+         "addressIndex": "54",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B02CarStatus",
+         "addressIndex": "56",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B02CarSaskStatus",
+         "addressIndex": "58",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B01CompleteTheReport",
+         "addressIndex": "60",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "B02CompleteTheReport",
+         "addressIndex": "62",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+         "codeId": "OutRequest",
+         "addressIndex": "64",
+         "addressLenght":"2", 
+         "ratio":"1",
+         "unit":"m/min"    
+      }
+   ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcSign.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcSign.json
new file mode 100644
index 0000000..8f9295a
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcSign.json
@@ -0,0 +1,460 @@
+{
+  "plcAddressBegin": "DB102.0.0",
+  "plcAddressLenght": "112",
+  "dataType": "bit",
+  "parameteInfor": [
+    {
+      "codeId": "D01.SRdec",
+      "addressIndex": 0
+    },
+    {
+      "codeId": "D01.SRinpos",
+      "addressIndex": 1
+    },
+    {
+      "codeId": "D02.SRdec",
+      "addressIndex": 2
+    },
+    {
+      "codeId": "D02.SRinpos",
+      "addressIndex": 3
+    },
+    {
+      "codeId": "D03.SRinto",
+      "addressIndex": 4
+    },
+    {
+      "codeId": "D03.SRdec",
+      "addressIndex": 5
+    },
+    {
+      "codeId": "D03.SRinpos",
+      "addressIndex": 6
+    },
+    {
+      "codeId": "D04.SRdec",
+      "addressIndex": 7
+    },
+    {
+      "codeId": "D04.SRinpos",
+      "addressIndex": 8
+    },
+    {
+      "codeId": "D05.SRdec",
+      "addressIndex": 9
+    },
+    {
+      "codeId": "D05.SRinpos",
+      "addressIndex": 10
+    },
+    {
+      "codeId": "D06.SRdec",
+      "addressIndex": 11
+    },
+    {
+      "codeId": "D06.SRinpos",
+      "addressIndex": 12
+    },
+    {
+      "codeId": "B01.SRindec",
+      "addressIndex": 13
+    },
+    {
+      "codeId": "B01.SRininpos",
+      "addressIndex": 14
+    },
+    {
+      "codeId": "B01.SRoutdec",
+      "addressIndex": 15
+    },
+    {
+      "codeId": "B01.SRoutinpos",
+      "addressIndex": 16
+    },
+    {
+      "codeId": "B01.SRturnon",
+      "addressIndex": 17
+    },
+    {
+      "codeId": "B01.SRturnoff",
+      "addressIndex": 18
+    },
+    {
+      "codeId": "B01.SRup",
+      "addressIndex": 19
+    },
+    {
+      "codeId": "B01.SRdown",
+      "addressIndex": 20
+    },
+    {
+      "codeId": "B02.SRoutdec",
+      "addressIndex": 21
+    },
+    {
+      "codeId": "B02.SRoutinpos",
+      "addressIndex": 22
+    },
+    {
+      "codeId": "B02.SRindec",
+      "addressIndex": 23
+    },
+    {
+      "codeId": "B02.SRininpos",
+      "addressIndex": 24
+    },
+    {
+      "codeId": "B02.SRturnon",
+      "addressIndex": 25
+    },
+    {
+      "codeId": "B02.SRturnoff",
+      "addressIndex": 26
+    },
+    {
+      "codeId": "B02.SRup",
+      "addressIndex": 27
+    },
+    {
+      "codeId": "B02.SRdown",
+      "addressIndex": 28
+    },
+    {
+      "codeId": "B01.SRinsafety",
+      "addressIndex": 29
+    },
+    {
+      "codeId": "B01.SRoutsafety",
+      "addressIndex": 30
+    },
+    {
+      "codeId": "B02.SRinsafety",
+      "addressIndex": 31
+    },
+    {
+      "codeId": "SB.start(+)",
+      "addressIndex": 32
+    },
+    {
+      "codeId": "SB.stop(-)",
+      "addressIndex": 33
+    },
+    {
+      "codeId": "SB.reset",
+      "addressIndex": 34
+    },
+    {
+      "codeId": "SB.auto/manul",
+      "addressIndex": 35
+    },
+    {
+      "codeId": "D01.SB.confirm",
+      "addressIndex": 36
+    },
+    {
+      "codeId": "SB.emg",
+      "addressIndex": 37
+    },
+    {
+      "codeId": "D01.SB.start",
+      "addressIndex": 38
+    },
+    {
+      "codeId": "D06.SB.start",
+      "addressIndex": 39
+    },
+    {
+      "codeId": "B02.SRoutsafety",
+      "addressIndex": 40
+    },
+    {
+      "codeId": "SafetyDoor.requset",
+      "addressIndex": 41
+    },
+    {
+      "codeId": "SafetyDoor.confirm",
+      "addressIndex": 42
+    },
+    {
+      "codeId": "SafetyDoor.reset",
+      "addressIndex": 43
+    },
+    {
+      "codeId": "Sspce",
+      "addressIndex": 44
+    },
+    {
+      "codeId": "Sspce",
+      "addressIndex": 45
+    },
+    {
+      "codeId": "Sspce",
+      "addressIndex": 46
+    },
+    {
+      "codeId": "Sspce",
+      "addressIndex": 47
+    },
+    {
+      "codeId": "A01.SRleftdec",
+      "addressIndex": 48
+    },
+    {
+      "codeId": "A01.SRleftinpos",
+      "addressIndex": 49
+    },
+    {
+      "codeId": "A01.SRleftsafety",
+      "addressIndex": 50
+    },
+    {
+      "codeId": "A01.SRrightdec",
+      "addressIndex": 51
+    },
+    {
+      "codeId": "A01.SRrightinpos",
+      "addressIndex": 52
+    },
+    {
+      "codeId": "A01.SRrightsafety",
+      "addressIndex": 53
+    },
+    {
+      "codeId": "A01.SRturnhome",
+      "addressIndex": 54
+    },
+    {
+      "codeId": "A01.SRturnup",
+      "addressIndex": 55
+    },
+    {
+      "codeId": "A01.SRturndown",
+      "addressIndex": 56
+    },
+    {
+      "codeId": "A01.SRtravelhome",
+      "addressIndex": 57
+    },
+    {
+      "codeId": "A01.SRtravelleftdec",
+      "addressIndex": 58
+    },
+    {
+      "codeId": "A01.SRtravelleftlimit",
+      "addressIndex": 59
+    },
+    {
+      "codeId": "A01.SRtravelrightdec",
+      "addressIndex": 60
+    },
+    {
+      "codeId": "A01.SRtravelrightlimit",
+      "addressIndex": 61
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 62
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 63
+    },
+    {
+      "codeId": "A02.SRleftdec",
+      "addressIndex": 64
+    },
+    {
+      "codeId": "A02.SRleftinpos",
+      "addressIndex": 65
+    },
+    {
+      "codeId": "A02.SRleftsafety",
+      "addressIndex": 66
+    },
+    {
+      "codeId": "A02.SRrightdec",
+      "addressIndex": 67
+    },
+    {
+      "codeId": "A02.SRrightinpos",
+      "addressIndex": 68
+    },
+    {
+      "codeId": "A02.SRrightsafety",
+      "addressIndex": 69
+    },
+    {
+      "codeId": "A02.SRturnhome",
+      "addressIndex": 70
+    },
+    {
+      "codeId": "A02.SRturnup",
+      "addressIndex": 71
+    },
+    {
+      "codeId": "A02.SRturndown",
+      "addressIndex": 72
+    },
+    {
+      "codeId": "A02.SRtravelhome",
+      "addressIndex": 73
+    },
+    {
+      "codeId": "A02.SRtravelleftdec",
+      "addressIndex": 74
+    },
+    {
+      "codeId": "A02.SRtravelleftlimit",
+      "addressIndex": 75
+    },
+    {
+      "codeId": "A02.SRtravelrightdec",
+      "addressIndex": 76
+    },
+    {
+      "codeId": "A02.SRtravelrightlimit",
+      "addressIndex": 77
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 78
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 79
+    },
+    {
+      "codeId": "B01.SRorigin",
+      "addressIndex": 80
+    },
+    {
+      "codeId": "B01.SRleftlimit",
+      "addressIndex": 81
+    },
+    {
+      "codeId": "B01.SRrightlimit",
+      "addressIndex": 82
+    },
+    {
+      "codeId": "B02.SRorigin",
+      "addressIndex": 83
+    },
+    {
+      "codeId": "B02.SRleftlimit",
+      "addressIndex": 84
+    },
+    {
+      "codeId": "B02.SRrightlimit",
+      "addressIndex": 85
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 86
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 87
+    },
+    {
+      "codeId": "LED.red",
+      "addressIndex": 88
+    },
+    {
+      "codeId": "LED.green",
+      "addressIndex": 89
+    },
+    {
+      "codeId": "LED.yellow",
+      "addressIndex": 90
+    },
+    {
+      "codeId": "D01.LED.green",
+      "addressIndex": 91
+    },
+    {
+      "codeId": "D06.LED.green",
+      "addressIndex": 92
+    },
+    {
+      "codeId": "B01.YV.turn",
+      "addressIndex": 93
+    },
+    {
+      "codeId": "B01.YV.updown",
+      "addressIndex": 94
+    },
+    {
+      "codeId": "B01.YV.gassing",
+      "addressIndex": 95
+    },
+    {
+      "codeId": "B02.YV.turn",
+      "addressIndex": 96
+    },
+    {
+      "codeId": "B02.YV.updown",
+      "addressIndex": 97
+    },
+    {
+      "codeId": "B02.YV.gassing",
+      "addressIndex": 98
+    },
+    {
+      "codeId": "SafetyDoor.Led",
+      "addressIndex": 99
+    },
+    {
+      "codeId": "SafetyDoor.open",
+      "addressIndex": 100
+    },
+    {
+      "codeId": "D01SB.confirm",
+      "addressIndex": 101
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 102
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 103
+    },
+    {
+      "codeId": "A01oilPump",
+      "addressIndex": 104
+    },
+    {
+      "codeId": "A01motorCtr",
+      "addressIndex": 105
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 106
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 107
+    },
+    {
+      "codeId": "A02oilPump",
+      "addressIndex": 108
+    },
+    {
+      "codeId": "A02motorCtr",
+      "addressIndex": 109
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 110
+    },
+    {
+      "codeId": "space",
+      "addressIndex": 111
+    }
+    ,
+    {
+      "codeId": "space",
+      "addressIndex": 111
+    }
+  ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcState.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcState.json
new file mode 100644
index 0000000..dfdbaec
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcState.json
@@ -0,0 +1,285 @@
+{
+  "plcAddressBegin": "DB103.0",
+  "plcAddressLenght": "258",
+  "dataType": "word",
+  "parameteInfor": [
+    {
+      "codeId": "D01.State",
+      "addressIndex": "0",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "D02.State",
+      "addressIndex": "2",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B01.State",
+      "addressIndex": "4",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B02.State",
+      "addressIndex": "6",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A01.State",
+      "addressIndex": "8",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02.State",
+      "addressIndex": "10",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "D03.State",
+      "addressIndex": "12",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "D04.State",
+      "addressIndex": "14",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "D05.State",
+      "addressIndex": "16",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "D06.State",
+      "addressIndex": "18",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A01tavelActualPosition",
+      "addressIndex": "20",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A01turnActualangle",
+      "addressIndex": "22",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02tavelActualPosition",
+      "addressIndex": "24",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02turnActualangle",
+      "addressIndex": "26",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B01tavelActualPosition",
+      "addressIndex": "28",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B02tavelActualPosition",
+      "addressIndex": "30",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A01CurrentGrid",
+      "addressIndex": "32",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02CurrentGrid",
+      "addressIndex": "34",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B01CurrentGrid",
+      "addressIndex": "36",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B01TargetGrid",
+      "addressIndex": "38",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B02CurrentGrid",
+      "addressIndex": "40",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B02TargetGrid",
+      "addressIndex": "42",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "D01ID",
+      "addressIndex": "44",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "D02ID",
+      "addressIndex": "58",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "D03ID",
+      "addressIndex": "72",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "D04ID",
+      "addressIndex": "86",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "D05ID",
+      "addressIndex": "100",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "D06ID",
+      "addressIndex": "114",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "A01ID1",
+      "addressIndex": "128",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "A01ID2",
+      "addressIndex": "142",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "A02ID1",
+      "addressIndex": "156",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "A02ID2",
+      "addressIndex": "170",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "B01ID1",
+      "addressIndex": "184",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "B01ID2",
+      "addressIndex": "198",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "B02ID1",
+      "addressIndex": "212",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "B02ID2",
+      "addressIndex": "226",
+      "addressLenght": "14",
+      "unit": ""
+    },
+    {
+      "codeId": "A01conveyorFaultcodes",
+      "addressIndex": "240",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A01turnservoFaultcodes",
+      "addressIndex": "242",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A01travelservoFaultcodes",
+      "addressIndex": "244",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02conveyorFaultcodes",
+      "addressIndex": "246",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02turnservoFaultcodes",
+      "addressIndex": "248",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "A02travelservoFaultcodes",
+      "addressIndex": "250",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B01travelservoFaultcodes",
+      "addressIndex": "252",
+      "addressLenght": "2",
+      "unit": ""
+    },
+    {
+      "codeId": "B02travelservoFaultcodes",
+      "addressIndex": "254",
+      "addressLenght": "2",
+      "unit": ""
+    }
+    ,
+    {
+      "codeId": "Scanningguns",
+      "addressIndex": "256",
+      "addressLenght": "2",
+      "unit": ""
+    }
+    ,
+    {
+      "codeId": "Frameid",
+      "addressIndex": "270",
+      "addressLenght": "2",
+      "unit": ""
+    }
+  ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcTest.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcTest.json
new file mode 100644
index 0000000..263c782
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/PlcTest.json
@@ -0,0 +1,378 @@
+{
+  "plcAddressBegin": "DB101.0.0",
+  "plcAddressLenght": "93",
+  "dataType": "bit",
+  "parameteInfor": [
+    {
+      "codeId": "D01VFDconveyor",
+      "addressIndex": 0
+    },
+    {
+      "codeId": "D02VFDconveyor",
+      "addressIndex": 1
+    },
+    {
+      "codeId": "D03VFDconveyor",
+      "addressIndex": 2
+    },
+    {
+      "codeId": "D04VFDconveyor",
+      "addressIndex": 3
+    },
+    {
+      "codeId": "D05VFDconveyor",
+      "addressIndex": 4
+    },
+    {
+      "codeId": "D06VFDconveyor",
+      "addressIndex": 5
+    },
+    {
+      "codeId": "A01VFDconveyor",
+      "addressIndex": 6
+    },
+    {
+      "codeId": "A02VFDconveyor",
+      "addressIndex": 7
+    },
+    {
+      "codeId": "B01VFDconveyor",
+      "addressIndex": 8
+    },
+    {
+      "codeId": "B02VFDconveyor",
+      "addressIndex": 9
+    },
+    {
+      "codeId": "A01SERVETURN",
+      "addressIndex": 10
+    },
+    {
+      "codeId": "A02SERVETURN",
+      "addressIndex": 11
+    },
+    {
+      "codeId": "A01SERVETRAVEL",
+      "addressIndex": 12
+    },
+    {
+      "codeId": "A02SERVETRAVEL",
+      "addressIndex": 13
+    },
+    {
+      "codeId": "B01SERVETRAVEL",
+      "addressIndex": 14
+    },
+    {
+      "codeId": "B02SERVETRAVEL",
+      "addressIndex": 15
+    },
+    {
+      "codeId": "A01SERVETURNPOS",
+      "addressIndex": 16
+    },
+    {
+      "codeId": "A02SERVETURNPOS",
+      "addressIndex": 17
+    },
+    {
+      "codeId": "A01SERVETRAVELPOS",
+      "addressIndex": 18
+    },
+    {
+      "codeId": "A02SERVETRAVELPOS",
+      "addressIndex": 19
+    },
+    {
+      "codeId": "B01SERVETRAVELPOS",
+      "addressIndex": 20
+    },
+    {
+      "codeId": "B02SERVETRAVELPOS",
+      "addressIndex": 21
+    },
+    {
+      "codeId": "B01YVTURN",
+      "addressIndex": 22
+    },
+    {
+      "codeId": "B01YVUPDOWN",
+      "addressIndex": 23
+    },
+    {
+      "codeId": "B02YVTURN",
+      "addressIndex": 24
+    },
+    {
+      "codeId": "B02YVUPDOWN",
+      "addressIndex": 25
+    },
+    {
+      "codeId": "B01YVGassing",
+      "addressIndex": 26
+    },
+    {
+      "codeId": "B02YVGassing",
+      "addressIndex": 27
+    },
+    {
+      "codeId": "A01VFDconveyorreverse",
+      "addressIndex": 28
+    },
+    {
+      "codeId": "A02VFDconveyorreverse",
+      "addressIndex": 29
+    },
+    {
+      "codeId": "A01SERVETURNreset",
+      "addressIndex": 30
+    },
+    {
+      "codeId": "A01SERVETURNhome",
+      "addressIndex": 31
+    },
+    {
+      "codeId": "A01SERVETRAVELreset",
+      "addressIndex": 32
+    },
+    {
+      "codeId": "A02SERVETURNreset",
+      "addressIndex": 33
+    },
+    {
+      "codeId": "A02SERVETURNhome",
+      "addressIndex": 34
+    },
+    {
+      "codeId": "A02SERVETRAVELreset",
+      "addressIndex": 35
+    },
+    {
+      "codeId": "B01SERVETRAVELreset",
+      "addressIndex": 36
+    },
+    {
+      "codeId": "B01SERVETRAVELhome",
+      "addressIndex": 37
+    },
+    {
+      "codeId": "B02SERVETRAVELreset",
+      "addressIndex": 38
+    },
+    {
+      "codeId": "B02SERVETRAVELhome",
+      "addressIndex": 39
+    },
+    {
+      "codeId": "Manualstoragestartup",
+      "addressIndex": 40
+    },
+    {
+      "codeId": "Manualoutputstartup",
+      "addressIndex": 41
+    },
+    {
+      "codeId": "A01oilpump",
+      "addressIndex": 42
+    },
+    {
+      "codeId": "A02oilpump",
+      "addressIndex": 43
+    },
+    {
+      "codeId": "A01get1#gridaddress",
+      "addressIndex": 44
+    },
+    {
+      "codeId": "A01get22#gridaddress",
+      "addressIndex": 45
+    },
+    {
+      "codeId": "A01get43#gridaddress",
+      "addressIndex": 46
+    },
+    {
+      "codeId": "A01get64#gridaddress",
+      "addressIndex": 47
+    },
+    {
+      "codeId": "A01get85#gridaddress",
+      "addressIndex": 48
+    },
+    {
+      "codeId": "A01get106#gridaddress",
+      "addressIndex": 49
+    },
+    {
+      "codeId": "A01get127#gridaddress",
+      "addressIndex": 50
+    },
+    {
+      "codeId": "A01get148#gridaddress",
+      "addressIndex": 51
+    },
+    {
+      "codeId": "A01get169#gridaddress",
+      "addressIndex": 52
+    },
+    {
+      "codeId": "A02get190#gridaddress",
+      "addressIndex": 53
+    },
+    {
+      "codeId": "A02get1#gridaddress",
+      "addressIndex": 54
+    },
+    {
+      "codeId": "A02get22#gridaddress",
+      "addressIndex": 55
+    },
+    {
+      "codeId": "A02get43#gridaddress",
+      "addressIndex": 56
+    },
+    {
+      "codeId": "A02get64#gridaddress",
+      "addressIndex": 57
+    },
+    {
+      "codeId": "A02get85#gridaddress",
+      "addressIndex": 58
+    },
+    {
+      "codeId": "A02get106#gridaddress",
+      "addressIndex": 59
+    },
+    {
+      "codeId": "A02get127#gridaddress",
+      "addressIndex": 60
+    },
+    {
+      "codeId": "A02get148#gridaddress",
+      "addressIndex": 61
+    },
+    {
+      "codeId": "A02get169#gridaddress",
+      "addressIndex": 62
+    },
+    {
+      "codeId": "A02get190#gridaddress",
+      "addressIndex": 63
+    },
+    {
+      "codeId": "B01get1#gridaddress",
+      "addressIndex": 64
+    },
+    {
+      "codeId": "B01get22#gridaddress",
+      "addressIndex": 65
+    },
+    {
+      "codeId": "B01get43#gridaddress",
+      "addressIndex": 66
+    },
+    {
+      "codeId": "B01get64#gridaddress",
+      "addressIndex": 67
+    },
+    {
+      "codeId": "B01get85#gridaddress",
+      "addressIndex": 68
+    },
+    {
+      "codeId": "B02get106#gridaddress",
+      "addressIndex": 69
+    },
+    {
+      "codeId": "B02get127#gridaddress",
+      "addressIndex": 70
+    },
+    {
+      "codeId": "B02get148#gridaddress",
+      "addressIndex": 71
+    },
+    {
+      "codeId": "B02get169#gridaddress",
+      "addressIndex": 72
+    },
+    {
+      "codeId": "B02get190#gridaddress",
+      "addressIndex": 73
+    },
+    {
+      "codeId": "D01IDClean",
+      "addressIndex": 74
+    },
+    {
+      "codeId": "D02IDClean",
+      "addressIndex": 75
+    },
+    {
+      "codeId": "D03IDClean",
+      "addressIndex": 76
+    },
+    {
+      "codeId": "D04IDClean",
+      "addressIndex": 77
+    },
+    {
+      "codeId": "D05IDClean",
+      "addressIndex": 78
+    },
+    {
+      "codeId": "D06IDClean",
+      "addressIndex": 79
+    },
+    {
+      "codeId": "A01IDClean",
+      "addressIndex": 80
+    },
+    {
+      "codeId": "A02IDClean",
+      "addressIndex": 81
+    },
+    {
+      "codeId": "B01IDClean",
+      "addressIndex": 82
+    },
+    {
+      "codeId": "B02IDClean",
+      "addressIndex": 83
+    },
+    {
+      "codeId": "abort/resumeTasks",
+      "addressIndex": 84
+    },
+    {
+      "codeId": "A01SERVETRAVELhome",
+      "addressIndex": 85
+    },
+    {
+      "codeId": "A02SERVETRAVELhome",
+      "addressIndex": 86
+    },
+    {
+      "codeId": "A01A02travelHoming",
+      "addressIndex": 87
+    },
+    {
+      "codeId": "A01halfAutoSelect",
+      "addressIndex": 88
+    },
+    {
+      "codeId": "A02halfAutoSelect",
+      "addressIndex": 89
+    },
+    {
+      "codeId": "A02abortTasks",
+      "addressIndex": 90
+    },
+    {
+      "codeId": "emgHMI",
+      "addressIndex": 91
+    },
+    {
+      "codeId": "Scanningmethod",
+      "addressIndex": 92
+  ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/Plcframe.json b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/Plcframe.json
new file mode 100644
index 0000000..c270227
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/Plcframe.json
@@ -0,0 +1,51 @@
+{
+   "plcAddressBegin":"DB17.0",
+   "plcAddressLenght":"40",
+   "dataType":"word",
+   "parameteInfor":[
+      {
+         "codeId": "E01id",  
+         "addressIndex":"0",
+         "addressLenght":"14", 
+         "ratio":"1",
+         "unit":"m/min"    
+      },
+      {
+          "codeId": "E01Quest",
+          "addressIndex":"16",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"      
+       },
+       {
+          "codeId": "E01Reply",
+          "addressIndex":"18",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"       
+       },
+       {
+          "codeId": "J01Quest",
+          "addressIndex":"20",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "J01id",
+          "addressIndex":"22",
+          "addressLenght":"14",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "J01TurnGo",
+          "addressIndex":"38",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       }
+
+
+   ]
+}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/alarm.xlsx b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/alarm.xlsx
new file mode 100644
index 0000000..50b26dc
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/alarm.xlsx
Binary files differ
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/sign.xlsx b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/sign.xlsx
new file mode 100644
index 0000000..3922301
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/sign.xlsx
Binary files differ
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/test.xlsx b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/test.xlsx
new file mode 100644
index 0000000..9862cf5
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/JsonFile/test.xlsx
Binary files differ
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
index 609b5bf..172c868 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -3,21 +3,32 @@
 
 spring:
   datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false
-    username: root
-    password: beibo.123/
+    dynamic:
+      primary: hangzhoumes #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
+      strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
+      datasource:
+        hangzhoumes:
+          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
+          username: root
+          password: beibo.123/
+          driver-class-name: com.mysql.cj.jdbc.Driver
   cloud:
     nacos:
       discovery:
-        server-addr: 127.0.0.1:8848
+        server-addr: 192.168.6.128:8848
   application:
     name: unLoadGlass
   redis:
     database: 0
-    host: 192.168.56.10
+    host: 127.0.0.1
     port: 6379
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
-  configuration:
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
+
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    # 璁剧疆 MyBatis 鏃ュ織绾у埆涓� ERROR
+logging:
+  level:
+    com:
+      baomidou:
+        mybatisplus=ERROR:
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
new file mode 100644
index 0000000..59e29ae
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mes.downglassinfo.mapper.DownGlassInfoMapper">
+
+    <select id="selectunloadingtaskstate" resultType="com.mes.downglassinfo.entity.DownGlassInfo">
+        SELECT flow_card_id, filmsid, width, height, thickness FROM down_glass_task WHERE task_stauts = 1
+    </select>
+
+    <update id="updateTaskStateToZero">
+        UPDATE down_glass_task SET task_stauts = 0 WHERE flow_card_id = #{flowCardId}
+    </update>
+
+    <select id="getMaxSequenceByFlowCardId" resultType="java.lang.Integer">
+        SELECT MAX(sequence) FROM down_glass_info WHERE flow_card_id = #{flowCardId}
+    </select>
+
+    <delete id="deletetask">
+        DELETE FROM down_glass_task WHERE flow_card_id = #{flowCardId}
+    </delete>
+
+</mapper>

--
Gitblit v1.8.0