严智鑫
2024-08-23 86739d74c6a28421d6a92edd50b01953146adbad
Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

# Conflicts:
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/impl/EdgStorageCageDetailsServiceImpl.java
版图识别回退上一版本提交
29个文件已修改
12个文件已添加
2332 ■■■■ 已修改文件
UI-Project/src/lang/companyInfo.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identify.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 492 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/PrintFlow.vue 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/User/rolelist.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/User/userlist.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/largescreen/largescreen.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/JsonFile/PlcTemperingGlass.json 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/JsonFile/PlcdownGlass.json 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/entity/DamagePrint.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/controller/FlowCardController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/FlowCard.java 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/mapper/FlowCardMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/FlowCardService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/impl/FlowCardServiceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/DateUtil.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/resources/application.yml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/gateway/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/companyInfo.js
@@ -42,8 +42,8 @@
            labelType3: '成品标签3',
            labelValue3:3,
            printFlowCard: {
                patch:'正品',
                lackOf:'次品',
                patch:'正',
                lackOf:'次',
                processingNote: (itemtextarea) => {
                    return  `${itemtextarea.processing_note}`
                },
UI-Project/src/lang/zh.js
@@ -247,6 +247,22 @@
        intofurnace:'进炉中',
        beforefurnace:'进炉前',
        outfurnace:'已出炉玻璃',
        print:'拿走打印',
        printing:'打印',
        projectnumber:'请输入工程号',
        inquire:'查询',
        project:'工程号',
        awayprocess:'拿走工序',
        awayequipment:'拿走设备',
        awayteam:'拿走班组',
        flowcard:'流程卡',
        layer:'层号',
        temperinglayout:'炉号',
        temperingfeed:'片序',
        width:'宽',
        height:'高',
        thickness:'厚',
        glasstakeout:'玻璃拿走清单',
    },
    reportWork:{
        lowerbit:'下片位',
@@ -424,7 +440,7 @@
        customerName: '客户名称',
        project: '项目名称',
        are: '面积',
        quantity: '包装方式',
        quantity: '数量',
        warehousing: '状态',
        deliveryDate: '送货时间',
        notstocked: '未入库',
@@ -485,5 +501,5 @@
        presponsibleequipment :'请选择责任设备',
        remark :'备注',
        premark :'请输入备注',
    },
    }
}
UI-Project/src/views/Identify/identify.vue
@@ -21,7 +21,7 @@
      @click="showDialog(rect.glass_id)"  
      :style="{ position: 'absolute', 
      top: `${rect.y_axis}px`, left: `${rect.x_axis}px`, width: `${rect.width}px`, height: `${rect.height}px`,
      backgroundColor: getRectColor(rect.glass_state)
      backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor(rect.glass_state)
       }"  
    >
     <!-- 箭头 -->  
@@ -34,7 +34,7 @@
  </div> 
   </div>
  </el-scrollbar>
  <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
  <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
        <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
@@ -76,7 +76,16 @@
function showDialog(glassId: number) {  
  currentGlassId.value = glassId;  
  blind.value = true;  
  adjustedRects.value = adjustedRects.value.map(rect =>
    rect.glass_id === glassId ? { ...rect, isActive: true } : rect
  );
}  
const handleDialogClose = () => {
  adjustedRects.value = adjustedRects.value.map(rect => ({
    ...rect,
    isActive: false
  }));
}
// 破损
const handleDamage = async () => {
  try  {
@@ -211,29 +220,47 @@
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
      }));
      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,
            x_axis: (6000 - (rect.x_axis + rect.width)) * scaleFactor,
            y_axis: rect.y_axis * 0.17,
            width: rect.width * scaleFactor,
            height: rect.height * 0.165,
            widtha: rect.width,
            heighta: rect.height,
            glass_state: rect.glass_state,
            // 保持 isActive 状态不变
          };
        } else {
          // 如果不存在,则添加新矩形,默认 isActive 为 false
          return {
            ...rect,
            x_axis: (6000 - (rect.x_axis + rect.width)) * scaleFactor,
            y_axis: rect.y_axis * 0.17,
            width: rect.width * scaleFactor,
            height: rect.height * 0.165,
            widtha: rect.width,
            heighta: rect.height,
            glass_state: rect.glass_state,
            isActive: false,
            glass_id: rect.glass_id,
          };
        }
      });
      adjustedRects.value = newRects;
     } else if (data.currentCutTerritory == '') {
      adjustedRects.value = [];
     }
    };  
    webSocket.onerror = (error) => {
      console.error('WebSocket Error:', error);
    };
    webSocket.onclose = () => {
      console.log('WebSocket Connection Closed');
      // 可以选择重新连接
    };
  }
  }
};  
onMounted(() => {  
  // 初始时,如果输入框为空,则连接WebSocket  
  if (!inputValue.value) {  
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -1,32 +1,97 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
import request from "@/utils/request"
import { ref, onMounted, onBeforeUnmount } from 'vue';
import { ref, onMounted, onBeforeUnmount,nextTick  } from 'vue';
import { WebSocketHost ,host} from '@/utils/constants'
import { ElMessage, ElMessageBox } from 'element-plus'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
  import { useI18n } from 'vue-i18n'
  import { useRouter } from 'vue-router'
  const { t } = useI18n()
  let language = ref(localStorage.getItem('lang') || 'zh')
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(true)
const dialogFormVisibleb = ref(false)
const blind = ref(false)
const dialogFormVisiblec = ref(false)
const blind1 = ref(false)
const blind2 = ref(false)
const blinda = ref(false)
const blindb = ref(false)
const dialogVisible = ref(false)
const width = ref();
const height = ref();
const adjustedRects1 = ref([]);
const adjustedRects2 = ref([]);
const adjustedRectsa = ref([]);
const adjustedRectsb = ref([]);
const tableData = ref([])
const engineerId = ref('')
const router = useRouter()
const currentGlassId = ref(null);
const currenttemperingFeedSequence = ref(null);
onMounted(async () => {
  try {
    const response = await request.post('/loadGlass/damage/selectDamagePrint', {
    type: 9,
    workingProcedure: '钢化',
    })
    if (response.code === 200) {
          tableData.value = response.data
          console.log(response.data);
    } else {
      ElMessage.warning(res.msg)
    }
  } catch (error) {
    // console.error('Error fetching rects :', error);
  }
});
const selectReportData = async () => {
  let postData = {
    type: 9,
    workingProcedure: '钢化',
    ...(engineerId.value !== '' && { engineerId: engineerId.value }),
  };
  const response = await request.post("/loadGlass/damage/selectDamagePrint", postData)
  if (response.code === 200) {
    tableData.value = response.data;
    ElMessage.success(response.message);
  } else {
    ElMessage.error(response.message);
  }
};
const printing = async () => {
  let postData = {
    type: 9,
    workingProcedure: '钢化',
    ...(engineerId.value !== '' && { engineerId: engineerId.value }),
  };
  console.log(engineerId.value);
  const response = await request.post("/loadGlass/damage/selectDamagePrintDetails", postData)
  if (response.code === 200) {
  dialogVisible.value = true;
    tableData.value = response.data;
    await nextTick();
  window.print();
} else {
    ElMessage.error(response.message);
  }
};
const printTable = () => {
  // 这里可以添加一些CSS样式来优化打印效果
  // 例如,可以添加一个隐藏的打印样式表
  window.print();
};
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {
// 进炉中
  if(data.intoGlass!=null){
    adjustedRects1.value =  data.intoGlass[0].map(rect => {
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;;
        let newX = rect.yCoordinate; 
@@ -58,13 +123,27 @@
        height: adjustedHeight,  
        widtha: rect.width, 
        heighta: rect.height,
      };
      });
      }else{
        adjustedRects1.value = ''
      }
  if(data.intoGlass2!=null){
    adjustedRects2.value =  data.intoGlass2[0].map(rect => {
    });
    // 合并新旧矩形,并保留 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; // 如果旧矩形在新数据中不存在,但保留在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;;
      let newX = rect.yCoordinate; 
@@ -96,14 +175,27 @@
        height: adjustedHeight,  
        widtha: rect.width, 
        heighta: rect.height,
      };
      });
      }else{
        adjustedRects2.value = ''
      }
  // 进炉前
  if(data.waitingGlass!=null){
    adjustedRectsa.value = data.waitingGlass[0].map(rect => {
    });
    // 合并新旧矩形,并保留 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; // 如果旧矩形在新数据中不存在,但保留在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;; 
  let newX = rect.yCoordinate; 
@@ -135,16 +227,30 @@
    height: adjustedHeight,  
    widtha: rect.width, 
    heighta: rect.height,
  };
});
  }else{
        adjustedRectsa.value = ''
      }
    // 已出炉
  if(data.outGlass!=null){
    adjustedRectsb.value = data.outGlass[0].map(rect => {
  }
    });
    // 合并新旧矩形,并保留 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; // 如果旧矩形在新数据中不存在,但保留在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; 
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
      const scaleFactory =  550/2800;
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta,newY;
  let newX = rect.yCoordinate; 
      if (rect.width < rect.height) {
        widtha = rect.height;
@@ -155,38 +261,71 @@
      }
  if (rect.angle === 0) {  
    adjustedWidth = widtha * scaleFactor;  
    adjustedHeight = heighta * 0.16;
    adjustedHeight = heighta * scaleFactory;
    // adjustedWidtha = widtha;  
    // adjustedHeighta = heighta;  
    // newX = 5190 - (rect.yCoordinate + widtha); 
    newY = 2800 - (rect.xCoordinate + heighta);
  } else {  
    adjustedWidth = heighta * scaleFactor;  
    adjustedHeight = widtha * 0.16;
    adjustedHeight = widtha * scaleFactory;
    // adjustedWidtha = heighta;  
    // adjustedHeighta = widtha;  
    // newX = 5190 - (rect.yCoordinate + heighta);  
    newY = 2800 - (rect.xCoordinate + widtha);
  }  
  return {  
        ...rect, // 复制原始对象的其他属性  
        x: newX * scaleFactor,
        y: rect.xCoordinate * 0.16,
        y: newY * scaleFactory,
        width: adjustedWidth,  
        height: adjustedHeight,  
        widtha: rect.width, 
        heighta: rect.height,
  };
});
  }else{
        adjustedRectsb.value = ''
      }
};
  }
    });
    // 合并新旧矩形,并保留 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; // 如果旧矩形在新数据中不存在,但保留在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;
    }
  });  
}  
@@ -198,7 +337,7 @@
      return '#95d475';
    case -1:  
      return '#CDAF95';  
    case 5:
    case 8:
      return '#911005';  
  }
}
@@ -208,41 +347,84 @@
      return '#eebe77';  
    case 4:  
      return '#CD6090';
    case 5:
    case 8:
      return '#911005';  
  }  
}
// if (adjustedRectsb[0].engineerId != null) {
//     engineerIdDisplayb = adjustedRectsb[0].engineerId
//   }
//   if (adjustedRectsa[0].engineerId != null) {
//     engineerIdDisplaya = adjustedRectsa[0].engineerId
//   }
//   if (adjustedRects2[0].engineerId != null) {
//     engineerIdDisplay2 = adjustedRects2[0].engineerId
//   }
//   if (adjustedRects[0].engineerId != null) {
//     engineerIdDisplay = adjustedRects[0].engineerId
//   }
function showDialog(rect) {
function showDialog1(rect) {
  const index = adjustedRects1.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRects1.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;  
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blind.value = true;
}
  blind1.value = true;
}
function showDialog2(rect) {
  const index = adjustedRects2.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRects2.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;
  blind2.value = true;
}
function showDialoga(rect) {
  const index = adjustedRectsa.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRectsa.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;
  blinda.value = true;
}
function showDialogb(rect) {
  const index = adjustedRectsb.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRectsb.value[index].isActive = true;
  }
  currentGlassId.value = rect.glassId;
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;
  blindb.value = true;
}
  const handleDialogClose1 = () => {
  adjustedRects1.value.forEach(rect => {
    rect.isActive = false;
  });
  blind1.value = false;
};
  const handleDialogClose2 = () => {
  adjustedRects2.value.forEach(rect => {
    rect.isActive = false;
  });
  blind2.value = false;
};
  const handleDialogClosea = () => {
  adjustedRectsa.value.forEach(rect => {
    rect.isActive = false;
  });
  blinda.value = false;
};
  const handleDialogCloseb = () => {
  adjustedRectsb.value.forEach(rect => {
    rect.isActive = false;
  });
  blindb.value = false;
};
// 破损
const handleDamage = async () => {
const handleDamage1 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 2,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blind.value = false;
      updateRectColors();
      blind1.value = false;
      updateRectColors1();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
@@ -253,6 +435,75 @@
    console.error(error);
  }
}
const handleDamage2 = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blind2.value = false;
      updateRectColors2();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleDamagea = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blinda.value = false;
      updateRectColorsa();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleDamageb = async () => {
  try  {
  const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
    glassId: currentGlassId.value,
    // temperingFeedSequence: currenttemperingFeedSequence.value,
    line: 4001,
    status: 8,
    workingProcedure: '钢化',
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      blindb.value = false;
      updateRectColorsb();
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    // console.error(error);
  }
}
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
@@ -260,9 +511,10 @@
</script>
<template>
  <div style="margin-top: 10px;">
     <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >{{ $t('processCard.beforefurnace') }}</el-button>
     <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">{{ $t('processCard.intofurnace') }}</el-button>
    <el-button  id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.outfurnace') }}</el-button>
     <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;dialogFormVisiblec = false;" >{{ $t('processCard.beforefurnace') }}</el-button>
     <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;dialogFormVisiblec = false;">{{ $t('processCard.intofurnace') }}</el-button>
    <el-button  id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false;dialogFormVisiblec = false;">{{ $t('processCard.outfurnace') }}</el-button>
    <el-button  id="searchButton" type="info" @click="dialogFormVisiblec = true;dialogFormVisibleb = false;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.print') }}</el-button>
<div v-if="dialogFormVisible" >
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
<div style="width: 49%;float: left;background-color: #f4f4f5;height: 550px;">
@@ -274,19 +526,19 @@
      <div  
      v-for="(rect, index) in adjustedRects1"
      :key="index"  
      @click="showDialog(rect)"
      @click="showDialog1(rect)"
      class="rect"
      :style="{ position: 'absolute', 
       top: `${rect.ycoordinate}px`, 
       left: `${rect.xcoordinate}px`,
        width: `${rect.width}px`, 
        height: `${rect.height}px`,
        backgroundColor: 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>
@@ -302,19 +554,19 @@
      <div  
      v-for="(rect, index) in adjustedRects2"
      :key="index"
      @click="showDialog(rect)"
      @click="showDialog2(rect)"
      class="rect"
      :style="{ position: 'absolute', 
       top: `${rect.ycoordinate}px`, 
       left: `${rect.xcoordinate}px`, 
       width: `${rect.width}px`, 
       height: `${rect.height}px`,
       backgroundColor: 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>
@@ -334,15 +586,15 @@
      <div  
      v-for="(rect, index) in adjustedRectsa"  
      :key="index"  
      @click="showDialog(rect)"
      @click="showDialoga(rect)"
      class="rect"  
      :style="{ position: 'absolute',  top: `${rect.y}px`, left: `${rect.x}px`,
       width: `${rect.width}px`, height: `${rect.height}px`,
      backgroundColor: getRectColora(rect.state) }">
      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>
@@ -361,16 +613,16 @@
      <div  
      v-for="(rect, index) in adjustedRectsb"  
      :key="index"  
      @click="showDialog(rect)"
      @click="showDialogb(rect)"
      class="rect"  
      :style="{ position: 'absolute',  top: `${rect.y}px`, left: `${rect.x}px`,
       width: `${rect.width}px`, height: `${rect.height}px`,
      backgroundColor: getRectColorb(rect.state) }">
      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>
@@ -378,12 +630,75 @@
   </div>
   </el-card>
</div>
<div v-if="dialogFormVisiblec">
  <!-- 打印 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
    <div style="display: flex; flex-direction: row; align-items: center; margin-top: 5px;margin-left: 10px;">
    <el-input :placeholder="$t('processCard.projectnumber')" v-model="engineerId" autocomplete="off" style="width: 300px;"/>
    <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-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
        <el-button type="warning" plain :icon="Delete" @click="handleDamage"  style="width: 140px;margin-left: 10px;">
    <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
    height="350"
     ref="table"
     :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
      :data="tableData"
    >
      <el-table-column prop="engineerId" :label="$t('processCard.project')" width="200" align="center"/>
      <el-table-column prop="workingProcedure" :label="$t('processCard.awayprocess')" align="center"/>
      <el-table-column prop="deviceName" :label="$t('processCard.awayequipment')" align="center"/>
      <el-table-column prop="teamsGroupsName" :label="$t('processCard.awayteam')" align="center"/>
    </el-table>
      </div>
      </el-card>
   </el-card>
</div>
<el-dialog v-model="blind1" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose1">
        <el-button type="warning" plain :icon="Delete" @click="handleDamage1"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
  </el-dialog>
<el-dialog v-model="blind2" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose2">
        <el-button type="warning" plain :icon="Delete" @click="handleDamage2"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
  </el-dialog>
<el-dialog v-model="blinda" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClosea">
        <el-button type="warning" plain :icon="Delete" @click="handleDamagea"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
  </el-dialog>
<el-dialog v-model="blindb" top="30vh" width="15%" style="text-align: center;" @close="handleDialogCloseb">
        <el-button type="warning" plain :icon="Delete" @click="handleDamageb"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
  </el-dialog> 
  <el-dialog
      v-model="dialogVisible"
      width="100%"
      top="0vh"
      :show-close="false"
      >
      <div class="custom-title" style="text-align: center; margin-bottom: 20px;">
      {{ $t('processCard.glasstakeout') }}
    </div>
      <el-table
        :data="tableData"
        style="width: 100%;height: 760px"
      >
      <el-table-column prop="flowCardId" :label="$t('processCard.flowcard')" width="140" align="center"/>
      <el-table-column prop="layer" :label="$t('processCard.layer')" align="center" width="52"/>
      <el-table-column prop="engineerId" :label="$t('processCard.project')" align="center" width="110"/>
      <el-table-column prop="temperingLayoutId" :label="$t('processCard.temperinglayout')" align="center" width="52"/>
      <el-table-column prop="temperingFeedSequence" :label="$t('processCard.temperingfeed')" align="center" width="52"/>
      <el-table-column prop="width" :label="$t('processCard.width')" align="center" width="80"/>
      <el-table-column prop="height" :label="$t('processCard.height')" align="center" width="80"/>
      <el-table-column prop="thickness" :label="$t('processCard.thickness')" align="center" width="52"/>
      </el-table>
    </el-dialog>
  </div>
</template>
<style scoped>
@@ -457,7 +772,6 @@
#rect {  
  position: relative; /* 确保箭头可以相对于矩形定位 */  
  /* 其他样式 */
}  
.centered-text {
  /* 设置文字居中样式 */  
@@ -467,4 +781,8 @@
  height: 100%; /* 确保div占据整个矩形的高度 */  
  /* font-size: small; */
.custom-title {
  font-size: 20px;
  font-weight: bold;
}
</style>
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -4,18 +4,18 @@
import {useRouter} from "vue-router"
import { ElMessage, ElMessageBox } from 'element-plus'
import request from "@/utils/request"
import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';  
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
const adjustedRects = ref([]);
const currentGlassId = ref(null);
const currenttemperingFeedSequence = ref(null);
const dialogFormVisible = ref(true)
const dialogFormVisiblea = ref(false)
const blind = ref(false)
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
@@ -31,14 +31,20 @@
}
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; 
      if (rect.width < rect.height) {
        widtha = rect.height;
        heighta = rect.width;
@@ -49,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, 
@@ -67,8 +67,20 @@
    height: adjustedHeight,  
    widtha: rect.width, 
    heighta: rect.height,
  };
});
  }
    });
    // 合并新旧矩形,并保留 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 = []
  }
};
function updateRectColors() {  
@@ -77,7 +89,7 @@
      rect.state = 8;
    }
  });  
}
}
function getRectColora(state) {  
  switch (state) { 
    case 3:  
@@ -88,11 +100,22 @@
      return '#911005';  
  }  
}
function showDialog(rect) {
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;
  });
  blind.value = false;
};
// 破损
const handleDamage = async () => {
  try  {
@@ -130,7 +153,7 @@
  closeWebSocket();
});
</script>
<template>
  <div style="margin-top: 10px;">
<div>
@@ -147,12 +170,12 @@
      class="rect"  
      :style="{ position: 'absolute',  top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
       width: `${rect.width}px`, height: `${rect.height}px`,
      backgroundColor: getRectColora(rect.state) }">
      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>
@@ -160,15 +183,15 @@
   </div>
    </el-card>
    </div>
    <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
    <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
        <el-button type="warning" plain :icon="Delete" @click="handleDamage"  style="width: 140px;margin-left: 10px;">
          {{ $t('order.dilapidation') }}
        </el-button>
  </el-dialog> 
  </div>
</template>
<style scoped>
#boxa{
  border: 1px solid rgb(119, 116, 116);
UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue
New file
@@ -0,0 +1,227 @@
<script setup>
import request from "@/utils/request"
import {ElDatePicker, ElMessage} from "element-plus"
import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
import {Search} from "@element-plus/icons-vue"
// import {useRouter} from 'vue-router'
// import {changeFilterEvent, filterChanged} from "@/hook"
// import {useI18n} from 'vue-i18n'
// import deepClone from "@/utils/deepClone";
import companyInfo from "@/lang/companyInfo"
const company = companyInfo()
//语言获取
const {t} = useI18n()
// let router = useRouter()
let produceList = ref([])
let labelList = ref([])
let titleList = ref([])
let dataList = ref([])
let list = ref([])
let lastList=ref([])
let filterData = ref({})
const data = ref({
  printList: []
})
// const {currentRoute} = useRouter()
// const route = currentRoute.value
// data.value.printList = JSON.parse(route.query.printList)
// const type = route.query.type
// const faceOrientation = route.query.faceOrientation
// const lableType = route.query.lableType
let props = defineProps({
  printFlowCardId: null,
  printLayer: null,
})
onMounted(async () => {
  console.log(props.printFlowCardId,props.printLayer)
  const response = await request.post('/unLoadGlass/downGlassInfo/downGlassLabelPrint',{
        flowCardId:props.printFlowCardId,
        layer:props.printLayer
    });
        if (response.code == 200) {
          console.log("lastList.value",response.data)
          lastList.value=response.data;
        } else {
          ElMessage.error(response.message);
        }
    }
)
// // 打印方法
// const printFlowCard = () => {
//   // 需要打印的局部区域赋予"print-wrap"的id
//   let el = document.getElementById("printFlowCard");
//   let doc = document;
//   let body = doc.body || doc.getElementsByTagName("body")[0];
//   let printId = "print-" + Date.now();
//   // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式)
//   let content = doc.createElement("div");
//   content.id = printId;
//   // 样式控制与打印无关的元素隐藏
//   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}}";
//   //
//   content.innerHTML = el.outerHTML;
//   // // console.log("el.outerHTML", el.outerHTML);
//   body.appendChild(style);
//   // 与style元素设置的样式相配合
//   // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式)
//   body.appendChild(content);
//   setTimeout(() => {
//     window.print();
//     body.removeChild(content);
//     body.removeChild(style);
//   }, 20);
// }
</script>
<template>
  <!-- <el-button id="printButton" @click="printFlowCard();">打印</el-button> -->
  <div id="printFlowCard" >
    <template v-for="(item,index) in lastList">
    <div id="entirety" >
      <div class="row1">
        <div style="position: absolute;font-weight: bold;margin-left: 5px;" v-if="item.tempering_layout_id!=null">{{ item.tempering_layout_id }}/{{ item.tempering_feed_sequence }}</div>
        <span>{{ item.customer_name }}</span>&nbsp;
        <span>{{ item.order_id }}</span>
        <span v-if="item.process.includes('夹胶')">胶片</span>
        <span v-else-if="item.process.includes('中空')">中空</span>
<span v-else-if="item.process.includes('百叶')">百叶</span>
<span v-else></span>
        <div style="position: absolute;font-weight: bold;margin-left: 210px;margin-top: -26px;" >{{ index+1 }}</div>
      </div>
      <div  class="row2">
        <span>{{ item.project }}</span>&nbsp;
        <span>{{ item.building_number }}</span>
      </div>
      <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div>
      <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div>
      <div class="row5">
        <span>{{item.glass_child }}</span>&nbsp;
        <span>{{ item.processing_note }}</span>
      </div>
    </div>
    <div style="width: 20px" v-if="index%2===0"></div>
    <div class="print-page" v-else></div>
    </template>
  </div>
</template>
<style scoped>
* {
  margin: 0;
  padding: 0;
}
#printButton {
  /*margin-top: -20px;*/
  width: 100px;
}
#printFlowCard {
  display: flex;
  justify-content: left;
  flex-wrap: wrap;
  width: 500px;
}
#entirety{
  text-align: center;
  width: 46%;
  height: 170px;
  border: black 1px;
  word-wrap: break-word;
  margin-left: 10px;
}
.row1 {
  font-size: 12pt;
  font-weight: bold;
  height: 35px;
}
.row1 span {
  font-size: 12pt;
}
.row2 {
  font-size: 14pt;
  font-weight: bold;
  height: 35px;
}
.row2 span {
  font-size: 12pt;
}
span {
  font-size: 12pt;
  font-weight: bold;
}
.row3 {
  margin-top: -5px;
  height: 35px;
  font-size: 22pt;
  font-weight: bolder;
  line-height: 35px;
}
.row5 {
  height: 50px;
  font-weight: bold;
  font-size: 12pt;
  /* margin-left: 20px; */
}
.row5 span {
  font-size: 12pt;
}
.row6 {
  height: 15px;
  font-weight: bold;
  font-size: 8pt;
}
@media print {
  .print-page {
    page-break-after: always; /* 添加分页符,在每个print-page div之后分页 */
  }
  div {
    page-break-inside: avoid;
  }
  @page {
    size: auto;  /* auto is the initial value */
    margin: 2mm 2mm 2mm 2mm;  /* this affects the margin in the printer settings */
  }
}
</style>
UI-Project/src/views/UnLoadGlass/PrintFlow.vue
@@ -47,6 +47,8 @@
  for (let i = 0; i < produceList.value.length; i++) {
    //数量
    let totalQuantity = 0;
    //落架数量
    let totalQuantity1 = 0;
    //面积
    let totalArea = 0;
    //重量
@@ -54,6 +56,7 @@
    // 对每个集合中的 detailList 进行计算
    produceList.value[i].detailList.forEach(collection => {
      totalQuantity += collection.quantity * 1;
      totalQuantity1 += collection.quantity1 * 1;
      //每个序号面积
      collection.total_area = parseFloat((collection.width * collection.height * collection.quantity / 1000000).toFixed(2))
      totalArea += collection.total_area * 1;
@@ -63,51 +66,13 @@
    });
    // 输出每个集合中的总数量
    produceList.value[i].detail[0].quantity = totalQuantity
    produceList.value[i].detail[0].quantity1 = totalQuantity
    produceList.value[i].detail[0].gross_area = totalArea
    produceList.value[i].detail[0].weight = totalWeight
  }
}
// const printFlowCard = () => {
//   // 需要打印的局部区域赋予"print-wrap"的id
//   let el = document.getElementById("printFlowCard");
//   let doc = document;
//   let body = doc.body || doc.getElementsByTagName("body")[0];
//   let printId = "print-" + Date.now();
//   // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式)
//   let content = doc.createElement("div");
//   content.id = printId;
//   // 样式控制与打印无关的元素隐藏
//   let style = doc.createElement("style");
//   style.innerHTML =
//       "body>#" +
//       printId +
//       "{display:none}@media print{" +
//       "@page {" +
//       "    size: auto; " +
//       "    margin: 5mm 5mm 5mm 5mm; " +
//       "  }body>:not(#" +
//       printId +
//       "){display:none !important}body>#" +
//       printId +
//       "{display:block;padding-top:1px}}";
//   //
//   content.innerHTML = el.outerHTML;
//   // // console.log("el.outerHTML", el.outerHTML);
//   body.appendChild(style);
//   // 与style元素设置的样式相配合
//   // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式)
//   body.appendChild(content);
//   setTimeout(() => {
//     window.print();
//     body.removeChild(content);
//     body.removeChild(style);
//   }, 20);
// }
onMounted(async () => {
  console.log(props.printFlowCardId,props.printLayer)
@@ -162,30 +127,20 @@
    <table v-for="(item,id) in produceList" id="contentTable" :key="id">
      <thead>
      <tr v-for="(itemFlow,index) in item.detail" :key="index">
        <td  v-if="like='1'"  colspan="26">
        <td  colspan="29">
          <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px  "/></div>
          <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div>
          <div>{{ company.companyName }}</div>
          <div>生产流程卡</div>
          <div v-if="itemFlow.technologyNumber!=''" style="text-align: right;font-weight: bolder">流程卡号: {{
          <div v-if="itemFlow.technologyNumberMerge!=''" style="text-align: right;font-weight: bolder">
            {{itemFlow.otherRemarks}}&nbsp;&nbsp;
            流程卡号: {{
              itemFlow.process_id
            }}/{{ itemFlow.technologyNumber }}
            }}/{{ itemFlow.technologyNumberMerge }} 共 {{ flowCardCount }} 架
          </div>
          <div v-else style="text-align: right;font-weight: bolder">流程卡号: {{
              itemFlow.process_id
            }}/{{ itemFlow.technologyNumber }}
          </div>
        </td>
        <td v-else colspan="24">
          <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px  "/></div>
          <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div>
          <div>{{ company.companyName }}</div>
          <div>生产流程卡</div>
          <div v-if="itemFlow.technologyNumber!=''" style="text-align: right;font-weight: bolder">流程卡号: {{
              itemFlow.process_id
            }}/{{ itemFlow.technologyNumber }} 共 {{ flowCardCount }} 架
          </div>
          <div v-else style="text-align: right;font-weight: bolder">流程卡号: {{
          <div v-else style="text-align: right;font-weight: bolder">
            {{itemFlow.otherRemarks}}&nbsp;&nbsp;
            流程卡号: {{
              itemFlow.process_id
            }}/{{ itemFlow.technologyNumber }} 共 {{ flowCardCount }} 架
          </div>
@@ -197,8 +152,7 @@
        <td class="tdNowrap">项目名称:</td>
        <td colspan="2">{{ items.project }}</td>
        <td class="tdNowrap">工艺流程:</td>
        <td colspan="19" v-if="like='1'" style="width: 500px">{{ items.process }}</td>
        <td colspan="17" v-else style="width: 500px">{{ items.process }}</td>
        <td colspan="22"  style="width: 500px">{{ items.process }}</td>
      </tr>
      <tr v-for="(itemTr,index) in item.detail" :key="index">
        <td class="tdNowrap">磨边类型:</td>
@@ -206,16 +160,15 @@
        <td class="tdNowrap">单片名称:</td>
        <td colspan="2">{{ itemTr.glass_child }}</td>
        <td class="tdNowrap">产品名称:</td>
        <td v-if="like=='1'" colspan="19">{{ itemTr.product_name }}</td>
        <td v-else colspan="17">{{ itemTr.product_name }}</td>
        <td colspan="22">{{ itemTr.product_name }}</td>
      </tr>
      <tr>
        <td rowspan='2'>序号</td>
        <td rowspan='2'>编号</td>
        <td v-if="like!=null" rowspan="2">小片顺序</td>
        <td v-else style="display: none;" rowspan="2">小片顺序</td>
        <td rowspan='2'>宽*高</td>
        <!-- <td rowspan='2'>编号</td> -->
        <td rowspan="2">小片顺序</td>
        <td rowspan='2' style="width: 90px">宽*高</td>
        <td rowspan='2'>数量</td>
        <td rowspan='2'>落架</td>
        <td rowspan='2'>面积</td>
        <td rowspan='2'>周长</td>
        <td rowspan='2'>半径</td>
@@ -240,23 +193,24 @@
        <td>{{ company.printLabel.printFlowCard.lackOf }}</td>
        <td>{{ company.printLabel.printFlowCard.patch }}</td>
        <td>{{ company.printLabel.printFlowCard.lackOf }}</td>
        <td>{{ company.printLabel.printFlowCard.patch }}</td>
        <td>{{ company.printLabel.printFlowCard.lackOf }}</td>
        <td>{{ company.printLabel.printFlowCard.patch }}</td>
        <td>{{ company.printLabel.printFlowCard.lackOf }}</td>
      </tr>
      </thead>
      <tbody>
      <tr v-for="(itemDatile,index) in item.detailList" :key="index">
        <td>{{ itemDatile.order_number }}</td>
        <td>{{ itemDatile.s01Value }}</td>
        <td v-if="like=='1'">{{ itemDatile.technology_number }}</td>
        <td v-else style="display: none"></td>
        <!-- <td>{{ itemDatile.s01Value }}</td> -->
        <td>{{ itemDatile.technology_number }}</td>
        <td>{{ itemDatile.child_width }}</td>
        <td class="item" style="width: 5%;height: 100%;">
          <!-- <el-input v-model="itemDatile.quantity" style="border: none" @keyup="handleSummary()"></el-input> -->
          {{ itemDatile.quantity }}
          <!-- <input v-model="itemDatile.quantity" style="width: 100%;height: 100%"  @keyup="handleSummary()"/> -->
        </td>
        <!-- <td class="item" style="width: 5%;height: 100%;">
          {{ itemDatile.quantity1 }}
        </td> -->
        <td>{{ itemDatile.quantity1 }}</td>
        <td>{{ itemDatile.total_area }}</td>
        <td>{{ itemDatile.perimeter }}</td>
        <td>{{ itemDatile.bend_radius }}</td>
@@ -277,13 +231,19 @@
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      </tbody>
      <tfoot>
      <tr style="height: 14px">
        <td v-for="(itemsum,index) in item.detail" :key="index" colspan="26">
        <td v-for="(itemsum,index) in item.detail" :key="index" colspan="29">
          数量:
          <label>{{ itemsum.quantity }}</label>
          落加数量:
          <label>{{ itemsum.quantity1 }}</label>
          面积:
          <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label>
          重量:
@@ -291,17 +251,12 @@
        </td>
      </tr>
      <tr v-for="(itemtextarea,index) in item.detail" :key="index">
        <td v-if="like='1'" colspan="4" rowspan="6" style="width: 480px;height: 100px ">
          <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{itemtextarea.otherRemarks}}</textarea>
          </div>
        </td>
        <td v-else colspan="6" rowspan="2" style="width: 480px;height: 100px ">
          <!--          <div style="width: 100%;height: 100%"><textarea style="height: 99%;width: 99%;font-size: 11px">{{ itemtextarea.processing_note }}</textarea>-->
          <!--          </div>-->
           <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{itemtextarea.otherRemarks}}</textarea>
           </div>
        </td>
        <td colspan="2">完工签名</td>
        <td>完工签名</td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
@@ -314,7 +269,11 @@
        <td colspan="2"></td>
      </tr>
      <tr>
        <td colspan="2">生产日期</td>
        <td>生产日期</td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
@@ -327,7 +286,9 @@
        <td colspan="2"></td>
      </tr>
      <tr>
        <td colspan="2">质检签名</td>
        <td>质检签名</td>
        <td colspan="2"></td>
        <td colspan="2">生产签名</td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
@@ -338,9 +299,15 @@
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
        <td colspan="2"></td>
      </tr>
      <tr>
        <td>原片箱号</td>
        <td colspan="28"></td>
      </tr>
      <tr v-for="(qrCodeItem,index) in item.detail" :key="index">
        <td colspan="23">
        <td colspan="29">
          <span style="display: flex;">
            <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%">
            <div class='qrCode' style="width: 80px;height: 80px;">
@@ -353,6 +320,12 @@
          </span>
        </td>
      </tr>
      <tr v-for="(itemtextareas,index) in item.detail" :key="index">
        <td  colspan="29" rowspan="6" style="width: 480px;height: 150px ">
          <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px;overflow: hidden;">{{itemtextareas.processing_note}}</textarea>
          </div>
        </td>
      </tr>
      </tfoot>
    </table>
@@ -368,8 +341,7 @@
#printFlowCard {
  text-align: center;
font-weight: bolder;
 height: 600px;
//font-weight: bolder; height: 600px;
}
#contentTable {
@@ -395,12 +367,10 @@
}
#contentTable tbody {
  white-space: nowrap;
}
.tdNowrap {
  white-space: nowrap;
}
@@ -410,17 +380,20 @@
}
input{
  font-weight: bolder;
  border: none;
  background: none;
}
@page {
  size: auto;  /* auto is the initial value */
  margin: 10mm 2mm 10mm 1mm;  /* this affects the margin in the printer settings */
}
@media print {
  @page {
    size: auto;
    margin: 4mm 5mm 5mm 5mm
  }
  table {
    page-break-before: always;
    page-break-inside: auto;
@@ -441,4 +414,6 @@
  height: 100%;
}
</style>
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -9,6 +9,7 @@
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()
@@ -36,10 +37,12 @@
const selectValuesa = reactive({});
const selectOptionsa = ref([]);
const dialogTableVisible = ref(false)
const dialogTableVisible1 = ref(false)
const printFlowCardId = ref('')
const printLayer = ref('')
const now = new Date();
const timeRange = ref([])
const browser=ref(false)
const handleChange = async () => {
  console.log("触发开关")
@@ -62,7 +65,15 @@
    console.error(error);
  }
}
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
}
}
const handleInputChangea = (value, rowId) => {
  // 更新对应行的 select 值
@@ -107,7 +118,6 @@
      flowCardId: firstPart,
      layer: twoPart
    });
    console.log(response)
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      console.log('绑定成功');
@@ -191,7 +201,7 @@
  // 更新 tableData 的数据
  if (data.downGlassInfos != null) {
    downGlass.value = data.downGlassInfos[0][1];
    downGlass.value = data.downGlassInfos[0];
  }
  if (data.engineerIdList != null) {
    selectOptionsa.value = data.engineerIdList[0]
@@ -200,8 +210,8 @@
    autoPrint.value = data.autoPrint[0];
  }
  if (fullFlowCard.value == ""&&autoPrint.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) {
@@ -223,6 +233,7 @@
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  confirmBrowser();//获取浏览器
  fetchFlowCardId();
  fetchTableData(); // 获取数据
  socket = initializeWebSocket(socketUrl, handleMessage);
@@ -293,16 +304,69 @@
  printLayer.value = row.layer
  dialogTableVisible.value = true;
  setTimeout(() => {
    printFlowCard(); // 替换成你要执行的函数名
    printFlowCard();
    dialogTableVisible.value = false;
  }, 1000);
  ;
  }, 2000);
}
const open1 = async (row) => {
printFlowCardId.value = row.flowCardId;
printLayer.value = row.layer
dialogTableVisible1.value = true;
setTimeout(() => {
  printFlowCard1();
  //dialogTableVisible1.value = false;
}, 1000);
}
const printFlowCard = () => {
  // 需要打印的局部区域赋予"print-wrap"的id
  let el = document.getElementById("child");
  let doc = document;
  let body = doc.body || doc.getElementsByTagName("body")[0];
  let printId = "print-" + Date.now();
  // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式)
  let content = doc.createElement("div");
  content.id = printId;
  // alert(/Chrome/.test(userAgent) && !/Edge/.test(userAgent));
  // 样式控制与打印无关的元素隐藏
  let style = doc.createElement("style");
  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;}} ";
  content.innerHTML = el.outerHTML;
  // // console.log("el.outerHTML", el.outerHTML);
  body.appendChild(style);
  // 与style元素设置的样式相配合
  // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式)
  body.appendChild(content);
  setTimeout(() => {
    window.print();
    body.removeChild(content);
    body.removeChild(style);
  }, 20);
}
const printFlowCard1 = () => {
  // 需要打印的局部区域赋予"print-wrap"的id
  let el = document.getElementById("printFlowCard");
  let doc = document;
  let body = doc.body || doc.getElementsByTagName("body")[0];
  let printId = "print-" + Date.now();
@@ -319,7 +383,7 @@
      "{display:none}@media print{" +
      "@page {" +
      "    size: auto; " +
      "    margin: 10mm 2mm 10mm 1mm; " +
      "    margin: 2mm 2mm 2mm 2mm;  " +
      "  }body>:not(#" +
      printId +
      "){display:none !important}body>#" +
@@ -341,6 +405,8 @@
}
// beforeUnmount(() => {
//   closeWebSocket();
// });
@@ -356,7 +422,7 @@
    <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="200px" ref="table" @selection-change="handleSelectionChange" :data="tableData"
          <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"/>
            <el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')"
@@ -376,14 +442,15 @@
                </el-tag>
              </template>
            </el-table-column>
            <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="200">
            <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') }}
                </el-button>
                <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear')
                  }}</el-button>
                <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">打印</el-button>
                <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">打印流程卡</el-button>
                <el-button @click="open1(scope.row)" :disabled="scope.row.flowCardId == null">打印标签</el-button>
              </template>
            </el-table-column>
@@ -401,9 +468,6 @@
            <el-option label="5" value="5"></el-option>
            <el-option label="6" value="6"></el-option>
            <el-option label="7" value="7"></el-option>
            <el-option label="8" value="8"></el-option>
            <el-option label="9" value="9"></el-option>
            <el-option label="10" value="10"></el-option>
          </el-select>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable
@@ -492,13 +556,14 @@
    </template>
  </el-dialog>
  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close style="width: 75%;height:75% ">
    <!-- <template #header="{ close, titleId, titleClass }">
        <el-button  @click="printFlowCard" >打印</el-button>
      </template> -->
  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close >
    <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
                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>
</template>
<style scoped>
UI-Project/src/views/User/rolelist.vue
@@ -262,7 +262,7 @@
     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  size="mini" id="searchButton" @click="add = true">{{ $t('delivery.addrole') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="240" ref="table"
        <el-table height="500" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="name" align="center" :label="$t('delivery.role')" min-width="180" />
UI-Project/src/views/User/userlist.vue
@@ -216,7 +216,7 @@
     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  size="mini" id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="240" ref="table"
        <el-table height="500" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="userName" align="center" :label="$t('productStock.username')" min-width="180" />
UI-Project/src/views/largescreen/largescreen.vue
@@ -1,6 +1,6 @@
<template>  
  <el-card style="flex: 1;margin-left: 1px;margin-top: 10px;margin-right: 1px;" v-loading="loading">
    <el-scrollbar height="600px">
    <el-scrollbar height="800px">
<div id="top" style="height: 150px;display: flex;">  
  <div class="echarts-container">
  <div v-for="(processData, index) in processesData" :key="index" class="echarts-item">
@@ -46,32 +46,9 @@
  <div  class="moving-rect xiapianji5" v-show="xiapian5"></div>
  <div  class="moving-rect xiapianji6" v-show="xiapian6"></div>
</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 vertical"></div>
    <div class="moving-rect all"></div>
    <div class="moving-rect horizontal"></div>
    <div class="moving-rect xiao"></div>
    <div class="moving-rect zhan"></div>
    <div class="moving-rect tu"></div>
    <div class="moving-rect zi"></div>
    <div class="moving-rect xia"></div>
    <div class="moving-rect zan"></div>
    <div class="moving-rect fa"></div>
    <div class="moving-rect hua"></div>
    <div class="moving-rect shui"></div>
</div> -->
<!-- <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;">
  <el-table height="240" ref="table" width="340px"
      @selection-change="handleSelectionChange"
      :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column prop="projectNo" align="center" :label="$t('large.projectnumber')" min-width="50" />
        <el-table-column prop="projectName" align="center" :label="$t('large.projectname')" min-width="50" />
      </el-table>
</div>  -->
</div>
<div id="bottom" style="margin-top: 10px;height: 190px;background-color: #911005;">
<el-table height="190" ref="table"
<div id="bottom" style="margin-top: 10px;height: 190px;">
<el-table height="390" 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" />
@@ -288,8 +265,9 @@
const socketUrl6 = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unLoadGlassIsRun`;
const handleMessage6 = (data) => {
  const tasks = data.downWorkstation[0];  
  if (tasks && tasks.length >= 6) {
    xiapian.value = tasks.some(task => task.racksNumber!== 0);
  const tasks1 = data.downGlassTask[0];
    xiapian.value = tasks1.some(task => task.thickness!== '');
    if (tasks && tasks.length >= 6) {
    xiapian1.value = tasks[0].racksNumber !== 0;
    xiapian2.value = tasks[1].racksNumber !== 0;
    xiapian3.value = tasks[2].racksNumber !== 0;
hangzhoumesParent/JsonFile/PlcTemperingGlass.json
New file
@@ -0,0 +1,132 @@
{
    "plcAddressBegin": "DB88.0",
    "plcAddressLenght": "58",
    "dataType": "word",
    "parameteInfor": [
        {
            "codeId": "confirmationWord",
            "addressIndex": "0",
            "addressLenght": "2"
        },
        {
            "codeId": "temperingLayoutId",
            "addressIndex": "2",
            "addressLenght": "2"
        },
        {
            "codeId": "filmsid",
            "addressIndex": "4",
            "addressLenght": "2"
        },
        {
            "codeId": "temperingType",
            "addressIndex": "6",
            "addressLenght": "2"
        },
        {
            "codeId": "thickness",
            "addressIndex": "8",
            "addressLenght": "2"
        },
        {
            "codeId": "loadingRate",
            "addressIndex": "10",
            "addressLenght": "2"
        },
        {
            "codeId": "areaDifference",
            "addressIndex": "12",
            "addressLenght": "2"
        },
        {
            "codeId": "state",
            "addressIndex": "22",
            "addressLenght": "2"
        },
        {
            "codeId": "deviceState",
            "addressIndex": "24",
            "addressLenght": "2"
        },
        {
            "codeId": "resultState",
            "addressIndex": "26",
            "addressLenght": "2"
        },
        {
            "codeId": "loadSpeed",
            "addressIndex": "28",
            "addressLenght": "2"
        },
        {
            "codeId": "downSpeed",
            "addressIndex": "30",
            "addressLenght": "2"
        },
        {
            "codeId": "load1",
            "addressIndex": "32",
            "addressLenght": "2"
        },
        {
            "codeId": "heat1",
            "addressIndex": "34",
            "addressLenght": "2"
        },
        {
            "codeId": "heat2",
            "addressIndex": "36",
            "addressLenght": "2"
        },
        {
            "codeId": "cool1",
            "addressIndex": "38",
            "addressLenght": "2"
        },
        {
            "codeId": "cool2",
            "addressIndex": "40",
            "addressLenght": "2"
        },
        {
            "codeId": "downId",
            "addressIndex": "42",
            "addressLenght": "2"
        },
        {
            "codeId": "productionTime",
            "addressIndex": "44",
            "addressLenght": "2"
        },
        {
            "codeId": "heatEnergy",
            "addressIndex": "46",
            "addressLenght": "2"
        },
        {
            "codeId": "coolEnergy",
            "addressIndex": "48",
            "addressLenght": "2"
        },
        {
            "codeId": "temperatureUp1",
            "addressIndex": "50",
            "addressLenght": "2"
        },
        {
            "codeId": "temperatureDown1",
            "addressIndex": "52",
            "addressLenght": "2"
        },
        {
            "codeId": "temperatureUp2",
            "addressIndex": "54",
            "addressLenght": "2"
        },
        {
            "codeId": "temperatureDown2",
            "addressIndex": "56",
            "addressLenght": "2"
        }
    ]
}
hangzhoumesParent/JsonFile/PlcdownGlass.json
New file
@@ -0,0 +1,149 @@
{
    "plcAddressBegin": "DB11.0",
    "plcAddressLenght": "94",
    "dataType": "word",
    "parameteInfor": [
        {
            "codeId": "requestWord",
            "addressIndex": "0",
            "addressLenght": "2"
        },
        {
            "codeId": "requestID",
            "addressIndex": "2",
            "addressLenght": "30"
        },
        {
            "codeId": "currentCell",
            "addressIndex": "32",
            "addressLenght": "2"
        },
        {
            "codeId": "glassStatus08",
            "addressIndex": "36",
            "addressLenght": "2"
        },
        {
            "codeId": "glassStatus06",
            "addressIndex": "40",
            "addressLenght": "2"
        },
        {
            "codeId": "glassStatus11",
            "addressIndex": "42",
            "addressLenght": "2"
        },
        {
            "codeId": "glassStatus13",
            "addressIndex": "44",
            "addressLenght": "2"
        },
        {
            "codeId": "G04_error_status",
            "addressIndex": "48",
            "addressLenght": "2"
        },
        {
            "codeId": "G05_error_status",
            "addressIndex": "50",
            "addressLenght": "2"
        },
        {
            "codeId": "G06_error_status",
            "addressIndex": "52",
            "addressLenght": "2"
        },
        {
            "codeId": "robot_error_status",
            "addressIndex": "54",
            "addressLenght": "2"
        },
        {
            "codeId": "G08_error_status",
            "addressIndex": "56",
            "addressLenght": "2"
        },
        {
            "codeId": "G09_error_status",
            "addressIndex": "58",
            "addressLenght": "2"
        },
        {
            "codeId": "G10_error_status",
            "addressIndex": "60",
            "addressLenght": "2"
        },
        {
            "codeId": "G11_error_status",
            "addressIndex": "62",
            "addressLenght": "2"
        },
        {
            "codeId": "robot_error_status",
            "addressIndex": "64",
            "addressLenght": "2"
        },
        {
            "codeId": "G13_error_status",
            "addressIndex": "66",
            "addressLenght": "2"
        },
        {
            "codeId": "confirmationWord",
            "addressIndex": "72",
            "addressLenght": "2"
        },
        {
            "codeId": "G06_prohibit_film_production",
            "addressIndex": "74",
            "addressLenght": "2"
        },
        {
            "codeId": "G11_prohibit_film_production",
            "addressIndex": "76",
            "addressLenght": "2"
        },
        {
            "codeId": "G13_prohibit_film_production",
            "addressIndex": "78",
            "addressLenght": "2"
        },
        {
            "codeId": "Glass_width",
            "addressIndex": "80",
            "addressLenght": "2"
        },
        {
            "codeId": "Glass_height",
            "addressIndex": "82",
            "addressLenght": "2"
        },
        {
            "codeId": "Glass_thickness",
            "addressIndex": "84",
            "addressLenght": "2"
        },
        {
            "codeId": "Start_cell",
            "addressIndex": "86",
            "addressLenght": "2"
        },
        {
            "codeId": "End_cell",
            "addressIndex": "88",
            "addressLenght": "2"
        },
        {
            "codeId": "task_type",
            "addressIndex": "90",
            "addressLenght": "2"
        },
        {
            "codeId": "alarm_signal",
            "addressIndex": "92",
            "addressLenght": "2"
        }
    ]
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
@@ -41,8 +41,8 @@
     * 人工下片102
     * 出片中103
     * 调度中104
     * 拿走200
     * 破损201
     * 破损8
     * 拿走9
     */
    public static final Integer GLASS_STATE_NEW = 0;
    public static final Integer GLASS_STATE_IN = 100;
@@ -50,8 +50,9 @@
    public static final Integer GLASS_STATE_ARTIFICIAL = 102;
    public static final Integer GLASS_STATE_OUT_ING = 103;
    public static final Integer GLASS_STATE_SCHEDULE_ING = 104;
    public static final Integer GLASS_STATE_TAKE = 200;
    public static final Integer GLASS_STATE_DAMAGE = 201;
    public static final Integer GLASS_STATE_DAMAGE = 8;
    public static final Integer GLASS_STATE_TAKE = 9;
    public static final List<Integer> GLASS_STATE_DAMAGE_TAKE = Arrays.asList(8, 9);
    public static final List<Integer> GLASS_STATE_IN_ALL = Arrays.asList(100, 102, 103, 104);
    public static final List<Integer> GLASS_STATE_IN_ALL_ZERO = Arrays.asList(0, 100, 102, 103, 104);
@@ -98,29 +99,29 @@
     * 2 卧转立进片完成
     * 3 大车进片完成
     * 4 大理片笼进片完成
     * 5 大理片笼进片失败
     * 6 大理片笼进片破损
     * 8 大理片笼进片破损
     * 9 大理片笼进片拿走
     */
    public static final Integer BIG_STORAGE_IN_NEW = 1;
    public static final Integer BIG_STORAGE_IN_UP = 2;
    public static final Integer BIG_STORAGE_IN_CAR = 3;
    public static final Integer BIG_STORAGE_IN_SLOT = 4;
    public static final Integer BIG_STORAGE_IN_ERROR = 5;
    public static final Integer BIG_STORAGE_IN_DAMAGE = 6;
    //    public static final Integer BIG_STORAGE_IN_DAMAGE = 8;
//    public static final Integer BIG_STORAGE_IN_ERROR = 9;
    public static final List<Integer> BIG_STORAGE_IN_UP_ALL = Arrays.asList(1, 2);
    /**
     * 卧转立出片请求
     * 1 任务生成
     * 2 玻璃进大车完成
     * 3 大车出片完成
     * 4 大理片笼进片失败
     * 5 大理片笼进片破损
     * 8 大理片笼进片破损
     * 9 大理片笼进片拿走
     */
    public static final Integer BIG_STORAGE_OUT_NEW = 1;
    public static final Integer BIG_STORAGE_OUT_CAR = 2;
    public static final Integer BIG_STORAGE_OUT_SUCCESS = 3;
    public static final Integer BIG_STORAGE_OUT_ERROR = 4;
    public static final Integer BIG_STORAGE_OUT_DAMAGE = 5;
    //    public static final Integer BIG_STORAGE_OUT_DAMAGE = 8;
//    public static final Integer BIG_STORAGE_OUT_ERROR = 9;
    public static final List<Integer> BIG_STORAGE_OUT_ALL = Arrays.asList(2, 3);
    /**
@@ -139,8 +140,8 @@
     * 2  进炉完成
     * 3  钢化完成
     * 4  出片完成
     * 5  破损
     * 6  拿走
     * 8  破损
     * 9  拿走
     */
    public static final Integer TEMPERING_NEW = -1;
@@ -149,8 +150,8 @@
    public static final Integer TEMPERING_START = 2;
    public static final Integer TEMPERING_SUCCESS = 3;
    public static final Integer TEMPERING_END = 4;
    public static final Integer TEMPERING_DAMAGE = 5;
    public static final Integer TEMPERING_TAKE = 6;
//    public static final Integer TEMPERING_DAMAGE = 8;
//    public static final Integer TEMPERING_TAKE = 9;
    /**
     * 下片
@@ -161,6 +162,7 @@
    public static final List<Integer> G06_WORK_STATION = Arrays.asList(1, 2, 3);
    public static final List<Integer> G11_WORK_STATION = Arrays.asList(4, 5, 6);
    public static final int G13_WORK_STATION = 7;
    public static final List<Integer> WORK_STATION_ALL = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
    /**
     * 启用 1
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
@@ -3,6 +3,7 @@
import cn.hutool.core.date.DateTime;
import com.mes.damage.entity.Damage;
import com.mes.damage.entity.DamagePrint;
import com.mes.damage.service.DamageService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
@@ -62,6 +63,18 @@
        damageService.insertDamage(damage);
        return Result.build(200,"新增成功",1);
    }
    @ApiOperation("拿走数据查询")
    @PostMapping("/selectDamagePrint")
    public Result selectDamagePrint(@RequestBody Damage damage) {
        List<Damage> damage2=damageService.selectDamagePrint(damage);
        return Result.build(200,"查询成功",damage2);
    }
    @ApiOperation("拿走打印查询")
    @PostMapping("/selectDamagePrintDetails")
    public Result selectDamagePrintDetails(@RequestBody Damage damage) {
        List<DamagePrint> damage2=damageService.selectDamagePrintDetails(damage);
        return Result.build(200,"查询成功",damage2);
    }
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/entity/DamagePrint.java
New file
@@ -0,0 +1,69 @@
package com.mes.damage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.sql.Timestamp;
/**
 * <p>
 *
 * </p>
 *
 * @author wu
 * @since 2024-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class DamagePrint implements Serializable {
    /**
     * 流程卡
     */
    private String flowCardId;
    /**
     * 工程号
     */
    private String engineerId;
    /**
     * 层号
     */
    private String layer;
    /**
     * 版图id
     */
    private String temperingLayoutId;
    /**
     * 片序
     */
    private String temperingFeedSequence;
    /**
     * 玻璃id
     */
    private String glassId;
    /**
     * 宽度
     */
    private double width;
    /**
     * 高度
     */
    private double height;
    /**
     * 厚度
     */
    private Integer thickness;
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
@@ -1,12 +1,12 @@
package com.mes.damage.service;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.yulichang.base.MPJBaseService;
import com.mes.damage.entity.Damage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mes.damage.entity.DamagePrint;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * <p>
@@ -22,5 +22,21 @@
    void submitDamage(List<Damage> damageList);
    /**
     * 单个破损
     *
     * @param damage
     */
    void insertDamage(Damage damage);
    /**
     * 批量破损
     *
     * @param damageList
     */
    void batchInsertDamage(List<Damage> damageList);
    List<Damage> selectDamagePrint(Damage damage);
    List<DamagePrint> selectDamagePrintDetails(Damage damage);
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
@@ -1,26 +1,29 @@
package com.mes.damage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.query.MPJQueryWrapper;
import com.mes.damage.entity.Damage;
import com.mes.damage.entity.DamagePrint;
import com.mes.damage.mapper.DamageMapper;
import com.mes.damage.service.DamageService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.mapper.GlassInfoMapper;
import com.mes.pp.entity.ReportingWork;
import com.mes.work_assignment.entity.WorkAssignment;
import com.mes.work_assignment.mapper.WorkAssignmentMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
/**
@@ -38,6 +41,8 @@
    GlassInfoMapper glassInfoMapper;
    @Resource
    WorkAssignmentMapper workAssignmentMapper;
    @Autowired
    private DamageMapper damageMapper;
    /**
     * 查询报工信息
@@ -111,7 +116,58 @@
        damage.setOrderNumber(glassInfo.getGlassType());
        damage.setTechnologyNumber(glassInfo.getLayer());
        damage.setDamageTime(Timestamp.valueOf(LocalDateTime.now()));
        damage.setType(2);
        baseMapper.insert(damage);
    }
    /**
     * 添加报工信息
     */
    @Override
    public void batchInsertDamage(List<Damage> damageList) {
        WorkAssignment workAssignment = workAssignmentMapper.selectOne(new LambdaQueryWrapper<WorkAssignment>()
                .eq(WorkAssignment::getLine, damageList.get(0).getLine())
                .eq(WorkAssignment::getWorkProcesses, damageList.get(0).getWorkingProcedure()));
        List<String> glassList = damageList.stream().map(Damage::getGlassId).collect(Collectors.toList());
        List<GlassInfo> glassInfoList = glassInfoMapper.selectList(new LambdaQueryWrapper<GlassInfo>().in(GlassInfo::getGlassId, glassList));
        Map<String, List<GlassInfo>> listMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getGlassId));
        for (Damage damage : damageList) {
            GlassInfo glassInfo = listMap.get(damage.getGlassId()).get(0);
            BeanUtils.copyProperties(glassInfo, damage);
            if (workAssignment != null) {
                damage.setTeamsGroupsName(workAssignment.getTeamsGroupsName());
                damage.setDeviceName(workAssignment.getDeviceName());
            }
            damage.setProcessId(glassInfo.getFlowCardId());
            damage.setOrderNumber(glassInfo.getGlassType());
            damage.setTechnologyNumber(glassInfo.getLayer());
            damage.setDamageTime(Timestamp.valueOf(LocalDateTime.now()));
        }
        this.saveBatch(damageList);
    }
    @Override
    public List<Damage> selectDamagePrint(Damage damage) {
        QueryWrapper<Damage> wrapper = new QueryWrapper<>();
        wrapper.select("working_procedure,engineer_id,teams_groups_name,device_name,count(glass_id)as glass_id")
                .eq("type",damage.getType())
                .eq("working_procedure",damage.getWorkingProcedure())
                .groupBy("working_procedure,engineer_id,teams_groups_name,device_name");
                  if (damage.getEngineerId() != null) {
                      wrapper.eq("engineer_id", damage.getEngineerId());
                  }
        return this.list(wrapper);
    }
    @Override
    public List<DamagePrint> selectDamagePrintDetails(Damage 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())
        );
        return listDamage;
    }
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/controller/FlowCardController.java
New file
@@ -0,0 +1,21 @@
package com.mes.pp.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wu
 * @since 2024-08-07
 */
@RestController
@RequestMapping("/flow_card/flow-card")
public class FlowCardController {
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/FlowCard.java
New file
@@ -0,0 +1,163 @@
package com.mes.pp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * <p>
 *
 * </p>
 *
 * @author wu
 * @since 2024-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class FlowCard implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * (工程号,2024.0302天机)
     */
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 销售单号
     */
    private String orderId;
    /**
     * 生产订单号
     */
    private String productionId;
    /**
     * 流程卡号
     */
    private String processId;
    /**
     * 落架顺序
     */
    private String landingSequence;
    /**
     * 序号
     */
    private Integer orderNumber;
    /**
     * 工艺确认序号
     */
    private Integer technologyNumber;
    /**
     * 分架数量
     */
    private Integer quantity;
    /**
     * 以优化数量
     */
    private Integer optimizeQuantity;
    /**
     * 排版状态(默认0,1允许排版2优化占用)
     */
    private Integer layoutStatus;
    /**
     * 补片数量
     */
    private Integer numberPatches;
    /**
     * 最后工序报工 库存数量
     */
    private Integer inventoryQuantity;
    /**
     * 已入数量
     */
    private Integer receivedQuantity;
    /**
     * 补片编号
     */
    private String patchId;
    /**
     * 工程占用状态,0为占用1占用
     */
    private Integer engineeringOccupancy;
    /**
     * 工程号(2024.0302添加)
     */
    private String projectNo;
    /**
     * 包装前工序报工 库存数量
     */
    private Integer inventoryNumber;
    /**
     * 入库时间
     */
    private LocalDateTime storageTime;
    /**
     * 生产终止状态(默认0,1生产终止)
     */
    private Integer terminationStatus;
    /**
     * 打印状态
     */
    private Integer printStatus;
    /**
     * 备用键
     */
    private Integer alternateKey;
    /**
     * 分架员
     */
    private String founder;
    /**
     * 分架时间
     */
    @TableField("splitFrame_time")
    private LocalDateTime splitframeTime;
    /**
     * 层数
     */
    private Integer layersNumber;
    /**
     * 流程卡打印排序
     */
    private Integer sort;
    /**
     * 建立时间
     */
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/mapper/FlowCardMapper.java
New file
@@ -0,0 +1,27 @@
package com.mes.pp.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.pp.entity.FlowCard;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import feign.Param;
import java.util.List;
import java.util.Map;
/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wu
 * @since 2024-08-07
 */
@DS("pp")
public interface FlowCardMapper extends BaseMapper<FlowCard> {
    List<Map<String, Object>> selectProject(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber);
    List<Map<String, Object>> selectFlowCard(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber);
    List<Map<String, Object>> selectLabel(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber);
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/FlowCardService.java
New file
@@ -0,0 +1,24 @@
package com.mes.pp.service;
import com.mes.pp.entity.FlowCard;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wu
 * @since 2024-08-07
 */
public interface FlowCardService extends IService<FlowCard> {
    List<Map<String, Object>> selectProject(String processId, Integer technologyNumber);
    List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber);
    List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber);
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/impl/FlowCardServiceImpl.java
New file
@@ -0,0 +1,37 @@
package com.mes.pp.service.impl;
import com.mes.pp.entity.FlowCard;
import com.mes.pp.mapper.FlowCardMapper;
import com.mes.pp.service.FlowCardService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wu
 * @since 2024-08-07
 */
@Service
public class FlowCardServiceImpl extends ServiceImpl<FlowCardMapper, FlowCard> implements FlowCardService {
    @Override
    public List<Map<String, Object>> selectProject(String processId, Integer technologyNumber){
        return baseMapper.selectProject(processId,technologyNumber);
    }
    @Override
    public List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber){
        return baseMapper.selectFlowCard(processId, technologyNumber);
    }
    @Override
    public List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber){
        return baseMapper.selectLabel(processId, technologyNumber);
    }
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.mes.base.entity.BigStorageCageBaseInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -91,4 +92,7 @@
     */
    @ApiModelProperty(value = "工程id", position = 17)
    private String engineerId;
    @TableLogic
    private int deleted;
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
@@ -108,7 +108,7 @@
    public Integer updateTemperingState(TemperingGlassInfo temperingGlassInfo) {
        UpdateWrapper<TemperingGlassInfo> wrapper = new UpdateWrapper<>();
        wrapper.eq("glass_id",temperingGlassInfo.getGlassId())
                .lt("state",5)
                .lt("state",6)
                .set("state", temperingGlassInfo.getState());;
        if (temperingMapper.update(null,wrapper) > 0) {
            return 200;
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/DateUtil.java
New file
@@ -0,0 +1,24 @@
package com.mes.tools;
import java.util.Calendar;
import java.util.Date;
public class DateUtil {
    public static Date getBeginDate(){
        Calendar now = Calendar.getInstance();
        Calendar startOfDay = (Calendar) now.clone();
        startOfDay.set(Calendar.HOUR_OF_DAY, 0);
        startOfDay.set(Calendar.MINUTE, 0);
        startOfDay.set(Calendar.SECOND, 0);
        return startOfDay.getTime();
    }
    public static Date getEndDate(){
        Calendar now = Calendar.getInstance();
        Calendar endOfDay = (Calendar) now.clone();
        endOfDay.set(Calendar.HOUR_OF_DAY, 23);
        endOfDay.set(Calendar.MINUTE, 59);
        endOfDay.set(Calendar.SECOND, 59);
        return endOfDay.getTime();
    }
}
hangzhoumesParent/common/servicebase/src/main/resources/application.yml
New file
@@ -0,0 +1,8 @@
mybatis-plus-join:
  sub-table-logic: true
mybatis-plus:
  global-config:
    db-config:
      logic-delete-field: deleted
      logic-delete-value: 1
      logic-not-delete-value: 0
hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml
New file
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mes.pp.mapper.FlowCardMapper">
    <select id="selectFlowCard" resultType="java.util.Map">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
               od.quantity,
               round(ogd.total_area, 2)                                     as total_area,
               od.perimeter,
               od.bend_radius,
               concat(IFNULL(od.processing_note,''), IFNULL(od.remarks,''))                       as remarks,
               od.other_columns,
               round(ogd.child_width)                                       as width,
               round(ogd.child_height)                                      as height,
               pd.separation,
               fc.technology_number
        from pp.flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        where fc.process_id =  #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
    <select id="selectProject" resultType="java.util.Map">
        select o.customer_name,
               o.project,
               (select process from sd.order_glass_detail where order_id=fc.order_id and order_number=fc.order_number and technology_number=fc.technology_number) as process ,
               od.edging_type,
               (select glass_child from sd.order_glass_detail where order_id=fc.order_id and order_number=fc.order_number and technology_number=fc.technology_number) as glass_child ,
               od.product_name,
               o.processing_note,
               fc.process_id,
               SUM(od.quantity)                                as quantity,
               round(SUM(ogd.total_area), 2)                   as gross_area,
               sum(od.weight)                                  as weight,
               1                            as technologyNumber,
               concat(fc.process_id, '/', 1) as processIdNumber,
               concat('对应我司单号',o.batch)                                         AS otherRemarks
        from pp.flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left(#{processId}, 10)
                              and position(ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id
    </select>
    <select id="selectLabel" resultType="java.util.Map">
        select fc.process_id,
               o.order_id,
               o.project,
               o.customer_id,
               ogd.child_width                as width,
               ogd.child_height               as height,
               od.quantity,
               od.order_number                as orderNumber,
               fc.technology_number           as technologyNumber,
               ogd.glass_child,
               ogd.process,
               c.customer_abbreviation        as customer_name,
               ifnull(od.processing_note, '') as processing_note,
               bgt.type_name,
               od.other_columns,
               od.building_number,
               od.bend_radius
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join sd.order_glass_detail as ogd
                           on ogd.order_id = od.order_id and ogd.order_number = od.order_number
                 left join pp.flow_card as fc on o.order_id = fc.order_id and
                                                 od.order_number = fc.order_number and
                                                 fc.technology_number = ogd.technology_number
                 left join sd.product pt on pt.id = od.product_id
                 left join sd.customer c on c.id = o.customer_id
                 left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by od.order_number, od.width, od.height
    </select>
</mapper>
hangzhoumesParent/gateway/src/main/resources/application.yml
@@ -6,7 +6,7 @@
  cloud:
    nacos:
      discovery:
        server-addr: 10.153.19.150:8848
        server-addr: 127.0.0.1:8848
    gateway:
      discovery:
        locator:
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
@@ -3,20 +3,20 @@
spring:
  profiles:
    active: cz
    active: dev
  application:
    name: cacheVerticalGlass
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mes:
  sequence:
    order: false
  minCount: 20
  carWidth: 5000   #大车宽度
  slotWidth: 5000   #大车宽度
  inCarMaxSize: 3     #进片大车最大存放玻璃数量
  outCarMaxSize: 3     #出片大车最大存放玻璃数量
  inCarMaxSize: 1     #进片大车最大存放玻璃数量
  outCarMaxSize: 2     #出片大车最大存放玻璃数量
  glassGap: 350  #玻璃间距
  xMaxSize: 2850
  xMaxSize: 2800
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -3,7 +3,7 @@
spring:
  profiles:
    active: prod
    active: dev
  application:
    name: glassStorage
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
@@ -169,13 +169,13 @@
    @Scheduled(fixedDelay = 1000)
    public void loadGlassIsRun() {
        JSONObject jsonObject = new JSONObject();
        //是否开始工程
        Engineering engineering = engineeringService.selectInitiate(1);
        if (engineering != null){
            jsonObject.append("engineering", engineering);
        }else {
            jsonObject.append("engineering", "0");
        }
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("IsRun");
        //工位信息
        List<UpWorkstation> upWorkstations = upWorkstationService.list();
        jsonObject.append("list", upWorkstations);
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("loadGlassIsRun");
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
  port: 8083
spring:
  profiles:
    active: cz
    active: dev
  application:
    name: loadGlass
mybatis-plus:
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java
@@ -12,6 +12,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
@@ -33,14 +36,28 @@
     * fixedDelay : 上一个调用结束后再次调用的延时
     */
    @Scheduled(fixedDelay = 2000)
    @Scheduled(fixedDelay = 10000)
    public void screenHome() {
        JSONObject jsonObject = new JSONObject();
        Reportingdamage reportingdamage = new Reportingdamage();
        reportingdamage.setReportingWorkTime("2024-05-11");
        //reportingdamage.setReportingWorkTime("2024-05-11");
        // 获取当前日期
        LocalDate today = LocalDate.now();
        // 计算最近七天的开始日期
        LocalDate startOfPeriod = today.minusDays(6); // 7天的范围包括今天,所以减去6天
        // 最近七天的结束日期就是今天
        LocalDate endOfPeriod = today;
        // 格式化日期为字符串
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        String startOfPeriodStr = startOfPeriod.format(formatter);
        String endOfPeriodStr = endOfPeriod.format(formatter);
        // 设置为最近七天的时间范围
        reportingdamage.setReportingWorkTime("2024-05-11" + " to " + endOfPeriodStr);
        //reportingdamage.setReportingWorkTime(startOfPeriodStr + " to " + endOfPeriodStr);
        //扇形图各设备的加工破损数量
        List<Reportingdamage> device = reportingWorkService.selectDamage(reportingdamage);
        jsonObject.append("device", device);
        //获取次破未补信息
        List<AwaitingRepair> awaitingRepairs = reportingWorkService.selectAwaitingRepair();
        jsonObject.append("awaitingRepairs", awaitingRepairs);
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
@@ -1,5 +1,10 @@
package com.mes.job;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mes.common.config.Const;
import com.mes.damage.entity.Damage;
import com.mes.damage.service.DamageService;
import com.mes.temperingglass.service.TemperingGlassInfoService;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.tools.WebSocketServer;
@@ -10,6 +15,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author SNG-010
@@ -20,24 +26,27 @@
    @Autowired
    private TemperingGlassInfoService temperingAgoService;
    @Autowired
    private DamageService damageService;
    /**
     * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成)
     * fixedDelay : 上一个调用结束后再次调用的延时
     */
    @Scheduled(fixedDelay = 1000)
    public void temperingGlassHome(){
    public void temperingGlassHome() {
        JSONObject jsonObject = new JSONObject();
        //正在等待进片的玻璃
        List<TemperingGlassInfo> waitingGlass = temperingAgoService.selectWaitingGlass();
        if(waitingGlass!=null){
        if (waitingGlass != null) {
            jsonObject.append("waitingGlass", waitingGlass);
        }
        //获取整在炉中的两个版图id
        List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
        //进炉中的玻璃
        if(!layoutId.isEmpty()) {
        if (!layoutId.isEmpty()) {
            List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0));
            jsonObject.append("intoGlass", intoGlass);
            //进炉中的第二个版图
@@ -48,7 +57,7 @@
        }
        //出炉后的玻璃
        List<TemperingGlassInfo> outGlass = temperingAgoService.selectOutGlass();
        if(outGlass!=null){
        if (outGlass != null) {
            jsonObject.append("outGlass", outGlass);
        }
@@ -57,7 +66,27 @@
        if (outGlass != null) {
            jsonObject.append("overGlass", overGlass);
        }
        //当前钢化工程的拿走数据
        LambdaQueryWrapper<TemperingGlassInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.select(TemperingGlassInfo::getEngineerId)
                .lt(TemperingGlassInfo::getState, Const.TEMPERING_END)
                .groupBy(TemperingGlassInfo::getEngineerId);
        List<String> engineerIds = temperingAgoService.list(queryWrapper)
                .stream()
                .map(TemperingGlassInfo::getEngineerId)
                .distinct()
                .collect(Collectors.toList());
        List<Damage> temperingTakeGlassInfos = damageService.list(
                new LambdaQueryWrapper<Damage>()
                        .in(Damage::getEngineerId, engineerIds)
                        .eq(Damage::getType, Const.GLASS_STATE_TAKE)
                        .orderByAsc(Damage::getId)
        );
        jsonObject.append("temperingTakeGlassInfos", temperingTakeGlassInfos);
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingGlass");
        if (sendwServer != null) {
@@ -70,13 +99,16 @@
            }
        }
    }
    @Scheduled(fixedDelay = 1000)
    public void temperingIsRun(){
    public void temperingIsRun() {
        JSONObject jsonObject = new JSONObject();
        //正在进行的任务
        List<TemperingGlassInfo>temperingTaskType=temperingAgoService.selectTaskType();
        List<TemperingGlassInfo> temperingTaskType = temperingAgoService.selectTaskType();
        jsonObject.append("temperingTaskType", temperingTaskType);
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("isRun");
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingIsRun");
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
@@ -86,6 +118,7 @@
                }
            }
        }
    }
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
  port: 8084
spring:
  profiles:
    active: prod
    active: dev
  application:
    name: temperingGlass
mybatis-plus:
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
@@ -37,4 +37,9 @@
        return Result.build(200, "查询成功", downGlassInfoService.downGlassPrint(downGlassInfo));
    }
    @PostMapping("/downGlassLabelPrint")
    public Result downGlassLabelPrint(@RequestBody DownGlassInfo downGlassInfo) {
        return Result.build(200, "查询成功", downGlassInfoService.downGlassLabelPrint(downGlassInfo));
    }
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
@@ -7,6 +7,7 @@
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Repository
public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> {
@@ -42,4 +43,13 @@
     * @return
     */
    List<DownGlassInfoDTO> queryWorkStationFlowCard(@Param(value = "workList") List<Integer> workList);
    /**
     * 获取下片信息
     *
     * @param processId,technologyNumber
     * @return
     */
    List<Map<String, Object>> downGlassLabelPrint(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber);
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
@@ -60,9 +60,26 @@
     */
    String setDownGlassInfoRequest(DownGlassInfoRequest request);
    /**
     * 流程卡打印查询
     *
     * @param downGlassInfo
     * @return
     */
    List<Map<String, List<Map<String, Object>>>> downGlassPrint(DownGlassInfo downGlassInfo);
    /**
     * 工位是否满架查询
     *
     * @return
     */
    List<DownWorkstation> queryWorkStationIsFull();
    /**
     * 标签打印查询
     *
     * @param downGlassInfo
     * @return
     */
    List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo);
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -3,15 +3,15 @@
spring:
  profiles:
    active: cz
    active: dev
  application:
    name: unLoadGlass
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mes:
  maxWidth: 2500    #下片的最大宽度
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -90,4 +90,99 @@
        </foreach>
        ORDER BY T.RACKS_NUMBER DESC
    </select>
    <select id="selectFlowCard" resultType="java.util.Map">
        select fc.order_number,
               concat(round(ogd.child_width), "*", round(ogd.child_height))   as child_width,
               od.quantity,
               round(ogd.total_area, 2)                                       as total_area,
               od.perimeter,
               od.bend_radius,
               concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
               od.other_columns,
               round(ogd.child_width)                                         as width,
               round(ogd.child_height)                                        as height,
               pd.separation,
               fc.technology_number
        from pp.flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.product_detail as pd
                           on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id, fc.order_number, fc.technology_number
        order by IF(sort != NULL || sort != '', sort, fc.order_number)
    </select>
    <select id="selectProject" resultType="java.util.Map">
        select o.customer_name,
               o.project,
               (select process
                from sd.order_glass_detail
                where order_id = fc.order_id
                  and order_number = fc.order_number
                  and technology_number = fc.technology_number) as process,
               od.edging_type,
               (select glass_child
                from sd.order_glass_detail
                where order_id = fc.order_id
                  and order_number = fc.order_number
                  and technology_number = fc.technology_number) as glass_child,
               od.product_name,
               o.processing_note,
               fc.process_id,
               SUM(od.quantity)                                 as quantity,
               round(SUM(ogd.total_area), 2)                    as gross_area,
               sum(od.weight)                                   as weight,
               1                                                as technologyNumber,
               concat(fc.process_id, '/', 1)                    as processIdNumber,
               concat('对应我司单号', o.batch)                        AS otherRemarks
        from pp.flow_card as fc
                 left join sd.order_glass_detail as ogd
                           on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                              fc.technology_number = ogd.technology_number
                 left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
                 left join sd.`order` as o on o.order_id = fc.order_id
                 left join sd.product as p on p.id = od.product_id
                 left join (select ogd.order_id,
                                   ogd.order_number,
                                   ogd.technology_number,
                                   ogd.glass_child,
                                   GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
                            from sd.order_glass_detail as ogd
                            where ogd.order_id = left (#{processId}
                                , 10)
                              and position (ogd.technology_number in #{technologyNumber})
                            GROUP BY order_id, order_number) as ogdc
                           on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
                              ogdc.technology_number = ogd.technology_number
        where fc.process_id = #{processId}
          and position(fc.technology_number in #{technologyNumber})
        group by fc.process_id
    </select>
    <select id="downGlassLabelPrint" resultType="java.util.Map">
        select a.flow_card_id,
               a.layer,
               a.width,
               a.height,
               a.filmsid,
               a.thickness,
               a.glass_type,
               COUNT(*) AS quantity,
               b.tempering_layout_id,
               b.tempering_feed_sequence
        from down_glass_info a
                 inner join glass_info b on a.glass_id = b.glass_id
        where a.flow_card_id = #{processId}
          and a.layer = #{technologyNumber}
        group by a.flow_card_id, a.layer, a.width, a.height, a.filmsid, a.thickness, a.glass_type, a.id
        order by a.id
    </select>
</mapper>