Merge remote-tracking branch 'origin/master'
| | |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-echarts": "^6.7.3", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-i18n": "^11.0.0-rc.1", |
| | | "vue-print-nb": "^1.7.5", |
| | | "vue-router": "^4.0.13", |
| | | "vue3-print-nb": "^0.1.4", |
| | |
| | | "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" |
| | | }, |
| | | "node_modules/@intlify/core-base": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.13.1.tgz", |
| | | "integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-fnfZoa9pb1dKM3L1UkDUGLLrPFQ2BK98x4/fMqwS/fktUor34vQR/itPtfv652ZTplenXXLCEYjUYTGfDZgMTQ==", |
| | | "dependencies": { |
| | | "@intlify/message-compiler": "9.13.1", |
| | | "@intlify/shared": "9.13.1" |
| | | "@intlify/message-compiler": "11.0.0-rc.1", |
| | | "@intlify/shared": "11.0.0-rc.1" |
| | | }, |
| | | "engines": { |
| | | "node": ">= 16" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/kazupon" |
| | | } |
| | | }, |
| | | "node_modules/@intlify/message-compiler": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.13.1.tgz", |
| | | "integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==", |
| | | "dependencies": { |
| | | "@intlify/shared": "9.13.1", |
| | | "@intlify/shared": "11.0.0-rc.1", |
| | | "source-map-js": "^1.0.2" |
| | | }, |
| | | "engines": { |
| | | "node": ">= 16" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/kazupon" |
| | | } |
| | | }, |
| | | "node_modules/@intlify/shared": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.13.1.tgz", |
| | | "integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==", |
| | | "engines": { |
| | | "node": ">= 16" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/kazupon" |
| | | } |
| | | }, |
| | | "node_modules/@jridgewell/sourcemap-codec": { |
| | |
| | | } |
| | | }, |
| | | "node_modules/vue-i18n": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | | "integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-qbdCbA537HEdr2yXQ4ec/OMDsoHjod1DwnWbrf+l4Cu/O7CYTCKsOyITUm3RmrCJgRnoVycuR6i/JWdNTJvD5g==", |
| | | "dependencies": { |
| | | "@intlify/core-base": "9.13.1", |
| | | "@intlify/shared": "9.13.1", |
| | | "@intlify/core-base": "11.0.0-rc.1", |
| | | "@intlify/shared": "11.0.0-rc.1", |
| | | "@vue/devtools-api": "^6.5.0" |
| | | }, |
| | | "engines": { |
| | |
| | | "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" |
| | | }, |
| | | "@intlify/core-base": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.13.1.tgz", |
| | | "integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-fnfZoa9pb1dKM3L1UkDUGLLrPFQ2BK98x4/fMqwS/fktUor34vQR/itPtfv652ZTplenXXLCEYjUYTGfDZgMTQ==", |
| | | "requires": { |
| | | "@intlify/message-compiler": "9.13.1", |
| | | "@intlify/shared": "9.13.1" |
| | | "@intlify/message-compiler": "11.0.0-rc.1", |
| | | "@intlify/shared": "11.0.0-rc.1" |
| | | } |
| | | }, |
| | | "@intlify/message-compiler": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.13.1.tgz", |
| | | "integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==", |
| | | "requires": { |
| | | "@intlify/shared": "9.13.1", |
| | | "@intlify/shared": "11.0.0-rc.1", |
| | | "source-map-js": "^1.0.2" |
| | | } |
| | | }, |
| | | "@intlify/shared": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.13.1.tgz", |
| | | "integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==" |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==" |
| | | }, |
| | | "@jridgewell/sourcemap-codec": { |
| | | "version": "1.4.15", |
| | |
| | | "@vitejs/plugin-vue": "^4.6.2", |
| | | "@vue-macros/reactivity-transform": "^0.3.23", |
| | | "axios": "^1.6.8", |
| | | "babel-polyfill": "*", |
| | | "babel-polyfill": "^6.26.0", |
| | | "chart.js": "^4.4.3", |
| | | "echarts": "^5.5.1", |
| | | "element-plus": "^2.4.0", |
| | |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-echarts": "^6.7.3", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-i18n": "11.0.0-rc.1", |
| | | "vue-print-nb": "^1.7.5", |
| | | "vue-router": "^4.0.13", |
| | | "vue3-print-nb": "^0.1.4", |
| | |
| | | "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" |
| | | }, |
| | | "@intlify/core-base": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.13.1.tgz", |
| | | "integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-fnfZoa9pb1dKM3L1UkDUGLLrPFQ2BK98x4/fMqwS/fktUor34vQR/itPtfv652ZTplenXXLCEYjUYTGfDZgMTQ==", |
| | | "requires": { |
| | | "@intlify/message-compiler": "9.13.1", |
| | | "@intlify/shared": "9.13.1" |
| | | "@intlify/message-compiler": "11.0.0-rc.1", |
| | | "@intlify/shared": "11.0.0-rc.1" |
| | | } |
| | | }, |
| | | "@intlify/message-compiler": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.13.1.tgz", |
| | | "integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==", |
| | | "requires": { |
| | | "@intlify/shared": "9.13.1", |
| | | "@intlify/shared": "11.0.0-rc.1", |
| | | "source-map-js": "^1.0.2" |
| | | } |
| | | }, |
| | | "@intlify/shared": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.13.1.tgz", |
| | | "integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==" |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==" |
| | | }, |
| | | "@jridgewell/sourcemap-codec": { |
| | | "version": "1.4.15", |
| | |
| | | } |
| | | }, |
| | | "vue-i18n": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | | "integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-qbdCbA537HEdr2yXQ4ec/OMDsoHjod1DwnWbrf+l4Cu/O7CYTCKsOyITUm3RmrCJgRnoVycuR6i/JWdNTJvD5g==", |
| | | "requires": { |
| | | "@intlify/core-base": "9.13.1", |
| | | "@intlify/shared": "9.13.1", |
| | | "@intlify/core-base": "11.0.0-rc.1", |
| | | "@intlify/shared": "11.0.0-rc.1", |
| | | "@vue/devtools-api": "^6.5.0" |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | "vue-i18n": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | | "integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==", |
| | | "version": "11.0.0-rc.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-11.0.0-rc.1.tgz", |
| | | "integrity": "sha512-qbdCbA537HEdr2yXQ4ec/OMDsoHjod1DwnWbrf+l4Cu/O7CYTCKsOyITUm3RmrCJgRnoVycuR6i/JWdNTJvD5g==", |
| | | "requires": { |
| | | "@intlify/core-base": "9.13.1", |
| | | "@intlify/shared": "9.13.1", |
| | | "@intlify/core-base": "11.0.0-rc.1", |
| | | "@intlify/shared": "11.0.0-rc.1", |
| | | "@vue/devtools-api": "^6.5.0" |
| | | } |
| | | }, |
| | |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-echarts": "^6.7.3", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-i18n": "^11.0.0-rc.1", |
| | | "vue-print-nb": "^1.7.5", |
| | | "vue-router": "^4.0.13", |
| | | "vue3-print-nb": "^0.1.4", |
| | |
| | | layoutSequence:'Serial Number', |
| | | }, |
| | | sorter:{ |
| | | inPlace:'到位', |
| | | ninPlace:'未到位', |
| | | emptymissions:'空任务', |
| | | advancetask:'进片任务', |
| | | outputtasks:'出片任务', |
| | | straighttasks:'直通任务', |
| | | endingtask:'结束', |
| | | another:'其他', |
| | | taskRunning:'任务请求', |
| | | updateTime:'更新时间', |
| | | id:'磨边前理片笼表ID', |
| | | remainWidth:'剩余', |
| | | place:'是否到位', |
| | | layernow:'当前层号', |
| | | gridnumber:'Grid number', |
| | | glassnumber:'Glass number', |
| | | width:'Width', |
| | |
| | | layoutSequence:'Серийн номер', |
| | | }, |
| | | sorter: { |
| | | inPlace:'到位', |
| | | ninPlace:'未到位', |
| | | emptymissions:'空任务', |
| | | advancetask:'进片任务', |
| | | outputtasks:'出片任务', |
| | | straighttasks:'直通任务', |
| | | endingtask:'结束', |
| | | another:'其他', |
| | | taskRunning:'任务请求', |
| | | remainWidth:'剩余', |
| | | id:'磨边前理片笼表ID', |
| | | updateTime:'更新时间', |
| | | place:'是否到位', |
| | | layernow:'当前层号', |
| | | gridnumber: 'Ячеек сеткла', |
| | | glassnumber: 'Номер стакла', |
| | | width: 'Ширина', |
| | |
| | | layoutSequence:'序号', |
| | | }, |
| | | sorter:{ |
| | | inPlace:'到位', |
| | | ninPlace:'未到位', |
| | | emptymissions:'空任务', |
| | | advancetask:'进片任务', |
| | | outputtasks:'出片任务', |
| | | straighttasks:'直通任务', |
| | | endingtask:'结束', |
| | | another:'其他', |
| | | id:'磨边前理片笼表ID', |
| | | remainWidth:'剩余', |
| | | taskRunning:'任务请求', |
| | | updateTime:'更新时间', |
| | | place:'是否到位', |
| | | layernow:'当前层号', |
| | | gridnumber:'栅格号', |
| | | glassnumber:'玻璃编号', |
| | | width:'宽', |
| | |
| | | component: () => import('../views/Returns/return.vue'), |
| | | children:[ |
| | | { |
| | | path: '/Returns/returns', |
| | | name: 'returns', |
| | | component: () => import('../views/Returns/returns.vue') |
| | | }, |
| | | { |
| | | path: '/Returns/upreturns', |
| | | name: 'upreturns', |
| | | component: () => import('../views/Returns/upreturns.vue') |
| | |
| | | path: '/Caching/cachingun', |
| | | name: 'cachingun', |
| | | component: () => import('../views/Caching/cachingun.vue') |
| | | }, |
| | | { |
| | | path: '/Caching/cachingyiwu', |
| | | name: 'cachingyiwu', |
| | | component: () => import('../views/Caching/cachingyiwu.vue') |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | import {useI18n} from 'vue-i18n' |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableData = ref([]) |
| | | const slot = ref('') |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | | const adjustedRects = ref([]); |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.post('/cacheGlass/edgStorageCage/selectEdgStorageCage'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; |
| | | tableData.value = response.data |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | | })); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enable_state === 1 ? 0 : 1; |
| | | const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | row.enable_state = newState; |
| | | }; |
| | | const open = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('sorter.information'), |
| | | t('sorter.prompt'), |
| | | { |
| | | confirmButtonText: t('sorter.yes'), |
| | | cancelButtonText: t('sorter.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | const response = await request.post(url, { |
| | | glassId:row.glass_id |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassOne`; |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.EdgStorageCageinfos[0] |
| | | adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | ...rect, |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | | })); |
| | | const cageInfo = data.taskMessage[0]; |
| | | if (cageInfo && cageInfo.createTime) { |
| | | cageInfo.formattedCreateTime = formatTimestamp(cageInfo.createTime); |
| | | } |
| | | if (cageInfo && cageInfo.updateTime) { |
| | | cageInfo.formattedupdateTime = formatTimestamp(cageInfo.updateTime); |
| | | } |
| | | tableDataa.value = data.EdgStorageCageinfos[0] |
| | | tableDatab.value = data.taskMessage |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | // ...rect, |
| | | // width: rect.width * 0.5 , |
| | | // id: rect.id * 10, |
| | | // })); |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | function getStatusTypea(taskRunning) { |
| | | switch (taskRunning) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'success'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'success'; |
| | | case 4: |
| | | return 'success'; |
| | | case 5: |
| | | return 'danger'; |
| | | case 6: |
| | | return 'info'; |
| | | } |
| | | } |
| | | function getStatusTexta(taskRunning) { |
| | | switch (taskRunning) { |
| | | case 0: |
| | | return t('sorter.emptymissions'); |
| | | case 1: |
| | | return t('sorter.advancetask'); |
| | | case 2: |
| | | return t('sorter.outputtasks'); |
| | | case 3: |
| | | return t('sorter.straighttasks'); |
| | | case 4: |
| | | return t('searchOrder.infilm'); |
| | | case 5: |
| | | return t('sorter.endingtask'); |
| | | case 6: |
| | | return t('sorter.another'); |
| | | } |
| | | } |
| | | function getStatusTypeb(taskState) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'success'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'success'; |
| | | case 4: |
| | | return 'success'; |
| | | case 5: |
| | | return 'danger'; |
| | | case 6: |
| | | return 'info'; |
| | | } |
| | | } |
| | | function getStatusTextb(taskState) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return t('sorter.emptymissions'); |
| | | case 1: |
| | | return t('sorter.advancetask'); |
| | | case 2: |
| | | return t('sorter.outputtasks'); |
| | | case 3: |
| | | return t('sorter.straighttasks'); |
| | | case 4: |
| | | return t('searchOrder.infilm'); |
| | | case 5: |
| | | return t('sorter.endingtask'); |
| | | case 6: |
| | | return t('sorter.another'); |
| | | } |
| | | } |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | // 只显示年月日,如果需要显示时间,则拼接 hours + ':' + minutes + ':' + seconds |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | |
| | | <div style="height: 500px;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="340" ref="table" |
| | | <el-table height="300" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" :label="$t('sorter.id')" min-width="80" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="80" /> |
| | | <el-table-column prop="slot" align="center" :label="$t('sorter.gridnumber')" min-width="80" /> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('sorter.glassnumber')" min-width="80" /> |
| | | <el-table-column prop="width" align="center" :label="$t('sorter.width')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('sorter.height')" min-width="120" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.startstatus')" |
| | | min-width="80" |
| | | prop="enable_state" |
| | | prop="enableState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.enableState === 1 ? 'success' : 'warning'" |
| | | > |
| | | {{ scope.row.enableState === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remainWidth" align="center" :label="$t('sorter.remainWidth')" min-width="80" /> |
| | | </el-table> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;margin-top: 15px;"> |
| | | <el-table height="90" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="glassIdOut" align="center" :label="$t('searchOrder.outputglassID')" min-width="80" /> |
| | | <el-table-column prop="currentCell" align="center" :label="$t('sorter.layernow')" min-width="80" /> |
| | | <el-table-column prop="startCell" align="center" :label="$t('processCard.layer')" min-width="120" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.place')" |
| | | min-width="80" |
| | | prop="inPlace" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.inPlace === 1 ? 'success' : 'warning'" |
| | | > |
| | | {{ scope.row.inPlace === 1 ? $t('sorter.inPlace') : $t('sorter.ninPlace') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.taskRunning')" |
| | | min-width="80" |
| | | prop="taskRunning" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.enable_state === 1 ? 'success' : 'danger'" |
| | | @click="toggleEnableState(scope.row)" |
| | | > |
| | | {{ scope.row.enable_state === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | <el-tag :type="getStatusTypea(scope.row.taskRunning)"> |
| | | {{ getStatusTexta(scope.row.taskRunning) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('sorter.deficiencieste') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.taskstatus')" |
| | | min-width="80" |
| | | prop="taskState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypeb(scope.row.taskState)"> |
| | | {{ getStatusTextb(scope.row.taskState) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('film.createtime')" min-width="120" /> |
| | | <el-table-column prop="formattedupdateTime" align="center" :label="$t('sorter.updateTime')" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 70%;height: 90%;margin-left: 200px;margin-top: 20px;position: relative;"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 50%;height: 70%;margin-left: 30%;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`, |
| | |
| | | <template> |
| | | <div style="height: 500px;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="340" ref="table" @selection-change="handleSelectionChange" :data="tableData" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="slot" align="center" :label="$t('sorter.gridnumber')" min-width="80" /> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('sorter.glassnumber')" min-width="80" /> |
| | | <el-table-column prop="width" align="center" :label="$t('sorter.width')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('sorter.height')" min-width="120" /> |
| | | <el-table-column align="center" :label="$t('sorter.startstatus')" min-width="80" prop="enable_state"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.enable_state === 1 ? 'success' : 'danger'" @click="toggleEnableState(scope.row)"> |
| | | {{ scope.row.enable_state === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('sorter.deficiencieste') |
| | | }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('sorter.updown') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" |
| | | style="width: 70%;height: 90%;margin-left: 200px;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div v-for="(rect, index) in adjustedRects" :key="rect" :style="{ |
| | | position: 'absolute', |
| | | top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`, |
| | | backgroundColor: '#409EFF' |
| | | }"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { Search, Lock, Avatar } from "@element-plus/icons-vue"; |
| | | import { reactive } from "vue"; |
| | | import { useRouter } from "vue-router" |
| | | const router = useRouter() |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import {onBeforeUnmount, onMounted, onUnmounted, ref} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted, onBeforeUnmount, onUnmounted } from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | const tableData = reactive([]); |
| | | const slot = ref('') |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | import {useI18n} from 'vue-i18n' |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | | const adjustedRects = ref([]); |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.get('/unLoadGlass/downStorage/selectStorageCage'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; |
| | | tableData.value = response.data |
| | | console.log(response.data); |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | width: rect.width * 0.5, |
| | | id: rect.id * 10, |
| | | })); |
| | | console.log(adjustedRects.value); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | const open = async (row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('sorter.information'), |
| | | t('sorter.prompt'), |
| | | { |
| | | confirmButtonText: t('sorter.yes'), |
| | | cancelButtonText: t('sorter.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url = "/unLoadGlass/downStorage/deleteDownStorageCage"; |
| | | console.log(url); |
| | | const response = await request.post(url, { |
| | | glassId: row.glass_id, |
| | | state: 9, |
| | | line: 1001, |
| | | workingProcedure: '磨边', |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 人工下片 |
| | | const opena = async (row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('sorter.infor'), |
| | | t('sorter.prompt'), |
| | | { |
| | | confirmButtonText: t('sorter.yes'), |
| | | cancelButtonText: t('sorter.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/unLoadGlass/downGlassTask/generateOutGlassTask", { |
| | | glassId: row.glass_id |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enable_state === 1 ? 0 : 1; |
| | | const response = await request.post('/unLoadGlass/downStorage/updateDownStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | row.enable_state = newState; |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/downcache`; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassTwo`; |
| | | const handleMessage = (data) => { |
| | | tableData.splice(0, tableData.length, ...data.params2[0]); |
| | | adjustedRects.value = data.params2[0].map(rect => ({ |
| | | ...rect, |
| | | width: rect.width * 0.5, |
| | | id: rect.id * 10, |
| | | })); |
| | | const cageInfo = data.taskMessage[0]; |
| | | if (cageInfo && cageInfo.createTime) { |
| | | cageInfo.formattedCreateTime = formatTimestamp(cageInfo.createTime); |
| | | } |
| | | if (cageInfo && cageInfo.updateTime) { |
| | | cageInfo.formattedupdateTime = formatTimestamp(cageInfo.updateTime); |
| | | } |
| | | tableDataa.value = data.EdgStorageCageinfos[0] |
| | | tableDatab.value = data.taskMessage |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | // ...rect, |
| | | // width: rect.width * 0.5 , |
| | | // id: rect.id * 10, |
| | | // })); |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | function getStatusTypea(taskRunning) { |
| | | switch (taskRunning) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'success'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'success'; |
| | | case 4: |
| | | return 'success'; |
| | | case 5: |
| | | return 'danger'; |
| | | case 6: |
| | | return 'info'; |
| | | } |
| | | }); |
| | | } |
| | | function getStatusTexta(taskRunning) { |
| | | switch (taskRunning) { |
| | | case 0: |
| | | return t('sorter.emptymissions'); |
| | | case 1: |
| | | return t('sorter.advancetask'); |
| | | case 2: |
| | | return t('sorter.outputtasks'); |
| | | case 3: |
| | | return t('sorter.straighttasks'); |
| | | case 4: |
| | | return t('searchOrder.infilm'); |
| | | case 5: |
| | | return t('sorter.endingtask'); |
| | | case 6: |
| | | return t('sorter.another'); |
| | | } |
| | | } |
| | | function getStatusTypeb(taskState) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'success'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'success'; |
| | | case 4: |
| | | return 'success'; |
| | | case 5: |
| | | return 'danger'; |
| | | case 6: |
| | | return 'info'; |
| | | } |
| | | } |
| | | function getStatusTextb(taskState) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return t('sorter.emptymissions'); |
| | | case 1: |
| | | return t('sorter.advancetask'); |
| | | case 2: |
| | | return t('sorter.outputtasks'); |
| | | case 3: |
| | | return t('sorter.straighttasks'); |
| | | case 4: |
| | | return t('searchOrder.infilm'); |
| | | case 5: |
| | | return t('sorter.endingtask'); |
| | | case 6: |
| | | return t('sorter.another'); |
| | | } |
| | | } |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | // 只显示年月日,如果需要显示时间,则拼接 hours + ':' + minutes + ':' + seconds |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | <template> |
| | | <div style="height: 500px;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="300" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" :label="$t('sorter.id')" min-width="80" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="80" /> |
| | | <el-table-column prop="slot" align="center" :label="$t('sorter.gridnumber')" min-width="80" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.startstatus')" |
| | | min-width="80" |
| | | prop="enableState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.enableState === 1 ? 'success' : 'warning'" |
| | | > |
| | | {{ scope.row.enableState === 1 ? $t('sorter.start') : $t('sorter.disable') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remainWidth" align="center" :label="$t('sorter.remainWidth')" min-width="80" /> |
| | | </el-table> |
| | | </div> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;margin-top: 15px;"> |
| | | <el-table height="90" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="glassIdOut" align="center" :label="$t('searchOrder.outputglassID')" min-width="80" /> |
| | | <el-table-column prop="currentCell" align="center" :label="$t('sorter.layernow')" min-width="80" /> |
| | | <el-table-column prop="startCell" align="center" :label="$t('processCard.layer')" min-width="120" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.place')" |
| | | min-width="80" |
| | | prop="inPlace" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.inPlace === 1 ? 'success' : 'warning'" |
| | | > |
| | | {{ scope.row.inPlace === 1 ? $t('sorter.inPlace') : $t('sorter.ninPlace') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.taskRunning')" |
| | | min-width="80" |
| | | prop="taskRunning" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypea(scope.row.taskRunning)"> |
| | | {{ getStatusTexta(scope.row.taskRunning) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.taskstatus')" |
| | | min-width="80" |
| | | prop="taskState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypeb(scope.row.taskState)"> |
| | | {{ getStatusTextb(scope.row.taskState) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('film.createtime')" min-width="120" /> |
| | | <el-table-column prop="formattedupdateTime" align="center" :label="$t('sorter.updateTime')" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 50%;height: 70%;margin-left: 30%;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`, |
| | | backgroundColor: '#409EFF' |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <style scoped> |
| | | #dt { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 100px; |
| | | } |
| | | #dta { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 80%; |
| | | } |
| | | #dialog-footer { |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | #message { |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | .awatch { |
| | | .awatch{ |
| | | height: 460px; |
| | | width: 1500px; |
| | | max-width: 100%; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | const dialogFormVisiblec = ref(false) |
| | | const dialogFormVisibled = ref(false) |
| | | const dialogFormVisibles = ref(false) |
| | | const inkageEntity = ref('#911005'); |
| | | const requestEntity = ref('#911005'); |
| | | const mesReplyEntity = ref('#911005'); |
| | | const outInkageEntity = ref('#911005'); |
| | | const outRequestEntity = ref('#911005'); |
| | | const tableDataa = ref([]) |
| | | const tableDatagh = ref([]) |
| | | const tableDatab = ref([]) |
| | |
| | | const cell7=ref(true); |
| | | const cell8=ref(true); |
| | | const cell9=ref(true); |
| | | const canEdit = ref(true); |
| | | const selectedRow = ref(null); |
| | | const temperingtotal = ref(0); |
| | | const glasstotal = ref(0); |
| | |
| | | row.enableState = newState; |
| | | }; |
| | | // 是否破损 |
| | | const toggleEnableisDamage = async (row) => { |
| | | const broken = async (row) => { |
| | | try { |
| | | const newState = row.isDamage === 1 ? 0 : 1; |
| | | const response = await request.post('/cacheGlass/edgStorageCage/updateEdgStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/bigStorageGlassDamageByGlassId', { glassId: row.glassId }); |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | row.isDamage = newState; |
| | | }; |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 删除 |
| | | const opena = async(row) => { |
| | | try { |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`; |
| | | const handleMessage = (data) => { |
| | | if (data.scanGlass != null) { |
| | | if (data.inkageEntity != null) { |
| | | inkageEntity.value = data.inkageEntity == 1 ? '#911005' : 'green'; |
| | | } |
| | | if (data.requestEntity != null) { |
| | | requestEntity.value = data.requestEntity == 1 ? '#911005' : 'green'; |
| | | } |
| | | if (data.mesReplyEntity != null) { |
| | | mesReplyEntity.value = data.mesReplyEntity == 1 ? '#911005' : 'green'; |
| | | } |
| | | if (data.outInkageEntity != null) { |
| | | outInkageEntity.value = data.outInkageEntity == 1 ? '#911005' : 'green'; |
| | | } |
| | | if (data.outRequestEntity != null) { |
| | | outRequestEntity.value = data.outRequestEntity == 1 ? '#911005' : 'green'; |
| | | } |
| | | if (data.scanGlass != null) { |
| | | scanGlass.value = data.scanGlass[0]; |
| | | let width = scanGlass.value.width; |
| | | let height = scanGlass.value.height; |
| | |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="primary" |
| | | @click="dialogFormVisibleaDownGlasss = true">{{ $t('searchOrder.Labelprinting') }} |
| | | </el-button> |
| | | <div id="dotClass"> |
| | | <div>{{ $t('searchOrder.inkageEntity') }}</div> |
| | | <i :style="{ marginTop: '2px', backgroundColor: inkageEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | <div style="margin-left: 70px;">{{ $t('searchOrder.requestEntity') }}</div> |
| | | <i :style="{ marginTop: '2px', backgroundColor: requestEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | <div style="margin-left: 70px;">{{ $t('searchOrder.mesReplyEntity') }}</div> |
| | | <i :style="{ marginTop: '2px', backgroundColor: mesReplyEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | <div style="margin-left: 70px;">{{ $t('searchOrder.outInkageEntity') }}</div> |
| | | <i :style="{ marginTop: '2px', backgroundColor: outInkageEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | <div style="margin-left: 70px;">{{ $t('searchOrder.outRequestEntity') }}</div> |
| | | <i :style="{ marginTop: '2px', backgroundColor: outRequestEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | </div> |
| | | <div class="table-container"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 300px;"> |
| | |
| | | min-width="80" |
| | | prop="isDamage" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag |
| | | :type="scope.row.isDamage === 1 ? 'danger' : 'success'" |
| | | @click="toggleEnableisDamage(scope.row)" |
| | | > |
| | | {{ scope.row.isDamage === 1 ? $t('searchOrder.breakage') : $t('searchOrder.breakagn') }} |
| | | </el-tag> |
| | | </template> |
| | | <template #default="scope"> |
| | | <div |
| | | @click="scope.row.isDamage === 1 ? null : broken(scope.row)" |
| | | style="position: relative; display: inline-block;" |
| | | > |
| | | <el-tag |
| | | :type="scope.row.isDamage === 1 ? 'danger' : 'success'" |
| | | style="pointer-events: {{ scope.row.isDamage === 1 ? 'none' : 'auto' }};" |
| | | > |
| | | {{ scope.row.isDamage === 1 ? $t('searchOrder.breakage') : $t('searchOrder.breakagn') }} |
| | | </el-tag> |
| | | <div |
| | | v-if="scope.row.isDamage === 1" |
| | | style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: transparent; z-index: 1;" |
| | | ></div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="isDamage" align="center" :label="$t('searchOrder.state')" min-width="80" /> --> |
| | | <el-table-column prop="layer" align="center" :label="$t('processCard.layer')" min-width="80" /> |
| | | <el-table-column prop="xcoordinate" align="center" :label="$t('searchOrder.xcoordinates')" min-width="80" /> |
| | | <el-table-column prop="ycoordinate" align="center" :label="$t('searchOrder.ycoordinates')" min-width="80" /> |
| | |
| | | flex: 1; /* 使两个卡片平分可用空间 */ |
| | | margin-bottom: 10px; /* 可选,根据需要添加底部间距 */ |
| | | } |
| | | #dotClass { |
| | | display: flex; |
| | | margin-left: 20px; |
| | | size: 50px; |
| | | margin-top: 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |
| | |
| | | private double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | @ApiModelProperty(value = "厚度") |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 格子号 |
| | | */ |
| | | @ApiModelProperty(value = "玻璃id") |
| | |
| | | public static final Integer GLASS_CACHE_TYPE_FINISH = 5; |
| | | public static final Integer GLASS_CACHE_TYPE_OTHER = 6; |
| | | public static final List<Integer> GLASS_CACHE_TYPE_OUT_ALL = Arrays.asList(2, 3); |
| | | public static final List<Integer> GLASS_CACHE_TYPE_IN_ALL = Arrays.asList(1, 3); |
| | | |
| | | /** |
| | | * 磨边任务玻璃状态 |
| | |
| | | Boolean submitReport(Damage damage); |
| | | |
| | | /** |
| | | * 按照玻璃id信息自动报工 |
| | | * @param glassId |
| | | * @param deviceId |
| | | * @param workingProcedure |
| | | * @param remark |
| | | */ |
| | | void autoSubmitReport(String glassId, int deviceId,String workingProcedure,String remark); |
| | | /** |
| | | * 单个破损 |
| | | * |
| | | * @param damage |
| | |
| | | * 原片顺序 |
| | | */ |
| | | private Integer patternSequence; |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Integer xAxis; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Integer yAxis; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | |
| | | */ |
| | | private double pHeight; |
| | | /** |
| | | * 版图id |
| | | * 原片版图id |
| | | */ |
| | | private Integer stockId; |
| | | /** |
| | | * 原片版图版序 |
| | | */ |
| | | private Integer xAxis; |
| | | /** |
| | | * 原片版图版序 |
| | | */ |
| | | private Integer yAxis; |
| | | /** |
| | | * 钢化版图编号(架号) |
| | | */ |
| | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Integer xAxis; |
| | | private Integer xAxisHeat; |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Integer yAxis; |
| | | private Integer yAxisHeat; |
| | | /** |
| | | * 工程号 |
| | | */ |
| | |
| | | List<OptimizeGlassinfo> optimizeGlassinfos = null; |
| | | if (engineeringId != null) { |
| | | optimizeGlassinfos = optimizeProjectMapper.selectJoinList(OptimizeGlassinfo.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("b.process_id,t.glass_type,b.o_width,b.o_height,t.glass_thickness,b.order_sort,b.p_width,b.p_height,b.layer, b.total_layer, b.stock_id,b.heat_layout_id,b.heat_layout_sort,c.x_axis,c.y_axis,b.project_no,b.glass_id,c.rotate_angle,d.merge as combine ,b.mark_icon") |
| | | .select("b.process_id,t.glass_type,b.o_width,b.o_height,t.glass_thickness,b.order_sort,b.p_width,b.p_height,b.layer," + |
| | | "d.layers_number AS total_layer, b.stock_id,b.heat_layout_id,b.heat_layout_sort, b.x_axis,b.y_axis," + |
| | | "c.x_axis as x_axis_heat,c.y_axis as y_axis_heat,b.project_no,b.glass_id,c.rotate_angle,d.merge as combine ,b.mark_icon") |
| | | .leftJoin("optimize_detail b on t.project_no=b.project_no") |
| | | .leftJoin("optimize_heat_detail c on c.project_no=t.project_no and b.heat_layout_id=c.layout_id and b.heat_layout_sort=c.sort") |
| | | .leftJoin("flow_card d on d.process_id=b.process_id and d.technology_number=b.layer and d.order_number=b.order_sort ") |
| | |
| | | glassInfo.setEngineerId(map.getProjectNo()); |
| | | glassInfo.setFlowCardId(map.getProcessId()); |
| | | glassInfo.setFilmsid(map.getGlassType()); |
| | | glassInfo.setGlassType(map.getOrderSort());//订单序号 |
| | | glassInfo.setWidth(map.getOWidth());//订单宽 |
| | | glassInfo.setHeight(map.getOHeight());//订单高 |
| | | //订单序号 |
| | | glassInfo.setGlassType(map.getOrderSort()); |
| | | //订单宽 |
| | | glassInfo.setWidth(map.getOWidth()); |
| | | //订单高 |
| | | glassInfo.setHeight(map.getOHeight()); |
| | | glassInfo.setEdgWidth(map.getPWidth()); |
| | | glassInfo.setLayer(map.getLayer()); |
| | | glassInfo.setTotalLayer(map.getTotalLayer()); |
| | | glassInfo.setEdgHeight(map.getPHeight()); |
| | | glassInfo.setThickness(map.getGlassThickness()); |
| | | glassInfo.setPatternSequence(map.getStockId());// |
| | | glassInfo.setTemperingLayoutId(map.getHeatLayoutId());//钢化版图id |
| | | glassInfo.setTemperingFeedSequence(map.getHeatLayoutSort());//钢化版图顺序 |
| | | glassInfo.setXCoordinate(map.getXAxis()); |
| | | glassInfo.setYCoordinate(map.getYAxis()); |
| | | glassInfo.setLayer(map.getLayer()); |
| | | glassInfo.setTotalLayer(map.getTotalLayer()); |
| | | glassInfo.setPatternSequence(map.getStockId()); |
| | | glassInfo.setXAxis(map.getXAxis()); |
| | | glassInfo.setYAxis(map.getYAxis()); |
| | | //钢化版图id |
| | | glassInfo.setTemperingLayoutId(map.getHeatLayoutId()); |
| | | //钢化版图顺序 |
| | | glassInfo.setTemperingFeedSequence(map.getHeatLayoutSort()); |
| | | glassInfo.setXCoordinate(map.getXAxisHeat()); |
| | | glassInfo.setYCoordinate(map.getYAxisHeat()); |
| | | glassInfo.setAngle(map.getRotateAngle()); |
| | | glassInfo.setGlassId(map.getGlassId()); |
| | | glassInfo.setCombine(map.getCombine()); |
| | |
| | | @Autowired |
| | | private EdgStorageCageDetailsService edgStorageCageDetailsService; |
| | | |
| | | // @ApiOperation("查询磨边缓存理片笼内详情 参数()") |
| | | // @PostMapping("/selectEdgStorageCage") |
| | | // @ResponseBody |
| | | // public Result selectEdgStorageCage() { |
| | | // List<Map<String, Object>> list = edgStorageCageService.selectEdgStorageCages(); |
| | | // return Result.build(200, "成功", list); |
| | | // } |
| | | |
| | | @ApiOperation("修改磨边缓存理片笼信息 功能:对笼内栅格进行【启用/禁用】") |
| | | @PostMapping("/updateEdgStorageCage") |
| | | @ResponseBody |
| | | public Result updateEdgStorageCage(@RequestBody EdgStorageCage edgStorageCage) { |
| | | String isSucess = edgStorageCageService.updateEdgStorageCage(edgStorageCage) ? "成功" : "失败"; |
| | | return Result.build(200, "【启用/禁用】" + isSucess, 1); |
| | |
| | | |
| | | @ApiOperation("磨边缓存理片笼信息 功能:对笼内栅格玻璃进行【清除/更换/绑定】 EdgStorageCage格子信息,EdgStorageCageDetails 玻璃信息 ") |
| | | @PostMapping("/edgStorageCageGlass") |
| | | @ResponseBody |
| | | public Result edgStorageCageGlass(@RequestBody EdgStorageCageDetails edgStorageCageDetails, int edgStorageCageId) { |
| | | |
| | | String isSucess = edgStorageCageService.updateEdgStorageCageDetails(edgStorageCageId, edgStorageCageDetails) ? "成功" : "失败"; |
| | |
| | | |
| | | @ApiOperation("磨边模块汇报玻璃状态 功能:对笼内栅格玻璃进行【破损/拿走】 ") |
| | | @PostMapping("/edgReportStatus") |
| | | @ResponseBody |
| | | public Result edgReportStatus(@RequestBody @Validated IdentWornRequest request) { |
| | | return Result.build(200, "【破损/拿走】" + edgStorageCageDetailsService.edgReportStatus(request), 1); |
| | | } |
New file |
| | |
| | | package com.mes.edgstoragecage.entity.vo; |
| | | |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/12/18 20:00 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class CutDrawingVO extends GlassInfo { |
| | | |
| | | private int state; |
| | | } |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.security.core.parameters.P; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public interface EdgStorageCageDetailsMapper extends MPJBaseMapper<EdgStorageCageDetails> { |
| | | |
| | | EdgStorageCageDetails queryEdgStorageDetailsBySize(int deviceId, int currentSlot, double width, double height); |
| | | |
| | | List<CutDrawingVO> queryCutDrawingByEngineerId(@Param("engineerId") String engineerId, @Param("patternSequence") int patternSequence, @Param("isAll") int isAll); |
| | | } |
| | |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.edgglasstask.entity.request.IdentWornRequest; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | // boolean identWorn(Map<String, Object> arguments); |
| | | |
| | | /** |
| | | * 获取 切割当前版图 |
| | | * |
| | | * 按照设备及线路,获取当前线路正在切割的版图信息 |
| | | * @param deviceId |
| | | * @param stationCell |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> selectCutTerritory(); |
| | | List<CutDrawingVO> queryCurrentCutDrawing(int deviceId, int stationCell); |
| | | |
| | | /** |
| | | * 获取 工程下的当前版图 |
| | | * |
| | | * @param current |
| | | * @return |
| | | */ |
| | | List<List<Map<String, Object>>> selectCurrentCutTerritory(String current); |
| | | Map<String, Object> queryCutDrawingByEngineerId(String engineerId, int patternSequence); |
| | | |
| | | /** |
| | | * 获取 工程下的钢化版图 |
| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.lang.Assert; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageMapper; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.mapper.EngineeringMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.pp.entity.*; |
| | | import com.mes.pp.mapper.OptimizeDetailMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.pp.entity.OptimizeHeatDetail; |
| | | import com.mes.pp.entity.OptimizeHeatLayout; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeHeatDetailMapper; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | public class EdgStorageCageDetailsServiceImpl extends MPJBaseServiceImpl<EdgStorageCageDetailsMapper, EdgStorageCageDetails> implements EdgStorageCageDetailsService { |
| | | |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | |
| | | @Resource |
| | | EngineeringMapper engineeringMapper; |
| | | |
| | | @Resource |
| | | OptimizeDetailMapper optimizeDetailMapper; |
| | | |
| | | @Resource |
| | | OptimizeHeatDetailMapper optimizeHeatDetailMapper; |
| | |
| | | EdgStorageCageMapper edgStorageCageMapper; |
| | | |
| | | @Resource |
| | | GlassInfoMapper glassInfoMapper; |
| | | GlassInfoService glassInfoService; |
| | | |
| | | @Autowired |
| | | TaskCacheService taskCacheService; |
| | |
| | | |
| | | @Autowired |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | // |
| | | // @Override |
| | | // public boolean identWorn(Map<String, Object> arguments) { |
| | | // String glassId=arguments.get("glassId").toString(); |
| | | // int state=arguments.get("state").toString().isEmpty()?0:Integer.parseInt(arguments.get("state").toString()); |
| | | // int line=arguments.get("line").toString().isEmpty()?0:Integer.parseInt(arguments.get("line").toString()); |
| | | // String workingProcedure=arguments.get("workingProcedure").toString(); |
| | | // if(state==0||line==0||workingProcedure==null||glassId==null||glassId.isEmpty()){ |
| | | // log.info("前端传递数据不全:{}",arguments); |
| | | // return false; |
| | | // } |
| | | // List<GlassInfo> GlassInfos = glassInfoMapper.selectList(new MPJLambdaQueryWrapper<GlassInfo>() |
| | | // .selectAll(GlassInfo.class) |
| | | // .eq(GlassInfo::getGlassId, glassId)); |
| | | // if (GlassInfos.size() == 1) { |
| | | // Damage damage =new Damage(); |
| | | // damage.setGlassId(glassId); |
| | | // damage.setLine(line); |
| | | // damage.setWorkingProcedure(workingProcedure); |
| | | // damage.setRemark(""); |
| | | // damage.setStatus(state);//8破损,9拿走 |
| | | // damageService.insertDamage(damage); |
| | | // }else{ |
| | | // return false; |
| | | // } |
| | | // List<EdgStorageCageDetails> edgStorageCageDetails = baseMapper.selectList(new MPJLambdaQueryWrapper<EdgStorageCageDetails>() |
| | | // .selectAll(EdgStorageCageDetails.class) |
| | | // .eq(EdgStorageCageDetails::getGlassId, glassId)); |
| | | // if (edgStorageCageDetails.size() == 1) { |
| | | // EdgStorageCageDetails item = edgStorageCageDetails.get(0); |
| | | // item.setState(state); |
| | | // baseMapper.update(item, new MPJLambdaWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class).eq(EdgStorageCageDetails::getGlassId, glassId)); |
| | | // } |
| | | // return true; |
| | | // } |
| | | |
| | | /** |
| | | * 获取 切割当前版图 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> selectCutTerritory() { |
| | | //查询EdgStorageCageDetails最后一张玻璃所属版图 |
| | | List<UpPattenUsage> upPattenUsage = upPattenUsageMapper.selectJoinList(UpPattenUsage.class, new MPJLambdaWrapper<UpPattenUsage>() |
| | | .selectAll(UpPattenUsage.class) |
| | | .distinct() |
| | | .innerJoin(Engineering.class, on -> on |
| | | .eq(Engineering::getEngineerId, UpPattenUsage::getEngineeringId)) |
| | | .innerJoin(GlassInfo.class, on -> on |
| | | .eq(GlassInfo::getEngineerId, UpPattenUsage::getEngineeringId) |
| | | .eq(GlassInfo::getPatternSequence, UpPattenUsage::getLayoutSequence)) |
| | | .leftJoin(EdgStorageCageDetails.class, on -> on |
| | | .eq(EdgStorageCageDetails::getEngineerId, UpPattenUsage::getEngineeringId) |
| | | .eq(EdgStorageCageDetails::getGlassId, GlassInfo::getGlassId)) |
| | | .leftJoin(Damage.class, on -> on |
| | | .eq(Damage::getEngineerId, UpPattenUsage::getEngineeringId) |
| | | .eq(Damage::getGlassId, GlassInfo::getGlassId)) |
| | | .eq(Engineering::getState, 1) |
| | | .and(wrapper -> wrapper.isNotNull(EdgStorageCageDetails::getId).or().isNotNull(Damage::getId)) |
| | | .orderByDesc(UpPattenUsage::getLayoutSequence) |
| | | .orderByDesc(GlassInfo::getId) |
| | | ); |
| | | if (!upPattenUsage.isEmpty()) { |
| | | //当前版 |
| | | UpPattenUsage upPattenUsage1 = upPattenUsage.get(0); |
| | | //查看当前版是否存在未进笼子或破损的玻璃 |
| | | List<UpPattenUsage> upPattenUsage2 = upPattenUsageMapper.selectJoinList(UpPattenUsage.class, new MPJLambdaWrapper<UpPattenUsage>() |
| | | .selectAll(UpPattenUsage.class) |
| | | .distinct() |
| | | .innerJoin(GlassInfo.class, on -> on |
| | | .eq(GlassInfo::getEngineerId, UpPattenUsage::getEngineeringId) |
| | | .eq(GlassInfo::getPatternSequence, UpPattenUsage::getLayoutSequence)) |
| | | .leftJoin(EdgStorageCageDetails.class, on -> on |
| | | .eq(EdgStorageCageDetails::getEngineerId, UpPattenUsage::getEngineeringId) |
| | | .eq(EdgStorageCageDetails::getGlassId, GlassInfo::getGlassId)) |
| | | .leftJoin(Damage.class, on -> on |
| | | .eq(Damage::getEngineerId, UpPattenUsage::getEngineeringId) |
| | | .eq(Damage::getGlassId, GlassInfo::getGlassId)) |
| | | .eq(UpPattenUsage::getEngineeringId, upPattenUsage.get(0).getEngineeringId()) |
| | | .eq(UpPattenUsage::getLayoutSequence, upPattenUsage.get(0).getLayoutSequence()) |
| | | .and(wrapper -> wrapper.isNull(EdgStorageCageDetails::getId).or().isNull(Damage::getId)) |
| | | .orderByDesc(UpPattenUsage::getLayoutSequence) |
| | | .orderByDesc(GlassInfo::getId) |
| | | ); |
| | | //显示下一版 否则显示当前版图 |
| | | if (upPattenUsage2.isEmpty()) { |
| | | //剩余版图 |
| | | List<UpPattenUsage> upPattenUsage3 = upPattenUsageMapper.selectJoinList(UpPattenUsage.class, new MPJLambdaWrapper<UpPattenUsage>() |
| | | .selectAll(UpPattenUsage.class) |
| | | .distinct() |
| | | .innerJoin(Engineering.class, on -> on |
| | | .eq(Engineering::getEngineerId, UpPattenUsage::getEngineeringId)) |
| | | .eq(Engineering::getState, 1) |
| | | .gt(UpPattenUsage::getLayoutSequence, upPattenUsage1.getLayoutSequence()) |
| | | .orderByAsc(UpPattenUsage::getLayoutSequence) |
| | | ); |
| | | if (!upPattenUsage3.isEmpty()) { |
| | | //切换成下一版图 |
| | | upPattenUsage1 = upPattenUsage3.get(0); |
| | | } |
| | | } |
| | | |
| | | List<Map<String, Object>> cutTerritorys = optimizeDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeDetail.class) |
| | | .selectAll(OptimizeDetail.class) |
| | | .selectAs(OptimizeLayout::getWidth, "olWidth") |
| | | .selectAs(OptimizeLayout::getHeight, "olHeight") |
| | | .leftJoin(OptimizeLayout.class, on -> on |
| | | .eq(OptimizeLayout::getProjectNo, OptimizeDetail::getProjectNo) |
| | | .eq(OptimizeLayout::getStockId, OptimizeDetail::getStockId)) |
| | | .eq(OptimizeDetail::getProjectNo, upPattenUsage1.getEngineeringId()) |
| | | .eq(OptimizeDetail::getStockId, upPattenUsage1.getLayoutSequence()) |
| | | ); |
| | | Map<String, EdgStorageCageDetails> edgMaps = baseMapper.selectList(new MPJLambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .selectAll(EdgStorageCageDetails.class) |
| | | .eq(EdgStorageCageDetails::getEngineerId, upPattenUsage1.getEngineeringId()) |
| | | ).stream().collect(Collectors.toMap(EdgStorageCageDetails::getGlassId, EdgStorageCageDetails -> EdgStorageCageDetails)); |
| | | |
| | | Map<String, Damage> damageMaps = damageMapper.selectList(new MPJLambdaQueryWrapper<Damage>() |
| | | .selectAll(Damage.class) |
| | | .eq(Damage::getEngineerId, upPattenUsage1.getEngineeringId()) |
| | | .and(wrapper -> wrapper.eq(Damage::getType, 8) |
| | | .or() |
| | | .eq(Damage::getType, 9)) |
| | | ).stream().collect(Collectors.toMap(Damage::getGlassId, Damage -> Damage, (V1, V2) -> V2)); |
| | | |
| | | List<Map<String, Object>> resultCutTerritory = new ArrayList<>(); |
| | | for (Map<String, Object> cutTerritory : cutTerritorys) { |
| | | // log.info("内容:{}-------{}",cutTerritory,edgStorageCageDetails); |
| | | if (cutTerritory.get("glass_id") == null || "".equals(cutTerritory.get("glass_id"))) { |
| | | log.info("优化数据中glassId存在空值-----内容:{}", cutTerritorys); |
| | | return new ArrayList<>(); |
| | | } else if (damageMaps.get(cutTerritory.get("glass_id")) != null) { |
| | | //log.info("玻璃已破损/拿走-----内容:{}",damageMaps.get(item.get("glass_id"))); |
| | | cutTerritory.put("glass_state", damageMaps.get(cutTerritory.get("glass_id")).getType()); |
| | | } else if (edgMaps.get(cutTerritory.get("glass_id")) != null) { |
| | | cutTerritory.put("glass_state", edgMaps.get(cutTerritory.get("glass_id")).getState()); |
| | | } else { |
| | | cutTerritory.put("glass_state", 0); |
| | | } |
| | | resultCutTerritory.add(cutTerritory); |
| | | } |
| | | return resultCutTerritory; |
| | | public List<CutDrawingVO> queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | // 获取本条线当前正在执行的工程 |
| | | Engineering engineering = engineeringMapper.selectOne(new LambdaQueryWrapper<Engineering>() |
| | | .eq(Engineering::getState, 1).eq(Engineering::getStationCell, stationCell)); |
| | | if (null == engineering) { |
| | | log.info("当前线路没有需要执行的工程"); |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 获取 工程下的当前版图 |
| | | * |
| | | * @param current |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<List<Map<String, Object>>> selectCurrentCutTerritory(String current) { |
| | | |
| | | List<Engineering> engineering = engineeringMapper.selectJoinList(Engineering.class, new MPJLambdaWrapper<Engineering>() |
| | | .selectAll(Engineering.class) |
| | | .eq(Engineering::getEngineerId, current) |
| | | ); |
| | | if (engineering.size() == 0) { |
| | | log.info("当前工程号未领取过:{}", current); |
| | | return new ArrayList<>(); |
| | | } |
| | | //结果 |
| | | List<Map<String, Object>> resultCutTerritory = new ArrayList<>(); |
| | | //此工程的所有优化数据 |
| | | List<Map<String, Object>> cutTerritory = optimizeDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeDetail.class) |
| | | .selectAll(OptimizeDetail.class) |
| | | .selectAs(OptimizeLayout::getWidth, "olWidth") |
| | | .selectAs(OptimizeLayout::getHeight, "olHeight") |
| | | .leftJoin(OptimizeLayout.class, on -> on |
| | | .eq(OptimizeLayout::getProjectNo, OptimizeDetail::getProjectNo) |
| | | .eq(OptimizeLayout::getStockId, OptimizeDetail::getStockId)) |
| | | .eq(OptimizeDetail::getProjectNo, current) |
| | | ); |
| | | |
| | | Map<String, EdgStorageCageDetails> edgMaps = baseMapper.selectList(new MPJLambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .selectAll(EdgStorageCageDetails.class) |
| | | .eq(EdgStorageCageDetails::getEngineerId, current) |
| | | ).stream().collect(Collectors.toMap(EdgStorageCageDetails::getGlassId, EdgStorageCageDetails -> EdgStorageCageDetails, (V1, V2) -> V2)); |
| | | |
| | | Map<String, Damage> damageMaps = damageMapper.selectList(new MPJLambdaQueryWrapper<Damage>() |
| | | .selectAll(Damage.class) |
| | | .eq(Damage::getEngineerId, current) |
| | | .and(wrapper -> wrapper.eq(Damage::getType, 8) |
| | | .or() |
| | | .eq(Damage::getType, 9)) |
| | | ).stream().collect(Collectors.toMap(Damage::getGlassId, Damage -> Damage, (V1, V2) -> V2)); |
| | | |
| | | for (Map<String, Object> item : cutTerritory) { |
| | | // log.info("内容:{}-------{}",cutTerritory,edgStorageCageDetails); |
| | | if (item.get("glass_id") == null || "".equals(item.get("glass_id"))) { |
| | | log.info("优化数据中glassId存在空值-----内容:{}", cutTerritory); |
| | | return new ArrayList<>(); |
| | | } |
| | | if (damageMaps.get(item.get("glass_id")) != null) { |
| | | //log.info("玻璃已破损/拿走-----内容:{}",damageMaps.get(item.get("glass_id"))); |
| | | item.put("glass_state", damageMaps.get(item.get("glass_id")).getType()); |
| | | } else if (edgMaps.get(item.get("glass_id")) != null) { |
| | | item.put("glass_state", edgMaps.get(item.get("glass_id")).getState()); |
| | | List<EdgStorageCageDetails> edgStorageCageDetailsList = this.list(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getDeviceId, deviceId) |
| | | .eq(EdgStorageCageDetails::getEngineerId, engineering.getEngineerId()) |
| | | .orderByDesc(EdgStorageCageDetails::getId)); |
| | | //按照当前工程去理片笼搜最后一块玻璃 获取工程号 版图号 没有直接显示第一张版图 |
| | | int patternSequence = 0; |
| | | if (CollectionUtil.isEmpty(edgStorageCageDetailsList)) { |
| | | patternSequence = 1; |
| | | } else { |
| | | EdgStorageCageDetails lastGlass = edgStorageCageDetailsList.get(0); |
| | | log.info("获取最后一块进笼的玻璃为:{}", lastGlass); |
| | | List<CutDrawingVO> drawingVOList = baseMapper.queryCutDrawingByEngineerId(lastGlass.getEngineerId(), lastGlass.getPatternSequence(), 1); |
| | | if (CollectionUtil.isEmpty(drawingVOList)) { |
| | | //无剩余 显示当前版图加1的全量版图 |
| | | patternSequence = lastGlass.getPatternSequence() + 1; |
| | | } else { |
| | | item.put("glass_state", 0); |
| | | //当前版图是否有剩余,有剩余显示当前版图 |
| | | patternSequence = lastGlass.getPatternSequence(); |
| | | } |
| | | resultCutTerritory.add(item); |
| | | } |
| | | Map<String, List<Map<String, Object>>> groupBy = resultCutTerritory.stream().collect(Collectors.groupingBy(item -> item.get("stock_id").toString())); |
| | | // List<List<Map<String, Object>>> Result=groupBy.values().stream().collect(Collectors.toList()); |
| | | int count = 1; |
| | | List<List<Map<String, Object>>> result = new ArrayList<>(); |
| | | for (String item : groupBy.keySet()) { |
| | | String key = count + ""; |
| | | if (key != null) { |
| | | result.add(groupBy.get(key)); |
| | | } |
| | | count++; |
| | | } |
| | | return result; |
| | | return baseMapper.queryCutDrawingByEngineerId(engineering.getEngineerId(), patternSequence, 0); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> queryCutDrawingByEngineerId(String engineerId, int patternSequence) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("currentCutDrawing", baseMapper.queryCutDrawingByEngineerId(engineerId, patternSequence, 0)); |
| | | List<GlassInfo> glassInfoList = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getEngineerId, engineerId)); |
| | | long totalPatternSequence = glassInfoList.stream().map(GlassInfo::getPatternSequence).distinct().count(); |
| | | map.put("totalPatternSequence", totalPatternSequence); |
| | | return map; |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 工程下的钢化版图 |
| | | * |
| | |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | |
| | | EdgStorageCageService edgStorageCageService; |
| | | @Resource |
| | | EdgStorageDeviceTaskHistoryService edgStorageDeviceTaskHistoryService; |
| | | @Resource |
| | | DamageService damageService; |
| | | |
| | | @Value("${mes.glassGap}") |
| | | private int glassGap; |
| | |
| | | private void startOneOpcTaskChild(String tableName, int device) { |
| | | EdgStorageDeviceTask task = edgStorageDeviceTaskService.queryTaskMessage(tableName); |
| | | // try { |
| | | if (task == null) { |
| | | log.info("任务表基础数据录入失败,请检查数据是否录入成功"); |
| | | return; |
| | | } |
| | | if (task.getTaskState() == 2) { |
| | | //防止出片任务且笼前有玻璃的情况,将进片id置空,即出片仅考虑笼内的玻璃 |
| | | task.setGlassIdIn(""); |
| | | } |
| | | if (task == null) { |
| | | log.info("任务表基础数据录入失败,请检查数据是否录入成功"); |
| | | return; |
| | | } |
| | | if (task.getTaskState() == 2) { |
| | | //防止出片任务且笼前有玻璃的情况,将进片id置空,即出片仅考虑笼内的玻璃 |
| | | task.setGlassIdIn(""); |
| | | } |
| | | int request = task.getTaskState(); |
| | | int taskRunning = task.getTaskRunning(); |
| | | log.info("开始执行任务,任务请信息为{}", task); |
| | | log.info("开始执行任务,任务请信息为{}", task); |
| | | if (request == 0) { |
| | | log.info("设备:{}状态:{}", device, request); |
| | | log.info("未收到任务请求,结束本次任务"); |
| | |
| | | .eq(EdgStorageDeviceTaskHistory::getTaskState, Const.RAW_GLASS_TASK_NEW) |
| | | .eq(EdgStorageDeviceTaskHistory::getDeviceId, device) |
| | | .orderByDesc(EdgStorageDeviceTaskHistory::getCreateTime).last("limit 1")); |
| | | //如果任务类型为1,3,将切割完成的玻璃自动报工 |
| | | if (Const.GLASS_CACHE_TYPE_IN_ALL.contains(taskHistory.getTaskType())) { |
| | | damageService.autoSubmitReport(taskHistory.getGlassIdIn(), taskHistory.getDeviceId(),"切割","进卧理"); |
| | | } |
| | | updateCellRemainWidth(cell, device, taskHistory); |
| | | edgStorageDeviceTaskHistoryService.update(new LambdaUpdateWrapper<EdgStorageDeviceTaskHistory>() |
| | | .eq(EdgStorageDeviceTaskHistory::getTaskState, Const.RAW_GLASS_TASK_NEW) |
| | |
| | | .last("Limit 1"); |
| | | GlassInfo swapGlassInfo = glassInfoService.getOne(queryWrapper); |
| | | if (swapGlassInfo != null && !glassInfo.getGlassId().equals(swapGlassInfo.getGlassId())) { |
| | | |
| | | int patternSequence = glassInfo.getPatternSequence(); |
| | | int xAxis = glassInfo.getXAxis(); |
| | | int yAxis = glassInfo.getYAxis(); |
| | | String swapGlassId = swapGlassInfo.getGlassId(); |
| | | log.info("将玻璃{}和玻璃{},信息互换,进玻璃 {}", glassInfo, swapGlassInfo, swapGlassInfo); |
| | | int swapPatternSequence = swapGlassInfo.getPatternSequence(); |
| | | int swapXAxis = swapGlassInfo.getXAxis(); |
| | | int swapYAxis = swapGlassInfo.getYAxis(); |
| | | swapGlassInfo.setGlassId(glassId); |
| | | swapGlassInfo.setPatternSequence(patternSequence); |
| | | swapGlassInfo.setXAxis(xAxis); |
| | | swapGlassInfo.setYAxis(yAxis); |
| | | glassInfo.setGlassId(swapGlassId); |
| | | glassInfo.setPatternSequence(swapPatternSequence); |
| | | glassInfo.setXAxis(swapXAxis); |
| | | glassInfo.setYAxis(swapYAxis); |
| | | log.info("将玻璃{}和玻璃{},信息互换(原片序号及坐标除外),进玻璃 {}", glassInfo, swapGlassInfo, swapGlassInfo); |
| | | glassInfoService.updateById(swapGlassInfo); |
| | | glassInfoService.updateById(glassInfo); |
| | | return swapGlassId; |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | import com.mes.edgstoragecage.entity.vo.EdgStorageCageVO; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageService; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTask; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService; |
| | | import com.mes.opctask.service.EdgStorageDeviceTaskService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | @Resource |
| | | EdgStorageDeviceTaskService edgStorageDeviceTaskService; |
| | | @Resource |
| | | EdgStorageDeviceTaskHistoryService edgStorageDeviceTaskHistoryService; |
| | | |
| | | |
| | | private static final String EDG_STORAGE_DEVICE_ONE_TASK = "edg_storage_device_one_task"; |
| | |
| | | |
| | | private void CacheGlassTasksChild(String tableName, String webSocketName, int deviceId, int stationCell) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // List<Map<String, Object>> currentCutTerritorys = edgStorageCageDetailsService.selectCutTerritory(); |
| | | // jsonObject.append("currentCutTerritory", currentCutTerritorys); |
| | | //卧室缓存笼内信息0 = {EdgStorageCageVO@11649} "EdgStorageCageVO(details=null)" |
| | | List<CutDrawingVO> currentCutDrawings = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell); |
| | | jsonObject.append("currentCutTerritory", currentCutDrawings); |
| | | //卧室缓存笼内信息 |
| | | List<EdgStorageCageVO> edgStorageCageVOS = edgStorageCageService.selectEdgStorageCagesByDeviceId(deviceId); |
| | | jsonObject.append("EdgStorageCageinfos", edgStorageCageVOS); |
| | | |
| | | EdgStorageDeviceTask task = edgStorageDeviceTaskService.queryTaskMessage(tableName); |
| | | jsonObject.append("taskMessage", task); |
| | | //获取正在整形中的任务 |
| | | EdgStorageDeviceTaskHistory taskHistory = edgStorageDeviceTaskHistoryService.getOne(new LambdaQueryWrapper<EdgStorageDeviceTaskHistory>() |
| | | .eq(EdgStorageDeviceTaskHistory::getDeviceId,deviceId) |
| | | .eq(EdgStorageDeviceTaskHistory::getTaskState, Const.RAW_GLASS_TASK_NEW) |
| | | .orderByDesc(EdgStorageDeviceTaskHistory::getCreateTime).last("limit 1")); |
| | | jsonObject.append("taskMessage", taskHistory); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get(webSocketName); |
| | | if (sendwServer != null) { |
| | |
| | | package com.mes.opctask.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | | import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Resource |
| | | private EdgStorageDeviceTaskHistoryService edgStorageDeviceTaskHistoryService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param page 分页对象 |
| | | * @param edgStorageDeviceTaskHistory 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "查询本条线执行过的历史任务数据", notes = "查询本条线执行过的历史任务数据") |
| | | @GetMapping |
| | | public Result selectAll(Page<EdgStorageDeviceTaskHistory> page, EdgStorageDeviceTaskHistory edgStorageDeviceTaskHistory) { |
| | | return Result.success(this.edgStorageDeviceTaskHistoryService.page(page, new QueryWrapper<>(edgStorageDeviceTaskHistory))); |
| | | public Result<List<EdgStorageDeviceTaskHistory>> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request) { |
| | | return Result.success(edgStorageDeviceTaskHistoryService.queryEdgStorageDeviceTaskHistory(request)); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public Result selectOne(@PathVariable Serializable id) { |
| | | return Result.success(this.edgStorageDeviceTaskHistoryService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param edgStorageDeviceTaskHistory 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public Result insert(@RequestBody EdgStorageDeviceTaskHistory edgStorageDeviceTaskHistory) { |
| | | return Result.success(this.edgStorageDeviceTaskHistoryService.save(edgStorageDeviceTaskHistory)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param edgStorageDeviceTaskHistory 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping |
| | | public Result update(@RequestBody EdgStorageDeviceTaskHistory edgStorageDeviceTaskHistory) { |
| | | return Result.success(this.edgStorageDeviceTaskHistoryService.updateById(edgStorageDeviceTaskHistory)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param idList 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @DeleteMapping |
| | | public Result delete(@RequestParam("idList") List<Long> idList) { |
| | | return Result.success(this.edgStorageDeviceTaskHistoryService.removeByIds(idList)); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.opctask.entity.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/12/22 16:10 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class TaskHistoryRequest { |
| | | |
| | | @ApiModelProperty(value = "设备id") |
| | | private Integer deviceId; |
| | | @ApiModelProperty(value = "玻璃id") |
| | | private String glassId; |
| | | @ApiModelProperty(value = "任务状态 0默认空任务 1结束任务") |
| | | private Integer taskState; |
| | | @ApiModelProperty(value = "任务类型:1进片任务 2出片任务 3直通任务") |
| | | private Integer taskType; |
| | | @ApiModelProperty(value = "开始时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | @ApiModelProperty(value = "结束时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (EdgStorageDeviceTaskHistory)表服务接口 |
| | |
| | | */ |
| | | public interface EdgStorageDeviceTaskHistoryService extends IService<EdgStorageDeviceTaskHistory> { |
| | | |
| | | List<EdgStorageDeviceTaskHistory> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request); |
| | | } |
| | | |
| | |
| | | package com.mes.opctask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | | import com.mes.opctask.mapper.EdgStorageDeviceTaskHistoryMapper; |
| | | import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (EdgStorageDeviceTaskHistory)表服务实现类 |
| | |
| | | @Service("edgStorageDeviceTaskHistoryService") |
| | | public class EdgStorageDeviceTaskHistoryServiceImpl extends ServiceImpl<EdgStorageDeviceTaskHistoryMapper, EdgStorageDeviceTaskHistory> implements EdgStorageDeviceTaskHistoryService { |
| | | |
| | | @Override |
| | | public List<EdgStorageDeviceTaskHistory> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request) { |
| | | LambdaQueryWrapper<EdgStorageDeviceTaskHistory> wrapper = new LambdaQueryWrapper<EdgStorageDeviceTaskHistory>() |
| | | .eq(EdgStorageDeviceTaskHistory::getDeviceId, request.getDeviceId()) |
| | | .eq(StringUtils.checkValNotNull(request.getTaskState()), EdgStorageDeviceTaskHistory::getTaskState, request.getTaskState()) |
| | | .eq(StringUtils.checkValNotNull(request.getTaskType()), EdgStorageDeviceTaskHistory::getTaskState, request.getTaskType()) |
| | | .between(StringUtils.checkValNotNull(request.getStartTime()), EdgStorageDeviceTaskHistory::getCreateTime, request.getStartTime(), |
| | | request.getEndTime()).orderByDesc(EdgStorageDeviceTaskHistory::getCreateTime).last("limit 20"); |
| | | if (StringUtils.isNotBlank(request.getGlassId())) { |
| | | wrapper.and(e -> e.like(EdgStorageDeviceTaskHistory::getGlassIdIn, request.getGlassId()) |
| | | .or().like(EdgStorageDeviceTaskHistory::getGlassIdOut, request.getGlassId())); |
| | | } |
| | | return this.list(wrapper); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.mes.taskcache.controller; |
| | | |
| | | import com.mes.edgglasstask.entity.request.IdentWornRequest; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import com.mes.utils.Result; |
| | |
| | | |
| | | @ApiOperation("查询钢化版图信息-根据 工程号 参数(工程号)") |
| | | @PostMapping("/temperingTerritory") |
| | | @ResponseBody |
| | | public Result temperingTerritory(String current) { |
| | | List<Map<String, Object>> h = edgStorageCageDetailsService.selectTemperingTerritory(current); |
| | | return Result.build(200, "成功", h); |
| | | } |
| | | |
| | | @ApiOperation("查询切割版图信息-根据 工程号 参数(工程号)") |
| | | @PostMapping("/cutTerritory") |
| | | @ResponseBody |
| | | public Result cutTerritory(String current) { |
| | | //engineerId=current; |
| | | List<List<Map<String, Object>>> h = edgStorageCageDetailsService.selectCurrentCutTerritory(current); |
| | | return Result.build(200, "成功", h); |
| | | @ApiOperation("查询切割版图信息-根据工程号及版序,版序默认为1") |
| | | @PostMapping("/queryCutDrawingByEngineerId") |
| | | public Result queryCutDrawingByEngineerId(String engineerId, int patternSequence) { |
| | | // List<List<Map<String, Object>>> h = edgStorageCageDetailsService.selectCurrentCutTerritory(current); |
| | | Map<String, Object> map = edgStorageCageDetailsService.queryCutDrawingByEngineerId(engineerId, patternSequence); |
| | | return Result.build(200, "成功", map); |
| | | } |
| | | |
| | | @ApiOperation("识别显示 当前版图 参数()") |
| | | @PostMapping("/currentCutTerritory") |
| | | @ResponseBody |
| | | public Result currentCutTerritory() { |
| | | List<Map<String, Object>> h = edgStorageCageDetailsService.selectCutTerritory(); |
| | | return Result.build(200, "成功", h); |
| | | @ApiOperation("识别显示:当前版图,需要当前卧式理片设备id、上片线路") |
| | | @PostMapping("/queryCurrentCutDrawing") |
| | | public Result queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | List<CutDrawingVO> cutDrawingVOS = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell); |
| | | return Result.build(200, "成功", cutDrawingVOS); |
| | | } |
| | | |
| | | @ApiOperation("识别操作: 破损/拿走 参数(ID,功能[9:拿走,8:破损])") |
| | | @PostMapping("/identControls") |
| | | @ResponseBody |
| | | public Result<String> identControls(@RequestBody @Validated IdentWornRequest request) { |
| | | return Result.build(200, "成功", edgStorageCageDetailsService.identControls(request)); |
| | | } |
| | | |
| | | @ApiOperation("磨边任务 参数()") |
| | | @PostMapping("/selectEdgTask") |
| | | @ResponseBody |
| | | public Result selectEdgTask(@RequestBody Map<String, String> arguments) { |
| | | String line = arguments.get("line"); |
| | | List<Map<String, Object>> EdgTasks = taskCacheService.selectEdgInfo(line); |
| | |
| | | firstLength: 460 |
| | | secondLength: 390 |
| | | two: #第二条磨边线的最小尺寸信息 |
| | | firstLength: 390 |
| | | secondLength: 390 |
| | | firstLength: 300 |
| | | secondLength: 300 |
| | | glassGap: 2500 |
| | | cellLength: 2500 |
| | | sequence: |
| | |
| | | select * |
| | | from slot_temp limit 1 |
| | | </select> |
| | | <select id="queryCutDrawingByEngineerId" resultType="com.mes.edgstoragecage.entity.vo.CutDrawingVO"> |
| | | with glass_temp as ( |
| | | select * from glass_info where engineer_id = #{engineerId} and pattern_sequence = #{patternSequence} |
| | | ), cut_drawing_temp as ( |
| | | select t.*, |
| | | case when t2.glass_id is not null then t2.type |
| | | when t1.glass_id is not null then t1.state |
| | | else 0 end as state |
| | | from glass_temp t |
| | | left join edg_storage_cage_details t1 on t.glass_id = t1.glass_id |
| | | left join damage t2 on t.glass_id = t2.glass_id and t2.type in (8,9) |
| | | )select * from cut_drawing_temp where 1=1 |
| | | <if test="isAll == 1"> |
| | | and state = 0 |
| | | </if> |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("指定钢化工程") |
| | | @PostMapping("/appointTemperingEngineerId") |
| | | public Result appointTemperingEngineerId(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | boolean result = bigStorageCageDetailsService.appointTemperingEngineerId(bigStorageCageDetails.getEngineerId()); |
| | | if (result == true) { |
| | | return Result.build(200, "指定钢化成功", 1); |
| | | } else { |
| | | return Result.build(200, "已存在钢化任务,请等待钢化完成再指定钢化", 1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("钢化/非钢化查询:0 非钢化 1:钢化") |
| | | @PostMapping("/selectTemperingGlass") |
| | | public Result<List<TemperingGlassCountDTO>> selectTemperingGlass(int isTempering) { |
| | |
| | | return Result.build(200, "指定流程卡成功", 1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("指定工程") |
| | | @PostMapping("/appointEngineerId") |
| | | public Result appointEngineerId(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.appointEngineerId(bigStorageCageDetails.getEngineerId()); |
| | | return Result.build(200, "修改成功", 1); |
| | | } |
| | | |
| | | @ApiOperation("大理片笼报破损") |
| | | @PostMapping("/bigStorageGlassDamageByGlassId") |
| | | public Result<String> bigStorageGlassDamageByGlassId(String glassId) { |
| | | |
| | | public Result<String> bigStorageGlassDamageByGlassId(@RequestBody Map<String, String> map) { |
| | | String glassId=map.get("glassId"); |
| | | return Result.build(200, "报破损成功", bigStorageCageDetailsService.bigStorageGlassDamageByGlassId(glassId)); |
| | | } |
| | | } |
| | |
| | | package com.mes.bigstorage.entity.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | String temperingSwitch(Boolean flag); |
| | | |
| | | void appointEngineerId(String engineerId); |
| | | boolean appointTemperingEngineerId(String engineerId); |
| | | |
| | | List<BigStorageRelationDTO> queryIsAllNeedDispatchVirtualSlot(); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void appointEngineerId(String engineerId) { |
| | | redisUtil.setCacheObject("temperingengineerId", engineerId); |
| | | public boolean appointTemperingEngineerId(String engineerId) { |
| | | LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | temperingGlassInfoLambdaQueryWrapper |
| | | .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW); |
| | | List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoMapper.selectList(temperingGlassInfoLambdaQueryWrapper); |
| | | |
| | | if (temperingGlassInfoList.size() == 0) { |
| | | List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class) |
| | | .selectAll(GlassInfo.class) |
| | | .select("-1 as state") |
| | | .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot) |
| | | .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) |
| | | .eq(GlassInfo::getEngineerId, engineerId) |
| | | .ne(GlassInfo::getTemperingLayoutId, 0) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .orderByAsc(GlassInfo::getTemperingLayoutId) |
| | | .orderByAsc(GlassInfo::getTemperingFeedSequence) |
| | | ); |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | |
| | | MPJLambdaWrapper<BigStorageCage> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(BigStorageCage.class).selectCollection(BigStorageCageDetails.class, BigStorageCage::getBigStorageCageDetails) |
| | | .leftJoin(BigStorageCageDetails.class, on -> on.eq(BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .eq(StringUtils.isNotBlank(query.getFilmsId()), BigStorageCageDetails::getFilmsId, query.getFilmsId()) |
| | | .eq(StringUtils.isNotBlank(query.getFlowCardId()), BigStorageCageDetails::getFlowCardId, query.getFlowCardId()) |
| | | .like(StringUtils.isNotBlank(query.getFilmsId()), BigStorageCageDetails::getFilmsId, query.getFilmsId()) |
| | | .like(StringUtils.isNotBlank(query.getFlowCardId()), BigStorageCageDetails::getFlowCardId, query.getFlowCardId()) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL, Const.GLASS_STATE_OUT_ING)) |
| | | .eq(BigStorageCage::getDeviceId, query.getDeviceId()) |
| | | .orderByAsc(BigStorageCage::getDeviceId) |
| | |
| | | } |
| | | } |
| | | jsonObject.append("bigStorageCageDetailsFeedTask", inTaskList); |
| | | |
| | | //进片联机 |
| | | ReadWriteEntity inkageEntity = miloService.readFromOpcUa("DLP1A.DLP1A.mesControl"); |
| | | jsonObject.append("inkageEntity", inkageEntity.getValue()); |
| | | //进片请求 |
| | | ReadWriteEntity requestEntity = miloService.readFromOpcUa("DLP1A.DLP1A.RequestMes"); |
| | | jsonObject.append("requestEntity", requestEntity.getValue()); |
| | | //启动命令 |
| | | ReadWriteEntity mesReplyEntity = miloService.readFromOpcUa("DLP1A.DLP1A.MesReply"); |
| | | jsonObject.append("mesReplyEntity", mesReplyEntity.getValue()); |
| | | //出片联机 |
| | | ReadWriteEntity outInkageEntity = miloService.readFromOpcUa("DLP1B.DLP1B.mesControl"); |
| | | jsonObject.append("outInkageEntity", outInkageEntity.getValue()); |
| | | //出片请求 |
| | | ReadWriteEntity outRequestEntity = miloService.readFromOpcUa("DLP1B.DLP1B.RequestMes"); |
| | | jsonObject.append("outRequestEntity", outRequestEntity.getValue()); |
| | | }catch(Exception e){ |
| | | //todo:不做任务处理 |
| | | } |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // @Scheduled(fixedDelay = 1000) |
| | | public void temperingIsRun() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //进片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsFeedTask = bigStorageCageDetailsService.selectFeedTask(); |
| | | jsonObject.append("bigStorageCageDetailsFeedTask", bigStorageCageDetailsFeedTask); |
| | | //出片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsOutTask = bigStorageCageDetailsService.selectOutTask(); |
| | | jsonObject.append("bigStorageCageDetailsOutTask", bigStorageCageDetailsOutTask); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("isRun"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // @Scheduled(fixedDelay = Long.MAX_VALUE) |
| | | public void scanCodeTask() { |
| | | log.info("扫描任务已启动"); |
| | | while (true) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try (Socket socket = new Socket(scanIp, scanPort); |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) { |
| | | // 接收服务器响应 |
| | | log.info("等待扫码中......"); |
| | | String glassId = in.readLine(); |
| | | log.info("扫描到的玻璃id:{}", glassId); |
| | | List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("slicecage"); |
| | | if (CollectionUtils.isNotEmpty(sendwServer)) { |
| | | //按照玻璃id获取玻璃信息返回给前端界面,具体需要哪些数据待确认 |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, glassId).last("limit 1")); |
| | | if (null == glassInfo) { |
| | | log.info("按照玻璃id:{},无法找到玻璃信息", glassId); |
| | | } else { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | jsonObject.append("scanGlass", glassInfo); |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception exception) { |
| | | log.info("读取异常,原因为{}", exception.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | private Integer artificialOutTargetPosition; |
| | | @Value("${mes.slotMaxHeight}") |
| | | private Integer slotMaxHeight; |
| | | @Value("${mes.slotMaxthickness}") |
| | | private Integer slotMaxthickness; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void inBigStorageTask() throws Exception { |
| | |
| | | } |
| | | } |
| | | //todo:超大尺寸 |
| | | if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight())) { |
| | | if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() > slotMaxthickness) { |
| | | int count = bigStorageCageDetailsService.count(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getSlot, THROUGH_SLOT) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); |
| | |
| | | //修改磨边对列表的玻璃状态 |
| | | edgGlassTaskInfoService.update(new LambdaUpdateWrapper<EdgGlassTaskInfo>() |
| | | .set(EdgGlassTaskInfo::getState, Const.EDG_GLASS_SUCCESS).in(EdgGlassTaskInfo::getGlassId, glassIdList)); |
| | | //报工 |
| | | for (String glass : glassIdList) { |
| | | damageService.autoSubmitReport(glass, inTaskList.get(0).getStartSlot(), "磨边", "进大理片笼"); |
| | | } |
| | | |
| | | Map<String, List<GlassInfo>> glassListMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getGlassId)); |
| | | //计算目标格子 |
| | | List<BigStorageCageHistoryTask> historyTasks = new ArrayList<>(); |
| | |
| | | List<TemperingGlassInfo> unFinishTemperingGlassInfoList = temperingGlassInfoService.list(new LambdaQueryWrapper<TemperingGlassInfo>() |
| | | .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW).orderByAsc(TemperingGlassInfo::getTemperingFeedSequence)); |
| | | if (CollectionUtil.isNotEmpty(unFinishTemperingGlassInfoList)) { |
| | | // List<String> glassIdList = unFinishTemperingGlassInfoList.stream().map(TemperingGlassInfo::getGlassId).collect(Collectors.toList()); |
| | | // List<BigStorageCageHistoryTask> historyTaskList = bigStorageCageHistoryTaskService.list(new LambdaQueryWrapper<BigStorageCageHistoryTask>() |
| | | // .eq(BigStorageCageHistoryTask::getTaskType, Const.BIG_STORAGE_BEFORE_OUT) |
| | | // .in(BigStorageCageHistoryTask::getGlassId, glassIdList)); |
| | | // List<TemperingGlassInfo> temperingGlassList = unFinishTemperingGlassInfoList; |
| | | // if (CollectionUtil.isNotEmpty(historyTaskList)) { |
| | | // List<String> taskGlassList = historyTaskList.stream().map(BigStorageCageHistoryTask::getGlassId).collect(Collectors.toList()); |
| | | // temperingGlassList = unFinishTemperingGlassInfoList.stream().filter(e -> !taskGlassList.contains(e.getGlassId())).collect(Collectors.toList()); |
| | | // } |
| | | // if (CollectionUtil.isNotEmpty(unFinishTemperingGlassInfoList)) { |
| | | log.info("有正在出片的钢化任务"); |
| | | computeOutGlassInfoByVirtualSlot(unFinishTemperingGlassInfoList, "big_storage_cage_out_one_task", temperingOutTargetPosition, Const.GLASS_STATE_OUT_ING, Const.BIG_STORAGE_BEFORE_OUT); |
| | | Date endDate = new Date(); |
| | |
| | | glassGap: 250 #玻璃间距 |
| | | xMaxSize: 2800 |
| | | slotMaxHeight: 2500 |
| | | slotMaxthickness: 12 |
| | | temperingOutTargetPosition: 930 |
| | | artificialOutTargetPosition: 931 |
| | | |
| | |
| | | </where> |
| | | </update> |
| | | <update id="updateDeviceIdBySlot"> |
| | | update big_storage_cage_details t innser join big_storage_cage t1 on t.slot = t1.slot |
| | | update big_storage_cage_details t inner join big_storage_cage t1 on t.slot = t1.slot |
| | | set t.device_id = t1.device_id |
| | | where t.slot in ( |
| | | <foreach collection="list" item="item" separator=","> |
| | |
| | | package com.mes.hollow.controller; |
| | | |
| | | |
| | | import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (HollowBigStorageCage)表控制层 |
| | |
| | | @RestController |
| | | @RequestMapping("hollowBigStorageCage") |
| | | public class HollowBigStorageCageController { |
| | | @Resource |
| | | HollowBigStorageCageService hollowBigStorageCageService; |
| | | |
| | | @ApiOperation("按照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息") |
| | | @PostMapping("/queryHollowBigStorageCageDetail") |
| | | public Result<List<HollowBigStorageAndDetailsDTO>> queryHollowBigStorageCageDetail(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | return Result.build(200, "查询成功", hollowBigStorageCageService.queryHollowBigStorageCageDetail(query)); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.mes.hollow.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (HollowBigStorageCage)表实体类 |
| | |
| | | */ |
| | | private Integer remainWidth; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | @TableField(exist = false) |
| | | private List<HollowBigStorageCageDetails> hollowBigStorageCageDetails; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | private String filmsId; |
| | | /** |
| | | * /*厚度 |
| | | */ |
| | | private Double thickness; |
| | | /** |
| | | * /*状态 |
| | | */ |
| | | private Integer state; |
New file |
| | |
| | | package com.mes.hollow.entity.dto; |
| | | |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/6/11 16:45 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class HollowBigStorageAndDetailsDTO extends HollowBigStorageCage { |
| | | |
| | | private List<HollowBigStorageCageDetails> hollowBigStorageCageDetails; |
| | | } |
New file |
| | |
| | | package com.mes.hollow.entity.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/12/23 10:48 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class HollowBigStorageDetailsQueryVO { |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Integer deviceId; |
| | | /** |
| | | * 流程卡 |
| | | */ |
| | | private String flowCardId; |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private String filmsId; |
| | | |
| | | } |
| | |
| | | package com.mes.hollow.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | |
| | | /** |
| | |
| | | * @author makejava |
| | | * @since 2024-11-21 09:22:40 |
| | | */ |
| | | public interface HollowBigStorageCageMapper extends BaseMapper<HollowBigStorageCage> { |
| | | public interface HollowBigStorageCageMapper extends MPJBaseMapper<HollowBigStorageCage> { |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * (HollowBigStorageCage)表服务接口 |
| | |
| | | */ |
| | | public interface HollowBigStorageCageService extends IService<HollowBigStorageCage> { |
| | | |
| | | List<HollowBigStorageAndDetailsDTO> queryHollowBigStorageCageDetail(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | Map<Integer, List<HollowBigStorageCage>> queryHollowbigStorageCageDetail(); |
| | | |
| | | List<Map<String, Object>> selectBigStorageCageUsage(); |
| | | } |
| | | |
| | |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.mapper.HollowBigStorageCageMapper; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * (HollowBigStorageCage)表服务实现类 |
| | |
| | | @Service |
| | | public class HollowBigStorageCageServiceImpl extends ServiceImpl<HollowBigStorageCageMapper, HollowBigStorageCage> implements HollowBigStorageCageService { |
| | | |
| | | @Value("${mes.slotWidth}") |
| | | private Integer slotWidth; |
| | | @Override |
| | | public List<HollowBigStorageAndDetailsDTO> queryHollowBigStorageCageDetail(HollowBigStorageDetailsQueryVO query) { |
| | | MPJLambdaWrapper<HollowBigStorageCage> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(HollowBigStorageCage.class).selectCollection(HollowBigStorageCageDetails.class, HollowBigStorageCage::getHollowBigStorageCageDetails) |
| | | .leftJoin(HollowBigStorageCageDetails.class, on -> on.eq(HollowBigStorageCageDetails::getSlot, HollowBigStorageCage::getSlot) |
| | | .like(StringUtils.isNotBlank(query.getFilmsId()), HollowBigStorageCageDetails::getFilmsId, query.getFilmsId()) |
| | | .like(StringUtils.isNotBlank(query.getFlowCardId()), HollowBigStorageCageDetails::getFlowCardId, query.getFlowCardId()) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL, Const.GLASS_STATE_OUT_ING)) |
| | | .eq(HollowBigStorageCage::getDeviceId, query.getDeviceId()) |
| | | .orderByAsc(HollowBigStorageCage::getDeviceId) |
| | | .orderByAsc(HollowBigStorageCage::getSlot); |
| | | return baseMapper.selectJoinList(HollowBigStorageAndDetailsDTO.class, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Map<Integer, List<HollowBigStorageCage>> queryHollowbigStorageCageDetail() { |
| | | MPJLambdaWrapper<HollowBigStorageCage> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(HollowBigStorageCage.class).selectCollection(HollowBigStorageCageDetails.class, HollowBigStorageCage::getHollowBigStorageCageDetails) |
| | | .leftJoin(HollowBigStorageCageDetails.class, on -> on.eq(HollowBigStorageCageDetails::getSlot, HollowBigStorageCage::getSlot) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL).orderByAsc(HollowBigStorageCageDetails::getUpdateTime)); |
| | | List<HollowBigStorageCage> bigStorageCages = baseMapper.selectJoinList(HollowBigStorageCage.class, wrapper); |
| | | Map<Integer, List<HollowBigStorageCage>> listMap = bigStorageCages.stream().collect(Collectors.groupingBy(item -> item.getDeviceId())); |
| | | return listMap; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectBigStorageCageUsage() { |
| | | QueryWrapper<HollowBigStorageCage> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("device_id,ROUND(1 - SUM(CASE WHEN remain_width = " + slotWidth + " THEN 1 ELSE 0 END) / COUNT(device_id), 2)*100 AS percentage,SUM(CASE WHEN remain_width = " + slotWidth + " THEN 1 ELSE 0 END) AS count") |
| | | .groupBy("device_id"); |
| | | return baseMapper.selectMaps(wrapper); |
| | | } |
| | | } |
| | | |
| | |
| | | .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId) |
| | | .eq(HollowGlassRelationInfo::getWidth, width) |
| | | .eq(HollowGlassRelationInfo::getHeight, height) |
| | | .eq(HollowGlassRelationInfo::getTotalLayer, totalLayer) |
| | | .eq(HollowGlassRelationInfo::getLayer, layer) |
| | | .eq(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_NEW) |
| | | .orderByAsc(HollowGlassRelationInfo::getHollowSequence) |
| | |
| | | .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId) |
| | | .eq(HollowGlassRelationInfo::getWidth, width) |
| | | .eq(HollowGlassRelationInfo::getHeight, height) |
| | | .eq(HollowGlassRelationInfo::getTotalLayer, totalLayer) |
| | | .eq(HollowGlassRelationInfo::getLayer, layer) |
| | | .eq(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_NEW) |
| | | .orderByAsc(HollowGlassRelationInfo::getHollowSequence) |
| | |
| | | } |
| | | HollowBigStorageCageDetails hollowDetails = hollowBigStorageCageDetailsService.getOne(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getFlowCardId, relationInfoOne.getFlowCardId()) |
| | | .eq(HollowBigStorageCageDetails::getTotalLayer, totalLayer) |
| | | .eq(HollowBigStorageCageDetails::getLayer, layer) |
| | | .eq(HollowBigStorageCageDetails::getVirtualSlot, relationInfoOne.getVirtualSlot()) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO) |
| | |
| | | } |
| | | HollowGlassRelationInfo relationInfoBefore = hollowGlassRelationInfoService.getOne(new LambdaQueryWrapper<HollowGlassRelationInfo>() |
| | | .eq(HollowGlassRelationInfo::getFlowCardId, relationInfoOne.getFlowCardId()) |
| | | .eq(HollowGlassRelationInfo::getTotalLayer, relationInfoOne.getTotalLayer()) |
| | | .eq(HollowGlassRelationInfo::getLayer, relationInfoOne.getLayer()) |
| | | .eq(HollowGlassRelationInfo::getVirtualSlot, relationInfoOne.getVirtualSlot()) |
| | | .eq(HollowGlassRelationInfo::getSlotSequence, relationInfoOne.getSlotSequence() - 1)); |
| | |
| | | */ |
| | | private String filmsId; |
| | | /** |
| | | * /*厚度 |
| | | */ |
| | | private Double thickness; |
| | | /** |
| | | * /*状态 |
| | | */ |
| | | private Integer state; |
| | |
| | | |
| | | private static final String BIG_STORAGE_CAGE_IN_TWO_TASK = "big_storage_cage_in_two_task"; |
| | | private static final String BIG_STORAGE_CAGE_OUT_TWO_TASK = "big_storage_cage_out_two_task"; |
| | | /** |
| | | * 直通格子 |
| | | */ |
| | | private static final Integer THROUGH_SLOT = 920; |
| | | @Autowired(required = false) |
| | | MiloService miloService; |
| | | @Resource |
| | |
| | | |
| | | @Value("${mes.outCarMaxSize}") |
| | | private Integer outCarMaxSize; |
| | | |
| | | @Value("${mes.slotMaxHeight}") |
| | | private Integer slotMaxHeight; |
| | | @Value("${mes.slotMaxthickness}") |
| | | private Integer slotMaxthickness; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void inBigStorageTask() throws Exception { |
| | |
| | | //todo:向plc发送报警 |
| | | return; |
| | | } |
| | | //按照玻璃厚度分组,判断剩余格子是否可以存放 |
| | | Map<Double, Long> thickCountMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getThickness, Collectors.counting())); |
| | | for (Map.Entry<Double, Long> entry : thickCountMap.entrySet()) { |
| | | int count = hollowBigStorageCageService.count(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .le(HollowBigStorageCage::getMinThickness, entry.getKey()) |
| | | .ge(HollowBigStorageCage::getMaxThickness, entry.getKey())); |
| | | if (count < entry.getValue()) { |
| | | log.info("笼内格子剩余数量不足,结束本次进片"); |
| | | //todo:向plc发送报警 |
| | | return; |
| | | } |
| | | } |
| | | //todo:超大尺寸 |
| | | if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() > slotMaxthickness) { |
| | | int count = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); |
| | | if (count > 0) { |
| | | log.info("直通片台存在玻璃,结束本次进片"); |
| | | //todo:向plc发送报警 |
| | | return; |
| | | } |
| | | } |
| | | |
| | | log.info("将钢化小片表内的状态改为钢化结束,玻璃id有:{}", glassIdList); |
| | | //修改钢化任务表中的状态 |
| | | temperingGlassInfoService.update(new LambdaUpdateWrapper<TemperingGlassInfo>() |
| | | .set(TemperingGlassInfo::getState, Const.TEMPERING_END).in(TemperingGlassInfo::getGlassId, glassIdList)); |
| | | |
| | | //报工 |
| | | log.info("将接收到的玻璃进行钢化自动报工,玻璃id有:{}", glassIdList); |
| | | for (String glass : glassIdList) { |
| | | damageService.autoSubmitReport(glass, inTaskList.get(0).getStartSlot(), "钢化", "进中空理片笼"); |
| | | } |
| | | Map<String, List<GlassInfo>> glassListMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getGlassId)); |
| | | |
| | | //计算目标格子 |
| | |
| | | if (totalLayer != 0) { |
| | | resultList.add(list.get(0)); |
| | | HollowBigStorageCage storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth).last("limit 1")); |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .le(HollowBigStorageCage::getMinThickness, list.get(0).getThickness()) |
| | | .ge(HollowBigStorageCage::getMaxThickness, list.get(0).getThickness()) |
| | | .eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1")); |
| | | targetSlot = storageCage.getSlot(); |
| | | hollowBigStorageCageService.update(new LambdaUpdateWrapper<HollowBigStorageCage>() |
| | | .set(HollowBigStorageCage::getRemainWidth, 0).eq(HollowBigStorageCage::getSlot, targetSlot)); |
| | | }else{ |
| | | } else { |
| | | resultList = tempList; |
| | | } |
| | | totalLayer = 0; |
| | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageTask; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageTaskService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | import com.mes.hollowqueue.service.HollowGlassQueueInfoService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.utils.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | HollowGlassQueueInfoService hollowGlassQueueInfoService; |
| | | @Resource |
| | | HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService; |
| | | @Resource |
| | | HollowBigStorageCageService hollowBigStorageCageService; |
| | | @Resource |
| | | BigStorageCageTaskService bigStorageCageTaskService; |
| | | |
| | | @Autowired(required = false) |
| | | MiloService miloService; |
| | | |
| | | @Resource |
| | | RedisUtil redisUtil; |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void hollowGlassTask() { |
| | | List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void hollowGlassMessage() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | //查询使用数据源1查询数据 |
| | | queryDataSource1(jsonObject); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("hollowGlassMessage"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | public void queryDataSource1(JSONObject jsonObject) throws Exception { |
| | | List<Double> carPostion = new ArrayList<>(); |
| | | carPostion.add(0.25); |
| | | carPostion.add(0.5); |
| | | jsonObject.append("carPostion", carPostion); |
| | | //界面展示笼子信息 |
| | | jsonObject.append("bigStorageCageInfos", hollowBigStorageCageService.queryHollowbigStorageCageDetail()); |
| | | |
| | | try{ |
| | | //进片任务数据 |
| | | List<BigStorageCageTask> inTaskList = new ArrayList(); |
| | | ReadWriteEntity fromOpcUa = miloService.readFromOpcUa("DLP2A.DLP2A.FROM1"); |
| | | for (int i = 1; i <= 6; i++) { |
| | | ReadWriteEntity requestWord = miloService.readFromOpcUa("DLP2A.DLP2A.DI" + i); |
| | | ReadWriteEntity targetSlotWord = miloService.readFromOpcUa("DLP2A.DLP2A.TO" + i); |
| | | ReadWriteEntity stateWord = miloService.readFromOpcUa("DLP2A.DLP2A.STATE" + i); |
| | | if (null != requestWord.getValue()) { |
| | | BigStorageCageTask task = new BigStorageCageTask(); |
| | | task.setGlassId(requestWord.getValue() + ""); |
| | | task.setStartSlot(Integer.parseInt(fromOpcUa.getValue() + "")); |
| | | task.setTargetSlot(Integer.parseInt(targetSlotWord.getValue() + "")); |
| | | task.setTaskState(Integer.parseInt(stateWord.getValue() + "")); |
| | | inTaskList.add(task); |
| | | continue; |
| | | } |
| | | } |
| | | jsonObject.append("bigStorageCageDetailsFeedTask", inTaskList); |
| | | //进片联机 |
| | | ReadWriteEntity inkageEntity = miloService.readFromOpcUa("DLP2A.DLP2A.mesControl"); |
| | | jsonObject.append("inkageEntity", inkageEntity.getValue()); |
| | | //进片请求 |
| | | ReadWriteEntity requestEntity = miloService.readFromOpcUa("DLP2A.DLP2A.RequestMes"); |
| | | jsonObject.append("requestEntity", requestEntity.getValue()); |
| | | //启动命令 |
| | | ReadWriteEntity mesReplyEntity = miloService.readFromOpcUa("DLP2A.DLP2A.MesReply"); |
| | | jsonObject.append("mesReplyEntity", mesReplyEntity.getValue()); |
| | | //出片联机 |
| | | ReadWriteEntity outInkageEntity = miloService.readFromOpcUa("DLP2B.DLP2B.mesControl"); |
| | | jsonObject.append("outInkageEntity", outInkageEntity.getValue()); |
| | | //出片请求 |
| | | ReadWriteEntity outRequestEntity = miloService.readFromOpcUa("DLP2B.DLP2B.RequestMes"); |
| | | jsonObject.append("outRequestEntity", outRequestEntity.getValue()); |
| | | |
| | | }catch(Exception e){ |
| | | //todo:不做任务处理 |
| | | } |
| | | |
| | | //出片任务数据 |
| | | List<BigStorageCageTask> outTaskList = bigStorageCageTaskService.queryTaskMessage("big_storage_cage_out_two_task"); |
| | | jsonObject.append("bigStorageCageDetailsOutTask", outTaskList); |
| | | |
| | | //调度开关 |
| | | boolean dispatchHollowSwitch = false; |
| | | if (redisUtil.getCacheObject("dispatchHollowSwitch") == null) { |
| | | redisUtil.setCacheObject("dispatchHollowSwitch", false); |
| | | } else { |
| | | dispatchHollowSwitch = redisUtil.getCacheObject("dispatchHollowSwitch"); |
| | | } |
| | | jsonObject.append("dispatchHollowSwitch", dispatchHollowSwitch); |
| | | |
| | | //理片笼使用情况 |
| | | List<Map<String, Object>> bigStorageCageUsage = hollowBigStorageCageService.selectBigStorageCageUsage(); |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | |
| | | // |
| | | // //打印开关 |
| | | // boolean autoPrint = false; |
| | | // if (redisUtil.getCacheObject("autoPrint") == null) { |
| | | // redisUtil.setCacheObject("autoPrint", false); |
| | | // } else { |
| | | // autoPrint = redisUtil.getCacheObject("autoPrint"); |
| | | // } |
| | | // jsonObject.append("autoPrint", autoPrint); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | xMaxSize: 2800 |
| | | temperingOutTargetPosition: 930 |
| | | artificialOutTargetPosition: 931 |
| | | slotMaxHeight: 2500 |
| | | slotMaxthickness: 12 |
| | | kangaroohy: |
| | | milo: |
| | | enabled: true |