wu
2024-09-05 52516230c75988540b51e7160b1f5c03b96583ea
Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
33个文件已修改
1个文件已添加
875 ■■■■ 已修改文件
UI-Project/src/layout/MainErpView.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/returns.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecage.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/pom.xml 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/layout/MainErpView.vue
@@ -197,7 +197,7 @@
      </el-header>
      <div id="line"></div>
      <el-container>
      <el-aside :width="isCollapse ? '30px' : '200px'" style="background-color: #fff;">
      <el-aside :width="isCollapse ? '0px' : '200px'" style="background-color: #fff;">
        <el-row :span="20">
            <el-menu :default-active="activePath" class="el-menu-vertical-demo" >
              <div class="menu">
@@ -336,7 +336,7 @@
ul li {
  height: 28px;
  width: 200px;
  width: 180px;
  line-height: 30px;
  /* background: rgb(128, 128, 128); */
  color: #000000;
UI-Project/src/views/Returns/returns.vue
@@ -96,6 +96,10 @@
  dialoglea.value = true; // 打开绑定架子对话框
  fetchFlowCardId(); 
};
const selectproject = () => {
  dialogFormVisible.value = true;
  selectgong();
};
// 值班信息
const fetchFlowCardId = async () => {
  try  {
@@ -224,7 +228,27 @@
const requestData = {  
  state: 100  
};  
// 调用接口获取选项数据的函数
const selectgong = async (queryString: string) => {
  try  {
    const response = await request.post('/loadGlass/optimizeProject/listByState',{
      ...requestData,
      query: queryString
    })
    if (response.code == 200) {
      titleSelectJson.value.processType = response.data;
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const fetchOptions = async (queryString: string) => {  
  try {  
    // 发送请求到后端接口  
@@ -232,9 +256,8 @@
      ...requestData,  
      query: queryString // 将查询字符串作为参数传递  
    });  
    if (response.code == 200) {  
    titleSelectJson.value.processType = response.data;
    // titleSelectJson.value.processType = response.data;
    console.log(response.data);
 
    } else {  
@@ -243,7 +266,7 @@
  } catch (error) {  
    console.error('Error fetching options:', error);  
  }  
};
};
// 处理用户输入变化的方法  
const handleInputChange = async (value: string) => {  
  if (value) {  
@@ -375,7 +398,6 @@
        message: t('basicData.pause'),
      })
    }
};  
// 删除
const handleConfirma = async () => {
@@ -387,8 +409,7 @@
      filmsId: "",
      patternThickness: 0,
      number: 0
    });
    });
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
@@ -435,7 +456,6 @@
      const uniqueHeights = new Set(response.data.map(item => item.height));  
      const uniqueFilmsIds = new Set(response.data.map(item => item.filmsId));  
      const uniqueThicknesses = new Set(response.data.map(item => item.thickness));  
      selectOptions.value = Array.from(uniqueWidths).map(width => ({ 
      value: width, 
      label: width, 
@@ -465,12 +485,9 @@
}
// 开始上片
const handle = async () => {
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
  try  {
  let engineeringId = window.localStorage.getItem('engineeringId')
console.log(engineeringId);
  const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
    engineerId: engineeringId,
    state: 1,
@@ -708,7 +725,7 @@
    <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;" >{{ $t('basicData.change') }}</el-button>
   
  </div>
    <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button>
    <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="selectproject">{{ $t('basicData.selectproject') }}</el-button>
    <el-button :disabled="!canSelectProject" :style="{ backgroundColor: canStartLoading ? 'green' : 'initial',color: canStartLoading ? 'white' : 'black', }" style="margin-top: 5px;margin-left: 20px;"  @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
UI-Project/src/views/Slicecage/slicecage.vue
@@ -16,6 +16,7 @@
const dialogFormVisiblea = ref(false)
const dialogFormVisibleb = ref(false)
const dialogFormVisiblec = ref(false)
const dialogFormVisibles = ref(false)
const tableData = ref([])
const tableDatagh = ref([])
const tableDatab = ref([])
@@ -24,6 +25,7 @@
const tableDataf = ref([])
const tableDatae = ref([])
const tableDatax = ref([])
const tableDatas = ref([])
const carPosition = ref([])
const ganghua = ref('')
const adjustedRects = ref([]);
@@ -384,6 +386,33 @@
    console.error('发生错误:', error);  
  }  
}; 
 // 指定流程卡
 const brokes = async(row) => {
  try {
    const confirmResult = await ElMessageBox.confirm(
      t('searchOrder.specifytemperinga'),
      t('searchOrder.prompt'),
      {
        confirmButtonText: t('searchOrder.yes'),
        cancelButtonText: t('searchOrder.cancel'),
        type: 'warning',
      }
    );
    if (confirmResult === 'confirm') {
      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/appointFlowCard",{
        flowCardId: row.flow_card_id,
        layer: row.layer,
    });
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      ElMessage.error(response.message);
      }
    }
  } catch (error) {
    console.error('发生错误:', error);
  }
};
// 出片队列拿走
const brokeb = async(row) => {  
  try {
@@ -518,7 +547,23 @@
  } catch (error) {  
    // console.error('Error fetching rects :', error);  
  }  
}); 
const fetchFlows = async () => {
  try {
    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectFlowCardByCache');
    if (response.code === 200) {
      tableDatas.value = response.data
    } else {
      ElMessage.warning(response.msg)
    }
  } catch (error) {
    // console.error('Error fetching rects :', error);
  }
}
const fetchFlow = async () => {
  try  {
    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass')
@@ -775,6 +820,7 @@
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">非钢化流程卡查询</el-button>
    <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" />
    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
@@ -1459,6 +1505,19 @@
      </div>
    </template>
</el-dialog>
<el-dialog v-model="dialogFormVisibles" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
        :data="tableDatas" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="flow_card_id" fixed align="center" :label="$t('searchOrder.processcards')"/>
          <el-table-column prop="layer" align="center" label="层" />
          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" />
          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" >
            <template #default="scope">
              <el-button size="mini" type="text" plain @click="brokes(scope.row)">指定流程卡</el-button>
            </template>
        </el-table-column>
        </el-table>
</el-dialog>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -1,26 +1,30 @@
<script setup>
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {useRouter} from "vue-router"
import {useI18n} from 'vue-i18n'
import {ElMessage} from 'element-plus'
import { onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from "vue";
import { useRouter } from "vue-router"
import { useI18n } from 'vue-i18n'
import { ElMessage } from 'element-plus'
import request from "@/utils/request";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {host, WebSocketHost} from '@/utils/constants'
import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService';
import { host, WebSocketHost } from '@/utils/constants'
import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue";
import Landingindication from "./Landingindication.vue";
import Landingindicationtwo from "./Landingindicationtwo.vue";
import PrintLabel from "@/views/UnLoadGlass/PrintCustomLabelSemi1.vue";
const router = useRouter()
const {t} = useI18n()
const { t } = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const printLoading = ref(true)
const fullFlowCard = ref('')
const autoPrint = ref(false)
const takeGlass = ref([])
const scanGlass = ref([])
const dialogFormVisiblea = ref(false)
const dialogFormVisiblea2 = ref(false)
const dialogFormVisibleaDownGlass = ref(false)
const dialogFormVisibleaDownGlasss = ref(false)
// 数据
const loading = ref(false);
// 弹框显示控制
@@ -42,7 +46,7 @@
const printLayer = ref('')
const now = new Date();
const timeRange = ref([])
const browser=ref(false)
const browser = ref(false)
const handleChange = async () => {
  console.log("触发开关")
@@ -65,14 +69,14 @@
    console.error(error);
  }
}
const confirmBrowser = () =>{
const confirmBrowser = () => {
  if (/chrome|chromium/i.test(navigator.userAgent) && !/edg/i.test(navigator.userAgent)) {
    browser.value=true
} else if (/edg/i.test(navigator.userAgent)) {
  browser.value=false
} else {
  browser.value=false
}
    browser.value = true
  } else if (/edg/i.test(navigator.userAgent)) {
    browser.value = false
  } else {
    browser.value = false
  }
}
const handleInputChangea = (value, rowId) => {
@@ -98,7 +102,7 @@
    if (response.code === 200) {
      flowCardOptions.value = response.data.filter(item => item !== null)
          .map(item => ({flowcard_id: item.flow_card_id}));
        .map(item => ({ flowcard_id: item.flow_card_id }));
      console.log(flowCardOptions.value);
    }
    else {
@@ -143,7 +147,7 @@
const handleBindRack2 = (row) => {
  workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名
  dialogFormVisiblea2.value = true; // 打开绑定架子对话框
  workFlowCard.value=row.flowCardId;
  workFlowCard.value = row.flowCardId;
};
//清除内容
const handleclear = async () => {
@@ -158,8 +162,8 @@
      console.log('清除成功');
      ElMessage.success(response.message);
      dialogFormVisiblea2.value = false;
      if(fullFlowCard.value==workFlowCard.value){
        fullFlowCard.value="";
      if (fullFlowCard.value == workFlowCard.value) {
        fullFlowCard.value = "";
      }
    } else if (response.code === 500) {
      // 清除失败的逻辑
@@ -209,9 +213,15 @@
  if (data.autoPrint != null) {
    autoPrint.value = data.autoPrint[0];
  }
  if (data.takeGlass != null) {
    takeGlass.value = data.takeGlass[0];
  }
  if (data.scanGlass != null) {
    scanGlass.value = data.scanGlass[0];
  }
  //自动打印
  if (fullFlowCard.value == ""&&autoPrint.value==true&&browser.value==true) {
  if (fullFlowCard.value == "" && autoPrint.value == true && browser.value == true) {
    for (let i = 0; i < tableData.length; i++) {
      if (tableData[i].totalQuantity != 0) {
        if (tableData[i].totalQuantity == tableData[i].racksNumber + tableData[i].otherNumber && fullFlowCard.value != tableData[i].flowCardId) {
@@ -225,7 +235,7 @@
      }
    }
  }
  if(data.params!=null){
  if (data.params != null) {
    tableData.splice(0, tableData.length, ...data.params[0]);
  }
@@ -304,19 +314,19 @@
  printLayer.value = row.layer
  dialogTableVisible.value = true;
  setTimeout(() => {
    printFlowCard();
    printFlowCard();
    dialogTableVisible.value = false;
  }, 2000);
}
const open1 = async (row) => {
printFlowCardId.value = row.flowCardId;
printLayer.value = row.layer
dialogTableVisible1.value = true;
setTimeout(() => {
  printFlowCard1();
  //dialogTableVisible1.value = false;
}, 1000);
  printFlowCardId.value = row.flowCardId;
  printLayer.value = row.layer
  dialogTableVisible1.value = true;
  setTimeout(() => {
    printFlowCard1();
    //dialogTableVisible1.value = false;
  }, 1000);
}
const printFlowCard = () => {
@@ -334,22 +344,22 @@
  // 样式控制与打印无关的元素隐藏
  let style = doc.createElement("style");
  console.log("style1:"+style.innerHTML)
  console.log("style1:" + style.innerHTML)
  style.innerHTML =
      "body>#" +
      printId +
      "{display:none;}@media print{" +
      "@page {" +
      "    size: auto; " +
      "    margin: 10mm 5mm 10mm 5mm; " +
      "  }body>:not(#" +
      printId +
      "){display:none !important;}body>#" +
      printId +
      "{display:block;}#" +
      printId +
      "{display: block; padding: 0; margin: 0;  width: 100%;  position: absolute; top: 0; left: 0; height: 100vh;  box-sizing: border-box;}} ";
    "body>#" +
    printId +
    "{display:none;}@media print{" +
    "@page {" +
    "    size: auto; " +
    "    margin: 10mm 5mm 10mm 5mm; " +
    "  }body>:not(#" +
    printId +
    "){display:none !important;}body>#" +
    printId +
    "{display:block;}#" +
    printId +
    "{display: block; padding: 0; margin: 0;  width: 100%;  position: absolute; top: 0; left: 0; height: 100vh;  box-sizing: border-box;}} ";
  content.innerHTML = el.outerHTML;
  // // console.log("el.outerHTML", el.outerHTML);
  body.appendChild(style);
@@ -378,17 +388,17 @@
  // 样式控制与打印无关的元素隐藏
  let style = doc.createElement("style");
  style.innerHTML =
      "body>#" +
      printId +
      "{display:none}@media print{" +
      "@page {" +
      "    size: auto; " +
      "    margin: 2mm 2mm 2mm 2mm;  " +
      "  }body>:not(#" +
      printId +
      "){display:none !important}body>#" +
      printId +
      "{display:block;padding-top:1px}}";
    "body>#" +
    printId +
    "{display:none}@media print{" +
    "@page {" +
    "    size: auto; " +
    "    margin: 2mm 2mm 2mm 2mm;  " +
    "  }body>:not(#" +
    printId +
    "){display:none !important}body>#" +
    printId +
    "{display:block;padding-top:1px}}";
  //
  content.innerHTML = el.outerHTML;
  // // console.log("el.outerHTML", el.outerHTML);
@@ -415,24 +425,27 @@
<template>
  <div>
    <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
               @click="dialogFormVisibleaDownGlass = true">落架详情
      @click="dialogFormVisibleaDownGlass = true">落架详情
    </el-button>
    <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2" :inactive-text="$t('自动打印')"
               @change="handleChange"/>
    <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
      @click="dialogFormVisibleaDownGlasss = true">人工下片
    </el-button>
    <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2"
      :inactive-text="$t('自动打印')" @change="handleChange" />
    <el-card style="flex: 1;" v-loading="loading">
      <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading">
        <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
          <el-table height="350px" ref="table" @selection-change="handleSelectionChange" :data="tableData"
                    :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
            <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80"/>
            :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
            <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80" />
            <el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')"
                             min-width="120"/>
            <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="150"/>
              min-width="120" />
            <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="150" />
            <el-table-column prop="totalQuantity" align="center" :label="$t('reportWork.totalquantity')"
                             min-width="120"/>
            <el-table-column prop="racksNumber" align="center" :label="$t('reportWork.beendropped')" min-width="120"/>
            <el-table-column prop="layer" align="center" label="层数" min-width="120"/>
            <el-table-column prop="otherNumber" align="center" label="人工下片数" min-width="120"/>
              min-width="120" />
            <el-table-column prop="racksNumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" />
            <el-table-column prop="layer" align="center" label="层数" min-width="120" />
            <el-table-column prop="otherNumber" align="center" label="人工下片数" min-width="120" />
            <!-- <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> -->
            <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" />
            <el-table-column align="center" :label="$t('reportWork.startstatus')" min-width="80" prop="enableState">
@@ -445,7 +458,7 @@
            <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="400">
              <template #default="scope">
                <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用'"
                           @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }}
                  @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }}
                </el-button>
                <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear')
                  }}</el-button>
@@ -457,8 +470,7 @@
          </el-table>
        </div>
        <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%"
                   :title="$t('searchOrder.cageinformation')">
        <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('落架信息')">
          <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('请选择工位')" clearable>
            <el-option label="全部" value="0"></el-option>
            <el-option label="1" value="1"></el-option>
@@ -471,35 +483,57 @@
          </el-select>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable
                     @input="handleInputChangea($event, row.id)">
            <el-option v-for="item in selectOptionsa" :key="item" :label="item" :value="item"/>
            @input="handleInputChangea($event, row.id)">
            <el-option v-for="item in selectOptionsa" :key="item" :label="item" :value="item" />
          </el-select>
          <span class="demonstration">时间段</span>
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" value-format = "YYYY-MM-DD hh:mm:ss"
                          end-placeholder="结束日期">
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期"
            value-format="YYYY-MM-DD hh:mm:ss" end-placeholder="结束日期">
          </el-date-picker>
          <el-button type="primary" style="margin-left: 10px;" @click="selectDownGlassData()">{{
              $t('reportmanage.inquire')
            }}
        $t('reportmanage.inquire')
      }}
          </el-button>
          <el-table height="200px" ref="table" @selection-change="handleSelectionChange" :data="downGlass"
                    :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
            <el-table-column prop="workStationId" align="center" :label="$t('工位号')" min-width="80"/>
            <el-table-column prop="engineerId" align="center" :label="$t('工程号')" min-width="80"/>
            <el-table-column prop="flowCardId" align="center" :label="$t('流程卡号')" min-width="80"/>
            <el-table-column prop="layer" align="center" :label="$t('层')" min-width="120"/>
            <el-table-column prop="sequence" align="center" :label="$t('顺序')" min-width="150"/>
            <el-table-column prop="width" align="center" :label="$t('宽')" min-width="120"/>
            <el-table-column prop="height" align="center" :label="$t('高')" min-width="120"/>
            <el-table-column prop="Filmsid" align="center" :label="$t('膜系')" min-width="120"/>
            <el-table-column prop="thickness" align="center" label="厚度" min-width="120"/>
            <el-table-column prop="glassId" align="center" :label="$t('玻璃id')" min-width="120"/>
            :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
            <el-table-column prop="workStationId" align="center" :label="$t('工位号')" min-width="80" />
            <el-table-column prop="engineerId" align="center" :label="$t('工程号')" min-width="80" />
            <el-table-column prop="flowCardId" align="center" :label="$t('流程卡号')" min-width="80" />
            <el-table-column prop="layer" align="center" :label="$t('层')" min-width="120" />
            <el-table-column prop="sequence" align="center" :label="$t('顺序')" min-width="150" />
            <el-table-column prop="width" align="center" :label="$t('宽')" min-width="120" />
            <el-table-column prop="height" align="center" :label="$t('高')" min-width="120" />
            <el-table-column prop="Filmsid" align="center" :label="$t('膜系')" min-width="120" />
            <el-table-column prop="thickness" align="center" label="厚度" min-width="120" />
            <el-table-column prop="glassId" align="center" :label="$t('玻璃id')" min-width="120" />
          </el-table>
        </el-dialog>
        <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('人工下片信息')">
          <div style="display:flex;justify-content: space-around;">
            <el-card style="display: flex; justify-content: center; align-items: center; width:800px; height: 800px;">
              <div
                :style="{ width: takeGlass.width + 'px', height: takeGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (takeGlass.width > takeGlass.height ? takeGlass.width : takeGlass.height) + ')' }">
                <div style="font-size: 50px; text-align: center;">
                  <div>{{ takeGlass.flowCardId }}</div>
                  <div>{{ takeGlass.width }}</div>
                  <div>{{ takeGlass.height }}</div>
                </div>
              </div>
            </el-card>
            <el-card style="display: flex; justify-content: center; align-items: center; width: 800px; height: 800px;">
              <div
                :style="{ width: scanGlass.width + 'px', height: scanGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (scanGlass.width > scanGlass.height ? scanGlass.width : scanGlass.height) + ')' }">
                <div style="font-size: 50px; text-align: center;">
                  <div>{{ scanGlass.flowCardId }}</div>
                  <div>{{ scanGlass.width }}</div>
                  <div>{{ scanGlass.height }}</div>
                </div>
              </div>
            </el-card>
          </div>
        </el-dialog>
      </el-card>
      <!-- workstationId: '1',
    workstationId: '1005',
@@ -529,7 +563,7 @@
          <el-form-item :label="$t('reportWork.cardnumbera')" :required="true" style="width: 25vw;">
            <el-select v-model="flowCardId" :placeholder="$t('reportWork.incardnumber')">
              <el-option v-for="item in flowCardOptions" :key="item.flowcard_id" :label="item.flowcard_id"
                         :value="item.flowcard_id"/>
                :value="item.flowcard_id" />
            </el-select>
          </el-form-item>
        </el-form>
@@ -556,13 +590,12 @@
    </template>
  </el-dialog>
  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close >
  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close>
    <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
                style="width: 100%;height: 100%"/>
      style="width: 100%;height: 100%" />
  </el-dialog>
  <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close >
    <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
                style=""/>
  <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close>
    <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer" style="" />
  </el-dialog>
</template>
hangzhoumesParent/common/pom.xml
@@ -136,23 +136,22 @@
                </exclusion>
            </exclusions>
        </dependency>
        <!--        2.0~2.2    Knife4j 2.0.0 ~ 2.0.6-->
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <version>2.0.9</version>
        </dependency>
        <!--                2.0~2.2    Knife4j 2.0.0 ~ 2.0.6-->
        <!--        <dependency>-->
        <!--            <groupId>com.github.xiaoymin</groupId>-->
        <!--            <artifactId>knife4j-spring-boot-starter</artifactId>-->
        <!--            <version>2.0.6</version>-->
        <!--            <groupId>io.springfox</groupId>-->
        <!--            <artifactId>springfox-swagger2</artifactId>-->
        <!--            <version>2.7.0</version>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.7.0</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.7.0</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>io.springfox</groupId>-->
        <!--            <artifactId>springfox-swagger-ui</artifactId>-->
        <!--            <version>2.7.0</version>-->
        <!--        </dependency>-->
        <!--hutool java验证方法类-->
        <dependency>
hangzhoumesParent/common/servicebase/pom.xml
@@ -22,6 +22,12 @@
            <artifactId>mssql-jdbc</artifactId>
            <version>6.4.0.jre8</version>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>3.8.1</version>
        </dependency>
    </dependencies>
</project>
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
@@ -30,7 +30,7 @@
     * A09出片目标位置  d02卧转立 钢化出片    3001
     * A10出片目标位置  d05卧转立 人工出片    3002
     */
    public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001;
    public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002;
    public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002;
    /**
@@ -171,4 +171,13 @@
    public static final Integer SLOT_ON = 1;
    public static final Integer SLOT_OFF = 0;
    /**
     * 下片任务玻璃状态
     * 生成任务0
     * 出片任务2
     */
    public static final Integer UNLOAD_GLASS_CREATE = 0;
    public static final Integer UNLOAD_GLASS_OUT = 1;
    public static final Integer UNLOAD_GLASS_DOWN = 2;
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Swagger2Config.java
@@ -3,19 +3,12 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.*;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
 * @author zhan_py
@@ -25,54 +18,82 @@
@Configuration
public class Swagger2Config {
    @Bean
    public Docket webApiConfig() {
        List<Parameter> pars = new ArrayList<>();
        ParameterBuilder tokenPar = new ParameterBuilder();
        tokenPar.name("userId")
                .description("用户token")
                //.defaultValue(JwtHelper.createToken(1L, "admin"))
                .defaultValue("1")
                .modelRef(new ModelRef("string"))
                .parameterType("header")
                .required(false)
                .build();
        pars.add(tokenPar.build());
    public Docket moduleDocket() {
        return docket("mes接口文档", "com.mes");
    }
    private Docket docket(String groupName, String basePackages) {
        return new Docket(DocumentationType.SWAGGER_2)
                .groupName("webApi")
                .apiInfo(webApiInfo())
                .groupName(groupName)
                .apiInfo(apiInfo())
                .select()
                //只显示api路径下的页面
                .apis(RequestHandlerSelectors.basePackage("com.mes"))
                .apis(RequestHandlerSelectors.basePackage(basePackages))
                .paths(PathSelectors.any())
                .build()
                .globalOperationParameters(pars)
                .securitySchemes(Collections.EMPTY_LIST)
                .securityContexts(Arrays.asList(securityContext()));
    }
    private SecurityContext securityContext() {
        return SecurityContext.builder()
                .securityReferences(defaultAuth())
                .forPaths(PathSelectors.any())
                .build();
    }
    private List<SecurityReference> defaultAuth() {
        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
        authorizationScopes[0] = authorizationScope;
        return Arrays.asList(new SecurityReference("Authorization", authorizationScopes));
    }
    private ApiInfo webApiInfo() {
    private ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .title("网站-API文档")
                .description("本文档描述了mes网站微服务接口定义")
                .version("1.0")
                .contact(new Contact("zhan_py", "", ""))
                .title("mes接口文档系统")
                .description("mesApi接口文档系统")
                .license("Powered By mes")
                .licenseUrl("http://127.0.0.1")
                .termsOfServiceUrl("http://127.0.0.1")
                .contact(new Contact("mes", "http://127.0.0.1", "beibo@mes.com"))
                .version("V1.0.0")
                .build();
    }
//    @Bean
//    public Docket webApiConfig() {
//        List<Parameter> pars = new ArrayList<>();
//        ParameterBuilder tokenPar = new ParameterBuilder();
//        tokenPar.name("userId")
//                .description("用户token")
//                .defaultValue("1")
//                .modelRef(new ModelRef("string"))
//                .parameterType("header")
//                .required(false)
//                .build();
//        pars.add(tokenPar.build());
//
//        return new Docket(DocumentationType.SWAGGER_2)
//                .apiInfo(webApiInfo())
//                .select()
//                //只显示api路径下的页面
//                .apis(RequestHandlerSelectors.basePackage("com.mes"))
//                .paths(PathSelectors.any())
//                .build()
//                .globalOperationParameters(pars)
//                .securitySchemes(Collections.EMPTY_LIST)
//                .securityContexts(Arrays.asList(securityContext()));
//    }
//
//    private SecurityContext securityContext() {
//        return SecurityContext.builder()
//                .securityReferences(defaultAuth())
//                .forPaths(PathSelectors.any())
//                .build();
//    }
//
//    private List<SecurityReference> defaultAuth() {
//        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
//        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
//        authorizationScopes[0] = authorizationScope;
//        return Arrays.asList(new SecurityReference("Authorization", authorizationScopes));
//    }
//
//
//    private ApiInfo webApiInfo() {
//        return new ApiInfoBuilder()
//                .title("网站-API文档")
//                .description("本文档描述了mes网站微服务接口定义")
//                .version("1.0")
//                .contact(new Contact("zhan_py", "", ""))
//                .build();
//    }
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
@@ -39,4 +39,6 @@
    List<DamagePrint> selectDamagePrint(Damage damage);
    List<DamagePrint> selectDamagePrintDetails(Damage damage);
    void deleteByGlassId(String glassId);
}
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.query.MPJQueryWrapper;
import com.mes.common.config.Const;
import com.mes.damage.entity.Damage;
import com.mes.damage.entity.DamagePrint;
import com.mes.damage.mapper.DamageMapper;
@@ -145,34 +146,45 @@
        }
        this.saveBatch(damageList);
    }
    /**
     * 拿走打印数据查询
     */
    @Override
    public List<DamagePrint> selectDamagePrint(Damage damage) {
        MPJQueryWrapper<Damage> listDamage=new MPJQueryWrapper<Damage>()
        MPJQueryWrapper<Damage> listDamage = new MPJQueryWrapper<Damage>()
                .select("t.engineer_id,t.glass_id,b.tempering_layout_id,b.tempering_feed_sequence,b.width,b.height,b.thickness")
                .leftJoin("glass_info as b  on t.glass_id=b.glass_id")
                .eq("t.working_procedure",damage.getWorkingProcedure())
                .eq("t.type",damage.getType());
                .eq("t.working_procedure", damage.getWorkingProcedure())
                .eq("t.type", damage.getType());
        // 动态添加条件,当 id 有值时
        if (damage.getEngineerId() != null) {
            listDamage.eq("t.engineer_id", damage.getEngineerId());
        }
        return damageMapper.selectJoinList(DamagePrint.class,listDamage);
        return damageMapper.selectJoinList(DamagePrint.class, listDamage);
    }
    /**
     * 拿走打印打印详情查询
     */
    @Override
    public List<DamagePrint> selectDamagePrintDetails(Damage damage) {
        List<DamagePrint> listDamage=damageMapper.selectJoinList(DamagePrint.class,new MPJQueryWrapper<Damage>()
        List<DamagePrint> listDamage = damageMapper.selectJoinList(DamagePrint.class, new MPJQueryWrapper<Damage>()
                .select("b.flow_card_id,b.layer,t.engineer_id,b.tempering_layout_id,b.tempering_feed_sequence,t.glass_id,b.width,b.height,b.thickness")
                .leftJoin("glass_info as b  on t.glass_id=b.glass_id")
                .eq("t.working_procedure",damage.getWorkingProcedure())
                .eq("t.type",damage.getType())
                .eq("t.engineer_id",damage.getEngineerId())
                .eq("t.working_procedure", damage.getWorkingProcedure())
                .eq("t.type", damage.getType())
                .eq("t.engineer_id", damage.getEngineerId())
        );
        return listDamage;
    }
    @Override
    public void deleteByGlassId(String glassId) {
        baseMapper.delete(
                new LambdaQueryWrapper<Damage>()
                        .eq(Damage::getGlassId, glassId)
                        .in(Damage::getType, Const.GLASS_STATE_DAMAGE, Const.GLASS_STATE_TAKE)
        );
    }
}
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java
@@ -6,7 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
 * @Author : zhoush
@@ -17,7 +17,7 @@
@SpringBootApplication
@MapperScan("com.mes.*.mapper")
@EnableDiscoveryClient
@EnableSwagger2
@EnableSwagger2WebMvc
@EnableScheduling
public class CacheGlassModuleApplication {
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -137,7 +137,7 @@
            //加笼子里面是否有玻璃,有先出,无玻璃先进
            boolean outFlase = outTo(Integer.parseInt(out08Glassstate),
                    Integer.parseInt(out10Glassstate), confirmationWrodAddress, glassIdeValue, Integer.parseInt(currentSlot));
            log.info("出片任务是否完成:{},失败且玻璃id:{}不为空则执行进片任务", outFlase, glassIdeValue);
            log.info("出片任务是否完成:{},且玻璃id:{}不为空则执行进片任务", outFlase, glassIdeValue);
            if (!outFlase && StringUtils.isNotBlank(glassIdeValue)) {
                inTo(glassIdeValue, confirmationWrodAddress, currentSlot);
            }
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
    active: dev
  application:
    name: cacheGlass
  liquibase:
    enabled: false
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/CacheVerticalClassModuleApplication.java
@@ -6,7 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
 * @Author : zhoush
@@ -15,7 +15,7 @@
 */
@Slf4j
@SpringBootApplication
@EnableSwagger2
@EnableSwagger2WebMvc
@EnableDiscoveryClient
@MapperScan(basePackages = "com.mes.*.mapper")
@EnableScheduling
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
@@ -1,5 +1,6 @@
package com.mes.bigstorage.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -125,6 +126,26 @@
        return Result.build(200, "查询成功", flowCardIdCount);
    }
    @ApiOperation("指定流程卡")
    @PostMapping("/appointFlowCard")
    public Result appointFlowCard(@RequestBody BigStorageCageDetails bigStorageCageDetails) {
        List<BigStorageCageDetails> bigStorageCageDetailsList=bigStorageCageDetailsService.list(
                new LambdaQueryWrapper<BigStorageCageDetails>()
                .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL)
        );
        if(bigStorageCageDetailsList.size()==0){
            bigStorageCageDetailsService.update(
                    new LambdaUpdateWrapper<BigStorageCageDetails>()
                            .set(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL)
                            .eq(BigStorageCageDetails::getFlowCardId,bigStorageCageDetails.getFlowCardId())
                            .eq(BigStorageCageDetails::getLayer,bigStorageCageDetails.getLayer())
                            .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_IN)
            );
            return Result.build(200, "指定流程卡成功", 1);
        }else{
            return Result.build(200, "指定流程卡成功", 1);
        }
    }
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java
@@ -101,7 +101,7 @@
     * 工程号
     */
    @ApiModelProperty(value = "层", position = 17)
    private String layer;
    private int layer;
    /**
     * 进片任务
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
@@ -4,7 +4,6 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -152,6 +151,13 @@
    public void plcToHomeEdgFreeCarTask() {
        Date startDate = new Date();
        log.info("大理片笼空车进片任务开始执行时间:{}", startDate);
        PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject;
        String mesD03Address = plcMesObject.getPlcParameter("MESToD03").getValue();
        String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getValue();
        log.info("MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address);
        if ("2".equals(mesD03Address) || "2".equals(mesD05Address)) {
            log.info("有启动信号,MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address);
        }
        PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
        String e01Status = plcParameterObject.getPlcParameter("E01State").getValue();
        String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue();
@@ -594,7 +600,11 @@
                if (glassCount < inCarMaxSize) {
                    addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst);
                } else {
                    addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
                    if (glassCount < inCarMaxSize + 1) {
                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
                    } else {
                        return Boolean.FALSE;
                    }
                }
            } else {
                flag = Boolean.FALSE;
@@ -605,12 +615,20 @@
            if (remainWidth >= widthFirst) {
                if (remainWidth - widthFirst - glassGap >= widthSecond) {
                    if (glassCount < inCarMaxSize) {
                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightSecond);
                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst);
                    } else {
                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond);
                        if (glassCount < inCarMaxSize + 1) {
                            addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
                        } else {
                            return Boolean.FALSE;
                        }
                    }
                } else {
                    addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond);
                    if (glassCount < inCarMaxSize + 1) {
                        addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst);
                    } else {
                        return Boolean.FALSE;
                    }
                }
            } else {
                flag = Boolean.FALSE;
@@ -644,6 +662,8 @@
        bigStorageCageFeedTask.setWidth(width);
        bigStorageCageFeedTask.setHeight(height);
        bigStorageCageFeedTask.setCreateTime(new Date());
        //删除理片笼表拿走/破损数据数据
        damageService.deleteByGlassId(glassId);
        return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask);
    }
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
    active: cz
  application:
    name: cacheVerticalGlass
  liquibase:
    enabled: false
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/GlassStorageApplication.java
@@ -6,7 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
 * @Author : zhoush
@@ -15,7 +15,7 @@
 */
@Slf4j
@SpringBootApplication
@EnableSwagger2
@EnableSwagger2WebMvc
@EnableDiscoveryClient
@MapperScan(basePackages = "com.mes.*.mapper")
@EnableScheduling
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
    active: dev
  application:
    name: glassStorage
  liquibase:
    enabled: false
mybatis-plus:
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/LoadGlassModuleApplication.java
@@ -6,7 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
 * @Author : zhoush
@@ -15,7 +15,7 @@
 */
@Slf4j
@SpringBootApplication
@EnableSwagger2
@EnableSwagger2WebMvc
@EnableDiscoveryClient
@EnableScheduling
@MapperScan(basePackages = "com.mes.*.mapper")
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -5,6 +5,8 @@
    active: dev
  application:
    name: loadGlass
  liquibase:
    enabled: false
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/TemperingGlassModuleApplication.java
@@ -6,7 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
 * @Author : zhoush
@@ -15,7 +15,7 @@
 */
@Slf4j
@SpringBootApplication
@EnableSwagger2
@EnableSwagger2WebMvc
@EnableDiscoveryClient
@EnableScheduling
@MapperScan(basePackages = "com.mes.*.mapper")
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -5,6 +5,9 @@
    active: dev
  application:
    name: temperingGlass
  liquibase:
    enabled: true
    change-log: classpath:changelog/changelog.sql
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql
New file
@@ -0,0 +1,156 @@
--liquibase formatted sql
--changeset zsh:20240904001
--preconditions onFail:CONTINUE onError:CONTINUE
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_type';
CREATE TABLE sys_dict_type
(
    dict_id     BIGINT AUTO_INCREMENT PRIMARY KEY,
    dict_name   VARCHAR(32) NOT NULL,
    dict_type   VARCHAR(32) NOT NULL,
    state       CHAR(1)     NOT NULL DEFAULT TRUE,
    description VARCHAR(32),
    create_time TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP,
    deleted     char(1)              DEFAULT 0
);
--rollback DROP TABLE sys_dict_type;
--changeset zsh:20240904002
--preconditions onFail:CONTINUE onError:CONTINUE
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_data';
CREATE TABLE sys_dict_data
(
    dict_id         BIGINT AUTO_INCREMENT PRIMARY KEY,
    dict_sort       INT         NOT NULL,
    dict_label      VARCHAR(32) NOT NULL,
    dict_value      VARCHAR(32) NOT NULL,
    dict_type       VARCHAR(32) NOT NULL,
    dict_type_value varchar(32),
    state           CHAR(1)     NOT NULL DEFAULT TRUE,
    description     VARCHAR(32),
    create_time     TIMESTAMP   NOT NULL DEFAULT CURRENT_TIMESTAMP,
    deleted         char(1)              DEFAULT 0
);
--rollback DROP TABLE sys_dict_data;
--changeset zsh:20240904003
--preconditions onFail:CONTINUE onError:CONTINUE
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_type WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
VALUES ('白玻', 'clearGlass', '1', '0', '0');
INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
VALUES ('单银', 'silver', '1', '1', '0');
INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
VALUES ('双银', 'doubleSilver', '1', '2', '0');
INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
VALUES ('三银', 'thirdSilver', '1', '3', '0');
INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
VALUES ('超白', 'ultraClear', '1', '4', '0');
INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted)
VALUES ('热反射', 'heatReflect', '1', '5', '0');
--rollback DELETE FROM sys_dict_type WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
--changeset zsh:20240904004
--preconditions onFail:CONTINUE onError:CONTINUE
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_data WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (1, '白玻', 'clearGlass', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (2, '超白', 'ultraClear', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (3, '来料白玻', 'incomingClearGlass', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (4, '欧州茶', 'europeTeaColor', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (5, '水晶灰', 'cristalGrey', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (6, '灰玻', 'grayGlass', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (7, '灰镀膜', 'grayCoating', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (8, '磨砂', 'frosted', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (9, '福特蓝', 'fordBlue', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (10, '福特蓝镀膜', 'fordBlueCoating', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (11, '蓝星灰', 'blueAstralGrey', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (12, '蓝玻', 'blueGlass', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (13, '超白长虹', 'ultraClearChanghong', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (14, '金晶灰', 'jinjinGrey', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (15, '金晶灰茶', 'jinjinTeaGrey', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (16, '镀膜', 'coatingFilm', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (17, '长虹', 'clearGlassChanghong', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (18, '阳光膜', 'solorControl', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (19, '高反底透', 'arGlass', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (20, '高白', 'arClear', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (21, '黑玻', 'blackGlass', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (22, '玉砂', 'emery', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (23, '超白磨砂', 'ultraClearFrosted', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (24, '金茶玻', 'goldenTea', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (25, '蓝灰镀膜', 'blueGraycoatingFilm', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (26, '单项透视', 'onePoint', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (27, '超白镀膜', 'ultraClearCoatingFilm', '白玻', '0', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (1, 'F绿', 'fGreen', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (2, 'F绿lowe', 'fGreenLowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (3, 'F绿镀膜', 'fGreenCoating', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (4, 'Low-e', 'lowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (5, 'super52', 'super52', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (6, '中玻在线', 'zgOnlineGlass', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (7, '北玻60离线lowe', 'ng60OfflineLowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (8, '南玻在线lowe', 'csgOnlineLowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (9, '台玻81A', 'tg81a', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (10, '台玻lowe70', 'tgLowe70', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (11, '台玻LOWE78', 'tgLowe78', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (12, '河北金瑞lowe80', 'hbJinruiLowe80', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (13, '福特蓝lowe', 'fordBlueLowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (14, '福莱特FXB60', 'flatFxb60', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (15, '福莱特lowe60', 'flatLowe60', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (16, '福莱特lowe70', 'flatLowe70', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (17, '福莱特lowe80', 'flatLowe80', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (18, '耀皮在线LOWE', 'sypOnlineLowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (19, '超白Lowe', 'ultraClearLowe', '单银', '1', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (1, '双银lowe', 'doubleSilverLowe', '双银', '2', '1', '1', '0');
INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted)
VALUES (2, '超白双银Lowe', 'ultraDoubleSilverLowe', '双银', '2', '1', '1', '0');
--rollback DELETE FROM sys_dict_data WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect');
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java
@@ -6,7 +6,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
 * @Author : zhoush
@@ -15,7 +15,7 @@
 */
@Slf4j
@SpringBootApplication
@EnableSwagger2
@EnableSwagger2WebMvc
@EnableDiscoveryClient
@MapperScan(basePackages = "com.mes.*.mapper")
@EnableScheduling
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
@@ -185,7 +185,7 @@
//                String remarks = (String) row1.get("remarks");
//                BigDecimal height = (BigDecimal) row1.get("height");
                if (order_number == glass_type && technology_number == layer) {
                    quantity1+=1;
                    quantity1 += 1;
//                    row.put("quantity", quantity);
//                    row.put("order_number", order_number);
//                    row.put("technology_number", technology_number);
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
@@ -140,14 +140,7 @@
    @ApiOperation("新增虚拟工位")
    @PostMapping("/insertDownWorkstation")
    public Result insertDownWorkstation() {
        DownWorkstation downWorkstation = new DownWorkstation();
        downWorkstation.setTotalQuantity(0);
        downWorkstation.setRacksNumber(0);
        downWorkstation.setOtherNumber(0);
        downWorkstation.setDeviceId(3);
        downWorkstation.setEnableState(1);
        downWorkstation.setWorkState(1);
        downWorkstationService.save(downWorkstation);
        downWorkstationService.insertDownWorkstation();
        return Result.build(200, "新增成功", 1);
    }
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/DownWorkstationService.java
@@ -81,4 +81,6 @@
    String closeAlarmSignal();
    void autoPrint(Boolean flag);
    void insertDownWorkstation();
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/service/impl/DownWorkstationServiceImpl.java
@@ -159,6 +159,7 @@
                .set("layer", layer)
                .set("other_number", otherNumber)
                .eq("workstation_id", workstationId);
//        .eq("id", workstationId);
        this.update(updateWrapper);
@@ -228,4 +229,18 @@
        redisUtil.setCacheObject("autoPrint", flag);
    }
    @Override
    public void insertDownWorkstation() {
        DownWorkstation downWorkstation = new DownWorkstation();
        downWorkstation.setWorkstationId(7);
        downWorkstation.setTotalQuantity(0);
        downWorkstation.setRacksNumber(0);
        downWorkstation.setOtherNumber(0);
        downWorkstation.setDeviceId(3);
        downWorkstation.setEnableState(1);
        downWorkstation.setWorkState(1);
        baseMapper.insert(downWorkstation);
    }
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
@@ -149,6 +149,20 @@
            List<String> glassList = downGlassTaskList.stream().map(DownGlassTask::getGlassId).collect(Collectors.toList());
            //将任务表中的数据删除
            downGlassTaskService.remove(new LambdaQueryWrapper<DownGlassTask>().in(DownGlassTask::getTaskType, Const.GLASS_CACHE_TYPE_OUT_ALL).in(DownGlassTask::getGlassId, glassList));
            //清除下片玻璃信息表数据
            downGlassInfoService.remove(new LambdaQueryWrapper<DownGlassInfo>().in(DownGlassInfo::getGlassId, glassList));
            //下片数量-1
            for (DownGlassTask downGlassTask : downGlassTaskList
            ) {
                if (Const.GLASS_CACHE_TYPE_OUT_ALL.equals(downGlassTask.getTaskType())) {
                    downWorkstationService.update(
                            new LambdaUpdateWrapper<DownWorkstation>()
                                    .setSql("racks_number = racks_number-1")
                                    .eq(DownWorkstation::getWorkstationId, downGlassTask.getEndCell())
                    );
                }
            }
            List<Damage> damageList = downGlassTaskList.stream().map(e -> {
                Damage damage = new Damage();
                damage.setGlassId(e.getGlassId());
@@ -229,6 +243,7 @@
                    log.info("有空架子,将流程卡与架子好绑定,执行进片任务 结束");
                    //绑定流程卡
                    downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getWorkstationId(), glassInfo.getLayer());
//                    downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getId(), glassInfo.getLayer());
                    checkFlag = Boolean.TRUE;
                }
            }
@@ -283,6 +298,8 @@
        downStorageCageDetailsService.save(downStorageCageDetails);
        //        生成进片任务
        initDownGlassTask(glassInfo, 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN);
        //删除理片笼表拿走/破损数据数据
        damageService.deleteByGlassId(glassInfo.getGlassId());
    }
    public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String
@@ -590,8 +607,13 @@
            if (null != emptyDownWorkstation) {
                log.info("获取到空架子信息,绑定流程卡");
                downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getWorkstationId(), downStorageCageDetails.getLayer());
//                downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer());
                endCell = emptyDownWorkstation.getWorkstationId();
            } else {
                //todo:增加虚拟工位,绑定流程卡
//                downWorkstationService.insertDownWorkstation();
//                endCell = Const.G13_WORK_STATION;
//                downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer());
                log.info("没有空架子信息,无法绑定流程卡");
                return Boolean.FALSE;
            }
@@ -620,6 +642,8 @@
        //生成任务信息
        GlassInfo glassInfo = new GlassInfo();
        BeanUtils.copyProperties(downStorageCageDetails, glassInfo);
        //删除理片笼表拿走/破损数据数据
        damageService.deleteByGlassId(glassInfo.getGlassId());
        return initDownGlassTask(glassInfo, downStorageCageDetails.getSlot(), endCell, taskType);
    }
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -1,6 +1,7 @@
package com.mes.job;
import cn.hutool.json.JSONObject;
import cn.smallbun.screw.core.util.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mes.common.config.Const;
@@ -13,14 +14,20 @@
import com.mes.downstorage.service.DownStorageCageService;
import com.mes.downworkstation.entity.DownWorkstation;
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.tools.DateUtil;
import com.mes.tools.WebSocketServer;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -38,7 +45,14 @@
    private DownGlassInfoService downGlassInfoService;
    @Autowired
    private DownGlassTaskService downGlassTaskService;
    @Autowired
    private GlassInfoService glassInfoService;
    @Value("${mes.scan.ip}")
    private String scanIp;
    @Value("${mes.scan.port}")
    private Integer scanPort;
    @Autowired
    private RedisUtil redisUtil;
@@ -153,8 +167,8 @@
                new QueryWrapper<DownGlassTask>()
                        .select("Top 1 *")
                        .eq("end_cell", Const.G13_WORK_STATION)
                        .lt("task_status", Const.UNLOAD_GLASS_DOWN)
                        .orderByDesc("id")
        );
        jsonObject4.append("takeGlass", takeGlass);
@@ -188,4 +202,35 @@
            }
        }
    }
    @Scheduled(fixedDelay = Long.MAX_VALUE)
    public void scanCodeTask() {
        log.info("扫描任务已启动");
        while (true) {
            new Thread(() -> {
                try (Socket socket = new Socket(scanIp, scanPort);
                     BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {
                    // 接收服务器响应
                    String response;
                    log.info("等待扫码中......");
                    while ((response = in.readLine()) != null) {
                        log.info("扫描到的玻璃id:{}", response);
                        List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("scanCode");
                        if (CollectionUtils.isNotEmpty(sendwServer)) {
                            //按照玻璃id获取玻璃信息返回给前端界面,具体需要哪些数据待确认
                            GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
                                    .eq(GlassInfo::getGlassId, response).last("limit 1"));
                            if (null == glassInfo) {
                                log.info("按照玻璃id:{},无法找到玻璃信息", response);
                            } else {
                                sendwServer.get(0).sendMessage(glassInfo.toString());
                            }
                        }
                    }
                } catch (Exception exception) {
                    log.info("读取异常,原因为{}", exception.getMessage());
                }
            }).start();
        }
    }
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -6,6 +6,8 @@
    active: dev
  application:
    name: unLoadGlass
  liquibase:
    enabled: false
mybatis-plus:
@@ -21,3 +23,6 @@
  throughWidth: 3000
  throughHeight: 2500
  threshold: 5      #下片的最大阈值
  scan:
    ip: 127.0.0.1
    port: 5000
hangzhoumesParent/pom.xml
@@ -42,6 +42,11 @@
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.plugin</groupId>
                <artifactId>spring-plugin-core</artifactId>
                <version>2.0.0.RELEASE</version>
            </dependency>
        </dependencies>
    </dependencyManagement>