From df13b23a2fa3519e6f796ed946d87412a6a5f7ca Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期五, 07 三月 2025 16:56:44 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject

---
 UI-Project/src/layout/MainErpView.vue                                                                                                  |   25 +++
 UI-Project/src/views/GlassStorage/rawfilmstorage.vue                                                                                   |   37 ++--
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java                                |    2 
 UI-Project/src/views/Caching/cachingbefore.vue                                                                                         |   22 ++
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java |    7 
 UI-Project/src/lang/en.js                                                                                                              |    7 +
 UI-Project/src/lang/py.js                                                                                                              |    8 +
 UI-Project/src/lang/zh.js                                                                                                              |    7 +
 UI-Project/src/views/ReportWork/reportWork.vue                                                                                         |   56 ++++---
 UI-Project/src/views/hollow/hollowequipment.vue                                                                                        |    2 
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java               |    2 
 UI-Project/src/views/Caching/cachingun.vue                                                                                             |   22 ++
 UI-Project/src/views/Returns/upreturns.vue                                                                                             |   11 +
 UI-Project/src/views/Slicecage/slicecage.vue                                                                                           |   21 +++
 UI-Project/src/views/hollow/hollowslicecage.vue                                                                                        |   77 ++++++----
 UI-Project/src/views/Returns/upreturns2.vue                                                                                            |   14 +
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java    |   31 ++++
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java                                    |    2 
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml                          |   17 ++
 19 files changed, 272 insertions(+), 98 deletions(-)

diff --git a/UI-Project/src/lang/en.js b/UI-Project/src/lang/en.js
index 7d1135d..2a0ceec 100644
--- a/UI-Project/src/lang/en.js
+++ b/UI-Project/src/lang/en.js
@@ -132,6 +132,13 @@
           takeon:'The arrangement is complete',
       },
       searchOrder:{
+          totallogarithms:'鎬诲鏁�',
+          numberpairs:'閰嶅鏁�',
+          numberoccupied:'鍗犵敤鏍煎瓙鏁�',
+          totalfurnaces:'鎬荤倝鏁�',
+          cagesnumber:'绗煎唴鏁伴噺',
+          slotnumber:'鍗犳湁鏍煎瓙鏁�',
+          progress:'杩涘害',
           whethersame:'鏄惁鐩稿悓',
           same:'鐩稿悓',
           notsame:'涓嶇浉鍚�',
diff --git a/UI-Project/src/lang/py.js b/UI-Project/src/lang/py.js
index 38550af..e959777 100644
--- a/UI-Project/src/lang/py.js
+++ b/UI-Project/src/lang/py.js
@@ -36,7 +36,6 @@
     basicData: {
         rackreset:'鏋跺瓙澶嶄綅',
         prackreset:'鏄惁鏋跺瓙澶嶄綅锛�',
-        deletemessage: '校写邪谢懈褌褜 褝褌褍 懈薪褎芯褉屑邪褑懈褞 懈谢懈 薪械褌?',
         laserprinting: '袦邪褕懈薪邪 谢邪蟹械褉薪芯泄 屑邪褉泻懈褉芯胁泻懈 谐芯褌芯胁邪锛�',
         cuttingmachine: '袦邪褕懈薪邪 写谢褟 褉械蟹泻懈 谐芯褌芯胁邪锛�',
         machine: '小芯褋褌芯褟薪懈械 褋褌邪薪芯泻 蟹邪谐褉褍蟹泻懈 胁 褉械卸懈屑械 芯薪谢邪泄薪锛�',
@@ -132,6 +131,13 @@
         takeaway: '袙蟹褟褌褜 胁褉褍褔薪褍褞',
     },
     searchOrder: {
+        totallogarithms:'鎬诲鏁�',
+        numberpairs:'閰嶅鏁�',
+        numberoccupied:'鍗犵敤鏍煎瓙鏁�',
+        totalfurnaces:'鎬荤倝鏁�',
+        cagesnumber:'绗煎唴鏁伴噺',
+        slotnumber:'鍗犳湁鏍煎瓙鏁�',
+        progress:'杩涘害',
         whethersame:'鏄惁鐩稿悓',
         same:'鐩稿悓',
         notsame:'涓嶇浉鍚�',
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index 8855c3f..3c05213 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -131,6 +131,13 @@
           takeon:'鎽嗙墖瀹屾垚',
       },
       searchOrder:{
+          totallogarithms:'鎬诲鏁�',
+          numberpairs:'閰嶅鏁�',
+          numberoccupied:'鍗犵敤鏍煎瓙鏁�',
+          totalfurnaces:'鎬荤倝鏁�',
+          cagesnumber:'绗煎唴鏁伴噺',
+          slotnumber:'鍗犳湁鏍煎瓙鏁�',
+          progress:'杩涘害',
           whethersame:'鏄惁鐩稿悓',
           same:'鐩稿悓',
           notsame:'涓嶇浉鍚�',
diff --git a/UI-Project/src/layout/MainErpView.vue b/UI-Project/src/layout/MainErpView.vue
index 7c66472..ce2f952 100644
--- a/UI-Project/src/layout/MainErpView.vue
+++ b/UI-Project/src/layout/MainErpView.vue
@@ -3,10 +3,14 @@
 import userInfo from '@/stores/userInfo'
 import request from '@/utils/request'
 import {ElMessage} from 'element-plus'
-import {ref, watch, onMounted } from 'vue'
+import {ref, watch, onMounted, onUnmounted } from 'vue'
 import deepClone from '@/utils/deepClone'
 import { useRouter } from 'vue-router';  
 import { useI18n } from 'vue-i18n'
+import { provide } from 'vue';
+import {host, WebSocketHost} from '@/utils/constants'
+import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
+const globalDate = ref('');
 const { t } = useI18n()
 let language = ref(localStorage.getItem('lang') || 'zh')
 const store = userInfo()
@@ -28,6 +32,17 @@
               })
   router.push('/login')  
 }
+let socket = null;
+const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/mainMes`;
+const handleMessage = (data) => {
+  if(data.globalDate!=null){
+    window.localStorage.setItem('getglobalDate', data.globalDate[0])
+  }else{
+    globalDate.value = ''
+      }
+    }
+  let getglobalDate = window.localStorage.getItem('getglobalDate')
+  provide('globalDate', getglobalDate);
   function replaceChineseWithEnglish(menuData) {  
       // 瀹氫箟涓縿鏂囧鐓у叧绯诲璞�
        const translation  = {  
@@ -145,6 +160,14 @@
 function toggleCollapse() {  
   isCollapse.value = !isCollapse.value;  
 } 
+onMounted(() => {
+  socket = initializeWebSocket(socketUrl, handleMessage);
+});
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 </script>
 <template>
   <div id="all">
diff --git a/UI-Project/src/views/Caching/cachingbefore.vue b/UI-Project/src/views/Caching/cachingbefore.vue
index d12cadf..d226a4d 100644
--- a/UI-Project/src/views/Caching/cachingbefore.vue
+++ b/UI-Project/src/views/Caching/cachingbefore.vue
@@ -7,6 +7,8 @@
 import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
 import {ElMessage, ElMessageBox} from 'element-plus'
 import {useI18n} from 'vue-i18n'
+import { inject } from 'vue';
+const globalDate = inject('globalDate');
 const {t} = useI18n()
 let language = ref(localStorage.getItem('lang') || 'zh')
 const tableDataa = ref([])
@@ -38,12 +40,19 @@
   //     id: rect.id * 10,
   //   })); 
 };
-onMounted(() => {
+// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
+const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
+function parseAndSetTime() {
+  const backendTime = new Date(globalDate);
+  const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
+  console.log(formatTimestamp(oneWeekAgo));
+  console.log(oneWeekAgo);
+  timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
+  window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+}
+  onMounted(() => {
   socket = initializeWebSocket(socketUrl, handleMessage);
-  const endTime = dayjs().startOf('minute'); // 褰撳墠鏃堕棿锛岀簿纭埌鍒嗛挓
-  const startTime = endTime.subtract(1, 'day').startOf('minute'); // 褰撳墠鏃堕棿鐨勫墠涓�澶╋紝绮剧‘鍒板垎閽�
-  // 璁剧疆鏃堕棿鑼冨洿涓� [寮�濮嬫椂闂�, 缁撴潫鏃堕棿]
-  timeRange.value = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')];
+  parseAndSetTime();
 });
 // 鍘嗗彶浠诲姟
 const handlehistorical = (row) => {
@@ -53,7 +62,8 @@
 // 鍘嗗彶浠诲姟
 const historical = async () => {
   try { 
-  var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+1 + "&startTime=" + '' + "&endTime=" + '' + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + '';
+  let startTime = window.localStorage.getItem('startTime')
+  var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+1 + "&startTime=" + startTime + "&endTime=" + globalDate + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + '';
       const response = await request.get(url) 
       if (response.code == 200) {
         ElMessage.success(response.message);
diff --git a/UI-Project/src/views/Caching/cachingun.vue b/UI-Project/src/views/Caching/cachingun.vue
index adf7426..357e39e 100644
--- a/UI-Project/src/views/Caching/cachingun.vue
+++ b/UI-Project/src/views/Caching/cachingun.vue
@@ -7,6 +7,8 @@
 import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
 import {ElMessage, ElMessageBox} from 'element-plus'
 import {useI18n} from 'vue-i18n'
+import { inject } from 'vue';
+const globalDate = inject('globalDate');
 const {t} = useI18n()
 let language = ref(localStorage.getItem('lang') || 'zh')
 const tableDataa = ref([])
@@ -37,12 +39,19 @@
   //     id: rect.id * 10,
   //   })); 
 };
-onMounted(() => {
+// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
+const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
+function parseAndSetTime() {
+  const backendTime = new Date(globalDate);
+  const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
+  console.log(formatTimestamp(oneWeekAgo));
+  console.log(oneWeekAgo);
+  timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
+  window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+}
+  onMounted(() => {
   socket = initializeWebSocket(socketUrl, handleMessage);
-  const endTime = dayjs().startOf('minute'); // 褰撳墠鏃堕棿锛岀簿纭埌鍒嗛挓
-  const startTime = endTime.subtract(1, 'day').startOf('minute'); // 褰撳墠鏃堕棿鐨勫墠涓�澶╋紝绮剧‘鍒板垎閽�
-  // 璁剧疆鏃堕棿鑼冨洿涓� [寮�濮嬫椂闂�, 缁撴潫鏃堕棿]
-  timeRange.value = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')];
+  parseAndSetTime();
 });
 // 鍘嗗彶浠诲姟
 const handlehistorical = (row) => {
@@ -52,7 +61,8 @@
 // 鍘嗗彶浠诲姟
 const historical = async () => {
   try { 
-  var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+2 + "&startTime=" + '' + "&endTime=" + '' + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + '';
+  let startTime = window.localStorage.getItem('startTime')
+  var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+2 + "&startTime=" + startTime + "&endTime=" + globalDate + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + '';
       const response = await request.get(url) 
       if (response.code == 200) {
         ElMessage.success(response.message);
diff --git a/UI-Project/src/views/GlassStorage/rawfilmstorage.vue b/UI-Project/src/views/GlassStorage/rawfilmstorage.vue
index 61a8afc..715145f 100644
--- a/UI-Project/src/views/GlassStorage/rawfilmstorage.vue
+++ b/UI-Project/src/views/GlassStorage/rawfilmstorage.vue
@@ -7,6 +7,7 @@
 import dayjs from 'dayjs';
 import request from "@/utils/request"
 import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
+import { inject } from 'vue';
 const router = useRouter()
 const tableDataa = ref([])
 const tableDatab = ref([])
@@ -28,6 +29,7 @@
 const leftingStation = ref('');
 const loadingline = ref('');
 let webSocket: WebSocket | null = null;  
+const globalDate = inject('globalDate');
 const value = ref('')
 const options = [
   {
@@ -44,27 +46,28 @@
   taskState: '',
 });
   let startTime = window.localStorage.getItem('startTime')
-  let endTime = window.localStorage.getItem('endTime')
   request.post("/glassStorage/rawGlassStorageTask/setRawGlassTaskRequest",{
   beginDate: startTime,
-  endDate: endTime,
+  endDate: globalDate,
 }).then((response) => {
           if (response.code == 200) {
-            tableDataa.value = response.data
-            console.log(tableDataa.value);
           } else {
           ElMessage.warning(response.msg)
-        
           }
           });
+// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
+const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
+function parseAndSetTime() {
+  const backendTime = new Date(globalDate);
+  const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
+  console.log(formatTimestamp(oneWeekAgo));
+  console.log(oneWeekAgo);
+  timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
+  window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+}
   onMounted(() => {
   socket = initializeWebSocket(socketUrl, handleMessage);
-  const endTime = dayjs().startOf('minute'); // 褰撳墠鏃堕棿锛岀簿纭埌鍒嗛挓
-  const startTime = endTime.subtract(7, 'day').startOf('minute'); // 褰撳墠鏃堕棿鐨勫墠涓�澶╋紝绮剧‘鍒板垎閽�
-  // 璁剧疆鏃堕棿鑼冨洿涓� [寮�濮嬫椂闂�, 缁撴潫鏃堕棿]
-  timeRange.value = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')];
-  window.localStorage.setItem('startTime', startTime.format('YYYY-MM-DD HH:mm:ss'))
-  window.localStorage.setItem('endTime', endTime.format('YYYY-MM-DD HH:mm:ss'))
+  parseAndSetTime();
 });
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/rawGlass`;
@@ -292,14 +295,14 @@
   }
 };
 // 鏍煎紡鍖栨椂闂存埑涓哄勾鏈堟棩鏃堕棿瀛楃涓茬殑鍑芥暟
-function formatTimestamp(timestamp) {
+function formatTimestamp(timestamp: number | Date): string {
   const date = new Date(timestamp);
   const year = date.getFullYear();
-  const month = String(date.getMonth() + 1).padStart(2, '0'); // 鏈堜唤浠�0寮�濮嬶紝闇�瑕佸姞1锛屽苟琛ラ浂
-  const day = String(date.getDate()).padStart(2, '0'); // 琛ラ浂
-  const hours = String(date.getHours()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
-  const minutes = String(date.getMinutes()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
-  const seconds = String(date.getSeconds()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+  const month = String(date.getMonth() + 1).padStart(2, '0');
+  const day = String(date.getDate()).padStart(2, '0');
+  const hours = String(date.getHours()).padStart(2, '0');
+  const minutes = String(date.getMinutes()).padStart(2, '0');
+  const seconds = String(date.getSeconds()).padStart(2, '0');
   return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 }
 function getStatusType1(taskType) {  
diff --git a/UI-Project/src/views/ReportWork/reportWork.vue b/UI-Project/src/views/ReportWork/reportWork.vue
index 1c043a5..aef6133 100644
--- a/UI-Project/src/views/ReportWork/reportWork.vue
+++ b/UI-Project/src/views/ReportWork/reportWork.vue
@@ -2,9 +2,13 @@
   <div style="height: 600px;">
     <div style="display: flex; flex-direction: row; align-items: center; margin-top: 20px;">
       <span style="margin-left: 10px;" class="demonstration">{{ $t('reportmanage.productiontime') }}</span>
-      <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="daterange" format="YYYY/MM/DD"
+      <!-- <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="daterange" format="YYYY/MM/DD"
         value-format="YYYY-MM-DD" :start-placeholder="$t('reportmanage.starttime')"
-        :end-placeholder="$t('reportmanage.endtime')" :default-time="defaultTime" />
+        :end-placeholder="$t('reportmanage.endtime')" :default-time="defaultTime" /> -->
+        <el-date-picker v-model="timeRange" type="datetimerange" range-separator="鑷�" :start-placeholder="$t('reportmanage.starttime')" 
+             style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
+              :end-placeholder="$t('reportmanage.endtime')">
+            </el-date-picker>
       <el-select v-model="report.type" :placeholder="$t('reportmanage.ctype')" style="margin-left: 10px;">
         <!-- <el-option :label="$t('reportmanage.all')" value="0"></el-option> -->
         <!-- <el-option :label="$t('reportmanage.completed')" value="1"></el-option> -->
@@ -127,6 +131,9 @@
 import { WebSocketHost, host } from '@/utils/constants'
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 import { useI18n } from 'vue-i18n'
+import { inject } from 'vue';
+const globalDate = inject('globalDate');
+const timeRange = ref([])
 const { t } = useI18n()
 const report = ref({
   type: '8',
@@ -134,18 +141,27 @@
   workingProcedure: '0',
 });
 const reportData = ref([])
-const endDate = new Date();
-const startDate = new Date();
-startDate.setDate(endDate.getDate() - 7);  // 鑾峰彇涓�涓槦鏈熷墠鐨勬椂闂�
-// 鏍煎紡鍖栦负 "YYYY-MM-DD" 鏍煎紡
-const formatDate = (date) => {
+function formatTimestamp(timestamp) {
+  const date = new Date(timestamp);
   const year = date.getFullYear();
-  const month = String(date.getMonth() + 1).padStart(2, '0');
-  const day = String(date.getDate()).padStart(2, '0');
-  return `${year}-${month}-${day}`;
-};
-
-const timeRange = ref([formatDate(startDate), formatDate(endDate)]);
+  const month = String(date.getMonth() + 1).padStart(2, '0'); // 鏈堜唤浠�0寮�濮嬶紝闇�瑕佸姞1锛屽苟琛ラ浂
+  const day = String(date.getDate()).padStart(2, '0'); // 琛ラ浂
+  const hours = String(date.getHours()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+  const minutes = String(date.getMinutes()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+  const seconds = String(date.getSeconds()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+}
+// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
+const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
+function parseAndSetTime() {
+  const backendTime = new Date(globalDate);
+  const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
+  console.log(formatTimestamp(oneWeekAgo));
+  console.log(oneWeekAgo);
+  timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
+  window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+}
+// const timeRange = ref([formatTimestamp(startDate), formatTimestamp(globalDate)]);
 const selectOptionsa = ref([]);
 const selectOptionsb = ref([]);
 const selectOptionsc = ref([]);
@@ -165,8 +181,8 @@
 // 鏌ヨ鏁版嵁
 const selectReportData = async () => {
   const response = await request.post("/cacheVerticalGlass/damage/selectDamage", {
-    startTime: timeRange.value[0],
-    endTime: timeRange.value[1]+" 23:59:59",
+    startTime: (timeRange.value && timeRange.value[0]) || '',
+    endTime: (timeRange.value && timeRange.value[1]) || '',
     type: report.value.type,
     status: report.value.status,
     workingProcedure: report.value.workingProcedure
@@ -260,20 +276,12 @@
 //     })); 
 // };
 // let socket;
-onMounted(() => {
-  // socket = new WebSocket(socketUrl);
-  // socket.onmessage = (event) => {
-  //   const data = JSON.parse(event.data);
-
-  //   // updateCharts();
-  // };
-  // };  
-});
 onUnmounted(() => {
   socket.close();
 });
 onMounted(() => {
   fetchTableData();
+  parseAndSetTime();
   // socket = initializeWebSocket(socketUrl, handleMessage);
 });
 onUnmounted(() => {
diff --git a/UI-Project/src/views/Returns/upreturns.vue b/UI-Project/src/views/Returns/upreturns.vue
index 6df2a38..d9a721f 100644
--- a/UI-Project/src/views/Returns/upreturns.vue
+++ b/UI-Project/src/views/Returns/upreturns.vue
@@ -74,14 +74,21 @@
      window.localStorage.setItem('engineeringIda', tableData[0].engineeringId)
 }
   } catch (error) {
-    ElMessage.error(response.message);
+    // ElMessage.error(response.message);
   }
 };
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
 const handleMessage = (data: any) => {
+  if (data.LoadOneState != null) {
+    cuttingMachineStatusColor.value = data.LoadOneState[0] == 1 ? 'green' : '#911005';
+  }
+  if (data.list!=null) {
   tableDataa.value = data.list[0].slice(0, 2);
-  if(data.loadTask1.length !=0){
+  }else {
+    tableDataa.value = ''
+  }
+  if(data.loadTask1!=null){
   tableData.value = data.loadTask1[0]
   window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId)
   canSelectProjecta.value = false;
diff --git a/UI-Project/src/views/Returns/upreturns2.vue b/UI-Project/src/views/Returns/upreturns2.vue
index b3b01d0..9b3710e 100644
--- a/UI-Project/src/views/Returns/upreturns2.vue
+++ b/UI-Project/src/views/Returns/upreturns2.vue
@@ -79,7 +79,15 @@
 const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
 const handleMessage = (data: any) => {
   tableDataa.value = data.list[0].slice(2, 4);
-  if(data.loadTask2.length !=0){
+  if (data.list!=null) {
+  tableDataa.value = data.list[0].slice(2, 4);
+  }else {
+    tableDataa.value = ''
+  }
+  if (data.LoadTwoervice != null) {
+    cuttingMachineStatusColor.value = data.LoadTwoervice[0] == 1 ? 'green' : '#911005';
+  }
+  if(data.loadTask2!=null){
   // tableData.splice(0, tableData.length, ...data.loadTask2[0]);
   tableData.value = data.loadTask2[0]
   window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId)
@@ -432,10 +440,6 @@
         </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;">{{
-            $t('basicData.change')
-          }}
-        </el-button>
   </div>
     <el-button :disabled="!canSelectProjecta" style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="selectproject">{{ $t('Mounting.previewproject') }}</el-button>
     <el-button :disabled="!canSelectProjectb" style="margin-top: 5px;margin-left: 20px;" type="success" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index aaa9f12..2927c05 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -35,6 +35,7 @@
 const tableDatae = ref([])
 const tableDatax = ref([])
 const tableDatas = ref([])
+const tableDatass = ref([])
 const tableDatalack = ref([])
 const tableDataspecify = ref([])
 const tableDatacagedetails = ref([])
@@ -779,6 +780,11 @@
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
 const handleMessage = (data) => {
+  if(data.bigStorageSummary!=null){
+    tableDatass.value = data.bigStorageSummary[0]
+  }else{
+    tableDatass.value = ''
+      }
   if (data.inkageEntity != null) {
     inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005';
   }
@@ -1235,6 +1241,21 @@
     </div>
 </div>
 </div>
+<el-card style="flex: 1;margin-left: 1220px;margin-top: -510px;" v-loading="loading">
+      <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 420px;">
+       <el-table height="420px" ref="table" border 
+       :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+         <el-table-column prop="engineerId" align="center" :label="$t('Mounting.project')" min-width="140" />
+         <el-table-column prop="countTemp" align="center" :label="$t('searchOrder.totalfurnaces')" min-width="120" />
+         <el-table-column prop="countGlass" align="center" :label="$t('searchOrder.cagesnumber')" min-width="120" />
+         <el-table-column prop="area" align="center" :label="$t('large.are')" min-width="120" />
+         <el-table-column prop="fullTemp" align="center" :label="$t('searchOrder.fullfurnaces')" min-width="120" />
+         <el-table-column prop="countSlot" align="center" :label="$t('searchOrder.slotnumber')" min-width="120" />
+         <el-table-column prop="percent" align="center" :label="$t('searchOrder.progress')" min-width="120" />
+       </el-table>
+       </div>
+    </el-card>
+
   </div>
   <el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" >
     <div style="margin-bottom: 20px">
diff --git a/UI-Project/src/views/hollow/hollowequipment.vue b/UI-Project/src/views/hollow/hollowequipment.vue
index b3d9177..8ed3196 100644
--- a/UI-Project/src/views/hollow/hollowequipment.vue
+++ b/UI-Project/src/views/hollow/hollowequipment.vue
@@ -1059,7 +1059,7 @@
 const dialogFormVisibled = ref(false)
 const dialogFormVisiblee = ref(false)
 const add = ref(false)
-const adda = ref(false) 
+const adda = ref(false)
 const currentPage2 = ref(1)
 const currentRow = reactive({});
 const formattedProcessType = ref([]);
diff --git a/UI-Project/src/views/hollow/hollowslicecage.vue b/UI-Project/src/views/hollow/hollowslicecage.vue
index 4c53783..d4d6db5 100644
--- a/UI-Project/src/views/hollow/hollowslicecage.vue
+++ b/UI-Project/src/views/hollow/hollowslicecage.vue
@@ -27,6 +27,7 @@
 const tableDataf = ref([])
 const tableDatae = ref([])
 const carPosition = ref([])
+const tableDatass = ref([])
 const ganghua = ref('')
 const diaodu = ref('')
 const flowCardId = ref('')
@@ -298,6 +299,11 @@
 let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
 const handleMessage = (data) => {
+  if(data.bigStorageSummary!=null){
+    tableDatass.value = data.bigStorageSummary[0]
+  }else{
+    tableDatass.value = ''
+      }
   if (data.inkageEntity != null) {
     inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005';
   }
@@ -409,7 +415,7 @@
 const rectStyle = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  right: '0px',
+  left: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -425,24 +431,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStyle = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginRight = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
-  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+  const marginLeft = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginRight,
+    marginLeft,
     top: '0px',
     backgroundColor: '#911005',
-    right,
+    left,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStylea = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  right: '0px',
+  left: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -458,24 +464,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStylea = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginRight = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
-  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+  const marginLeft = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginRight,
+    marginLeft,
     top: '0px',
     backgroundColor: '#911005',
-    right,
+    left,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStyleb = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  right: '0px',
+  left: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -491,24 +497,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStyleb = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginRight = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
-  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+  const marginLeft = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginRight,
+    marginLeft,
     top: '0px',
     backgroundColor: '#911005',
-    right,
+    left,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStylec = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  right: '0px',
+  left: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -524,24 +530,24 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStylec = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginRight = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
-  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+  const marginLeft = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
     height: '100%',
-    marginRight,
+    marginLeft,
     top: '0px',
     backgroundColor: '#911005',
-    right,
+    left,
   };
 };
 // 璁$畻姣忎釜澶х煩褰㈢殑鏍峰紡
 const rectStyled = (rect, index) => ({
   position: 'absolute',
   width: '170px',
-  right: '0px',
+  left: '0px',
   top: `${index*rect.top}px`,
   height: `${rect.height}px`,
 });
@@ -557,9 +563,9 @@
 // 璁$畻姣忎釜灏忕煩褰㈢殑鏍峰紡
 const subRectStyled = (rectIndex, subIndex) => {
   const width = '18px';
-  const marginRight = '8px';
-  const totalWidth = 6 * (parseInt(width) + parseInt(marginRight));
-  const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`;
+  const marginLeft = '8px';
+  const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft));
+  const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`;
   return {
     position: 'absolute',
     width,
@@ -567,7 +573,7 @@
     marginLeft,
     top: '0px',
     backgroundColor: '#911005',
-    right,
+    left,
   };
 };
 onMounted(() => {
@@ -769,6 +775,19 @@
     </div>
 </div>
 </div>
+<el-card style="flex: 1;margin-left: 1020px;margin-top: -670px;" v-loading="loading">
+      <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 550px;">
+       <el-table height="550px" ref="table" border 
+       :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+         <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140" />
+         <el-table-column prop="sumCount" align="center" :label="$t('searchOrder.totallogarithms')" min-width="120" />
+         <el-table-column prop="pairCount" align="center" :label="$t('searchOrder.numberpairs')" min-width="120" />
+         <el-table-column prop="sumCountlayer" align="center" :label="$t('hellow.totalnumber')" min-width="120" />
+         <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="120" />
+         <el-table-column prop="slotCount" align="center" :label="$t('searchOrder.numberoccupied')" min-width="120" />
+       </el-table>
+       </div>
+    </el-card>
   </div>
   <!-- 娣诲姞鐞嗙墖绗间俊鎭� -->
   <el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" >
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
index 754fd10..f79c6e4 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
@@ -73,7 +73,7 @@
                     task.setGlassId(requestWord.getValue() + "");
                     int isExistCount = bigStorageCageDetailsService.count(new LambdaQueryWrapper<BigStorageCageDetails>().in(BigStorageCageDetails::getGlassId, task.getGlassId())
                             .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO));
-                    if (isExistCount > 0) {
+                    if (isExistCount > 0 && "0".equals(targetSlotWord.getValue())) {
                         task.setIsSame(1);
                     } else {
                         task.setIsSame(0);
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
index 46c874d..b605a85 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
@@ -25,5 +25,7 @@
     List<LackDetailsDTO> queryLackByFlowCard(String flowCardId);
 
     int queryLayerByFlowCardId(@Param("flowCardId") String flowCardId);
+
+    void clearDirtyFlowCardData(@Param("flowCardId")String flowCardId, @Param("layer")int layer);
 }
 
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
index 7aa6875..d66abaf 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -126,6 +126,7 @@
         return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
                 .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                 .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+                .ne(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS)
                 .eq(HollowGlassOutRelationInfo::getCell, cell));
     }
 
@@ -135,6 +136,7 @@
         return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
                 .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_PAUSE)
                 .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+                .ne(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS)
                 .eq(HollowGlassOutRelationInfo::getCell, cell));
     }
 
@@ -348,14 +350,15 @@
                 for (HollowBigStorageCageDetails item : reverse) {
                     remainWidth = remainWidth - (int) Math.max(item.getWidth(), item.getHeight());
                     if (remainWidth < 0) {
-                        tempList = CollectionUtil.reverse(tempList);
+                        hollowQueues.addAll(CollectionUtil.reverse(tempList));
+                        tempList = new ArrayList<>();
                         remainWidth = carWidth - (int) Math.max(item.getWidth(), item.getHeight());
                     }
                     HollowGlassQueueInfo queueInfo = HollowBDetailToQueue(item, info.getId(), request.getCell());
                     tempList.add(queueInfo);
                     remainWidth = remainWidth - glassGap;
                 }
-                hollowQueues.addAll(tempList);
+                hollowQueues.addAll(CollectionUtil.reverse(tempList));
                 HollowBigStorageCageDetails cageDetails = entry.getValue().get(0);
                 if (cageDetails.getIsPair() == 1) {
                     isPairCount = isPairCount - cageDetails.getTotalLayer();
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
index d35a8a0..4c80058 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -10,6 +10,7 @@
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.hollow.entity.HollowBigStorageCage;
 import com.mes.hollow.entity.HollowBigStorageCageDetails;
+import com.mes.hollow.entity.HollowGlassOutRelationInfo;
 import com.mes.hollow.entity.HollowGlassRelationInfo;
 import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO;
 import com.mes.hollow.entity.dto.HollowBigStorageDTO;
@@ -19,6 +20,7 @@
 import com.mes.hollow.mapper.HollowGlassRelationInfoMapper;
 import com.mes.hollow.service.HollowBigStorageCageDetailsService;
 import com.mes.hollow.service.HollowBigStorageCageService;
+import com.mes.hollow.service.HollowGlassOutRelationInfoService;
 import com.mes.hollow.service.HollowGlassRelationInfoService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
@@ -49,6 +51,8 @@
     @Resource
     HollowGlassRelationInfoService hollowGlassRelationInfoService;
     @Resource
+    HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService;
+    @Resource
     HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
     @Value("${mes.slotWidth}")
     private Integer slotWidth;
@@ -72,9 +76,18 @@
                 .last("limit 1")
         );
         if (relationInfoOne == null) {
+            //鏌ョ湅mes鏄惁鏈夊搴旂殑娴佺▼鍗′俊鎭�
+            int count = hollowGlassRelationInfoService.count(new LambdaQueryWrapper<HollowGlassRelationInfo>()
+                    .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId)
+                    .eq(HollowGlassRelationInfo::getLayer, layer));
+            if (count == 0) {
+                generateHollowGlassInfo(flowCardId, totalLayer, layer);
+            } else {
+                //姣旇緝鍏崇郴琛ㄥ強涓┖鐞嗙墖绗艰鎯呰〃鐨勬祦绋嬪崱鏁版嵁锛屽鐞嗚剰鏁版嵁锛氬皢涓嶅湪绗煎唴鐨勬祦绋嬪崱鍖归厤鏁版嵁鑱屼綅绌�
+                this.baseMapper.clearDirtyFlowCardData(flowCardId, layer);
+            }
             //鐞嗙墖绗煎叧绯昏〃涓病鏈夊搴旂殑鏁版嵁锛屾煡鐪嬬悊鐗囩铏氭嫙浣嶇疆琛ㄦ槸鍚︽湁鏈伐绋嬩笅鐨勬墍鏈夌幓鐠冭櫄鎷熶俊鎭�
             //铏氭嫙浣嶇疆琛ㄦ病鏈夋湰宸ョ▼涓嬬殑鎵�鏈夌幓鐠冭櫄鎷熶俊鎭紝鎸夌収鐜荤拑id鐢熸垚鏈伐绋嬩笅鎵�鏈夌幓鐠冪殑铏氭嫙淇℃伅
-            generateHollowGlassInfo(flowCardId, totalLayer, layer);
             relationInfoOne = this.getOne(new LambdaQueryWrapper<HollowGlassRelationInfo>()
                     .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId)
                     .eq(HollowGlassRelationInfo::getWidth, width)
@@ -87,13 +100,27 @@
             );
         }
         //璇︽儏琛ㄥ唴鑾峰彇鏈粍鏄惁宸茬粡鏈夌幓鐠冨湪绗煎瓙鍐咃紙0琛ㄧず鎻愬墠鍗犵敤锛�
+        int taskCount = hollowGlassOutRelationInfoService.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+                .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId));
+        HollowBigStorageCage storageCage = null;
+        //濡傛灉涓嶅瓨鍦ㄥ垯閫夋嫨绗煎唴鏈敤鐨勬柊鏍煎瓙
+        if (taskCount > 0) {
+            storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>()
+                    .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth)
+                    .le(HollowBigStorageCage::getMinThickness, relationInfoOne.getThickness())
+                    .ge(HollowBigStorageCage::getMaxThickness, relationInfoOne.getThickness())
+                    .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1"));
+            HollowBigStorageDTO storageDTO = new HollowBigStorageDTO();
+            BeanUtils.copyProperties(storageCage, storageDTO);
+            BeanUtils.copyProperties(relationInfoOne, storageDTO);
+            return storageDTO;
+        }       //璇︽儏琛ㄥ唴鑾峰彇鏈粍鏄惁宸茬粡鏈夌幓鐠冨湪绗煎瓙鍐咃紙0琛ㄧず鎻愬墠鍗犵敤锛�
         List<HollowBigStorageCageDetails> hollowDetailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>()
                 .eq(HollowBigStorageCageDetails::getFlowCardId, relationInfoOne.getFlowCardId())
                 .eq(HollowBigStorageCageDetails::getTotalLayer, totalLayer)
                 .eq(HollowBigStorageCageDetails::getLayer, layer)
                 .eq(HollowBigStorageCageDetails::getVirtualSlot, relationInfoOne.getVirtualSlot())
                 .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO));
-        HollowBigStorageCage storageCage = null;
         //濡傛灉涓嶅瓨鍦ㄥ垯閫夋嫨绗煎唴鏈敤鐨勬柊鏍煎瓙
         if (CollectionUtil.isEmpty(hollowDetailsList)) {
             storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>()
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
index 5b7ba8a..37fa8e0 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -144,7 +144,7 @@
                     task.setGlassId(requestWord.getValue() + "");
                     int isExistCount = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>().in(HollowBigStorageCageDetails::getGlassId, task.getGlassId())
                             .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO));
-                    if (isExistCount > 0) {
+                    if (isExistCount > 0 && "0".equals(targetSlotWord.getValue() + "")) {
                         task.setIsSame(1);
                     } else {
                         task.setIsSame(0);
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
index cab76b1..25ac2e8 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -19,6 +19,7 @@
         <result column="thickness" property="thickness"/>
         <result column="lack_cout" property="lackCount"/>
     </resultMap>
+
     <select id="queryFlowCardIdMaxLayerGlassInfo" resultMap="baseMap">
         with temp_flow as (SELECT t.process_id,
                                   t.order_id,
@@ -128,4 +129,20 @@
         from hollow_glass_relation_info
         where flow_card_id = #{flowCardId}
     </select>
+
+    <update id="clearDirtyFlowCardData">
+        update hollow_glass_relation_info
+        set glass_id = null,
+            tempering_layout_id = null,
+            tempering_feed_sequence = null,
+            engineer_id = null,
+            state = 0
+        where flow_card_id = #{flowCardId}
+          and layer = #{layer}
+          and glass_id not in (
+            select glass_id
+            from hollow_big_storage_cage_details
+            where flow_card_id = #{flowCardId} and layer = #{layer} and state = 100
+        )
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0