From 65c3895042187119fa797076f797791b02944a0e Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期二, 16 四月 2024 10:47:16 +0800
Subject: [PATCH] 更新查询语句

---
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java                              |    2 
 UI-Project/config.js                                                                                                             |    2 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownGlassCacheLogic.java             |   76 +++++++++---------
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java    |    3 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/mapper/DownWorkstationMapper.java        |    8 +
 /dev/null                                                                                                                        |   36 ---------
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageController.java    |    1 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/mapper/DownStorageCageDetailsMapper.java     |   14 +-
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java         |    6 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java |    8 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownGlassLogic.java              |    4 
 UI-Project/vite.config.js                                                                                                        |    2 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/MybatisPlusConfig.java                                  |   18 ----
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml                                             |    6 -
 14 files changed, 68 insertions(+), 118 deletions(-)

diff --git a/CacheGlassModule/src/main/java/com/mes/service/hangzhoumes/hangzhoumesService.java b/CacheGlassModule/src/main/java/com/mes/service/hangzhoumes/hangzhoumesService.java
deleted file mode 100644
index cc29839..0000000
--- a/CacheGlassModule/src/main/java/com/mes/service/hangzhoumes/hangzhoumesService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.mes.service.hangzhoumes;
-
-import com.baomidou.dynamic.datasource.annotation.DS;
-import com.mes.entity.EdgStorageCageDetails;
-import com.mes.entity.GlassInfo;
-import com.mes.entity.Tempered;
-import com.mes.mapper.HangzhouMesMapper;
-import com.mes.mapper.PpMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class HangzhoumesService {
-
-    @Autowired
-    private HangzhouMesMapper hangzhouMesMapper;
-    //鏍规嵁缂栧彿 鏌ユ壘鐜荤拑灏忕墖淇℃伅
-    public GlassInfo getUserInfo(String process_id){
-        return hangzhouMesMapper.selectGlassId(process_id);
-    }
-
-    //鐞嗙墖缂撳瓨 绗煎唴淇℃伅
-    public List<Map> SelectCageInfo(){
-        return hangzhouMesMapper.selectCachInfo();
-    }
-
-    //纾ㄨ竟灏忕墖淇℃伅
-    public List<Map> SelectEdgInfo(String line){
-        return hangzhouMesMapper.selectEdgInfo(line);
-    }
-
-    
-}
-
diff --git a/UI-Project/config.js b/UI-Project/config.js
index fea947e..915e736 100644
--- a/UI-Project/config.js
+++ b/UI-Project/config.js
@@ -1,5 +1,5 @@
 export default {
-  serverUrl: "localhost:8081",
+  serverUrl: "localhost:8080/mesModuleTools",
   serverUrl2: "localhost:8081/mesModuleTools"
   //serverUrl:"res.abeim.cn"
 }
\ No newline at end of file
diff --git a/UI-Project/vite.config.js b/UI-Project/vite.config.js
index fb950f2..dc9359d 100644
--- a/UI-Project/vite.config.js
+++ b/UI-Project/vite.config.js
@@ -22,7 +22,7 @@
     https: false,
     proxy: {
       '/api': {
-        target: 'http://localhost:8081/',
+        target: 'http://localhost:8080/mesModuleTools',
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/api/, '/'),
       },
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/MybatisPlusConfig.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/MybatisPlusConfig.java
index 440d02b..90abe7b 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/MybatisPlusConfig.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/MybatisPlusConfig.java
@@ -9,6 +9,7 @@
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
+import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -35,27 +36,12 @@
         return interceptor;
     }
 
-    @Resource
-    private DataSourceProperties dataSourceProperties;
 
-
+    @ConfigurationProperties(prefix="spring.datasource.dynamic.datasource.hangzhoumes")
     @Bean(name = "dataSource")
     public DataSource dataSource() {
-
         DruidDataSource dataSource = new DruidDataSource();
-        dataSource.setUrl(dataSourceProperties.getUrl());
-        dataSource.setDriverClassName(dataSourceProperties.getDriverClassName());
-        dataSource.setUsername(dataSourceProperties.getUsername());
-        dataSource.setPassword(dataSourceProperties.getPassword());
-
         return dataSource;
 
     }
-
-    public SqlSessionFactory sqlSessionFactory() throws Exception {
-        SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
-        sqlSessionFactoryBean.setDataSource(dataSource());
-        return sqlSessionFactoryBean.getObject();
-    }
-
 }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/InitUtil.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/InitUtil.java
deleted file mode 100644
index d15c72d..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/InitUtil.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package com.mes.common;
-
-import cn.hutool.json.JSONArray;
-import cn.hutool.json.JSONObject;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-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 = S7object.getinstance().plccontrol.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, 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 = S7object.getinstance().plccontrol.ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
-        plcParameterObject.setPlcParameterList(getplcvlues);
-    }
-
-
-
-}
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java
deleted file mode 100644
index 7429f4e..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PLCAutoMes.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.mes.common;
-
-
-import java.io.IOException;
-
-import static com.mes.common.InitUtil.readAndUpdateWordValues;
-
-public class PLCAutoMes extends Thread {
-
-    // // 鐢ㄤ簬瀛樺偍搴旂敤绋嬪簭鐨勯厤缃俊鎭�
-    // private Configuration config;
-    private static InitUtil initUtil;
-    // public static PlcParameterObject PlcMesObject;
-    // public static PlcParameterObject PlcReadObject;
-    // public static PlcParameterObject PlcframeObject;
-
-    // // 鍒涘缓涓�涓嚜瀹氫箟鐨� S7 鎺у埗鍣ㄦ秷鎭鐞嗗櫒瀵硅薄
-    // MessageHandler customS7Control = new MessageHandler();
-
-    // 鍗曚緥瀹炰緥
-    private static PLCAutoMes instance;
-    // private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath();
-    private static String PlcAlbania = PLCAutoMes.class.getResource("/JsonFile/PlcLoadGlass.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 PlcParameterObject plcParameterObject = initUtil.initword(PlcParameter);
-    // public static PlcBitObject plcPlcTest = initUtil.initbit(PlcTest);
-    // public static PlcBitObject  plcBitObject = initUtil.initbit(PlcSign);
-    // public static PlcParameterObject  plcStateObject= initUtil.initword(PlcState);
-    // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm);
-    public static PlcParameterObject PlcMesObject = InitUtil.initword(PlcAlbania);
-    // public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead);
-    // public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe);
-  
-    // 绉佹湁鏋勯�犲嚱鏁�
-    public PLCAutoMes() throws IOException {
-        //config = new Configuration("config.properties");
-        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/LoadGlassModule/src/main/java/com/mes/common/PlcBitInfo.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcBitInfo.java
deleted file mode 100644
index 0c0f241..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcBitInfo.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.mes.common;
-
-
-
-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/LoadGlassModule/src/main/java/com/mes/common/PlcBitObject.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcBitObject.java
deleted file mode 100644
index e01cb3c..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcBitObject.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package com.mes.common;
-
-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/LoadGlassModule/src/main/java/com/mes/common/PlcParameterInfo.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcParameterInfo.java
deleted file mode 100644
index 2ae2998..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcParameterInfo.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package com.mes.common;
-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 ;
-        }
-        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/LoadGlassModule/src/main/java/com/mes/common/PlcParameterObject.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcParameterObject.java
deleted file mode 100644
index 26736c3..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/PlcParameterObject.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package com.mes.common;
-
-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/LoadGlassModule/src/main/java/com/mes/common/S7object.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/S7object.java
deleted file mode 100644
index 4111dfe..0000000
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/common/S7object.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.mes.common;
-
-import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType;
-import com.mes.tools.S7control;
-
-/**
- * @Author : zhoush
- * @Date: 2024/4/9 15:13
- * @Description:
- */
-public class S7object {
-    public S7control plccontrol; // PLC閫氳绫诲疄渚�
-    private EPlcType plcType = EPlcType.S1500; // 瑗块棬瀛怭LC绫诲瀷
-    private String ip = "192.168.10.1"; // plc ip鍦板潃
-    private int port = 102; // plc 绔彛鍙�
-
-    private static volatile S7object instance = null;
-
-    private S7object() {
-        if (plccontrol == null) {
-            plccontrol = new S7control(plcType, ip, port,0,0);
-        }
-    }
-
-    // 鍗曚緥妯″紡 鑾峰彇绫荤殑鍞竴瀹炰緥
-    public static S7object getinstance() {
-        if (instance == null) {
-            synchronized (S7object.class) {
-                if (instance == null) {
-                    instance = new S7object();
-                }
-            }
-        }
-        return instance;
-    }
-}
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 b909d67..47dc741 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
@@ -9,7 +9,7 @@
 
 /**
  * @Author : zhoush
- * @Date: 2024/4/7 14:36
+ * @Date: 2024/4/7 14:36RRRR
  * @Description:
  */
 @SpringBootApplication
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
index 22e6105..d8bde4a 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
@@ -11,8 +11,7 @@
 @RequestMapping("/downGlassInfo")
 public class DownGlassInfoController {
 
-    @Autowired
-    private DownGlassInfoService downGlassInfoService;
+
 
 
 
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 3c7b2d0..8138eab 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
@@ -14,13 +14,15 @@
     public Integer getMaxSequenceByFlowCardId(String flowCardId) {
         QueryWrapper<DownGlassInfo> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("flow_card_id", flowCardId);
-        queryWrapper.select("MAX(sequence)"); // 閫夋嫨鏈�澶у簭鍙�
+        queryWrapper.orderByDesc("sequence"); // 鎸夌収搴忓彿鍊掑簭鎺掑簭
+        queryWrapper.select("sequence").last("LIMIT 1"); // 閫夋嫨鏈�澶у簭鍙峰苟闄愬埗缁撴灉涓�1鏉¤褰�
         DownGlassInfo downGlassInfo = baseMapper.selectOne(queryWrapper);
         if (downGlassInfo != null) {
-            return downGlassInfo.getSequence(); // 杩斿洖鏈�澶у簭鍙�
+            return downGlassInfo.getSequence();
         }
-        return 0; // 濡傛灉娌℃湁鎵惧埌璁板綍锛岃繑鍥�0鎴栬�呭叾浠栭�傚綋鐨勫��
+        return 0;
     }
+
     @Override
     public void insertDownGlassInfo(DownGlassInfo downGlassInfo) {
         baseMapper.insert(downGlassInfo);
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageController.java
index 4f8253b..6e666e2 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageController.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageController.java
@@ -17,5 +17,6 @@
 @RequestMapping("/downStorageCage")
 public class DownStorageCageController {
 
+
 }
 
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/mapper/DownStorageCageDetailsMapper.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/mapper/DownStorageCageDetailsMapper.java
index e5e57bf..9c8a595 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/mapper/DownStorageCageDetailsMapper.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/mapper/DownStorageCageDetailsMapper.java
@@ -3,7 +3,7 @@
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.mes.downglassinfo.entity.DownGlassTask;
 import com.mes.downstorage.entity.DownStorageCageDetails;
-import com.mes.uppattenusage.entity.GlassInfo;
+import com.mes.glassinfo.entity.GlassInfo;
 import org.apache.ibatis.annotations.*;
 
 import java.util.List;
@@ -25,16 +25,16 @@
     @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot")
     List<DownStorageCageDetails> SelectCacheLeisure();
 
-    // 鏌ヨ绗煎瓙鍐呭嚭鐗囦换鍔�
-    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot WHERE escd.slot IS NOT NULL order by escd.tempering_layout_id,escd.tempering_feed_sequence")
-    List<DownStorageCageDetails> SelectCacheOut();
+    // 鏌ヨ绗﹀悎宸ヤ綅鐨勫嚭鐗囩幓鐠�
+    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot left join down_workstation as dw  on escd.flow_card_id=dw.flow_card_id WHERE escd.slot IS NOT NULL and dw.workstation_id BETWEEN #{start} and #{end} order by escd.tempering_layout_id,escd.tempering_feed_sequence")
+    List<DownStorageCageDetails> SelectCacheOut(int start,int end);
 
     // 鏌ヨ绗煎瓙鍐呬俊鎭�
     @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot")
     List<DownStorageCageDetails> SelectCachInfo();
 
     // 鏌ヨ鍙繘姝ょ墖鐜荤拑鐨勬爡鏍煎彿
-    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence")
+    @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null and escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence")
     List<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence,
                                                         double width);
 
@@ -55,8 +55,8 @@
 //    List<DownGlassTask> SelectOutCacheInfo();
 
     // 鏌ヨ  A06  鎴� A11 鏈�鏂扮殑涓�鐗� 鍑虹墖浠诲姟
-    @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1")
-    GlassInfo SelectLastOutCacheInfo(String EndCell);
+//    @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1")
+//    GlassInfo SelectLastOutCacheInfo(String EndCell);
 
     // 淇敼绗煎瓙鍐呬俊鎭�
 //    @Update("update")
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownGlassCacheLogic.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownGlassCacheLogic.java
index e839f95..8a505fa 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownGlassCacheLogic.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownGlassCacheLogic.java
@@ -4,12 +4,14 @@
 import com.mes.common.S7control;
 import com.mes.device.PlcParameterObject;
 
+import com.mes.downglassinfo.entity.DownGlassTask;
+import com.mes.downglassinfo.service.DownGlassTaskService;
 import com.mes.downstorage.entity.DownStorageCageDetails;
 import com.mes.downstorage.mapper.DownStorageCageDetailsMapper;
 import com.mes.downworkstation.mapper.DownWorkstationMapper;
 import com.mes.tools.WebSocketServer;
-import com.mes.uppattenusage.entity.GlassInfo;
-import com.mes.uppattenusage.service.GlassInfoService;
+import com.mes.glassinfo.entity.GlassInfo;
+import com.mes.glassinfo.service.GlassInfoService;
 import lombok.Data;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -23,6 +25,7 @@
     private DownStorageCageDetailsMapper selectInfo;
     private GlassInfoService GlassInfoService;
     private DownStorageCageDetailsService downStorageCageDetailsService;
+    private DownGlassTaskService downGlassTaskService;
 
     /**
      * @param Number
@@ -99,6 +102,7 @@
                 //2.鍥炲 1杩涚墖
                 DownStorageCageDetails item=list.get(0);
                 selectInfo.insertCacheTask(GlassInfo.getId()+"","0",item.getSlot()+"","1",GlassInfo.getWidth(),GlassInfo.getHeight(),GlassInfo.getFilmsid(),GlassInfo.getThickness(),GlassInfo.getFlowcardId());
+
                 S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1);
                 return true;
             }
@@ -110,57 +114,55 @@
         return false;
     }
     //鐞嗙墖 鍑�
-    public boolean processOut(){
-        //鏌ヨ浠诲姟
-        String G06=S7control.getinstance().ReadWord("DB14.56", 1).get(0)+"";
-        String G11=S7control.getinstance().ReadWord("DB14.58", 1).get(0)+"";
-        String G13=S7control.getinstance().ReadWord("DB14.58", 1).get(0)+"";
-        PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
-        List<DownStorageCageDetails> list=selectInfo.SelectCacheOut();
-        //鍏朵粬鎯呭喌鏉′欢 濡傦細鍚庣画璁惧鏁呴殰绂佹鐞嗙墖鍑虹墖 绛�
-        boolean isOut=true;
-        if (list.size()>0&&isOut) {
-            DownStorageCageDetails item=list.get(0);
-           //
-            if(G06=="0"&&G11=="1"){
-                //鍑哄埌  G06
+    public boolean processOut() {
+        // 鏌ヨ浠诲姟
+        String G06 = S7control.getinstance().ReadWord("DB14.56", 1).get(0) + "";
+        String G11 = S7control.getinstance().ReadWord("DB14.58", 1).get(0) + "";
+        String G13 = S7control.getinstance().ReadWord("DB14.58", 1).get(0) + "";
+        PlcParameterObject plcmes = PLCAutoMes.PlcMesObject;
+        List<DownStorageCageDetails> list = selectInfo.SelectCacheOut(1, 5);
+        List<DownStorageCageDetails> list2 = selectInfo.SelectCacheOut(6, 10);
+        List<DownStorageCageDetails>  list3 = selectInfo.SelectCacheOut(1, 10);
 
-                selectInfo.insertCacheTask(item.getGlassId()+"","0","06","2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId());
+        // 鎸夌収椤哄簭绗﹀悎鍓嶇鍑虹墖
+        if (!list.isEmpty()) {
+            DownStorageCageDetails item = list.get(0);
+            if (G06.equals("0") && G11.equals("1")) {
+                // 鍑哄埌 G06
+                selectInfo.insertCacheTask(item.getGlassId() + "", "0", "06", "2", item.getWidth(), item.getHeight(), item.getFilmsid(), item.getThickness(), item.getFlowCardId());
                 S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1");
                 S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1");
                 return true;
-            }else if(G06=="1"&&G11=="0"){
-                //鍑哄埌  G11
-
-                selectInfo.insertCacheTask(item.getGlassId()+"","0","11","2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId());
+            }
+            // 鎸夌収椤哄簭绗﹀悎鍚庣鍑虹墖
+        } else if (!list2.isEmpty()) {
+            DownStorageCageDetails item2 = list2.get(0);
+            if (G06.equals("1") && G11.equals("0")) {
+                // 鍑哄埌 G11
+                selectInfo.insertCacheTask(item2.getGlassId() + "", "0", "11", "2", item2.getWidth(), item2.getHeight(), item2.getFilmsid(), item2.getThickness(), item2.getFlowCardId());
                 S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2");
                 S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1");
                 return true;
-            }else if(G06=="0"&&G11=="0"){
-                //閮藉厑璁�    G04/G05  涓婁竴鐗囨槸鍚﹀拰姝ょ墖鐜荤拑灏哄灏哄鐩稿悓
-                String endcell="06";
-                String SendEndcell="1";
-                boolean If_=false;
-                GlassInfo glassInfo06= selectInfo.SelectLastOutCacheInfo("06");
-                GlassInfo glassInfo11= selectInfo.SelectLastOutCacheInfo("11");
-                GlassInfo glassInfo13= selectInfo.SelectLastOutCacheInfo("13");
-                if(glassInfo06!=null&& glassInfo11.getWidth().equals(item.getWidth()) && glassInfo06.getHeight().equals(item.getHeight())){
-                    endcell="11";
-                    SendEndcell="2";
-                }else if(item.getHeight()>=3440&&item.getWidth()>=1440){
-                    //鍏朵粬鏉′欢浜哄伐澶勭悊
+            }
+            // 瓒呭嚭灏哄浼樺厛浜哄伐鍑虹墖 浜哄伐澶勭悊
+        } else if (!list3.isEmpty()) {
+            DownStorageCageDetails item3 = list3.get(0);
+            if (item3.getHeight() >= 3440 && item3.getWidth() >= 1440) {
 
-                }
+                String endcell = "06";
+                String SendEndcell = "1";
 
-                selectInfo.insertCacheTask(item.getGlassId()+"","0",endcell,"2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId());
+                selectInfo.insertCacheTask(item3.getGlassId() + "", "0", endcell, "2", item3.getWidth(), item3.getHeight(), item3.getFilmsid(), item3.getThickness(), item3.getFlowCardId());
                 S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell);
                 S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1");
                 return true;
             }
         }
-        //杩斿洖缁撴灉
+
+        // 杩斿洖缁撴灉
         return false;
     }
+
 //鏌ヨ鏄惁缁戝畾鏋跺瓙
 //    public boolean selectFlowCardId(String FlowCardId){
 //
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 c4d3469..8607c8d 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
@@ -21,9 +21,11 @@
  * @since 2024-03-27
  */
 @Mapper
+
 @Repository
 @InterceptorIgnore(tenantLine = "true")
-@DS("salve_1") // 鎸囧畾浣跨敤 hangzhoumes 鏁版嵁婧�
+@DS("hangzhoumes") // 鎸囧畾浣跨敤 hangzhoumes 鏁版嵁婧�
+
 public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> {
 
 
@@ -32,8 +34,8 @@
     List<DownWorkstation> selectdownWorkstationstate();
 
 
-    @Select("SELECT flow_card_id,filmsid,width,height,thickness FROM down_glass_task WHERE task_stauts = 1;")
-    List<DownGlassTask> selectunloadingtaskstate();
+//    @Select("SELECT flow_card_id,filmsid,width,height,thickness FROM down_glass_task WHERE task_stauts = 1;")
+//    List<DownGlassTask> selectunloadingtaskstate();
     //鏇存柊钀芥灦鏁伴噺
 //    @Update("UPDATE down_workstation SET racks_number = #{racksNumber} " +
 //            "WHERE flow_card_id = #{flowCardId}")
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
index 045f2d8..150a27a 100644
--- 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
@@ -70,7 +70,7 @@
         downGlassInfoService = WebSocketServer.applicationContext.getBean(DownGlassInfoService.class);
       downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class);
         downGlassTaskService = WebSocketServer.applicationContext.getBean(DownGlassTaskService.class);
-        List<DownGlassTask> taskdownGlassInf = downWorkstationMapper.selectunloadingtaskstate();
+        List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState();
 //
 
 
@@ -123,10 +123,8 @@
             if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) {
                 //锛屽鏋滃凡缁忕粦瀹氬垯鏇存柊宸茶惤鏋舵暟閲�,骞朵笖鍒犻櫎涓嬬墖浠诲姟琛ㄤ腑鐨勮褰�
                 for (DownWorkstation downWorkstation : taskdownWorkstation) {
-
                     //鏇存柊涓嬬墖宸ヤ綅琛ㄤ腑宸茶惤鏋舵暟閲�
                     downWorkstationService.updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1);
-
                     //鏇存柊鏈烘浠诲姟琛ㄤ腑鐘舵�佷负0
                     downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getFlowCardId());
                     //鍒犻櫎涓嬬墖浠诲姟琛ㄤ腑鐨勮褰�
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
index e3f797b..fcf4605 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
@@ -4,9 +4,9 @@
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.mes.downworkstation.entity.DownWorkstation;
-import com.mes.uppattenusage.entity.GlassInfo;
-import com.mes.uppattenusage.mapper.GlassInfoMapper;
-import com.mes.uppattenusage.service.GlassInfoService;
+import com.mes.glassinfo.entity.GlassInfo;
+import com.mes.glassinfo.mapper.GlassInfoMapper;
+import com.mes.glassinfo.service.GlassInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
index 91f65a2..48ed4e2 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -13,11 +13,7 @@
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
 
-#          sqlserver:
-#            url: jdbc:sqlserver://localhost:1433;databaseName=hangzhoumes
-#            username: sa
-#            password: beibo.123/
-#            driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+
   cloud:
     nacos:
       discovery:

--
Gitblit v1.8.0