下片添加新增虚拟工位功能,大理片非钢玻璃按流程卡进片按流程卡出片
16个文件已修改
617 ■■■■■ 已修改文件
UI-Project/config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/constants.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identify.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/largescreen/largescreen.vue 156 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/config.js
@@ -1,10 +1,10 @@
export default {
 serverUrl: "10.153.19.150:88/api",
//  serverUrl: "10.153.19.150:88/api",
//  serverUrl: "192.168.1.199:88/api",
//  serverUrl: "127.0.0.1:88/api",
  serverUrl2: "10.153.19.150:88"
 serverUrl: "127.0.0.1:88/api",
  // serverUrl2: "10.153.19.150:88"
  // serverUrl2: "192.168.1.199:88"
    // serverUrl2: "127.0.0.1:88"
    serverUrl2: "127.0.0.1:88"
  //serverUrl:"res.abeim.cn"
}
UI-Project/src/utils/constants.js
@@ -1,4 +1,4 @@
//  export const WebSocketHost = "192.168.1.199";
export const WebSocketHost = "10.153.19.150";
// export const WebSocketHost = "127.0.0.1";
// export const WebSocketHost = "10.153.19.150";
export const WebSocketHost = "127.0.0.1";
export const host = "88";
UI-Project/src/views/Identify/identify.vue
@@ -215,34 +215,6 @@
    }  
  });  
}
// const connectWebSocket = () => {
//   if (!webSocket) {
// const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
//     webSocket = new WebSocket(socketUrl);
//     webSocket.onmessage = (event) => {
//       const data = JSON.parse(event.data);
//       const scaleFactor =  1621.78/6000;
//         adjustedRects.value = data.currentCutTerritory[0].map(rect => ({
//         ...rect,
//         x_axis: (6000 -(rect.x_axis + rect.width)) * scaleFactor,
//         y_axis: rect.y_axis * 0.17,
//         width: rect.width * scaleFactor ,
//         widtha: rect.width ,
//         heighta: rect.height ,
//         height: rect.height * 0.165 ,
//         glass_state: rect.glass_state,
//         isActive: false
//       }));
//     };
//     webSocket.onerror = (error) => {
//       console.error('WebSocket Error:', error);
//     };
//     webSocket.onclose = () => {
//       console.log('WebSocket Connection Closed');
//       // 可以选择重新连接
//     };
//   }
// };
const connectWebSocket = () => {  
  if (!webSocket) {  
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
@@ -250,8 +222,10 @@
    webSocket.onmessage = (event) => {  
      const data = JSON.parse(event.data);  
      const scaleFactor = 1621.78 / 6000;  
     if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
      const newRects = data.currentCutTerritory[0].map(rect => {  
        const existingRect = adjustedRects.value.find(r => r.glass_id === rect.glass_id);  
        if (existingRect) {  
          return {  
            ...existingRect,  
@@ -281,10 +255,12 @@
        }
      });
      adjustedRects.value = newRects;  
     } else if (data.currentCutTerritory == '') {
      adjustedRects.value = [];
     }
    };  
  }
};  
onMounted(() => {  
  // 初始时,如果输入框为空,则连接WebSocket  
  if (!inputValue.value) {  
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -86,6 +86,11 @@
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {  
  if (data.intoGlass2 && data.intoGlass2.length > 0) {  
    // 提取新的矩形ID
    const newGlassIds = new Set(data.intoGlass2[0].map(rect => rect.glassId));
    // 过滤出已存在的矩形
    const existingRects = adjustedRects2.value.filter(rect => newGlassIds.has(rect.glassId));
    // 计算新的矩形
    const newRects = data.intoGlass2[0].map(rect => {  
      const scaleFactor =  794.67/5087; 
        let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
@@ -119,17 +124,25 @@
        widtha: rect.width, 
        heighta: rect.height,
      }
    });
    // 合并新旧矩形,保留 isActive 状态
    adjustedRects2.value = adjustedRects2.value.map(oldRect => {
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRects2.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);  
      if (newRect) {  
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };  
      }  
      return oldRect; // 如果旧矩形在新数据中不存在,则保留原样
    }).concat(newRects.filter(r => !adjustedRects2.value.some(o => o.glassId === r.glassId)));
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else if (data.intoGlass2 == null) {
    adjustedRects2.value = []
  }
  if (data.intoGlass && data.intoGlass.length > 0) {  
    // 提取新的矩形ID
    const newGlassIds = new Set(data.intoGlass[0].map(rect => rect.glassId));
    // 过滤出已存在的矩形
    const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId));
    // 计算新的矩形
    const newRects = data.intoGlass[0].map(rect => {  
      const scaleFactor =  794.67/5087; 
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
@@ -163,17 +176,25 @@
        widtha: rect.width, 
        heighta: rect.height,
      }
    });
    // 合并新旧矩形,保留 isActive 状态
    adjustedRects1.value = adjustedRects1.value.map(oldRect => {
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRects1.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);  
      if (newRect) {  
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };  
      }  
      return oldRect; // 如果旧矩形在新数据中不存在,则保留原样
    }).concat(newRects.filter(r => !adjustedRects1.value.some(o => o.glassId === r.glassId)));
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else if (data.overGlass == null) {
    adjustedRects1.value = []
  }
  if (data.waitingGlass && data.waitingGlass.length > 0) {  
    // 提取新的矩形ID
    const newGlassIds = new Set(data.waitingGlass[0].map(rect => rect.glassId));
    // 过滤出已存在的矩形
    const existingRects = adjustedRectsa.value.filter(rect => newGlassIds.has(rect.glassId));
    // 计算新的矩形
    const newRects = data.waitingGlass[0].map(rect => {  
      const scaleFactor =  1621.78/5190; 
  let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;; 
@@ -207,17 +228,25 @@
    widtha: rect.width, 
    heighta: rect.height,
  }
    });
    // 合并新旧矩形,保留 isActive 状态
    adjustedRectsa.value = adjustedRectsa.value.map(oldRect => {
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRectsa.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);  
      if (newRect) {  
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };  
      }  
      return oldRect; // 如果旧矩形在新数据中不存在,则保留原样
    }).concat(newRects.filter(r => !adjustedRectsa.value.some(o => o.glassId === r.glassId)));
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else if (data.waitingGlass == null) {
    adjustedRectsa.value = []
  }
  if (data.outGlass && data.outGlass.length > 0) {  
    // 提取新的矩形ID
    const newGlassIds = new Set(data.outGlass[0].map(rect => rect.glassId));
    // 过滤出已存在的矩形
    const existingRects = adjustedRectsb.value.filter(rect => newGlassIds.has(rect.glassId));
    // 计算新的矩形
    const newRects = data.outGlass[0].map(rect => {  
      const scaleFactor =  1621.78/5190; 
      const scaleFactory =  550/2800; 
@@ -254,24 +283,49 @@
        widtha: rect.width, 
        heighta: rect.height,
  }
    });
    // 合并新旧矩形,保留 isActive 状态
    adjustedRectsb.value = adjustedRectsb.value.map(oldRect => {
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRectsb.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);  
      if (newRect) {  
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };  
      }  
      return oldRect; // 如果旧矩形在新数据中不存在,则保留原样
    }).concat(newRects.filter(r => !adjustedRectsb.value.some(o => o.glassId === r.glassId)));
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else if (data.outGlass == null) {
    adjustedRectsb.value = []
  }
}; 
onMounted(() => {
  initializeWebSocket(socketUrl, handleMessage);
});
function updateRectColors() {
function updateRectColorsa() {
  adjustedRectsa.value.forEach(rect => {  
    if (rect.glassId === glassId) {  
      rect.state = 5;
      rect.state = 8;
    }
  });
}
function updateRectColorsb() {
  adjustedRectsb.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 8;
    }
  });
}
function updateRectColors1() {
  adjustedRects1.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 8;
    }
  });
}
function updateRectColors2() {
  adjustedRects2.value.forEach(rect => {
    if (rect.glassId === glassId) {
      rect.state = 8;
    }
  });  
}  
@@ -283,7 +337,7 @@
      return '#95d475';
    case -1:  
      return '#CDAF95';  
    case 5:
    case 8:
      return '#911005';  
  }
}
@@ -293,7 +347,7 @@
      return '#eebe77';  
    case 4:  
      return '#CD6090';
    case 5:
    case 8:
      return '#911005';  
  }  
}
@@ -364,13 +418,13 @@
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 2,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blind1.value = false;
      updateRectColors();
      updateRectColors1();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
@@ -387,13 +441,13 @@
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 2,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blind2.value = false;
      updateRectColors();
      updateRectColors2();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
@@ -410,13 +464,13 @@
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 2,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blinda.value = false;
      updateRectColors();
      updateRectColorsa();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
@@ -433,13 +487,13 @@
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 2,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blindb.value = false;
      updateRectColors();
      updateRectColorsb();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
@@ -447,7 +501,7 @@
}
catch (error) {
    // 处理错误
    console.error(error);
    // console.error(error);
  }
}
onBeforeUnmount(() => {
@@ -479,12 +533,12 @@
       left: `${rect.xcoordinate}px`,
        width: `${rect.width}px`, 
        height: `${rect.height}px`,
        backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 5 ? '#911005' : 'lightblue' }"
        backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 8 ? '#911005' : 'lightblue' }"
    >
     <div  class="centered-text">
    <div >{{ rect.glassId }}</div>
    <div >{{ rect.flowCardId }}</div>
    <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div>
   </div>
@@ -507,12 +561,12 @@
       left: `${rect.xcoordinate}px`, 
       width: `${rect.width}px`, 
       height: `${rect.height}px`,
       backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 5 ? '#911005' : 'lightblue' }"
       backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 8 ? '#911005' : 'lightblue' }"
       >
     <div  class="centered-text">
    <div >{{ rect.glassId }}</div>
    <div >{{ rect.flowCardId }}</div>
    <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div>
   </div>
@@ -538,9 +592,9 @@
       width: `${rect.width}px`, height: `${rect.height}px`,
      backgroundColor: rect.isActive ? '#ADFF2F' : getRectColora(rect.state) }">
    <div  class="centered-text">
    <div>{{ rect.glassId }}</div>
    <div >{{ rect.flowCardId }}</div>
    <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div> 
   </div>
@@ -566,9 +620,9 @@
      backgroundColor: rect.isActive ? '#ADFF2F' : getRectColorb(rect.state) }">
       <!-- backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }"> -->
     <div  class="centered-text">
    <div >{{ rect.glassId }}</div>
    <div >{{ rect.flowCardId }}</div>
    <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div> 
   </div>
@@ -584,7 +638,7 @@
    <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('processCard.inquire') }}</el-button>
    <el-button type="info" style="margin-left: 10px;" @click="printing()">{{ $t('processCard.printing') }}</el-button>
  </div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
    <el-table
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -31,11 +31,16 @@
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; 
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  if(data.overGlass!=null){
    adjustedRects.value =  data.overGlass[0].map(rect => {
const handleMessage = (data) => {
  if (data.overGlass && data.overGlass.length > 0) {
    // 提取新的矩形ID
    const newGlassIds = new Set(data.overGlass[0].map(rect => rect.glassId));
    // 过滤出已存在的矩形
    const existingRects = adjustedRects.value.filter(rect => newGlassIds.has(rect.glassId));
    // 计算新的矩形
    const newRects = data.overGlass[0].map(rect => {
      const scaleFactor =  1621.78/5190; 
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      let newX = rect.yCoordinate; 
@@ -50,15 +55,9 @@
    if (rect.angle === 0) {  
    adjustedWidth = widtha * scaleFactor;  
    adjustedHeight = heighta * 0.16;  
    // adjustedWidtha = widtha;
    // adjustedHeighta = heighta;
    // newX = 5190 - (rect.yCoordinate + rect.width);
  } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * 0.16;  
    // adjustedWidtha = heighta;
    // adjustedHeighta = widtha;
    // newX = 5190 - (rect.yCoordinate + rect.height);
  }  
  return {  
    ...rect, 
@@ -68,72 +67,22 @@
    height: adjustedHeight,  
    widtha: rect.width, 
    heighta: rect.height,
    // isActive: false,
  };
});
  }
    });
    // 合并新旧矩形,并保留 isActive 状态
    adjustedRects.value = existingRects.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);
      if (newRect) {
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };
      }
      return oldRect; // 如果旧矩形在新数据中不存在,但保留在newGlassIds中,则保留原样
    }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
  }
  else if (data.overGlass == null) {
    adjustedRects.value = []
  }
};
// const handleMessage = (data) => {
//   // 假设 data.overGlass[0] 是矩形数组
//   const newRects = data.overGlass[0].map(newRect => ({
//     ...newRect,
//     const scaleFactor = 1621.78 / 5190;
//     let widtha, heighta, adjustedWidth, adjustedHeight;
//     // 交换宽度和高度(如果矩形是“横向”的)
//     if (rect.width < rect.height) {
//       widtha = rect.height;
//       heighta = rect.width;
//     } else {
//       widtha = rect.width;
//       heighta = rect.height;
//     }
//     // 根据角度调整宽度和高度
//     if (rect.angle === 0) {
//       adjustedWidth = widtha * scaleFactor;
//       adjustedHeight = heighta * 0.16;
//     } else {
//       adjustedWidth = heighta * scaleFactor;
//       adjustedHeight = widtha * 0.16;
//     }
//     // 注意:这里可能需要重新考虑 newX 的计算方式
//     // 暂时保留为原始 yCoordinate 的处理,但通常 x 坐标不应来自 y 坐标
//     let newX = rect.yCoordinate; // 可能是个错误,除非有特定用途
//     // 返回新的矩形对象
//     return {
//       ...rect, // 复制原始矩形的所有属性
//       xcoordinate: newX * scaleFactor, // 注意:这里的 newX 可能需要调整
//       ycoordinate: rect.xCoordinate * 0.16,
//       width: adjustedWidth,
//       height: adjustedHeight,
//       widtha,
//       heighta,
//       isActive: false, // 默认为非激活状态
//       // 可以添加其他需要的属性
//     }
//   }));
  // 使用新数据更新 adjustedRects
  // 注意:这里我们假设 adjustedRects.value 中的矩形也有 id 属性
//   adjustedRects.value = adjustedRects.value.map(oldRect => {
//     const updatedRect = newRects.find(newRect => newRect.id === oldRect.id);
//     if (updatedRect) {
//       // 如果找到了对应的矩形,则合并属性和保留原始激活状态(如果需要的话)
//       // 但在这个例子中,我们总是将 isActive 设置为 false
//       return {
//         ...oldRect,
//         ...updatedRect, // 合并新矩形的属性,但会覆盖 isActive
//         isActive: false, // 总是设置为 false,除非您有更复杂的逻辑
//       };
//     }
//     // 如果没有找到对应的矩形,则保留原样
//     return oldRect;
//   }).concat(newRects.filter(newRect => !adjustedRects.value.some(oldRect => oldRect.id === newRect.id)));
//   // concat 用于添加那些在 adjustedRects.value 中不存在的新矩形
// };
function updateRectColors() {  
  adjustedRects.value.forEach(rect => {  
    if (rect.glassId === glassId) {  
@@ -151,17 +100,22 @@
      return '#911005';  
  }  
}
function showDialog(rect) {
  rect.isActive = true;
function showDialog(rect) {
  const index = adjustedRects.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRects.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;  
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blind.value = true;  
}  
const handleDialogClose = () => {  
  adjustedRects.value.forEach(rect => {  
    rect.isActive = false; // 关闭对话框时重置所有矩形的 isActive 状态
    rect.isActive = false;
  });  
};
  blind.value = false;
};
// 破损
const handleDamage = async () => {
  try  {
@@ -219,10 +173,9 @@
      backgroundColor: rect.isActive ? '#ADFF2F' : getRectColora(rect.state) 
      }">
     <div  class="centered-text">
    <div >{{ rect.glassId }}</div>
    <div >{{ rect.flowCardId }}</div>
    <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
    <!-- <div style="margin-top: 25px;margin-left: -60px;">{{ rect.widtha }}*{{ rect.heighta }}</div>   -->
    <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
    <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
    <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
  </div>
  </div> 
   </div>
UI-Project/src/views/largescreen/largescreen.vue
@@ -1,30 +1,15 @@
<template>  
  <el-card style="flex: 1;margin-left: 1px;margin-top: 10px;margin-right: 1px;" v-loading="loading">
    <el-scrollbar height="800px">
<div id="top" style="height: 150px;display: flex;">
  <div style="font-size: 20px;font-weight: bold;">{{ $t('large.loading') }}{{ temperingtotal }} </div>
  <div id="top" style="height: 150px;display: flex; justify-content: center; align-items: center;">
  <div class="echarts-container">
  <div v-for="(processData, index) in processesData" :key="index" class="echarts-item">
  <div v-for="(processData, index) in processesData" :key="index" class="echarts-item" @click="showDialog">
    <div :id="'pieChart_' + index" class="pie-chart"></div>
  </div>
</div>
</div> 
<div style="display: flex;">
<!-- <div id="centerleft" style="margin-top: 10px;height: 240px;width: 340px;background-color: #911005;">
  <el-table height="240" ref="table" width="340px"
      @selection-change="handleSelectionChange"
      :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column fixed prop="orderId" align="center" :label="$t('large.number')" min-width="110" />
        <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="100" />
        <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="100" />
        <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" />
        <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="100" />
        <el-table-column fixed="right" :label="$t('large.operate')" align="center" width="100">
          <template #default="scope">
            <el-button size="mini" type="text" plain @click="handleBinda">{{ $t('large.mes') }}</el-button>
          </template>
      </el-table-column>
      </el-table>
</div>  -->
<div class="parter" style="margin-top: 10px;margin-left: 150px; height: 240px;width: 1000px;">
    <img src="../../assets/dpxsa.png" style="margin-left: -10px; width: 100%;height: 100%;" alt="Your Image">
  <div  class="moving-rect lipiana" v-show="woshia"></div>
@@ -34,7 +19,6 @@
  <div  class="moving-rect overlaya" v-show="flake"></div>
  <div  class="moving-rect overlayb" v-show="flakeb"></div>
  <div  class="moving-rect overlayc" v-show="flakec"></div>
  <div  class="moving-rect overlayd" v-show="flaked"></div>
  <div  class="moving-rect longa" v-show="dalipiana"></div>
  <div  class="moving-rect longb" v-show="dalipianb"></div>
  <div  class="moving-rect shangpianji" v-show="shangpian"></div>
@@ -48,7 +32,7 @@
</div>
</div>
<div id="bottom" style="margin-top: 10px;height: 190px;">
<el-table height="390" ref="table"
<el-table height="350" ref="table"
      @selection-change="handleSelectionChange"
      :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column prop="orderId" align="center" :label="$t('large.orderId')" min-width="50" />
@@ -79,7 +63,7 @@
</el-scrollbar>
</el-card>
<el-dialog v-model="blinda" top="5vh" width="85%">
  <el-table height="400" ref="table"
  <el-table height="650" ref="table"
      @selection-change="handleSelectionChange"
      :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column prop="orderId" fixed align="center" :label="$t('large.orderId')" min-width="110" />
@@ -119,11 +103,23 @@
    </div>
  </template>
</el-dialog>
<el-dialog v-model="blind" top="10vh" width="70%" >
  <el-date-picker style="margin-left: 1px;"  v-model="timeRange" type="daterange" format="YYYY/MM/DD" value-format="YYYY-MM-DD"
  :start-placeholder="$t('large.starttime')" :end-placeholder="$t('large.endtime')" :default-time="defaultTime" />
    <el-button type="primary" style="margin-left: 10px;margin-top: -6px;" @click="selectReportData()">{{ $t('large.inquire') }}</el-button>
    <div style="height: 550px;display: flex;margin-top: 10px;justify-content: center; align-items: center;">
  <div class="echarts-container">
  <div v-for="(processData, index) in dialogprocesses" :key="index" class="echarts-item">
    <div :id="'dialogPieChart_' + index" class="pie-chart"></div>
  </div>
  </div>
  </div>
  </el-dialog>
</template>  
<script setup>  
import { Delete, Upload } from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ref, onMounted , onBeforeUnmount, reactive, computed, shallowRef, onUnmounted, watchEffect } from "vue";
import { ref, onMounted , onBeforeUnmount, reactive, computed, shallowRef, onUnmounted, watchEffect,nextTick  } from "vue";
import request from "@/utils/request"
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -135,10 +131,10 @@
const tableDatac = ref([])
const adjustedRects = ref([]);  
const chartRefs = ref([]);  
const timeRange = ref([])
const flake = ref(false)
const flakeb = ref(false)
const flakec = ref(false)
const flaked = ref(false)
const woshia = ref(false)
const woshic = ref(false)
const dalipiana = ref(false)
@@ -151,7 +147,9 @@
const xiapian4 = ref(false)
const xiapian5 = ref(false)
const xiapian6 = ref(false)
const blind = ref(false)
const temperingtotal = ref(0)
const thisProcess = ref(); // 用于存储process_id的响应式引用 
// 定义一个响应式引用来存储图表实例    
const chartDom = ref(null);  
@@ -162,6 +160,7 @@
  await fetchFlowCardId(row.orderId);
};  
const processesData = ref([]);
const dialogprocesses = ref([]);
const fetchFlowCardId = async (orderId) => {
  try  {
    const response = await request.post('/loadGlass/order/order/selectOrderdetail',{
@@ -213,6 +212,8 @@
tableDatac.value = data.orders[0]
  socket.onmessage = (event) => {  
  const data = JSON.parse(event.data);  
  console.log(data.device[0]);
  processesData.value = data.device[0].map(rect => ({  
    ...rect,  
    completedQuantity: rect.completedQuantity,  
@@ -235,32 +236,29 @@
    flake.value = tasks.some(task => task.state == 1);
    flakeb.value = tasks.some(task => task.state == 2);
    flakec.value = tasks.some(task => task.state == 3);
    flaked.value = tasks.some(task => task.state == 4);
};
// 卧式理片
const socketUrl3 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassIsRun`;
const handleMessage3 = (data) => {
  const tasks = data.taskCaches[0];
    const tasks = data.taskCaches[0];
  woshia.value = tasks.some(task => task.line == 2001);  
  woshic.value = tasks.some(task => task.line == 2002);  
  console.log(tasks);
};
// 大理片笼
const socketUrl4 = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/isRun`;
const handleMessage4 = (data) => {
  const tasks = data.bigStorageCageDetailsOutTask[0];
  const taskss = data.bigStorageCageDetailsFeedTask[0];
    const tasks = data.bigStorageCageDetailsOutTask[0];
    dalipiana.value = tasks.some(task => task.slot !== null && task.slot !== undefined);  
  const taskss = data.bigStorageCageDetailsFeedTask[0];
dalipianb.value = taskss.some(task => task.slot !== null && task.slot !== undefined);  
};
// 上片
const socketUrl5 = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassIsRun`;
const handleMessage5 = (data) => {
  if(data.engineering.length !==0 ){
    shangpian.value = true;
}
};
    const tasks = data.engineering;
    shangpian.value = tasks.some(task => task.state == 1);
    temperingtotal.value = data.engineering[0].engineerId
  };
// 下片
const socketUrl6 = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unLoadGlassIsRun`;
const handleMessage6 = (data) => {
@@ -314,7 +312,49 @@
      }
    ]
  };
  chart.setOption(options);
});
};
const renderPieCharts1 = () => {
dialogprocesses.value.forEach((data, index) => {
  const chart = echarts.init(document.getElementById('dialogPieChart_' + index));
  const options = {
    title: {
        text: `${data.thisProcess} `,
        left: 'center',
      },
    tooltip: {
      trigger: 'item',
    },
    series: [
      {
        name: `${data.thisProcess} `,
        type: 'pie',
        radius: ['40%', '70%'],
        avoidLabelOverlap: false,
        data: [
          { value: data.completedQuantity, name: t('large.completedquantity') },
          { value: data.breakageQuantity, name: t('large.scrapquantity') }
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        },
        label: {
          show: false,
          position: 'center',
        },
      labelLine: {
        show: false
      },
      }
    ]
  };
  chart.setOption(options);
});
};
@@ -355,8 +395,34 @@
closeWebSocket5();
closeWebSocket6();
});
</script>
function showDialog() {
  blind.value = true;
}
// 查询数据
const selectReportData = async () => {
  const response = await request.post("/loadGlass/reporting_work/reporting-work/selectDamage", {
    reportingWorkTime: timeRange.value[0],
    reportingWorkTime2: timeRange.value[1],
  })
  if (response.code === 200) {
    console.log(response.data);
    dialogprocesses.value = response.data.map(rect => ({
    ...rect,
    completedQuantity: rect.completedQuantity,
    breakageQuantity: rect.breakageQuantity,
    thisProcess: rect.thisProcess,
  }));
  await nextTick();
  renderPieCharts1();
    ElMessage.success(response.message);
  } else {
    ElMessage.error(response.message);
  }
};
</script>
<style scoped>  
.echarts-container {
display: flex;
@@ -458,7 +524,7 @@
    top: 9px;
    left: 200px;
    transform: translateX(-50%);
    animation: move-xiapianji 6s infinite;
    animation: move-xiapianji 15s infinite;
}
@keyframes move-xiapianji {
    0% {
@@ -475,7 +541,7 @@
    top: 190px;
    right: 530px;
    transform: translateX(-50%);
    animation: move-lipiana 6s infinite;
    animation: move-lipiana 15s infinite;
}
@keyframes move-lipiana {
    0% {
@@ -492,7 +558,7 @@
    top: 160px;
    left: 502px;
    transform: translateX(-50%);
    animation: move-lipianb 6s infinite;
    animation: move-lipianb 15s infinite;
}
@keyframes move-lipianb {
    0% {
@@ -509,7 +575,7 @@
    top: 215px;
    right: 490px;
    transform: translateX(-50%);
    animation: move-lipianc 6s infinite;
    animation: move-lipianc 15s infinite;
}
@keyframes move-lipianc {
    0% {
@@ -526,7 +592,7 @@
    top: 160px;
    left: 555px;
    transform: translateX(-50%);
    animation: move-lipiand 6s infinite;
    animation: move-lipiand 15s infinite;
}
@keyframes move-lipiand {
    0% {
@@ -543,7 +609,7 @@
    top: 213px;
    right: 800px;
    transform: translateX(-50%);
    animation: move-overlaya 6s infinite;
    animation: move-overlaya 15s infinite;
}
@keyframes move-overlaya {
    0% {
@@ -560,7 +626,7 @@
    top: 110px;
    left: 13px;
    transform: translateX(-50%);
    animation: move-overlayb 6s infinite;
    animation: move-overlayb 15s infinite;
}
@keyframes move-overlayb {
    0% {
@@ -577,7 +643,7 @@
    top: 7px;
    left: 13px;
    transform: translateX(-50%);
    animation: move-overlayc 6s infinite;
    animation: move-overlayc 15s infinite;
}
@keyframes move-overlayc {
    0% {
@@ -594,7 +660,7 @@
    top: 157px;
    right: 90px;
    transform: translateX(-50%);
    animation: move-shangpianji 6s infinite;
    animation: move-shangpianji 15s infinite;
}
@keyframes move-shangpianji {
    0% {
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
@@ -4,6 +4,8 @@
import com.github.yulichang.base.MPJBaseMapper;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@@ -19,5 +21,13 @@
public interface TemperingGlassInfoMapper extends MPJBaseMapper<TemperingGlassInfo> {
    boolean saveBatch(@Param(value = "list") List<TemperingGlassInfo> list);
    //绕过全局逻辑进行查询
    @Select("SELECT * FROM tempering_glass_info " + "WHERE tempering_layout_id = #{temperingLayoutId} " + "AND engineer_id = #{engineerId} " + "ORDER BY tempering_layout_id DESC, tempering_feed_sequence ASC")
    List<TemperingGlassInfo> selectByEngineerIdAndLayoutId(String engineerId, Integer temperingLayoutId);
    //绕过全局逻辑进行修改
    @Update("UPDATE tempering_glass_info " +
            "SET state = #{state}, " +
            "deleted = CASE WHEN #{state} < 8 THEN 0 ELSE deleted END " +
            "WHERE glass_id = #{glassId}")
    Integer updateTemperingGlassInfo(TemperingGlassInfo temperingGlassInfo);
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
@@ -36,7 +36,8 @@
            QueryWrapper<TemperingGlassInfo> glassinfo = new QueryWrapper<>();
            glassinfo.eq("engineer_id", glass.getEngineerId())
                    .eq("tempering_layout_id", glass.getTemperingLayoutId());
            return temperingMapper.selectList(glassinfo);
            //return temperingMapper.selectList(glassinfo);
            return temperingMapper.selectByEngineerIdAndLayoutId(glass.getEngineerId(),glass.getTemperingLayoutId());
        }else {
            return null;
        }
@@ -45,11 +46,13 @@
    @Override
    public List<TemperingGlassInfo> selectIntoGlass(TemperingGlassInfo temperingGlassInfo) {
        //获取进炉中的玻璃信息
        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("tempering_layout_id", temperingGlassInfo.getTemperingLayoutId())
                .eq("engineer_id", temperingGlassInfo.getEngineerId())
                .orderByAsc("tempering_layout_id","tempering_feed_sequence");
        return temperingMapper.selectList(wrapper);
//        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
//        wrapper.eq("tempering_layout_id", temperingGlassInfo.getTemperingLayoutId())
//                .eq("engineer_id", temperingGlassInfo.getEngineerId())
//                .orderByAsc("tempering_layout_id","tempering_feed_sequence");
//        return temperingMapper.selectList(wrapper);
        return temperingMapper.selectByEngineerIdAndLayoutId(temperingGlassInfo.getEngineerId(),temperingGlassInfo.getTemperingLayoutId());
    }
    @Override
@@ -60,13 +63,9 @@
        TemperingGlassInfo glass=temperingMapper.selectOne(wrap);
        //根据工程号和版图获取数据
        if(glass != null) {
            QueryWrapper<TemperingGlassInfo> wapper = new QueryWrapper<>();
            wapper.eq("engineer_id", glass.getEngineerId())
                    .eq("tempering_layout_id", glass.getTemperingLayoutId())
                    .orderByAsc("tempering_layout_id", "tempering_feed_sequence");
            return temperingMapper.selectList(wapper);
            return temperingMapper.selectByEngineerIdAndLayoutId(glass.getEngineerId(),glass.getTemperingLayoutId());
        }
            return  null;
        return  null;
    }
    @Override
@@ -80,11 +79,8 @@
        if (glassinfo == null) {
            return null;  // 直接返回null,表示没有找到符合条件的记录
        }
        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
        wrapper.eq("tempering_layout_id",glassinfo.getTemperingLayoutId())
                .eq("engineer_id",glassinfo.getEngineerId());
        return temperingMapper.selectByEngineerIdAndLayoutId(glassinfo.getEngineerId(),glassinfo.getTemperingLayoutId());
        return  temperingMapper.selectList(wrapper);
    }
    @Override
@@ -97,7 +93,7 @@
    }
    @Override
        public List<TemperingGlassInfo> selectTaskType() {
    public List<TemperingGlassInfo> selectTaskType() {
        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
        wrapper.select("state")
                .groupBy("state");
@@ -106,11 +102,7 @@
    @Override
    public Integer updateTemperingState(TemperingGlassInfo temperingGlassInfo) {
        UpdateWrapper<TemperingGlassInfo> wrapper = new UpdateWrapper<>();
        wrapper.eq("glass_id",temperingGlassInfo.getGlassId())
                .lt("state",6)
                .set("state", temperingGlassInfo.getState());;
        if (temperingMapper.update(null,wrapper) > 0) {
        if (temperingMapper.updateTemperingGlassInfo(temperingGlassInfo) > 0) {
            return 200;
        }else {
            return 100;
hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
@@ -149,7 +149,7 @@
        arguments.put("state","8");        //拿走:200/破损:201
        arguments.put("line","1001");             //线路:
        arguments.put("workingProcedure","识别");           //设备名称:
        edgStorageCageDetailsService.identWorn(arguments);
//        edgStorageCageDetailsService.identWorn(arguments);
        log.info("识别台【破损/拿走】:{}", 1);
    }
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java
@@ -94,20 +94,26 @@
    /**
     * 工程号
     */
    @ApiModelProperty(value = "工程号")
    @ApiModelProperty(value = "工程号", position = 16)
    private String engineerId;
    /**
     * 工程号
     */
    @ApiModelProperty(value = "层", position = 17)
    private String layer;
    /**
     * 进片任务
     */
    @ApiModelProperty(value = "进片任务", position = 16)
    @ApiModelProperty(value = "进片任务", position = 18)
    @TableField(exist = false)
    private BigStorageCageFeedTask bigStorageCageFeedTask;
    /**
     * 出片任务
     */
    @ApiModelProperty(value = "出片任务", position = 17)
    @ApiModelProperty(value = "出片任务", position = 19)
    @TableField(exist = false)
    private BigStorageCageOutTask bigStorageCageOutTask;
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
@@ -276,10 +276,9 @@
                .gt(BigStorageCage::getRemainWidth, Math.max(glassInfo.getWidth(), glassInfo.getHeight()))
                .last("limit 1");
        if (glassInfo.getTemperingLayoutId() == 0) {
            //todo:同流程进同一格
//            wrapper.eq(BigStorageCageDetails::getFlowCardId,glassInfo.getFlowCardId())
//                    .eq(BigStorageCageDetails::get)
            wrapper.eq(BigStorageCageDetails::getWidth, glassInfo.getWidth()).eq(BigStorageCageDetails::getHeight, glassInfo.getHeight());
            wrapper.eq(BigStorageCageDetails::getFlowCardId,glassInfo.getFlowCardId())
                    .eq(BigStorageCageDetails::getLayer,glassInfo.getLayer());
//            wrapper.eq(BigStorageCageDetails::getWidth, glassInfo.getWidth()).eq(BigStorageCageDetails::getHeight, glassInfo.getHeight());
        } else {
            wrapper.eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1);
        }
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
@@ -2,6 +2,7 @@
import cn.hutool.core.lang.Assert;
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;
@@ -282,8 +283,12 @@
                return;
            }
            //是否有人工下片任务   有直接出
//            List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
//                    .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL).orderByDesc(BigStorageCageDetails::getWidth));
            List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
                    .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL).orderByDesc(BigStorageCageDetails::getWidth));
                    .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL)
                    .orderByAsc(BigStorageCageDetails::getSlot)
                    .orderByDesc(BigStorageCageDetails::getId));
            if (CollectionUtils.isNotEmpty(artificialList)) {
                computeOutMoreGlassInfo(artificialList, Boolean.FALSE, mesToPLCAddress);
                Date endDate = new Date();
@@ -543,18 +548,19 @@
     */
    public Boolean judgeGlassTypeStatus(String glassId, Integer line, String mesAddress) {
        //1、获取任务表中相邻玻璃
        List<EdgGlassTaskInfo> edgGlassTaskInfoList ;
        edgGlassTaskInfoList= edgGlassTaskInfoService.list(new LambdaQueryWrapper<EdgGlassTaskInfo>()
        List<EdgGlassTaskInfo> edgGlassTaskInfoList;
        edgGlassTaskInfoList = edgGlassTaskInfoService.list(new LambdaQueryWrapper<EdgGlassTaskInfo>()
                .eq(EdgGlassTaskInfo::getLine, line)
                .apply("time >= (select time from edg_glass_task_info where line='" + line + "' and glass_id = '" + glassId + "' and deleted = 0)")
                .orderByAsc(EdgGlassTaskInfo::getTime));
        if(edgGlassTaskInfoList==null){
            log.info("线路:{}识别玻璃信息未出现在尺寸表中,获取相邻两块玻璃失败",line);
        }else{
            edgGlassTaskInfoList= edgGlassTaskInfoService.list(new LambdaQueryWrapper<EdgGlassTaskInfo>()
                    .eq(EdgGlassTaskInfo::getGlassId, glassId)
                    .last("limit 1"));
            log.info("在尺寸表中获取玻璃信息{}",edgGlassTaskInfoList);
        if (edgGlassTaskInfoList == null) {
            log.info("线路:{}识别玻璃信息未出现在尺寸表中,获取相邻两块玻璃失败", line);
        } else {
            edgGlassTaskInfoList = edgGlassTaskInfoService.list(new QueryWrapper<EdgGlassTaskInfo>()
                    .select("Top 1 *")
                    .eq("glass_id", glassId)
            );
            log.info("在尺寸表中获取玻璃信息{}", edgGlassTaskInfoList);
        }
        Assert.isFalse(CollectionUtils.isEmpty(edgGlassTaskInfoList), "识别玻璃信息未出现在尺寸表中,获取相邻两块玻璃失败");
        //2、获取卧转立剩余宽度
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageMapper.xml
@@ -11,7 +11,8 @@
        WHERE T.MAX_THICKNESS >= #{thickness}
          AND T.ENABLE_STATE = 1
        GROUP BY T.DEVICE_ID
        ORDER BY COUNT(DISTINCT T1.ENGINEER_ID), COUNT(DISTINCT T1.TEMPERING_LAYOUT_ID),
        ORDER BY T.MAX_THICKNESS,
                 COUNT(DISTINCT T1.ENGINEER_ID), COUNT(DISTINCT T1.TEMPERING_LAYOUT_ID),
                 COUNT(DISTINCT T1.SLOT)
    </select>
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java
@@ -1,5 +1,7 @@
package com.mes;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
@@ -7,7 +9,10 @@
import com.mes.common.config.Const;
import com.mes.damage.entity.Damage;
import com.mes.damage.service.DamageService;
import com.mes.edgglasstask.entity.EdgGlassTaskInfo;
import com.mes.edgglasstask.service.EdgGlassTaskInfoService;
import com.mes.job.PlcStorageCageTask;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -37,6 +42,8 @@
    BigStorageCageDetailsService bigStorageCageDetailsService;
    @Autowired
    DamageService damageService;
    @Autowired
    EdgGlassTaskInfoService edgGlassTaskInfoService;
//    @Autowired
//    BigStorageCageFeedTaskMapper bigStorageCageFeedTaskMapper;
@@ -167,4 +174,13 @@
        plcStorageCageTask.updateOutGlassStateTask();
    }
    @Test
    public void chaxun(){
        List<EdgGlassTaskInfo> edgGlassTaskInfoList = edgGlassTaskInfoService.list(new QueryWrapper<EdgGlassTaskInfo>()
                .select("Top 1 *")
                .eq("glass_id", "P24072402|1|13")
        );
        log.info("在尺寸表中获取玻璃信息{}", edgGlassTaskInfoList);
    }
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
@@ -137,6 +137,26 @@
        return Result.build(200, "修改成功", redisUtil.getCacheObject("autoPrint"));
    }
    @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);
        return Result.build(200, "新增成功", 1);
    }
    @ApiOperation("删除虚拟工位")
    @PostMapping("/deleteDownWorkstation")
    public Result deleteDownWorkstation(DownWorkstation downWorkstation) {
        downWorkstationService.removeById(downWorkstation.getWorkstationId());
        return Result.build(200, "删除成功", 1);
    }
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -48,7 +48,7 @@
        log.info("发送工位玻璃信息");
        JSONObject jsonObject = new JSONObject();
        List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1, 6);
        List<DownWorkstation> data = downWorkstationService.list();
        jsonObject.append("params", data);
        log.info(jsonObject.toString());
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
@@ -148,6 +148,16 @@
            autoPrint = redisUtil.getCacheObject("autoPrint");
        }
        jsonObject4.append("autoPrint", autoPrint);
        //人工下片位置最后一片
        DownGlassTask takeGlass = downGlassTaskService.getOne(
                new QueryWrapper<DownGlassTask>()
                        .select("Top 1 *")
                        .eq("end_cell", Const.G13_WORK_STATION)
                        .orderByDesc("id")
        );
        jsonObject4.append("takeGlass", takeGlass);
        ArrayList<WebSocketServer> sendwServer4 = WebSocketServer.sessionMap.get("unloadglass");
        if (sendwServer4 != null) {