From 52516230c75988540b51e7160b1f5c03b96583ea Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 05 九月 2024 16:09:40 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/layout/MainErpView.vue                                                                                                     |    4 
 UI-Project/src/views/Returns/returns.vue                                                                                                  |   43 ++
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java                                   |   24 +
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml                                                   |    3 
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml                                                        |    2 
 UI-Project/src/views/UnLoadGlass/loadmachinerack.vue                                                                                      |  221 ++++++++------
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java      |   15 +
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java                                |   30 +
 hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java                                     |    4 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java               |    2 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java          |    2 
 hangzhoumesParent/common/servicebase/pom.xml                                                                                              |    6 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml                                                       |    2 
 hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java                                     |    4 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml                                                      |    5 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java                                       |    4 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java               |    2 
 hangzhoumesParent/common/pom.xml                                                                                                          |   29 -
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java                           |    4 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java                                            |    2 
 hangzhoumesParent/pom.xml                                                                                                                 |    5 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java |   21 +
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml                                               |    2 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java                                              |    2 
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java                                                 |   47 +++
 hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml                                                     |    2 
 UI-Project/src/views/Slicecage/slicecage.vue                                                                                              |   59 +++
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java                                     |   28 +
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java         |    9 
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java                                              |  117 ++++---
 hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java                                                       |   11 
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java                                   |    4 
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java                   |    4 
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql                                           |  156 ++++++++++
 34 files changed, 665 insertions(+), 210 deletions(-)

diff --git a/UI-Project/src/layout/MainErpView.vue b/UI-Project/src/layout/MainErpView.vue
index 050df7b..e2f4b57 100644
--- a/UI-Project/src/layout/MainErpView.vue
+++ b/UI-Project/src/layout/MainErpView.vue
@@ -197,7 +197,7 @@
       </el-header>
       <div id="line"></div>
       <el-container>
-      <el-aside :width="isCollapse ? '30px' : '200px'" style="background-color: #fff;">
+      <el-aside :width="isCollapse ? '0px' : '200px'" style="background-color: #fff;">
         <el-row :span="20">
             <el-menu :default-active="activePath" class="el-menu-vertical-demo" >
               <div class="menu">
@@ -336,7 +336,7 @@
 
 ul li {
   height: 28px;
-  width: 200px;
+  width: 180px;
   line-height: 30px;
   /* background: rgb(128, 128, 128); */
   color: #000000;
diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index a3613f2..c5ffe12 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -96,6 +96,10 @@
   dialoglea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
   fetchFlowCardId(); 
 };
+const selectproject = () => {
+  dialogFormVisible.value = true; 
+  selectgong(); 
+};
 // 鍊肩彮淇℃伅
 const fetchFlowCardId = async () => {
   try  {
@@ -224,7 +228,27 @@
 const requestData = {  
   state: 100  
 };  
-// 璋冪敤鎺ュ彛鑾峰彇閫夐」鏁版嵁鐨勫嚱鏁�  
+
+
+
+
+const selectgong = async (queryString: string) => {
+  try  {
+    const response = await request.post('/loadGlass/optimizeProject/listByState',{
+      ...requestData,  
+      query: queryString
+    })
+    if (response.code == 200) {
+      titleSelectJson.value.processType = response.data;
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
 const fetchOptions = async (queryString: string) => {  
   try {  
     // 鍙戦�佽姹傚埌鍚庣鎺ュ彛  
@@ -232,9 +256,8 @@
       ...requestData,  
       query: queryString // 灏嗘煡璇㈠瓧绗︿覆浣滀负鍙傛暟浼犻��  
     });  
-    
     if (response.code == 200) {  
-    titleSelectJson.value.processType = response.data;
+    // titleSelectJson.value.processType = response.data;
     console.log(response.data);
  
     } else {  
@@ -243,7 +266,7 @@
   } catch (error) {  
     console.error('Error fetching options:', error);  
   }  
-};  
+};
 // 澶勭悊鐢ㄦ埛杈撳叆鍙樺寲鐨勬柟娉�  
 const handleInputChange = async (value: string) => {  
   if (value) {  
@@ -375,7 +398,6 @@
         message: t('basicData.pause'),
       })
     }
-   
 };  
 // 鍒犻櫎
 const handleConfirma = async () => {
@@ -387,8 +409,7 @@
       filmsId: "",
       patternThickness: 0,
       number: 0
-    }); 
- 
+    });
     if (response.code == 200) {
       // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
       ElMessage.success(response.message);
@@ -435,7 +456,6 @@
       const uniqueHeights = new Set(response.data.map(item => item.height));  
       const uniqueFilmsIds = new Set(response.data.map(item => item.filmsId));  
       const uniqueThicknesses = new Set(response.data.map(item => item.thickness));  
-  
       selectOptions.value = Array.from(uniqueWidths).map(width => ({ 
       value: width, 
       label: width, 
@@ -465,12 +485,9 @@
 }
 // 寮�濮嬩笂鐗�
 const handle = async () => {
-  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {  
-      
+  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
   try  {
   let engineeringId = window.localStorage.getItem('engineeringId')
-console.log(engineeringId);
-
   const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
     engineerId: engineeringId,
     state: 1,
@@ -708,7 +725,7 @@
     <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;" >{{ $t('basicData.change') }}</el-button>
    
   </div>
-    <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button>
+    <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="selectproject">{{ $t('basicData.selectproject') }}</el-button>
     <el-button :disabled="!canSelectProject" :style="{ backgroundColor: canStartLoading ? 'green' : 'initial',color: canStartLoading ? 'white' : 'black', }" style="margin-top: 5px;margin-left: 20px;"  @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 894ec34..f9e6d6e 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -16,6 +16,7 @@
 const dialogFormVisiblea = ref(false)
 const dialogFormVisibleb = ref(false)
 const dialogFormVisiblec = ref(false)
+const dialogFormVisibles = ref(false)
 const tableData = ref([])
 const tableDatagh = ref([])
 const tableDatab = ref([])
@@ -24,6 +25,7 @@
 const tableDataf = ref([])
 const tableDatae = ref([])
 const tableDatax = ref([])
+const tableDatas = ref([])
 const carPosition = ref([])
 const ganghua = ref('')
 const adjustedRects = ref([]);
@@ -384,6 +386,33 @@
     console.error('鍙戠敓閿欒:', error);  
   }  
 }; 
+ // 鎸囧畾娴佺▼鍗�
+ const brokes = async(row) => {  
+  try {
+    const confirmResult = await ElMessageBox.confirm(  
+      t('searchOrder.specifytemperinga'), 
+      t('searchOrder.prompt'),  
+      {  
+        confirmButtonText: t('searchOrder.yes'), 
+        cancelButtonText: t('searchOrder.cancel'),
+        type: 'warning',  
+      } 
+    ); 
+    if (confirmResult === 'confirm') { 
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/appointFlowCard",{
+        flowCardId: row.flow_card_id,
+        layer: row.layer,
+    });
+    if (response.code === 200) {
+      ElMessage.success(response.message);
+      } else {  
+      ElMessage.error(response.message);
+      }  
+    }  
+  } catch (error) {  
+    console.error('鍙戠敓閿欒:', error);  
+  }  
+}; 
 // 鍑虹墖闃熷垪鎷胯蛋
 const brokeb = async(row) => {  
   try {
@@ -518,7 +547,23 @@
   } catch (error) {  
     // console.error('Error fetching rects :', error);  
   }  
+
+  
 }); 
+const fetchFlows = async () => {
+  try {  
+    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectFlowCardByCache');
+    if (response.code === 200) {  
+      tableDatas.value = response.data
+    } else {  
+      ElMessage.warning(response.msg)
+    }  
+  } catch (error) {  
+    // console.error('Error fetching rects :', error);  
+  } 
+}
+ 
+
 const fetchFlow = async () => {
   try  {
     const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass')
@@ -775,6 +820,7 @@
     <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
+    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">闈為挗鍖栨祦绋嬪崱鏌ヨ</el-button>
     <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" />
     <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
       <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
@@ -1459,6 +1505,19 @@
       </div>
     </template>
 </el-dialog>
+<el-dialog v-model="dialogFormVisibles" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
+    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
+        :data="tableDatas" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+          <el-table-column prop="flow_card_id" fixed align="center" :label="$t('searchOrder.processcards')"/>
+          <el-table-column prop="layer" align="center" label="灞�" />
+          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" />
+          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" >
+            <template #default="scope">
+              <el-button size="mini" type="text" plain @click="brokes(scope.row)">鎸囧畾娴佺▼鍗�</el-button>
+            </template>
+        </el-table-column>
+        </el-table>
+</el-dialog>
 </template>
 <style scoped>
 #dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
diff --git a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
index 513c5a5..c2c5ddc 100644
--- a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
+++ b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -1,26 +1,30 @@
 <script setup>
-import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
-import {useRouter} from "vue-router"
-import {useI18n} from 'vue-i18n'
-import {ElMessage} from 'element-plus'
+import { onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from "vue";
+import { useRouter } from "vue-router"
+import { useI18n } from 'vue-i18n'
+import { ElMessage } from 'element-plus'
 import request from "@/utils/request";
-import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
-import {host, WebSocketHost} from '@/utils/constants'
+import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService';
+import { host, WebSocketHost } from '@/utils/constants'
 import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue";
 import Landingindication from "./Landingindication.vue";
 import Landingindicationtwo from "./Landingindicationtwo.vue";
 import PrintLabel from "@/views/UnLoadGlass/PrintCustomLabelSemi1.vue";
 
 const router = useRouter()
-const {t} = useI18n()
+const { t } = useI18n()
 let language = ref(localStorage.getItem('lang') || 'zh')
 const printLoading = ref(true)
 const fullFlowCard = ref('')
 const autoPrint = ref(false)
+const takeGlass = ref([])
+const scanGlass = ref([])
+
 
 const dialogFormVisiblea = ref(false)
 const dialogFormVisiblea2 = ref(false)
 const dialogFormVisibleaDownGlass = ref(false)
+const dialogFormVisibleaDownGlasss = ref(false)
 // 鏁版嵁
 const loading = ref(false);
 // 寮规鏄剧ず鎺у埗
@@ -42,7 +46,7 @@
 const printLayer = ref('')
 const now = new Date();
 const timeRange = ref([])
-const browser=ref(false)
+const browser = ref(false)
 
 const handleChange = async () => {
   console.log("瑙﹀彂寮�鍏�")
@@ -65,14 +69,14 @@
     console.error(error);
   }
 }
-const confirmBrowser = () =>{
+const confirmBrowser = () => {
   if (/chrome|chromium/i.test(navigator.userAgent) && !/edg/i.test(navigator.userAgent)) {
-    browser.value=true
-} else if (/edg/i.test(navigator.userAgent)) {
-  browser.value=false
-} else {
-  browser.value=false
-}
+    browser.value = true
+  } else if (/edg/i.test(navigator.userAgent)) {
+    browser.value = false
+  } else {
+    browser.value = false
+  }
 }
 
 const handleInputChangea = (value, rowId) => {
@@ -98,7 +102,7 @@
     if (response.code === 200) {
 
       flowCardOptions.value = response.data.filter(item => item !== null)
-          .map(item => ({flowcard_id: item.flow_card_id}));
+        .map(item => ({ flowcard_id: item.flow_card_id }));
       console.log(flowCardOptions.value);
     }
     else {
@@ -143,7 +147,7 @@
 const handleBindRack2 = (row) => {
   workstationId.value = row.workstationId; // 鍋囪rackNumber鏄灦鍙峰瓧娈电殑灞炴�у悕
   dialogFormVisiblea2.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
-  workFlowCard.value=row.flowCardId;
+  workFlowCard.value = row.flowCardId;
 };
 //娓呴櫎鍐呭
 const handleclear = async () => {
@@ -158,8 +162,8 @@
       console.log('娓呴櫎鎴愬姛');
       ElMessage.success(response.message);
       dialogFormVisiblea2.value = false;
-      if(fullFlowCard.value==workFlowCard.value){
-        fullFlowCard.value="";
+      if (fullFlowCard.value == workFlowCard.value) {
+        fullFlowCard.value = "";
       }
     } else if (response.code === 500) {
       // 娓呴櫎澶辫触鐨勯�昏緫
@@ -209,9 +213,15 @@
   if (data.autoPrint != null) {
     autoPrint.value = data.autoPrint[0];
   }
+  if (data.takeGlass != null) {
+    takeGlass.value = data.takeGlass[0];
+  }
+  if (data.scanGlass != null) {
+    scanGlass.value = data.scanGlass[0];
+  }
 
   //鑷姩鎵撳嵃
-  if (fullFlowCard.value == ""&&autoPrint.value==true&&browser.value==true) {
+  if (fullFlowCard.value == "" && autoPrint.value == true && browser.value == true) {
     for (let i = 0; i < tableData.length; i++) {
       if (tableData[i].totalQuantity != 0) {
         if (tableData[i].totalQuantity == tableData[i].racksNumber + tableData[i].otherNumber && fullFlowCard.value != tableData[i].flowCardId) {
@@ -225,7 +235,7 @@
       }
     }
   }
-  if(data.params!=null){
+  if (data.params != null) {
     tableData.splice(0, tableData.length, ...data.params[0]);
   }
 
@@ -304,19 +314,19 @@
   printLayer.value = row.layer
   dialogTableVisible.value = true;
   setTimeout(() => {
-    printFlowCard(); 
+    printFlowCard();
     dialogTableVisible.value = false;
   }, 2000);
 }
 const open1 = async (row) => {
 
-printFlowCardId.value = row.flowCardId;
-printLayer.value = row.layer
-dialogTableVisible1.value = true;
-setTimeout(() => {
-  printFlowCard1(); 
-  //dialogTableVisible1.value = false;
-}, 1000);
+  printFlowCardId.value = row.flowCardId;
+  printLayer.value = row.layer
+  dialogTableVisible1.value = true;
+  setTimeout(() => {
+    printFlowCard1();
+    //dialogTableVisible1.value = false;
+  }, 1000);
 }
 
 const printFlowCard = () => {
@@ -334,22 +344,22 @@
 
   // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
   let style = doc.createElement("style");
-  console.log("style1:"+style.innerHTML)
+  console.log("style1:" + style.innerHTML)
   style.innerHTML =
-      "body>#" +
-      printId +
-      "{display:none;}@media print{" +
-      "@page {" +
-      "    size: auto; " +
-      "    margin: 10mm 5mm 10mm 5mm; " +
-      "  }body>:not(#" +
-      printId +
-      "){display:none !important;}body>#" +
-      printId +
-      "{display:block;}#" +
-      printId +
-      "{display: block; padding: 0; margin: 0;  width: 100%;  position: absolute; top: 0; left: 0; height: 100vh;  box-sizing: border-box;}} ";
-      
+    "body>#" +
+    printId +
+    "{display:none;}@media print{" +
+    "@page {" +
+    "    size: auto; " +
+    "    margin: 10mm 5mm 10mm 5mm; " +
+    "  }body>:not(#" +
+    printId +
+    "){display:none !important;}body>#" +
+    printId +
+    "{display:block;}#" +
+    printId +
+    "{display: block; padding: 0; margin: 0;  width: 100%;  position: absolute; top: 0; left: 0; height: 100vh;  box-sizing: border-box;}} ";
+
   content.innerHTML = el.outerHTML;
   // // console.log("el.outerHTML", el.outerHTML);
   body.appendChild(style);
@@ -378,17 +388,17 @@
   // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
   let style = doc.createElement("style");
   style.innerHTML =
-      "body>#" +
-      printId +
-      "{display:none}@media print{" +
-      "@page {" +
-      "    size: auto; " +
-      "    margin: 2mm 2mm 2mm 2mm;  " +
-      "  }body>:not(#" +
-      printId +
-      "){display:none !important}body>#" +
-      printId +
-      "{display:block;padding-top:1px}}";
+    "body>#" +
+    printId +
+    "{display:none}@media print{" +
+    "@page {" +
+    "    size: auto; " +
+    "    margin: 2mm 2mm 2mm 2mm;  " +
+    "  }body>:not(#" +
+    printId +
+    "){display:none !important}body>#" +
+    printId +
+    "{display:block;padding-top:1px}}";
   //
   content.innerHTML = el.outerHTML;
   // // console.log("el.outerHTML", el.outerHTML);
@@ -415,24 +425,27 @@
 <template>
   <div>
     <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
-               @click="dialogFormVisibleaDownGlass = true">钀芥灦璇︽儏
+      @click="dialogFormVisibleaDownGlass = true">钀芥灦璇︽儏
     </el-button>
-    <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2" :inactive-text="$t('鑷姩鎵撳嵃')"
-               @change="handleChange"/>
+    <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
+      @click="dialogFormVisibleaDownGlasss = true">浜哄伐涓嬬墖
+    </el-button>
+    <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2"
+      :inactive-text="$t('鑷姩鎵撳嵃')" @change="handleChange" />
     <el-card style="flex: 1;" v-loading="loading">
       <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading">
         <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
           <el-table height="350px" ref="table" @selection-change="handleSelectionChange" :data="tableData"
-                    :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
-            <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80"/>
+            :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
+            <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80" />
             <el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')"
-                             min-width="120"/>
-            <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="150"/>
+              min-width="120" />
+            <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="150" />
             <el-table-column prop="totalQuantity" align="center" :label="$t('reportWork.totalquantity')"
-                             min-width="120"/>
-            <el-table-column prop="racksNumber" align="center" :label="$t('reportWork.beendropped')" min-width="120"/>
-            <el-table-column prop="layer" align="center" label="灞傛暟" min-width="120"/>
-            <el-table-column prop="otherNumber" align="center" label="浜哄伐涓嬬墖鏁�" min-width="120"/>
+              min-width="120" />
+            <el-table-column prop="racksNumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" />
+            <el-table-column prop="layer" align="center" label="灞傛暟" min-width="120" />
+            <el-table-column prop="otherNumber" align="center" label="浜哄伐涓嬬墖鏁�" min-width="120" />
             <!-- <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> -->
             <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" />
             <el-table-column align="center" :label="$t('reportWork.startstatus')" min-width="80" prop="enableState">
@@ -445,7 +458,7 @@
             <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="400">
               <template #default="scope">
                 <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '宸插惎鐢�'"
-                           @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }}
+                  @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }}
                 </el-button>
                 <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear')
                   }}</el-button>
@@ -457,8 +470,7 @@
           </el-table>
 
         </div>
-        <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%"
-                   :title="$t('searchOrder.cageinformation')">
+        <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('钀芥灦淇℃伅')">
           <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('璇烽�夋嫨宸ヤ綅')" clearable>
             <el-option label="鍏ㄩ儴" value="0"></el-option>
             <el-option label="1" value="1"></el-option>
@@ -471,35 +483,57 @@
           </el-select>
 
           <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable
-                     @input="handleInputChangea($event, row.id)">
-            <el-option v-for="item in selectOptionsa" :key="item" :label="item" :value="item"/>
+            @input="handleInputChangea($event, row.id)">
+            <el-option v-for="item in selectOptionsa" :key="item" :label="item" :value="item" />
           </el-select>
 
           <span class="demonstration">鏃堕棿娈�</span>
-          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" value-format = "YYYY-MM-DD hh:mm:ss"
-                          end-placeholder="缁撴潫鏃ユ湡">
+          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�"
+            value-format="YYYY-MM-DD hh:mm:ss" end-placeholder="缁撴潫鏃ユ湡">
           </el-date-picker>
 
           <el-button type="primary" style="margin-left: 10px;" @click="selectDownGlassData()">{{
-              $t('reportmanage.inquire')
-            }}
+        $t('reportmanage.inquire')
+      }}
           </el-button>
           <el-table height="200px" ref="table" @selection-change="handleSelectionChange" :data="downGlass"
-                    :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
-            <el-table-column prop="workStationId" align="center" :label="$t('宸ヤ綅鍙�')" min-width="80"/>
-            <el-table-column prop="engineerId" align="center" :label="$t('宸ョ▼鍙�')" min-width="80"/>
-            <el-table-column prop="flowCardId" align="center" :label="$t('娴佺▼鍗″彿')" min-width="80"/>
-            <el-table-column prop="layer" align="center" :label="$t('灞�')" min-width="120"/>
-            <el-table-column prop="sequence" align="center" :label="$t('椤哄簭')" min-width="150"/>
-            <el-table-column prop="width" align="center" :label="$t('瀹�')" min-width="120"/>
-            <el-table-column prop="height" align="center" :label="$t('楂�')" min-width="120"/>
-            <el-table-column prop="Filmsid" align="center" :label="$t('鑶滅郴')" min-width="120"/>
-            <el-table-column prop="thickness" align="center" label="鍘氬害" min-width="120"/>
-            <el-table-column prop="glassId" align="center" :label="$t('鐜荤拑id')" min-width="120"/>
-
+            :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
+            <el-table-column prop="workStationId" align="center" :label="$t('宸ヤ綅鍙�')" min-width="80" />
+            <el-table-column prop="engineerId" align="center" :label="$t('宸ョ▼鍙�')" min-width="80" />
+            <el-table-column prop="flowCardId" align="center" :label="$t('娴佺▼鍗″彿')" min-width="80" />
+            <el-table-column prop="layer" align="center" :label="$t('灞�')" min-width="120" />
+            <el-table-column prop="sequence" align="center" :label="$t('椤哄簭')" min-width="150" />
+            <el-table-column prop="width" align="center" :label="$t('瀹�')" min-width="120" />
+            <el-table-column prop="height" align="center" :label="$t('楂�')" min-width="120" />
+            <el-table-column prop="Filmsid" align="center" :label="$t('鑶滅郴')" min-width="120" />
+            <el-table-column prop="thickness" align="center" label="鍘氬害" min-width="120" />
+            <el-table-column prop="glassId" align="center" :label="$t('鐜荤拑id')" min-width="120" />
           </el-table>
         </el-dialog>
-
+        <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('浜哄伐涓嬬墖淇℃伅')">
+          <div style="display:flex;justify-content: space-around;">
+            <el-card style="display: flex; justify-content: center; align-items: center; width:800px; height: 800px;">
+              <div
+                :style="{ width: takeGlass.width + 'px', height: takeGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (takeGlass.width > takeGlass.height ? takeGlass.width : takeGlass.height) + ')' }">
+                <div style="font-size: 50px; text-align: center;">
+                  <div>{{ takeGlass.flowCardId }}</div>
+                  <div>{{ takeGlass.width }}</div>
+                  <div>{{ takeGlass.height }}</div>
+                </div>
+              </div>
+            </el-card>
+            <el-card style="display: flex; justify-content: center; align-items: center; width: 800px; height: 800px;">
+              <div
+                :style="{ width: scanGlass.width + 'px', height: scanGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (scanGlass.width > scanGlass.height ? scanGlass.width : scanGlass.height) + ')' }">
+                <div style="font-size: 50px; text-align: center;">
+                  <div>{{ scanGlass.flowCardId }}</div>
+                  <div>{{ scanGlass.width }}</div>
+                  <div>{{ scanGlass.height }}</div>
+                </div>
+              </div>
+            </el-card>
+          </div>
+        </el-dialog>
       </el-card>
       <!-- workstationId: '1',
     workstationId: '1005',
@@ -529,7 +563,7 @@
           <el-form-item :label="$t('reportWork.cardnumbera')" :required="true" style="width: 25vw;">
             <el-select v-model="flowCardId" :placeholder="$t('reportWork.incardnumber')">
               <el-option v-for="item in flowCardOptions" :key="item.flowcard_id" :label="item.flowcard_id"
-                         :value="item.flowcard_id"/>
+                :value="item.flowcard_id" />
             </el-select>
           </el-form-item>
         </el-form>
@@ -556,13 +590,12 @@
     </template>
   </el-dialog>
 
-  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close >
+  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close>
     <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
-                style="width: 100%;height: 100%"/>
+      style="width: 100%;height: 100%" />
   </el-dialog>
-  <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close >
-    <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
-                style=""/>
+  <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close>
+    <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer" style="" />
   </el-dialog>
 
 </template>
diff --git a/hangzhoumesParent/common/pom.xml b/hangzhoumesParent/common/pom.xml
index 9da0bc0..49ca831 100644
--- a/hangzhoumesParent/common/pom.xml
+++ b/hangzhoumesParent/common/pom.xml
@@ -136,23 +136,22 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <!--        2.0~2.2	Knife4j 2.0.0 ~ 2.0.6-->
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-spring-boot-starter</artifactId>
+            <version>2.0.9</version>
+        </dependency>
+        <!--                2.0~2.2	Knife4j 2.0.0 ~ 2.0.6-->
         <!--        <dependency>-->
-        <!--            <groupId>com.github.xiaoymin</groupId>-->
-        <!--            <artifactId>knife4j-spring-boot-starter</artifactId>-->
-        <!--            <version>2.0.6</version>-->
+        <!--            <groupId>io.springfox</groupId>-->
+        <!--            <artifactId>springfox-swagger2</artifactId>-->
+        <!--            <version>2.7.0</version>-->
         <!--        </dependency>-->
-
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-            <version>2.7.0</version>
-        </dependency>
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>2.7.0</version>
-        </dependency>
+        <!--        <dependency>-->
+        <!--            <groupId>io.springfox</groupId>-->
+        <!--            <artifactId>springfox-swagger-ui</artifactId>-->
+        <!--            <version>2.7.0</version>-->
+        <!--        </dependency>-->
 
         <!--hutool java楠岃瘉鏂规硶绫�-->
         <dependency>
diff --git a/hangzhoumesParent/common/servicebase/pom.xml b/hangzhoumesParent/common/servicebase/pom.xml
index 4f1f015..ba1f75e 100644
--- a/hangzhoumesParent/common/servicebase/pom.xml
+++ b/hangzhoumesParent/common/servicebase/pom.xml
@@ -22,6 +22,12 @@
             <artifactId>mssql-jdbc</artifactId>
             <version>6.4.0.jre8</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.liquibase</groupId>
+            <artifactId>liquibase-core</artifactId>
+            <version>3.8.1</version>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file
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 47b4769..011919a 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
@@ -30,7 +30,7 @@
      * A09鍑虹墖鐩爣浣嶇疆  d02鍗ц浆绔� 閽㈠寲鍑虹墖    3001
      * A10鍑虹墖鐩爣浣嶇疆  d05鍗ц浆绔� 浜哄伐鍑虹墖    3002
      */
-    public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001;
+    public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002;
     public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002;
 
     /**
@@ -171,4 +171,13 @@
     public static final Integer SLOT_ON = 1;
     public static final Integer SLOT_OFF = 0;
 
+    /**
+     * 涓嬬墖浠诲姟鐜荤拑鐘舵��
+     * 鐢熸垚浠诲姟0
+     * 鍑虹墖浠诲姟2
+     */
+    public static final Integer UNLOAD_GLASS_CREATE = 0;
+    public static final Integer UNLOAD_GLASS_OUT = 1;
+    public static final Integer UNLOAD_GLASS_DOWN = 2;
+
 }
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java
index 0062ed2..c0b8e1f 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java
@@ -3,19 +3,12 @@
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.ParameterBuilder;
 import springfox.documentation.builders.PathSelectors;
 import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.schema.ModelRef;
-import springfox.documentation.service.*;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
 import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.contexts.SecurityContext;
 import springfox.documentation.spring.web.plugins.Docket;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
 
 /**
  * @author zhan_py
@@ -25,54 +18,82 @@
 @Configuration
 public class Swagger2Config {
 
+
     @Bean
-    public Docket webApiConfig() {
-        List<Parameter> pars = new ArrayList<>();
-        ParameterBuilder tokenPar = new ParameterBuilder();
-        tokenPar.name("userId")
-                .description("鐢ㄦ埛token")
-                //.defaultValue(JwtHelper.createToken(1L, "admin"))
-                .defaultValue("1")
-                .modelRef(new ModelRef("string"))
-                .parameterType("header")
-                .required(false)
-                .build();
-        pars.add(tokenPar.build());
+    public Docket moduleDocket() {
+        return docket("mes鎺ュ彛鏂囨。", "com.mes");
+    }
 
+
+    private Docket docket(String groupName, String basePackages) {
         return new Docket(DocumentationType.SWAGGER_2)
-                .groupName("webApi")
-                .apiInfo(webApiInfo())
+                .groupName(groupName)
+                .apiInfo(apiInfo())
                 .select()
-                //鍙樉绀篴pi璺緞涓嬬殑椤甸潰
-                .apis(RequestHandlerSelectors.basePackage("com.mes"))
+                .apis(RequestHandlerSelectors.basePackage(basePackages))
                 .paths(PathSelectors.any())
-                .build()
-                .globalOperationParameters(pars)
-                .securitySchemes(Collections.EMPTY_LIST)
-                .securityContexts(Arrays.asList(securityContext()));
-    }
-
-    private SecurityContext securityContext() {
-        return SecurityContext.builder()
-                .securityReferences(defaultAuth())
-                .forPaths(PathSelectors.any())
                 .build();
     }
 
-    private List<SecurityReference> defaultAuth() {
-        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
-        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
-        authorizationScopes[0] = authorizationScope;
-        return Arrays.asList(new SecurityReference("Authorization", authorizationScopes));
-    }
-
-
-    private ApiInfo webApiInfo() {
+    private ApiInfo apiInfo() {
         return new ApiInfoBuilder()
-                .title("缃戠珯-API鏂囨。")
-                .description("鏈枃妗f弿杩颁簡mes缃戠珯寰湇鍔℃帴鍙e畾涔�")
-                .version("1.0")
-                .contact(new Contact("zhan_py", "", ""))
+                .title("mes鎺ュ彛鏂囨。绯荤粺")
+                .description("mesApi鎺ュ彛鏂囨。绯荤粺")
+                .license("Powered By mes")
+                .licenseUrl("http://127.0.0.1")
+                .termsOfServiceUrl("http://127.0.0.1")
+                .contact(new Contact("mes", "http://127.0.0.1", "beibo@mes.com"))
+                .version("V1.0.0")
                 .build();
     }
+
+
+//    @Bean
+//    public Docket webApiConfig() {
+//        List<Parameter> pars = new ArrayList<>();
+//        ParameterBuilder tokenPar = new ParameterBuilder();
+//        tokenPar.name("userId")
+//                .description("鐢ㄦ埛token")
+//                .defaultValue("1")
+//                .modelRef(new ModelRef("string"))
+//                .parameterType("header")
+//                .required(false)
+//                .build();
+//        pars.add(tokenPar.build());
+//
+//        return new Docket(DocumentationType.SWAGGER_2)
+//                .apiInfo(webApiInfo())
+//                .select()
+//                //鍙樉绀篴pi璺緞涓嬬殑椤甸潰
+//                .apis(RequestHandlerSelectors.basePackage("com.mes"))
+//                .paths(PathSelectors.any())
+//                .build()
+//                .globalOperationParameters(pars)
+//                .securitySchemes(Collections.EMPTY_LIST)
+//                .securityContexts(Arrays.asList(securityContext()));
+//    }
+//
+//    private SecurityContext securityContext() {
+//        return SecurityContext.builder()
+//                .securityReferences(defaultAuth())
+//                .forPaths(PathSelectors.any())
+//                .build();
+//    }
+//
+//    private List<SecurityReference> defaultAuth() {
+//        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+//        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+//        authorizationScopes[0] = authorizationScope;
+//        return Arrays.asList(new SecurityReference("Authorization", authorizationScopes));
+//    }
+//
+//
+//    private ApiInfo webApiInfo() {
+//        return new ApiInfoBuilder()
+//                .title("缃戠珯-API鏂囨。")
+//                .description("鏈枃妗f弿杩颁簡mes缃戠珯寰湇鍔℃帴鍙e畾涔�")
+//                .version("1.0")
+//                .contact(new Contact("zhan_py", "", ""))
+//                .build();
+//    }
 }
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
index 5707047..db1b3b5 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
@@ -39,4 +39,6 @@
     List<DamagePrint> selectDamagePrint(Damage damage);
 
     List<DamagePrint> selectDamagePrintDetails(Damage damage);
+
+    void deleteByGlassId(String glassId);
 }
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
index 0b93eee..b37edb4 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
@@ -5,6 +5,7 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.query.MPJQueryWrapper;
+import com.mes.common.config.Const;
 import com.mes.damage.entity.Damage;
 import com.mes.damage.entity.DamagePrint;
 import com.mes.damage.mapper.DamageMapper;
@@ -145,34 +146,45 @@
         }
         this.saveBatch(damageList);
     }
+
     /**
      * 鎷胯蛋鎵撳嵃鏁版嵁鏌ヨ
      */
     @Override
     public List<DamagePrint> selectDamagePrint(Damage damage) {
-        MPJQueryWrapper<Damage> listDamage=new MPJQueryWrapper<Damage>()
+        MPJQueryWrapper<Damage> listDamage = new MPJQueryWrapper<Damage>()
                 .select("t.engineer_id,t.glass_id,b.tempering_layout_id,b.tempering_feed_sequence,b.width,b.height,b.thickness")
                 .leftJoin("glass_info as b  on t.glass_id=b.glass_id")
-                .eq("t.working_procedure",damage.getWorkingProcedure())
-                .eq("t.type",damage.getType());
+                .eq("t.working_procedure", damage.getWorkingProcedure())
+                .eq("t.type", damage.getType());
         // 鍔ㄦ�佹坊鍔犳潯浠讹紝褰� id 鏈夊�兼椂
         if (damage.getEngineerId() != null) {
             listDamage.eq("t.engineer_id", damage.getEngineerId());
         }
-        return damageMapper.selectJoinList(DamagePrint.class,listDamage);
+        return damageMapper.selectJoinList(DamagePrint.class, listDamage);
     }
+
     /**
      * 鎷胯蛋鎵撳嵃鎵撳嵃璇︽儏鏌ヨ
      */
     @Override
     public List<DamagePrint> selectDamagePrintDetails(Damage damage) {
-        List<DamagePrint> listDamage=damageMapper.selectJoinList(DamagePrint.class,new MPJQueryWrapper<Damage>()
+        List<DamagePrint> listDamage = damageMapper.selectJoinList(DamagePrint.class, new MPJQueryWrapper<Damage>()
                 .select("b.flow_card_id,b.layer,t.engineer_id,b.tempering_layout_id,b.tempering_feed_sequence,t.glass_id,b.width,b.height,b.thickness")
                 .leftJoin("glass_info as b  on t.glass_id=b.glass_id")
-                .eq("t.working_procedure",damage.getWorkingProcedure())
-                .eq("t.type",damage.getType())
-                .eq("t.engineer_id",damage.getEngineerId())
+                .eq("t.working_procedure", damage.getWorkingProcedure())
+                .eq("t.type", damage.getType())
+                .eq("t.engineer_id", damage.getEngineerId())
         );
         return listDamage;
     }
+
+    @Override
+    public void deleteByGlassId(String glassId) {
+        baseMapper.delete(
+                new LambdaQueryWrapper<Damage>()
+                        .eq(Damage::getGlassId, glassId)
+                        .in(Damage::getType, Const.GLASS_STATE_DAMAGE, Const.GLASS_STATE_TAKE)
+        );
+    }
 }
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java
index 13cceb4..b3de82f 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java
@@ -6,7 +6,7 @@
 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;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
 
 /**
  * @Author : zhoush
@@ -17,7 +17,7 @@
 @SpringBootApplication
 @MapperScan("com.mes.*.mapper")
 @EnableDiscoveryClient
-@EnableSwagger2
+@EnableSwagger2WebMvc
 @EnableScheduling
 public class CacheGlassModuleApplication {
 
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 d0fb44d..9d0c330 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
@@ -137,7 +137,7 @@
             //鍔犵瀛愰噷闈㈡槸鍚︽湁鐜荤拑锛屾湁鍏堝嚭锛屾棤鐜荤拑鍏堣繘
             boolean outFlase = outTo(Integer.parseInt(out08Glassstate),
                     Integer.parseInt(out10Glassstate), confirmationWrodAddress, glassIdeValue, Integer.parseInt(currentSlot));
-            log.info("鍑虹墖浠诲姟鏄惁瀹屾垚锛歿},澶辫触涓旂幓鐠僫d:{}涓嶄负绌哄垯鎵ц杩涚墖浠诲姟", outFlase, glassIdeValue);
+            log.info("鍑虹墖浠诲姟鏄惁瀹屾垚锛歿},涓旂幓鐠僫d:{}涓嶄负绌哄垯鎵ц杩涚墖浠诲姟", outFlase, glassIdeValue);
             if (!outFlase && StringUtils.isNotBlank(glassIdeValue)) {
                 inTo(glassIdeValue, confirmationWrodAddress, currentSlot);
             }
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
index 8ab9ab1..46687a2 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
     active: dev
   application:
     name: cacheGlass
+  liquibase:
+    enabled: false
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
   configuration:
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java
index bdd4e12..ecfee1f 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java
@@ -6,7 +6,7 @@
 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;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
 
 /**
  * @Author : zhoush
@@ -15,7 +15,7 @@
  */
 @Slf4j
 @SpringBootApplication
-@EnableSwagger2
+@EnableSwagger2WebMvc
 @EnableDiscoveryClient
 @MapperScan(basePackages = "com.mes.*.mapper")
 @EnableScheduling
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
index ee43453..2f16a59 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
@@ -1,5 +1,6 @@
 package com.mes.bigstorage.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -125,6 +126,26 @@
         return Result.build(200, "鏌ヨ鎴愬姛", flowCardIdCount);
     }
 
+    @ApiOperation("鎸囧畾娴佺▼鍗�")
+    @PostMapping("/appointFlowCard")
+    public Result appointFlowCard(@RequestBody BigStorageCageDetails bigStorageCageDetails) {
+        List<BigStorageCageDetails> bigStorageCageDetailsList=bigStorageCageDetailsService.list(
+                new LambdaQueryWrapper<BigStorageCageDetails>()
+                .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL)
+        );
+        if(bigStorageCageDetailsList.size()==0){
+            bigStorageCageDetailsService.update(
+                    new LambdaUpdateWrapper<BigStorageCageDetails>()
+                            .set(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL)
+                            .eq(BigStorageCageDetails::getFlowCardId,bigStorageCageDetails.getFlowCardId())
+                            .eq(BigStorageCageDetails::getLayer,bigStorageCageDetails.getLayer())
+                            .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_IN)
+            );
+            return Result.build(200, "鎸囧畾娴佺▼鍗℃垚鍔�", 1);
+        }else{
+            return Result.build(200, "鎸囧畾娴佺▼鍗℃垚鍔�", 1);
+        }
 
+    }
 }
 
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java
index 2b2ed15..4c06b4b 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java
@@ -101,7 +101,7 @@
      * 宸ョ▼鍙�
      */
     @ApiModelProperty(value = "灞�", position = 17)
-    private String layer;
+    private int layer;
 
     /**
      * 杩涚墖浠诲姟
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 ba4cbc5..2e6b87a 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
@@ -4,7 +4,6 @@
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.github.yulichang.toolkit.JoinWrappers;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -152,6 +151,13 @@
     public void plcToHomeEdgFreeCarTask() {
         Date startDate = new Date();
         log.info("澶х悊鐗囩绌鸿溅杩涚墖浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate);
+        PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject;
+        String mesD03Address = plcMesObject.getPlcParameter("MESToD03").getValue();
+        String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getValue();
+        log.info("MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address);
+        if ("2".equals(mesD03Address) || "2".equals(mesD05Address)) {
+            log.info("鏈夊惎鍔ㄤ俊鍙凤紝MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address);
+        }
         PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
         String e01Status = plcParameterObject.getPlcParameter("E01State").getValue();
         String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue();
@@ -594,7 +600,11 @@
                 if (glassCount < inCarMaxSize) {
                     addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst);
                 } else {
-                    addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
+                    if (glassCount < inCarMaxSize + 1) {
+                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
+                    } else {
+                        return Boolean.FALSE;
+                    }
                 }
             } else {
                 flag = Boolean.FALSE;
@@ -605,12 +615,20 @@
             if (remainWidth >= widthFirst) {
                 if (remainWidth - widthFirst - glassGap >= widthSecond) {
                     if (glassCount < inCarMaxSize) {
-                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightSecond);
+                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst);
                     } else {
-                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond);
+                        if (glassCount < inCarMaxSize + 1) {
+                            addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
+                        } else {
+                            return Boolean.FALSE;
+                        }
                     }
                 } else {
-                    addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond);
+                    if (glassCount < inCarMaxSize + 1) {
+                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
+                    } else {
+                        return Boolean.FALSE;
+                    }
                 }
             } else {
                 flag = Boolean.FALSE;
@@ -644,6 +662,8 @@
         bigStorageCageFeedTask.setWidth(width);
         bigStorageCageFeedTask.setHeight(height);
         bigStorageCageFeedTask.setCreateTime(new Date());
+        //鍒犻櫎鐞嗙墖绗艰〃鎷胯蛋/鐮存崯鏁版嵁鏁版嵁
+        damageService.deleteByGlassId(glassId);
         return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask);
     }
 
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
index dd5a317..a1a4fa4 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
     active: cz
   application:
     name: cacheVerticalGlass
+  liquibase:
+    enabled: false
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
   configuration:
diff --git a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java
index 1ac53de..1d461dc 100644
--- a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java
+++ b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java
@@ -6,7 +6,7 @@
 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;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
 
 /**
  * @Author : zhoush
@@ -15,7 +15,7 @@
  */
 @Slf4j
 @SpringBootApplication
-@EnableSwagger2
+@EnableSwagger2WebMvc
 @EnableDiscoveryClient
 @MapperScan(basePackages = "com.mes.*.mapper")
 @EnableScheduling
diff --git a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
index 6fc80c0..3b841eb 100644
--- a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
     active: dev
   application:
     name: glassStorage
+  liquibase:
+    enabled: false
 
 
 mybatis-plus:
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 593308c..5d05d8e 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java
@@ -6,7 +6,7 @@
 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;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
 
 /**
  * @Author : zhoush
@@ -15,7 +15,7 @@
  */
 @Slf4j
 @SpringBootApplication
-@EnableSwagger2
+@EnableSwagger2WebMvc
 @EnableDiscoveryClient
 @EnableScheduling
 @MapperScan(basePackages = "com.mes.*.mapper")
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
index ee801d2..d61e1b4 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -5,6 +5,8 @@
     active: dev
   application:
     name: loadGlass
+  liquibase:
+    enabled: false
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
   configuration:
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java
index 8fb3948..1538e9e 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java
@@ -6,7 +6,7 @@
 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;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
 
 /**
  * @Author : zhoush
@@ -15,7 +15,7 @@
  */
 @Slf4j
 @SpringBootApplication
-@EnableSwagger2
+@EnableSwagger2WebMvc
 @EnableDiscoveryClient
 @EnableScheduling
 @MapperScan(basePackages = "com.mes.*.mapper")
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
index 12e113b..c959cf7 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -5,6 +5,9 @@
     active: dev
   application:
     name: temperingGlass
+  liquibase:
+    enabled: true
+    change-log: classpath:changelog/changelog.sql
 mybatis-plus:
   mapper-locations: classpath*:mapper/*.xml
   configuration:
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql
new file mode 100644
index 0000000..68e1a70
--- /dev/null
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql
@@ -0,0 +1,156 @@
+--liquibase formatted sql
+
+--changeset zsh:20240904001
+--preconditions onFail:CONTINUE onError:CONTINUE
+--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_type';
+CREATE TABLE sys_dict_type
+(
+    dict_id     BIGINT AUTO_INCREMENT PRIMARY KEY,
+    dict_name   VARCHAR(32) NOT NULL,
+    dict_type   VARCHAR(32) NOT NULL,
+    state       CHAR(1)     NOT NULL DEFAULT TRUE,
+    description VARCHAR(32),
+    create_time TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    deleted     char(1)              DEFAULT 0
+);
+--rollback DROP TABLE sys_dict_type;
+
+--changeset zsh:20240904002
+--preconditions onFail:CONTINUE onError:CONTINUE
+--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_data';
+CREATE TABLE sys_dict_data
+(
+    dict_id         BIGINT AUTO_INCREMENT PRIMARY KEY,
+    dict_sort       INT         NOT NULL,
+    dict_label      VARCHAR(32) NOT NULL,
+    dict_value      VARCHAR(32) NOT NULL,
+    dict_type       VARCHAR(32) NOT NULL,
+    dict_type_value varchar(32),
+    state           CHAR(1)     NOT NULL DEFAULT TRUE,
+    description     VARCHAR(32),
+    create_time     TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    deleted         char(1)              DEFAULT 0
+);
+--rollback DROP TABLE sys_dict_data;
+
+
+--changeset zsh:20240904003
+--preconditions onFail:CONTINUE onError:CONTINUE
+--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_type WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
+INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
+VALUES ('鐧界幓', 'clearGlass', '1', '0', '0');
+INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
+VALUES ('鍗曢摱', 'silver', '1', '1', '0');
+INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
+VALUES ('鍙岄摱', 'doubleSilver', '1', '2', '0');
+INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
+VALUES ('涓夐摱', 'thirdSilver', '1', '3', '0');
+INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
+VALUES ('瓒呯櫧', 'ultraClear', '1', '4', '0');
+INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
+VALUES ('鐑弽灏�', 'heatReflect', '1', '5', '0');
+--rollback DELETE FROM sys_dict_type WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
+
+--changeset zsh:20240904004
+--preconditions onFail:CONTINUE onError:CONTINUE
+--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_data WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (1, '鐧界幓', 'clearGlass', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (2, '瓒呯櫧', 'ultraClear', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (3, '鏉ユ枡鐧界幓', 'incomingClearGlass', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (4, '娆у窞鑼�', 'europeTeaColor', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (5, '姘存櫠鐏�', 'cristalGrey', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (6, '鐏扮幓', 'grayGlass', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (7, '鐏伴晙鑶�', 'grayCoating', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (8, '纾ㄧ爞', 'frosted', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (9, '绂忕壒钃�', 'fordBlue', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (10, '绂忕壒钃濋晙鑶�', 'fordBlueCoating', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (11, '钃濇槦鐏�', 'blueAstralGrey', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (12, '钃濈幓', 'blueGlass', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (13, '瓒呯櫧闀胯櫣', 'ultraClearChanghong', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (14, '閲戞櫠鐏�', 'jinjinGrey', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (15, '閲戞櫠鐏拌尪', 'jinjinTeaGrey', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (16, '闀�鑶�', 'coatingFilm', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (17, '闀胯櫣', 'clearGlassChanghong', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (18, '闃冲厜鑶�', 'solorControl', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (19, '楂樺弽搴曢��', 'arGlass', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (20, '楂樼櫧', 'arClear', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (21, '榛戠幓', 'blackGlass', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (22, '鐜夌爞', 'emery', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (23, '瓒呯櫧纾ㄧ爞', 'ultraClearFrosted', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (24, '閲戣尪鐜�', 'goldenTea', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (25, '钃濈伆闀�鑶�', 'blueGraycoatingFilm', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (26, '鍗曢」閫忚', 'onePoint', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (27, '瓒呯櫧闀�鑶�', 'ultraClearCoatingFilm', '鐧界幓', '0', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (1, 'F缁�', 'fGreen', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (2, 'F缁縧owe', 'fGreenLowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (3, 'F缁块晙鑶�', 'fGreenCoating', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (4, 'Low-e', 'lowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (5, 'super52', 'super52', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (6, '涓幓鍦ㄧ嚎', 'zgOnlineGlass', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (7, '鍖楃幓60绂荤嚎lowe', 'ng60OfflineLowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (8, '鍗楃幓鍦ㄧ嚎lowe', 'csgOnlineLowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (9, '鍙扮幓81A', 'tg81a', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (10, '鍙扮幓lowe70', 'tgLowe70', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (11, '鍙扮幓LOWE78', 'tgLowe78', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (12, '娌冲寳閲戠憺lowe80', 'hbJinruiLowe80', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (13, '绂忕壒钃漧owe', 'fordBlueLowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (14, '绂忚幈鐗笷XB60', 'flatFxb60', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (15, '绂忚幈鐗筶owe60', 'flatLowe60', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (16, '绂忚幈鐗筶owe70', 'flatLowe70', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (17, '绂忚幈鐗筶owe80', 'flatLowe80', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (18, '鑰�鐨湪绾縇OWE', 'sypOnlineLowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (19, '瓒呯櫧Lowe', 'ultraClearLowe', '鍗曢摱', '1', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (1, '鍙岄摱lowe', 'doubleSilverLowe', '鍙岄摱', '2', '1', '1', '0');
+INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
+VALUES (2, '瓒呯櫧鍙岄摱Lowe', 'ultraDoubleSilverLowe', '鍙岄摱', '2', '1', '1', '0');
+--rollback DELETE FROM sys_dict_data WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
+
+
+
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
index fba11e1..6066c94 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
@@ -6,7 +6,7 @@
 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;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
 
 /**
  * @Author : zhoush
@@ -15,7 +15,7 @@
  */
 @Slf4j
 @SpringBootApplication
-@EnableSwagger2
+@EnableSwagger2WebMvc
 @EnableDiscoveryClient
 @MapperScan(basePackages = "com.mes.*.mapper")
 @EnableScheduling
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
index f6b9c71..3ebd084 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
@@ -185,7 +185,7 @@
 //                String remarks = (String) row1.get("remarks");
 //                BigDecimal height = (BigDecimal) row1.get("height");
                 if (order_number == glass_type && technology_number == layer) {
-                    quantity1+=1;
+                    quantity1 += 1;
 //                    row.put("quantity", quantity);
 //                    row.put("order_number", order_number);
 //                    row.put("technology_number", technology_number);
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
index 996f091..77e07e5 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
@@ -140,14 +140,7 @@
     @ApiOperation("鏂板铏氭嫙宸ヤ綅")
     @PostMapping("/insertDownWorkstation")
     public Result insertDownWorkstation() {
-        DownWorkstation downWorkstation = new DownWorkstation();
-        downWorkstation.setTotalQuantity(0);
-        downWorkstation.setRacksNumber(0);
-        downWorkstation.setOtherNumber(0);
-        downWorkstation.setDeviceId(3);
-        downWorkstation.setEnableState(1);
-        downWorkstation.setWorkState(1);
-        downWorkstationService.save(downWorkstation);
+        downWorkstationService.insertDownWorkstation();
         return Result.build(200, "鏂板鎴愬姛", 1);
     }
 
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
index 461935d..3538593 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
@@ -81,4 +81,6 @@
     String closeAlarmSignal();
 
     void autoPrint(Boolean flag);
+
+    void insertDownWorkstation();
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
index 6b8f507..73845ff 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
@@ -159,6 +159,7 @@
                 .set("layer", layer)
                 .set("other_number", otherNumber)
                 .eq("workstation_id", workstationId);
+//        .eq("id", workstationId);
 
         this.update(updateWrapper);
 
@@ -228,4 +229,18 @@
         redisUtil.setCacheObject("autoPrint", flag);
     }
 
+    @Override
+    public void insertDownWorkstation() {
+        DownWorkstation downWorkstation = new DownWorkstation();
+        downWorkstation.setWorkstationId(7);
+        downWorkstation.setTotalQuantity(0);
+        downWorkstation.setRacksNumber(0);
+        downWorkstation.setOtherNumber(0);
+        downWorkstation.setDeviceId(3);
+        downWorkstation.setEnableState(1);
+        downWorkstation.setWorkState(1);
+        baseMapper.insert(downWorkstation);
+    }
+
+
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
index 3905579..d1fc2b2 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
@@ -149,6 +149,20 @@
             List<String> glassList = downGlassTaskList.stream().map(DownGlassTask::getGlassId).collect(Collectors.toList());
             //灏嗕换鍔¤〃涓殑鏁版嵁鍒犻櫎
             downGlassTaskService.remove(new LambdaQueryWrapper<DownGlassTask>().in(DownGlassTask::getTaskType, Const.GLASS_CACHE_TYPE_OUT_ALL).in(DownGlassTask::getGlassId, glassList));
+            //娓呴櫎涓嬬墖鐜荤拑淇℃伅琛ㄦ暟鎹�
+            downGlassInfoService.remove(new LambdaQueryWrapper<DownGlassInfo>().in(DownGlassInfo::getGlassId, glassList));
+            //涓嬬墖鏁伴噺-1
+            for (DownGlassTask downGlassTask : downGlassTaskList
+            ) {
+                if (Const.GLASS_CACHE_TYPE_OUT_ALL.equals(downGlassTask.getTaskType())) {
+                    downWorkstationService.update(
+                            new LambdaUpdateWrapper<DownWorkstation>()
+                                    .setSql("racks_number = racks_number-1")
+                                    .eq(DownWorkstation::getWorkstationId, downGlassTask.getEndCell())
+                    );
+
+                }
+            }
             List<Damage> damageList = downGlassTaskList.stream().map(e -> {
                 Damage damage = new Damage();
                 damage.setGlassId(e.getGlassId());
@@ -229,6 +243,7 @@
                     log.info("鏈夌┖鏋跺瓙,灏嗘祦绋嬪崱涓庢灦瀛愬ソ缁戝畾锛屾墽琛岃繘鐗囦换鍔� 缁撴潫");
                     //缁戝畾娴佺▼鍗�
                     downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getWorkstationId(), glassInfo.getLayer());
+//                    downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getId(), glassInfo.getLayer());
                     checkFlag = Boolean.TRUE;
                 }
             }
@@ -283,6 +298,8 @@
         downStorageCageDetailsService.save(downStorageCageDetails);
         //        鐢熸垚杩涚墖浠诲姟
         initDownGlassTask(glassInfo, 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN);
+        //鍒犻櫎鐞嗙墖绗艰〃鎷胯蛋/鐮存崯鏁版嵁鏁版嵁
+        damageService.deleteByGlassId(glassInfo.getGlassId());
     }
 
     public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String
@@ -590,8 +607,13 @@
             if (null != emptyDownWorkstation) {
                 log.info("鑾峰彇鍒扮┖鏋跺瓙淇℃伅锛岀粦瀹氭祦绋嬪崱");
                 downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getWorkstationId(), downStorageCageDetails.getLayer());
+//                downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer());
                 endCell = emptyDownWorkstation.getWorkstationId();
             } else {
+                //todo:澧炲姞铏氭嫙宸ヤ綅,缁戝畾娴佺▼鍗�
+//                downWorkstationService.insertDownWorkstation();
+//                endCell = Const.G13_WORK_STATION;
+//                downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer());
                 log.info("娌℃湁绌烘灦瀛愪俊鎭紝鏃犳硶缁戝畾娴佺▼鍗�");
                 return Boolean.FALSE;
             }
@@ -620,6 +642,8 @@
         //鐢熸垚浠诲姟淇℃伅
         GlassInfo glassInfo = new GlassInfo();
         BeanUtils.copyProperties(downStorageCageDetails, glassInfo);
+        //鍒犻櫎鐞嗙墖绗艰〃鎷胯蛋/鐮存崯鏁版嵁鏁版嵁
+        damageService.deleteByGlassId(glassInfo.getGlassId());
         return initDownGlassTask(glassInfo, downStorageCageDetails.getSlot(), endCell, taskType);
     }
 
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
index 8503db8..6a17f8a 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -1,6 +1,7 @@
 package com.mes.job;
 
 import cn.hutool.json.JSONObject;
+import cn.smallbun.screw.core.util.CollectionUtils;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.mes.common.config.Const;
@@ -13,14 +14,20 @@
 import com.mes.downstorage.service.DownStorageCageService;
 import com.mes.downworkstation.entity.DownWorkstation;
 import com.mes.downworkstation.service.DownWorkstationService;
+import com.mes.glassinfo.entity.GlassInfo;
+import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.tools.DateUtil;
 import com.mes.tools.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.Socket;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -38,7 +45,14 @@
     private DownGlassInfoService downGlassInfoService;
     @Autowired
     private DownGlassTaskService downGlassTaskService;
+    @Autowired
+    private GlassInfoService glassInfoService;
 
+    @Value("${mes.scan.ip}")
+    private String scanIp;
+
+    @Value("${mes.scan.port}")
+    private Integer scanPort;
 
     @Autowired
     private RedisUtil redisUtil;
@@ -153,8 +167,8 @@
                 new QueryWrapper<DownGlassTask>()
                         .select("Top 1 *")
                         .eq("end_cell", Const.G13_WORK_STATION)
+                        .lt("task_status", Const.UNLOAD_GLASS_DOWN)
                         .orderByDesc("id")
-
         );
         jsonObject4.append("takeGlass", takeGlass);
 
@@ -188,4 +202,35 @@
             }
         }
     }
+
+    @Scheduled(fixedDelay = Long.MAX_VALUE)
+    public void scanCodeTask() {
+        log.info("鎵弿浠诲姟宸插惎鍔�");
+        while (true) {
+            new Thread(() -> {
+                try (Socket socket = new Socket(scanIp, scanPort);
+                     BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {
+                    // 鎺ユ敹鏈嶅姟鍣ㄥ搷搴�
+                    String response;
+                    log.info("绛夊緟鎵爜涓�......");
+                    while ((response = in.readLine()) != null) {
+                        log.info("鎵弿鍒扮殑鐜荤拑id锛歿}", response);
+                        List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("scanCode");
+                        if (CollectionUtils.isNotEmpty(sendwServer)) {
+                            //鎸夌収鐜荤拑id鑾峰彇鐜荤拑淇℃伅杩斿洖缁欏墠绔晫闈紝鍏蜂綋闇�瑕佸摢浜涙暟鎹緟纭
+                            GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
+                                    .eq(GlassInfo::getGlassId, response).last("limit 1"));
+                            if (null == glassInfo) {
+                                log.info("鎸夌収鐜荤拑id锛歿}锛屾棤娉曟壘鍒扮幓鐠冧俊鎭�", response);
+                            } else {
+                                sendwServer.get(0).sendMessage(glassInfo.toString());
+                            }
+                        }
+                    }
+                } catch (Exception exception) {
+                    log.info("璇诲彇寮傚父锛屽師鍥犱负{}", exception.getMessage());
+                }
+            }).start();
+        }
+    }
 }
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
index 9468ed9..95d42b1 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
     active: dev
   application:
     name: unLoadGlass
+  liquibase:
+    enabled: false
 
 
 mybatis-plus:
@@ -21,3 +23,6 @@
   throughWidth: 3000
   throughHeight: 2500
   threshold: 5      #涓嬬墖鐨勬渶澶ч槇鍊�
+  scan:
+    ip: 127.0.0.1
+    port: 5000
diff --git a/hangzhoumesParent/pom.xml b/hangzhoumesParent/pom.xml
index 9ef3261..a9b0a6b 100644
--- a/hangzhoumesParent/pom.xml
+++ b/hangzhoumesParent/pom.xml
@@ -42,6 +42,11 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
+            <dependency>
+                <groupId>org.springframework.plugin</groupId>
+                <artifactId>spring-plugin-core</artifactId>
+                <version>2.0.0.RELEASE</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

--
Gitblit v1.8.0