Merge remote-tracking branch 'origin/master'
| | |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda"> |
| | | {{ $t('hellow.starttask') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{ |
| | | <!-- <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{ |
| | | $t('hellow.taskdet') |
| | | }} |
| | | </el-button> |
| | | </el-button> --> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{ |
| | | $t('hellow.stopproject') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" |
| | | @click="handleBinde">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | <div id="dotClass"> |
| | |
| | | <!-- </div> --> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="650" ref="table" :data="tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"> |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" /> |
| | | |
| | | <el-tabs v-model="activeTab" type="card"> |
| | | <el-tab-pane |
| | | v-for="tab in tabList" |
| | | :key="tab.title" |
| | | :label="tab.title" |
| | | :name="tab.title" |
| | | > |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button style="margin-left: 10px;" type="info" @click="handleDelete(tab.title)">{{ |
| | | $t('hellow.taskdet') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" |
| | | @click="handleBinde(tab.tableDataa)">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | <!-- 动态表格 --> |
| | | <el-table |
| | | :data="tab.tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }" |
| | | > |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" /> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" /> |
| | | <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center" /> |
| | | <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center" /> |
| | |
| | | {{ scope.row.state == -1 ? $t('hellow.waitingout') : $t('hellow.finishout') }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div> |
| | | <el-pagination |
| | |
| | | <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow" |
| | | :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <!-- 删除任务 --> |
| | | <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handled"> |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="blindd = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 预览 --> |
| | | <el-dialog v-model="dialogFormVisiblee" top="24vh" width="25%" :title="$t('hellow.reviewproject')"> |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | |
| | | </template> |
| | | <script setup> |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed } from "vue"; |
| | | import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance } from "vue"; |
| | | import request from "@/utils/request" |
| | | import { host, WebSocketHost } from '@/utils/constants' |
| | | import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | const blinda = ref(false) |
| | | const blindb = ref(false) |
| | | const blindc = ref(false) |
| | | const blindd = ref(false) |
| | | const mulan = ref(false) |
| | | const activeTab = ref('') |
| | | const tabList = ref([]) |
| | | const internalInstance = getCurrentInstance() |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | | const tableDatac = ref([]) |
| | |
| | | } |
| | | ] |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassone`; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassOne`; |
| | | const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1); |
| | | watch(() => currentPage.value, (newVal) => { |
| | | window.localStorage.setItem('currentPage', newVal); |
| | |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | const rawData = data.queueInfo[0] |
| | | const formattedData = Object.entries(rawData).map(([key, data]) => ({ |
| | | title: key, |
| | | tableDataa: Array.isArray(data) ? data : [data] |
| | | })); |
| | | tabList.value = formattedData; |
| | | if (tabList.value.length > 0) { |
| | | activeTab.value = tabList.value[0].title; |
| | | } |
| | | internalInstance.ctx.$forceUpdate(); |
| | | |
| | | try { |
| | | tableDataa.value = data.queueInfo[0]; |
| | | const allPageData = data; |
| | | const currentPageKeyValue = currentPageKey.value; |
| | | const currentPageData = allPageData[currentPageKeyValue]; |
| | | if (data.freeRequest != null) { |
| | | freeone.value = data.freeRequest[0] == true ? 'green' : '#911005'; |
| | | } |
| | | // if (currentPageData && Array.isArray(currentPageData) && currentPageData.length > 0) { |
| | | // tableDataa.value = currentPageData[0]; |
| | | // } else { |
| | | // console.warn('No data for the current page key:', currentPageKeyValue); |
| | | // } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | |
| | | // 暂停任务 |
| | | const handleBindc = (row) => { |
| | | blindc.value = true; |
| | | }; |
| | | // 删除任务 |
| | | const handleBindd = (row) => { |
| | | blindd.value = true; |
| | | }; |
| | | const removalMethodMap = { |
| | | 1: t('Mounting.removal'), |
| | |
| | | dialogFormVisiblee.value = false |
| | | selectedProjectNo.value = '' |
| | | closeWebSocket(socket); |
| | | const summary = response.data.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId, |
| | | orderId:item.flowCardId.slice(0, 10) |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | |
| | | // 开始任务 |
| | | const handlea = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?flowCardId=" + flowCardId + "&cell=" + 930; |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 930 ; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | // 暂停任务 |
| | | const handlec = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?flowCardId=" + flowCardId + "&cell=" + 930; |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 930; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindc.value = false; |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | // 删除任务 |
| | | const handled = async () => { |
| | | const handleDelete = async (flowCardId) => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('hellow.hollowtaskdet'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 930; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindd.value = false; |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | // 领取任务 |
| | | const finisha = async () => { |
| | | if (!totalPairQuantity.value) { |
| | |
| | | ] |
| | | const blinde = ref(false) |
| | | const labelPrint = ref(false); |
| | | const handleBinde = (row) => { |
| | | const handleBinde = (flowCard) => { |
| | | const summary = flowCard.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId, |
| | | orderId:item.flowCardId.slice(0, 10) |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | blinde.value = true; |
| | | getTags(); |
| | | hiprint.init(); |
| | |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda"> |
| | | {{ $t('hellow.starttask') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{ |
| | | $t('hellow.taskdet') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{ |
| | | $t('hellow.stopproject') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" @click="handleBinde">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | |
| | |
| | | <i :style="{ marginTop: '2px', backgroundColor: freethree, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="650" ref="table" :data="tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"> |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center"/> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center"/> |
| | | <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center"/> |
| | | <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center"/> |
| | | <el-table-column prop="layer" :label="$t('hellow.layer')" align="center"/> |
| | | <el-table-column prop="filmsId" :label="$t('hellow.coatingtypes')" align="center"/> |
| | | <el-table-column prop="height" :label="$t('hellow.height')" align="center"/> |
| | | <el-table-column prop="width" :label="$t('hellow.width')" align="center"/> |
| | | <el-tabs v-model="activeTab" type="card"> |
| | | <el-tab-pane |
| | | v-for="tab in tabList" |
| | | :key="tab.title" |
| | | :label="tab.title" |
| | | :name="tab.title" |
| | | > |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button style="margin-left: 10px;" type="info" @click="handleDelete(tab.title)">{{ |
| | | $t('hellow.taskdet') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBinde(tab.tableDataa)">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | <!-- 动态表格 --> |
| | | <el-table |
| | | :data="tab.tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }" |
| | | > |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" /> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" /> |
| | | <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center" /> |
| | | <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center" /> |
| | | <el-table-column prop="layer" :label="$t('hellow.layer')" align="center" /> |
| | | <el-table-column prop="filmsId" :label="$t('hellow.coatingtypes')" align="center" /> |
| | | <el-table-column prop="height" :label="$t('hellow.height')" align="center" /> |
| | | <el-table-column prop="width" :label="$t('hellow.width')" align="center" /> |
| | | <el-table-column prop="state" :label="$t('hellow.state')" align="center"> |
| | | <template #default="scope"> |
| | | {{ scope.row.state == -1 ? "等待出片" : "出片完成" }} |
| | | {{ scope.row.state == -1 ? $t('hellow.waitingout') : $t('hellow.finishout') }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div> |
| | | <el-pagination |
| | |
| | | <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow" |
| | | :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <!-- 删除任务 --> |
| | | <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handled"> |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="blindd = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 预览 --> |
| | | <el-dialog v-model="dialogFormVisiblee" top="24vh" width="25%" :title="$t('hellow.reviewproject')" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | |
| | | </template> |
| | | <script setup> |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import {onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed} from "vue"; |
| | | import {onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance} from "vue"; |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | |
| | | const blinda = ref(false) |
| | | const blindb = ref(false) |
| | | const blindc = ref(false) |
| | | const blindd = ref(false) |
| | | const mulan = ref(false) |
| | | const activeTab = ref('') |
| | | const tabList = ref([]) |
| | | const internalInstance = getCurrentInstance() |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | | const tableDatac = ref([]) |
| | |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | const rawData = data.queueInfo[0] |
| | | const formattedData = Object.entries(rawData).map(([key, data]) => ({ |
| | | title: key, |
| | | tableDataa: Array.isArray(data) ? data : [data] |
| | | })); |
| | | tabList.value = formattedData; |
| | | if (tabList.value.length > 0) { |
| | | activeTab.value = tabList.value[0].title; |
| | | } |
| | | internalInstance.ctx.$forceUpdate(); |
| | | try { |
| | | tableDataa.value = data.queueInfo[0]; |
| | | const allPageData = data; |
| | | const currentPageKeyValue = currentPageKey.value; |
| | | const currentPageData = allPageData[currentPageKeyValue]; |
| | |
| | | const handleBindc = (row) => { |
| | | blindc.value = true; |
| | | }; |
| | | // 删除任务 |
| | | const handleBindd = (row) => { |
| | | blindd.value = true; |
| | | }; |
| | | // 删除任务 |
| | | const handleDelete = async (flowCardId) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('hellow.hollowtaskdet'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 932; |
| | | const response = await request.post(url) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | const removalMethodMap = { |
| | | 1: t('Mounting.removal'), |
| | | 0: t('Mounting.noremoval') |
| | |
| | | dialogFormVisiblee.value = false |
| | | selectedProjectNo.value = '' |
| | | closeWebSocket(socket); |
| | | const summary = response.data.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId, |
| | | orderId:item.flowCardId.slice(0, 10) |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | |
| | | // 开始任务 |
| | | const handlea = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/startTask?flowCardId="+flowCardId + "&cell=" + 932; |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 932 ; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | // 暂停任务 |
| | | const handlec = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/pauseTask?flowCardId="+flowCardId + "&cell=" + 932; |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 932; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindc.value = false; |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | |
| | | ] |
| | | const blinde = ref(false) |
| | | const labelPrint = ref(false); |
| | | const handleBinde = (row) => { |
| | | const handleBinde = (flowCard) => { |
| | | const summary = flowCard.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId, |
| | | orderId:item.flowCardId.slice(0, 10) |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | blinde.value = true; |
| | | getTags(); |
| | | hiprint.init(); |
| | |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda"> |
| | | {{ $t('hellow.starttask') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{ |
| | | $t('hellow.taskdet') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{ |
| | | $t('hellow.stopproject') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" @click="handleBinde">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | |
| | | :style="{ marginTop: '2px', backgroundColor: freetwo, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="650" ref="table" :data="tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"> |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" /> |
| | | <el-tabs v-model="activeTab" type="card"> |
| | | <el-tab-pane |
| | | v-for="tab in tabList" |
| | | :key="tab.title" |
| | | :label="tab.title" |
| | | :name="tab.title" |
| | | > |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button style="margin-left: 10px;" type="info" @click="handleDelete(tab.title)">{{ |
| | | $t('hellow.taskdet') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBinde(tab.tableDataa)">{{ |
| | | $t('searchOrder.printlabels') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | <!-- 动态表格 --> |
| | | <el-table |
| | | :data="tab.tableDataa" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }" |
| | | > |
| | | <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" /> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" /> |
| | | <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center" /> |
| | | <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center" /> |
| | |
| | | <el-table-column prop="width" :label="$t('hellow.width')" align="center" /> |
| | | <el-table-column prop="state" :label="$t('hellow.state')" align="center"> |
| | | <template #default="scope"> |
| | | {{ scope.row.state == -1 ? "等待出片" : "出片完成" }} |
| | | {{ scope.row.state == -1 ? $t('hellow.waitingout') : $t('hellow.finishout') }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div> |
| | | <el-pagination |
| | |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handlec"> |
| | | {{ $t('basicData.confirm') }}e |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="blindc = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | |
| | | <el-button :icon="Printer" circle @click="printOrder(1)">{{ $t('processCard.printing') }}</el-button> |
| | | <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow" |
| | | :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <!-- 删除任务 --> |
| | | <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handled"> |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="blindd = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 预览 --> |
| | | <el-dialog v-model="dialogFormVisiblee" top="24vh" width="25%" :title="$t('hellow.reviewproject')"> |
| | |
| | | <script setup> |
| | | import { CircleCheck, Download, Printer } from "@element-plus/icons-vue/global"; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed } from "vue"; |
| | | import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance } from "vue"; |
| | | import request from "@/utils/request" |
| | | import requestErp from "@/utils/requestErp" |
| | | import { host, WebSocketHost } from '@/utils/constants' |
| | |
| | | const blinda = ref(false) |
| | | const blindb = ref(false) |
| | | const blindc = ref(false) |
| | | const blindd = ref(false) |
| | | |
| | | const mulan = ref(false) |
| | | const activeTab = ref('') |
| | | const tabList = ref([]) |
| | | const internalInstance = getCurrentInstance() |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | | const tableDatac = ref([]) |
| | |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | const rawData = data.queueInfo[0] |
| | | const formattedData = Object.entries(rawData).map(([key, data]) => ({ |
| | | title: key, |
| | | tableDataa: Array.isArray(data) ? data : [data] |
| | | })); |
| | | tabList.value = formattedData; |
| | | if (tabList.value.length > 0) { |
| | | activeTab.value = tabList.value[0].title; |
| | | } |
| | | internalInstance.ctx.$forceUpdate(); |
| | | try { |
| | | tableDataa.value = data.queueInfo[0]; |
| | | const allPageData = data; |
| | | const currentPageKeyValue = currentPageKey.value; |
| | | const currentPageData = allPageData[currentPageKeyValue]; |
| | | if (data.freeRequest != null) { |
| | | freetwo.value = data.freeRequest[0] == true ? 'green' : '#911005'; |
| | | } |
| | | // if (currentPageData && Array.isArray(currentPageData) && currentPageData.length > 0) { |
| | | // tableDataa.value = currentPageData[0]; |
| | | // } else { |
| | | // console.warn('No data for the current page key:', currentPageKeyValue); |
| | | // } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | |
| | | const handleBindc = (row) => { |
| | | blindc.value = true; |
| | | }; |
| | | // 删除任务 |
| | | const handleBindd = (row) => { |
| | | blindd.value = true; |
| | | }; |
| | | const handleBinde = (row) => { |
| | | const handleBinde = (flowCard) => { |
| | | const summary = flowCard.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId, |
| | | orderId:item.flowCardId.slice(0, 10) |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | blinde.value = true; |
| | | getTags(); |
| | | hiprint.init(); |
| | |
| | | selectedProjectNo.value = '' |
| | | closeWebSocket(socket); |
| | | |
| | | const summary = response.data.reduce((map, item) => { |
| | | const key = `${item.hollowSequence}`; |
| | | if (!map[key]) { |
| | | map[key] = { |
| | | printQuantity: 1, |
| | | order_number: item.glassType, |
| | | processId: item.flowCardId, |
| | | orderId:item.flowCardId.slice(0, 10) |
| | | }; |
| | | } |
| | | return map; |
| | | }, {}); |
| | | listFlow.value = Object.values(summary); |
| | | |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | |
| | | // 开始任务 |
| | | const handlea = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?flowCardId=" + flowCardId + "&cell=" + 931; |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 931 ; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | // 暂停任务 |
| | | const handlec = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?flowCardId=" + flowCardId + "&cell=" + 931; |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 931; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindc.value = false; |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | // 删除任务 |
| | | const handled = async () => { |
| | | const handleDelete = async (flowCardId) => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('hellow.hollowtaskdet'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 931; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindd.value = false; |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | // 领取任务 |
| | | const finisha = async () => { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | |
| | | add.value = true; |
| | | }; |
| | | // 缺片详情 |
| | | const handleMissingFilms = (row) => { |
| | | currentPage2.value = 1; |
| | | const { flowCardId } = row; |
| | | currentLack.flowCardId = row.flowCardId; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(flowCardId, currentPage2.value); |
| | | }; |
| | | // const handleMissingFilms = (row) => { |
| | | // currentPage2.value = 1; |
| | | // const { flowCardId } = row; |
| | | // currentLack.flowCardId = row.flowCardId; |
| | | // dialogFormVisibleb.value = true; |
| | | // fetchFlowBind(flowCardId, currentPage2.value); |
| | | // }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | fetchFlowBind(currentLack.flowCardId, currentPage2.value); |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`; |
| | | const handleMessage = (data) => { |
| | | if(data.bigStorageCageUsageSummary!=null){ |
| | | const summaries = data.bigStorageCageUsageSummary[0]; |
| | | if(data.lackDetailsList!=null){ |
| | | const summaries = data.lackDetailsList[0]; |
| | | const updatedData = summaries.map(summary => ({ |
| | | ...summary, |
| | | totalNumber: summary.layer * summary.sumCount, |
| | |
| | | <div style="width: 100%; height: 100%; overflow: hidden;"> |
| | | <el-table |
| | | ref="table" |
| | | border |
| | | :data="tableDatass" |
| | | :header-cell-style="{background:'#F2F3F5', color:'#1D2129'}" |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | max-height="calc(500px - 35px)" |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140" /> |
| | | <el-table-column prop="sumCount" align="center" :label="$t('searchOrder.totallogarithms')" min-width="120" /> |
| | | <el-table-column prop="pairCount" align="center" :label="$t('searchOrder.numberpairs')" min-width="120" /> |
| | | <el-table-column prop="totalNumber" align="center" :label="$t('hellow.totalnumber')" min-width="100" /> |
| | | <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="120" /> |
| | | <el-table-column fixed="right" :label="$t('hellow.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleMissingFilms(scope.row)"> |
| | | {{ $t('hellow.missingfilms') }} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="layer" align="center" :label="$t('reportmanage.layer')" min-width="40" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('large.serialnumber')" min-width="80" /> |
| | | <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="80" /> |
| | | <el-table-column prop="height" align="center" :label="$t('hellow.height')" min-width="80" /> |
| | | <el-table-column prop="width" align="center" :label="$t('hellow.width')" min-width="80" /> |
| | | <el-table-column prop="lackCount" align="center" :label="$t('hellow.missingnumber')" min-width="80" /> |
| | | <el-table-column prop="damageCount" align="center" :label="$t('large.brokenNum')"/> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | * 向当前用户的所有会话发送消息 |
| | | */ |
| | | public void sendToWeb(String webSocketName, String message) { |
| | | List<WebSocketServer> sessions = sessionMap.get(webSocketName); |
| | | List<WebSocketServer> sessions = sessionMap.get(webSocketName); |
| | | if (sessions == null) return; |
| | | sessions.forEach(ws -> { |
| | | try { |
| | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * (HollowGlassOutRelationInfo)表控制层 |
| | |
| | | |
| | | @Resource |
| | | HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService; |
| | | |
| | | @ApiOperation("领取任务") |
| | | @PostMapping("/receiveTask") |
| | | public Result<HollowGlassOutRelationInfo> receiveTask(HollowTaskRequest request) { |
| | |
| | | |
| | | @ApiOperation("预览指定任务信息") |
| | | @PostMapping("/appointHollowTaskDetails") |
| | | public Result<List<HollowGlassQueueInfo>> appointHollowTaskDetails(String flowCardId, int cell) { |
| | | return Result.build(200, "预览指定任务信息成功", hollowGlassOutRelationInfoService.appointHollowTaskDetails(flowCardId, cell)); |
| | | public Result<Map<String, List<HollowGlassQueueInfo>>> appointHollowTaskDetails(int cell) { |
| | | return Result.build(200, "预览指定任务信息成功", hollowGlassOutRelationInfoService.appointHollowTaskDetails(cell)); |
| | | } |
| | | |
| | | @ApiOperation("删除指定任务信息") |
| | | @PostMapping("/deleteHollowTaskDetails") |
| | | public Result<Boolean> deleteHollowTaskDetails(String flowCardId, int cell) { |
| | | return Result.build(200, "预览指定任务信息成功", hollowGlassOutRelationInfoService.deleteHollowTaskDetails(flowCardId, cell)); |
| | | return Result.build(200, "删除指定任务信息成功", hollowGlassOutRelationInfoService.deleteHollowTaskDetails(flowCardId, cell)); |
| | | } |
| | | |
| | | @ApiOperation("开始任务") |
| | | @PostMapping("/startTask") |
| | | public Result<Boolean> startTask(String flowCardId, int cell) { |
| | | return Result.build(200, "开始任务成功", hollowGlassOutRelationInfoService.startTask(flowCardId, cell)); |
| | | public Result<Boolean> startTask(int cell) { |
| | | return Result.build(200, "开始任务成功", hollowGlassOutRelationInfoService.startTask(cell)); |
| | | } |
| | | |
| | | @ApiOperation("暂停任务") |
| | | @PostMapping("/pauseTask") |
| | | public Result<Boolean> pauseTask(String flowCardId, int cell) { |
| | | return Result.build(200, "暂停任务成功", hollowGlassOutRelationInfoService.pauseTask(flowCardId, cell)); |
| | | public Result<Boolean> pauseTask(int cell) { |
| | | return Result.build(200, "暂停任务成功", hollowGlassOutRelationInfoService.pauseTask(cell)); |
| | | } |
| | | |
| | | @ApiOperation("结束任务") |
| | |
| | | |
| | | @ApiOperation("查询指定流程卡及层数的缺片详情") |
| | | @PostMapping("/queryLackByFlowCard") |
| | | public Result<Map<Integer, List<LackDetailsDTO>> > queryLackByFlowCard(String flowCardId) { |
| | | Map<Integer, List<LackDetailsDTO>> lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard(flowCardId); |
| | | public Result<List<LackDetailsDTO>> queryLackByFlowCard() { |
| | | List<LackDetailsDTO> lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard(); |
| | | return Result.success(lackDetailsList); |
| | | } |
| | | |
| | |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(@Param("flowCardId") String flowCardId, @Param("totalLayer") int totalLayer, @Param("layer") int layer); |
| | | |
| | | List<LackDetailsDTO> queryLackByFlowCard(String flowCardId); |
| | | List<LackDetailsDTO> queryLackByFlowCard(); |
| | | |
| | | int queryLayerByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * (HollowGlassOutRelationInfo)表服务接口 |
| | |
| | | |
| | | List<String> hollowTaskList(int cell); |
| | | |
| | | List<HollowGlassQueueInfo> appointHollowTaskDetails(String flowCardId, int cell); |
| | | Map<String, List<HollowGlassQueueInfo>> appointHollowTaskDetails( int cell); |
| | | |
| | | Boolean startTask(String flowCardId, int cell); |
| | | Boolean startTask(int cell); |
| | | |
| | | Boolean pauseTask(String flowCardId, int cell); |
| | | Boolean pauseTask(int cell); |
| | | |
| | | Boolean finishTask(String flowCardId, int cell); |
| | | |
| | |
| | | |
| | | List<FlowCardGlassInfoDTO> queryHollowAllFlowCardSummary(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId); |
| | | List<LackDetailsDTO> queryLackByFlowCard(); |
| | | |
| | | int queryLayerByFlowCardId(String flowCardId); |
| | | // List<LackDetailsDTO> queryLackByFlowCard(String flowCardId); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowGlassQueueInfo> appointHollowTaskDetails(String flowCardId, int cell) { |
| | | public Map<String, List<HollowGlassQueueInfo>> appointHollowTaskDetails(int cell) { |
| | | //按照流程卡及路线,查找对应的任务信息 |
| | | HollowGlassOutRelationInfo hollowGlassOutRelationInfo = this.getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | List<HollowGlassOutRelationInfo> hollowGlassOutRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE) |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId) |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell).last("limit 1")); |
| | | if (null == hollowGlassOutRelationInfo) { |
| | | return new ArrayList<HollowGlassQueueInfo>(); |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell)); |
| | | if (CollectionUtil.isEmpty(hollowGlassOutRelationInfos)) { |
| | | return null; |
| | | } |
| | | List<Long> ids = hollowGlassOutRelationInfos.stream() |
| | | .map(HollowGlassOutRelationInfo::getId) // 提取每个元素的id |
| | | .collect(Collectors.toList()); |
| | | //按照任务id查询对列表中的队列信息 |
| | | return hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getRelationId, hollowGlassOutRelationInfo.getId())); |
| | | List<HollowGlassQueueInfo> hollowGlassQueueInfos = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .in(HollowGlassQueueInfo::getRelationId, ids) |
| | | .orderByAsc(HollowGlassQueueInfo::getId)); |
| | | Map<String, List<HollowGlassQueueInfo>> groupedByFlowCardId = hollowGlassQueueInfos.stream() |
| | | .collect(Collectors.groupingBy( |
| | | HollowGlassQueueInfo::getFlowCardId, |
| | | LinkedHashMap::new, |
| | | Collectors.toList() |
| | | )); |
| | | return groupedByFlowCardId; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean startTask(String flowCardId, int cell) { |
| | | log.info("查看该流程卡是否由正在执行的任务,流程卡:{}", flowCardId); |
| | | int taskCount = this.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE) |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)); |
| | | if (taskCount == 0 || taskCount > 1) { |
| | | log.info("该流程卡不存在任务或者有正在执行中,无法再次执行"); |
| | | return Boolean.FALSE; |
| | | } |
| | | public Boolean startTask(int cell) { |
| | | //更新任务状态为开始 |
| | | return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId) |
| | | .ne(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS) |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell)); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean pauseTask(String flowCardId, int cell) { |
| | | public Boolean pauseTask(int cell) { |
| | | // 更新任务状态为暂停 |
| | | return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_PAUSE) |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId) |
| | | .ne(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS) |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) { |
| | | List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(flowCardId); |
| | | Map<Integer, List<LackDetailsDTO>> listMap = lackDetailsList.stream().collect(Collectors.groupingBy(LackDetailsDTO::getLayer)); |
| | | return listMap; |
| | | public List<LackDetailsDTO> queryLackByFlowCard() { |
| | | List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(); |
| | | return lackDetailsList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | .orderByAsc(HollowGlassOutRelationInfo::getId) |
| | | .last("limit 1") |
| | | ); |
| | | } |
| | | } else { |
| | |
| | | .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | .orderByAsc(HollowGlassOutRelationInfo::getId) |
| | | .last("limit 1") |
| | | ); |
| | | } else { |
| | | break; |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.github.xingshuangs.iot.protocol.modbus.service.ModbusTcp; |
| | |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageTaskService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | |
| | | import com.mes.s7.entity.S7DataZKDLPOne; |
| | | import com.mes.s7.entity.S7DataZKDLPTwo; |
| | | import com.mes.s7.entity.S7DataZKExtra; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.tools.WebSocketUtils; |
| | | import com.mes.utils.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | } |
| | | |
| | | public void hollowGlassTaskChild(int cell, String isFreeTag, String websocketName) { |
| | | List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START).eq(HollowGlassOutRelationInfo::getCell, cell)); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | if (CollectionUtil.isNotEmpty(taskList)) { |
| | | List<Long> taskIdList = taskList.stream().map(HollowGlassOutRelationInfo::getId).collect(Collectors.toList()); |
| | | List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getRelationId, taskIdList)); |
| | | jsonObject.append("queueInfo", list); |
| | | } |
| | | |
| | | // List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | // .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START).eq(HollowGlassOutRelationInfo::getCell, cell)); |
| | | JSONObject jsonObject = new JSONObject(true); |
| | | // if (CollectionUtil.isNotEmpty(taskList)) { |
| | | // List<Long> taskIdList = taskList.stream().map(HollowGlassOutRelationInfo::getId).collect(Collectors.toList()); |
| | | // List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getRelationId, taskIdList)); |
| | | // jsonObject.append("queueInfo", list); |
| | | // } |
| | | Map<String, List<HollowGlassQueueInfo>> queueInfo = hollowGlassOutRelationInfoService.appointHollowTaskDetails(cell); |
| | | jsonObject.append("queueInfo", queueInfo); |
| | | try { |
| | | jsonObject.append("freeRequest", isFreeTag); |
| | | } catch (Exception e) { |
| | | log.error("opc存在异常", e); |
| | | } |
| | | webSocketUtils.sendToWeb(websocketName,jsonObject); |
| | | webSocketUtils.sendToWeb(websocketName, jsonObject); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | |
| | | try { |
| | | //查询使用数据源1查询数据 |
| | | queryDataSource1(jsonObject); |
| | | webSocketUtils.sendToWeb("hollowGlassMessage",jsonObject); |
| | | webSocketUtils.sendToWeb("hollowGlassMessage", jsonObject); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | HollowBigStorageDetailsQueryVO hollowBigStorageDetailsQueryVO = new HollowBigStorageDetailsQueryVO(); |
| | | List<FlowCardGlassInfoDTO> bigStorageCageUsageSummary = hollowGlassRelationInfoService.queryHollowAllFlowCardSummary(hollowBigStorageDetailsQueryVO); |
| | | jsonObject.append("bigStorageCageUsageSummary", bigStorageCageUsageSummary); |
| | | |
| | | //缺片详情 |
| | | List<LackDetailsDTO> lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard(); |
| | | jsonObject.append("lackDetailsList", lackDetailsList); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | |
| | | jsonObject.append("pieChartVOS", pieChartVOS); |
| | | List<RunTime> hollowRunTimes = hollowBigStorageCageHistoryTaskService.queryRunTimes(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | jsonObject.append("hollowRunTimes", hollowRunTimes); |
| | | webSocketUtils.sendToWeb("largenScreen",jsonObject); |
| | | webSocketUtils.sendToWeb("largenScreen", jsonObject); |
| | | } |
| | | } |
| | |
| | | from result |
| | | </select> |
| | | <select id="queryLackByFlowCard" resultMap="lackBaseMap"> |
| | | with relation_length as ( |
| | | select flow_card_id, |
| | | layer, |
| | | order_sort, |
| | | tempering_layout_id, |
| | | tempering_feed_sequence, |
| | | GREATEST(width, height) as first_length, |
| | | LEAST(width, height) as second_Length, |
| | | width, |
| | | height, |
| | | thickness, |
| | | films_id |
| | | from hollow_glass_relation_info |
| | | where flow_card_id = #{flowCardId} |
| | | and tempering_layout_id is null |
| | | and tempering_feed_sequence is null |
| | | with flow_card_id_info as ( |
| | | select distinct flow_card_id from hollow_big_storage_cage_details where state = 100 |
| | | ), |
| | | relation_length as ( |
| | | select flow_card_id, |
| | | layer, |
| | | order_sort, |
| | | tempering_layout_id, |
| | | tempering_feed_sequence, |
| | | GREATEST(width, height) as first_length, |
| | | LEAST(width, height) as second_Length, |
| | | width, |
| | | height, |
| | | thickness, |
| | | films_id |
| | | from hollow_glass_relation_info |
| | | where flow_card_id in (select flow_card_id from flow_card_id_info) |
| | | and tempering_layout_id is null |
| | | and tempering_feed_sequence is null |
| | | ), |
| | | lack_count_temp as ( |
| | | select flow_card_id, |
| | | layer, |
| | |
| | | order_number as order_sort, |
| | | count(1) as damage_count |
| | | from damage |
| | | where process_id = #{flowCardId} and type in (8,9) and status < 3 |
| | | where process_id in (select flow_card_id from flow_card_id_info) |
| | | and type in (8, 9) |
| | | and status < 3 |
| | | group by process_id, technology_number, order_number |
| | | ), |
| | | result_count as ( |
| | |
| | | from lack_count_temp t |
| | | left join damage_count_temp t1 on t.flow_card_id = t1.flow_card_id and t.layer = t1.layer and |
| | | t.order_sort = t1.order_sort |
| | | order by t.flow_card_id, t.layer |
| | | ) |
| | | select * |
| | | from result_count |