From 3123dbd3a5be75999f368fbe4aa722e3877074ab Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期五, 14 六月 2024 15:52:28 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java                                       |   37 +
 UI-Project/src/views/Returns/returns.vue                                                                                                          |   68 +
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/impl/BigStorageCageFeedTaskServiceImpl.java |   17 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java               |    9 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java                    |   17 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/service/DamageService.java                                  |   16 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml                                                           |    2 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/controller/DamageController.java                            |   21 
 hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java                                         |   10 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/entity/Damage.java                                          |   44 +
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageDTO.java                               |   14 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java                                        |  431 ++++++++++--
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java                                             |    2 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml                                                               |    3 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml                                                              |    2 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/UpWorkstationService.java                               |    2 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java                      |    8 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java                        |   14 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/controller/UpWorkstationController.java                         |    9 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java                                    |    3 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/JsonFile/PlcLoadGlass.json                                                     |   10 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-cz.yml                                                             |    8 
 UI-Project/src/views/PurchaseReturn/purchaseStorage.vue                                                                                           |  100 +-
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java                                                   |    4 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-cz.yml                                                            |   13 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java                                          |    4 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageFeedTaskMapper.xml                               |   18 
 UI-Project/src/views/Identify/identify.vue                                                                                                        |   16 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/entity/BigStorageCageFeedTask.java                  |   26 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/BigStorageCageFeedTaskService.java          |    8 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java                               |   29 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java                       |   30 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml                                                                |    6 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/mapper/BigStorageCageFeedTaskMapper.java            |    5 
 hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java                                       |   93 ++
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-cz.yml                                                        |    9 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-cz.yml                                                    |    6 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java            |   25 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java                             |    7 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/mapper/DamageMapper.java                                    |   16 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-cz.yml                                                           |    8 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java                                                    |    2 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java                       |   38 +
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java      |  137 ++-
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml                                                       |    7 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/edgglasstask/entity/EdgGlassTaskInfo.java                          |    5 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java                                         |   12 
 UI-Project/src/views/Slicecage/slicecage.vue                                                                                                      |    2 
 /dev/null                                                                                                                                         |   25 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageService.java                      |    5 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java                                          |  112 +-
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml                                                           |   21 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java                                 |    2 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/GlassInfoService.java                                                |   13 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java                                                               |   76 ++
 UI-Project/src/views/PurchaseReturn/purchaseReturn.vue                                                                                            |  213 +----
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java                                        |    6 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java                           |   18 
 58 files changed, 1,275 insertions(+), 589 deletions(-)

diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index 2e2de95..9316fc9 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -76,12 +76,12 @@
 
       adjustedRects.value = rawRects.map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        x_axis: (rect.x_axis*100) * 0.005, // 灏唜鍊奸櫎浠�3  
-        y_axis: (rect.y_axis*100) * 0.005,
-        width: (rect.width*100) * 0.004 ,
+        x_axis: (rect.x_axis*100) * 0.004, // 灏唜鍊奸櫎浠�3  
+        y_axis: (rect.y_axis*100) * 0.004,
+        width: (rect.width*100) * 0.002 ,
         widtha: rect.width ,
         heighta: rect.height ,
-        height:( rect.height*100) * 0.004 ,
+        height:( rect.height*100) * 0.002 ,
         glass_state: rect.glass_state
       }));  
       console.log(adjustedRects.value);
@@ -183,12 +183,12 @@
   // adjustedRects.value = data.currentCutTerritory[0]
   adjustedRects.value = data.currentCutTerritory[0].map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        x_axis: (rect.x_axis*100) * 0.005, // 灏唜鍊奸櫎浠�3  
-        y_axis: (rect.y_axis*100) * 0.005,
-        width: (rect.width*100) * 0.004 ,
+        x_axis: (rect.x_axis*100) * 0.004, // 灏唜鍊奸櫎浠�3  
+        y_axis: (rect.y_axis*100) * 0.004,
+        width: (rect.width*100) * 0.002 ,
         widtha: rect.width ,
         heighta: rect.height ,
-        height:( rect.height*100) * 0.004 ,
+        height:( rect.height*100) * 0.002 ,
         glass_state: rect.glass_state
       }));  
  // console.log("鏇存柊鍚庢暟鎹�", tableData);
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
index 8fd42ca..da044de 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -19,34 +19,41 @@
 
 const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
+
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
   adjustedRects.value =  data.intoGlass[0].map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        xcoordinate: rect.xcoordinate, // 灏唜鍊奸櫎浠�3  
-        ycoordinate: rect.ycoordinate,
-        width: rect.width ,
-        height: rect.height ,
+        xcoordinate: rect.xCoordinate * 0.5, // 灏唜鍊奸櫎浠�3  
+        ycoordinate: rect.ycoordinate * 0.5,
+        width: rect.width * 0.4,
+        height: rect.height * 0.4,
+        widtha: rect.width,
+        heighta: rect.height,
       })); 
+      console.log(data.intoGlass[0]);
       adjustedRectsa.value = data.waitingGlass[0].map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        xcoordinate: rect.xcoordinate, // 灏唜鍊奸櫎浠�3  
-        ycoordinate: rect.ycoordinate,
-        width: rect.width ,
-        height: rect.height ,
+        xcoordinate: rect.xCoordinate * 0.5, // 灏唜鍊奸櫎浠�3  
+        ycoordinate: rect.ycoordinate * 0.5,
+        width: rect.width * 0.4,
+        height: rect.height * 0.4,
+        widtha: rect.width,
+        heighta: rect.height,
+        state: rect.state
       }));  
       
       adjustedRectsb.value = data.outGlass[0].map(rect => ({  
         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        xcoordinate: rect.xcoordinate, // 灏唜鍊奸櫎浠�3  
-        ycoordinate: rect.ycoordinate,
-        width: rect.width ,
-        height: rect.height ,
+        xcoordinate: rect.xCoordinate * 0.5, // 灏唜鍊奸櫎浠�3  
+        ycoordinate: rect.ycoordinate * 0.5,
+        width: rect.width * 0.4,
+        height: rect.height * 0.4,
+        widtha: rect.width,
+        heighta: rect.height,
+        state: rect.state
       }));  
 };
-
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
-
 onMounted(() => {
   // fetchFlowCardId();
   // fetchTableData(); // 鑾峰彇鏁版嵁
@@ -57,143 +64,18 @@
   console.log("鍏抽棴浜�")
   closeWebSocket();
 });
-// onMounted(async () => {  
-//   try {  
-//     const response = await request.get('/temperingGlass/temperingGlassInfo/SelectIntoGlass'); 
-//     if (response.code === 200) {  
-//       const rawRects = response.data; // 璁剧疆鐭╁舰鏁版嵁  
-//       console.log(response.data);
-//       const { height: newheight,width: newwidth  } = response.data; // 鑾峰彇灏哄  
-//       height.value = newheight;  
-//       width.value = newwidth;  
-
-//       adjustedRects.value = rawRects.map(rect => ({  
-//         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-//         xcoordinate: rect.xcoordinate, // 灏唜鍊奸櫎浠�3  
-//         ycoordinate: rect.ycoordinate,
-//         width: rect.width ,
-//         height: rect.height ,
-//       }));  
-//         console.log(rect);
-
-//       //   console.log( (rect.width*100) / 300 );
-//     } else {  
-//       // console.error('Failed to fetch rectangles from API.');  
-//       console.error('Failed to fetch rects from API.'); 
-//     }  
-//   } catch (error) {  
-//     // console.error('Error fetching rectangles :', error);
-//     console.error('Error fetching rects :', error);  
-//   }  
-// }); 
-// 杩涚倝鍓�
-// const handleConfirm = async () => {
-//   try {
-//     const response = await request.post('/temperingGlass/temperingGlassInfo/SelectWaitingGlass'); 
-//     if (response.code === 200) {  
-//       const rawRects = response.data; // 璁剧疆鐭╁舰鏁版嵁  
-//       console.log(response.data);
-//       const { height: newheight,width: newwidth  } = response.data; // 鑾峰彇灏哄  
-//       height.value = newheight;  
-//       width.value = newwidth;  
-
-//       adjustedRectsa.value = rawRects.map(rect => ({  
-//         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-//         xcoordinate: rect.xcoordinate, // 灏唜鍊奸櫎浠�3  
-//         ycoordinate: rect.ycoordinate,
-//         width: rect.width ,
-//         height: rect.height ,
-//       }));  
-//         console.log(rect);
-
-//       //   console.log( (rect.width*100) / 300 );
-//     } else {  
-//       // console.error('Failed to fetch rectangles from API.');  
-//       console.error('Failed to fetch rects from API.'); 
-//     }  
-//   } catch (error) {  
-//     // console.error('Error fetching rectangles :', error);
-//     console.error('Error fetching rects :', error);  
-//   }  
-// }; 
-
-// 宸插嚭鐐�
-// const handleConfirma = async () => {
-//   try {
-//     const response = await request.get('/temperingGlass/temperingGlassInfo/SelectOutGlass'); 
-//     if (response.code === 200) {  
-//       const rawRects = response.data; // 璁剧疆鐭╁舰鏁版嵁  
-//       console.log(response.data);
-//       const { height: newheight,width: newwidth  } = response.data; // 鑾峰彇灏哄  
-//       height.value = newheight;  
-//       width.value = newwidth;  
-
-//       adjustedRectsb.value = rawRects.map(rect => ({  
-//         ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-//         xcoordinate: rect.xcoordinate, // 灏唜鍊奸櫎浠�3  
-//         ycoordinate: rect.ycoordinate,
-//         width: rect.width ,
-//         height: rect.height ,
-//       }));  
-//         console.log(rect);
-
-//       //   console.log( (rect.width*100) / 300 );
-//     } else {  
-//       // console.error('Failed to fetch rectangles from API.');  
-//       console.error('Failed to fetch rects from API.'); 
-//     }  
-//   } catch (error) {  
-//     // console.error('Error fetching rectangles :', error);
-//     console.error('Error fetching rects :', error);  
-//   }  
-// }; 
-const gridOptions = reactive({
-  border:  "full",//琛ㄦ牸鍔犺竟妗�
-  keepSource: true,//淇濇寔婧愭暟鎹�
-  align: 'center',//鏂囧瓧灞呬腑
-  stripe:true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
-  id: 'OrderList',
-  showFooter: true,//鏄剧ず鑴�
-  printConfig: {},
-  importConfig: {},
-  exportConfig: {},
-  scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔�
-  showOverflow:true,
-  columnConfig: {
-    resizable: true,
-    useKey: true
-  },
-  filterConfig: {   //绛涢�夐厤缃」
-    remote: true
-  },
-  customConfig: {
-    storage: true
-  },
-  editConfig: {
-    trigger: 'click',
-    mode: 'row',
-    showStatus: true
-  },
-  data:  [
-    {
-    }
-  ],
-})
 </script>
 
 <template> 
   <div style="margin-top: 10px;">
      <el-button style="margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">杩涚倝涓�</el-button>
-     <el-button style="margin-left: 15px;"   id="searchButton" type="primary" @click="handleConfirm();dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >杩涚倝鍓�</el-button>
-    <el-button  id="searchButton" type="success" @click="handleConfirma();dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">宸插嚭鐐夌幓鐠�</el-button>
+     <el-button style="margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >杩涚倝鍓�</el-button>
+    <el-button  id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">宸插嚭鐐夌幓鐠�</el-button>
 <div v-if="dialogFormVisible" >
-      <!-- <div style="display: flex;margin-bottom: 20px;">
-      <div style="margin-left: 450px;font-size: 20px;">宸ョ▼鍙凤細P20240305001 </div>
-      <div style="margin-left: 150px;font-size: 20px;">鐗堝浘缂栧彿锛�1</div>
-    </div> -->
-    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
-      <el-scrollbar height="630px">
+    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 700px;" v-loading="loading">
+<div style="width: 49%;float: left;background-color: #f4f4f5;height: 650px;">
+  <el-scrollbar height="630px">
+    <div v-for="(group, groupId) in groupedRects" :key="groupId" style="position: relative;">  
     <div  style="position: relative;width: 1400px;">  
       <div  
       v-for="(rect, index) in adjustedRects"  
@@ -202,11 +84,32 @@
       :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px`  }"  
     >
      <div  class="centered-text">
-    <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div>  
+    <div >{{ rect.flowcardId }}</div>  
+    <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
+  </div>
+  </div> 
+   </div>
+   </div>
+   </el-scrollbar>
+  </div>
+<div style="width: 49%;float: right;background-color: #f4f4f5;height: 650px;">
+  <el-scrollbar height="630px">
+    <div  style="position: relative;width: 1400px;">  
+      <div  
+      v-for="(rect, index) in adjustedRects"  
+      :key="index"  
+      class="rect"  
+      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px`  }"  
+    >
+     <div  class="centered-text">
+    <div >{{ rect.flowcardId }}</div>  
+    <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
   </div>
   </div> 
    </div>
    </el-scrollbar>
+</div>
+    
    </el-card>
     </div>
 <div v-if="dialogFormVisiblea">
@@ -217,10 +120,12 @@
       v-for="(rect, index) in adjustedRectsa"  
       :key="index"  
       class="rect"  
-      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px`  }"  
-    >
+      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+       width: `${rect.width}px`, height: `${rect.height}px`,
+       backgroundColor: rect.state === 0 ? '#dedfe0' : '#d1edc4' }">
      <div  class="centered-text">
-    <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div>  
+    <div >{{ rect.flowcardId }}</div>  
+    <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
   </div>
   </div> 
    </div>
@@ -235,10 +140,12 @@
       v-for="(rect, index) in adjustedRectsb"  
       :key="index"  
       class="rect"  
-      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px`  }"  
-    >
+      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+       width: `${rect.width}px`, height: `${rect.height}px`,
+       backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }">
      <div  class="centered-text">
-    <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div>  
+    <div >{{ rect.flowcardId }}</div>  
+    <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
   </div>
   </div> 
    </div>
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
index 11f2545..2a98019 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -3,7 +3,10 @@
 import {reactive} from "vue";
 import {useRouter} from "vue-router"
 
-import { ref } from 'vue'
+import { ref, onMounted, onBeforeUnmount } from 'vue';  
+import { WebSocketHost ,host} from '@/utils/constants'
+import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
+const adjustedRects = ref([]);
 
 const dialogFormVisible = ref(true)
 const dialogFormVisiblea = ref(false)
@@ -22,55 +25,53 @@
   }
 }
 
-const gridOptions = reactive({
-  border:  "full",//琛ㄦ牸鍔犺竟妗�
-  keepSource: true,//淇濇寔婧愭暟鎹�
-  align: 'center',//鏂囧瓧灞呬腑
-  stripe:true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
-  id: 'OrderList',
-  showFooter: true,//鏄剧ず鑴�
-  printConfig: {},
-  importConfig: {},
-  exportConfig: {},
-  scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔�
-  showOverflow:true,
-  columnConfig: {
-    resizable: true,
-    useKey: true
-  },
-  filterConfig: {   //绛涢�夐厤缃」
-    remote: true
-  },
-  customConfig: {
-    storage: true
-  },
-  editConfig: {
-    trigger: 'click',
-    mode: 'row',
-    showStatus: true
-  },
-  data:  [
-    {
-    }
-  ],
-})
+const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
+// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
+const handleMessage = (data) => {
+  // 鏇存柊 tableData 鐨勬暟鎹�
+  adjustedRects.value =  data.overGlass[0].map(rect => ({  
+        ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
+        xcoordinate: rect.xCoordinate * 0.5, // 灏唜鍊奸櫎浠�3  
+        ycoordinate: rect.ycoordinate * 0.5,
+        width: rect.width * 0.4,
+        height: rect.height * 0.4,
+        widtha: rect.width,
+        heighta: rect.height,
+      })); 
+      console.log(data.intoGlass[0]);
+};
+onMounted(() => {
+  // fetchFlowCardId();
+  // fetchTableData(); // 鑾峰彇鏁版嵁
+  initializeWebSocket(socketUrl, handleMessage);
+});
+
+onBeforeUnmount(() => {
+  console.log("鍏抽棴浜�")
+  closeWebSocket();
+});
 </script>
 
 <template>
   <div style="margin-top: 10px;">
 <div>
     <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
-      <div style="display: flex;margin-top: 20px;">
-      <div style="margin-left: 400px;font-size: 20px;">宸ョ▼鍙凤細P20240305001 </div>
-      <div style="margin-left: 150px;font-size: 20px;">鐗堝浘缂栧彿锛�1</div>
-    </div>
-    <div>
-            <div id="boxa" style="width: 700px;height: 220px;margin-left: 260px;">
-              <div style="margin-top: 85px;"> NG202405060798A01-1</div> 
-            <div> 500脳1500</div>
-          </div>
-    </div>
+    <el-scrollbar height="630px">
+    <div  style="position: relative;width: 1400px;">  
+      <div  
+      v-for="(rect, index) in adjustedRects"
+      :key="index"  
+      class="rect"  
+      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+       width: `${rect.width}px`, height: `${rect.height}px`,
+       backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }">
+     <div  class="centered-text">
+    <div >{{ rect.flowcardId }}</div>  
+    <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div>  
+  </div>
+  </div> 
+   </div>
+   </el-scrollbar>
     </el-card>
     </div>
   </div>
@@ -87,4 +88,15 @@
   margin-top: 70px;
   margin-bottom: 50px;
 }
+.rect {  
+  border: 1px solid black; /* 璁剧疆鐭╁舰鐨勮竟妗� */  
+  background-color: lightblue; /* 璁剧疆鐭╁舰鐨勮儗鏅壊 */  
+} 
+.centered-text {
+  /* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */  
+  display: flex;  
+  justify-content: center;  
+  align-items: center;  
+  height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */  
+} 
 </style>
\ No newline at end of file
diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index 2aadf11..84df863 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -68,7 +68,7 @@
       label: thickness,  
     })); 
     } else {
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
   } catch (error) {
     // 澶勭悊璇锋眰澶辫触鐨勬儏鍐�
@@ -91,7 +91,7 @@
       flakea.value = true
     }
           } else {
-          ElMessage.warning(res.msg)
+          ElMessage.warning(res.message)
           // router.push("/login")
           }
           });
@@ -210,7 +210,7 @@
     }
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
   } catch (error) {  
       // 澶勭悊璇锋眰閿欒  
@@ -249,7 +249,7 @@
     }
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
   } catch (error) {  
       // 澶勭悊璇锋眰閿欒  
@@ -291,7 +291,7 @@
     }
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
   } catch (error) {
     // 澶勭悊閿欒
@@ -337,7 +337,8 @@
     })); 
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
+      // ElMessage.error(response.msg);
     }
 }
 catch (error) {
@@ -362,10 +363,10 @@
       ElMessage.success(response.message);
       // window.location.reload() 
       blind.value = false;
-      selectedProjectNoa.value = ''
+      selectedProjectNoa.value = '';
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
 }
 catch (error) {
@@ -390,10 +391,10 @@
     if (response.code == 200) {
       ElMessage.success(response.message);
       blinda.value = false;
-      tableData.splice([]);
+      // tableData.splice([]);
     } else {
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
   }
     else  {
@@ -426,7 +427,7 @@
       tableData.splice([]);
 
       // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-      ElMessage.error(response.msg);
+      ElMessage.error(response.message);
     }
   }
     else  {
@@ -494,8 +495,29 @@
 const confirmCuttingMachine = () => {  
   cuttingMachineStatus.value = 'green';  
 }; 
-
-
+const toggleEnableState = async (row: any) => {  
+  // 妫�鏌� id 鏄惁涓虹┖  
+  if (!row.id) {  
+    ElMessage.error('璇ュ伐绋嬫湭淇濆瓨鍒颁笂鐗囪〃锛�');  
+    return; // 濡傛灉 id 涓虹┖锛屽垯涓嶆墽琛屽悗缁搷浣�  
+  }  
+  
+  const newState = row.state === 100 ? 0 : 100;  
+  
+  try {  
+    // 鍙戦�佽姹傚埌鍚庣鏇存柊鐘舵��  
+    const response = await request.post('/loadGlass/up-patten-usage/updateGlassState', { id: row.id, state: newState });  
+    if (response.code === 200) {  
+      ElMessage.success(response.message);  
+    } else {  
+      ElMessage.error(response.message);  
+    }  
+  } catch (error) {  
+    // 澶勭悊璇锋眰閿欒  
+    console.error('鏇存柊鐜荤拑鐘舵�佽姹傚け璐�:', error);  
+    ElMessage.error('鏇存柊鐜荤拑鐘舵�佹椂鍙戠敓閿欒');  
+  }  
+};  
 
 const wsUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
 const ws = new WebSocket(wsUrl);  
@@ -569,7 +591,7 @@
     <el-button @click="confirmCuttingMachine" style="margin-left: 30px;margin-top: -3px;" >纭</el-button>
     <div style="margin-left: 70px;">{{ upstatus  }} </div>
     <i :style="{ marginTop: '2px', backgroundColor: cuttingMachineStatusColor, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>  
-    <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;" >纭</el-button>
+    <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;" >鍒囨崲</el-button>
    
   </div>
     <el-button style="margin-top: 5px;margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">閫夋嫨宸ョ▼</el-button>
@@ -591,7 +613,7 @@
       <el-table-column prop="filmsId" label="鑶滅郴" align="center"/>
       <el-table-column prop="layoutSequence" label="鏁伴噺" align="center"/>
       <el-table-column prop="thickness" label="鍘氬害" align="center"/>
-      <el-table-column
+      <!-- <el-table-column
             align="center"
             label="鐘舵��"
             min-width="80"
@@ -601,7 +623,21 @@
         <el-tag :type="getStatusType(scope.row.state)">  
           {{ getStatusText(scope.row.state) }}  
         </el-tag>  
-      </template> 
+      </template>  -->
+      <el-table-column
+          align="center"
+            label="鍚敤鐘舵��"
+            min-width="80"
+            prop="state"
+          >
+          <template #default="scope">  
+          <el-tag  
+            :type="scope.row.state === 100 ? 'success' : 'warning'"  
+            @click="toggleEnableState(scope.row)"  
+          >  
+            {{ scope.row.state === 100 ? '閫氳繃' : '绛夊緟涓�' }}  
+          </el-tag>  
+        </template> 
           </el-table-column>
     </el-table>
       </div>
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index e87bae7..068a4da 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -529,7 +529,7 @@
         @selection-change="handleSelectionChange"
         :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
           <el-table-column prop="id" align="center" label="澶х悊鐗囩琛↖D" min-width="80" />
-          <el-table-column prop="deviceId" align="center" label="璁惧ID" min-width="120" />
+          <el-table-column prop="deviceId" align="center" label="鐞嗙墖绗煎彿" min-width="120" />
           <el-table-column prop="slot" align="center" label="鏍呮牸鍙�" min-width="120" />
           <el-table-column
             align="center"
diff --git a/hangzhoumesParent.zip b/hangzhoumesParent.zip
deleted file mode 100644
index c049891..0000000
--- a/hangzhoumesParent.zip
+++ /dev/null
Binary files differ
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
index 7b756d8..73763d9 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
@@ -34,7 +34,7 @@
     public static final Integer GLASS_STATE_IN = 100;
     public static final Integer GLASS_STATE_OUT = 101;
     public static final Integer GLASS_STATE_TAKE = 200;
-    public static final Integer A10_OUT_TARGET_DAMAGE = 201;
+    public static final Integer GLASS_STATE_DAMAGE = 201;
 
     /**
      * 鍗у紡鐞嗙墖绗艰鎯呰〃鐜荤拑鐘舵��
@@ -56,4 +56,78 @@
     public static final Integer EDG_GLASS_START = 1;
     public static final Integer EDG_GLASS_SUCCESS = 2;
 
+    /**
+     * 纾ㄨ竟浠诲姟鐜荤拑鐘舵��
+     * 1鍗曟満鑷姩鐘舵��
+     * 2鑱旀満鑷姩鐘舵��
+     * 3鎵嬪姩鐘舵��
+     */
+    public static final Integer BIG_STORAGE_STAND_ALONE = 1;
+    public static final Integer BIG_STORAGE_ONLINE = 2;
+    public static final Integer BIG_STORAGE_MT = 3;
+
+    /**
+     * 澶х悊鐗囩璇锋眰
+     * 0 澶х悊鐗囩鏃犺姹�
+     * 1 澶х悊鐗囩杩涚墖璇锋眰
+     */
+    public static final Integer BIG_STORAGE_REQUEST = 0;
+    public static final Integer BIG_STORAGE_REQUEST_IN = 1;
+
+    /**
+     * 鍗ц浆绔嬭繘鐗囪姹�
+     * 1 浠诲姟鐢熸垚
+     * 2 鍗ц浆绔嬭繘鐗囧畬鎴�
+     * 3 澶ц溅杩涚墖瀹屾垚
+     * 4 澶х悊鐗囩杩涚墖瀹屾垚
+     */
+    public static final Integer BIG_STORAGE_IN_NEW = 1;
+    public static final Integer BIG_STORAGE_IN_UP = 2;
+    public static final Integer BIG_STORAGE_IN_CAR = 3;
+    public static final Integer BIG_STORAGE_IN_SLOT = 4;
+    /**
+     * 鍗ц浆绔嬪嚭鐗囪姹�
+     * 1 浠诲姟鐢熸垚
+     * 2 鐜荤拑杩涘ぇ杞﹀畬鎴�
+     * 3 澶ц溅鍑虹墖瀹屾垚
+     */
+    public static final Integer BIG_STORAGE_OUT_NEW = 1;
+    public static final Integer BIG_STORAGE_OUT_CAR = 2;
+    public static final Integer BIG_STORAGE_OUT_SUCCESS = 3;
+
+    /**
+     * 鍗ц浆绔嬪嚭鐗囪姹�
+     * 1 涓婅溅绛夊緟
+     * 2 涓婅溅鍚姩
+     */
+    public static final Integer BIG_STORAGE_IN_WAIT = 1;
+    public static final Integer BIG_STORAGE_IN_RUN = 2;
+
+    /**
+     * 澶х悊鐗囩瀹藉害 鍙� 鐜荤拑闂磋窛
+     */
+    public static final Integer BIG_STORAGE_WIDTH = 5000;
+    public static final Integer BIG_STORAGE_GAP = 20;
+
+    /**
+     * 閽㈠寲灏忕墖琛�
+     * -1 鐢熸垚浠诲姟
+     * 0  鍑虹墖瀹屾垚
+     * 1  鎽嗙墖瀹屾垚
+     * 2  杩涚倝瀹屾垚
+     * 3  閽㈠寲瀹屾垚
+     * 4  鍑虹墖瀹屾垚
+     * 5  鐮存崯
+     * 6  鎷胯蛋
+     */
+
+    public static final Integer TEMPERING_NEW =-1;
+    public static final Integer TEMPERING_OUT =0;
+    public static final Integer TEMPERING_DROP =1;
+    public static final Integer TEMPERING_START =2;
+    public static final Integer TEMPERING_SUCCESS =3;
+    public static final Integer TEMPERING_END =4;
+    public static final Integer TEMPERING_DAMAGE =5;
+    public static final Integer TEMPERING_TAKE =6;
+
 }
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/GlassInfoService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
index f85f7f8..6d78c74 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
@@ -3,6 +3,7 @@
 import com.mes.glassinfo.entity.GlassInfo;
 import com.github.yulichang.base.MPJBaseService;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -22,5 +23,17 @@
        * 淇濆瓨灏忕墖琛�
        */
       void saveGlassInfo(List<GlassInfo> glassinfo);
+
+      /**
+       * @param flowCardId
+       * @return 鏍规嵁娴佺▼鍗″彿鏌ヨ鐜荤拑淇℃伅
+       */
+      int getGlassInfoCountByFlowCardId(String flowCardId);
+
+      /**
+       * @return
+       * 鏌ヨ鎵�鏈夊伐绋嬬姸鎬佷笉涓�300涓嶅悓娴佺▼鍗″彿
+       */
+      List<Map<String, Object>> getFlowCardId();
 }
 
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
index be26553..8ba557f 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
@@ -1,20 +1,24 @@
 package com.mes.glassinfo.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.query.MPJQueryWrapper;
+import com.github.yulichang.toolkit.JoinWrappers;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.entity.OptimizeGlassinfo;
 import com.mes.glassinfo.mapper.GlassInfoMapper;
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.pp.entity.OptimizeProject;
 import com.mes.pp.mapper.OptimizeProjectMapper;
+import com.mes.uppattenusage.entity.UpPattenUsage;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -80,4 +84,37 @@
     public void saveGlassInfo(List<GlassInfo> glassinfo) {
         this.saveBatch(glassinfo);
     }
+
+
+
+
+
+
+    @Override
+    public int getGlassInfoCountByFlowCardId(String flowCardId) {
+        return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda()
+                .eq(GlassInfo::getFlowCardId, flowCardId));
+    }
+
+
+
+    @Override
+    public List<Map<String, Object>> getFlowCardId() {
+        return baseMapper.selectJoinMaps(JoinWrappers.lambda(GlassInfo.class)
+                .select(GlassInfo::getFlowCardId)
+                .leftJoin(UpPattenUsage.class, on -> on
+                        .eq(OptimizeProject::getProjectNo, GlassInfo::getEngineerId)
+                        .ne(OptimizeProject::getState, 300)
+                )
+                .groupBy(GlassInfo::getFlowCardId)
+        );
+    }
+
+
+
+
+
+
+
+
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
similarity index 95%
rename from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
rename to hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
index 8aaa9b1..ac47c7b 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
@@ -91,6 +91,10 @@
      * 鐘舵��
      */
     private Integer state;
+    /**
+     * 鏍煎瓙鍙�
+     */
+    private Integer slot;
 
 
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
similarity index 64%
rename from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
rename to hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
index 76f6375..dc41a61 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
@@ -1,7 +1,6 @@
 package com.mes.temperingglass.mapper;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
 
@@ -14,6 +13,6 @@
  * @since 2024-04-07
  */
 @DS("salve_hangzhoumes")
-public interface TemperingGlassInfoMapper extends BaseMapper<TemperingGlassInfo>, MPJBaseMapper<TemperingGlassInfo> {
+public interface TemperingGlassInfoMapper extends MPJBaseMapper<TemperingGlassInfo> {
 
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java
similarity index 73%
rename from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java
rename to hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java
index 6a1bc50..83088d7 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java
@@ -15,9 +15,11 @@
 
     List<TemperingGlassInfo> selectWaitingGlass();
 
-    List<TemperingGlassInfo> selectIntoGlass();
+    List<TemperingGlassInfo> selectIntoGlass(int layoutId);
 
     List<TemperingGlassInfo> selectOutGlass();
 
-    TemperingGlassInfo selectOverGlass();
+    List<TemperingGlassInfo> selectOverGlass();
+
+    List<TemperingGlassInfo> selectLayoutId();
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java
similarity index 65%
rename from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java
rename to hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java
index 592580c..01ed8a7 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java
@@ -4,11 +4,11 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
 import com.mes.temperingglass.mapper.TemperingGlassInfoMapper;
-import com.mes.temperingglass.mapper.TemperingMapper;
 import com.mes.temperingglass.service.TemperingAgoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+
 import java.util.List;
 
 /**
@@ -23,7 +23,7 @@
 @DS("salve_hangzhoumes")
 public class TemperingAgoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingAgoService {
     @Autowired
-    TemperingMapper temperingMapper;
+    TemperingGlassInfoMapper temperingMapper;
 
     @Override
     public List<TemperingGlassInfo> selectWaitingGlass() {
@@ -35,10 +35,11 @@
     }
 
     @Override
-    public List<TemperingGlassInfo> selectIntoGlass() {
+    public List<TemperingGlassInfo> selectIntoGlass(int layoutId) {
         //鑾峰彇杩涚倝涓殑鐜荤拑淇℃伅
         QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
         wrapper.eq("state",2)
+                .eq("tempering_layout_id", layoutId)
                 .orderByAsc("tempering_layout_id","tempering_feed_sequence");
         return temperingMapper.selectList(wrapper);
     }
@@ -53,12 +54,24 @@
     }
 
     @Override
-    public TemperingGlassInfo selectOverGlass() {
-        //鑾峰彇杩囨棆杞彴鐨勭幓鐠�
+    public List<TemperingGlassInfo> selectOverGlass() {
+        //鑾峰彇杩囨棆杞彴鏈�澶х殑閽㈠寲鐗堝浘id
         QueryWrapper<TemperingGlassInfo> wapper = new QueryWrapper<>();
         wapper.select("top 1 *").eq("state", 4)
-                .orderByAsc("tempering_layout_id")
-                .orderByDesc("tempering_feed_sequence");
-        return temperingMapper.selectOne(wapper);
+                .orderByDesc("tempering_layout_id");
+        //鏍规嵁鏈�澶х殑鐗堝浘id鏄剧ず閽㈠寲鍚庣殑鐗堝浘淇℃伅
+        TemperingGlassInfo glassinfo= temperingMapper.selectOne(wapper);
+        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
+        wrapper.eq("tempering_layout_id",glassinfo.getTemperingLayoutId());
+        return  temperingMapper.selectList(wrapper);
+    }
+
+    @Override
+    public List<TemperingGlassInfo> selectLayoutId() {
+        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
+        wrapper.select("distinct tempering_layout_id")
+                .eq("state",2)
+                .orderByAsc("tempering_layout_id");
+        return temperingMapper.selectList(wrapper);
     }
 }
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java
deleted file mode 100644
index 08fa5a6..0000000
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.mes.glassinfo.controller;
-
-import com.mes.glassinfo.entity.GlassInfo;
-import com.mes.glassinfo.service.GlassInfoService;
-import com.mes.utils.Result;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * <p>
- * 鍓嶇鎺у埗鍣�
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-@Api(description = "鐜荤拑淇℃伅灏忕墖")
-@RestController
-@RequestMapping("/glassInfo")
-public class GlassInfoController {
-
-    @Autowired
-    private GlassInfoService glassInfoService;
-
-    @ApiOperation("鏍规嵁鐜荤拑灏忕墖ID鏌ヨ 鐜荤拑鏁版嵁锛氬弬鏁�(鐜荤拑ID)")
-    @PostMapping("/selectId")
-    @ResponseBody
-    public Result selectId(String ProcessId) {
-        List<GlassInfo> list = glassInfoService.selectId(ProcessId);
-        return Result.build(200,"鎴愬姛",list);
-    }
-    @ApiOperation("鏌ヨ鎵�鏈夌幓鐠冨皬鐗囦俊鎭� 鐜荤拑鏁版嵁   鍙傛暟()")
-    @PostMapping("/selectAll")
-    @ResponseBody
-    public Result selectAll() {
-        List<GlassInfo> list = glassInfoService.selectAll();
-        return Result.build(200,"鎴愬姛",list);
-    }
-    @ApiOperation("鏌ヨ宸ョ▼涓嬬殑鐜荤拑灏忕墖淇℃伅 鐜荤拑鏁版嵁  鍙傛暟(宸ョ▼鍙�)")
-    @PostMapping("/selectFlowCardId")
-    @ResponseBody
-    public Result selectFlowCardId(String flowCardId) {
-        List<GlassInfo> list = glassInfoService.selectFlowCardId(flowCardId);
-        return Result.build(200,"鎴愬姛",list);
-    }
-}
-
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
deleted file mode 100644
index ade0460..0000000
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.mes.glassinfo.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.github.yulichang.base.MPJBaseMapper;
-import com.mes.glassinfo.entity.GlassInfo;
-
-/**
- * <p>
- * Mapper 鎺ュ彛
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-public interface GlassInfoMapper extends MPJBaseMapper<GlassInfo> {
-
-}
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
deleted file mode 100644
index f5117b0..0000000
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.mes.glassinfo.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.mes.glassinfo.entity.GlassInfo;
-
-import java.util.List;
-
-/**
- * <p>
- *  鏈嶅姟绫�
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-public interface GlassInfoService extends IService<GlassInfo> {
-
-    /**
-     * 鏌ヨ鎵�鏈夌幓鐠冨皬鐗囦俊鎭�
-     * @return
-     */
-    public List<GlassInfo> selectAll();
-
-    /**
-     * 鏍规嵁鐜荤拑缂栧彿鏌ヨ鐜荤拑灏忕墖淇℃伅
-     * @param glassId
-     * @return
-     */
-    public List<GlassInfo> selectId(String glassId);
-
-    /**
-     * 鏍规嵁宸ョ▼鍙锋煡璇㈢幓鐠冨皬鐗囦俊鎭�
-     * @param flowCardId
-     * @return
-     */
-    public List<GlassInfo> selectFlowCardId(String flowCardId);
-}
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
deleted file mode 100644
index 7e04d74..0000000
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.mes.glassinfo.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.yulichang.query.MPJLambdaQueryWrapper;
-import com.github.yulichang.wrapper.MPJLambdaWrapper;
-import com.mes.glassinfo.entity.GlassInfo;
-import com.mes.glassinfo.mapper.GlassInfoMapper;
-import com.mes.glassinfo.service.GlassInfoService;
-import com.mes.taskcache.entity.TaskCache;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>
- *  鏈嶅姟瀹炵幇绫�
- * </p>
- *
- * @author zhoush
- * @since 2024-04-07
- */
-@Service
-public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService {
-
-
-    /**
-     * 鏍规嵁ID 鑾峰彇灏忕墖鏁版嵁
-     * @param glassId
-     * @return
-     */
-    @Override
-    public List<GlassInfo> selectId(String glassId){
-        return baseMapper.selectList(new MPJLambdaWrapper<GlassInfo>().selectAll(GlassInfo.class).eq(GlassInfo::getGlassId,glassId));
-//        return baseMapper.selectList(new QueryWrapper<GlassInfo>().eq("glass_id",glassId));
-    };
-
-    /**
-     * 鑾峰彇鍏ㄩ儴灏忕墖鏁版嵁
-     * @return
-     */
-    @Override
-    public List<GlassInfo> selectAll(){
-        return baseMapper.selectList(null);
-    };
-
-    /**
-     * 鏍规嵁宸ョ▼ 鑾峰彇灏忕墖鏁版嵁
-     * @param flowCardId
-     * @return
-     */
-    @Override
-    public List<GlassInfo> selectFlowCardId(String flowCardId){
-        return baseMapper.selectList(new MPJLambdaWrapper<GlassInfo>().selectAll(GlassInfo.class).eq(GlassInfo::getFlowCardId,flowCardId));
-        //Sql鐗堟湰
-//        return baseMapper.selectList(new QueryWrapper<GlassInfo>().eq("flow_card_id",flowCardId));
-    };
-}
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
index 83c2289..a63c890 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -490,7 +490,7 @@
     public EdgStorageCageDetails queryChangeGlassInfo(int endcell, String glassId) {
         //鑾峰彇绗煎瓙鍐呮暟閲忓墠浜岀殑鐜荤拑鏁伴噺
         MPJQueryWrapper<EdgStorageCageDetails> wrapper = new MPJQueryWrapper<>();
-        wrapper.select("count(t.glass_id), t.width, t.height")
+        wrapper.select("count(t.glass_id) as count, t.width, t.height")
                 .eq("t.state", Const.GLASS_STATE_IN)
                 .groupBy("t.width, t.height");
         if (endcell == Const.A09_OUT_TARGET_POSITION) {
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-cz.yml
similarity index 64%
copy from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
copy to hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-cz.yml
index 2454814..0ab1e56 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-cz.yml
@@ -5,12 +5,17 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://192.168.1.199:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
-          password: root
+          password: beibo.123/
+          driver-class-name: com.mysql.cj.jdbc.Driver
+        pp:
+          url: jdbc:mysql://192.168.1.199:3306/pp?serverTimezone=GMT%2b8
+          username: root
+          password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         salve_hangzhoumes:
-          url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
+          url: jdbc:sqlserver://192.168.10.2:1433;databasename=hangzhoumes
           username: sa
           password: beibo.123/
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
@@ -18,6 +23,8 @@
     nacos:
       discovery:
         server-addr: 127.0.0.1:8848
+  application:
+    name: cacheGlass
   redis:
     database: 0
     host: 127.0.0.1
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml
index 13f6aaa..3a964d1 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-dev.yml
@@ -4,33 +4,18 @@
       primary: hangzhoumes #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
-#        hangzhoumes:
-#          url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8
-#          username: root
-#          password: beibo.123/
-#          driver-class-name: com.mysql.cj.jdbc.Driver
-#        pp:
-#          url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8
-#          username: root
-#          password: beibo.123/
-#          driver-class-name: com.mysql.cj.jdbc.Driver
-#        salve_hangzhoumes:
-#          url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
-#          username: sa
-#          password: beibo.123/
-#          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
         hangzhoumes:
-          url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         pp:
-          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
+          url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         salve_hangzhoumes:
-          url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes
+          url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
           username: sa
           password: beibo.123/
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-loc.yml
deleted file mode 100644
index 477e2cb..0000000
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application-loc.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-spring:
-  datasource:
-    dynamic:
-      primary: hangzhoumes #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
-      strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
-      datasource:
-        hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-        pp:
-          url: jdbc:mysql://192.168.56.10:3306/pp?serverTimezone=GMT%2b8
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-  cloud:
-    nacos:
-      discovery:
-        server-addr: 127.0.0.1:8848
-  application:
-    name: cacheGlass
-  redis:
-    database: 0
-    host: 127.0.0.1
-    port: 6379
-    password: 123456
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
index 9be3f0b..39fd32a 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -3,7 +3,7 @@
 
 spring:
   profiles:
-    active: dev
+    active: cz
   application:
     name: cacheGlass
 mybatis-plus:
@@ -17,3 +17,4 @@
   secondLength: 2500
   sequence:
     order: false
+
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
index 855eddd..4bf1348 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
@@ -1,16 +1,15 @@
 package com.mes;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.github.yulichang.query.MPJLambdaQueryWrapper;
-import com.github.yulichang.query.MPJQueryWrapper;
 import com.github.yulichang.toolkit.JoinWrappers;
+import com.mes.common.config.Const;
 import com.mes.edgstoragecage.entity.EdgStorageCage;
 import com.mes.edgstoragecage.entity.EdgStorageCageDetails;
 import com.mes.edgstoragecage.service.EdgStorageCageDetailsService;
 import com.mes.edgstoragecage.service.EdgStorageCageService;
-import com.mes.edgstoragecage.service.impl.EdgStorageCageServiceImpl;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.service.GlassInfoService;
+import com.mes.job.CacheGlassTask;
 import com.mes.pp.entity.OptimizeDetail;
 import com.mes.pp.entity.OptimizeLayout;
 import com.mes.pp.mapper.OptimizeDetailMapper;
@@ -24,6 +23,7 @@
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
+import javax.annotation.Resource;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -35,15 +35,14 @@
  */
 @Slf4j
 @RunWith(SpringRunner.class)
-@SpringBootTest(classes = CacheGlassModuleApplication.class)
+@SpringBootTest(classes = CacheGlassModuleApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 public class CacheGlassModuleApplicationTest {
 
     @Autowired
     EdgStorageCageService edgStorageCageService;
     @Autowired
     EdgStorageCageDetailsService edgStorageCageDetailsService;
-
-    @Autowired
+    @Resource
     TaskCacheMapper taskCacheMapper;
 
     @Autowired
@@ -52,17 +51,57 @@
     OptimizeDetailMapper optimizeDetailMapper;
     @Autowired
     GlassInfoService glassInfoService;
+    @Autowired
+    CacheGlassTask cacheGlassTask;
 
     @Test
     public void testFindPath() {
-        String url=getClass().getResource("").getPath();
+        String url = getClass().getResource("").getPath();
         log.info("瀹屾暣璺緞锛歿}", Arrays.asList(url));
     }
 
     @Test
+    public void queryChangeGlassInfo() {
+        cacheGlassTask.queryChangeGlassInfo(Const.A10_OUT_TARGET_POSITION, "");
+    }
+
+    @Test
+    public void testChangeCellSize() {
+//        String url=getClass().getResource("").getPath();
+//        log.info("瀹屾暣璺緞锛歿}", Arrays.asList(url));
+        cacheGlassTask.queryChangeGlassInfo(Const.A09_OUT_TARGET_POSITION, "");
+    }
+
+    @Test
+    public void testCellSize() {
+//        String url=getClass().getResource("").getPath();
+//        log.info("瀹屾暣璺緞锛歿}", Arrays.asList(url));
+        cacheGlassTask.outTo(0, 0, "", "NG24051802A001|1|1|1|1", 0);
+    }
+
+    @Test
+    public void testinTo() {
+//        String url=getClass().getResource("").getPath();
+//        log.info("瀹屾暣璺緞锛歿}", Arrays.asList(url));
+//        NG24051802A001|1|4|1|4
+//        cacheGlassTask.inTo("NG24051802A001|1|1|1|1", "1", "1");
+//        cacheGlassTask.inTo("NG24051802A001|1|4|1|4", "1", "1");
+        cacheGlassTask.inTo("NG24051802A001|1|1|2|1", "1", "1");
+    }
+
+    @Test
+    public void testChangeGlassInfo() {
+//        String url=getClass().getResource("").getPath();
+//        log.info("瀹屾暣璺緞锛歿}", Arrays.asList(url));
+//        NG24051802A001|1|4|1|4
+        cacheGlassTask.queryAndChangeGlass("NG24051802A001|1|1|1|1");
+//        cacheGlassTask.queryAndChangeGlass("NG24051802A001|1|4|1|4");
+    }
+
+    @Test
     public void testSqlServer() {
-                List<TaskCache> list=taskCacheMapper.selectList(null);
-                log.info("鏁版嵁{}",list);
+        List<TaskCache> list = taskCacheMapper.selectList(null);
+        log.info("鏁版嵁{}", list);
         log.info("Sql鏁版嵁锛歿}", Arrays.asList(list));
     }
 
@@ -73,55 +112,53 @@
         log.info("Sql鏁版嵁锛歿}", Arrays.asList(list));
     }
 
-    @Test
-    public void testglassinfo() {
-        List<GlassInfo> glassInfos=glassInfoService.selectId("7");
-        log.info("鐜荤拑鏁版嵁鏁版嵁锛歿}", Arrays.asList(glassInfos));
-    }
 
     @Test
     public void testCacheGlass() {
-        List<Map<String, Object>> map= edgStorageCageService.selectEdgStorageCages();
+        List<Map<String, Object>> map = edgStorageCageService.selectEdgStorageCages();
         log.info("绗煎唴淇℃伅锛歿}", Arrays.asList(map));
     }
+
     @Test
     public void testSelectCacheEmpty() {
-        List<EdgStorageCage> map= edgStorageCageService.selectCacheEmpty();
+        List<EdgStorageCage> map = edgStorageCageService.selectCacheEmpty();
         log.info("绗煎唴绌烘牸锛歿}", Arrays.asList(map));
     }
+
     @Test
     public void testScan() {
-        List<Map<String, Object>> map= edgStorageCageDetailsService.selectCutTerritory();
+        List<Map<String, Object>> map = edgStorageCageDetailsService.selectCutTerritory();
         log.info("鍒囧壊褰撳墠鐗堝浘淇℃伅锛歿}", Arrays.asList(map));
     }
 
     @Test
     public void testPpOptimizeDetail() {
-        List<OptimizeDetail> optimizeDetail=optimizeDetailMapper.selectList(new QueryWrapper<OptimizeDetail>()
+        List<OptimizeDetail> optimizeDetail = optimizeDetailMapper.selectList(new QueryWrapper<OptimizeDetail>()
                 .eq("project_no", "P24032204")
-                .eq("stock_id",5)
+                .eq("stock_id", 5)
         );
         log.info("鍒囧壊褰撳墠鐗堝浘淇℃伅锛歿}", Arrays.asList(optimizeDetail));
 
     }
+
     @Test
     public void testOptimizeDetail() {
-        List<Map<String, Object>> map2=optimizeDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeDetail.class)
+        List<Map<String, Object>> map2 = optimizeDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeDetail.class)
                 .selectAll(OptimizeDetail.class)
-                .selectAs(OptimizeLayout::getWidth,"olWidth")
-                .selectAs(OptimizeLayout::getWidth,"olHeight")
-                .select(OptimizeLayout::getWidth,OptimizeLayout::getHeight)
-                .leftJoin(OptimizeLayout.class,on-> on.eq(OptimizeLayout::getProjectNo,OptimizeDetail::getProjectNo)
-                        .eq(OptimizeLayout::getStockId,OptimizeDetail::getStockId))
-                .eq(OptimizeDetail::getProjectNo,"P24032204" )
-                .eq(OptimizeDetail::getStockId,5)
+                .selectAs(OptimizeLayout::getWidth, "olWidth")
+                .selectAs(OptimizeLayout::getWidth, "olHeight")
+                .select(OptimizeLayout::getWidth, OptimizeLayout::getHeight)
+                .leftJoin(OptimizeLayout.class, on -> on.eq(OptimizeLayout::getProjectNo, OptimizeDetail::getProjectNo)
+                        .eq(OptimizeLayout::getStockId, OptimizeDetail::getStockId))
+                .eq(OptimizeDetail::getProjectNo, "P24032204")
+                .eq(OptimizeDetail::getStockId, 5)
         );
         log.info("鍒囧壊褰撳墠鐗堝浘淇℃伅1锛歿}", Arrays.asList(map2));
     }
 
     @Test
     public void testOutTask() {
-        EdgStorageCageDetails edgStorageCageDetails=edgStorageCageDetailsService.selectConformGlass("1",3);
+        EdgStorageCageDetails edgStorageCageDetails = edgStorageCageDetailsService.selectConformGlass("1", 3);
 
         log.info("鍑虹墖浠诲姟锛歿}", Arrays.asList(edgStorageCageDetails));
     }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageDTO.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageDTO.java
new file mode 100644
index 0000000..24ab69c
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageDTO.java
@@ -0,0 +1,14 @@
+package com.mes.bigstorage.entity;
+
+import lombok.Data;
+
+/**
+ * @Author : zhoush
+ * @Date: 2024/6/11 16:45
+ * @Description:
+ */
+@Data
+public class BigStorageDTO {
+    private Integer slot;
+    private Integer width;
+}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java
index 9d6169f..64b7ecb 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java
@@ -2,6 +2,8 @@
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.mes.bigstorage.entity.BigStorageCageDetails;
+import com.mes.bigstorage.entity.BigStorageDTO;
+import com.mes.glassinfo.entity.GlassInfo;
 
 import java.util.List;
 
@@ -30,4 +32,11 @@
     void finishBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails);
 
     void outBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails);
+
+    /**
+     * 鎸夌収鐗堝浘淇℃伅鑾峰彇杩涚墖绗煎瓙淇℃伅
+     *
+     * @param glassInfo
+     */
+    BigStorageDTO queryTargetSlotByTempering(GlassInfo glassInfo);
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageService.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageService.java
index f135fa4..3d204b7 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageService.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageService.java
@@ -1,9 +1,8 @@
 package com.mes.bigstorage.service;
 
-import com.baomidou.mybatisplus.extension.service.IService;
+import com.github.yulichang.base.MPJBaseService;
 import com.mes.bigstorage.entity.BigStorageCage;
 import com.mes.bigstorage.entity.BigStorageCageDetails;
-import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.entity.GlassInfo;
 
 import java.util.List;
@@ -17,7 +16,7 @@
  * @author zhoush
  * @since 2024-03-27
  */
-public interface BigStorageCageService extends IService<BigStorageCage> {
+public interface BigStorageCageService extends MPJBaseService<BigStorageCage> {
 
     void updateRemainWidth(int slot);
 
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
index 012ef6c..ebaec10 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
@@ -1,8 +1,12 @@
 package com.mes.bigstorage.service.impl;
 
+import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.mes.bigstorage.entity.BigStorageCage;
 import com.mes.bigstorage.entity.BigStorageCageDetails;
+import com.mes.bigstorage.entity.BigStorageDTO;
 import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper;
 import com.mes.bigstorage.service.BigStorageCageDetailsService;
 import com.mes.bigstorage.service.BigStorageCageService;
@@ -10,6 +14,7 @@
 import com.mes.bigstoragetask.entity.BigStorageCageOutTask;
 import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper;
 import com.mes.bigstoragetask.mapper.BigStorageCageOutTaskMapper;
+import com.mes.common.config.Const;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.mapper.GlassInfoMapper;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
@@ -49,14 +54,14 @@
      */
     @Override
     public List<BigStorageCageDetails> selectTask(int taskType) {
-        if(taskType==1){
+        if (taskType == 1) {
             //杩涚墖浠诲姟鏁版嵁
             LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>();
             feedWrapper.eq(BigStorageCageDetails::getState, 1)
                     .or()
                     .eq(BigStorageCageDetails::getState, 2);
-            List<BigStorageCageDetails> bigStorageCageDetailsList=baseMapper.selectList(feedWrapper);
-            List<BigStorageCageFeedTask> bigStorageCageFeedTaskList=bigStorageCageFeedTaskMapper.selectList(null);
+            List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper);
+            List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(null);
 
             Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream()
                     .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task));
@@ -66,14 +71,14 @@
                 bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask);
             }
             return bigStorageCageDetailsList;
-        }else{
+        } else {
             //鍑虹墖浠诲姟鏁版嵁
             LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>();
             outWrapper.eq(BigStorageCageDetails::getState, 3)
                     .or()
                     .eq(BigStorageCageDetails::getState, 4);
-            List<BigStorageCageDetails> bigStorageCageDetailsList=baseMapper.selectList(outWrapper);
-            List<BigStorageCageOutTask> bigStorageCageOutTaskList=bigStorageCageOutTaskMapper.selectList(null);
+            List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper);
+            List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(null);
 
             Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream()
                     .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task));
@@ -90,27 +95,27 @@
      * 鍒ゆ柇褰撳墠鐜荤拑鏄惁鑳戒笂杞�
      */
     @Override
-    public double selectGetBoard(String plcFeedReqLine){
-        double carWidth=5000;
+    public double selectGetBoard(String plcFeedReqLine) {
+        double carWidth = 5000;
         LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>();
         feedWrapper.eq(BigStorageCageDetails::getState, plcFeedReqLine);
-        List<BigStorageCageDetails> bigStorageCageDetailsList=baseMapper.selectList(feedWrapper);
+        List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper);
 
         LambdaQueryWrapper<BigStorageCageFeedTask> bigStorageCageFeedTaskWrapper = new LambdaQueryWrapper<>();
         bigStorageCageFeedTaskWrapper
-                .eq(BigStorageCageFeedTask::getTaskState,plcFeedReqLine)
-                .eq(BigStorageCageFeedTask::getLine,plcFeedReqLine);
+                .eq(BigStorageCageFeedTask::getTaskState, plcFeedReqLine)
+                .eq(BigStorageCageFeedTask::getLine, plcFeedReqLine);
 
-        List<BigStorageCageFeedTask> bigStorageCageFeedTaskList=bigStorageCageFeedTaskMapper.selectList(bigStorageCageFeedTaskWrapper);
+        List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(bigStorageCageFeedTaskWrapper);
         Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream()
                 .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task));
         for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) {
             BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId());
             bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask);
         }
-        for (BigStorageCageDetails bigStorageCageDetails:bigStorageCageDetailsList
-             ) {
-            if(bigStorageCageDetails.getBigStorageCageFeedTask().getTaskState()==0){
+        for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList
+        ) {
+            if (bigStorageCageDetails.getBigStorageCageFeedTask().getTaskState() == 0) {
                 carWidth -= Integer.parseInt(bigStorageCageDetails.getWidth().toString()) + bigStorageCageDetails.getGap();
             }
         }
@@ -121,25 +126,25 @@
 
     //鏍撻櫎鍑虹墖浠诲姟.鏇存柊鏍煎瓙瀹藉害
     @Override
-    public void deleteBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails){
+    public void deleteBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) {
         baseMapper.deleteById(bigStorageCageDetails.getId());
         bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot());
     }
 
     //鐞嗙墖绗艰鎯呯牬鎹�
     @Override
-    public void damageBigStorageCageDetails(String glassId){
-        LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoWrapper=new LambdaQueryWrapper<>();
-        temperingGlassInfoWrapper.eq(TemperingGlassInfo::getGlassId,glassId);
-        TemperingGlassInfo temperingGlassInfo=temperingGlassInfoMapper.selectOne(temperingGlassInfoWrapper);
+    public void damageBigStorageCageDetails(String glassId) {
+        LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoWrapper = new LambdaQueryWrapper<>();
+        temperingGlassInfoWrapper.eq(TemperingGlassInfo::getGlassId, glassId);
+        TemperingGlassInfo temperingGlassInfo = temperingGlassInfoMapper.selectOne(temperingGlassInfoWrapper);
 
-        LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper=new LambdaQueryWrapper<>();
-        bigStorageCageDetailsWrapper.eq(BigStorageCageDetails::getGlassId,glassId);
-        BigStorageCageDetails bigStorageCageDetails=baseMapper.selectOne(bigStorageCageDetailsWrapper);
+        LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper = new LambdaQueryWrapper<>();
+        bigStorageCageDetailsWrapper.eq(BigStorageCageDetails::getGlassId, glassId);
+        BigStorageCageDetails bigStorageCageDetails = baseMapper.selectOne(bigStorageCageDetailsWrapper);
 
-        if(temperingGlassInfo.getState()==-2){
+        if (temperingGlassInfo.getState() == -2) {
             temperingGlassInfoMapper.deleteById(temperingGlassInfo);
-        }else{
+        } else {
             temperingGlassInfo.setState(5);
             temperingGlassInfoMapper.updateById(temperingGlassInfo);
         }
@@ -151,11 +156,11 @@
 
     //鏌ヨ鐜荤拑淇℃伅
     @Override
-    public BigStorageCageDetails selectBigStorageCageDetails(String glassId){
-        LambdaQueryWrapper<GlassInfo> glassInfoWrapper=new LambdaQueryWrapper<>();
-        glassInfoWrapper.eq(GlassInfo::getGlassId,glassId);
-        GlassInfo glassInfo=glassInfoMapper.selectOne(glassInfoWrapper);
-        BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails();
+    public BigStorageCageDetails selectBigStorageCageDetails(String glassId) {
+        LambdaQueryWrapper<GlassInfo> glassInfoWrapper = new LambdaQueryWrapper<>();
+        glassInfoWrapper.eq(GlassInfo::getGlassId, glassId);
+        GlassInfo glassInfo = glassInfoMapper.selectOne(glassInfoWrapper);
+        BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails();
         BeanUtils.copyProperties(glassInfo, bigStorageCageDetails);
         bigStorageCageDetails.setState(0);
         bigStorageCageDetails.setGap(20);
@@ -164,19 +169,19 @@
 
     //鐞嗙墖绗艰鎯呮坊鍔�
     @Override
-    public void insertBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails){
+    public void insertBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) {
         baseMapper.insert(bigStorageCageDetails);
         bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot());
     }
 
     //鐞嗙墖绗艰鎯呭畬鎴�
     @Override
-    public void finishBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails){
-        if(bigStorageCageDetails.getState()==1||bigStorageCageDetails.getState()==2){
+    public void finishBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) {
+        if (bigStorageCageDetails.getState() == 1 || bigStorageCageDetails.getState() == 2) {
             bigStorageCageDetails.setState(0);
             baseMapper.updateById(bigStorageCageDetails);
             bigStorageCageFeedTaskMapper.deleteById(bigStorageCageDetails.getBigStorageCageFeedTask().getId());
-        }else{
+        } else {
             baseMapper.deleteById(bigStorageCageDetails.getId());
             bigStorageCageOutTaskMapper.deleteById(bigStorageCageDetails.getBigStorageCageOutTask().getId());
         }
@@ -185,25 +190,67 @@
 
     //鎵嬪姩鍑虹墖
     @Override
-    public void outBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails){
-        LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoWrapper =new LambdaQueryWrapper<>();
+    public void outBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) {
+        LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoWrapper = new LambdaQueryWrapper<>();
         temperingGlassInfoWrapper
-                .eq(TemperingGlassInfo::getGlassId,bigStorageCageDetails.getGlassId());
-        TemperingGlassInfo temperingGlassInfo=temperingGlassInfoMapper.selectOne(temperingGlassInfoWrapper);
-        if(temperingGlassInfo.getGlassId()==null){
-            LambdaQueryWrapper<GlassInfo> glassInfoWrapper=new LambdaQueryWrapper<>();
+                .eq(TemperingGlassInfo::getGlassId, bigStorageCageDetails.getGlassId());
+        TemperingGlassInfo temperingGlassInfo = temperingGlassInfoMapper.selectOne(temperingGlassInfoWrapper);
+        if (temperingGlassInfo.getGlassId() == null) {
+            LambdaQueryWrapper<GlassInfo> glassInfoWrapper = new LambdaQueryWrapper<>();
             glassInfoWrapper
-                    .eq(GlassInfo::getGlassId,bigStorageCageDetails.getGlassId());
-            GlassInfo glassInfo=glassInfoMapper.selectOne(glassInfoWrapper);
-            TemperingGlassInfo temperingGlassInfo1=new TemperingGlassInfo();
+                    .eq(GlassInfo::getGlassId, bigStorageCageDetails.getGlassId());
+            GlassInfo glassInfo = glassInfoMapper.selectOne(glassInfoWrapper);
+            TemperingGlassInfo temperingGlassInfo1 = new TemperingGlassInfo();
             BeanUtils.copyProperties(glassInfo, temperingGlassInfo1);
 
-            if(temperingGlassInfo.getTemperingLayoutId()!=null){
+            if (temperingGlassInfo.getTemperingLayoutId() != null) {
                 temperingGlassInfo1.setState(-1);
-            }else{
+            } else {
                 temperingGlassInfo1.setState(-2);
             }
             temperingGlassInfoMapper.insert(temperingGlassInfo1);
         }
     }
+
+    @Override
+    public BigStorageDTO queryTargetSlotByTempering(GlassInfo glassInfo) {
+//        MPJLambdaWrapper<BigStorageDTO> wrapper = new MPJLambdaWrapper<>(BigStorageCage.class)
+//                .selectAll(BigStorageDTO.class)
+//                .leftJoin(BigStorageCageDetails.class, BigStorageCageDetails::getSlot, BigStorageCage::getSlot)
+//                .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId())
+//                .eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1)
+//                .last("limit 1");
+        BigStorageDTO bigStorageDTO = null;
+        MPJLambdaWrapper<BigStorageCage> wrapper = new MPJLambdaWrapper<>(BigStorageCage.class)
+                .selectAsClass(BigStorageCage.class, BigStorageDTO.class)
+                .leftJoin(BigStorageCageDetails.class, BigStorageCageDetails::getSlot, BigStorageCage::getSlot)
+                .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId())
+                .eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1)
+                .last("limit 1");
+        bigStorageDTO = bigStorageCageService.selectJoinOne(BigStorageDTO.class, wrapper);
+        if (null != bigStorageDTO) {
+            return bigStorageDTO;
+        }
+        BigStorageCage bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
+                .eq(BigStorageCage::getRemainWidth, Const.BIG_STORAGE_WIDTH)
+                .inSql(BigStorageCage::getDeviceId,
+                        "select distinct device_id from big_storage_cage_details where tempering_layout_id = " + glassInfo.getTemperingLayoutId())
+                .last("limit 1"));
+        if (null != bigStorageCage) {
+            bigStorageDTO = new BigStorageDTO();
+            bigStorageDTO.setWidth(bigStorageCage.getRemainWidth());
+            bigStorageDTO.setSlot(bigStorageCage.getSlot());
+            return bigStorageDTO;
+        }
+        bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
+                .eq(BigStorageCage::getRemainWidth, Const.BIG_STORAGE_WIDTH)
+                .last("limit 1"));
+        Assert.isTrue(null != bigStorageCage, "娌℃湁绌轰綑鐨勭瀛愬瓨鏀剧幓鐠�");
+        bigStorageDTO = new BigStorageDTO();
+        bigStorageDTO.setWidth(bigStorageCage.getRemainWidth());
+        bigStorageDTO.setSlot(bigStorageCage.getSlot());
+        return bigStorageDTO;
+
+
+    }
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/entity/BigStorageCageFeedTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/entity/BigStorageCageFeedTask.java
index 18c8c2f..c8e0a81 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/entity/BigStorageCageFeedTask.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/entity/BigStorageCageFeedTask.java
@@ -2,12 +2,13 @@
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.io.Serializable;
-
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -27,8 +28,8 @@
     /**
      * 涓婚敭id
      */
-      @ApiModelProperty(value = "涓婚敭id", position = 2)
-      @TableId(value = "id", type = IdType.AUTO)
+    @ApiModelProperty(value = "涓婚敭id", position = 2)
+    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     /**
@@ -41,7 +42,7 @@
      * 鐩爣浣嶇疆
      */
     @ApiModelProperty(value = "鐩爣浣嶇疆", position = 4)
-    private Integer tragetSlot;
+    private Integer targetSlot;
 
     /**
      * 鐜荤拑绫诲瀷
@@ -60,6 +61,21 @@
      */
     @ApiModelProperty(value = "绾胯矾", position = 7)
     private Integer line;
+    /**
+     * 瀹藉害
+     */
+    @ApiModelProperty(value = "瀹藉害", position = 8)
+    private Integer width;
+    /**
+     * 楂樺害
+     */
+    @ApiModelProperty(value = "楂樺害", position = 8)
+    private Integer height;
+    /**
+     * 鍒涘缓鏃堕棿
+     */
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿", position = 8)
+    private Date createTime;
 
 
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/mapper/BigStorageCageFeedTaskMapper.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/mapper/BigStorageCageFeedTaskMapper.java
index 9722bca..3e0794e 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/mapper/BigStorageCageFeedTaskMapper.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/mapper/BigStorageCageFeedTaskMapper.java
@@ -1,8 +1,10 @@
 package com.mes.bigstoragetask.mapper;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
-import com.mes.bigstoragetask.entity.BigStorageCageFeedTask;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mes.bigstoragetask.entity.BigStorageCageFeedTask;
+
+import java.util.List;
 
 /**
  * <p>
@@ -15,4 +17,5 @@
 @DS("salve_hangzhoumes")
 public interface BigStorageCageFeedTaskMapper extends BaseMapper<BigStorageCageFeedTask> {
 
+    List<String> querySitToUpGlass();
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/BigStorageCageFeedTaskService.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/BigStorageCageFeedTaskService.java
index f9a3cf8..669023d 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/BigStorageCageFeedTaskService.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/BigStorageCageFeedTaskService.java
@@ -1,9 +1,8 @@
 package com.mes.bigstoragetask.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.mes.bigstorage.entity.BigStorageCageDetails;
 import com.mes.bigstoragetask.entity.BigStorageCageFeedTask;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.mes.bigstoragetask.entity.BigStorageCageOutTask;
 
 import java.util.List;
 
@@ -20,4 +19,9 @@
     void addFeedTask(BigStorageCageDetails slotInfo, Integer plcFeedReqLine, int taskType);
 
     List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState);
+
+    /**
+     * 鏌ヨ鍗ц浆绔嬬幓鐠冩槸鍚﹁繘鐗囧畬鎴�
+     */
+    List<String> querySitToUpGlass();
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/impl/BigStorageCageFeedTaskServiceImpl.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/impl/BigStorageCageFeedTaskServiceImpl.java
index 5a4b62b..716c92a 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/impl/BigStorageCageFeedTaskServiceImpl.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/impl/BigStorageCageFeedTaskServiceImpl.java
@@ -1,16 +1,13 @@
 package com.mes.bigstoragetask.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.mes.bigstorage.entity.BigStorageCageDetails;
 import com.mes.bigstoragetask.entity.BigStorageCageFeedTask;
-import com.mes.bigstoragetask.entity.BigStorageCageOutTask;
 import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper;
 import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import net.bytebuddy.matcher.FilterableList;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -30,15 +27,19 @@
         bigStorageCageFeedTask.setId(slotInfo.getId());
         bigStorageCageFeedTask.setTaskState(0);
         bigStorageCageFeedTask.setLine(plcFeedReqLine);
-        bigStorageCageFeedTask.setTragetSlot(slotInfo.getSlot());
         bigStorageCageFeedTask.setTaskType(taskType);
         baseMapper.insert(bigStorageCageFeedTask);
     }
 
     @Override
-    public List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState){
-        LambdaQueryWrapper<BigStorageCageFeedTask> getFeedTaskWrapper=new LambdaQueryWrapper<>();
-        getFeedTaskWrapper.eq(BigStorageCageFeedTask::getTaskState,taskState);
+    public List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState) {
+        LambdaQueryWrapper<BigStorageCageFeedTask> getFeedTaskWrapper = new LambdaQueryWrapper<>();
+        getFeedTaskWrapper.eq(BigStorageCageFeedTask::getTaskState, taskState);
         return baseMapper.selectList(getFeedTaskWrapper);
     }
+
+    @Override
+    public List<String> querySitToUpGlass() {
+        return baseMapper.querySitToUpGlass();
+    }
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/controller/DamageController.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/controller/DamageController.java
new file mode 100644
index 0000000..29a1038
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/controller/DamageController.java
@@ -0,0 +1,21 @@
+package com.mes.damage.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  鍓嶇鎺у埗鍣�
+ * </p>
+ *
+ * @author wu
+ * @since 2024-06-13
+ */
+@RestController
+@RequestMapping("/glassinfo/damage")
+public class DamageController {
+
+}
+
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/entity/Damage.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/entity/Damage.java
new file mode 100644
index 0000000..0467855
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/entity/Damage.java
@@ -0,0 +1,44 @@
+package com.mes.damage.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wu
+ * @since 2024-06-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class Damage implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+      @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    private String glassId;
+
+    private Integer deviceId;
+
+    private String engineerId;
+
+    private Integer temperingLayoutId;
+
+    private LocalDateTime damageTime;
+
+    private String remark;
+
+    private Integer type;
+
+    private Integer status;
+
+
+}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/mapper/DamageMapper.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/mapper/DamageMapper.java
new file mode 100644
index 0000000..2b2bc54
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/mapper/DamageMapper.java
@@ -0,0 +1,16 @@
+package com.mes.damage.mapper;
+
+import com.mes.damage.entity.Damage;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 鎺ュ彛
+ * </p>
+ *
+ * @author wu
+ * @since 2024-06-13
+ */
+public interface DamageMapper extends BaseMapper<Damage> {
+
+}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/service/DamageService.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/service/DamageService.java
new file mode 100644
index 0000000..ae90667
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/damage/service/DamageService.java
@@ -0,0 +1,16 @@
+package com.mes.damage.service;
+
+import com.mes.damage.entity.Damage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  鏈嶅姟绫�
+ * </p>
+ *
+ * @author wu
+ * @since 2024-06-13
+ */
+public interface DamageService extends IService<Damage> {
+
+}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/edgglasstask/entity/EdgGlassTaskInfo.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/edgglasstask/entity/EdgGlassTaskInfo.java
index f6e8f1c..c007100 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/edgglasstask/entity/EdgGlassTaskInfo.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/edgglasstask/entity/EdgGlassTaskInfo.java
@@ -1,13 +1,12 @@
 package com.mes.edgglasstask.entity;
 
-import cn.hutool.core.date.DateTime;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
 
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -73,6 +72,6 @@
      * 绾胯矾
      */
     @ApiModelProperty(value = "鏃堕棿", position = 9)
-    private DateTime time;
+    private Date time;
 
 }
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
index e5610a7..02228b4 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
@@ -1,24 +1,39 @@
 package com.mes.job;
+
+import cn.hutool.core.lang.Assert;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.mes.bigstorage.entity.BigStorageCageDetails;
+import com.mes.bigstorage.entity.BigStorageDTO;
 import com.mes.bigstorage.service.BigStorageCageDetailsService;
 import com.mes.bigstorage.service.BigStorageCageService;
 import com.mes.bigstoragetask.entity.BigStorageCageFeedTask;
-import com.mes.bigstoragetask.entity.BigStorageCageOutTask;
 import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService;
 import com.mes.bigstoragetask.service.BigStorageCageOutTaskService;
 import com.mes.common.S7object;
+import com.mes.common.config.Const;
 import com.mes.device.PlcParameterObject;
+import com.mes.edgglasstask.entity.EdgGlassTaskInfo;
 import com.mes.edgglasstask.service.EdgGlassTaskInfoService;
-import com.mes.edgstoragetask.service.TaskCacheService;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.temperingglass.service.TemperingGlassInfoService;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
 
 /**
  * @author SNG-015
@@ -42,109 +57,335 @@
     @Resource
     private TemperingGlassInfoService temperingGlassInfoService;
 
-    PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
+    @Value("${mes.sequence.order}")
+    private boolean sequenceOrder;
 
     public static boolean bigStorageCageFullAlarm = false;
 
-    private int line1Time=0;
-    private int line2Time=0;
+    private int line1Time = 0;
+    private int line2Time = 0;
 
     /**
      * fixedRate : 涓婁竴涓皟鐢ㄥ紑濮嬪悗鍐嶆璋冪敤鐨勫欢鏃讹紙涓嶇敤绛夊緟涓婁竴娆¤皟鐢ㄥ畬鎴愶級
      * fixedDelay : 涓婁竴涓皟鐢ㄧ粨鏉熷悗鍐嶆璋冪敤鐨勫欢鏃�
      */
+//    @Scheduled(fixedDelay = 5000)
+//    public void plcStorageCageTask() throws InterruptedException {
+//
+//        PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
+//        try {
+//
+//            String plcFeedGlassid = "";
+//            String plcFeedReqLine = "0";
+//            if ("1".equals(plcParameterObject.getPlcParameter("D01Request").getValue())) {
+//                plcFeedReqLine = "1";
+//                plcFeedGlassid = plcParameterObject.getPlcParameter("D01ID1").getValue();
+//            }
+//            if ("1".equals(plcParameterObject.getPlcParameter("D04Request").getValue())) {
+//                plcFeedReqLine = "2";
+//                plcFeedGlassid = plcParameterObject.getPlcParameter("D04ID1").getValue();
+//            }
+//            line1Time += 1;
+//            line2Time += 1;
+//
+//            if (!("0".equals(plcFeedReqLine))) {
+//                log.info("1銆丳lc杩涚墖璇锋眰鏃�");
+//                BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails();
+//                GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid);
+//                log.info("2銆佹牴鎹幓鐠僫d鑾峰彇鐜荤拑淇℃伅" + glassInfo);
+//                if (bigStorageCageDetailsService.selectGetBoard(plcFeedReqLine) >= 0) {
+//                    BigStorageCageDetails slotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails);
+//                    if (slotInfo != null) {
+//                        int taskType = edgGlassTaskInfoService.judgeTasktype(plcFeedReqLine);
+//                        log.info("3銆佹煡璇换鍔¤〃鍒ゆ柇褰撳墠浠诲姟绫诲瀷涓轰笂杞︾瓑鍒拌繕鏄笂杞﹀惎鍔�" + taskType);
+//                        bigStorageCageFeedTaskService.addFeedTask(slotInfo, Integer.parseInt(plcFeedReqLine), taskType);
+//                        log.info("4銆佹坊鍔犱换鍔″埌浠诲姟琛�");
+//                        bigStorageCageFullAlarm = false;
+//                    } else {
+//                        bigStorageCageFullAlarm = true;
+//                    }
+//                } else {
+//                    log.info("褰撳墠鐜荤拑瀹藉害涓嶅涓婅溅" + glassInfo);
+//                    if (!("1".equals(plcFeedReqLine))) {
+//                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D02Go").getAddress(), 1);
+//                    } else {
+//                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D05Go").getAddress(), 1);
+//                    }
+//                }
+//            } else {
+//                List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskService.querybigStorageCageFeedTask(1);
+//                log.info("5銆佹煡璇换鍔¤〃鏄惁鏈夊凡缁忓畬鎴愮殑杩涚墖浠诲姟" + bigStorageCageFeedTaskList.size());
+//                for (BigStorageCageFeedTask bigStorageCageFeedTask : bigStorageCageFeedTaskList
+//                ) {
+//                    BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails();
+//                    bigStorageCageDetails.setId(bigStorageCageFeedTask.getId());
+//                    bigStorageCageDetails.setState(1);
+//                    bigStorageCageDetailsService.updateById(bigStorageCageDetails);
+//                    log.info("6銆佷慨鏀圭悊鐗囩璇︽儏鐜荤拑鐘舵��");
+//                    bigStorageCageFeedTaskService.removeById(bigStorageCageFeedTask);
+//                    log.info("7銆佸垹闄ゅ凡缁忓畬鎴愮殑杩涚墖浠诲姟");
+//                }
+//                //鍚姩闃堝��
+//                if (line1Time >= 300) {
+//                    if ("0".equals(plcParameterObject.getPlcParameter("D05Go").getValue())) {
+//                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D02Go").getAddress(), 1);
+//                    }
+//                }
+//                if (line2Time >= 300) {
+//                    if ("0".equals(plcParameterObject.getPlcParameter("D02Go").getValue())) {
+//                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D05Go").getAddress(), 1);
+//                    }
+//                }
+//            }
+//
+//            //鏌ヨ鍑虹墖琛ㄦ槸鍚︽湁浠诲姟鏈畬鎴愮殑浠诲姟
+//            List<BigStorageCageOutTask> bigStorageCageOutTask = bigStorageCageOutTaskService.querybigStorageCageOutTask(0);
+//            if (bigStorageCageOutTask.size() == 0) {
+//                boolean result = bigStorageCageService.outGlass();
+//                log.info("8銆佹病鏈夋湭瀹屾垚浠诲姟鏃惰皟鐢ㄥ嚭鐗囨帴鍙�");
+//                if (result == false) {
+//                    temperingGlassInfoService.schedulingTask();
+//                }
+//            }
+//            bigStorageCageOutTaskService.updateOutTask();
+//            log.info("9銆佹牴鎹换鍔¤〃鐘舵�佷慨鏀归挗鍖栧皬鐗囪〃浠诲姟鐘舵��");
+//
+//            //鏉ヤ笉鍙婇�佹椂鐩存帴璧�
+//            String line = Integer.toString(edgGlassTaskInfoService.startTask());
+//
+//            if (!(line.equals(plcFeedReqLine))) {
+//                S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D02Go").getAddress(), 1);
+//            } else {
+//                S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D05Go").getAddress(), 1);
+//            }
+//
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//    }
     @Scheduled(fixedDelay = 5000)
-    public void plcStorageCageTask() throws InterruptedException {
-        try {
-
-            String plcFeedGlassid = "";
-            String plcFeedReqLine = "0";
-            if ("1".equals(plcParameterObject.getPlcParameter("D01Request").getValue())) {
-                plcFeedReqLine = "1";
-                plcFeedGlassid=plcParameterObject.getPlcParameter("D01ID1").getValue();
-            }
-            if ("1".equals(plcParameterObject.getPlcParameter("D04Request").getValue())) {
-                plcFeedReqLine = "2";
-                plcFeedGlassid=plcParameterObject.getPlcParameter("D04ID1").getValue();
-            }
-            line1Time+=1;
-            line2Time+=1;
-
-            if (!("0".equals(plcFeedReqLine))) {
-                log.info("1銆丳lc杩涚墖璇锋眰鏃�");
-                BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails();
-                GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid);
-                log.info("2銆佹牴鎹幓鐠僫d鑾峰彇鐜荤拑淇℃伅" + glassInfo);
-                if(bigStorageCageDetailsService.selectGetBoard(plcFeedReqLine)>=0){
-                    BigStorageCageDetails slotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails);
-                    if (slotInfo != null) {
-                        int taskType = edgGlassTaskInfoService.judgeTasktype(plcFeedReqLine);
-                        log.info("3銆佹煡璇换鍔¤〃鍒ゆ柇褰撳墠浠诲姟绫诲瀷涓轰笂杞︾瓑鍒拌繕鏄笂杞﹀惎鍔�" + taskType);
-                        bigStorageCageFeedTaskService.addFeedTask(slotInfo, Integer.parseInt(plcFeedReqLine), taskType);
-                        log.info("4銆佹坊鍔犱换鍔″埌浠诲姟琛�");
-                        bigStorageCageFullAlarm = false;
-                    } else {
-                        bigStorageCageFullAlarm = true;
-                    }
-                }else{
-                    log.info("褰撳墠鐜荤拑瀹藉害涓嶅涓婅溅" + glassInfo);
-                    if(!("1".equals(plcFeedReqLine))){
-                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D02Go").getAddress(), 1);
-                    }else{
-                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D05Go").getAddress(), 1);
-                    }
-                }
-            } else {
-                List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskService.querybigStorageCageFeedTask(1);
-                log.info("5銆佹煡璇换鍔¤〃鏄惁鏈夊凡缁忓畬鎴愮殑杩涚墖浠诲姟" + bigStorageCageFeedTaskList.size());
-                for (BigStorageCageFeedTask bigStorageCageFeedTask : bigStorageCageFeedTaskList
-                ) {
-                    BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails();
-                    bigStorageCageDetails.setId(bigStorageCageFeedTask.getId());
-                    bigStorageCageDetails.setState(1);
-                    bigStorageCageDetailsService.updateById(bigStorageCageDetails);
-                    log.info("6銆佷慨鏀圭悊鐗囩璇︽儏鐜荤拑鐘舵��");
-                    bigStorageCageFeedTaskService.removeById(bigStorageCageFeedTask);
-                    log.info("7銆佸垹闄ゅ凡缁忓畬鎴愮殑杩涚墖浠诲姟");
-                }
-                //鍚姩闃堝��
-                if(line1Time>=300){
-                    if("0".equals(plcParameterObject.getPlcParameter("D05Go").getValue())){
-                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D02Go").getAddress(), 1);
-                    }
-                }
-                if(line2Time>=300){
-                    if("0".equals(plcParameterObject.getPlcParameter("D02Go").getValue())){
-                        S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D05Go").getAddress(), 1);
-                    }
-                }
-            }
-
-            //鏌ヨ鍑虹墖琛ㄦ槸鍚︽湁浠诲姟鏈畬鎴愮殑浠诲姟
-            List<BigStorageCageOutTask> bigStorageCageOutTask=bigStorageCageOutTaskService.querybigStorageCageOutTask(0);
-            if(bigStorageCageOutTask.size()==0){
-                boolean result=bigStorageCageService.outGlass();
-                log.info("8銆佹病鏈夋湭瀹屾垚浠诲姟鏃惰皟鐢ㄥ嚭鐗囨帴鍙�");
-                if (result==false){
-                    temperingGlassInfoService.schedulingTask();
-                }
-            }
-            bigStorageCageOutTaskService.updateOutTask();
-            log.info("9銆佹牴鎹换鍔¤〃鐘舵�佷慨鏀归挗鍖栧皬鐗囪〃浠诲姟鐘舵��");
-
-            //鏉ヤ笉鍙婇�佹椂鐩存帴璧�
-            String line=Integer.toString(edgGlassTaskInfoService.startTask());
-
-            if(!(line.equals(plcFeedReqLine))){
-                S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D02Go").getAddress(), 1);
-            }else{
-                S7object.getinstance().plccontrol.writetime(plcParameterObject.getPlcParameter("D05Go").getAddress(), 1);
-            }
-
-
-        } catch (Exception e) {
-            e.printStackTrace();
+    public void plcToHomeEdgScan() {
+        PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
+        String d01Request = plcParameterObject.getPlcParameter("D01Request").getValue();
+        String d01ID1 = plcParameterObject.getPlcParameter("D01ID1").getValue();
+        String d04Request = plcParameterObject.getPlcParameter("D04Request").getValue();
+        String d04ID1 = plcParameterObject.getPlcParameter("D04ID1").getValue();
+        log.info("1銆佽幏鍙栧埌鐨勮姹傚瓧d01涓猴細{}锛岃幏鍙栧埌鐨勬壂鎻廔D涓猴細{};鑾峰彇鍒扮殑璇锋眰瀛梔04涓猴細{}锛岃幏鍙栧埌鐨勬壂鎻廔D涓猴細{};",
+                d01Request, d01ID1, d04Request, d04ID1);
+        if (!"1".equals(d01Request) && !"1".equals(d04Request)) {
+            log.info("涓ゆ潯绾挎湭鏀跺埌杩涚墖浠诲姟锛岀粨鏉熸湰娆℃壂鎻忚繘鍗ц浆绔嬩换鍔�");
+            return;
+        }
+        //        0锛氫笉骞查 锛� 1锛氭潯浠舵弧瓒虫儏鍐典笅绔嬪嵆鍙戣溅
+        String d02GoAdress = plcParameterObject.getPlcParameter("D02Go").getAddress();
+        //        0锛氫笉骞查 锛� 1锛氭潯浠舵弧瓒虫儏鍐典笅绔嬪嵆鍙戣溅
+        String d05GoAdress = plcParameterObject.getPlcParameter("D05Go").getAddress();
+        Boolean flag01 = Boolean.FALSE;
+        Boolean flag04 = Boolean.FALSE;
+        //鎸夌収绾胯矾鍙婄幓鐠僫d鑾峰彇鐩搁偦涓ゅ潡鐜荤拑 鍗ц浆绔嬩笂鐨勭幓鐠�
+        if ("1".equals(d01Request)) {
+            flag01 = judgeGlassTypeStatus(d01ID1, Const.A09_OUT_TARGET_POSITION);
+        }
+        if ("1".equals(d04Request)) {
+            flag04 = judgeGlassTypeStatus(d04ID1, Const.A10_OUT_TARGET_POSITION);
+        }
+        if (flag01 && flag04) {
+            //姣旇緝鏈�鏃╀竴鐗囦换鍔$殑鐗堝浘id鍙婄増搴� 姹傚嚭鍗ц浆绔嬬殑绾胯矾
+            Integer startLine = getStartLine();
+            //璁$畻鐩爣鏍煎瓙锛屽彂閫佸惎鍔ㄤ换鍔�
+            computeTargetByLine(startLine, d02GoAdress, d05GoAdress);
+        } else if (flag01 || flag04) {
+            Integer startLine = flag01.equals(Boolean.TRUE) ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION;
+            //璁$畻鐩爣鏍煎瓙锛屽彂閫佸惎鍔ㄤ换鍔�
+            computeTargetByLine(startLine, d02GoAdress, d05GoAdress);
+        } else {
+            log.info("涓ゆ潯绾挎湭鏀跺埌杩涚墖浠诲姟锛岀粨鏉熸湰娆℃壂鎻忚繘鍗ц浆绔嬩换鍔�");
         }
     }
 
+    @Scheduled(fixedDelay = 5000)
+    public void plcToHomeEdgFreeCarTask() {
+        PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
+        String freeCar = plcParameterObject.getPlcParameter("freeCar").getValue();
+        if ("1".equals(freeCar)) {
+            log.info("澶ц溅闈炵┖闂�");
+            return;
+        }
+        String d01Request = plcParameterObject.getPlcParameter("D01Request").getValue();
+        String d01ID1 = plcParameterObject.getPlcParameter("D01ID1").getValue();
+        String d04Request = plcParameterObject.getPlcParameter("D04Request").getValue();
+        String d04ID1 = plcParameterObject.getPlcParameter("D04ID1").getValue();
+        log.info("1銆佽幏鍙栧埌鐨勮姹傚瓧d01涓猴細{}锛岃幏鍙栧埌鐨勬壂鎻廔D涓猴細{};鑾峰彇鍒扮殑璇锋眰瀛梔04涓猴細{}锛岃幏鍙栧埌鐨勬壂鎻廔D涓猴細{};",
+                d01Request, d01ID1, d04Request, d04ID1);
+        //涓ゆ潯绾块兘鏈夎繘鍗ц浆绔嬩换鍔★紝鐩存帴缁撴潫
+        if (Const.BIG_STORAGE_REQUEST_IN.equals(d01Request)
+                && Const.BIG_STORAGE_REQUEST_IN.equals(d04Request)
+                && StringUtils.isNotBlank(d01ID1)
+                && StringUtils.isNotBlank(d04ID1)) {
+            log.info("涓ゆ潯绾块兘瀛樺湪杩涚墖浠诲姟锛岀粨鏉熶换鍔�");
+            return;
+        }
+        //鑾峰彇涓ゆ潯绾垮崸杞珛鏄惁鏈夌幓鐠冿紝涓斾换鍔$姸鎬侀兘涓�2
+        List<String> lineList = bigStorageCageFeedTaskService.querySitToUpGlass();
+        if (CollectionUtils.isEmpty(lineList)) {
+            log.info("涓ゆ潯绾垮崸杞珛涓虹┖鎴栬�呮湁杩涚墖浠诲姟鏈畬鎴愶紝缁撴潫浠诲姟");
+            return;
+        }
+//        0锛氫笉骞查 锛� 1锛氭潯浠舵弧瓒虫儏鍐典笅绔嬪嵆鍙戣溅
+        String d02GoAdress = plcParameterObject.getPlcParameter("D02Go").getAddress();
+        //        0锛氫笉骞查 锛� 1锛氭潯浠舵弧瓒虫儏鍐典笅绔嬪嵆鍙戣溅
+        String d05GoAdress = plcParameterObject.getPlcParameter("D05Go").getAddress();
+        String line1 = lineList.get(0);
+        String flagLine = line1.equals(Const.A09_OUT_TARGET_POSITION) ? d01ID1 : d04ID1;
+        if (lineList.size() == 1) {
+            //鍙戦��
+            if (StringUtils.isNotBlank(flagLine)) {
+                return;
+            }
+            //璁$畻浠诲姟琛ㄨ繘鐗囨牸瀛� 鍙戦�佽繘鐗囦换鍔�
+            computeTargetByLine(Integer.parseInt(flagLine), d02GoAdress, d05GoAdress);
+        }
+        if (StringUtils.isBlank(d01ID1) && StringUtils.isBlank(d04ID1)) {
+            //姣旇緝鏈�鏃╀竴鐗囦换鍔$殑鐗堝浘id鍙婄増搴� 姹傚嚭鍗ц浆绔嬬殑绾胯矾
+            Integer line = getStartLine();
+            //璁$畻浠诲姟琛ㄨ繘鐗囨牸瀛� 鍙戦�佽繘鐗囦换鍔�
+            computeTargetByLine(line, d02GoAdress, d05GoAdress);
+            return;
+        }
+        int outLine = StringUtils.isBlank(d01ID1) ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION;
+        //璁$畻浠诲姟琛ㄨ繘鐗囨牸瀛� 鍙戦�佽繘鐗囦换鍔�
+        computeTargetByLine(outLine, d02GoAdress, d05GoAdress);
+    }
+
+    @Scheduled(fixedDelay = 5000)
+    public void plcToHomeEdgOutTask() {
+
+    }
+
+
+    /**
+     * 鎸夌収鐜荤拑id鍒ゆ柇鐜荤拑鐘舵�佸強鍗ц浆绔嬫槸鍚﹀彲鐩存帴鍚姩
+     */
+    public Boolean judgeGlassTypeStatus(String glassId, Integer line) {
+        //1銆佽幏鍙栦换鍔¤〃涓浉閭荤幓鐠�
+        List<EdgGlassTaskInfo> edgGlassTaskInfoList = edgGlassTaskInfoService.list(new LambdaQueryWrapper<EdgGlassTaskInfo>()
+                .eq(EdgGlassTaskInfo::getLine, line)
+                .apply("time >= (select time from edg_glass_task_info where glass_id = '" + glassId + "')")
+                .orderByAsc(EdgGlassTaskInfo::getTime));
+        Assert.isFalse(CollectionUtils.isEmpty(edgGlassTaskInfoList), "璇嗗埆鐜荤拑淇℃伅鏈嚭鐜板湪灏哄琛ㄤ腑,鑾峰彇鐩搁偦涓ゅ潡鐜荤拑澶辫触");
+        //2銆佽幏鍙栧崸杞珛鍓╀綑瀹藉害
+        Map<String, Object> map = bigStorageCageFeedTaskService.getMap(new QueryWrapper<BigStorageCageFeedTask>()
+                .select("cast(5000 - sum(width + 20)  as INT)as remainWidth")
+                .eq("line", line).eq("task_state", Const.BIG_STORAGE_IN_UP));
+        Integer remainWidth = null == map ? 5000 : Integer.parseInt(map.get("remainWidth") + "");
+        //2銆佽幏鍙栧崸杞珛
+        Integer widthFirst = edgGlassTaskInfoList.get(0).getWidth();
+        if (edgGlassTaskInfoList.size() == 1) {
+            if (remainWidth >= widthFirst) {
+                addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst);
+                return Boolean.FALSE;
+            } else {
+                //璁板綍鏃犳硶鏀句笅鐜荤拑锛屽悗缁垽鏂惎鍔�
+                return Boolean.TRUE;
+            }
+        }
+        Integer widthSecond = edgGlassTaskInfoList.get(1).getWidth();
+        if (remainWidth >= widthFirst) {
+            if (remainWidth - widthFirst - Const.BIG_STORAGE_GAP >= widthSecond) {
+                addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthSecond);
+            } else {
+                addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthSecond);
+            }
+            return Boolean.FALSE;
+
+        } else {
+            return Boolean.TRUE;
+        }
+    }
+
+    /**
+     * 娣诲姞浠诲姟淇℃伅
+     */
+    private Boolean addFeedTask(String glassId, Integer line, Integer taskType, Integer width) {
+        BigStorageCageFeedTask bigStorageCageFeedTask = new BigStorageCageFeedTask();
+        bigStorageCageFeedTask.setGlassId(glassId);
+        bigStorageCageFeedTask.setTaskState(Const.BIG_STORAGE_REQUEST_IN);
+        bigStorageCageFeedTask.setLine(line);
+        bigStorageCageFeedTask.setTaskType(taskType);
+        bigStorageCageFeedTask.setWidth(width);
+        bigStorageCageFeedTask.setCreateTime(new Date());
+        return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask);
+    }
+
+    /**
+     * 鑾峰彇闇�瑕佸惎鍔ㄧ殑绾胯矾锛氫袱鏉$嚎閮藉彲鍚姩 鑾峰彇绗竴鐗囩幓鐠冪増鍥緄d鏈�灏� 鐗堝簭鏈�澶х殑绾胯矾
+     *
+     * @return
+     */
+    public Integer getStartLine() {
+        List<BigStorageCageFeedTask> taskList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>()
+                .inSql(BigStorageCageFeedTask::getId, "select min(id) from big_storage_cage_feed_task where task_state = 2 group by line"));
+        Assert.isFalse(CollectionUtils.isEmpty(taskList), "鍗ц浆绔嬩袱鏉$嚎閮芥病鏈夌幓鐠冭繘鐗囦换鍔�");
+        Map<String, Integer> taskMap = taskList.stream().collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId,
+                BigStorageCageFeedTask::getLine));
+        GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
+                .in(GlassInfo::getGlassId, taskMap.keySet())
+                .orderByAsc(GlassInfo::getTemperingLayoutId)
+                .orderBy(Boolean.TRUE, sequenceOrder, GlassInfo::getTemperingFeedSequence)
+                .last("limit 1"));
+        return taskMap.get(glassInfo.getGlassId());
+    }
+
+    /**
+     * 璁$畻浠诲姟琛ㄨ繘鐗囩嚎璺殑鐩爣鏍煎瓙锛屽苟鍚姩浠诲姟
+     */
+    public boolean computeTargetByLine(Integer line, String d02GoAdress, String d05GoAdress) {
+        //1銆佽幏鍙栦换鍔¤〃涓殑鎵�鏈夌幓鐠冿紙鎸囧畾绾胯矾涓斿凡缁忚繘鍗ц浆绔嬪畬鎴愶級
+        List<BigStorageCageFeedTask> taskList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>()
+                .eq(BigStorageCageFeedTask::getLine, line)
+                .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_UP)
+                .orderByAsc(BigStorageCageFeedTask::getId));
+        //2銆佸幓绗煎瓙鍐呮煡鎵炬槸鍚﹀彲浠ョ户缁瓨鏀剧殑绗煎瓙
+        List<String> glassIds = taskList.stream().map(BigStorageCageFeedTask::getGlassId).collect(Collectors.toList());
+        List<GlassInfo> glassInfos = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().in(GlassInfo::getGlassId, glassIds));
+        AtomicReference<Integer> temperingLayoutIdTemp = new AtomicReference<>(0);
+        AtomicReference<Integer> temperingFeedSequenceTemp = new AtomicReference<>(0);
+        AtomicReference<BigStorageDTO> bigStorageDTO = new AtomicReference<>(new BigStorageDTO());
+        Map<String, GlassInfo> glassInfoMap = glassInfos.stream().collect(Collectors.toMap(GlassInfo::getGlassId, p -> p));
+        List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>();
+        AtomicBoolean taskFlag = new AtomicBoolean(Boolean.TRUE);
+        taskList.stream().forEach(e -> {
+            BigStorageCageDetails cageDetails = new BigStorageCageDetails();
+            //鎸夌収鐗堝浘淇℃伅鑾峰彇杩涚墖绗煎瓙鏍煎瓙鍙�
+            GlassInfo info = glassInfoMap.get(e.getGlassId());
+            BeanUtils.copyProperties(info, cageDetails);
+            if (temperingLayoutIdTemp.equals(info.getTemperingLayoutId())
+                    && temperingFeedSequenceTemp.equals(info.getTemperingFeedSequence() + 1)
+                    && info.getWidth() <= bigStorageDTO.get().getWidth()) {
+                bigStorageDTO.get().setWidth(bigStorageDTO.get().getWidth() - info.getWidth().intValue() - Const.BIG_STORAGE_GAP);
+            } else {
+                bigStorageDTO.set(bigStorageCageDetailsService.queryTargetSlotByTempering(info));
+            }
+            e.setTargetSlot(bigStorageDTO.get().getSlot());
+            cageDetails.setSlot(bigStorageDTO.get().getSlot());
+            cageDetails.setState(Const.GLASS_STATE_IN);
+            temperingLayoutIdTemp.set(info.getTemperingLayoutId());
+            temperingFeedSequenceTemp.set(info.getTemperingFeedSequence());
+            bigStorageCageDetailsList.add(cageDetails);
+            taskFlag.set(bigStorageCageFeedTaskService.updateById(e));
+            if (!taskFlag.get()) {
+                return;
+            }
+        });
+        //3銆佹洿鏂拌繘鐗囦换鍔¤〃  閬囧埌闂锛氭棤娉曟壒閲忔洿鏂帮紝鎵归噺鏇存柊鏃犳硶璧版寚瀹氫粠搴�
+
+        //4銆佸湪璇︽儏琛ㄤ腑鍔犲叆杩涚墖鐜荤拑淇℃伅
+        bigStorageCageDetailsService.saveBatch(bigStorageCageDetailsList);
+        if (taskFlag.get()) {
+            String lineAddress = line.equals(Const.A09_OUT_TARGET_POSITION) ? d02GoAdress : d05GoAdress;
+//            S7object.getinstance().plccontrol.writeWord(lineAddress, (short) 1);
+        }
+        return taskFlag.get();
+    }
 }
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-cz.yml
similarity index 80%
copy from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
copy to hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-cz.yml
index 2454814..6dc9dfd 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-cz.yml
@@ -5,12 +5,12 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://192.168.1.199:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
-          password: root
+          password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         salve_hangzhoumes:
-          url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
+          url: jdbc:sqlserver://192.168.10.2:1433;databasename=hangzhoumes
           username: sa
           password: beibo.123/
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
index 8f86c1c..7209b1f 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
@@ -3,10 +3,13 @@
 
 spring:
   profiles:
-    active: prod
+    active: dev
   application:
     name: cacheVerticalGlass
 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
+mes:
+  sequence:
+    order: false
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageFeedTaskMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageFeedTaskMapper.xml
new file mode 100644
index 0000000..1ef2f3f
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageFeedTaskMapper.xml
@@ -0,0 +1,18 @@
+<?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.bigstoragetask.mapper.BigStorageCageFeedTaskMapper">
+
+    <select id="querySitToUpGlass" resultType="java.lang.String">
+        select t.line
+        from (
+                 select line,
+                        COUNT(glass_id)                               as total_count,
+                        SUM(case task_state when 2 then 1 else 0 end) as real_count
+                 from big_storage_cage_feed_task
+                 where task_state in (1, 2)
+                 group by line
+             ) t
+        where t.total_count = t.real_count
+    </select>
+
+</mapper>
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java
index 4d64154..ae11d30 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java
@@ -1,14 +1,16 @@
 package com.mes;
 
+import com.mes.bigstorage.service.BigStorageCageService;
+import com.mes.common.config.Const;
+import com.mes.job.PlcStorageCageTask;
 import lombok.extern.slf4j.Slf4j;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
 import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Author : zhoush
@@ -17,12 +19,42 @@
  */
 @Slf4j
 @RunWith(SpringRunner.class)
-@SpringBootTest(classes = CacheVerticalClassModuleApplication.class)
+@SpringBootTest(classes = CacheVerticalClassModuleApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 public class CacheVerticalGlassModuleApplicationTest {
+
+    @Autowired
+    BigStorageCageService bigStorageCageService;
+    @Autowired
+    PlcStorageCageTask plcStorageCageTask;
 
     @Test
     public void testFindPath() {
         log.info("瀹屾暣璺緞锛歿}", Arrays.asList("123"));
     }
 
+    @Test
+    public void computeTargetByLine() {
+//        log.info("鑾峰彇澶х悊鐗囩淇℃伅锛歿}",bigStorageCageService.querybigStorageCageDetail());
+        plcStorageCageTask.computeTargetByLine(2001, "", "");
+    }
+
+    @Test
+    public void judgeGlassTypeStatus() {
+//        log.info("鑾峰彇澶х悊鐗囩淇℃伅锛歿}",bigStorageCageService.querybigStorageCageDetail());
+        plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION);
+    }
+
+    @Test
+    public void getStartLine() {
+//        log.info("鑾峰彇澶х悊鐗囩淇℃伅锛歿}",bigStorageCageService.querybigStorageCageDetail());
+        Integer startLine = plcStorageCageTask.getStartLine();
+        log.info("---------{}", startLine);
+    }
+
+    @Test
+    public void selectBigStorageCageUsage() {
+//        bigStorageCageService.querybigStorageCageDetail(1);
+        log.info("鑾峰彇澶х悊鐗囩淇℃伅锛歿}", bigStorageCageService.selectBigStorageCageUsage());
+    }
+
 }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java
index 2634690..593308c 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java
@@ -5,6 +5,7 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.scheduling.annotation.EnableScheduling;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 /**
@@ -16,6 +17,7 @@
 @SpringBootApplication
 @EnableSwagger2
 @EnableDiscoveryClient
+@EnableScheduling
 @MapperScan(basePackages = "com.mes.*.mapper")
 public class LoadGlassModuleApplication {
     public static void main(String[] args) {
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java
index 3421f33..e62c4cb 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/controller/EngineeringController.java
@@ -42,18 +42,24 @@
     public  Result <List<UpPattenUsage>> pauseTask(@RequestBody Engineering engineering) {
         boolean work=engineeringService.changeTask(engineering.getEngineerId(),engineering.getState());
         List<UpPattenUsage> glass = upPattenUsageService.prioritylist();
-        log.info("StartorStop:{},{}", work,engineering);
-        return Result.build(200, engineering.getEngineerId(),glass);
+        if(work){
+            return Result.build(200,"鎴愬姛",glass);
+        }else {
+            return Result.build(100,"澶辫触",glass);
+        }
     }
 
     @ApiOperation("鏆傚仠")
     @PostMapping("/pause") //鏆傚仠涓婄墖浠诲姟
     @ResponseBody
     public  Result <List<UpPattenUsage>> pause(@RequestBody Engineering engineering) {
-        boolean work=engineeringService.changeTask(engineering.getEngineerId(),engineering.getState());
-        List<UpPattenUsage> glass = upPattenUsageService.prioritylist();
-        log.info("StartorStop:{},{}", work,engineering);
-        return Result.build(200, engineering.getEngineerId(),glass);
+        boolean work=engineeringService.pauseTask(engineering.getEngineerId(),engineering.getState());
+        List<UpPattenUsage> glass = upPattenUsageService.prioritylist();String message;
+        if(work){
+            return Result.build(200,"鎴愬姛",glass);
+        }else {
+            return Result.build(100,"鎴愬姛",glass);
+        }
     }
 
     @ApiOperation("寮�濮嬩笂鐗�")
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java
index 806503a..23b8d67 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/EngineeringService.java
@@ -40,4 +40,6 @@
      * @return Engineering
      */
     List<Engineering> selectTask();
+
+    boolean pauseTask(String engineerId, Integer state);
 }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java
index 8c62698..d3c02f3 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java
@@ -40,12 +40,13 @@
         LambdaUpdateChainWrapper<Engineering> pauseWrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper());
         pauseWrapper.set(Engineering::getState,0);
         pauseWrapper.eq(Engineering::getState,1);
-        pauseWrapper.update();
+        boolean pause = pauseWrapper.update();
         //浣跨敤projectId浣滀负鏉′欢寮�濮嬪伐绋�
         LambdaUpdateChainWrapper<Engineering> wrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper());
         wrapper.set(Engineering::getState,state);
         wrapper.eq(Engineering::getEngineerId,projectId);
-        return  wrapper.update();
+        wrapper.update();
+        return pause;
     }
 
     @Override
@@ -109,4 +110,13 @@
         return engineeringMapper.selectList(wrapper);
     }
 
+    @Override
+    public boolean pauseTask(String engineerId, Integer state) {
+        //鏆傚仠姝e湪杩涜宸ョ▼
+        LambdaUpdateChainWrapper<Engineering> pauseWrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper());
+        pauseWrapper.set(Engineering::getState,0);
+        pauseWrapper.eq(Engineering::getState,1);
+        return  pauseWrapper.update();
+    }
+
 }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
index 71351af..8c66de2 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
@@ -43,7 +43,7 @@
      * fixedDelay : 涓婁竴涓皟鐢ㄧ粨鏉熷悗鍐嶆璋冪敤鐨勫欢鏃�
      */
 
-    @Scheduled(fixedDelay = 3000000)
+    @Scheduled(fixedDelay = 300)
     public void plcLoadGlassTask() throws InterruptedException {
         try {
             //鑾峰彇鑱旀満鐘舵��
@@ -87,7 +87,7 @@
         }
     }
 
-    @Scheduled(fixedDelay = 30000000)
+    @Scheduled(fixedDelay = 300)
     public void plcLoadGlassReport(){
         //鑾峰彇鏄惁鏈夋眹鎶�
         String loadStatus = plcParameterObject.getPlcParameter("PlcStatus").getValue();
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
index 5851554..3d98ea2 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java
@@ -36,7 +36,7 @@
     private  EngineeringService engineeringService;
     @Autowired
     private OptimizeProjectService optimizeProjectService;
-    @ApiOperation("鏄剧ず姝e湪鍑虹墖鐨勫伐绋嬩俊鎭�")
+    @ApiOperation("鏄剧ず閫夋嫨鐨勫伐绋嬩俊鎭�")
     @GetMapping("/prioritylist") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
     @ResponseBody
     public Result<List<UpPattenUsage>> prioritylist() {
@@ -49,10 +49,34 @@
     @PostMapping("/selectUpPattenUsage") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
     @ResponseBody
     public Result<List<UpPattenUsage>> selectUpPattenUsage(@RequestBody Engineering engineering) {
-        List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId());
-        return Result.build(200, "", upPattenUsages);
+        List<UpPattenUsage> upPattenUsages=null;
+        UpPattenUsage upPattenUsage = upPattenUsageService.selectedEngineering(engineering.getEngineerId());
+        if(upPattenUsage == null){
+            upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineering.getEngineerId());
+        }else {
+            upPattenUsages= upPattenUsageService.selectUpPattenUsage(upPattenUsage);
         }
 
+        if (!upPattenUsages.isEmpty()) {
+            return Result.build(200, "鎴愬姛", upPattenUsages);
+        }else {
+            return Result.build(100, "澶辫触", upPattenUsages);
+        }
+
+        }
+
+    @ApiOperation("鍒囨崲鍘熺墖涓婄墖鐘舵��")
+    @PostMapping("/updateGlassState") //鏌ヨ鐜板湪涓婄墖鏈虹殑鐜荤拑淇℃伅
+    @ResponseBody
+    public Result<Boolean> updateGlassState(@RequestBody UpPattenUsage upPattenUsage) {
+        Boolean whether = upPattenUsageService.updateGlassState(upPattenUsage);
+        if (whether){
+            return Result.build(200, "鎴愬姛", whether);
+        }else {
+            return Result.build(100, "澶辫触", whether);
+        }
+
+    }
 
 }
 
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java
index 69c8aa0..f020aa3 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java
@@ -19,6 +19,11 @@
       */
      List<UpPattenUsage> prioritylist();
      /**
+      * 鏌ヨ涓婄墖琛ㄧ殑宸ョ▼淇℃伅
+      * @return List<UpPattenUsage>
+      */
+     List<UpPattenUsage> selectUpPattenUsage(UpPattenUsage upPattenUsage);
+     /**
       * 鏌ヨ涓婄墖椤哄簭淇℃伅
       * @return List<UpPattenUsage>
       */
@@ -47,5 +52,7 @@
       */
      UpPattenUsage selectSequence(UpPattenUsage upPattenUsage);
 
+
+     Boolean updateGlassState(UpPattenUsage upPattenUsage);
 }
 
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
index 322ebc0..ada2a7b 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
@@ -3,6 +3,7 @@
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.query.MPJQueryWrapper;
 import com.mes.engineering.entity.Engineering;
@@ -18,6 +19,7 @@
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -49,6 +51,13 @@
             return  null;
         }
 
+    }
+
+    @Override
+    public List<UpPattenUsage> selectUpPattenUsage(UpPattenUsage upPattenUsage) {
+        LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(UpPattenUsage::getEngineeringId,upPattenUsage.getEngineeringId());
+        return this.list(wrapper);
     }
 
     @Override
@@ -127,5 +136,13 @@
         return this.getOne(wrapper);
     }
 
+    @Override
+    public Boolean updateGlassState(UpPattenUsage upPattenUsage) {
+        UpdateWrapper<UpPattenUsage> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id",upPattenUsage.getId())
+                .set("state",upPattenUsage.getState());
+        return this.update(updateWrapper);
+    }
+
 
 }
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/controller/UpWorkstationController.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/controller/UpWorkstationController.java
index 257bc80..de9796e 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/controller/UpWorkstationController.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/controller/UpWorkstationController.java
@@ -40,9 +40,14 @@
     @PostMapping("/updateGlassMessage")
     @ResponseBody
     public Result<List<UpWorkstation>> updateGlassMessage(@RequestBody UpWorkstation upwork) {
-        upWorkstationService.updateGlassMessage(upwork);
+        Boolean info= upWorkstationService.updateGlassMessage(upwork);
         List<UpWorkstation> glass = upWorkstationService.list();
-        return Result.build(200, "", glass);
+        if(info){
+            return Result.build(200, "鎴愬姛", glass);
+        }else{
+            return Result.build(100, "澶辫触", glass);
+        }
+
     }
 
 
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/UpWorkstationService.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/UpWorkstationService.java
index bd2a6c8..9a7be55 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/UpWorkstationService.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/UpWorkstationService.java
@@ -34,7 +34,7 @@
      * 澧炲姞浜哄伐杈撳叆鐨勫伐浣嶇幓鐠冧俊鎭�
      * @param upwork
      */
-    void updateGlassMessage(UpWorkstation upwork);
+    Boolean updateGlassMessage(UpWorkstation upwork);
 
 
     String updateMesInkageLoad(short inKageWord);
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java
index b7d08c2..ec327ab 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/service/impl/UpWorkstationServiceImpl.java
@@ -74,17 +74,19 @@
      * 澧炲姞浜哄伐杈撳叆鐨勫伐浣嶇幓鐠冧俊鎭�/鍒犻櫎浜哄伐鎼蛋鐨勭幓鐠冧俊鎭�
      */
     @Override
-    public void updateGlassMessage(UpWorkstation upwork) {
+    public Boolean updateGlassMessage(UpWorkstation upwork) {
+        int update = 0;
         UpdateWrapper<UpWorkstation> updateWrapper = new UpdateWrapper<>();
         if (upwork.getWorkstationId() == 1 || upwork.getWorkstationId() == 3) {
             updateWrapper.eq("workstation_id", upwork.getWorkstationId());
-            int update = this.baseMapper.update(upwork, updateWrapper);
+             update = this.baseMapper.update(upwork, updateWrapper);
         } else {
             if (upwork.getPatternHeight() > 2700 || upwork.getPatternHeight() == 0) {
                 updateWrapper.eq("workstation_id", upwork.getWorkstationId());
-                int update = this.baseMapper.update(upwork, updateWrapper);
+                 update = this.baseMapper.update(upwork, updateWrapper);
             }
         }
+        return update>0;
     }
 
     @Override
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/JsonFile/PlcLoadGlass.json b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/JsonFile/PlcLoadGlass.json
index d85b3d8..9b0432b 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/JsonFile/PlcLoadGlass.json
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/JsonFile/PlcLoadGlass.json
@@ -25,11 +25,11 @@
       "unit":""
     },
     {
-          "codeId": "InkageStatus",
-          "addressIndex":"22",
-          "addressLenght":"2",
-          "ratio":"1",
-          "unit":""
+      "codeId": "InkageStatus",
+      "addressIndex":"22",
+      "addressLenght":"2",
+      "ratio":"1",
+      "unit":""
     },
     {
       "codeId": "WorkId",
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-cz.yml
similarity index 77%
rename from hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-loc.yml
rename to hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-cz.yml
index cc53ca6..9918e23 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-loc.yml
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application-cz.yml
@@ -5,14 +5,14 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://192.168.1.199:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
-          password: root
+          password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         pp:
-          url: jdbc:mysql://192.168.56.10:3306/pp?serverTimezone=GMT%2b8
+          url: jdbc:mysql://192.168.1.199:3306/pp?serverTimezone=GMT%2b8
           username: root
-          password: root
+          password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
   cloud:
     nacos:
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
index 2128453..3920d3c 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -2,10 +2,10 @@
   port: 8083
 spring:
   profiles:
-    active: prod
+    active: cz
   application:
     name: loadGlass
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
-#  configuration:
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java
index 4afc106..d052648 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/test/java/com/mes/LoadGlassModuleApplicationTest.java
@@ -69,6 +69,7 @@
 
     @Test
     public  void  textengineering(){
+        Engineering engineering=new Engineering();
         List<Engineering> glass= engineeringService.selectEngineering("P24032204");
         engineeringService.saveEngineering(glass);
         log.info("glassinfo锛歿}", Arrays.asList(glass));
@@ -99,5 +100,14 @@
         List<OptimizeProject> engineerings=optimizeProjectService.listByState(optimizeRequest);
         log.info("涓婄墖琛ㄤ换鍔′腑鐨勬暟鎹畕}",engineerings);
     }
+    @Test
+    public  void  textengineering6(){
+        //涓婄墖琛ㄦ渶鍚庝竴鐗�
+        UpPattenUsage upPattenUsage=new UpPattenUsage();
+        upPattenUsage.setState(100);
+        upPattenUsage.setId(2248L);
+        boolean isOver= upPattenUsageService.updateGlassState(upPattenUsage);
+        log.info("鏇存敼鏄惁鎴愬姛{}",isOver);
+    }
 
 }
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
index 863c349..d548f45 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
@@ -1,6 +1,7 @@
 package com.mes.job;
 
 import cn.hutool.json.JSONObject;
+import com.mes.temperingglass.service.TemperingAgoService;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
 import com.mes.temperingglass.service.TemperingAgoService;
 import com.mes.tools.WebSocketServer;
@@ -32,14 +33,21 @@
         //姝e湪绛夊緟杩涚墖鐨勭幓鐠�
         List<TemperingGlassInfo> waitingGlass = temperingAgoService.selectWaitingGlass();
         jsonObject.append("waitingGlass", waitingGlass);
+        //鑾峰彇鏁村湪鐐変腑鐨勪袱涓増鍥緄d
+        List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
         //杩涚倝涓殑鐜荤拑
-        List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass();
+        List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId());
         jsonObject.append("intoGlass", intoGlass);
+        //杩涚倝涓殑绗簩涓増鍥�
+        if (layoutId.size() > 1) {
+            List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId());
+            jsonObject.append("intoGlass2", intoGlass2);
+        }
         //鍑虹倝鍚庣殑鐜荤拑
         List<TemperingGlassInfo> outGlass = temperingAgoService.selectOutGlass();
         jsonObject.append("outGlass", outGlass);
         //杩囨棆杞彴閽㈠寲鍚庣殑鐜荤拑
-        TemperingGlassInfo overGlass = temperingAgoService.selectOverGlass();
+        List<TemperingGlassInfo> overGlass = temperingAgoService.selectOverGlass();
         jsonObject.append("overGlass", overGlass);
 
         ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingGlass");
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
index 23a57e0..3496554 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
@@ -1,14 +1,13 @@
 package com.mes.temperingglass.controller;
-
-import com.mes.temperingglass.entity.TemperingGlassInfo;
 import com.mes.temperingglass.service.TemperingAgoService;
-import com.mes.temperingglass.service.TemperingOverService;
-import com.mes.temperingglass.service.TemperingService;
+import com.mes.temperingglass.entity.TemperingGlassInfo;
 import com.mes.utils.Result;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
@@ -23,8 +22,6 @@
 public class TemperingGlassInfoController {
 
     @Autowired
-    TemperingService temperingService;
-    @Autowired
     private TemperingAgoService temperingAgoService;
 
     @ApiOperation("鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�")
@@ -34,13 +31,13 @@
         log.info("绛夊緟涓殑鐜荤拑淇℃伅{}",glass);
         return Result.build(200, "", glass);
     }
-    @ApiOperation("鏌ヨ杩涚倝涓殑閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佸叏涓�1鐨勪负宸插埌銆�")
-    @GetMapping("/selectIntoGlass") // 鏌ヨ杩涚倝涓殑閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佸叏涓�1鐨勪负宸插埌銆�
-    public Result <List<TemperingGlassInfo>> selectIntoGlass() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass();
-        log.info("杩涚倝涓殑鐜荤拑鐗堝浘淇℃伅{}",glass);
-        return Result.build(200, "", glass);
-    }
+//    @ApiOperation("鏌ヨ杩涚倝涓殑閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佸叏涓�1鐨勪负宸插埌銆�")
+//    @GetMapping("/selectIntoGlass") // 鏌ヨ杩涚倝涓殑閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佸叏涓�1鐨勪负宸插埌銆�
+//    public Result <List<TemperingGlassInfo>> selectIntoGlass() {
+//        List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass();
+//        log.info("杩涚倝涓殑鐜荤拑鐗堝浘淇℃伅{}",glass);
+//        return Result.build(200, "", glass);
+//    }
     @ApiOperation("//閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅銆�")
     @GetMapping("/selectOutGlass") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
     public Result <List<TemperingGlassInfo>> selectOutGlass() {
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/mapper/TemperingMapper.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/mapper/TemperingMapper.java
deleted file mode 100644
index 2b0a3a7..0000000
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/mapper/TemperingMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.mes.temperingglass.mapper;
-
-import com.baomidou.dynamic.datasource.annotation.DS;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.mes.temperingglass.entity.TemperingGlassInfo;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
-
-@Mapper
-@DS("salve_hangzhoumes")
-public interface TemperingMapper extends BaseMapper<TemperingGlassInfo> {
-
-}
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingOverService.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingOverService.java
deleted file mode 100644
index 387d325..0000000
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingOverService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.mes.temperingglass.service;
-
-import com.mes.temperingglass.entity.TemperingGlassInfo;
-import com.mes.temperingglass.mapper.TemperingMapper;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class TemperingOverService {
-    private final TemperingMapper temperingMapper;
-
-    //PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
-    public TemperingOverService(TemperingMapper temperingMapper) {
-        this.temperingMapper = temperingMapper;
-    }
-
-    //鎺ユ敹鍑虹倝淇″彿鍜岀倝鍙�
-    public String SelectOutSignal() {
-
-        //S7control.getinstance().WriteWord("鍑虹倝淇″彿", (short)1);
-        return "GlassInfo";
-    }
-
-    //鍙戦�佺‘璁ゆ敹鍒颁俊鍙�
-    public void OverSignal() {
-        //S7control.getinstance().WriteWord("纭瀛�", (short)1);
-    }
-
-    //鏄剧ず閽㈠寲鍑虹倝鍚庣殑鐗堝浘淇℃伅
-    public List<TemperingGlassInfo> SelectOutGlass() {
-        return temperingMapper.SelectOutGlass();
-    }
-
-
-}
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingService.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingService.java
deleted file mode 100644
index bd7cb05..0000000
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/service/TemperingService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.mes.temperingglass.service;
-//import com.mes.temperingglass.entity.GlassInfo;
-
-import com.mes.temperingglass.entity.TemperingGlassInfo;
-import com.mes.temperingglass.mapper.TemperingMapper;
-import com.mes.tools.S7control;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class TemperingService {
-
-    private final TemperingMapper temperingMapper;
-    private S7control s7control;
-
-    public TemperingService(TemperingMapper temperingMapper) {
-        this.temperingMapper = temperingMapper;
-    }
-
-    //    //鎺ユ敹id杩斿洖鍧愭爣鍜屾暟鎹�
-//    public GlassInfo SelectOutGlass (String glassid) {
-//        GlassInfo GlassInfo = temperingMapper.SelectGlass(glassid);
-//        return GlassInfo;
-//    }
-    //鍙戦�佸潗鏍囦俊鎭�
-    public void SendCoordinate(short glassX, short glassY) {
-        s7control.writeWord("DB100.10", glassX);
-        s7control.writeWord("DB100.10", glassY);
-    }
-
-    //鍒ゆ柇鏄惁鍙互鍙戦�佽繘鐐変俊鍙�
-    public int SelectTempering(String glassid) {
-        int tempering = temperingMapper.SelectTempering(glassid);
-        if (tempering == 1) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    //鍙戦�佽繘鐐変俊鍙�
-    public void SendIntoGlass(short start) {
-        s7control.writeWord("DB100.10", start);
-    }
-
-    //鎺ュ彈瀹屾垚瀛楀洖澶嶇‘璁ゅ瓧
-    public void SendIntoGlass() {
-        s7control.writeWord("DB100.10", (short) 1);
-    }
-
-    //鏄剧ず绛夊緟涓殑鐗堝浘
-    public List<TemperingGlassInfo> SelectWaitingGlass() {
-        List<TemperingGlassInfo> WaitingGlass = temperingMapper.SelectWaitingGlass();
-        return WaitingGlass;
-    }
-
-    //鏄剧ず姝e湪杩涚倝鐨勭増鍥�
-    public List<TemperingGlassInfo> SelectIntoGlass() {
-        List<TemperingGlassInfo> IntoGlass = temperingMapper.SelectInGlass();
-        return IntoGlass;
-    }
-}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-cz.yml
similarity index 77%
copy from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
copy to hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-cz.yml
index 2454814..0b433b2 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-cz.yml
@@ -5,12 +5,13 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://192.168.1.199:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
-          password: root
+          password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
+
         salve_hangzhoumes:
-          url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
+          url: jdbc:sqlserver://192.168.10.2:1433;databasename=hangzhoumes
           username: sa
           password: beibo.123/
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
@@ -18,6 +19,8 @@
     nacos:
       discovery:
         server-addr: 127.0.0.1:8848
+  application:
+    name: temperingGlass
   redis:
     database: 0
     host: 127.0.0.1
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-loc.yml
deleted file mode 100644
index 06b2222..0000000
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application-loc.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-spring:
-  datasource:
-    dynamic:
-      primary: hangzhoumes #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
-      strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
-      datasource:
-        hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-
-        salve_hangzhoumes:
-            url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
-            username: sa
-            password: beibo.123/
-            driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-  cloud:
-    nacos:
-      discovery:
-        server-addr: 127.0.0.1:8848
-  application:
-    name: temperingGlass
-  redis:
-    database: 0
-    host: 127.0.0.1
-    port: 6379
-    password: 123456
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
index e9fcc1e..0a70a4a 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
   port: 8084
 spring:
   profiles:
-    active: prod
+    active: cz
   application:
     name: temperingGlass
 mybatis-plus:
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
index 42f2cd9..e5e4608 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/test/java/com/mes/TemperingApplicationTest.java
@@ -1,52 +1,60 @@
-package com.mes;
-
-import com.mes.glassinfo.service.GlassInfoService;
-import com.mes.pp.mapper.OptimizeProjectMapper;
-import com.mes.temperingglass.entity.TemperingGlassInfo;
-import com.mes.temperingglass.service.TemperingAgoService;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @Author : zhoush
- * @Date: 2024/3/27 16:37
- * @Description:
- */
-@Slf4j
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = TemperingGlassModuleApplication.class)
-public class TemperingApplicationTest {
-
-    @Autowired
-    private TemperingAgoService temperingAgoService;
-
-
-    @Test
-    public void testFindPa() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass();
-        log.info("杩涚倝涓殑鐜荤拑锛歿}", Arrays.asList(glass));
-    }
-    @Test
-    public void testFindPa2() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectOutGlass();
-        log.info("宸插嚭涓殑鐜荤拑锛歿}", Arrays.asList(glass));
-    }
-
-    @Test
-    public void testFindPa3() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass();
-        log.info("绛夊緟涓殑鐜荤拑锛歿}", Arrays.asList(glass));
-    }
-    @Test
-    public void testFindPa4() {
-        TemperingGlassInfo glass = temperingAgoService.selectOverGlass();
-        log.info("绛夊緟涓殑鐜荤拑锛歿}", Arrays.asList(glass));
-    }
-}
+//package com.mes;
+//
+//import com.mes.temperingglass.entity.TemperingGlassInfo;
+//import com.mes.temperingglass.service.TemperingAgoService;
+//import lombok.extern.slf4j.Slf4j;
+//import org.junit.Test;
+//import org.junit.runner.RunWith;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.test.context.SpringBootTest;
+//import org.springframework.test.context.junit4.SpringRunner;
+//
+//import java.util.Arrays;
+//import java.util.List;
+//
+///**
+// * @Author : zhoush
+// * @Date: 2024/3/27 16:37
+// * @Description:
+// */
+//@Slf4j
+//@RunWith(SpringRunner.class)
+//@SpringBootTest(classes = TemperingGlassModuleApplication.class)
+//public class TemperingApplicationTest {
+//
+//    @Autowired
+//    private TemperingAgoService temperingAgoService;
+//
+//
+//    @Test
+//    public void testFindPa() {
+//        List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(12);
+//        log.info("杩涚倝涓殑鐜荤拑锛歿}", Arrays.asList(glass));
+//    }
+//    @Test
+//    public void testFindPa2() {
+//        List<TemperingGlassInfo> glass = temperingAgoService.selectOutGlass();
+//        log.info("宸插嚭涓殑鐜荤拑锛歿}", Arrays.asList(glass));
+//    }
+//
+//    @Test
+//    public void testFindPa3() {
+//        List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass();
+//        log.info("绛夊緟涓殑鐜荤拑锛歿}", Arrays.asList(glass));
+//    }
+//    @Test
+//    public void testFindPa4() {
+//        List<TemperingGlassInfo> glass = temperingAgoService.selectOverGlass();
+//        log.info("绛夊緟涓殑鐜荤拑锛歿}", Arrays.asList(glass));
+//    }
+//    @Test
+//    public void testFindPa5() {
+//        List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
+//        //杩涚倝涓殑鐜荤拑
+//        log.info("鐗堝浘id锛歿}", Arrays.asList(layoutId.get(0).getTemperingLayoutId()));
+//        List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId());
+//        log.info("鐜荤拑鐗堝浘id锛歿}", Arrays.asList(intoGlass));
+//        List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId());
+//        log.info("鐜荤拑鐗堝浘id锛歿}", Arrays.asList(intoGlass2));
+//    }
+//}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java
deleted file mode 100644
index b58b5b0..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.mes.glassinfo.controller;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- * 鍓嶇鎺у埗鍣�
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
-@RestController
-@RequestMapping("/glassInfo")
-public class GlassInfoController {
-
-}
-
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
deleted file mode 100644
index 7bfe24e..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.mes.glassinfo.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.github.yulichang.base.MPJBaseMapper;
-import com.mes.glassinfo.entity.GlassInfo;
-import org.mapstruct.Mapper;
-
-/**
- * <p>
- * Mapper 鎺ュ彛
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
-@Mapper
-public interface GlassInfoMapper extends MPJBaseMapper<GlassInfo> {
-
-
-
-}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
deleted file mode 100644
index 2f827dc..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/GlassInfoService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.mes.glassinfo.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.mes.glassinfo.entity.GlassInfo;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>
- * 鏈嶅姟绫�
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
-public interface GlassInfoService extends IService<GlassInfo> {
-
-    /**
-     * @param flowCardId
-     * @return 鏍规嵁娴佺▼鍗″彿鏌ヨ鐜荤拑淇℃伅
-     */
-    int getGlassInfoCountByFlowCardId(String flowCardId);
-
-    /**
-     * @return
-     * 鏌ヨ鎵�鏈変笉鍚屾祦绋嬪崱鍙�
-     */
-    List<Map<String, Object>> getFlowCardId();
-
-    /**
-     * @param id
-     * @return 鏍规嵁鐜荤拑id鏌ヨ鐜荤拑淇℃伅
-     */
-    GlassInfo selectGlassId(String id);
-//    List<GlassInfo> getmaxglass(GlassInfo glassInfo);
-}
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
deleted file mode 100644
index 594c9b7..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.mes.glassinfo.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.yulichang.toolkit.JoinWrappers;
-import com.mes.downstorage.entity.DownStorageCage;
-import com.mes.downstorage.entity.DownStorageCageDetails;
-
-import com.mes.glassinfo.entity.GlassInfo;
-import com.mes.glassinfo.mapper.GlassInfoMapper;
-import com.mes.glassinfo.service.GlassInfoService;
-import com.mes.uppattenusage.entity.UpPattenUsage;
-import com.mes.uppattenusage.mapper.UpPattenUsageMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>
- * 鏈嶅姟瀹炵幇绫�
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
-@Service
-public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService {
-
-    private UpPattenUsageMapper upPattenUsageMapper;
-    private GlassInfoMapper glassInfoMapper;
-
-    @Autowired(required=false)
-    public GlassInfoServiceImpl(GlassInfoMapper glassInfoMapper, UpPattenUsageMapper upPattenUsageMapper) {
-        this.glassInfoMapper = glassInfoMapper;
-        this.upPattenUsageMapper = upPattenUsageMapper;
-    }
-
-    @Override
-    public int getGlassInfoCountByFlowCardId(String flowCardId) {
-        return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda()
-                .eq(GlassInfo::getFlowCardId, flowCardId));
-    }
-
-
-
-    @Override
-    public List<Map<String, Object>> getFlowCardId() {
-        return baseMapper.selectJoinMaps(JoinWrappers.lambda(GlassInfo.class)
-                .select(GlassInfo::getFlowCardId)
-                .leftJoin(UpPattenUsage.class, on -> on
-                        .eq(UpPattenUsage::getEngineeringId, GlassInfo::getEngineerId)
-                        .ne(UpPattenUsage::getState, 300)
-                )
-                .groupBy(GlassInfo::getFlowCardId)
-        );
-    }
-
-
-
-
-
-
-
-
-    @Override
-    public GlassInfo selectGlassId(String id) {
-        return baseMapper.selectOne(new QueryWrapper<GlassInfo>().lambda()
-                .eq(GlassInfo::getGlassId, id));
-    }
-
-
-
-
-}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-cz.yml
similarity index 80%
rename from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
rename to hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-cz.yml
index 2454814..c4c456e 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application-loc.yml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-cz.yml
@@ -5,12 +5,12 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
+          url: jdbc:mysql://192.168.1.199:3306/hangzhoumes?serverTimezone=GMT%2b8
           username: root
-          password: root
+          password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         salve_hangzhoumes:
-          url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes
+          url: jdbc:sqlserver://192.168.10.2:1433;databasename=hangzhoumes
           username: sa
           password: beibo.123/
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
@@ -22,4 +22,4 @@
     database: 0
     host: 127.0.0.1
     port: 6379
-    password: 123456
\ No newline at end of file
+    password: 123456
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-loc.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-loc.yml
deleted file mode 100644
index fadf3bf..0000000
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application-loc.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-spring:
-  datasource:
-    dynamic:
-      primary: hangzhoumes #璁剧疆榛樿鐨勬暟鎹簮鎴栬�呮暟鎹簮缁�,榛樿鍊煎嵆涓簃aster
-      strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
-      datasource:
-        hangzhoumes:
-          url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8
-          username: root
-          password: root
-          driver-class-name: com.mysql.cj.jdbc.Driver
-        salve_hangzhoumes:
-          url: jdbc:sqlserver://192.168.56.10:1433;databasename=hangzhoumes
-          username: sa
-          password: beibo.123/
-          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-  cloud:
-    nacos:
-      discovery:
-        server-addr: 127.0.0.1:8848
-  redis:
-    database: 0
-    host: 127.0.0.1
-    port: 6379
-    password: 123456
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
index 5d44c2f..46db88a 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -3,7 +3,7 @@
 
 spring:
   profiles:
-    active: prod
+    active: cz
   application:
     name: unLoadGlass
 

--
Gitblit v1.8.0