Merge remote-tracking branch 'origin/master'
| | |
| | | updatanull:'该工程未保存到上片表!', |
| | | glassnull:'更新玻璃状态时发生错误', |
| | | deletemessage:'是否删除该条信息?', |
| | | layoutSequence:'序号', |
| | | }, |
| | | sorter:{ |
| | | gridnumber:'栅格号', |
| | |
| | | alt="" |
| | | style="max-width: 100%;max-height: 100%"> |
| | | <h3 style="margin: 1rem ;font-weight: bold;width: 33vw;"> {{ $t('main.titleFirst') }}{{ user }}{{ $t('main.titleLast') }}</h3> |
| | | <!-- <div class="header-left"> |
| | | <el-button :icon="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="toggleCollapse" |
| | | style="height:30px;"></el-button> |
| | | </div> --> |
| | | <span style="height: 70%;width: 78vw;margin-top: 1rem;"> |
| | | <!-- <el-button class="sys-quit" |
| | | @click="quit" |
| | |
| | | if (!msg.data) {
|
| | | return;
|
| | | }
|
| | | messages += msg.data;
|
| | | |
| | | const isLastChunk = msg.data.endsWith('<END>');
|
| | | //是否为最后一块消息
|
| | | if(isLastChunk) {
|
| | | messages += msg.data;
|
| | | if(isLastChunk||msg.data.length<50000) {
|
| | | messages= messages.replace('<END>', '');
|
| | | const obj = JSON.parse(messages);
|
| | |
|
| | |
| | | // 破损 |
| | | const handleDamage = async () => { |
| | | try { |
| | | var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+201; |
| | | console.log(url); |
| | | const response = await request.post(url) |
| | | // const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | // identId: currentGlassId.value, |
| | | // controlsId: 201, |
| | | // }) |
| | | // var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+201; |
| | | // console.log(url); |
| | | // const response = await request.post(url) |
| | | const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | identId: currentGlassId.value, |
| | | controlsId: 201, |
| | | line: 1001, |
| | | machine: '识别', |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | blind.value = false; |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // // 人工拿走 |
| | | // 人工拿走 |
| | | const handleManualTake = async () => { |
| | | try { |
| | | var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+200; |
| | | console.log(url); |
| | | const response = await request.post(url) |
| | | // const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | // identId: currentGlassId.value, |
| | | // controlsId: 200, |
| | | // }) |
| | | // var url="/cacheGlass/taskCache/identControls?identId="+currentGlassId.value+'&controlsId='+200; |
| | | // console.log(url); |
| | | // const response = await request.post(url) |
| | | const response = await request.post('/cacheGlass/taskCache/identControls', { |
| | | identId: currentGlassId.value, |
| | | controlsId: 200, |
| | | line: 1001, |
| | | machine: '识别', |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | |
| | | const adjustedRects2 = ref([]); |
| | | const adjustedRectsa = ref([]); |
| | | const adjustedRectsb = ref([]); |
| | | const currentGlassId = ref(null); |
| | | const currenttemperingFeedSequence = ref(null); |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; |
| | | const handleMessage = (data) => { |
| | | // 进炉中 |
| | |
| | | onMounted(() => { |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | function getRectColor(state) { |
| | | function updateRectColors() { |
| | | adjustedRectsa.value.forEach(rect => { |
| | | if (rect.glassId === glassId) { |
| | | rect.state = 5; |
| | | } |
| | | }); |
| | | } |
| | | function getRectColora(state) { |
| | | switch (state) { |
| | | case 0: |
| | | return '#f8e3c5'; |
| | | return '#d1edc4'; |
| | | case 1: |
| | | return '#d1edc4'; |
| | | return '#E6E6FA'; |
| | | case -1: |
| | | return '#dedfe0'; |
| | | case 5: |
| | | return '#911005'; |
| | | } |
| | | } |
| | | function getRectColorb(state) { |
| | | switch (state) { |
| | | case 3: |
| | | return '#f8e3c5'; |
| | | case 4: |
| | | return '#F0F8FF'; |
| | | case 5: |
| | | return '#911005'; |
| | | } |
| | | } |
| | | function showDialog(row) { |
| | | } |
| | | function showDialog(rect) { |
| | | currentGlassId.value = rect.glassId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | | blind.value = true; |
| | | } |
| | | // 破损 |
| | | const handleDamage = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', { |
| | | glassId: currentGlassId.value, |
| | | // temperingFeedSequence: currenttemperingFeedSequence.value, |
| | | line: 4001, |
| | | status: 2, |
| | | workingProcedure: '钢化', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blind.value = false; |
| | | updateRectColors(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.ycoordinate}px`, |
| | | left: `${rect.xcoordinate}px`, |
| | | width: `${rect.width}px`, |
| | | height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 5 ? '#911005' : 'lightblue' }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div >{{ rect.glassId }}</div> |
| | |
| | | <div |
| | | v-for="(rect, index) in adjustedRects2" |
| | | :key="index" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.ycoordinate}px`, |
| | | left: `${rect.xcoordinate}px`, |
| | | width: `${rect.width}px`, |
| | | height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 5 ? '#911005' : 'lightblue' }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div >{{ rect.flowCardId }}</div> |
| | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading"> |
| | | <div v-if="adjustedRectsa.length > 0"> |
| | | <div style="text-align: center;">炉号:{{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div> |
| | | <!-- <div style="text-align: center;">流程卡: {{ adjustedRectsa[0].flowCardId }}</div> --> |
| | | <el-scrollbar height="550px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;max-width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRectsa" |
| | | :key="index" |
| | | @click="showDialog" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: getRectColor(rect.state) }"> |
| | | backgroundColor: getRectColora(rect.state) }"> |
| | | <div class="centered-text"> |
| | | <div>{{ rect.glassId }}</div> |
| | | <div >{{ rect.flowCardId }}</div> |
| | |
| | | <div |
| | | v-for="(rect, index) in adjustedRectsb" |
| | | :key="index" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }"> |
| | | backgroundColor: getRectColorb(rect.state) }"> |
| | | <!-- backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }"> --> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div >{{ rect.flowCardId }}</div> |
| | |
| | | </div> |
| | | |
| | | <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;"> |
| | | <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 140px;margin-left: 10px;"> |
| | | <el-button type="warning" plain :icon="Delete" @click="handleDamage" style="width: 140px;margin-left: 10px;"> |
| | | {{ $t('order.dilapidation') }} |
| | | </el-button> |
| | | </el-dialog> |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | font-size: small; |
| | | /* font-size: small; */ |
| | | } |
| | | </style> |
| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import request from "@/utils/request" |
| | | |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | const adjustedRects = ref([]); |
| | | const currentGlassId = ref(null); |
| | | const currenttemperingFeedSequence = ref(null); |
| | | |
| | | const dialogFormVisible = ref(true) |
| | | const dialogFormVisiblea = ref(false) |
| | | const blind = ref(false) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | }); |
| | | } |
| | | }; |
| | | function updateRectColors() { |
| | | adjustedRectsa.value.forEach(rect => { |
| | | if (rect.glassId === glassId) { |
| | | rect.state = 5; |
| | | } |
| | | }); |
| | | } |
| | | function getRectColora(state) { |
| | | switch (state) { |
| | | case 3: |
| | | return '#f8e3c5'; |
| | | case 4: |
| | | return '#F0F8FF'; |
| | | case 5: |
| | | return '#911005'; |
| | | } |
| | | } |
| | | function showDialog(rect) { |
| | | currentGlassId.value = rect.glassId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | | blind.value = true; |
| | | } |
| | | // 破损 |
| | | const handleDamage = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', { |
| | | glassId: currentGlassId.value, |
| | | // temperingFeedSequence: currenttemperingFeedSequence.value, |
| | | line: 4001, |
| | | status: 2, |
| | | workingProcedure: '钢化', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blind.value = false; |
| | | updateRectColors(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | @click="showDialog(rect)" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }"> |
| | | backgroundColor: getRectColora(rect.state) }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div >{{ rect.flowCardId }}</div> |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;"> |
| | | <el-button type="warning" plain :icon="Delete" @click="handleDamage" style="width: 140px;margin-left: 10px;"> |
| | | {{ $t('order.dilapidation') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | const flakea = ref(false) |
| | | const flakeb = ref(false) |
| | | const flakec = ref(false) |
| | | const user = ref(''); |
| | | const projectNo = ref(''); |
| | | const workstationId = ref(''); |
| | | const id = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternWidth = ref(''); |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | const ida = ref(null); |
| | |
| | | if (response.code == 200) { |
| | | tableDataa.value = response.data |
| | | if (tableDataa.value.length === 4) { |
| | | if (tableDataa.value[0].patternHeight > 0) { |
| | | 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) { |
| | | 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) { |
| | | 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) { |
| | | if (tableDataa.value[3].patternHeight > 0 && tableDataa.value[3].patternWidth > 0 && tableDataa.value[3].number > 0) { |
| | | flakec.value = true; |
| | | } |
| | | } |
| | |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | | }); |
| | | const user = ref(''); |
| | | const projectNo = ref(''); |
| | | const workstationId = ref(''); |
| | | const id = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternWidth = ref(''); |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | // 添加 |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | |
| | | patternThickness: selectedValuec.value, |
| | | number: number.value |
| | | }); |
| | | window.localStorage.setItem('workstationId', workstationId.value) |
| | | window.localStorage.setItem('patternHeight', selectedValuea.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') |
| | | if (patternHeight !== '' && workstationId === '1') { |
| | | // 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 (patternHeight !== '' && workstationId === '2'){ |
| | | } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '2'){ |
| | | flakea.value = true |
| | | }else if (patternHeight !== '' && workstationId === '3'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '3'){ |
| | | flakeb.value = true |
| | | }else if (patternHeight !== '' && workstationId === '4'){ |
| | | }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 = ''; |
| | |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | console.error(error); |
| | | alert('请求失败,请稍后再试!'); |
| | | } |
| | | } |
| | | else if( ida.value === 1 || ida.value === 3){ |
| | |
| | | patternThickness: selectedValuec.value, |
| | | number: number.value |
| | | }); |
| | | window.localStorage.setItem('workstationId', workstationId.value) |
| | | window.localStorage.setItem('patternHeight', selectedValuea.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') |
| | | if (patternHeight !== '' && workstationId === '1') { |
| | | if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '1') { |
| | | flake.value = true |
| | | } else if (patternHeight !== '' && workstationId === '2'){ |
| | | } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '2'){ |
| | | flakea.value = true |
| | | }else if (patternHeight !== '' && workstationId === '3'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '3'){ |
| | | flakeb.value = true |
| | | }else if (patternHeight !== '' && workstationId === '4'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '4'){ |
| | | flakec.value = true |
| | | } |
| | | selectedValuea.value = ''; |
| | |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | console.error(error); |
| | | alert('请求失败,请稍后再试!'); |
| | | } |
| | | } |
| | | else { |
| | |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | :data="tableData" |
| | | > |
| | | <el-table-column prop="engineeringId" :label="$t('basicData.projectnumber')" width="200" align="center"/> |
| | | <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 prop="layoutSequence" :label="$t('basicData.quantity')" align="center"/> |
| | | <el-table-column :label="$t('basicData.quantity')" 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" |
| | |
| | | width: 1500px; |
| | | margin-left: -300px |
| | | } |
| | | #overlay{ |
| | | #overlayb{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | margin-top: -303px; |
| | | margin-left: 355px; |
| | | } |
| | | #overlaya{ |
| | | #overlayc{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | margin-top: -303px; |
| | | margin-left:703px; |
| | | } |
| | | #overlayb{ |
| | | #overlay{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | margin-top: -45px; |
| | | margin-left: 355px; |
| | | } |
| | | #overlayc{ |
| | | #overlaya{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | controlsId: 300 |
| | | controlsId: 300, |
| | | line: 2001, |
| | | machine: '冷加工', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | controlsId: 301 |
| | | controlsId: 301, |
| | | line: 2001, |
| | | machine: '冷加工', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | controlsId: 300 |
| | | controlsId: 300, |
| | | line: 2002, |
| | | machine: '冷加工', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | controlsId: 301 |
| | | controlsId: 301, |
| | | line: 2002, |
| | | machine: '冷加工', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface TemperingGlassInfoService extends MPJBaseService<TemperingGlassInfo> { |
| | | |
| | | /** |
| | | * 等待中的玻璃 |
| | | * @return |
| | | */ |
| | | List<TemperingGlassInfo> selectWaitingGlass(); |
| | | |
| | | /** |
| | | * 进炉中的玻璃 |
| | | * @return |
| | | */ |
| | | List<TemperingGlassInfo> selectIntoGlass(TemperingGlassInfo temperingGlassInfo); |
| | | |
| | | /** |
| | | * 出炉中的玻璃 |
| | | * @return |
| | | */ |
| | | List<TemperingGlassInfo> selectOutGlass(); |
| | | |
| | | /** |
| | | * 钢化后的玻璃 |
| | | * @return |
| | | */ |
| | | List<TemperingGlassInfo> selectOverGlass(); |
| | | |
| | | /** |
| | | * 查询钢化后的版图id |
| | | * @return |
| | | */ |
| | | List<TemperingGlassInfo> selectLayoutId(); |
| | | |
| | | /** |
| | | * 查询钢化状态 |
| | | * @return |
| | | */ |
| | | List<TemperingGlassInfo> selectTaskType(); |
| | | |
| | | /** |
| | | * 钢化模块破损 |
| | | * @return |
| | | */ |
| | | Integer updateTemperingState(TemperingGlassInfo temperingGlassInfo); |
| | | |
| | | } |
| | |
| | | if(this.session.isOpen()){ |
| | | int maxChunkSize = 50000; // 定义最大的分块大小 |
| | | int length = message.length(); |
| | | int chunks = (int) Math.ceil((double) length / maxChunkSize); |
| | | //分块发送消息 |
| | | for (int i = 0; i < chunks; i++) { |
| | | int startIndex = i * maxChunkSize; |
| | | int endIndex = Math.min(startIndex + maxChunkSize, length); |
| | | String chunk = message.substring(startIndex, endIndex); |
| | | if(length>50000){ |
| | | int chunks = (int) Math.ceil((double) length / maxChunkSize); |
| | | //分块发送消息 |
| | | for (int i = 0; i < chunks; i++) { |
| | | int startIndex = i * maxChunkSize; |
| | | int endIndex = Math.min(startIndex + maxChunkSize, length); |
| | | String chunk = message.substring(startIndex, endIndex); |
| | | |
| | | // 判断是否是最后一块消息 |
| | | boolean isLastChunk = (i == chunks - 1); |
| | | if(isLastChunk==true){ |
| | | chunk+="<END>"; |
| | | // 判断是否是最后一块消息 |
| | | boolean isLastChunk = (i == chunks - 1); |
| | | if(isLastChunk==true){ |
| | | chunk+="<END>"; |
| | | } |
| | | // 发送分块消息,并传递是否是最后一块消息的标识 |
| | | this.session.getBasicRemote().sendText(chunk); |
| | | } |
| | | // 发送分块消息,并传递是否是最后一块消息的标识 |
| | | this.session.getBasicRemote().sendText(chunk); |
| | | }else{ |
| | | this.session.getBasicRemote().sendText(message); |
| | | } |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("发送消息给客户端失败:{}", e.getMessage(), e); |
| | |
| | | List<OptimizeUpPattenUsage> upPattenUsageList = null; |
| | | if (engineeringId != null) { |
| | | upPattenUsageList = optimizeProjectMapper.selectJoinList(OptimizeUpPattenUsage.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("t.project_no,t.glass_type,b.width,b.height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.count as stockId") |
| | | .select("t.project_no,t.glass_type,b.realwidth as width,b.realheight as height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.stock_id") |
| | | .leftJoin("optimize_layout b on t.project_no=b.project_no") |
| | | .eq("b.project_no", engineeringId)); |
| | | } |
| | |
| | | |
| | | @Test |
| | | public void testFindPa() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(12); |
| | | log.info("进炉中的玻璃:{}", Arrays.asList(glass)); |
| | | List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId(); |
| | | if(!layoutId.isEmpty()) { |
| | | List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0)); |
| | | log.info("已出中的玻璃:{}", Arrays.asList(intoGlass)); |
| | | //进炉中的第二个版图 |
| | | if (layoutId.size() > 1) { |
| | | List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1)); |
| | | log.info("已出中的玻璃:{}", Arrays.asList(intoGlass2)); |
| | | } |
| | | } |
| | | } |
| | | @Test |
| | | public void testFindPa2() { |
| | |
| | | public void testFindPa4() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectOverGlass(); |
| | | log.info("钢化后的玻璃:{}", Arrays.asList(glass)); |
| | | } |
| | | @Test |
| | | public void testFindPa5() { |
| | | List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId(); |
| | | //进炉中的玻璃 |
| | | log.info("版图id:{}", Arrays.asList(layoutId.get(0).getTemperingLayoutId())); |
| | | List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId()); |
| | | log.info("玻璃版图id:{}", Arrays.asList(intoGlass)); |
| | | List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId()); |
| | | log.info("玻璃版图id:{}", Arrays.asList(intoGlass2)); |
| | | } |
| | | } |