ZengTao
2024-10-17 d5d652d23a0bdf64ce527a6b592713a849abac7d
Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes

# Conflicts:
# UI-Project/src/views/Slicecage/slicecage.vue
# UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/impl/EdgStorageCageDetailsServiceImpl.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
30个文件已修改
1个文件已添加
1个文件已删除
1206 ■■■■ 已修改文件
UI-Project/config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/en.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/py.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/router/index.js 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/constants.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/NewPage.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/return.vue 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/returns.vue 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/upreturns.vue 795 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecage.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicData.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/impl/EdgStorageCageDetailsServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/job/RawGlassTask.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/readMe-OPC.md 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | 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/en.js
@@ -108,6 +108,15 @@
        takeon:'The arrangement is complete',
    },
    searchOrder:{
          searchlayout:'Non-tempered process card inquiry',
          fullfurnaces:'Number of full furnaces',
          specifiedproject:'The currently specified project',
          undesignate:'Undesignate',
          allnumber:'Total quantity',
          numbercages:'Number of cages',
          missingquantity:'Missing quantity',
          breakquantity:'Breakage/Take Away quantity',
          ceng:'layer',
        cageinformation:'Sorter information',
        productionqueue:'Production queue',
        outputglassID:'Output glass ID',
@@ -243,6 +252,14 @@
        glasstype:'Glass type',
        line:'Wire',
        status:'Status',
          time:'Time period',
          cway:'Please select a route',
          cstate:'Please select a status',
          edgingone:'Edging a line',
          edgingtwo:'Edging two lines',
          nedging:'Unedging',
          edging:'Edging',
          finedging:'has been edging',
    },
    processCard:{
        intofurnace:'Entering the furnace',
@@ -268,6 +285,22 @@
        glassID:'Glass ID',
    },
    reportWork:{
          details:'Drop off details',
          filming:'Artificial filming',
          printing:'Automatic printing',
          cenumber:'Number of layers',
          artificialorder:'The number of pieces under artificial order',
          processcard:'Print the process card',
          printlabels:'Print labels',
          information:'Landing information',
          cstation:'Please select a desk',
          all:'all',
          timeperiod:'Time period',
          stationnumber:'Station number',
          order:'order',
          filminformation:'Manual film information',
          glassmation:'Artificial film current glass information',
          barcodescanner:'The current glass information of the barcode scanner',
        lowerbit:'Unloading station',
        shelfnumber:'Rack number',
        cardnumber:'Process card number',
UI-Project/src/lang/py.js
@@ -105,6 +105,15 @@
      },
      searchOrder:{
        searchlayout:'Запрос нетемперированной технологической карты',
        fullfurnaces:'Количество полных печей',
        specifiedproject:'Указанный в данный момент проект',
        undesignate:'Без обозначения',
        allnumber:'Общее количество',
        numbercages:'Количество сепараторов',
        missingquantity:'Недостающее количество',
        breakquantity:'Количество Поломка/Вынос',
        ceng:'слой',
        cageinformation:'Информация буфера',
        productionqueue:'Производственная очередь',
        outputglassID:'Выходное стекло ID',
@@ -202,6 +211,14 @@
        takemessage:'Следует ли удалять сообщение?',
        breakage:'Повреждение',
        takeout:'Взять',
        time:'Период времени',
        cway:'Пожалуйста, выберите маршрут',
        cstate:'Пожалуйста, выберите статус',
        edgingone:'Окантовка линии',
        edgingtwo:'Окантовка двух линий',
        nedging:'Окантовка',
        edging:'Край',
        finedging:'был окантовочным',
    },
    processCard:{
        intofurnace:'В печь',
@@ -209,6 +226,22 @@
        outfurnace:'Окончено стекло из печи для закалки',
    },
    reportWork:{
        details:'Сведения о сдаче',
        filming:'Искусственная съемка',
        printing:'Автоматическая печать',
        cenumber:'Количество слоев',
        artificialorder:'Количество штук при искусственном заказе',
        processcard:'Печать технологической карты',
        printlabels:'Печать этикеток',
        information:'Информация о посадке',
        cstation:'Пожалуйста, выберите стол',
        all:'все',
        timeperiod:'Период времени',
        stationnumber:'Номер станции',
        order:'порядок',
        filminformation:'Информация о пленке вручную',
        glassmation:'Искусственная пленка актуальная информация о стекле',
        barcodescanner:'Актуальная информация о стекле сканера штрих-кода',
        lowerbit:'Станция разгрузки',
        shelfnumber:'Номер стойки регистрации',
        cardnumber:'Номер карточки процесса',
UI-Project/src/lang/zh.js
@@ -108,6 +108,15 @@
        takeon:'摆片完成',
    },
    searchOrder:{
          searchlayout:'非钢化流程卡查询',
          fullfurnaces:'满炉数量',
          specifiedproject:'当前指定工程',
          undesignate:'取消指定',
          allnumber:'总数量',
          numbercages:'笼子内数量',
          missingquantity:'缺少数量',
          breakquantity:'破损/拿走数量',
          ceng:'层',
        cageinformation:'理片笼信息',
        productionqueue:'出片队列',
        outputglassID:'出片玻璃ID',
@@ -217,11 +226,12 @@
        specifytemperinga: '是否指定钢化该条信息?',
        temperedswitch: '钢化开关',
        dutyinformation: '值班信息',
          line:'线路',
        process: '工序',
        team: '班组',
        basic: '设备',
        makesure:'确认保存',
        // cancel:'取消',
          cancel:'取消',
        temperingtotal:'钢化炉数:',
        glasstotal:'玻璃总数:',
    },
@@ -244,6 +254,14 @@
        glasstype:'玻璃类型',
        line:'线路',
        status:'状态',
          time:'时间段',
          cway:'请选择线路',
          cstate:'请选择状态',
          edgingone:'磨边一线',
          edgingtwo:'磨边二线',
          nedging:'未磨边',
          edging:'磨边中',
          finedging:'已磨边',
    },
    processCard:{
        intofurnace:'进炉中',
@@ -269,6 +287,22 @@
        glassID:'玻璃ID',
    },
    reportWork:{
          details:'落架详情',
          filming:'人工下片',
          printing:'自动打印',
          cenumber:'层数',
          artificialorder:'人工下片数',
          processcard:'打印流程卡',
          printlabels:'打印标签',
          information:'落架信息',
          cstation:'请选择工位',
          all:'全部',
          timeperiod:'时间段',
          stationnumber:'工位号',
          order:'顺序',
          filminformation:'人工下片信息',
          glassmation:'人工下片当前玻璃信息',
          barcodescanner:'扫码枪当前玻璃信息',
        lowerbit:'下片位',
        shelfnumber:'架号',
        cardnumber:'流程卡号',
@@ -452,9 +486,11 @@
        allstatus: '全部入库状态',
        completedquantity: '完成数量',
        scrapquantity: '报废数量',
          number: '数量',
        method: '加工方式',
        innumber: '已入数量',
        productstatus: '生产状态',
          projectnumber: '工程号',
        right: '正常',
        stop: '终止',
        inquire: '查询',
@@ -488,6 +524,7 @@
        glassID :'玻璃ID',
        projectnumber :'工程号',
        layoutID :'钢化版图ID',
          productiontime :'生产时间',
        type :'类型',
        state :'状态',
        processcards :'流程卡',
@@ -522,6 +559,7 @@
        startslot:'开始工位',
        endslot:'目标工位',
        slotid:'格子ID',
          slot:'格子号',
        width:'原片宽',
        widtha:'原片宽:',
        inwidth:'请输入原片宽',
@@ -541,6 +579,7 @@
        quantitya:'数量:',
        enableid:'任务ID',
        originateslot:'起始格子',
          endslot:'目标格子',
        patternquantity:'原片数量',
        enabletype:'任务类型',
        enablestate:'工位状态',
@@ -558,8 +597,10 @@
        taskstatus :'任务状态',
        built :'新建',
        execution :'执行中',
          finish :'完成',
        tasktype :'任务类型',
        stocke :'入库',
          outbound :'出库',
        dispatch :'调度',
        inquire :'查询',
        station :'工位',
UI-Project/src/router/index.js
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/NewPage.vue
@@ -35,10 +35,9 @@
</template>
<script setup>
import {onMounted, ref, watch} from 'vue';
   import { ref, onMounted, watch, watchEffect } from 'vue';
import {useRoute, useRouter} from 'vue-router';
import request from "@/utils/request"
const route = useRoute();
const router = useRouter();
const current = ref(route.query.current || '');
@@ -111,6 +110,7 @@
         adjustedWidth = rect.width * (900/rect.olHeight);
         adjustedHeight = rect.height * (430/rect.olWidth);
        } 
      // 该页面为顺时针旋转90度
        let adjustedRect = {  
          ...rect,
          // x_axis: rect.y_axis * (959.35/rect.olHeight),
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -790,7 +790,7 @@
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 430px;">
    <div v-if="adjustedRects1.length > 0">
      <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
    <div style="text-align: center;"> 炉号:{{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div>
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div>
    <el-scrollbar height="430px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
      <div  
@@ -816,7 +816,7 @@
  </div>
<div style="width: 50%;float: left;background-color: #f4f4f5;height: 430px;">
    <div v-if="adjustedRects2.length > 0">
    <div style="text-align: center;"> 炉号:{{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div>
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
    <el-scrollbar height="430px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
@@ -847,7 +847,7 @@
  <!-- 进炉前 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
    <div v-if="adjustedRectsa.length > 0">
    <div style="text-align: center;"> 炉号:{{ adjustedRectsa[0].engineerId }}-{{ adjustedRectsa[0].temperingLayoutId }} </div>
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRectsa[0].engineerId }}-{{ adjustedRectsa[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplaya }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
      <el-scrollbar height="750px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
@@ -874,7 +874,7 @@
  <!-- 已出炉 -->
  <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
      <div v-if="adjustedRectsb.length > 0">
    <div style="text-align: center;"> 炉号:{{ adjustedRectsb[0].engineerId }}-{{ adjustedRectsb[0].temperingLayoutId }} </div>
    <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRectsb[0].engineerId }}-{{ adjustedRectsb[0].temperingLayoutId }} </div>
    <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplayb }}-{{ adjustedRects[0].temperingLayoutId }}</div>   -->
      <el-scrollbar height="750px" style="background-color: #e9e9eb;">
    <div  style="position: relative;max-width: 1400px;">  
UI-Project/src/views/Returns/return.vue
UI-Project/src/views/Returns/returns.vue
UI-Project/src/views/Returns/upreturns.vue
@@ -1,27 +1,29 @@
<script lang="ts" setup>
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
import {useRouter} from "vue-router"
import {ElMessage} from 'element-plus'
import {useI18n} from 'vue-i18n'
import {host, WebSocketHost} from '@/utils/constants'
import request from "@/utils/request"
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
const router = useRouter()
import type { TableColumnCtx } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useI18n } from 'vue-i18n'
const {t} = useI18n()
import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import { ref, onMounted, onUnmounted, onBeforeUnmount } from "vue";
const selectValuesa = reactive([]);
const selectedProjectNo = ref(''); // 当前选中的工程号
const loadingline = ref(''); // 当前选中的上片线
const dialogFormVisible = ref(false)
const blind = ref(false)
const blinda = ref(false)
const blindb = ref(false)
const add = ref(false)
const adda = ref(false)
const flake = ref(false)
const flakea = ref(false)
const flakeb = ref(false)
const flakec = ref(false)
const dialoglea = ref(false)
const tableDatax = ref([])
const user = ref('');
@@ -35,9 +37,6 @@
const number = ref('');
const canSelectProject = ref(true);
const canStartLoading = ref(false);
const ida = ref(null);
const selectedProjectNo = ref(''); // 当前选中的工程号
const selectedProjectNoa = ref(''); // 当前选中的工程号
const selectedValue = ref(''); // 当前选中的宽  
const selectedValuea = ref('');
const selectedValueb = ref('');
@@ -48,147 +47,29 @@
const cuttingMachineStatusColor = ref('#911005'); // 用于动态设置i标签的背景色 
const inKageWord = ref(0); // 用于存储要传递给接口的inKageWord值 
const options = ref<any[]>([]); // 下拉选项列表  
const ida = ref(null);
const selectOptions = ref<Array<any>>([]); // 下拉选选项数组  
const selectOptionsa = ref<Array<any>>([]); // 下拉选选项数组  
const selectOptionsb = ref<Array<any>>([]); // 下拉选选项数组  
const selectOptionsc = ref<Array<any>>([]); // 下拉选选项数组  
const tableDataa = ref([])
const tableData = reactive([]);
const fetchTableData = async () => {
  try {
    const response = await request.get("/loadGlass/up-patten-usage/prioritylist");
    // 检查响应状态
    if (response.code === 200) {
      // 更新表格数据
      console.log('成功获取表格数据:', response.data);
      tableData.splice(0, tableData.length, ...response.data);
      // window.localStorage.setItem('engineeringId', response.data[0].engineeringId)
      // 获取唯一值
      const uniqueWidths = new Set(response.data.map(item => item.width));
      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, // 假设这是你想要作为value的属性
        label: width, // 假设这是你想要显示的label
      }));
      selectOptionsa.value = Array.from(uniqueHeights).map(height => ({
        value: height,
        label: height,
      }));
      selectOptionsb.value = Array.from(uniqueFilmsIds).map(filmsId => ({
        value: filmsId,
        label: filmsId,
      }));
      selectOptionsc.value = Array.from(uniqueThicknesses).map(thickness => ({
        value: thickness,
        label: thickness,
      }));
    } else {
      ElMessage.error(response.message);
    }
  } catch (error) {
    // 处理请求失败的情况
    // ElMessage.error('获取表格数据失败,请重试');
  }
};
const handlezhiban = () => {
  dialoglea.value = true; // 打开绑定架子对话框
  fetchFlowCardId();
};
const selectproject = () => {
  dialogFormVisible.value = true;
  selectgong();
};
// 值班信息
const fetchFlowCardId = async () => {
  try {
    const response = await request.post('/loadGlass/work_assignment/selectWorkAssignment', {
      line: 2001,
      workingProcedure: '冷加工'
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      tableDatax.value = response.data;
      console.log(tableDatax.value);
      console
    } else {
      ElMessage.error(response.message);
    }
  } catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleConfirmb = async () => {
  const response = await request.post("/loadGlass/work_assignment/updateWorkAssignment", tableDatax.value)
  if (response.code === 200) {
    ElMessage.success(response.message);
    dialoglea.value = false;
  } else {
    ElMessage.error(response.message);
  }
};
onMounted(() => {
  list('');
  fetchOptions('');
  socket = initializeWebSocket(socketUrl, handleMessage);
  // socket = initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
  if (socket) {
    closeWebSocket(socket);
  }
});
const list = async () => {
  try {
    const response = await request.get('/loadGlass/LoadGlass/list');
    if (response.code == 200) {
      tableDataa.value = response.data
      if (tableDataa.value.length === 4) {
        if (tableDataa.value[0].patternHeight > 0 && tableDataa.value[0].patternWidth > 0 && tableDataa.value[0].number > 0) {
          flake.value = true;
        }
        if (tableDataa.value[1].patternHeight > 0 && tableDataa.value[1].patternWidth > 0 && tableDataa.value[1].number > 0) {
          flakea.value = true;
        }
        if (tableDataa.value[2].patternHeight > 0 && tableDataa.value[2].patternWidth > 0 && tableDataa.value[2].number > 0) {
          flakeb.value = true;
        }
        if (tableDataa.value[3].patternHeight > 0 && tableDataa.value[3].patternWidth > 0 && tableDataa.value[3].number > 0) {
          flakec.value = true;
        }
      }
    } else {
      ElMessage.warning(response.data);
    }
  } catch (error) {
    console.error('Error fetching options:', error);
  }
};
// 假设这是您的响应处理函数
// request.get("/loadGlass/LoadGlass/list").then((res) => {
//       if (res.code == 200) {
//           tableDataa.value = res.data
//           if (tableDataa.value.length === 4) {
//           if (tableDataa.value[0].patternHeight > 0) {
//           flake.value = true;
//           }
//          if (tableDataa.value[1].patternHeight > 0) {
//           flakea.value = true;
//           }
//          if (tableDataa.value[2].patternHeight > 0) {
//           flakeb.value = true;
//           }
//          if (tableDataa.value[3].patternHeight > 0) {
//           flakec.value = true;
//           }
//            }
//           } else {
//           ElMessage.warning(res.message)
//           // router.push("/login")
//           }
//           });
//定义接收加载表头下拉数据
const titleSelectJson = ref({
  processType: [],
@@ -199,87 +80,12 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  if (data.prioritylist != null) {
    tableData.splice(0, tableData.length, ...data.prioritylist[0]);
  }
  if (data.list != null) {
    tableDataa.value = data.list[0]
  }
  if (data.engineering) {
    if (Array.isArray(data.engineering) && data.engineering.length !== 0) {
      canSelectProject.value = false;
      canStartLoading.value = true;
    } else {
      canSelectProject.value = true;
      canStartLoading.value = false;
    }
  }
  if (data.InkageStatus) {
    if (data.InkageStatus != null) {
      const status = data.InkageStatus[0];
      cuttingMachine.value = status;
      upstatus.value = status === '1' ? t('basicData.machine') : t('basicData.machineaa');
      cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005';
      inKageWord.value = status === '1' ? 0 : 1;
    }
  }
};
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 {
    // 发送请求到后端接口
    const response = await request.post('/loadGlass/optimizeProject/listByState', {
      ...requestData,
      query: queryString // 将查询字符串作为参数传递
    });
    if (response.code == 200) {
      // titleSelectJson.value.processType = response.data;
      console.log(response.data);
    } else {
      ElMessage.warning(response.data);
    }
  } catch (error) {
    console.error('Error fetching options:', error);
  }
};
// 处理用户输入变化的方法
const handleInputChange = async (value: string) => {
  if (value) {
    await fetchOptions(value);
  } else {
    options.value = []; // 清空选项列表
  }
};
// 处理用户输入变化的方法
const handleInputChangea = async (value: string) => {
  if (value) {
    await fetchOptionsa(value);
  } else {
    options.value = []; // 清空选项列表
  }
};
onBeforeUnmount(() => {
  closeWebSocket();
});
@@ -289,222 +95,6 @@
  ida.value = row.id;
  add.value = true; // 打开绑定架子对话框
};
// 添加
const handleConfirm = async () => {
  // console.log('id.value:', id.value);
  if ((ida.value === 2 || ida.value === 4) && (parseInt(selectedValuea.value, 10) >= 2700)) {
    try {
      const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', {
        id: workstationId.value,
        workstationId: workstationId.value,
        patternHeight: selectedValuea.value,
        patternWidth: selectedValue.value,
        filmsId: selectedValueb.value,
        patternThickness: selectedValuec.value,
        number: number.value
      });
      // window.localStorage.setItem('workstationId', workstationId.value)
      // window.localStorage.setItem('patternHeight', selectedValuea.value)
      // window.localStorage.setItem('patternWidth', selectedValue.value)
      // window.localStorage.setItem('number', number.value)
      if (response.code == 200) {
        // 绑定成功,处理逻辑
        ElMessage.success(response.message);
        // window.location.reload()
        add.value = false;
        tableDataa.value = response.data;
        // let workstationId = window.localStorage.getItem('workstationId')
        // let patternHeight = window.localStorage.getItem('patternHeight')
        // let patternWidth = window.localStorage.getItem('patternWidth')
        // let number = window.localStorage.getItem('number')
        if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '1') {
          flake.value = true
        } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '2') {
          flakea.value = true
        } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '3') {
          flakeb.value = true
        } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '4') {
          flakec.value = true
        }
        //   if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '1') {
        //   flake.value = true
        // } else if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '2'){
        //   flakea.value = true
        // }else if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '3'){
        //   flakeb.value = true
        // }else if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '4'){
        //   flakec.value = true
        // }
        selectedValuea.value = '';
        selectedValue.value = '';
        selectedValueb.value = '';
        selectedValuec.value = '';
        number.value = '';
        list()
      } else {
        // 请求失败,显示错误消息
        ElMessage.error(response.message);
      }
    } catch (error) {
      // 处理请求错误
    }
  } else if (ida.value === 1 || ida.value === 3) {
    try {
      const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', {
        id: workstationId.value,
        workstationId: workstationId.value,
        patternHeight: selectedValuea.value,
        patternWidth: selectedValue.value,
        filmsId: selectedValueb.value,
        patternThickness: selectedValuec.value,
        number: number.value
      });
      if (response.code == 200) {
        // 绑定成功,处理逻辑
        ElMessage.success(response.message);
        // window.location.reload()
        add.value = false;
        tableDataa.value = response.data;
        if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '1') {
          flake.value = true
        } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '2') {
          flakea.value = true
        } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '3') {
          flakeb.value = true
        } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '4') {
          flakec.value = true
        }
        selectedValuea.value = '';
        selectedValue.value = '';
        selectedValueb.value = '';
        selectedValuec.value = '';
        number.value = '';
        list()
      } else {
        // 请求失败,显示错误消息
        ElMessage.error(response.message);
      }
    } catch (error) {
      // 处理请求错误
    }
  } else {
    ElMessage({
      type: 'info',
      message: t('basicData.pause'),
    })
  }
};
// 删除
const handleConfirma = async () => {
  try {
    const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', {
      workstationId: workstationId.value,
      patternHeight: 0,
      patternWidth: 0,
      filmsId: "",
      patternThickness: 0,
      number: 0
    });
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      adda.value = false;
      tableDataa.value = response.data;
      // window.localStorage.setItem('workstationId', response.data.workstationId)
      // let workstationId = window.localStorage.getItem('workstationId')
      if (workstationId.value == '1') {
        flake.value = false
      } else if (workstationId.value == '2') {
        flakea.value = false
      } else if (workstationId.value == '3') {
        flakeb.value = false
      } else if (workstationId.value == '4') {
        flakec.value = false
      }
      list()
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
    }
  } catch (error) {
    // 处理错误
    console.error(error);
  }
};
// 选择工程确认
const handleup = async () => {
  try {
    const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
      engineerId: selectedProjectNo.value,
    })
    window.localStorage.setItem('engineeringId', selectedProjectNo.value)
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      // window.location.reload()
      dialogFormVisible.value = false;
      tableData.splice(0, tableData.length, ...response.data);
      selectedProjectNo.value = ''
      markingMachineStatus.value = '#911005';
      cuttingMachineStatus.value = '#911005';
      const uniqueWidths = new Set(response.data.map(item => item.width));
      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,
      }));
      selectOptionsa.value = Array.from(uniqueHeights).map(height => ({
        value: height,
        label: height,
      }));
      selectOptionsb.value = Array.from(uniqueFilmsIds).map(filmsId => ({
        value: filmsId,
        label: filmsId,
      }));
      selectOptionsc.value = Array.from(uniqueThicknesses).map(thickness => ({
        value: thickness,
        label: thickness,
      }));
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.message);
      // ElMessage.error(response.msg);
    }
  } catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 开始上片
const handle = async () => {
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      let engineeringId = window.localStorage.getItem('engineeringId')
      const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        engineerId: engineeringId,
        state: 1,
      })
      if (response.code == 200) {
        // 绑定成功,处理逻辑
        ElMessage.success(response.message);
        // window.location.reload()
        blind.value = false;
        selectedProjectNoa.value = '';
      } else {
        // 请求失败,显示错误消息
        ElMessage.error(response.message);
      }
    } catch (error) {
      // 处理错误
      console.error(error);
    }
  } else if (markingMachineStatus.value === '#911005' || cuttingMachineStatus.value === '#911005') {
    // 提示用户打标机未就绪
    ElMessage.warning(t('basicData.pausea'));
  }
}
// 暂停
const handlea = async () => {
  try {
@@ -530,44 +120,12 @@
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 停止任务
const handleb = async () => {
  try {
    let engineeringId = window.localStorage.getItem('engineeringId')
    console.log(engineeringId);
    if (engineeringId !== '') {
      const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        engineeringId: engineeringId,
        state: 0,
      })
      if (response.code == 200) {
        // 绑定成功,处理逻辑
        ElMessage.success(response.message);
        // window.location.reload()
        blindb.value = false;
        tableData.splice([]);
        // 请求失败,显示错误消息
        ElMessage.error(response.message);
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
    // 处理错误
    console.error(error);
  }
}
onMounted(fetchTableData);
function getStatusText(state: number) {
  switch (state) {
    case 0:
@@ -610,16 +168,6 @@
  workstationId.value = row.workstationId;
  adda.value = true;
};
// 定义一个响应式引用,用于存储颜色状态
const markingMachineStatus = ref('#911005');
const cuttingMachineStatus = ref('#911005');
// 定义一个方法来改变颜色状态
const confirmMarkingMachine = () => {
  markingMachineStatus.value = 'green';
};
const confirmCuttingMachine = () => {
  cuttingMachineStatus.value = 'green';
};
const toggleEnableState = async (row: any) => {
  // 检查 id 是否为空  
  if (!row.id) {
@@ -641,119 +189,36 @@
    ElMessage.error(t('basicData.glassnull'));
  }
};
// 上片机联机状态
// const wsUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
// const ws = new WebSocket(wsUrl);
// ws.onopen = () => {
//   console.log('WebSocket连接已打开');
// };
// // 监听WebSocket的错误事件
// ws.onerror = (error) => {
//   console.error('WebSocket发生错误:', error);
// };
// // 监听WebSocket的关闭事件
// ws.onclose = (event) => {
//   if (event.wasClean) {
//     console.log('WebSocket连接已正常关闭');
//   } else {
//     console.error('WebSocket连接异常关闭');
//   }
// };
// // 监听WebSocket的消息事件
// ws.onmessage = (event) => {
//   try {
//     const data = JSON.parse(event.data.replace('<END>', '')); // 解析消息为JSON
//     if (data && Array.isArray(data.InkageStatus) && data.InkageStatus.length > 0) {
// if(data.InkageStatus!=null){
//       const status = data.InkageStatus[0];
//       cuttingMachine.value = status;
//             upstatus.value = status === '1' ? t('basicData.machine') : t('basicData.machineaa');
//       cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005';
//       inKageWord.value = status === '1' ? 0 : 1;
// }
//     } else {
//       // 处理错误情况或无效数据
//       // console.error('接收到的数据无效', data);
//     }
//   } catch (error) {
//     // console.error('解析WebSocket消息时发生错误', error);
//   }
// };
const confirmCutting = async () => {
  try {
    const response = await request.post('/loadGlass/LoadGlass/updateMesInkageLoad',
        inKageWord.value
    );
    if (response.code == 200) {
      const status = response.data.status;
      upstatus.value = status === '1' ? t('basicData.machine') : t('basicData.machineaa');
      cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005';
      // 显示成功消息
      ElMessage.success(response.message);
    } else {
      ElMessage.error(response.message || '请求失败');
    }
  } catch (error) {
    // 处理错误
    console.error('请求时发生错误', error);
    ElMessage.error('请求时发生错误');
  }
};
</script>
<template>
  <div>
    <div id="dotClass">
      <div>{{ $t('basicData.laserprinting') }}</div>
      <i :style="{ marginTop: '2px', backgroundColor: markingMachineStatus, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
      <el-button @click="confirmMarkingMachine" style="margin-left: 30px;margin-top: -3px;">{{
          $t('basicData.yes')
        }}
      </el-button>
    <el-button @click="confirmMarkingMachine" style="margin-left: 30px;margin-top: -3px;">{{ $t('basicData.yes') }}</el-button>
      <div style="margin-left: 70px;">{{ $t('basicData.cuttingmachine') }}</div>
      <i :style="{ marginTop: '2px', backgroundColor: cuttingMachineStatus, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
      <el-button @click="confirmCuttingMachine" style="margin-left: 30px;margin-top: -3px;">{{
          $t('basicData.yes')
        }}
      </el-button>
    <el-button @click="confirmCuttingMachine" style="margin-left: 30px;margin-top: -3px;" >{{ $t('basicData.yes') }}</el-button>
      <div style="margin-left: 70px;">{{ upstatus }}</div>
      <i :style="{ marginTop: '2px', backgroundColor: cuttingMachineStatusColor, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
      <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;">{{
          $t('basicData.change')
        }}
      </el-button>
    <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="selectproject">{{ $t('Mounting.previewproject') }}
    </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>
    <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')"
               style="margin-top: 5px;margin-left: 20px;">
      <el-option :label="$t('film.built')" value="1"></el-option>
    <el-button style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="selectproject">{{ $t('Mounting.previewproject') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;" type="success" @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>
    <el-select v-model="selectValuesa[1]" clearable :placeholder="$t('Mounting.loadinglinea')" style="margin-top: 5px;margin-left: 20px;" >
      <el-option :label="$t('Mounting.all')" value="0"></el-option>
      <el-option :label="$t('Mounting.oneloadingline')" value="1"></el-option>
      <el-option :label="$t('Mounting.twoloadingline')" value="2"></el-option>
    </el-select>
    <el-select v-model="selectValuesa[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-top: 5px;margin-left: 20px;" >
      <el-option :label="$t('Mounting.waiting')" value="1"></el-option>
      <el-option :label="$t('film.execution')" value="2"></el-option>
      <el-option :label="$t('film.finish')" value="3"></el-option>
    </el-select>
    <el-select v-model="selectValuesa[1]" clearable :placeholder="$t('film.tasktype')"
               style="margin-top: 5px;margin-left: 20px;">
      <el-option :label="$t('film.stocke')" value="1"></el-option>
      <el-option :label="$t('film.outbound')" value="2"></el-option>
      <el-option :label="$t('film.dispatch')" value="3"></el-option>
    </el-select>
    <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{
        $t('film.inquire')
      }}
    </el-button>
    <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('Mounting.setparameters') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table
@@ -762,32 +227,20 @@
            :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
            :data="tableData"
        >
          <el-table-column prop="layoutSequence" :label="$t('basicData.layoutSequence')" width="100" align="center"/>
          <el-table-column prop="engineeringId" :label="$t('basicData.projectnumber')" width="200" align="center"/>
          <el-table-column prop="width" :label="$t('basicData.glasswidth')" align="center"/>
          <el-table-column prop="height" :label="$t('basicData.glassheight')" align="center"/>
          <el-table-column prop="filmsId" :label="$t('basicData.coatingtypes')" align="center"/>
          <el-table-column :label="$t('basicData.quantity')" align="center">
      <el-table-column prop="layoutSequence" :label="$t('Mounting.project')" width="100" align="center"/>
      <el-table-column prop="engineeringId" :label="$t('Mounting.width')" width="200" align="center"/>
      <el-table-column prop="width" :label="$t('Mounting.height')" align="center"/>
      <el-table-column prop="height" :label="$t('Mounting.thickness')" align="center"/>
      <el-table-column prop="filmsId" :label="$t('Mounting.loadinglinea')" align="center"/>
      <el-table-column :label="$t('Mounting.projectnumber')" align="center">
            <template #default="{ row }">
              <!-- 这里总是显示 1 -->
              <span>{{ 1 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="thickness" :label="$t('basicData.thickness')" align="center"/>
          <!-- <el-table-column
                align="center"
                label="状态"
                min-width="80"
                prop="state"
              >
              <template #default="scope">
            <el-tag :type="getStatusType(scope.row.state)">
              {{ getStatusText(scope.row.state) }}
            </el-tag>
          </template>  -->
          <el-table-column
              align="center"
              :label="$t('basicData.startstatus')"
            :label="$t('Mounting.state')"
              min-width="80"
              prop="state"
          >
@@ -796,13 +249,44 @@
                  :type="scope.row.state === 100 ? 'success' : 'warning'"
                  @click="toggleEnableState(scope.row)"
          >
                {{ scope.row.state === 100 ? $t('basicData.pass') : $t('basicData.waiting') }}
            {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
              </el-tag>
        </template> 
          </el-table-column>
      <el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/>
    </el-table>
      </div>
    </el-card>
    <div style="display: flex;">
  <div style="width: 49%;float: left;">
    <div style="display: flex;">
        <img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
        <el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 2%;"
     :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
        >
          <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60" />
          <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80" />
          <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80" />
          <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80" />
          <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80" />
        </el-table>
    </div>
  </div>
    <div style="width: 48%;float: right;">
      <div style="display: flex;">
        <img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
        <el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 2%;"
     :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
        >
          <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60" />
          <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80" />
          <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80" />
          <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80" />
          <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80" />
        </el-table>
    </div>
</div>
</div>
  <el-dialog v-model="blind" top="30vh" width="25%" :title="$t('basicData.startfilm')">
    <template #footer>
      <div id="dialog-footer">
@@ -839,57 +323,25 @@
      </div>
    </template>
</el-dialog>
    <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('basicData.whetherpause')">
  <el-dialog v-model="blinda" top="24vh" width="30%" :title="$t('basicData.whetherpause')">
    <div style="margin-left: 50px;margin-bottom: 10px;">
    <el-form-item :label="$t('Mounting.loadingline')" :required="true">
    <el-select v-model="loadingline" clearable :placeholder="$t('Mounting.inloadingline')" style="margin-left: 20px;" >
      <el-option :label="$t('Mounting.all')" value="0"></el-option>
      <el-option :label="$t('Mounting.oneloadingline')" value="1"></el-option>
      <el-option :label="$t('Mounting.twoloadingline')" value="2"></el-option>
    </el-select>
    </el-form-item>
    </div>
      <template #footer>
        <div id="dialog-footer">
          <el-button type="primary" @click="handlea">
        <el-button type="primary" @click="handleup">
            {{ $t('basicData.confirm') }}
          </el-button>
          <el-button @click="blinda = false">{{ $t('basicData.cancel') }}</el-button>
        </div>
      </template>
    </el-dialog>
    <!-- <el-dialog v-model="blindb" top="30vh" width="25%" title="是否停止任务?" >
      <template #footer>
        <div id="dialog-footer">
          <el-button type="primary" @click="handleb">
            确认
          </el-button>
          <el-button @click="blindb = false">取消</el-button>
        </div>
      </template>
    </el-dialog> -->
    <div id="parent">
      <img src="../../assets/shangpian.png" alt=""
           style="max-width: 40%;max-height: 40%;margin-top: 20px;margin-left: 340px;">
      <div id="overlay" v-show="flake"></div>
      <div id="overlaya" v-show="flakea"></div>
      <div id="overlayb" v-show="flakeb"></div>
      <div id="overlayc" v-show="flakec"></div>
    </div>
    <div style="margin-top: -300px;margin-left: 680px;">
      <el-table :data="tableDataa" border style="width: 85%"
                :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
      >
        <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60"/>
        <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80"/>
        <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80"/>
        <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80"/>
        <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80"/>
        <el-table-column fixed="right" :label="$t('basicData.operate')" align="center" width="150">
          <template #default="scope">
            <el-button size="mini" type="text" plain @click="handleBindRack(scope.row)">{{
                $t('basicData.add')
              }}
            </el-button>
            <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">{{
                $t('basicData.delete')
              }}
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <el-dialog v-model="add" top="23vh" width="45%" :title="$t('basicData.addglass')">
      <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
@@ -1018,9 +470,15 @@
    </template>
  </el-dialog>
  </div>
  <el-dialog v-model="dialogFormVisible" top="24vh" width="30%" :title="$t('basicData.project')">
    <div style="margin-left: 50px;margin-bottom: 10px;">
      <el-form-item :label="$t('basicData.projectnumber')" :required="true">
  <el-dialog v-model="dialogFormVisible" top="24vh" width="50%"  >
    <div class="flex-container" style="margin-left: 50px;margin-bottom: 10px;">
    <el-form-item :label="$t('Mounting.loadingline')" :required="true">
    <el-select v-model="loadingline" clearable :placeholder="$t('Mounting.inloadingline')"  >
      <el-option :label="$t('Mounting.oneloadingline')" value="1"></el-option>
      <el-option :label="$t('Mounting.twoloadingline')" value="2"></el-option>
    </el-select>
              </el-form-item>
      <el-form-item :label="$t('Mounting.projecta')" :required="true">
        <el-select
            v-model="selectedProjectNo"
            filterable
@@ -1050,6 +508,19 @@
</template>
 
<style scoped>
 .flex-container {
  display: flex;
  align-items: center; /* 垂直居中 */
}
.flex-container .el-form-item {
  flex: 1; /* 使每个表单项占据相等的空间 */
  margin-right: 0; /* 移除默认的右侧边距 */
}
.flex-container .el-form-item:last-child {
  margin-left: 20px; /* 为第二个表单项添加左侧边距 */
}
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
@@ -1057,7 +528,6 @@
  text-align: center;
  margin-top: -15px;
}
#dotClass {
  display: flex;
  margin-left: 20px;
@@ -1065,51 +535,4 @@
  margin-top: 20px;
  margin-bottom: 10px;
}
#parent {
  position: relative;
  width: 1500px;
  margin-left: -300px
}
#overlayb {
  position: absolute;
  z-index: 1;
  width: 228px;
  height: 16px;
  background-color: #529b2e;
  margin-top: -303px;
  margin-left: 355px;
}
#overlayc {
  position: absolute;
  z-index: 1;
  width: 228px;
  height: 16px;
  background-color: #529b2e;
  margin-top: -303px;
  margin-left: 703px;
}
#overlay {
  position: absolute;
  z-index: 1;
  width: 228px;
  height: 16px;
  background-color: #529b2e;
  margin-top: -45px;
  margin-left: 355px;
}
#overlaya {
  position: absolute;
  z-index: 1;
  width: 228px;
  height: 16px;
  background-color: #529b2e;
  margin-top: -45px;
  margin-left: 703px;
}
</style>
UI-Project/src/views/Slicecage/slicecage.vue
@@ -1,17 +1,19 @@
<script lang="ts" setup>
import {useI18n} from 'vue-i18n'
  const { t } = useI18n()
  let language = ref(localStorage.getItem('lang') || 'zh')
import {Search} from "@element-plus/icons-vue";
import {useRouter} from "vue-router"
const router = useRouter()
import request from "@/utils/request"
import {host, WebSocketHost} from '@/utils/constants'
import {computed, onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {ElMessage, ElMessageBox} from 'element-plus'
import PrintLabel from "@/views/UnLoadGlass/PrintCustomLabelSemi1.vue";
const dialogFormVisibleaDownGlasss = ref(false)
const scanGlass = ref([])
const {t} = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const router = useRouter()
import { tr } from "element-plus/es/locale";
const dialogFormVisible = ref(false)
const dialoglea = ref(false)
const dialogFormVisiblea = ref(false)
@@ -955,7 +957,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-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">{{ $t('searchOrder.searchlayout') }}</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-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
      @click="dialogFormVisibleaDownGlasss = true">人工下片
@@ -1605,21 +1607,21 @@
          </el-col>
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('满炉数量')"  style="width: 14vw">
              <el-form-item :label="$t('searchOrder.fullfurnaces')" style="width: 14vw">
                {{ fulltotals }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
              <el-form-item :label="$t('当前指定工程')"  style="width: 14vw">
              <el-form-item :label="$t('searchOrder.specifiedproject')" style="width: 14vw">
                {{ temperingengineerId }}
              </el-form-item>
              </div>
          </el-col>
          <el-col :span="4">
              <div id="dt" style="font-size: 15px;">
                <el-button size="mini" type="text" plain @click="broked()">{{ $t('取消指定') }}</el-button>
                <el-button size="mini" type="text" plain @click="broked()">{{ $t('searchOrder.undesignate') }}</el-button>
              </div>
          </el-col>
        </el-row>
@@ -1629,23 +1631,15 @@
        :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/>
          <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" />
          <el-table-column prop="count2" align="center" :label="$t('总数量')" min-width="150" />
          <el-table-column prop="count1" align="center" :label="$t('笼子内数量')" min-width="150" />
          <el-table-column prop="count3" align="center" :label="$t('缺少数量')" min-width="150" />
          <el-table-column prop="count4" align="center" :label="$t('破损/拿走数量')" min-width="150" />
          <el-table-column prop="count2" align="center" :label="$t('searchOrder.allnumber')" min-width="150" />
          <el-table-column prop="count1" align="center" :label="$t('searchOrder.numbercages')" min-width="150" />
          <el-table-column prop="count3" align="center" :label="$t('searchOrder.missingquantity')" min-width="150" />
          <el-table-column prop="count4" align="center" :label="$t('searchOrder.breakquantity')" min-width="150" />
          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="250">
            <template #default="scope">
              <el-button size="mini" type="text" plain @click="brokee(scope.row,1)">
                {{ $t('searchOrder.specifytempering') }}
              </el-button>
              <el-button size="mini" type="text" plain @click="brokee(scope.row,0)">{{
                  $t('searchOrder.specifyout')
                }}
              </el-button>
              <el-button size="mini" type="text" plain @click="brokek(scope.row)">{{
                  $t('searchOrder.specifyengineerid')
                }}
              </el-button>
              <el-button size="mini" type="text" plain @click="brokee(scope.row,1)">{{ $t('searchOrder.specifytempering') }}</el-button>
              <el-button size="mini" type="text" plain @click="brokee(scope.row,0)">{{ $t('searchOrder.specifyout') }}</el-button>
              <el-button size="mini" type="text" plain @click="brokek(scope.row)">{{ $t('searchOrder.specifyengineerid') }}</el-button>
            </template>
        </el-table-column>
        </el-table>
@@ -1679,7 +1673,7 @@
    <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="layer" align="center" :label="$t('searchOrder.ceng')" />
          <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">
UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -155,20 +155,20 @@
<template>
  <div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('请选择线路')" clearable style="margin-left: 20px;margin-bottom: 10px;">
            <el-option label="磨边一线" value="2001"></el-option>
            <el-option label="磨边二线" value="2002"></el-option>
      <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('workOrder.cway')" clearable style="margin-left: 20px;margin-bottom: 10px;">
            <el-option :label="$t('workOrder.edgingone')" value="2001"></el-option>
            <el-option :label="$t('workOrder.edgingtwo')" value="2002"></el-option>
          </el-select>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('请选择状态')" clearable style="margin-left: 20px;margin-bottom: 10px;" >
            <el-option label="未磨边" value="0"></el-option>
            <el-option label="磨边中" value="1"></el-option>
            <el-option label="已磨边" value="2"></el-option>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('workOrder.cstate')" clearable style="margin-left: 20px;margin-bottom: 10px;" >
            <el-option :label="$t('workOrder.nedging')" value="0"></el-option>
            <el-option :label="$t('workOrder.edging')" value="1"></el-option>
            <el-option :label="$t('workOrder.finedging')" value="2"></el-option>
          </el-select>
          <span class="demonstration" style="margin-left: 20px;margin-bottom: 10px;">时间段</span>
            <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期"  style="margin-left: 20px;margin-bottom: 10px;" value-format = "YYYY-MM-DD hh:mm:ss"
          <span class="demonstration" style="margin-left: 20px;margin-bottom: 10px;">{{ $t('workOrder.time') }}</span>
            <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')"  style="margin-left: 20px;margin-bottom: 10px;" value-format = "YYYY-MM-DD hh:mm:ss"
            
              end-placeholder="结束日期">
              :end-placeholder="$t('reportmanage.endtime')">
            </el-date-picker>
          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="setEdgGlassInfoRequest()">{{
        $t('reportmanage.inquire')
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -446,13 +446,13 @@
<template>
  <div>
    <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
      @click="dialogFormVisibleaDownGlass = true">落架详情
      @click="dialogFormVisibleaDownGlass = true">{{ $t('reportWork.details') }}
    </el-button>
    <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
      @click="dialogFormVisibleaDownGlasss = true">人工下片
      @click="dialogFormVisibleaDownGlasss = true">{{ $t('reportWork.filming') }}
    </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" />
      :inactive-text="$t('basicData.printing')" @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;">
@@ -465,8 +465,8 @@
            <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" />
            <el-table-column prop="layer" align="center" :label="$t('reportWork.cenumber')" min-width="120" />
            <el-table-column prop="otherNumber" align="center" :label="$t('reportWork.artificialorder')" 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">
@@ -483,17 +483,17 @@
                </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="open1(scope.row)" :disabled="scope.row.flowCardId == null">打印标签</el-button>
                <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.processcard') }}</el-button>
                <el-button @click="open1(scope.row)" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.printlabels') }}</el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <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-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('reportWork.information')">
          <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('reportWork.cstation')" clearable>
            <el-option :label="$t('reportWork.all')" value="0"></el-option>
            <el-option label="1" value="1"></el-option>
            <el-option label="2" value="2"></el-option>
            <el-option label="3" value="3"></el-option>
@@ -508,9 +508,9 @@
            <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="结束日期">
          <span class="demonstration">{{ $t('reportWork.timeperiod') }}</span>
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')"
            value-format="YYYY-MM-DD hh:mm:ss" :end-placeholder="$t('reportmanage.endtime')">
          </el-date-picker>
          <el-button type="primary" style="margin-left: 10px;" @click="selectDownGlassData()">{{
@@ -519,19 +519,19 @@
          </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" />
            <el-table-column prop="workStationId" align="center" :label="$t('reportWork.stationnumber')" min-width="80" />
            <el-table-column prop="engineerId" align="center" :label="$t('basicData.projectnumber')" min-width="80" />
            <el-table-column prop="flowCardId" align="center" :label="$t('workOrder.cardnumber')" min-width="80" />
            <el-table-column prop="layer" align="center" :label="$t('searchOrder.ceng')" min-width="120" />
            <el-table-column prop="sequence" align="center" :label="$t('reportWork.order')" min-width="150" />
            <el-table-column prop="width" align="center" :label="$t('basicData.width')" min-width="120" />
            <el-table-column prop="height" align="center" :label="$t('basicData.height')" min-width="120" />
            <el-table-column prop="Filmsid" align="center" :label="$t('basicData.coatingtypes')" min-width="120" />
            <el-table-column prop="thickness" align="center" :label="$t('basicData.thickness')" min-width="120" />
            <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="120" />
          </el-table>
        </el-dialog>
        <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('人工下片信息')">
        <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('searchOrder.filminformation')">
          <div style="display:flex;justify-content: space-around;">
            <el-card
              style="display: flex; justify-content: center; align-items: center; width:800px; height: 800px;position: relative;">
@@ -540,8 +540,8 @@
              </div>
              <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:170px;">
                <div>人工下片当前玻璃信息</div>
                <div><el-button type="primary" @click="open1(takeGlass)" >打印标签</el-button></div>
                <div>{{ $t('reportWork.glassmation') }}</div>
                <div><el-button type="primary" @click="open1(takeGlass)" >{{ $t('reportWork.printlabels') }}</el-button></div>
                <div>{{ takeGlass.flowCardId }}</div>
                <div>{{ takeGlass.layer }}</div>
                <div>{{ takeGlass.glassId }}</div>
@@ -556,8 +556,8 @@
              </div>
              <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:200px;">
                <div>扫码枪当前玻璃信息</div>
                <div><el-button type="primary" @click="open1(scanGlass)" >打印标签</el-button></div>
                <div>{{ $t('reportWork.barcodescanner') }}</div>
                <div><el-button type="primary" @click="open1(scanGlass)" >{{ $t('reportWork.printlabels') }}</el-button></div>
                <div>{{ scanGlass.flowCardId }}</div>
                <div>{{ scanGlass.layer }}</div>
                <div>{{ scanGlass.glassId }}</div>
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
@@ -2,12 +2,12 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.temperingglass.mapper.TemperingGlassInfoMapper;
import com.mes.temperingglass.service.TemperingGlassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.yulichang.base.MPJBaseServiceImpl;
import java.util.List;
@@ -29,7 +29,7 @@
    public List<TemperingGlassInfo> selectWaitingGlass() {
        //获取等待进炉中的玻璃信息
        QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
        wrapper.select("Top 1 *").in("state", 1, 0, -1);
        wrapper.select("Top 1 *").in("state",1,0);
        TemperingGlassInfo glass=temperingMapper.selectOne(wrapper);
        if(glass!=null) {
            QueryWrapper<TemperingGlassInfo> glassinfo = new QueryWrapper<>();
hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml
@@ -27,7 +27,7 @@
        on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
        where fc.process_id = #{processId}
        <if test="technologyNumber != 0">
            and fc.technology_number = #{technologyNumber}
            and a.layer = #{technologyNumber}
        </if>
        <if test="technologyNumber != 0">
            and position(fc.technology_number in #{technologyNumber})
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/service/impl/EdgStorageCageDetailsServiceImpl.java
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -80,12 +80,6 @@
    @Value("${mes.max.secondLength}")
    private String secondLength;
    @Value("${mes.cache.cacheWidth}")
    private double cacheWidth;
    @Value("${mes.cache.cacheHeight}")
    private double cacheHeight;
    @Value("${mes.min.one.firstLength}")
    private String minOneFirstLength;
@@ -100,7 +94,7 @@
    public static String engineerId = "";
    @Scheduled(fixedDelay = 1000)
    //@Scheduled(fixedDelay = 1000)
    public void plcHomeEdgTask() {
        Date startDate = new Date();
        log.info("本次任务开始执行时间:{}", startDate);
@@ -113,13 +107,6 @@
        String out10Glassstate = plcParameterObject.getPlcParameter("A10_glass_status").getValue();
        String confirmationWrodAddress = plcParameterObject.getPlcParameter("MES_confirmation_word").getAddress();
        String currentSlot = plcParameterObject.getPlcParameter("Current_slot").getValue();
//        taskRequestTypeValue = "3";
//        out08Glassstate = "1";
//        out10Glassstate = "1";
//        currentSlot = "2";
//        confirmationWrodValue = "0";
//        glassIdeValue = "P24092706|15|5";
        log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:A09:{}、A10:{},当前格子号为:{}",
                taskRequestTypeValue, glassIdeValue, confirmationWrodValue, out08Glassstate, out10Glassstate, currentSlot);
@@ -145,7 +132,7 @@
            //09空闲 :1      10空闲 :2        都空闲:3    其他0
            log.info("2、出片请求,且确认字为0,执行出片任务");
            outTo(Integer.parseInt(out08Glassstate),
                    Integer.parseInt(out10Glassstate), confirmationWrodAddress, "", Integer.parseInt(currentSlot));
                    Integer.parseInt(out10Glassstate), confirmationWrodAddress, "", 0);
        } else if ("3".equals(taskRequestTypeValue)) {
            log.info("2、进片和出片都空闲,执行出片任务");
            //加笼子里面是否有玻璃,有先出,无玻璃先进
@@ -178,9 +165,9 @@
                Damage damage = new Damage();
                damage.setGlassId(e.getGlassId());
                damage.setLine(e.getEndCell());
                damage.setWorkingProcedure("磨边");
                damage.setWorkingProcedure("冷加工");
                damage.setRemark("磨边前卧式理片");
                damage.setStatus(1);
                damage.setStatus(0);
                damage.setType(e.getTaskStatus());
                return damage;
            }).collect(Collectors.toList());
@@ -200,16 +187,6 @@
     */
    public void inTo(String glassId, String confirmationWrodAddress, String currentSlot) {
        log.info("1、按照玻璃id:{}获取玻璃小片信息,当前格子为:{}", glassId, currentSlot);
        GlassInfo feedGlassInfo = glassInfoService.getOne(
                new LambdaQueryWrapper<GlassInfo>()
                        .eq(GlassInfo::getGlassId, glassId)
        );
        if (Math.max(feedGlassInfo.getWidth(), feedGlassInfo.getHeight()) > cacheWidth || Math.min(feedGlassInfo.getWidth(), feedGlassInfo.getHeight()) > cacheHeight) {
            log.info("1.1、玻璃超过卧式理片最大尺寸:{}", feedGlassInfo);
            return;
        }
        //添加进片任务  查找空格
        EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(Integer.parseInt(currentSlot), Boolean.FALSE);
        Assert.isTrue(null != nearestEmpty, "格子已满");
@@ -256,14 +233,11 @@
                .eq(GlassInfo::getHeight, glassInfo.getHeight())
                .eq(GlassInfo::getThickness, glassInfo.getThickness())
                .eq(GlassInfo::getFilmsid, glassInfo.getFilmsid())
                .eq(GlassInfo::getFlowCardId, glassInfo.getFlowCardId())
                .ne(GlassInfo::getGlassId, glassInfo.getGlassId())
                .eq(GlassInfo::getTotalLayer, glassInfo.getTotalLayer())
                .eq(GlassInfo::getLayer, glassInfo.getLayer())
                .eq(GlassInfo::getEngineerId, glassInfo.getEngineerId())
                .notInSql(GlassInfo::getGlassId, "select distinct glass_id from edg_storage_cage_details " +
                        "where engineer_id = '" + glassInfo.getEngineerId() + "' and width = " + glassInfo.getWidth() + " and height = " + glassInfo.getHeight()
                        + " and state != 100")
                        "where engineer_id = '" + glassInfo.getEngineerId() + "' and width = " + glassInfo.getWidth() + " and height = " + glassInfo.getHeight())
                .orderByAsc(GlassInfo::getTemperingLayoutId)
                .orderBy(Boolean.TRUE, sequenceOrder, GlassInfo::getTemperingFeedSequence)
                .last("Limit 1");
@@ -298,28 +272,17 @@
//        获取待出笼的玻璃需要替换的玻璃信息
        EdgStorageCageDetails swapGlassDetailInfo = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>()
                .eq(EdgStorageCageDetails::getGlassId, swapGlassId).eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN));
//      玻璃小片表中玻璃已经替换,更新卧理笼内现有的准备出笼的玻璃信息,
        if (null == swapGlassDetailInfo) {
            GlassInfo glassInfoBase = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
                    .eq(GlassInfo::getGlassId, swapGlassId));
            //需要替换的玻璃为存进卧理,仅需更新当前需要出笼的玻璃信息即可
            edgStorageCageDetailsService.update(new LambdaUpdateWrapper<EdgStorageCageDetails>()
                    .eq(EdgStorageCageDetails::getGlassId, glassId)
                    .set(EdgStorageCageDetails::getTemperingLayoutId, glassInfoBase.getTemperingLayoutId())
                    .set(EdgStorageCageDetails::getTemperingFeedSequence, glassInfoBase.getTemperingFeedSequence()));
                    .eq(EdgStorageCageDetails::getGlassId, glassId).set(EdgStorageCageDetails::getGlassId, swapGlassId));
        } else {
            //需要替换的玻璃都在卧理内,按照玻璃id对调玻璃信息:对调玻璃id即可
            edgStorageCageDetailsService.update(new LambdaUpdateWrapper<EdgStorageCageDetails>()
                    .eq(EdgStorageCageDetails::getId, glassInfo.getId())
                    .set(EdgStorageCageDetails::getTemperingLayoutId, swapGlassDetailInfo.getTemperingLayoutId())
                    .set(EdgStorageCageDetails::getTemperingFeedSequence, swapGlassDetailInfo.getTemperingFeedSequence())
            );
                    .eq(EdgStorageCageDetails::getId, glassInfo.getId()).set(EdgStorageCageDetails::getGlassId, swapGlassId));
            edgStorageCageDetailsService.update(new LambdaUpdateWrapper<EdgStorageCageDetails>()
                    .eq(EdgStorageCageDetails::getId, swapGlassDetailInfo.getId())
                    .set(EdgStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId())
                    .set(EdgStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence())
            );
                    .eq(EdgStorageCageDetails::getId, swapGlassDetailInfo.getId()).set(EdgStorageCageDetails::getGlassId, glassId));
        }
    }
@@ -454,7 +417,7 @@
                }
            }
        }
        return saveOutGlassMessageBySlot(glassInfo, endcell, confirmationWrodAddress, glassId, currentSlot);
        return saveOutGlassMessage(glassInfo, endcell, confirmationWrodAddress, glassId, currentSlot);
    }
    /**
@@ -696,7 +659,6 @@
            log.info("4、添加出片任务,玻璃id:{},任务类型:{},起始位置:{},结束位置:{}", glassInfo.getGlassId(),
                    2, glassInfo.getSlot(), endcell);
            if (glassInfo.getGlassId().equals(glassId)) {
                log.info("5、直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo);
                EdgStorageCageDetails details = new EdgStorageCageDetails();
                BeanUtils.copyProperties(glassInfo, details);
@@ -756,7 +718,7 @@
                    BeanUtils.copyProperties(glassInfo, details);
                } else {
                    GlassInfo one = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId));
                    BeanUtils.copyProperties(one, details);
                    BeanUtils.copyProperties(glassInfo, details);
                }
                EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(currentSlot, Boolean.TRUE);
                Assert.isTrue(null != nearestEmpty, "格子已满,无法执行直通任务");
@@ -768,7 +730,7 @@
                log.info("6、添加出片任务是否完成:{}", taskCacheStatus);
            } else {
                log.info("5、非直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo);
                if (!glassInfo.getSlot().equals(currentSlot)) {
                if (endcell != currentSlot) {
                    EdgStorageCageDetails currentGlass = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>()
                            .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)
                            .eq(EdgStorageCageDetails::getSlot, currentSlot).eq(EdgStorageCageDetails::getWidth, glassInfo.getWidth())
@@ -776,6 +738,7 @@
                    );
                    if (null != currentGlass) {
                        glassInfo = currentGlass;
                        endcell = currentSlot;
                    }
                }
                //玻璃信息替换
@@ -805,7 +768,6 @@
        }
        return Boolean.FALSE;
    }
    /**
     * 添加理片笼任务
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/application.yml
@@ -30,7 +30,12 @@
      secondLength: 400
  sequence:
    order: false
kangaroohy:
  milo:
    enabled: false
    primary: default
    config:
      default:
        endpoint: opc.tcp://127.0.0.1:49320
        security-policy: basic256sha256
        username: zsh
        password: 1qaz2wsx3edc4rfv
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
@@ -3,6 +3,7 @@
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.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
@@ -91,8 +92,7 @@
    @ApiOperation("指定钢化")
    @PostMapping("/TemperingGlass")
    public Result temperingGlass(@RequestBody BigStorageCageDetails bigStorageCageDetails) {
        boolean result = bigStorageCageDetailsService
                .temperingGlass(bigStorageCageDetails.getTemperingLayoutId().toString(), bigStorageCageDetails.getEngineerId(), bigStorageCageDetails.getTemperingFeedSequence().toString());
        boolean result = bigStorageCageDetailsService.temperingGlass(bigStorageCageDetails.getTemperingLayoutId().toString(), bigStorageCageDetails.getEngineerId());
        if (result == true) {
            return Result.build(200, "指定钢化成功", 1);
        } else {
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java
@@ -69,7 +69,7 @@
     */
    List<SlotSequenceDTO> queryGlassMaxAndMin(String engineerId, Integer temperingLayoutId);
    boolean temperingGlass(String temperingLayoutId, String engineerId, String temperingFeedSequence);
    boolean temperingGlass(String temperingLayoutId, String engineerId);
    List<Map<String, Object>> selectTemperingGlass();
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
@@ -2,6 +2,7 @@
import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.toolkit.JoinWrappers;
@@ -26,7 +27,6 @@
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.mapper.GlassInfoMapper;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.job.PlcStorageCageTask;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.temperingglass.mapper.TemperingGlassInfoMapper;
import com.mes.temperingglass.service.TemperingGlassInfoService;
@@ -70,9 +70,6 @@
    @Resource
    private TemperingGlassInfoService temperingGlassInfoService;
    @Resource
    private PlcStorageCageTask plcStorageCageTask;
    @Resource
    private DamageService damageService;
@@ -366,7 +363,7 @@
    }
    @Override
    public boolean temperingGlass(String temperingLayoutId, String engineerId, String temperingFeedSequence) {
    public boolean temperingGlass(String temperingLayoutId, String engineerId) {
        LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
        temperingGlassInfoLambdaQueryWrapper
                .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW);
@@ -383,13 +380,7 @@
                    .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN)
                    .orderBy(Boolean.TRUE, sequenceOrder, GlassInfo::getTemperingFeedSequence));
            if (CollectionUtils.isNotEmpty(temperingGlassInfos)) {
                if ("0".equals(temperingFeedSequence)) {
                    if (CollectionUtils.isNotEmpty(temperingGlassInfos)) {
                        plcStorageCageTask.computeOutMoreGlassInfo(temperingGlassInfos, Boolean.FALSE, "");
                    }
                } else {
                    temperingGlassInfoService.saveBatch(temperingGlassInfos);
                }
                return true;
            }
        }
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/test/java/com/mes/CacheVerticalGlassModuleApplicationTest.java
@@ -2,11 +2,13 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper;
import com.mes.common.config.Const;
import com.mes.damage.entity.Damage;
import com.mes.damage.service.DamageService;
@@ -15,6 +17,7 @@
import com.mes.job.PlcStorageCageTask;
import com.mes.pp.entity.ReportingWork;
import com.mes.pp.entity.ReportingWorkDetail;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -29,9 +32,7 @@
import java.net.URL;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.*;
/**
 * @Author : zhoush
@@ -172,7 +173,7 @@
        Damage damage=new Damage();
        damage.setGlassId("P24060403|3|6");
        damage.setLine(2001);
        damage.setWorkingProcedure("磨边");
        damage.setWorkingProcedure("冷加工");
        damage.setRemark("");
        damage.setStatus(2);
        damageService.insertDamage(damage);
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/job/RawGlassTask.java
@@ -2,11 +2,11 @@
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.service.MiloService;
import com.mes.common.config.Const;
import com.mes.engineering.entity.Engineering;
import com.mes.engineering.mapper.EngineeringMapper;
import com.mes.milo.model.ReadWriteEntity;
import com.mes.milo.service.MiloService;
import com.mes.rawglassdetails.entity.RawGlassStorageDetails;
import com.mes.rawglassdetails.service.RawGlassStorageDetailsService;
import com.mes.rawglassstation.entity.RawGlassStorageStation;
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -18,4 +18,3 @@
  milo:
    enabled: false
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -10,7 +10,6 @@
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
kangaroohy:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImplkangaroohy:
  milo:
    enabled: false
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java
@@ -152,7 +152,7 @@
                damage.setLine(Const.TEMPERING_OUT_TARGET_POSITION);
                damage.setWorkingProcedure("钢化");
                damage.setRemark("钢化");
                damage.setStatus(1);
                damage.setStatus(0);
                damage.setType(e.getState());
                return damage;
            }).collect(Collectors.toList());
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -20,7 +20,7 @@
    primary: default
    config:
      default:
        endpoint: opc.tcp://10.153.19.150:49320
        endpoint: opc.tcp://zidonghua:49320
        security-policy: basic256sha256
        username: admin
        username: zsh
        password: 1qaz2wsx3edc4rfv
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
@@ -1,5 +1,6 @@
package com.mes.downglassinfo.service.impl;
import cn.smallbun.screw.core.util.CollectionUtils;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -18,7 +19,6 @@
import com.mes.downworkstation.entity.dto.DownGlassInfoDTO;
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.job.DownLoadCacheGlassTask;
import com.mes.pp.service.FlowCardService;
import lombok.extern.slf4j.Slf4j;
@@ -31,6 +31,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@Service
@@ -51,9 +52,6 @@
    @Autowired
    FlowCardService flowCardService;
    @Autowired
    GlassInfoService glassInfoService;
    /**
     * 根据流程卡号查询最大序号
@@ -226,15 +224,8 @@
    @Override
    public List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo) {
        List<Map<String, Object>> resultList = null;
        if (downGlassInfo.getGlassId() != null) {
            resultList = glassInfoService.listMaps(
                    new LambdaQueryWrapper<GlassInfo>()
                            .eq(GlassInfo::getGlassId, downGlassInfo.getGlassId())
            );
        } else {
            resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer());
        }
        List<Map<String, Object>> resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer());
        log.info("MES落架数据:{}", resultList);
        //获取ERP标签所需的信息
        List<Map<String, Object>> labelInfo;
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
@@ -30,6 +30,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -92,6 +93,7 @@
        String confirmationWrodValue = plcParameterObject.getPlcParameter("confirmationWord").getValue();
        String confirmationWrodAddress = plcParameterObject.getPlcParameter("confirmationWord").getAddress();
        String currentSlot = plcParameterObject.getPlcParameter("currentCell").getValue();
        log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:g06:{}、g08:{}、g11:{}、g13:{},当前格子号为:{}",
                requestWord, glassIdeValue, confirmationWrodValue, out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, currentSlot);
@@ -167,9 +169,9 @@
                Damage damage = new Damage();
                damage.setGlassId(e.getGlassId());
                damage.setLine(Const.TEMPERING_OUT_TARGET_POSITION);
                damage.setWorkingProcedure("钢化");
                damage.setWorkingProcedure("下片");
                damage.setRemark("下片");
                damage.setStatus(1);
                damage.setStatus(0);
                damage.setType(e.getTaskStatus());
                return damage;
            }).collect(Collectors.toList());
hangzhoumesParent/readMe-OPC.md
File was deleted
pom.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>groupId</groupId>
    <artifactId>HangZhouMes</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>