wangfei
2024-08-22 aaf4f788120b7221c5b9377e196848dd9ec4e962
Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

# Conflicts:
# UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
6个文件已修改
15个文件已添加
1431 ■■■■ 已修改文件
UI-Project/config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/companyInfo.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/constants.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/PrintFlow.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/JsonFile/PlcTemperingGlass.json 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/JsonFile/PlcdownGlass.json 149 ●●●●● 补丁 | 查看 | 原始文档 | 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/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/moduleService/CacheGlassModule/src/main/java/com/mes/edgglasstask/entity/request/EdgGlassInfoRequest.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgglasstask/entity/request/IdentWornRequest.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/request/DownGlassInfoRequest.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/entity/request/CacheWornRequest.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/config.js
@@ -1,9 +1,9 @@
export default {
 serverUrl: "10.153.19.150:88/api",
//  serverUrl: "192.168.1.199:88/api",
//  serverUrl: "10.153.19.150:88/api",
 serverUrl: "192.168.1.199:88/api",
//  serverUrl: "127.0.0.1:88/api",
  serverUrl2: "10.153.19.150:88"
  // serverUrl2: "192.168.1.199:88"
  // serverUrl2: "10.153.19.150:88"
  serverUrl2: "192.168.1.199:88"
    // serverUrl2: "127.0.0.1:88"
  //serverUrl:"res.abeim.cn"
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/utils/constants.js
@@ -1,4 +1,4 @@
//  export const WebSocketHost = "192.168.1.199";
export const WebSocketHost = "10.153.19.150";
 export const WebSocketHost = "192.168.1.199";
// export const WebSocketHost = "10.153.19.150";
// export const WebSocketHost = "127.0.0.1";
export const host = "88";
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,9 +31,11 @@
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; 
const handleMessage = (data) => {
  if (data.overGlass && data.overGlass.length > 0) {
    const newRects = data.overGlass[0].map(rect => {
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  if(data.overGlass!=null){
    adjustedRects.value =  data.overGlass[0].map(rect => {
      const scaleFactor =  1621.78/5190; 
      let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
      let newX = rect.yCoordinate; 
@@ -48,9 +50,15 @@
    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, 
@@ -60,20 +68,72 @@
    height: adjustedHeight,  
    widtha: rect.width, 
    heighta: rect.height,
    // isActive: false,
  };
});
  }
    });
};
// const handleMessage = (data) => {
//   // 假设 data.overGlass[0] 是矩形数组
//   const newRects = data.overGlass[0].map(newRect => ({
//     ...newRect,
//     const scaleFactor = 1621.78 / 5190;
//     let widtha, heighta, adjustedWidth, adjustedHeight;
  
    // 合并新旧矩形,保留 isActive 状态
    adjustedRects.value = adjustedRects.value.map(oldRect => {
      const newRect = newRects.find(r => r.glassId === oldRect.glassId);
      if (newRect) {
        return { ...oldRect, ...newRect, isActive: oldRect.isActive };
      }
      return oldRect; // 如果旧矩形在新数据中不存在,则保留原样
    }).concat(newRects.filter(r => !adjustedRects.value.some(o => o.glassId === r.glassId)));
  }
};
//     // 交换宽度和高度(如果矩形是“横向”的)
//     if (rect.width < rect.height) {
//       widtha = rect.height;
//       heighta = rect.width;
//     } else {
//       widtha = rect.width;
//       heighta = rect.height;
//     }
  
//     // 根据角度调整宽度和高度
//     if (rect.angle === 0) {
//       adjustedWidth = widtha * scaleFactor;
//       adjustedHeight = heighta * 0.16;
//     } else {
//       adjustedWidth = heighta * scaleFactor;
//       adjustedHeight = widtha * 0.16;
//     }
//     // 注意:这里可能需要重新考虑 newX 的计算方式
//     // 暂时保留为原始 yCoordinate 的处理,但通常 x 坐标不应来自 y 坐标
//     let newX = rect.yCoordinate; // 可能是个错误,除非有特定用途
//     // 返回新的矩形对象
//     return {
//       ...rect, // 复制原始矩形的所有属性
//       xcoordinate: newX * scaleFactor, // 注意:这里的 newX 可能需要调整
//       ycoordinate: rect.xCoordinate * 0.16,
//       width: adjustedWidth,
//       height: adjustedHeight,
//       widtha,
//       heighta,
//       isActive: false, // 默认为非激活状态
//       // 可以添加其他需要的属性
//     }
//   }));
  // 使用新数据更新 adjustedRects
  // 注意:这里我们假设 adjustedRects.value 中的矩形也有 id 属性
//   adjustedRects.value = adjustedRects.value.map(oldRect => {
//     const updatedRect = newRects.find(newRect => newRect.id === oldRect.id);
//     if (updatedRect) {
//       // 如果找到了对应的矩形,则合并属性和保留原始激活状态(如果需要的话)
//       // 但在这个例子中,我们总是将 isActive 设置为 false
//       return {
//         ...oldRect,
//         ...updatedRect, // 合并新矩形的属性,但会覆盖 isActive
//         isActive: false, // 总是设置为 false,除非您有更复杂的逻辑
//       };
//     }
//     // 如果没有找到对应的矩形,则保留原样
//     return oldRect;
//   }).concat(newRects.filter(newRect => !adjustedRects.value.some(oldRect => oldRect.id === newRect.id)));
//   // concat 用于添加那些在 adjustedRects.value 中不存在的新矩形
// };
function updateRectColors() {  
  adjustedRects.value.forEach(rect => {  
    if (rect.glassId === glassId) {  
@@ -91,22 +151,17 @@
      return '#911005';  
  }  
}
function showDialog(rect) {
  const index = adjustedRects.value.findIndex(r => r.glassId === rect.glassId);
  if (index !== -1) {
    adjustedRects.value[index].isActive = true;
  }
function showDialog(rect) {
  rect.isActive = true;
  currentGlassId.value = rect.glassId;  
  currenttemperingFeedSequence.value = rect.temperingFeedSequence;  
  blind.value = true;  
}  
const handleDialogClose = () => {  
  adjustedRects.value.forEach(rect => {  
    rect.isActive = false;
    rect.isActive = false; // 关闭对话框时重置所有矩形的 isActive 状态
  });  
  blind.value = false;
};
};
// 破损
const handleDamage = async () => {
  try  {
@@ -144,7 +199,7 @@
  closeWebSocket();
});
</script>
<template>
  <div style="margin-top: 10px;">
<div>
@@ -181,9 +236,9 @@
        </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
@@ -69,45 +69,6 @@
}
// 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 +123,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 +148,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,15 +156,13 @@
        <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' style="width: 90px">宽*高</td>
        <td rowspan='2'>数量</td>
        <td rowspan='2'>面积</td>
        <td rowspan='2'>周长</td>
@@ -240,6 +188,10 @@
        <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>
@@ -247,16 +199,11 @@
      <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.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.total_area }}</td>
        <td>{{ itemDatile.perimeter }}</td>
        <td>{{ itemDatile.bend_radius }}</td>
@@ -277,11 +224,15 @@
        <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>
          面积:
@@ -291,17 +242,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 +260,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 +277,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 +290,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 +311,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 +332,7 @@
#printFlowCard {
  text-align: center;
font-weight: bolder;
 height: 600px;
//font-weight: bolder; height: 600px;
}
#contentTable {
@@ -395,12 +358,10 @@
}
#contentTable tbody {
  white-space: nowrap;
}
.tdNowrap {
  white-space: nowrap;
}
@@ -410,17 +371,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 +405,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,6 +37,7 @@
const selectValuesa = reactive({});
const selectOptionsa = ref([]);
const dialogTableVisible = ref(false)
const dialogTableVisible1 = ref(false)
const printFlowCardId = ref('')
const printLayer = ref('')
const now = new Date();
@@ -107,7 +109,6 @@
      flowCardId: firstPart,
      layer: twoPart
    });
    console.log(response)
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      console.log('绑定成功');
@@ -191,7 +192,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]
@@ -294,15 +295,68 @@
  dialogTableVisible.value = true;
  setTimeout(() => {
    printFlowCard(); // 替换成你要执行的函数名
    dialogTableVisible.value = false;
    //dialogTableVisible.value = false;
  }, 1000);
  ;
}
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 +373,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 +395,8 @@
}
// beforeUnmount(() => {
//   closeWebSocket();
// });
@@ -356,7 +412,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 +432,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 +458,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 +546,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>
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/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/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/moduleService/CacheGlassModule/src/main/java/com/mes/edgglasstask/entity/request/EdgGlassInfoRequest.java
New file
@@ -0,0 +1,40 @@
package com.mes.edgglasstask.entity.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/**
 * @Author : zhoush
 * @Date: 2024/8/7 16:16
 * @Description:
 */
@Data
public class EdgGlassInfoRequest {
    /**
     * 磨边线 2001   2002
     */
    private List<Integer> cellList;
    /**
     * 状态  0 待处理  1 处理中  2 处理完成
     */
    private List<Integer> stateList;
    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
}
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgglasstask/entity/request/IdentWornRequest.java
New file
@@ -0,0 +1,28 @@
package com.mes.edgglasstask.entity.request;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
 * @Author : zhoush
 * @Date: 2024/8/10 13:34
 * @Description:
 */
@Data
public class IdentWornRequest {
    @NotBlank(message = "玻璃ID不能为空")
    private String glassId;
    @NotNull(message = "状态不能为空")
    private int state;
    @NotNull(message = "线路不能为空")
    private int line;
    @NotBlank(message = "工序不能为空")
    private String workingProcedure;
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/request/DownGlassInfoRequest.java
New file
@@ -0,0 +1,48 @@
package com.mes.downglassinfo.entity.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
 * <p>
 *
 * </p>
 *
 * @author zhoush
 * @since 2024-03-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class DownGlassInfoRequest implements Serializable {
    /**
     * 工位id
     */
    private Integer workStationId;
    /**
     * 工程id
     */
    private String engineerId;
    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/entity/request/CacheWornRequest.java
New file
@@ -0,0 +1,28 @@
package com.mes.downstorage.entity.request;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
 * @Author : zhoush
 * @Date: 2024/8/10 13:34
 * @Description:
 */
@Data
public class CacheWornRequest {
    @NotBlank(message = "玻璃ID不能为空")
    private String glassId;
    @NotNull(message = "状态不能为空")
    private int state;
    @NotNull(message = "线路不能为空")
    private int line;
    @NotBlank(message = "工序不能为空")
    private String workingProcedure;
}