Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownCacheGlassTask.java
67个文件已修改
34个文件已添加
1个文件已删除
| | |
| | | "@vue-macros/reactivity-transform": "^0.3.23", |
| | | "axios": "^1.6.8", |
| | | "chart.js": "^4.4.3", |
| | | "echarts": "^5.5.0", |
| | | "echarts": "^5.5.1", |
| | | "element-plus": "^2.4.0", |
| | | "moment": "^2.30.1", |
| | | "pinia": "^2.1.6", |
| | |
| | | "sweetalert2": "^11.10.7", |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-echarts": "^6.7.3", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-router": "^4.2.4", |
| | | "vxe-table": "^4.5.15", |
| | |
| | | "integrity": "sha512-M/MERVDZ8hguvjl6MAlLWSLYLS7PzEyXaTb5gEeJ+SF+e9iUC0sdvlzqe91MMDHBoy+nqw7wKcUOrDSyvMCrRg==" |
| | | }, |
| | | "node_modules/echarts": { |
| | | "version": "5.5.0", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz", |
| | | "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", |
| | | "version": "5.5.1", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.1.tgz", |
| | | "integrity": "sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==", |
| | | "dependencies": { |
| | | "tslib": "2.3.0", |
| | | "zrender": "5.5.0" |
| | | "zrender": "5.6.0" |
| | | } |
| | | }, |
| | | "node_modules/element-plus": { |
| | |
| | | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", |
| | | "dev": true |
| | | }, |
| | | "node_modules/resize-detector": { |
| | | "version": "0.3.0", |
| | | "resolved": "https://registry.npmmirror.com/resize-detector/-/resize-detector-0.3.0.tgz", |
| | | "integrity": "sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ==" |
| | | }, |
| | | "node_modules/reusify": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/vue-echarts": { |
| | | "version": "6.7.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-echarts/-/vue-echarts-6.7.3.tgz", |
| | | "integrity": "sha512-vXLKpALFjbPphW9IfQPOVfb1KjGZ/f8qa/FZHi9lZIWzAnQC1DgnmEK3pJgEkyo6EP7UnX6Bv/V3Ke7p+qCNXA==", |
| | | "hasInstallScript": true, |
| | | "dependencies": { |
| | | "resize-detector": "^0.3.0", |
| | | "vue-demi": "^0.13.11" |
| | | }, |
| | | "peerDependencies": { |
| | | "@vue/composition-api": "^1.0.5", |
| | | "@vue/runtime-core": "^3.0.0", |
| | | "echarts": "^5.4.1", |
| | | "vue": "^2.6.12 || ^3.1.1" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "@vue/composition-api": { |
| | | "optional": true |
| | | }, |
| | | "@vue/runtime-core": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/vue-echarts/node_modules/vue-demi": { |
| | | "version": "0.13.11", |
| | | "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz", |
| | | "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", |
| | | "hasInstallScript": true, |
| | | "bin": { |
| | | "vue-demi-fix": "bin/vue-demi-fix.js", |
| | | "vue-demi-switch": "bin/vue-demi-switch.js" |
| | | }, |
| | | "engines": { |
| | | "node": ">=12" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/sponsors/antfu" |
| | | }, |
| | | "peerDependencies": { |
| | | "@vue/composition-api": "^1.0.0-rc.1", |
| | | "vue": "^3.0.0-0 || ^2.6.0" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "@vue/composition-api": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/vue-i18n": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | |
| | | } |
| | | }, |
| | | "node_modules/zrender": { |
| | | "version": "5.5.0", |
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz", |
| | | "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", |
| | | "version": "5.6.0", |
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.0.tgz", |
| | | "integrity": "sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==", |
| | | "dependencies": { |
| | | "tslib": "2.3.0" |
| | | } |
| | |
| | | "integrity": "sha512-M/MERVDZ8hguvjl6MAlLWSLYLS7PzEyXaTb5gEeJ+SF+e9iUC0sdvlzqe91MMDHBoy+nqw7wKcUOrDSyvMCrRg==" |
| | | }, |
| | | "echarts": { |
| | | "version": "5.5.0", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz", |
| | | "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", |
| | | "version": "5.5.1", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.1.tgz", |
| | | "integrity": "sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==", |
| | | "requires": { |
| | | "tslib": "2.3.0", |
| | | "zrender": "5.5.0" |
| | | "zrender": "5.6.0" |
| | | } |
| | | }, |
| | | "element-plus": { |
| | |
| | | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", |
| | | "dev": true |
| | | }, |
| | | "resize-detector": { |
| | | "version": "0.3.0", |
| | | "resolved": "https://registry.npmmirror.com/resize-detector/-/resize-detector-0.3.0.tgz", |
| | | "integrity": "sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ==" |
| | | }, |
| | | "reusify": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", |
| | |
| | | "@types/sortablejs": "^1.15.8" |
| | | } |
| | | }, |
| | | "vue-echarts": { |
| | | "version": "6.7.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-echarts/-/vue-echarts-6.7.3.tgz", |
| | | "integrity": "sha512-vXLKpALFjbPphW9IfQPOVfb1KjGZ/f8qa/FZHi9lZIWzAnQC1DgnmEK3pJgEkyo6EP7UnX6Bv/V3Ke7p+qCNXA==", |
| | | "requires": { |
| | | "resize-detector": "^0.3.0", |
| | | "vue-demi": "^0.13.11" |
| | | }, |
| | | "dependencies": { |
| | | "vue-demi": { |
| | | "version": "0.13.11", |
| | | "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz", |
| | | "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", |
| | | "requires": {} |
| | | } |
| | | } |
| | | }, |
| | | "vue-i18n": { |
| | | "version": "9.13.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.13.1.tgz", |
| | |
| | | } |
| | | }, |
| | | "zrender": { |
| | | "version": "5.5.0", |
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz", |
| | | "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", |
| | | "version": "5.6.0", |
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.0.tgz", |
| | | "integrity": "sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==", |
| | | "requires": { |
| | | "tslib": "2.3.0" |
| | | } |
| | |
| | | "@vue-macros/reactivity-transform": "^0.3.23", |
| | | "axios": "^1.6.8", |
| | | "chart.js": "^4.4.3", |
| | | "echarts": "^5.5.0", |
| | | "echarts": "^5.5.1", |
| | | "element-plus": "^2.4.0", |
| | | "moment": "^2.30.1", |
| | | "pinia": "^2.1.6", |
| | |
| | | "sweetalert2": "^11.10.7", |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-echarts": "^6.7.3", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-router": "^4.2.4", |
| | | "vxe-table": "^4.5.15", |
| | |
| | | inglassgaps:'请输入玻璃间隙', |
| | | sure:'确认', |
| | | cancel:'取消', |
| | | glassID:'玻璃ID', |
| | | operate:'操作', |
| | | breakage:'破损', |
| | | delete:'删除', |
| | |
| | | materialName :'物料名称', |
| | | createTime :'返库日期', |
| | | }, |
| | | large:{ |
| | | time: '次破时间', |
| | | number: '订单号', |
| | | jobnumber: '报工编号', |
| | | productionnumber: '生产订单号', |
| | | cardnumber: '流程卡号', |
| | | projectname: '项目名称', |
| | | batch: '批次', |
| | | detailID: '明细ID', |
| | | building: '楼号', |
| | | serialnumber: '订单序号', |
| | | productname: '产品名称', |
| | | serial: '工艺确认序号', |
| | | slicemarker: '片标记(位置)', |
| | | numberpatches: '补片数量', |
| | | width: '宽', |
| | | height: '高', |
| | | shape: '形状', |
| | | responsibleprocess: '责任工序', |
| | | process: '本工序', |
| | | numberfractions: '次破未补数量', |
| | | breakreason: '次破原因', |
| | | breaktype: '次破类型', |
| | | responsiblepersonnel: '责任人员', |
| | | responsiblequipment: '责任设备', |
| | | responsibleteam: '责任班组', |
| | | area: '次破面积', |
| | | inspector: '质检员', |
| | | operate: '操作', |
| | | mes: '详情', |
| | | projectnumber: '工程单号', |
| | | brokeno: '报次破未补', |
| | | close: '关闭', |
| | | orderId: '订单ID', |
| | | customerName: '客户名称', |
| | | project: '项目名称', |
| | | are: '面积', |
| | | quantity: '包装方式', |
| | | warehousing: '状态', |
| | | deliveryDate: '送货时间', |
| | | notstocked: '未入库', |
| | | inboundstatus: '部分入库状态', |
| | | allstatus: '全部入库状态', |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | let token = userInfo; // 提取 token |
| | | // 退出登录方法 |
| | | function quit() { |
| | | // removeToken() |
| | | // localStorage.removeItem('token'); |
| | | store.$patch({ |
| | | user: null, |
| | | }) |
| | | router.push('/login') |
| | | } |
| | | // const quit = async () => { |
| | | // try { |
| | | |
| | | // const response = await request.get('/loadGlass/sys/user/logout', { |
| | | // token: token, |
| | | // user: null, |
| | | // }) |
| | | // store.$patch({user: null}) |
| | | // const response = await request.post('/loadGlass/sys/user/logout') |
| | | // if (response.code === 200) { |
| | | // // 登出成功,清除本地存储的 userInfo |
| | | // localStorage.removeItem('userInfo'); |
| | | // // 可以在这里重置应用状态,如导航到登录页等 |
| | | // console.log('登出成功'); |
| | | // } else { |
| | | // // 处理错误情况 |
| | |
| | | import VXETable from 'vxe-table' |
| | | import 'vxe-table/lib/style.css' |
| | | import i18n from '@/lang' |
| | | // import Echarts from "vue-echarts" |
| | | // import * as echarts from "echarts" |
| | | |
| | | // app.component("v-chart", Echarts) |
| | | // app.config.globalProperties.$echarts = echarts |
| | | const app = createApp(App) |
| | | const pinia = createPinia() |
| | | pinia.use(piniaPluginPersistedstate ) |
| | |
| | | } |
| | | ] |
| | | }, |
| | | /*----------- 大屏显示 ----------------*/ |
| | | { |
| | | path: 'largescreen', |
| | | name: 'largescreen', |
| | | component: () => import('../views/largescreen/largescreen.vue'), |
| | | children:[ |
| | | { |
| | | path: '/largescreen/largescreen', |
| | | name: 'largescreen', |
| | | component: () => import('../views/largescreen/largescreen.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | /*----------- 管理系统 ----------------*/ |
| | | { |
| | | path: 'sys', |
New file |
| | |
| | | // tableData.js
|
| | |
|
| | | import { ref } from 'vue';
|
| | |
|
| | | export const tableData = ref([
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },{
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },{
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | }
|
| | | // Add more data as needed
|
| | | ]);
|
| | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | row.enable_state = newState; |
| | | row.enable_state = newState; |
| | | }; |
| | | const open = async(row) => { |
| | | try { |
| | |
| | |
|
| | | <!-- 左侧按钮组 -->
|
| | | <div >
|
| | | <el-button type="success" size="mini" @click="storage()">原片仓储详情</el-button>
|
| | | <el-button type="success" size="mini" @click="handleInbound()">入库</el-button>
|
| | | <el-button type="success" size="mini" >吊装位入库</el-button>
|
| | |
|
| | |
| | | </el-form-item>
|
| | |
|
| | | </div>
|
| | |
|
| | | <el-dialog v-model="Hidden" top="10vh" width="80%" >
|
| | | <el-table
|
| | | :data="tableData"
|
| | | :data="tableData" v-model="dialogVisible3"
|
| | |
|
| | | style="width: 98%; height: 200px"
|
| | | @selection-change="handleSelectionChange"
|
| | |
| | | </el-table-column>
|
| | |
|
| | | <!-- 操作列 -->
|
| | | <el-table-column label="操作" width="350">
|
| | | <el-table-column label="操作" width="250">
|
| | | <template #default="{ row }">
|
| | | <el-button type="primary" size="mini" @click="edithandleRowClick(row)">修改</el-button>
|
| | | <el-button type="danger" size="mini" @click="handleDelete(row)">删除</el-button>
|
| | | <el-button type="warning" size="mini" @click="handleCheckout(row)">出库</el-button>
|
| | | <el-button type="success" size="mini" @click="addglass()">添加原片</el-button>
|
| | | <!-- <el-button type="success" size="mini" @click="addglass()">添加原片</el-button> -->
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | | <el-table
|
| | |
|
| | | |
| | | </el-dialog>
|
| | |
|
| | |
|
| | | <el-table
|
| | | :data="tasktableData"
|
| | | style="width: 98%; height: 150px"
|
| | | @selection-change="handleSelectionChange"
|
| | |
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | | </el-card>
|
| | |
|
| | | <div ref="chart" id="chart" style="width: 100%; height: 250px;"></div>
|
| | | |
| | |
|
| | |
|
| | |
|
| | | |
| | | <div class="img-ypcc" >
|
| | |
|
| | |
|
| | | <div class="img-car1" :style="'z-index:999;left:397px;top:205px;position:absolute;'">
|
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
|
| | | </div>
|
| | | |
| | | </div>
|
| | |
|
| | | <!-- 入库对话框 -->
|
| | | <el-dialog
|
| | |
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="长度">
|
| | | <el-input v-model="formData.wid" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
|
| | | <el-input v-model="formData.width" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="高度">
|
| | | <el-input v-model="formData.heig" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
|
| | | <el-input v-model="formData.height" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="厚度">
|
| | | <el-input v-model="formData.thinkness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
|
| | | <el-input v-model="formData.thickness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="数量">
|
| | | <el-input-number v-model="formData.num" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
|
| | | <el-input-number v-model="formData.quantity" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | |
| | | <el-form-item label="批次号">
|
| | | <el-input v-model="editForm.batchnumber"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="长度">
|
| | | <el-input v-model="editForm.length"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="高度">
|
| | | <el-input v-model="editForm.height"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="厚度">
|
| | | <el-input v-model="editForm.thickness"></el-input>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | | <div class="dialog-footer">
|
| | |
| | | </el-dialog>
|
| | |
|
| | |
|
| | | <!-- <div ref="chart" id="chart" style="width: 100%; height: 400px;"></div> -->
|
| | | </div>
|
| | | </template>
|
| | |
|
| | |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; // 导入 Vue 3 的模块
|
| | | import * as echarts from 'echarts';
|
| | | import { ElMessage, ElMessageBox } from 'element-plus'
|
| | | import {tableData} from '@/stores/tableData.js';
|
| | |
|
| | |
|
| | |
|
| | | const loading = ref(false);
|
| | | const tableData = ref([
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | }
|
| | | // Add more data as needed
|
| | | ]);
|
| | | |
| | |
|
| | | const Hidden = ref(false)
|
| | |
|
| | | const getTagType2 =(status) => {
|
| | | switch (status) {
|
| | |
| | | dialogVisible.value = true;
|
| | | };
|
| | |
|
| | | const storage = () => {
|
| | | // 打开入库对话框
|
| | | Hidden.value = true;
|
| | | };
|
| | | |
| | |
|
| | | const handleCloseDialog = () => {
|
| | | // 关闭对话框时重置表单数据
|
| | | formData.value = {
|
| | |
| | | const editdialogVisible = ref(false);
|
| | | const editForm = ref({
|
| | | quantity: '',
|
| | | batchnumber: ''
|
| | | batchnumber: '',
|
| | | length:'',
|
| | | height:'',
|
| | | thickness:''
|
| | | });
|
| | | const editFormRef = ref(null);
|
| | | let currentRow = ref(null);
|
| | |
| | | // 处理行点击事件
|
| | | const edithandleRowClick = (row) => {
|
| | | currentRow.value = row;
|
| | | console.log(row)
|
| | | editForm.value.quantity = row.quantity.toString();
|
| | | editForm.value.batchnumber = row.batchnumber;
|
| | | editForm.value.length = row.length;
|
| | | editForm.value.height = row.height;
|
| | | editForm.value.thickness = row.thickness;
|
| | | editdialogVisible.value = true;
|
| | | console.log(editForm.value)
|
| | | };
|
| | |
| | | const edithandleDialogClose = () => {
|
| | | editForm.value.quantity = '';
|
| | | editForm.value.batchnumber = '';
|
| | | editForm.value.width = '';
|
| | | editForm.value.height = '';
|
| | | editForm.value.thickness = '';
|
| | | |
| | |
|
| | | currentRow.value = null;
|
| | | };
|
| | |
|
| | |
| | |
|
| | |
|
| | |
|
| | | let chartInstance = null;
|
| | | |
| | |
|
| | | onMounted(() => {
|
| | | // Initialize the chart
|
| | | chartInstance = echarts.init(document.getElementById('chart'));
|
| | |
|
| | | // Simulated data for demonstration
|
| | | const chartData = {
|
| | | labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
|
| | | datasets: [
|
| | | { name: '使用情况统计', data: [{ remaining: 4, total: 5 }, { remaining: 9, total: 10 }, { remaining: 0, total: 30 }, { remaining: 0, total: 10 },{ remaining: 4, total: 5 }] }
|
| | | ]
|
| | | };
|
| | |
|
| | | const options = {
|
| | | tooltip: {
|
| | | trigger: 'axis',
|
| | | axisPointer: {
|
| | | type: 'shadow'
|
| | | }
|
| | | },
|
| | | legend: {
|
| | | data: ['使用情况统计']
|
| | | },
|
| | | xAxis: {
|
| | | type: 'category',
|
| | | data: chartData.labels
|
| | | },
|
| | | yAxis: {
|
| | | type: 'value'
|
| | | },
|
| | | series: chartData.datasets.map(item => ({
|
| | | name: item.name,
|
| | | type: 'bar',
|
| | | stack: '总量',
|
| | | label: {
|
| | | show: true,
|
| | | position: 'inside',
|
| | | formatter: '{c}%'
|
| | | },
|
| | | data: item.data.map(dataItem => ({
|
| | | value: (dataItem.remaining / dataItem.total * 100).toFixed(2), // 计算剩余量占比,保留两位小数
|
| | | remaining: dataItem.remaining,
|
| | | total: dataItem.total,
|
| | | itemStyle: {
|
| | | color: getColorByRemaining(dataItem.remaining, dataItem.total)
|
| | | }
|
| | | }))
|
| | | }))
|
| | | };
|
| | |
|
| | | function getColorByRemaining(remaining, total) {
|
| | | // 根据剩余量与总量的比例,设置不同的颜色逻辑
|
| | | const percentage = remaining / total;
|
| | | if (percentage >= 0.8) {
|
| | | return '#FF6666'; // Red
|
| | | } else if (percentage >= 0.5) {
|
| | | return '#FFCC66'; // Yellow
|
| | | } else {
|
| | | return '#66CC66'; // Green
|
| | | }
|
| | | }
|
| | |
|
| | | // Set options and render chart
|
| | | if (chartInstance) {
|
| | | chartInstance.setOption(options);
|
| | | }
|
| | | });
|
| | |
|
| | | onBeforeUnmount(() => {
|
| | | if (chartInstance) {
|
| | | chartInstance.dispose();
|
| | | chartInstance = null;
|
| | | }
|
| | | });
|
| | |
|
| | | const handleSelectionChange = (selection) => {
|
| | | console.log('Selection changed:', selection);
|
| | | };
|
| | |
|
| | | </script>
|
| | |
|
| | |
| | |
|
| | |
|
| | |
|
| | | .img-ypcc{
|
| | | margin-left: 80px;
|
| | | background-image:url('../../assets/ypcc.png');
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 600px;
|
| | | width: 1400px;
|
| | | max-width: 100%;
|
| | | background-size: 1400px 600px;
|
| | | overflow: hidden;
|
| | | position:relative;
|
| | | margin-top:0px
|
| | | }
|
| | |
|
| | | .img-car1{
|
| | | background-image:url('../../assets/ypccche.png');
|
| | | position: absolute;
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 400px;
|
| | | width: 200px;
|
| | | max-width: 100%;
|
| | | background-size: 200px 170px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | }
|
| | |
|
| | | .custom-dialog {
|
| | | max-height: 90vh; /* 最大高度为视口高度的90% */
|
| | |
| | | |
| | | //登陆方法 |
| | | const submitForm = (formEl: FormInstance | undefined) => { |
| | | store.$patch({ |
| | | user: null, |
| | | }) |
| | | if (!formEl) return |
| | | formEl.validate((valid) => { |
| | | if (valid) { |
| | |
| | | <el-button :loading="loginLoadings" |
| | | type="primary" |
| | | native-type="submit" |
| | | style="width: 80px;" |
| | | @click="submitForm(ruleFormRef)" |
| | | @keyup.enter.native="keyDown(e)" |
| | | plain>{{ $t('login.login') }} |
| | | </el-button> |
| | | <el-button :loading="registerLoadings" |
| | | <!-- <el-button :loading="registerLoadings" |
| | | type="primary" |
| | | @click="register" |
| | | plain>{{ $t('login.register') }} |
| | | </el-button> |
| | | </el-button> --> |
| | | |
| | | </el-form-item> |
| | | </div> |
| | |
| | | const tableDatad = ref([]) |
| | | const tableDataf = ref([]) |
| | | const tableDatae = ref([]) |
| | | const carPosition = ref([]) |
| | | const adjustedRects = ref([]); |
| | | const project = ref([]); |
| | | const adjustedRectsa = ref([]); |
| | |
| | | const temperingLayoutId = ref(''); |
| | | const thickness = ref(''); |
| | | const width = ref(''); |
| | | const carposition1 = ref(60); |
| | | const carposition2 = ref(220); |
| | | const carposition3 = ref(60); |
| | | const carposition4 = ref(260); |
| | | const timers1 =ref(true); |
| | | const timers2 =ref(true); |
| | | const timers3 =ref(true); |
| | | const timers4 =ref(true); |
| | | const cellshow5=ref(false); |
| | | const c1=ref(false); |
| | | const c2=ref(false); |
| | | const cellshow1=ref(true); |
| | | const cellshow2=ref(true); |
| | | const cellshow3=ref(true); |
| | |
| | | tableData.value = data.bigStorageCageInfo[0] |
| | | tableDatab.value = data.temperingGlassInfoList[0] |
| | | tableDatae.value = data.bigStorageCageUsage[0] |
| | | // adjustedRects.value = data.bigStorageCageInfo1[0] |
| | | window.localStorage.setItem('length', data.bigStorageCageInfo1[0].length) |
| | | carPosition.value = data.carPostion[0] |
| | | console.log(carPosition.value); |
| | | window.localStorage.setItem('length', data.data.bigStorageCageInfos[0][1].length) |
| | | let length = window.localStorage.getItem('length') |
| | | adjustedRects.value = data.bigStorageCageInfo1[0].map(rect => ({ |
| | | adjustedRects.value = data.data.bigStorageCageInfos[0][1].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | let small = data.bigStorageCageInfo1[0] |
| | | console.log(small[0].bigStorageCageDetails); |
| | | adjustedRectsa.value = data.bigStorageCageInfo2[0].map(rect => ({ |
| | | adjustedRectsa.value = data.bigStorageCageInfos[0][2].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsb.value = data.bigStorageCageInfo3[0].map(rect => ({ |
| | | adjustedRectsb.value = data.bigStorageCageInfos[0][3].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsc.value = data.bigStorageCageInfo4[0].map(rect => ({ |
| | | adjustedRectsc.value = data.bigStorageCageInfos[0][4].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsd.value = data.bigStorageCageInfo5[0].map(rect => ({ |
| | | adjustedRectsd.value = data.bigStorageCageInfos[0][5].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectse.value = data.bigStorageCageInfo6[0].map(rect => ({ |
| | | adjustedRectse.value = data.bigStorageCageInfos[0][6].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsf.value = data.bigStorageCageInfo7[0].map(rect => ({ |
| | | adjustedRectsf.value = data.bigStorageCageInfos[0][7].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsg.value = data.bigStorageCageInfo8[0].map(rect => ({ |
| | | adjustedRectsg.value = data.bigStorageCageInfos[0][8].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatad" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.intoglassid')" min-width="100" /> |
| | | <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.intoglassid')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageFeedTask.targetSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" /> |
| | | <!-- <el-table-column prop="task_type" align="center" label="任务类型" min-width="120" />没有返回字段 --> |
| | | <el-table-column prop="bigStorageCageFeedTask.taskState" align="center" :label="$t('searchOrder.taskstatus')" min-width="120"> |
| | |
| | | <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="100"/> |
| | | <el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" min-width="100"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="120"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="150"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="100"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140"/> |
| | | <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="100"/> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="100"/> |
| | | <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="100"/> |
| | |
| | | </div> |
| | | <!-- // 父级框 --> |
| | | <div class="img-dlpl" > |
| | | <div class="img-car1" :style="'z-index:999;left:247px;top:' + carposition1 + 'px;position:absolute;'"> |
| | | <div class="img-car1" :style="'z-index:999;left:247px;top:' + 350*carPosition[0] + 'px;position:absolute;'"> |
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | </div> |
| | | <div v-show="c1" class="img-car2" :style="'z-index:999;left:704px;top:' + carposition2 + 'px;position:absolute;'"> |
| | | <div v-show="cellshow2" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | </div> |
| | | |
| | | <div v-show="c2" class="img-car3" :style="'z-index:999;left:247px;top:' + carposition3 + 'px;position:absolute;'"> |
| | | <div v-show="cellshow3" style="margin-top:10px;width:220px;height:5px;background-color:#409EFF;"></div> |
| | | </div> |
| | | <div class="img-car4" :style="'z-index:999;left:704px;top:' + carposition4 + 'px;position:absolute;'"> |
| | | <div class="img-car4" :style="'z-index:999;left:704px;top:' + 350*carPosition[1] + 'px;position:absolute;'"> |
| | | <div v-show="cellshow4" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | </div> |
| | | <div style="position: relative;"> |
| | |
| | | position:relative |
| | | } |
| | | .img-car1{ |
| | | background-image:url('../../assets/lp.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 200px; |
| | | width: 200px; |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | } |
| | | .img-car2{ |
| | | background-image:url('../../assets/lpa.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 200px; |
| | | width: 200px; |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | } |
| | | .img-car3{ |
| | | background-image:url('../../assets/lp.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | |
| | | |
| | | Swal.fire({ |
| | | // title: '玻璃信息', |
| | | title: "$t('reportWork.glassinformation')", |
| | | title: this.$t('reportWork.glassinformation'), |
| | | // title: "$t('reportWork.glassinformation')", |
| | | html: tableContent, |
| | | customClass: { |
| | | popup: 'format-pre' |
| | |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | const dialogFormVisiblea = ref(false) |
| | | |
| | | const dialogFormVisiblea2 = ref(false) |
| | | |
| | | // 数据 |
| | | const loading = ref(false); |
| | | |
| | | // 弹框显示控制 |
| | | const dialogFormVisible = ref(false); |
| | | // 表单数据 |
| | | const workstationId = ref(''); |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref('[]'); |
| | | const tableData = reactive([]); |
| | |
| | | const handleSelectionChange = () => { |
| | | // 处理表格行选择事件 |
| | | }; |
| | | |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | console.log(row.flowCardId); |
| | | flowCardId.value = row.flowCardId; |
| | | // 发起接口请求获取流程卡号 |
| | | fetchFlowCardId(); |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | |
| | | } |
| | | }; |
| | | //确认 |
| | | |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const firstPart = flowCardId.value.split('|')[0].trim(); // |
| | | const twoPart = flowCardId.value.split('|')[1].trim(); // |
| | | const response = await request.post('unLoadGlass/downWorkStation/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | flowCardId: firstPart, |
| | | layer:twoPart |
| | | |
| | | }); |
| | | |
| | | console.log(response) |
| | |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="totalquantity" align="center" :label="$t('reportWork.totalquantity')" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" /> |
| | | <el-table-column prop="layer" align="center" label="层数" min-width="120" /> |
| | | <el-table-column prop="artificialnumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" /> |
| | | <el-table-column |
| | |
| | | // window.localStorage.setItem('slot', row.slot) |
| | | addb.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | function closeDialog(row) { |
| | | add.value = false; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } |
| | | function closeDialoga(row) { |
| | | adda.value = false; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } |
| | | function closeDialogb(row) { |
| | | addb.value = false; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } |
| | | function closeDialogc(row) { |
| | | addc.value = false; |
| | | menuName.value = ''; |
| | | listSort.value = ''; |
| | | url.value = ''; |
| | | } |
| | | // 添加一级菜单 |
| | | const getTableRow = async () => { |
| | | try { |
| | |
| | | <el-button type="primary" @click="getTableRow"> |
| | | {{ $t('customer.sure') }} |
| | | </el-button> |
| | | <el-button @click="add = false">{{ $t('customer.cancel') }}</el-button> |
| | | <el-button @click="closeDialog">{{ $t('customer.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-button type="primary" @click="getTableRowb"> |
| | | {{ $t('customer.sure') }} |
| | | </el-button> |
| | | <el-button @click="addb = false">{{ $t('customer.cancel') }}</el-button> |
| | | <el-button @click="closeDialogb">{{ $t('customer.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-button type="primary" @click="getTableRowa"> |
| | | {{ $t('customer.sure') }} |
| | | </el-button> |
| | | <el-button @click="adda = false">{{ $t('customer.cancel') }}</el-button> |
| | | <el-button @click="closeDialoga">{{ $t('customer.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-button type="primary" @click="getTableRowac"> |
| | | {{ $t('customer.sure') }} |
| | | </el-button> |
| | | <el-button @click="addc = false">{{ $t('customer.cancel') }}</el-button> |
| | | <el-button @click="closeDialogc">{{ $t('customer.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(''); // 当前选中的角色 |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const name = ref(''); |
| | | const tableData = ref([]) |
| | |
| | | console.error('Error fetching options:', error); |
| | | } |
| | | }; |
| | | // 添加 |
| | | // 添加 |
| | | const getTableRow = async () => { |
| | | try { |
| | | let menuList = []; |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, |
| | | children: [ |
| | | { |
| | | id: parentId, |
| | | parentId: id, |
| | | } |
| | | ], |
| | | }); |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | // 如果id还未作为父项添加,则添加它 |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | | } |
| | | // 向对应的父项添加子项 |
| | | if (!parentIdMap[id].children.some(child => child.id === parentId)) { |
| | | // 检查是否已存在相同的子项(基于id),避免重复添加 |
| | | parentIdMap[id].children.push({ |
| | | id: parentId, |
| | | parentId: id |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | const dataToSend = { |
| | | name: name.value, |
| | | menuList: menuList |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 处理编辑按钮点击 |
| | | function handleEdit(row) { |
| | | name.value = row.name; |
| | | selectedOptions.value = row.selectedOptions |
| | | // options.value = res.data.tree |
| | | adda.value = true; // 显示对话框 |
| | | window.localStorage.setItem('id', row.id) |
| | | name.value = row.name; |
| | | adda.value = true; |
| | | window.localStorage.setItem('ids', row.id); |
| | | const parentIdMap = {}; |
| | | const menuItemsById = {}; // 快速查找菜单项 |
| | | let topLevelItems = []; // 存储顶级菜单项 |
| | | row.menuList.forEach(item => { |
| | | const parentId = item.parentId === 0 ? null : item.parentId; |
| | | const menuItem = { |
| | | id: item.id, |
| | | parentId: parentId, |
| | | menuName: item.menuName, |
| | | children: [] |
| | | }; |
| | | menuItemsById[item.id] = menuItem; |
| | | // 初始化或更新parentIdMap中的数组 |
| | | if (!parentIdMap[parentId]) { |
| | | parentIdMap[parentId] = []; |
| | | } |
| | | if (parentId === null) { |
| | | // 顶级菜单项直接添加到topLevelItems |
| | | topLevelItems.push(menuItem); |
| | | } else { |
| | | // 非顶级菜单项添加到parentIdMap中 |
| | | parentIdMap[parentId].push(menuItem); |
| | | } |
| | | }); |
| | | for (const parentId in parentIdMap) { |
| | | if (parentId !== 'null') { // 跳过顶级菜单项 |
| | | parentIdMap[parentId].forEach(child => { |
| | | // 查找父项并添加子项 |
| | | if (menuItemsById[parentId]) { |
| | | menuItemsById[parentId].children.push(child); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | if (selectedOptions.value !== topLevelItems) { |
| | | selectedOptions.value = topLevelItems; |
| | | } |
| | | console.log(topLevelItems); |
| | | // selectedOptions.value = topLevelItems; |
| | | const topLevelItemsWithChildren = topLevelItems; // 包含顶级菜单项及其子菜单项的数组 |
| | | let selectedPath = []; |
| | | // 循环遍历 topLevelItemsWithChildren 数组 |
| | | for (let i = 0; i < topLevelItemsWithChildren.length; i++) { |
| | | // 添加顶级菜单项的 id |
| | | selectedPath.push(topLevelItemsWithChildren[i].id); |
| | | // 如果有子菜单项,添加第一个子菜单项的 id |
| | | if (topLevelItemsWithChildren[i].children && topLevelItemsWithChildren[i].children.length > 0) { |
| | | for (let j = 0; j < topLevelItemsWithChildren[i].children.length; j++) { |
| | | // 将每个子菜单项的 id 添加到 selectedPath 中 |
| | | selectedPath.push(topLevelItemsWithChildren[i].children[j].id); |
| | | } |
| | | } |
| | | } |
| | | console.log(selectedPath); |
| | | selectedOptions.value = selectedPath; |
| | | } |
| | | // 编辑 |
| | | const getTableRowa = async () => { |
| | | let id = window.localStorage.getItem('id') |
| | | let ids = window.localStorage.getItem('ids') |
| | | try { |
| | | let menuList = []; |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, |
| | | children: [ |
| | | { |
| | | id: parentId, |
| | | parentId: id, |
| | | } |
| | | ], |
| | | }); |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | // 如果id还未作为父项添加,则添加它 |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | | } |
| | | // 向对应的父项添加子项 |
| | | if (!parentIdMap[id].children.some(child => child.id === parentId)) { |
| | | // 检查是否已存在相同的子项(基于id),避免重复添加 |
| | | parentIdMap[id].children.push({ |
| | | id: parentId, |
| | | parentId: id |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | const dataToSend = { |
| | | id:id, |
| | | id:ids, |
| | | name: name.value, |
| | | menuList: menuList |
| | | }; |
| | | const response = await request.post('/loadGlass/sys/role/updateRole', dataToSend); |
| | | // try { |
| | | // const response = await request.post('/loadGlass/sys/role/updateRole', { |
| | | // id: id, |
| | | // name: name.value, |
| | | // }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | name.value = ''; |
| | | selectedOptions.value = ''; |
| | | fetchOptionsa() |
| | | tableData.value = response.data; |
| | | selectedOptions.value = ''; |
| | | fetchOptionsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | function closeDialog(row) { |
| | | add.value = false; |
| | | name.value = ''; |
| | | selectedOptions.value = ''; |
| | | } |
| | | function closeDialoga(row) { |
| | | adda.value = false; |
| | | name.value = ''; |
| | | selectedOptions.value = ''; |
| | | } |
| | | // 删除 |
| | | const opena = async(row) => { |
| | | try { |
| | |
| | | <el-button type="primary" @click="getTableRow"> |
| | | {{ $t('delivery.sure') }} |
| | | </el-button> |
| | | <el-button @click="add = false"> {{ $t('delivery.cancel') }}</el-button> |
| | | <el-button @click="closeDialog"> {{ $t('delivery.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-button type="primary" @click="getTableRowa"> |
| | | {{ $t('delivery.sure') }} |
| | | </el-button> |
| | | <el-button @click="adda = false">{{ $t('delivery.cancel') }}</el-button> |
| | | <el-button @click="closeDialoga">{{ $t('delivery.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(''); // 当前选中的角色 |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const userName = ref(''); |
| | | const password = ref(''); |
| | |
| | | }; |
| | | // 处理编辑按钮点击 |
| | | function handleEdit(row) { |
| | | userName.value = row.userName; |
| | | userName.value = row.userName; |
| | | if (row.roleList && row.roleList.length > 0) { |
| | | const firstRole = row.roleList[0]; |
| | | selectedProjectNoa.value = firstRole.id; // 设置为ID,而不是name |
| | | } |
| | | adda.value = true; // 显示对话框 |
| | | window.localStorage.setItem('id', row.id) |
| | | |
| | | } |
| | | |
| | | function closeDialog(row) { |
| | | add.value = false; |
| | | userName.value = ''; |
| | | nickName.value = ''; |
| | | password.value = ''; |
| | | selectedProjectNoa.value = ''; |
| | | } |
| | | function closeDialoga(row) { |
| | | adda.value = false; |
| | | userName.value = ''; |
| | | nickName.value = ''; |
| | | password.value = ''; |
| | | } |
| | | // 添加 |
| | | const getTableRow = async () => { |
| | | try { |
| | |
| | | tableData.value = response.data; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | |
| | | <el-button type="primary" @click="getTableRow"> |
| | | {{ $t('productStock.sure') }} |
| | | </el-button> |
| | | <el-button @click="add = false">{{ $t('productStock.cancel') }}</el-button> |
| | | <el-button @click="closeDialog">{{ $t('productStock.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-button type="primary" @click="getTableRowa"> |
| | | {{ $t('productStock.sure') }} |
| | | </el-button> |
| | | <el-button @click="adda = false">{{ $t('productStock.cancel') }}</el-button> |
| | | <el-button @click="closeDialoga">{{ $t('productStock.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
New file |
| | |
| | | <template> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="600px"> |
| | | <div id="top" style="height: 150px;background-color: #911005;"> |
| | | <v-chart ref="mychart1" class="chart" :option="optionPie "></v-chart> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="centerleft" style="margin-top: 10px;height: 240px;width: 340px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="orderId" align="center" :label="$t('large.number')" min-width="110" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="100" /> |
| | | <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="100" /> |
| | | <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" /> |
| | | <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="100" /> |
| | | <el-table-column fixed="right" :label="$t('large.operate')" align="center" width="100"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handleBinda">{{ $t('large.mes') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div id="center" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;"> |
| | | <img src="../../assets/d1.png" alt="" style="margin-left: -30px; width: 110%;height: 100%;position: relative;"> |
| | | </div> |
| | | <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="projectNo" align="center" :label="$t('large.projectnumber')" min-width="50" /> |
| | | <el-table-column prop="projectName" align="center" :label="$t('large.projectname')" min-width="50" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div id="bottom" style="margin-top: 10px;height: 190px;background-color: #911005;"> |
| | | <el-table height="190" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="orderId" align="center" :label="$t('large.orderId')" min-width="50" /> |
| | | <el-table-column prop="customerName" align="center" :label="$t('large.customerName')" min-width="90" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.project')" min-width="50" /> |
| | | <el-table-column prop="area" align="center" :label="$t('large.are')" min-width="50" /> |
| | | <el-table-column prop="quantity" align="center" :label="$t('large.quantity')" min-width="50" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('large.warehousing')" |
| | | min-width="50" |
| | | prop="warehousing" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.warehousing)"> |
| | | {{ getStatusText(scope.row.warehousing) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deliveryDate" align="center" :label="$t('large.deliveryDate')" min-width="50" /> |
| | | </el-table> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | <el-dialog v-model="blinda" top="10vh" width="80%" :title="$t('large.brokeno')"> |
| | | <el-table height="500" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="reportingWorkTime" align="center" :label="$t('large.time')" min-width="110" /> |
| | | <el-table-column prop="orderId" align="center" :label="$t('large.number')" min-width="110" /> |
| | | <el-table-column prop="reportingWorkId" align="center" :label="$t('large.jobnumber')" min-width="120" /> |
| | | <el-table-column prop="productionId" align="center" :label="$t('large.productionnumber')" min-width="130" /> |
| | | <el-table-column prop="processId" align="center" :label="$t('large.cardnumber')" min-width="140" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="110" /> |
| | | <el-table-column prop="batch" align="center" :label="$t('large.batch')" min-width="110" /> |
| | | <el-table-column prop="reviewer" align="center" :label="$t('large.detailID')" min-width="110" /> |
| | | <el-table-column prop="orderSort" align="center" :label="$t('large.serialnumber')" min-width="110" /> |
| | | <el-table-column prop="productName" align="center" :label="$t('large.productname')" min-width="180" /> |
| | | <el-table-column prop="technologyNumber" align="center" :label="$t('large.serial')" min-width="110" /> |
| | | <el-table-column prop="glassAddress" align="center" :label="$t('large.slicemarker')" min-width="130" /> |
| | | <el-table-column prop="patchNum" align="center" :label="$t('large.numberpatches')" min-width="110" /> |
| | | <el-table-column prop="width" align="center" :label="$t('large.width')" min-width="110" /> |
| | | <el-table-column prop="height" align="center" :label="$t('large.height')" min-width="110" /> |
| | | <el-table-column prop="shape" align="center" :label="$t('large.shape')" min-width="110" /> |
| | | <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="110" /> |
| | | <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="110" /> |
| | | <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" /> |
| | | <el-table-column prop="patchReason" align="center" :label="$t('large.breakreason')" min-width="110" /> |
| | | <el-table-column prop="patchType" align="center" :label="$t('large.breaktype')" min-width="110" /> |
| | | <el-table-column prop="responsiblePersonnel" align="center" :label="$t('large.responsiblepersonnel')" min-width="110" /> |
| | | <el-table-column prop="responsibleEquipment" align="center" :label="$t('large.responsiblequipment')" min-width="110" /> |
| | | <el-table-column prop="responsibleTeam" align="center" :label="$t('large.responsibleteam')" min-width="110" /> |
| | | <el-table-column prop="patchArea" align="center" :label="$t('large.area')" min-width="110" /> |
| | | <el-table-column prop="qualityInspector" align="center" :label="$t('large.inspector')" min-width="110" /> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button @click="blinda = false">{{ $t('large.close') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { Delete, Upload } from '@element-plus/icons-vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { ref, onMounted , onBeforeUnmount, reactive, computed, watch, shallowRef } from "vue"; |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | // import * as echarts from 'echarts'; |
| | | // import 'echarts/lib/chart/pie'; |
| | | // import 'echarts/dist/echarts.min.css'; |
| | | const tableData = ref([]) |
| | | const tableDatab = ref([]) |
| | | const tableDatac = ref([]) |
| | | const blinda = ref(false) |
| | | const handleBinda = (row) => { |
| | | blinda.value = true; |
| | | }; |
| | | function getStatusType(warehousing) { |
| | | switch (warehousing) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'warning'; |
| | | case 2: |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusText(warehousing) { |
| | | switch (warehousing) { |
| | | case 0: |
| | | return t('large.notstocked'); |
| | | case 1: |
| | | return t('large.inboundstatus'); |
| | | case 2: |
| | | return t('large.allstatus'); |
| | | } |
| | | } |
| | | // function getStatusType(warehousing: number) { |
| | | // switch (warehousing) { |
| | | // case 0: |
| | | // return 'success'; |
| | | // case 1: |
| | | // return 'primary'; |
| | | // case 2: |
| | | // return 'danger'; |
| | | // } |
| | | // } |
| | | // function getStatusText(warehousing: number) { |
| | | // switch (warehousing) { |
| | | // case 0: |
| | | // return t('large.notstocked'); |
| | | // case 1: |
| | | // return t('large.inboundstatus'); |
| | | // case 2: |
| | | // return t('large.allstatus'); |
| | | // } |
| | | // } |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.awaitingRepairs[0] |
| | | tableDatab.value = data.DoingTask[0] |
| | | tableDatac.value = data.orders[0] |
| | | }; |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | /* background-color: lightblue; 设置矩形的背景色 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | </style> |
| | |
| | | * A09出片目标位置 d02卧转立 钢化出片 3001 |
| | | * A10出片目标位置 d05卧转立 人工出片 3002 |
| | | */ |
| | | //todo:临时将钢化出片线路改为人工出片 |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002; |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002; |
| | | |
| | | /** |
| | |
| | | * 2 卧转立进片完成 |
| | | * 3 大车进片完成 |
| | | * 4 大理片笼进片完成 |
| | | * 5 大理片笼进片失败 |
| | | * 6 大理片笼进片破损 |
| | | */ |
| | | public static final Integer BIG_STORAGE_IN_NEW = 1; |
| | | public static final Integer BIG_STORAGE_IN_UP = 2; |
| | | public static final Integer BIG_STORAGE_IN_CAR = 3; |
| | | public static final Integer BIG_STORAGE_IN_SLOT = 4; |
| | | public static final Integer BIG_STORAGE_IN_ERROR = 5; |
| | | public static final Integer BIG_STORAGE_IN_DAMAGE = 6; |
| | | public static final List<Integer> BIG_STORAGE_IN_UP_ALL = Arrays.asList(1, 2); |
| | | /** |
| | | * 卧转立出片请求 |
| | | * 1 任务生成 |
| | | * 2 玻璃进大车完成 |
| | | * 3 大车出片完成 |
| | | * 4 大理片笼进片失败 |
| | | * 5 大理片笼进片破损 |
| | | */ |
| | | public static final Integer BIG_STORAGE_OUT_NEW = 1; |
| | | public static final Integer BIG_STORAGE_OUT_CAR = 2; |
| | | public static final Integer BIG_STORAGE_OUT_SUCCESS = 3; |
| | | public static final Integer BIG_STORAGE_OUT_ERROR = 4; |
| | | public static final Integer BIG_STORAGE_OUT_DAMAGE = 5; |
| | | |
| | | /** |
| | | * 卧转立出片请求 |
| | |
| | | /** |
| | | * 工序 |
| | | */ |
| | | private Integer workingProcedure; |
| | | private String workingProcedure; |
| | | |
| | | /** |
| | | * 玻璃id |
| | |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.mes.work_assignment.mapper.WorkAssignmentMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | LambdaQueryWrapper<GlassInfo> glassInfoSelectWrapper=new LambdaQueryWrapper<>(); |
| | | glassInfoSelectWrapper.eq(GlassInfo::getGlassId,damage.getGlassId()); |
| | | GlassInfo glassInfo=glassInfoMapper.selectOne(glassInfoSelectWrapper); |
| | | BeanUtils.copyProperties(glassInfo, damage); |
| | | |
| | | LambdaQueryWrapper<WorkAssignment> workAssignmentSelectWrapper=new LambdaQueryWrapper<>(); |
| | | workAssignmentSelectWrapper |
| | | .eq(WorkAssignment::getLine,damage.getLine()) |
| | | .eq(WorkAssignment::getWorkProcesses,damage.getWorkingProcedure()); |
| | | WorkAssignment workAssignment=workAssignmentMapper.selectOne(workAssignmentSelectWrapper); |
| | | |
| | | damage.setTeamsGroupsName(workAssignment.getTeamsGroupsName()); |
| | | damage.setDeviceName(workAssignment.getDeviceName()); |
| | | |
| | | damage.setEngineerId(glassInfo.getEngineerId()); |
| | | damage.setTemperingLayoutId(glassInfo.getTemperingLayoutId()); |
| | | damage.setProcessId(glassInfo.getFlowCardId()); |
| | | damage.setOrderNumber(glassInfo.getGlassType()); |
| | | damage.setTechnologyNumber(glassInfo.getLayer()); |
| | | damage.setDamageTime(LocalDateTime.now()); |
| | | damage.setType(2); |
| | | baseMapper.insert(damage); |
| | | } |
| | | } |
| | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * 保存小片表 |
| | | */ |
| | | void saveGlassInfo(List<GlassInfo> glassinfo); |
| | | |
| | | int getGlassInfoCountByFlowCardId(String flowCardId,int layer); |
| | | |
| | | /** |
| | | * @return |
| | | * 查询所有工程状态不为300不同流程卡号 |
| | | */ |
| | | List<Map<String, Object>> getFlowCardId(); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | /* |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId) { |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId,int layer) { |
| | | return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda() |
| | | .eq(GlassInfo::getFlowCardId, flowCardId)); |
| | | .eq(GlassInfo::getFlowCardId, flowCardId) |
| | | .eq(GlassInfo::getLayer, layer)); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | new QueryWrapper<GlassInfo>() |
| | | .in("engineer_id", engineerIds) |
| | | .groupBy("flow_card_id") |
| | | .groupBy("layer") |
| | | ); |
| | | |
| | | // 转换为 List<Map<String, Object>> |
| | | List<Map<String, Object>> result = glassInfos.stream() |
| | | .map(glassInfo -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()+" | "+glassInfo.getLayer()); |
| | | // 如果还有其他字段需要添加到 map 中,在这里继续添加 |
| | | return map; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | log.info("result: {}", result); |
| | | log.info("result666: {}", result); |
| | | return result; |
| | | }*/ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @DS("salve_hangzhoumes_1") |
| | | @DS("salve_hangzhoumes") |
| | | public interface TemperingGlassInfoMapper extends MPJBaseMapper<TemperingGlassInfo> { |
| | | |
| | | boolean saveBatch(@Param(value = "list") List<TemperingGlassInfo> list); |
| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | @DS("salve_hangzhoumes") |
| | | public class TemperingAgoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingAgoService { |
| | | @Autowired |
| | | TemperingGlassInfoMapper temperingMapper; |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | private Integer status; |
| | | |
| | | private Integer line; |
| | | |
| | | |
| | | private Date time; |
| | | |
| | | } |
| | |
| | | @Value("${mes.sequence.order}") |
| | | private boolean sequenceOrder; |
| | | |
| | | @Value("${mes.firstLength}") |
| | | @Value("${mes.max.firstLength}") |
| | | private String firstLength; |
| | | |
| | | @Value("${mes.secondLength}") |
| | | @Value("${mes.max.secondLength}") |
| | | private String secondLength; |
| | | |
| | | @Value("${mes.min.firstLength}") |
| | | private String minFirstLength; |
| | | |
| | | @Value("${mes.min.secondLength}") |
| | | private String minSecondLength; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void plcHomeEdgTask() { |
| | | Date startDate = new Date(); |
| | | log.info("本次任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String taskRequestTypeValue = plcParameterObject.getPlcParameter("A06_request_word").getValue(); |
| | | String glassIdeValue = plcParameterObject.getPlcParameter("A05_scanning_ID").getValue(); |
| | |
| | | inTo(glassIdeValue, confirmationWrodAddress, currentSlot); |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("本次任务结束时间:{},共耗时:{}ms", endDate, endDate.getTime() - startDate.getTime()); |
| | | } |
| | | |
| | | public void plcToHomeEdgTask() { |
| | |
| | | // 1.2.3、按照出片信息去详情表查询格子在笼子里面剩余相同尺寸的玻璃数据且以版图id、版序升序排序 取第一块玻璃出片 |
| | | // 2、如果没有历史出片任务 |
| | | // 2.1、出当前版图id最小版序最小的玻璃(问题:两条线都没有历史任务,出片时两条线的玻璃尺寸相同,是否找尺寸不同的) |
| | | if (out08Glassstate == 2 && out10Glassstate == 2) { |
| | | if ((out08Glassstate == 2 && out10Glassstate == 2) || (out08Glassstate == 0 && out10Glassstate == 0)) { |
| | | log.info("A09、A10为{},{}非自动状态,无法出片"); |
| | | return Boolean.FALSE; |
| | | } |
| | |
| | | EdgStorageCageDetails a10EdgGlass = queryGlassByTaskCache(Const.A10_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT_ALL); |
| | | endcell = queryLineByGlassInfo(a09EdgGlass, a10EdgGlass, glassInfo, out08Glassstate, out10Glassstate); |
| | | } else { |
| | | //判断两条线是否都空闲 |
| | | endcell = out10Glassstate == 2 ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | //按照状态判断两条线走那条线 |
| | | endcell = computerLineByState(out08Glassstate, out10Glassstate); |
| | | |
| | | if ((out08Glassstate == 0 && out10Glassstate == 0) || (out08Glassstate == 1 && out10Glassstate == 1)) { |
| | | if (out08Glassstate == 1 && out10Glassstate == 1) { |
| | | EdgStorageCageDetails a09EdgGlass = queryGlassByTaskCache(Const.A09_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT_ALL); |
| | | EdgStorageCageDetails a10EdgGlass = queryGlassByTaskCache(Const.A10_OUT_TARGET_POSITION, Const.GLASS_CACHE_TYPE_OUT_ALL); |
| | | if (a09EdgGlass == null && a10EdgGlass == null) { |
| | |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " + |
| | | "on t.glass_id = t1.glass_id and (t1.first_length <=" + firstLength + " and t1.second_length<=" + secondLength + ") "); |
| | | } else { |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " + |
| | | "on t.glass_id = t1.glass_id and (t1.first_length >=" + minFirstLength + " and t1.second_length>=" + minSecondLength + ") "); |
| | | } |
| | | wrapper.last("order by count(t.glass_id) desc limit 2"); |
| | | List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(wrapper); |
| | |
| | | .selectAll(GlassInfo.class).eq("t.glass_id", glassId); |
| | | // .inSql("t.engineer_id", "select engineer_id from engineering where state = 1"); |
| | | if (endcell == Const.A10_OUT_TARGET_POSITION) { |
| | | queryWrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from glass_info) t1 " + |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " + |
| | | "on t.glass_id = t1.glass_id and (t1.first_length <=" + firstLength + " and t1.second_length<=" + secondLength + ") "); |
| | | } else { |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " + |
| | | "on t.glass_id = t1.glass_id and (t1.first_length >=" + minFirstLength + " and t1.second_length>=" + minSecondLength + ") "); |
| | | } |
| | | GlassInfo one = glassInfoService.getOne(queryWrapper); |
| | | if (one != null) { |
| | |
| | | */ |
| | | private Integer queryLineByGlassInfo(EdgStorageCageDetails a08EdgStorageCageDetails, EdgStorageCageDetails a10EdgStorageCageDetails, |
| | | EdgStorageCageDetails glassInfo, int out08Glassstate, int out10Glassstate) { |
| | | boolean b08 = a08EdgStorageCageDetails != null && a08EdgStorageCageDetails.getHeight() == glassInfo.getHeight() |
| | | && a08EdgStorageCageDetails.getWidth() == glassInfo.getWidth(); |
| | | boolean b10 = a10EdgStorageCageDetails != null && a10EdgStorageCageDetails.getHeight() == glassInfo.getHeight() |
| | | && a10EdgStorageCageDetails.getWidth() == glassInfo.getWidth(); |
| | | //存在出片任务 07为空 |
| | | if (b10) { |
| | | return out10Glassstate == 2 ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | if (out08Glassstate == 1 && out10Glassstate == 1) { |
| | | boolean b08 = a08EdgStorageCageDetails != null && a08EdgStorageCageDetails.getHeight() == glassInfo.getHeight() |
| | | && a08EdgStorageCageDetails.getWidth() == glassInfo.getWidth(); |
| | | boolean b10 = a10EdgStorageCageDetails != null && a10EdgStorageCageDetails.getHeight() == glassInfo.getHeight() |
| | | && a10EdgStorageCageDetails.getWidth() == glassInfo.getWidth(); |
| | | if (b08) { |
| | | return Const.A09_OUT_TARGET_POSITION; |
| | | } |
| | | if (b10) { |
| | | return Const.A10_OUT_TARGET_POSITION; |
| | | } |
| | | } |
| | | if (b08) { |
| | | return out08Glassstate == 2 ? Const.A10_OUT_TARGET_POSITION : Const.A09_OUT_TARGET_POSITION; |
| | | } |
| | | return out10Glassstate == 2 ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | | return computerLineByState(out08Glassstate, out10Glassstate); |
| | | } |
| | | |
| | | /** |
| | |
| | | wrapper.select("count(t.glass_id) as count, t.width, t.height") |
| | | .eq("t.state", Const.GLASS_STATE_IN) |
| | | .groupBy("t.width, t.height"); |
| | | if (endcell == Const.A09_OUT_TARGET_POSITION) { |
| | | if (endcell == Const.A10_OUT_TARGET_POSITION) { |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " + |
| | | "on t.glass_id = t1.glass_id and (t1.first_length <=" + firstLength + " and t1.second_length<=" + secondLength + ") "); |
| | | } else { |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | | "case when width < height then width else height end as second_length from edg_storage_cage_details) t1 " + |
| | | "on t.glass_id = t1.glass_id and (t1.first_length >=" + minFirstLength + " and t1.second_length>=" + minSecondLength + ") "); |
| | | } |
| | | wrapper.last("order by count(t.glass_id) desc limit 2"); |
| | | List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(wrapper); |
| | |
| | | boolean taskCacheStatus = saveTaskCache(glassInfo.getGlassId(), glassInfo.getSlot(), endcell, Const.GLASS_CACHE_TYPE_OUT); |
| | | log.info("6、添加出片任务是否完成:{}", taskCacheStatus); |
| | | } |
| | | boolean glassSizeStatus = saveGlassSize(glassInfo); |
| | | boolean glassSizeStatus = saveGlassSize(glassInfo, endcell); |
| | | log.info("7、添加出片玻璃尺寸信息到磨边前玻璃表是否完成:{}", glassSizeStatus); |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1); |
| | | log.info("8、发送确认字已完成"); |
| | |
| | | * 添加理片笼任务 |
| | | * |
| | | * @param glassInfo |
| | | * @param endcell |
| | | * @return |
| | | */ |
| | | private boolean saveGlassSize(EdgStorageCageDetails glassInfo) { |
| | | private boolean saveGlassSize(EdgStorageCageDetails glassInfo, int endcell) { |
| | | EdgGlassTaskInfo edgGlassTaskInfo = new EdgGlassTaskInfo(); |
| | | BeanUtils.copyProperties(glassInfo, edgGlassTaskInfo); |
| | | edgGlassTaskInfo.setHeight((int) (glassInfo.getHeight() * ratio)); |
| | | edgGlassTaskInfo.setWidth((int) (glassInfo.getWidth() * ratio)); |
| | | edgGlassTaskInfo.setThickness((int) (glassInfo.getThickness() * ratio)); |
| | | edgGlassTaskInfo.setStatus(Const.EDG_GLASS_BEFORE); |
| | | edgGlassTaskInfo.setLine(endcell); |
| | | edgGlassTaskInfo.setTime(new Date()); |
| | | return edgGlassTaskInfoService.save(edgGlassTaskInfo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 计算出片线路 |
| | | * 已排除都为2 都为0 的情况 |
| | | * |
| | | * @param out08Glassstate |
| | | * @param out10Glassstate |
| | | * @return |
| | | */ |
| | | private int computerLineByState(int out08Glassstate, int out10Glassstate) { |
| | | if (out08Glassstate == 0) { |
| | | if (out10Glassstate == 2) { |
| | | return Const.A09_OUT_TARGET_POSITION; |
| | | } else { |
| | | return Const.A10_OUT_TARGET_POSITION; |
| | | } |
| | | } else if (out08Glassstate == 1) { |
| | | return Const.A09_OUT_TARGET_POSITION; |
| | | } else { |
| | | return Const.A10_OUT_TARGET_POSITION; |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void CacheGlassTasks() { |
| | |
| | | List<Map<String, Object>> currentCutTerritorys = edgStorageCageDetailsService.selectCutTerritory(); |
| | | jsonObject.append("currentCutTerritory", currentCutTerritorys); |
| | | //磨边信息 |
| | | List<Map<String, Object>> EdgTasks1 = taskCacheService.selectEdgInfo(Const.A09_OUT_TARGET_POSITION.toString()); |
| | | List<Map<String, Object>> EdgTasks2 = taskCacheService.selectEdgInfo(Const.A10_OUT_TARGET_POSITION.toString()); |
| | | List<Map<String, Object>> EdgTasks1 = taskCacheService.selectEdgInfo("2001"); |
| | | List<Map<String, Object>> EdgTasks2 = taskCacheService.selectEdgInfo("2002"); |
| | | jsonObject.append("EdgTasks1", EdgTasks1); |
| | | jsonObject.append("EdgTasks2", EdgTasks2); |
| | | |
| | |
| | | List<Map<String, Object>> EdgStorageCageinfos = edgStorageCageService.selectEdgStorageCages(); |
| | | jsonObject.append("EdgStorageCageinfos", EdgStorageCageinfos); |
| | | |
| | | log.info("推送数据:{}",jsonObject); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("cacheGlass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | mes: |
| | | threshold: 3 |
| | | ratio: 10 |
| | | firstLength: 3500 |
| | | secondLength: 2500 |
| | | max: |
| | | firstLength: 3500 |
| | | secondLength: 2500 |
| | | min: |
| | | firstLength: 600 |
| | | secondLength: 350 |
| | | sequence: |
| | | order: false |
| | | |
| | |
| | | @PostMapping("/insertBigStorageCageDetails") |
| | | public Result insertBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.insertBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"添加成功",bigStorageCageService.querybigStorageCageDetail(0)); |
| | | return Result.build(200,"添加成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/deleteBigStorageCageDetails") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.deleteBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail(0)); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼任务破损0/拿走1") |
| | |
| | | |
| | | boolean outGlass(); |
| | | |
| | | List<BigStorageCage> querybigStorageCageDetail(int deviceId); |
| | | List<BigStorageCage> querybigStorageCageDetailAll(); |
| | | |
| | | Map<Integer, List<BigStorageCage>> querybigStorageCageDetail(); |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Value("${mes.slotWidth}") |
| | | private Integer slotWidth; |
| | | |
| | | @Value("${mes.galssGap}") |
| | | private Integer galssGap; |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | /** |
| | | * 查询进/出片任务 |
| | | */ |
| | | @Override |
| | | public List<BigStorageCageDetails> selectTask(int taskType) { |
| | | return null; |
| | | // if (taskType == 1) { |
| | | // //进片任务数据 |
| | | // LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>(); |
| | | // feedWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_IN); |
| | | // List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | // |
| | | // LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | // feedTaskWrapper.lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT); |
| | | // List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | // |
| | | // Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | | // .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task)); |
| | | // |
| | | // for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | // BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | // bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | // } |
| | | // return bigStorageCageDetailsList; |
| | | // } else { |
| | | // //出片任务数据 |
| | | // LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>(); |
| | | // outWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_OUT); |
| | | // List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper); |
| | | // |
| | | // LambdaQueryWrapper<BigStorageCageOutTask> outTaskWrapper = new LambdaQueryWrapper<>(); |
| | | // outTaskWrapper.lt(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_SUCCESS); |
| | | // List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(outTaskWrapper); |
| | | // |
| | | // Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream() |
| | | // .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task)); |
| | | // for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | // BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | // bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | // } |
| | | // return bigStorageCageDetailsList; |
| | | // } |
| | | if (taskType == 1) { |
| | | //进片任务数据 |
| | | LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>(); |
| | | feedWrapper.eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | feedTaskWrapper |
| | | .lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT) |
| | | .isNotNull(BigStorageCageFeedTask::getTargetSlot); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | | .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task)); |
| | | Iterator<BigStorageCageDetails> iterator = bigStorageCageDetailsList.iterator(); |
| | | while (iterator.hasNext()) { |
| | | BigStorageCageDetails bigStorageCageDetails = iterator.next(); |
| | | BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | if (bigStorageCageDetails.getBigStorageCageFeedTask() == null) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskNoTargetWrapper = new LambdaQueryWrapper<>(); |
| | | feedTaskNoTargetWrapper |
| | | .lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT) |
| | | .isNull(BigStorageCageFeedTask::getTargetSlot); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskNoTargetList = bigStorageCageFeedTaskMapper.selectList(feedTaskNoTargetWrapper); |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask:bigStorageCageFeedTaskNoTargetList |
| | | ) { |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | LambdaQueryWrapper<GlassInfo> glassInfoWrapper = new LambdaQueryWrapper<>(); |
| | | glassInfoWrapper.eq(GlassInfo::getGlassId,bigStorageCageFeedTask.getGlassId()); |
| | | GlassInfo glassInfo= glassInfoMapper.selectOne(glassInfoWrapper); |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } else { |
| | | //出片任务数据 |
| | | LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>(); |
| | | outWrapper.eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageOutTask> outTaskWrapper = new LambdaQueryWrapper<>(); |
| | | outTaskWrapper.lt(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_SUCCESS); |
| | | List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(outTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream() |
| | | .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task)); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | } |
| | | Iterator<BigStorageCageDetails> iterator = bigStorageCageDetailsList.iterator(); |
| | | while (iterator.hasNext()) { |
| | | BigStorageCageDetails bigStorageCageDetails = iterator.next(); |
| | | BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | if (bigStorageCageDetails.getBigStorageCageOutTask() == null) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | | ) { |
| | | if (bigStorageCageDetails.getBigStorageCageFeedTask().getTaskState() == 0) { |
| | | carWidth = carWidth - bigStorageCageDetails.getWidth() - galssGap; |
| | | carWidth = carWidth - bigStorageCageDetails.getWidth() - glassGap; |
| | | } |
| | | } |
| | | return carWidth; |
| | |
| | | if (glassInfo != null) { |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setState(1); |
| | | bigStorageCageDetails.setGap(galssGap); |
| | | bigStorageCageDetails.setGap(glassGap); |
| | | } |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>(); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | |
| | | |
| | | //查询大理片信息,前端展示用 |
| | | @Override |
| | | public List<BigStorageCage> querybigStorageCageDetail(int deviceId) { |
| | | LambdaQueryWrapper<BigStorageCage> bigStorageCageWrapper = new LambdaQueryWrapper<>(); |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .or() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL); |
| | | if (deviceId != 0) { |
| | | bigStorageCageWrapper.eq(BigStorageCage::getDeviceId, deviceId); |
| | | bigStorageCageDetailsWrapper.eq(BigStorageCageDetails::getDeviceId, deviceId); |
| | | } |
| | | |
| | | List<BigStorageCage> bigStorageCages = bigStorageCageMapper.selectList(bigStorageCageWrapper); |
| | | log.info("1、获取大理片笼信息完成,获取到的数据{}", bigStorageCages.size()); |
| | | |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(bigStorageCageDetailsWrapper); |
| | | |
| | | Map<Integer, List<BigStorageCageDetails>> listMap = bigStorageCageDetailsList.stream().collect(Collectors.groupingBy(BigStorageCageDetails::getSlot)); |
| | | for (BigStorageCage bigStorageCage : bigStorageCages) { |
| | | List<BigStorageCageDetails> bigStorageCageDetails = listMap.get(bigStorageCage.getSlot()); |
| | | bigStorageCage.setBigStorageCageDetails(bigStorageCageDetails); |
| | | } |
| | | return bigStorageCages; |
| | | public List<BigStorageCage> querybigStorageCageDetailAll() { |
| | | MPJLambdaWrapper<BigStorageCage> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(BigStorageCage.class).selectCollection(BigStorageCageDetails.class, BigStorageCage::getBigStorageCageDetails) |
| | | .leftJoin(BigStorageCageDetails.class, on -> on.eq(BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL)); |
| | | return bigStorageCageMapper.selectJoinList(BigStorageCage.class, wrapper); |
| | | } |
| | | |
| | | //查询大理片信息,前端展示用 |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("salve_hangzhoumes_1") |
| | | @DS("salve_hangzhoumes") |
| | | public interface BigStorageCageFeedTaskMapper extends MPJBaseMapper<BigStorageCageFeedTask> { |
| | | |
| | | List<Integer> querySitToUpGlass(); |
| | | |
| | | BigStorageDTO querySitToUpRemainWidth(@Param(value = "line") Integer line); |
| | | BigStorageDTO querySitToUpRemainWidth(@Param(value = "line") Integer line, @Param(value = "glassGap") Integer glassGap); |
| | | } |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("salve_hangzhoumes_1") |
| | | @DS("salve_hangzhoumes") |
| | | public interface BigStorageCageOutTaskMapper extends BaseMapper<BigStorageCageOutTask> { |
| | | |
| | | boolean saveBatch(@Param(value = "list") List<BigStorageCageOutTask> list); |
| | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | @Service |
| | | public class BigStorageCageFeedTaskServiceImpl extends ServiceImpl<BigStorageCageFeedTaskMapper, BigStorageCageFeedTask> implements BigStorageCageFeedTaskService { |
| | | |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | @Override |
| | | public void addFeedTask(BigStorageCageDetails slotInfo, Integer plcFeedReqLine, int taskType){ |
| | | BigStorageCageFeedTask bigStorageCageFeedTask=new BigStorageCageFeedTask(); |
| | | public void addFeedTask(BigStorageCageDetails slotInfo, Integer plcFeedReqLine, int taskType) { |
| | | BigStorageCageFeedTask bigStorageCageFeedTask = new BigStorageCageFeedTask(); |
| | | bigStorageCageFeedTask.setId(slotInfo.getId()); |
| | | bigStorageCageFeedTask.setTaskState(0); |
| | | bigStorageCageFeedTask.setLine(plcFeedReqLine); |
| | |
| | | |
| | | @Override |
| | | public BigStorageDTO querySitToUpRemainWidth(Integer line) { |
| | | return baseMapper.querySitToUpRemainWidth(line); |
| | | return baseMapper.querySitToUpRemainWidth(line, glassGap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.tools.InitUtil; |
| | | import com.mes.tools.S7control; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | |
| | | * @Date: 2024/4/9 15:13 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | public class S7object extends Thread { |
| | | public S7control plccontrol; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1200; // 西门子PLC类型 |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼读取plc数据开始时间:{}", startDate); |
| | | byte[] getplcvlues = plccontrol.readByte(PlcMesObject.getPlcAddressBegin(), PlcMesObject.getPlcAddressLength()); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼读取plc数据结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | if (getplcvlues != null) { |
| | | PlcMesObject.setPlcParameterList(getplcvlues); |
| | | } |
| | |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | private JSONObject jsonObject = new JSONObject(); |
| | | public void dataBase1() throws InterruptedException { |
| | | List<Double> carPostion=new ArrayList<>(); |
| | | carPostion.add(0.25); |
| | | carPostion.add(0.5); |
| | | jsonObject.append("carPostion",carPostion); |
| | | //界面展示笼子信息 |
| | | jsonObject.append("bigStorageCageInfos", bigStorageCageService.querybigStorageCageDetail()); |
| | | |
| | | //进片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsFeedTask=bigStorageCageDetailsService.selectTask(1); |
| | | jsonObject.append("bigStorageCageDetailsFeedTask", bigStorageCageDetailsFeedTask); |
| | | |
| | | //出片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsOutTask=bigStorageCageDetailsService.selectTask(2); |
| | | jsonObject.append("bigStorageCageDetailsOutTask", bigStorageCageDetailsOutTask); |
| | | |
| | | //理片笼使用情况 |
| | | List<Map<String, Object>> bigStorageCageUsage=bigStorageCageService.selectBigStorageCageUsage(); |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | |
| | | //理片笼表格信息 |
| | | jsonObject.append("bigStorageCageInfo", bigStorageCageService.querybigStorageCageDetailAll()); |
| | | |
| | | } |
| | | |
| | | public void dataBase2() throws InterruptedException { |
| | | //出片队列 |
| | | List<TemperingGlassInfo> temperingGlassInfoList= temperingGlassInfoService.list(); |
| | | jsonObject.append("temperingGlassInfoList", temperingGlassInfoList); |
| | | |
| | | } |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void plcStorageCageTask() throws InterruptedException { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject = new JSONObject(); |
| | | try { |
| | | //界面展示笼子信息 |
| | | jsonObject.append("bigStorageCageInfo1", bigStorageCageService.querybigStorageCageDetail(1)); |
| | | jsonObject.append("bigStorageCageInfo2", bigStorageCageService.querybigStorageCageDetail(2)); |
| | | jsonObject.append("bigStorageCageInfo3", bigStorageCageService.querybigStorageCageDetail(3)); |
| | | jsonObject.append("bigStorageCageInfo4", bigStorageCageService.querybigStorageCageDetail(4)); |
| | | jsonObject.append("bigStorageCageInfo5", bigStorageCageService.querybigStorageCageDetail(5)); |
| | | jsonObject.append("bigStorageCageInfo6", bigStorageCageService.querybigStorageCageDetail(6)); |
| | | jsonObject.append("bigStorageCageInfo7", bigStorageCageService.querybigStorageCageDetail(7)); |
| | | jsonObject.append("bigStorageCageInfo8", bigStorageCageService.querybigStorageCageDetail(8)); |
| | | |
| | | //进片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsFeedTask=bigStorageCageDetailsService.selectTask(1); |
| | | jsonObject.append("bigStorageCageDetailsFeedTask", bigStorageCageDetailsFeedTask); |
| | | |
| | | //出片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsOutTask=bigStorageCageDetailsService.selectTask(2); |
| | | jsonObject.append("bigStorageCageDetailsOutTask", bigStorageCageDetailsOutTask); |
| | | |
| | | //理片笼使用情况 |
| | | List<Map<String, Object>> bigStorageCageUsage=bigStorageCageService.selectBigStorageCageUsage(); |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | |
| | | //出片队列 |
| | | List<TemperingGlassInfo> temperingGlassInfoList= temperingGlassInfoService.list(); |
| | | jsonObject.append("temperingGlassInfoList", temperingGlassInfoList); |
| | | |
| | | //理片笼表格信息 |
| | | jsonObject.append("bigStorageCageInfo", bigStorageCageService.querybigStorageCageDetail(0)); |
| | | |
| | | |
| | | dataBase1(); |
| | | dataBase2(); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("slicecage"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | |
| | | private EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | @Resource |
| | | private DamageService damageService; |
| | | |
| | | private static final String REQUEST_WORD = "1"; |
| | | |
| | |
| | | @Value("${mes.outCarMaxSize}") |
| | | private Integer outCarMaxSize; |
| | | |
| | | @Value("${mes.galssGap}") |
| | | private Integer galssGap; |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgScan() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼扫码任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String d01Id = plcParameterObject.getPlcParameter("D01ID").getValue(); |
| | | String d04Id = plcParameterObject.getPlcParameter("D04ID").getValue(); |
| | |
| | | String d02State = plcParameterObject.getPlcParameter("D02ID").getValue(); |
| | | String d03State = plcParameterObject.getPlcParameter("D03State").getValue(); |
| | | String d05State = plcParameterObject.getPlcParameter("D05State").getValue(); |
| | | String mesD01Value = plcParameterObject.getPlcParameter("MESToD01").getValue(); |
| | | String mesD04Value = plcParameterObject.getPlcParameter("MESToD04").getValue(); |
| | | String mesD01Address = plcParameterObject.getPlcParameter("MESToD01").getAddress(); |
| | | String mesD04Address = plcParameterObject.getPlcParameter("MESToD04").getAddress(); |
| | | String d01ToMES = plcParameterObject.getPlcParameter("D01ToMES").getValue(); |
| | | if (!REQUEST_WORD.equals(d01ToMES)) { |
| | | log.info("请求字为{},结束本次扫描进卧转立任务", d01ToMES); |
| | | return; |
| | | } |
| | | String d04ToMES = plcParameterObject.getPlcParameter("D04ToMES").getValue(); |
| | | |
| | | log.info("1、获取d01Id扫描ID为:{};获取d04Id扫描ID为:{};", d01Id, d04Id); |
| | | if (StringUtils.isBlank(d01Id) && StringUtils.isBlank(d04Id)) { |
| | | log.info("1、获取d01Id扫描ID为:{},请求字为{};获取d04Id扫描ID为:{},请求字为{};", d01Id, d01ToMES, d04Id, d04ToMES); |
| | | if (StringUtils.isBlank(d01ToMES) && StringUtils.isBlank(d04ToMES)) { |
| | | log.info("两条线未收到进片任务,结束本次扫描进卧转立任务"); |
| | | return; |
| | | } |
| | |
| | | log.info("两条线卧转立均在执行任务,结束本次扫描进卧转立任务"); |
| | | return; |
| | | } |
| | | // Boolean flag01 = Boolean.FALSE; |
| | | // Boolean flag04 = Boolean.FALSE; |
| | | //按照线路及玻璃id获取相邻两块玻璃 卧转立上的玻璃 |
| | | if (StringUtils.isNotBlank(d01Id) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | //按照线路及玻璃id获取相邻两块玻璃 卧转立上的玻璃: 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, (02玻璃id为空或者卧转立未启动) |
| | | if (!REQUEST_WORD.equals(mesD01Value) && REQUEST_WORD.equals(d01ToMES) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | } |
| | | if (StringUtils.isNotBlank(d04Id) && !REQUEST_WORD.equals(d05State)) { |
| | | // 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, 卧转立未启动 |
| | | if (!REQUEST_WORD.equals(mesD04Value) && REQUEST_WORD.equals(d04ToMES) && !REQUEST_WORD.equals(d05State)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | } |
| | | log.info("结束扫码任务"); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼扫码任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgFreeCarTask() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼空车进片任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String e01Status = plcParameterObject.getPlcParameter("E01State").getValue(); |
| | | String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue(); |
| | | String d05ToMES = plcParameterObject.getPlcParameter("D05ToMES").getValue(); |
| | | log.info("执行空车送片任务,获取到的大车状态为{},卧转立状态分别为d03:{},d05:{}", e01Status, d03ToMES, d05ToMES); |
| | | if (REQUEST_WORD.equals(e01Status)) { |
| | | log.info("进片大车非空闲,结束送片任务"); |
| | | Date endDate = new Date(); |
| | | log.info("进片大车非空闲,结束送片任务,任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | if (!REQUEST_WORD.equals(d03ToMES) && !REQUEST_WORD.equals(d05ToMES)) { |
| | | log.info("卧转立没有送片请求,结束送片任务"); |
| | | Date endDate = new Date(); |
| | | log.info("卧转立没有送片请求,结束送片任务,任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> wrapper = new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | |
| | | if (CollectionUtils.isNotEmpty(feedTaskList)) { |
| | | if (feedTaskList.size() == 1) { |
| | | computeTargetByLine(feedTaskList.get(0).getLine()); |
| | | return; |
| | | } else { |
| | | //比较最早一片任务的版图id及版序 求出卧转立的线路 |
| | | Integer startLine = getStartLine(); |
| | | // //计算目标格子,发送启动任务 |
| | | computeTargetByLine(startLine); |
| | | return; |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼空车进片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | String d01Id = plcParameterObject.getPlcParameter("D01ID").getValue(); |
| | | String d04Id = plcParameterObject.getPlcParameter("D04ID").getValue(); |
| | |
| | | //获取两条线卧转立是否有玻璃,且任务状态都为2 |
| | | List<Integer> lineList = bigStorageCageFeedTaskService.querySitToUpGlass(); |
| | | if (CollectionUtils.isEmpty(lineList)) { |
| | | log.info("两条线卧转立为空或者有进片任务未完成,结束任务"); |
| | | Date endDate = new Date(); |
| | | log.info("两条线卧转立为空或者有进片任务未完成,结束任务,大理片笼空车进片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | Integer lineFirst = lineList.get(0); |
| | |
| | | computeTargetByLine(lineFirst); |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼空车进片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | //两条先均可执行进片任务,判断两条线是否进片请求是否都为空 |
| | |
| | | Integer line = getStartLine(); |
| | | //计算任务表进片格子 发送进片任务 |
| | | computeTargetByLine(line); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼空车进片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } else if (StringUtils.isNotBlank(d01Id) && StringUtils.isNotBlank(d04Id)) { |
| | | // todo:两个都有进片玻璃 |
| | |
| | | } else if (computeIsRun(Const.A10_OUT_TARGET_POSITION, d04Id)) { |
| | | computeTargetByLine(Const.A10_OUT_TARGET_POSITION); |
| | | } else { |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼空车进片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | } else { |
| | |
| | | //获取进片请求玻璃为空的,计算任务表进片格子 发送进片任务 |
| | | computeTargetByLine(outLine); |
| | | } |
| | | |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼空车进片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgOutTask() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼空车进片任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | String mesToPLCAddress = plcMesObject.getPlcParameter("MESToPLC").getAddress(); |
| | | List<BigStorageCageOutTask> outingList = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_NEW)); |
| | |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfoList)) { |
| | | log.info("有正在出片的钢化任务"); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE, mesToPLCAddress); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼出片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | //是否有人工下片任务 有直接出 |
| | | List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL).orderByDesc(BigStorageCageDetails::getWidth)); |
| | | if (CollectionUtils.isNotEmpty(artificialList)) { |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.FALSE, mesToPLCAddress); |
| | | computeOutGlassInfo(artificialList, Boolean.FALSE, mesToPLCAddress); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼出片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | //钢化优先:获取理片笼 玻璃小片 破损表 数量 判断笼内版图是否到齐 |
| | |
| | | .eq(GlassInfo::getEngineerId, temperingLayoutDTO.getEngineerId())); |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE, mesToPLCAddress); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼出片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | //未到齐 执行内部调度任务 |
| | |
| | | for (int i = 0; i < slotSequenceList.size() - 1; i++) { |
| | | SlotSequenceDTO first = slotSequenceList.get(i); |
| | | SlotSequenceDTO second = slotSequenceList.get(i + 1); |
| | | int slotWidth = carWidth - first.getRemainWidth() - galssGap; |
| | | int slotWidth = carWidth - first.getRemainWidth() - glassGap; |
| | | if (first.getMinSequence() == second.getMaxSequence() + 1 |
| | | && second.getRemainWidth() > slotWidth) { |
| | | List<BigStorageCageDetails> list = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | |
| | | bigStorageCageOutTaskService.saveBatch(outTasks); |
| | | S7object.getinstance().plccontrol.writeWord(mesToPLCAddress, 1); |
| | | log.info("已向plc发送出片任务确认,地址为:{}", mesToPLCAddress); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼出片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 处理破损表任务 |
| | | */ |
| | | @Scheduled(fixedDelay = 300) |
| | | public void dealDamageTask() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼破损玻璃清除任务开始执行时间:{}", startDate); |
| | | //获取进片任务表中状态为破损的数据 |
| | | List<BigStorageCageFeedTask> inDamageTaskInfoList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(inDamageTaskInfoList)) { |
| | | bigStorageCageFeedTaskService.remove(new LambdaQueryWrapper<BigStorageCageFeedTask>().eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | //将破损信息新增入破损表 |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask : inDamageTaskInfoList) { |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageFeedTask.getGlassId()); |
| | | damage.setLine(bigStorageCageFeedTask.getLine()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark("进笼前卧转立"); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | } |
| | | //获取出片任务表中状态为破损的数据 |
| | | List<BigStorageCageOutTask> outDamageTaskInfoList = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(outDamageTaskInfoList)) { |
| | | bigStorageCageOutTaskService.remove(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | List<String> glassIdList = outDamageTaskInfoList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | temperingGlassInfoService.remove(new LambdaQueryWrapper<TemperingGlassInfo>().in(TemperingGlassInfo::getGlassId, glassIdList)); |
| | | //将破损信息新增入破损表 |
| | | for (BigStorageCageOutTask bigStorageCageOutTask : outDamageTaskInfoList) { |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageOutTask.getGlassId()); |
| | | damage.setLine(bigStorageCageOutTask.getEndSlot()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark("出片后卧转立"); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼破损玻璃清除任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | |
| | | /** |
| | | * 按照玻璃id判断玻璃状态及卧转立是否可直接启动 |
| | |
| | | |
| | | Boolean flag = Boolean.TRUE; |
| | | //2、获取卧转立 |
| | | Integer widthFirst = edgGlassTaskInfoList.get(0).getWidth(); |
| | | Integer widthFirst = Math.max(edgGlassTaskInfoList.get(0).getWidth() / 10, edgGlassTaskInfoList.get(0).getHeight() / 10); |
| | | if (edgGlassTaskInfoList.size() == 1) { |
| | | if (remainWidth >= widthFirst) { |
| | | if (glassCount <= 5) { |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst); |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst); |
| | |
| | | flag = Boolean.FALSE; |
| | | } |
| | | } else { |
| | | Integer widthSecond = edgGlassTaskInfoList.get(1).getWidth(); |
| | | Integer widthSecond = Math.max(edgGlassTaskInfoList.get(1).getWidth() / 10, edgGlassTaskInfoList.get(1).getHeight() / 10); |
| | | if (remainWidth >= widthFirst) { |
| | | if (remainWidth - widthFirst - galssGap >= widthSecond) { |
| | | if (glassCount <= inCarMaxSize - 1) { |
| | | if (remainWidth - widthFirst - glassGap >= widthSecond) { |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst); |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst); |
| | |
| | | } |
| | | |
| | | private void sendTaskListToPLC(List<BigStorageCageFeedTask> taskList, Integer line) { |
| | | log.info("送片任务发送进片玻璃信息"); |
| | | S7control s7control = S7object.getinstance().plccontrol; |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | String mesD03Address = plcMesObject.getPlcParameter("MESToD03").getAddress(); |
| | |
| | | s7control.writeWord(plcMesObject.getPlcParameter("TargetAddToImport" + i).getAddress(), taskList.get(i - 1).getTargetSlot()); |
| | | } |
| | | s7control.writeWord(outLine, 2); |
| | | log.info("送片任务已发送完成,任务线路为:{},启动地址为{}", line, outLine); |
| | | log.info("送片任务已发送完成,任务线路为:{},启动地址为{},确认字为{}", line, outLine, 2); |
| | | } |
| | | |
| | | private <T extends BigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, Boolean isTempering, String mesToPLCAddress) { |
| | |
| | | if (bigStorageCageOutTaskList.size() > outCarMaxSize || e.getWidth() > remainWidth) { |
| | | break; |
| | | } |
| | | remainWidth = remainWidth - (int) e.getWidth() - galssGap; |
| | | remainWidth = remainWidth - (int) e.getWidth() - glassGap; |
| | | if (isTempering) { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.TEMPERING_OUT_TARGET_POSITION, |
| | | (int) e.getWidth() * 10, 0, 0, 1)); |
| | |
| | | List<Integer> slotList = list.stream().map(T::getSlot).distinct().collect(Collectors.toList()); |
| | | //获取待出去的玻璃信息(等下车出去的玻璃) |
| | | Map<Integer, Double> slotRemainMap = list.stream().filter(e -> !taskGlassIds.contains(e.getGlassId())) |
| | | .collect(Collectors.groupingBy(T::getSlot, Collectors.summingDouble(item -> item.getWidth() + galssGap))); |
| | | .collect(Collectors.groupingBy(T::getSlot, Collectors.summingDouble(item -> item.getWidth() + glassGap))); |
| | | if (CollectionUtils.isNotEmpty(slotRemainMap)) { |
| | | //按照格子号更新剩余尺寸 |
| | | slotRemainMap.forEach((e, v) -> { |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://192.168.20.24:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | slotWidth: 5000 #大车宽度 |
| | | inCarMaxSize: 6 #进片大车最大存放玻璃数量 |
| | | outCarMaxSize: 1 #出片大车最大存放玻璃数量 |
| | | galssGap: 300 #玻璃间距 |
| | | glassGap: 300 #玻璃间距 |
| | |
| | | where t.total_count = t.real_count |
| | | </select> |
| | | <select id="querySitToUpRemainWidth" resultMap="bigStorageDTO"> |
| | | SELECT cast(5000 - sum(width + 20) as INT) as REMAIN_WIDTH, |
| | | count(glass_id) as GLASS_COUNT |
| | | FROM big_storage_cage_feed_task |
| | | WHERE line = #{line} |
| | | AND task_state in (1, 2) |
| | | SELECT CAST |
| | | (5000 - SUM(MAX_LENGTH + #{glassGap}) AS INT) AS REMAIN_WIDTH, |
| | | COUNT(GLASS_ID) AS GLASS_COUNT |
| | | FROM ( |
| | | SELECT GLASS_ID, |
| | | CASE |
| | | |
| | | WHEN WIDTH >= HEIGHT THEN |
| | | WIDTH |
| | | ELSE HEIGHT |
| | | END MAX_LENGTH |
| | | FROM BIG_STORAGE_CAGE_FEED_TASK |
| | | WHERE LINE = 2002 |
| | | AND TASK_STATE IN (1, 2) |
| | | ) T |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.job.PlcStorageCageTask; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | PlcStorageCageTask plcStorageCageTask; |
| | | @Autowired |
| | | BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | |
| | | log.info("获取大理片笼信息:{}", bigStorageCageDetailsService.selectBigStorageCageDetails("P24060403|3|6")); |
| | | } |
| | | |
| | | @Test |
| | | public void insertDamage() { |
| | | Damage damage=new Damage(); |
| | | damage.setGlassId("P24060403|3|6"); |
| | | damage.setLine(2001); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark(""); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>glassStorage</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.2.4</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.9</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/7 14:36RRRR |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | | public class GlassStorageApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(GlassStorageApplication.class, args); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.loadposition.controller;
|
| | |
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/loadPosition")
|
| | | @Api(tags = " 控制器")
|
| | | public class LoadPositionController {
|
| | |
|
| | | @Autowired
|
| | | private LoadPositionService loadPositionService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<LoadPosition>> findList(@RequestBody LoadPosition params) {
|
| | | List<LoadPosition> result = loadPositionService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<LoadPosition> findById(@PathVariable("id") Long id) {
|
| | | LoadPosition loadPosition = loadPositionService.findById(id);
|
| | | return ResponseEntity.ok(loadPosition);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param loadPosition
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.insert(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param loadPosition
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.update(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = loadPositionService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("load_position")
|
| | | @ApiModel(value = "LoadPosition", description = " ")
|
| | | public class LoadPosition implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 架子编号
|
| | | */
|
| | | @ApiModelProperty("架子编号")
|
| | | private String number;
|
| | |
|
| | | /**
|
| | | * 机器编号
|
| | | */
|
| | | @ApiModelProperty("机器编号")
|
| | | private Long machineId;
|
| | |
|
| | | /**
|
| | | * 启用标记
|
| | | */
|
| | | @ApiModelProperty("启用标记")
|
| | | private String flag;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 仓储任务编号
|
| | | */
|
| | | @ApiModelProperty("仓储任务编号")
|
| | | private Long storageTaskId;
|
| | |
|
| | | /**
|
| | | * 上片位类型
|
| | | */
|
| | | @ApiModelProperty("上片位类型")
|
| | | private Integer typeFlag;
|
| | |
|
| | | /**
|
| | | * 线路
|
| | | */
|
| | | @ApiModelProperty("线路")
|
| | | private Integer routeGroup;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public Long getMachineId() {
|
| | | return machineId;
|
| | | }
|
| | |
|
| | | public void setMachineId(Long machineId) {
|
| | | this.machineId = machineId;
|
| | | }
|
| | |
|
| | | public String getFlag() {
|
| | | return flag;
|
| | | }
|
| | |
|
| | | public void setFlag(String flag) {
|
| | | this.flag = flag;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getStorageTaskId() {
|
| | | return storageTaskId;
|
| | | }
|
| | |
|
| | | public void setStorageTaskId(Long storageTaskId) {
|
| | | this.storageTaskId = storageTaskId;
|
| | | }
|
| | |
|
| | | public Integer getTypeFlag() {
|
| | | return typeFlag;
|
| | | }
|
| | |
|
| | | public void setTypeFlag(Integer typeFlag) {
|
| | | this.typeFlag = typeFlag;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface LoadPositionMapper extends BaseMapper<LoadPosition> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.mapper.LoadPositionMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.loadposition.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface LoadPositionService extends IService<LoadPosition> {
|
| | |
|
| | | List<LoadPosition> findList(LoadPosition params);
|
| | |
|
| | | LoadPosition findById(Long id);
|
| | |
|
| | | boolean insert(LoadPosition loadPosition);
|
| | |
|
| | | boolean update(LoadPosition loadPosition);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import com.mes.loadposition.mapper.LoadPositionMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class LoadPositionServiceImpl extends ServiceImpl<LoadPositionMapper, LoadPosition> implements LoadPositionService {
|
| | |
|
| | | @Autowired
|
| | | private LoadPositionMapper loadPositionMapper;
|
| | |
|
| | | @Override
|
| | | public List<LoadPosition> findList(LoadPosition params){
|
| | | LambdaQueryWrapper<LoadPosition> query = Wrappers.lambdaQuery(LoadPosition.class);
|
| | | return loadPositionMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public LoadPosition findById(Long id) {
|
| | | return loadPositionMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(LoadPosition loadPosition) {
|
| | | return save(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(LoadPosition loadPosition) {
|
| | | return updateById(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return loadPositionMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.mes.rawusage.service.RawUsageService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/rawUsage")
|
| | | @Api(tags = " 控制器")
|
| | | public class RawUsageController {
|
| | |
|
| | | @Autowired
|
| | | private RawUsageService rawUsageService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<RawUsage>> findList(@RequestBody RawUsage params) {
|
| | | List<RawUsage> result = rawUsageService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<RawUsage> findById(@PathVariable("id") Long id) {
|
| | | RawUsage rawUsage = rawUsageService.findById(id);
|
| | | return ResponseEntity.ok(rawUsage);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param rawUsage
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.insert(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param rawUsage
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.update(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = rawUsageService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("raw_usage")
|
| | | @ApiModel(value = "RawUsage", description = " ")
|
| | | public class RawUsage implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 玻璃类型
|
| | | */
|
| | | @ApiModelProperty("玻璃类型")
|
| | | private String rawType;
|
| | |
|
| | | /**
|
| | | * 宽度
|
| | | */
|
| | | @ApiModelProperty("宽度")
|
| | | private Float rawWidth;
|
| | |
|
| | | /**
|
| | | * 高度
|
| | | */
|
| | | @ApiModelProperty("高度")
|
| | | private Float rawHeight;
|
| | |
|
| | | /**
|
| | | * 厚度
|
| | | */
|
| | | @ApiModelProperty("厚度")
|
| | | private Float rawThickness;
|
| | |
|
| | | /**
|
| | | * 状态
|
| | | */
|
| | | @ApiModelProperty("状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 颜色
|
| | | */
|
| | | @ApiModelProperty("颜色")
|
| | | private String color;
|
| | |
|
| | | /**
|
| | | * 总数量
|
| | | */
|
| | | @ApiModelProperty("总数量")
|
| | | private Integer pieces;
|
| | |
|
| | | /**
|
| | | * 剩余数量
|
| | | */
|
| | | @ApiModelProperty("剩余数量")
|
| | | private Integer leftPieces;
|
| | |
|
| | | /**
|
| | | * 物料编码
|
| | | */
|
| | | @ApiModelProperty("物料编码")
|
| | | private String qrcode;
|
| | |
|
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | @ApiModelProperty("创建时间")
|
| | | private Date createTime;
|
| | |
|
| | | /**
|
| | | * 生产日期
|
| | | */
|
| | | @ApiModelProperty("生产日期")
|
| | | private Date productionTime;
|
| | |
|
| | | /**
|
| | | * 批次号
|
| | | */
|
| | | @ApiModelProperty("批次号")
|
| | | private String batchId;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getRawType() {
|
| | | return rawType;
|
| | | }
|
| | |
|
| | | public void setRawType(String rawType) {
|
| | | this.rawType = rawType;
|
| | | }
|
| | |
|
| | | public Float getRawWidth() {
|
| | | return rawWidth;
|
| | | }
|
| | |
|
| | | public void setRawWidth(Float rawWidth) {
|
| | | this.rawWidth = rawWidth;
|
| | | }
|
| | |
|
| | | public Float getRawHeight() {
|
| | | return rawHeight;
|
| | | }
|
| | |
|
| | | public void setRawHeight(Float rawHeight) {
|
| | | this.rawHeight = rawHeight;
|
| | | }
|
| | |
|
| | | public Float getRawThickness() {
|
| | | return rawThickness;
|
| | | }
|
| | |
|
| | | public void setRawThickness(Float rawThickness) {
|
| | | this.rawThickness = rawThickness;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public String getColor() {
|
| | | return color;
|
| | | }
|
| | |
|
| | | public void setColor(String color) {
|
| | | this.color = color;
|
| | | }
|
| | |
|
| | | public Integer getPieces() {
|
| | | return pieces;
|
| | | }
|
| | |
|
| | | public void setPieces(Integer pieces) {
|
| | | this.pieces = pieces;
|
| | | }
|
| | |
|
| | | public Integer getLeftPieces() {
|
| | | return leftPieces;
|
| | | }
|
| | |
|
| | | public void setLeftPieces(Integer leftPieces) {
|
| | | this.leftPieces = leftPieces;
|
| | | }
|
| | |
|
| | | public String getQrcode() {
|
| | | return qrcode;
|
| | | }
|
| | |
|
| | | public void setQrcode(String qrcode) {
|
| | | this.qrcode = qrcode;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getProductionTime() {
|
| | | return productionTime;
|
| | | }
|
| | |
|
| | | public void setProductionTime(Date productionTime) {
|
| | | this.productionTime = productionTime;
|
| | | }
|
| | |
|
| | | public String getBatchId() {
|
| | | return batchId;
|
| | | }
|
| | |
|
| | | public void setBatchId(String batchId) {
|
| | | this.batchId = batchId;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface RawUsageMapper extends BaseMapper<RawUsage> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.rawusage.mapper.RawUsageMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.rawusage.service;
|
| | |
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface RawUsageService extends IService<RawUsage> {
|
| | |
|
| | | List<RawUsage> findList(RawUsage params);
|
| | |
|
| | | RawUsage findById(Long id);
|
| | |
|
| | | boolean insert(RawUsage rawUsage);
|
| | |
|
| | | boolean update(RawUsage rawUsage);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.rawusage.mapper.RawUsageMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.mes.rawusage.service.RawUsageService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class RawUsageServiceImpl extends ServiceImpl<RawUsageMapper, RawUsage> implements RawUsageService {
|
| | |
|
| | | @Autowired
|
| | | private RawUsageMapper rawUsageMapper;
|
| | |
|
| | | @Override
|
| | | public List<RawUsage> findList(RawUsage params){
|
| | | LambdaQueryWrapper<RawUsage> query = Wrappers.lambdaQuery(RawUsage.class);
|
| | | return rawUsageMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public RawUsage findById(Long id) {
|
| | | return rawUsageMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(RawUsage rawUsage) {
|
| | | return save(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(RawUsage rawUsage) {
|
| | | return updateById(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return rawUsageMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/shelfRack")
|
| | | @Api(tags = " 控制器")
|
| | | public class ShelfRackController {
|
| | |
|
| | | @Autowired
|
| | | private ShelfRackService shelfRackService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<ShelfRack>> findList(@RequestBody ShelfRack params) {
|
| | | List<ShelfRack> result = shelfRackService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<ShelfRack> findById(@PathVariable("id") Long id) {
|
| | | ShelfRack shelfRack = shelfRackService.findById(id);
|
| | | return ResponseEntity.ok(shelfRack);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param shelfRack
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.insert(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param shelfRack
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.update(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = shelfRackService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("shelf_rack")
|
| | | @ApiModel(value = "ShelfRack", description = " ")
|
| | | public class ShelfRack implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 架子编号
|
| | | */
|
| | | @ApiModelProperty("架子编号")
|
| | | private String number;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 包号编号
|
| | | */
|
| | | @ApiModelProperty("包号编号")
|
| | | private Long rawPackageId;
|
| | |
|
| | | /**
|
| | | * 修改时间
|
| | | */
|
| | | @ApiModelProperty("修改时间")
|
| | | private Date modTime;
|
| | |
|
| | | /**
|
| | | * 启用状态
|
| | | */
|
| | | @ApiModelProperty("启用状态")
|
| | | private String enableState;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getRawPackageId() {
|
| | | return rawPackageId;
|
| | | }
|
| | |
|
| | | public void setRawPackageId(Long rawPackageId) {
|
| | | this.rawPackageId = rawPackageId;
|
| | | }
|
| | |
|
| | | public Date getModTime() {
|
| | | return modTime;
|
| | | }
|
| | |
|
| | | public void setModTime(Date modTime) {
|
| | | this.modTime = modTime;
|
| | | }
|
| | |
|
| | | public String getEnableState() {
|
| | | return enableState;
|
| | | }
|
| | |
|
| | | public void setEnableState(String enableState) {
|
| | | this.enableState = enableState;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface ShelfRackMapper extends BaseMapper<ShelfRack> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.shelfrack.mapper.ShelfRackMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.shelfrack.service;
|
| | |
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface ShelfRackService extends IService<ShelfRack> {
|
| | |
|
| | | List<ShelfRack> findList(ShelfRack params);
|
| | |
|
| | | ShelfRack findById(Long id);
|
| | |
|
| | | boolean insert(ShelfRack shelfRack);
|
| | |
|
| | | boolean update(ShelfRack shelfRack);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.shelfrack.mapper.ShelfRackMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class ShelfRackServiceImpl extends ServiceImpl<ShelfRackMapper, ShelfRack> implements ShelfRackService {
|
| | |
|
| | | @Autowired
|
| | | private ShelfRackMapper shelfRackMapper;
|
| | |
|
| | | @Override
|
| | | public List<ShelfRack> findList(ShelfRack params){
|
| | | LambdaQueryWrapper<ShelfRack> query = Wrappers.lambdaQuery(ShelfRack.class);
|
| | | return shelfRackMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public ShelfRack findById(Long id) {
|
| | | return shelfRackMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(ShelfRack shelfRack) {
|
| | | return save(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(ShelfRack shelfRack) {
|
| | | return updateById(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return shelfRackMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/storageTask")
|
| | | @Api(tags = " 控制器")
|
| | | public class StorageTaskController {
|
| | |
|
| | | @Autowired
|
| | | private StorageTaskService storageTaskService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<StorageTask>> findList(@RequestBody StorageTask params) {
|
| | | List<StorageTask> result = storageTaskService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<StorageTask> findById(@PathVariable("id") Long id) {
|
| | | StorageTask storageTask = storageTaskService.findById(id);
|
| | | return ResponseEntity.ok(storageTask);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param storageTask
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.insert(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param storageTask
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.update(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = storageTaskService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("storage_task")
|
| | | @ApiModel(value = "StorageTask", description = " ")
|
| | | public class StorageTask implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 任务类型
|
| | | */
|
| | | @ApiModelProperty("任务类型")
|
| | | private String taskType;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String taskState;
|
| | |
|
| | | /**
|
| | | * 仓储架号
|
| | | */
|
| | | @ApiModelProperty("仓储架号")
|
| | | private String shelfRack;
|
| | |
|
| | | /**
|
| | | * 上片位编号
|
| | | */
|
| | | @ApiModelProperty("上片位编号")
|
| | | private String loadRack;
|
| | |
|
| | | /**
|
| | | * 线路
|
| | | */
|
| | | @ApiModelProperty("线路")
|
| | | private Integer routeGroup;
|
| | |
|
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | @ApiModelProperty("创建时间")
|
| | | private Date startTime;
|
| | |
|
| | | /**
|
| | | * 完成时间
|
| | | */
|
| | | @ApiModelProperty("完成时间")
|
| | | private Date finishTime;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTaskType() {
|
| | | return taskType;
|
| | | }
|
| | |
|
| | | public void setTaskType(String taskType) {
|
| | | this.taskType = taskType;
|
| | | }
|
| | |
|
| | | public String getTaskState() {
|
| | | return taskState;
|
| | | }
|
| | |
|
| | | public void setTaskState(String taskState) {
|
| | | this.taskState = taskState;
|
| | | }
|
| | |
|
| | | public String getShelfRack() {
|
| | | return shelfRack;
|
| | | }
|
| | |
|
| | | public void setShelfRack(String shelfRack) {
|
| | | this.shelfRack = shelfRack;
|
| | | }
|
| | |
|
| | | public String getLoadRack() {
|
| | | return loadRack;
|
| | | }
|
| | |
|
| | | public void setLoadRack(String loadRack) {
|
| | | this.loadRack = loadRack;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public Date getFinishTime() {
|
| | | return finishTime;
|
| | | }
|
| | |
|
| | | public void setFinishTime(Date finishTime) {
|
| | | this.finishTime = finishTime;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface StorageTaskMapper extends BaseMapper<StorageTask> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.storagetask.mapper.StorageTaskMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.storagetask.service;
|
| | |
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface StorageTaskService extends IService<StorageTask> {
|
| | |
|
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | | StorageTask findById(Long id);
|
| | |
|
| | | boolean insert(StorageTask storageTask);
|
| | |
|
| | | boolean update(StorageTask storageTask);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.storagetask.mapper.StorageTaskMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class StorageTaskServiceImpl extends ServiceImpl<StorageTaskMapper, StorageTask> implements StorageTaskService {
|
| | |
|
| | | @Autowired
|
| | | private StorageTaskMapper storageTaskMapper;
|
| | |
|
| | | @Override
|
| | | public List<StorageTask> findList(StorageTask params){
|
| | | LambdaQueryWrapper<StorageTask> query = Wrappers.lambdaQuery(StorageTask.class);
|
| | | return storageTaskMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public StorageTask findById(Long id) {
|
| | | return storageTaskMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(StorageTask storageTask) {
|
| | | return save(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(StorageTask storageTask) {
|
| | | return updateById(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return storageTaskMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | server: |
| | | port: 8086 |
| | | |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: glassStorage |
| | | |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://192.168.1.199:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.1.199:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://192.168.1.199:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://192.168.1.199:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | # hangzhoumes: |
| | | # url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | # username: root |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.mysql.cj.jdbc.Driver |
| | | # salve_hangzhoumes: |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | # username: sa |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | hangzhoumes: |
| | | url: jdbc:mysql:10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | |
| | | } |
| | | |
| | | byte[] getplcvlues = plccontrol.readByte(PlcMesObject.getPlcAddressBegin(), PlcMesObject.getPlcAddressLength()); |
| | | PlcMesObject.setPlcParameterList(getplcvlues); |
| | | if (getplcvlues != null) { |
| | | PlcMesObject.setPlcParameterList(getplcvlues); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 任务状态 0 未开始 1正在进行 2完成 |
| | | */ |
| | | private Integer taskStauts; |
| | | private Integer taskStatus; |
| | | |
| | | /** |
| | | * 创建时间 |
| | |
| | | |
| | | @Repository |
| | | public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> { |
| | | |
| | | |
| | | /** |
| | | * 按流程卡查询落架数量最多的流程卡及层数 |
| | | * |
| | | * @param flowCardId |
| | | * @return |
| | | */ |
| | | DownGlassInfoDTO queryDownGlassMaxLayer(@Param(value = "flowCardId") String flowCardId); |
| | | |
| | | /** |
| | | * 查询流程卡指定层数需要落架的次序 |
| | | * |
| | | * @param flowCardId |
| | | * @param layer |
| | | * @return |
| | | */ |
| | | Integer queryMaxSequence(@Param(value = "flowCardId") String flowCardId, @Param(value = "layer") int layer); |
| | | |
| | | /** |
| | | * 获取落架玻璃信息,包括已绑定流程卡、层数未落架的玻璃信息 |
| | | * |
| | | * @param isDownload 是否获取未落架玻璃信息 True 已落架 false 未落架 |
| | | * @return |
| | | */ |
| | | List<DownGlassInfoDTO> queryWorkStationIsIn(@Param(value = "isDownload") Boolean isDownload); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.mapper.DownGlassTaskMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Autowired |
| | | private DownGlassInfoService downGlassInfoService; // MySQL Mapper |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private DownGlassTaskMapper downGlassTaskMapper; // SQL Server Mapper |
| | | |
| | | @Override |
| | |
| | | |
| | | // Step 2: 从 SQL Server 中过滤掉这些玻璃 ID 并查询任务 |
| | | QueryWrapper<DownGlassTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("task_stauts", 1) |
| | | queryWrapper.eq("task_status", 1) |
| | | .and(qw -> qw.eq("task_type", 2).or().eq("task_type", 3)); |
| | | |
| | | List<DownGlassInfo> excludedGlassIds = downGlassInfoService.list(); |
| | |
| | | @Override |
| | | public void updateTaskState(String id) { |
| | | UpdateWrapper<DownGlassTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("task_stauts", 2).eq("id", id); |
| | | updateWrapper.set("task_status", 2).eq("id", id); |
| | | baseMapper.update(new DownGlassTask(), updateWrapper); |
| | | } |
| | | |
| | |
| | | // 如果主键值不存在,则进行插入操作 |
| | | DownGlassTask newDownGlassTask = new DownGlassTask(); |
| | | BeanUtils.copyProperties(downGlassTask, newDownGlassTask); |
| | | newDownGlassTask.setTaskStauts(1); // 默认任务状态为1 |
| | | newDownGlassTask.setTaskStatus(1); // 默认任务状态为1 |
| | | newDownGlassTask.setCreateTime(new Date()); |
| | | int rows = baseMapper.insert(newDownGlassTask); |
| | | return rows > 0 ? rows : null; |
| | |
| | | */ |
| | | boolean DirectConnection(GlassInfo glassInfo); |
| | | |
| | | DownStorageCageDetails getGlassInfoMaxCount(); |
| | | String getGlassInfoMaxCount(String glassId); |
| | | |
| | | /** |
| | | * @param glassId |
| | |
| | | */ |
| | | List<Map<String, Object>> selectDownStorageCages(); |
| | | |
| | | List<DownStorageCageDetails> selectCacheMax(); |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.yulichang.query.MPJLambdaQueryWrapper; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.github.yulichang.query.MPJLambdaQueryWrapper; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageDetailsMapper; |
| | | |
| | | import com.mes.downstorage.mapper.DownStorageCageMapper; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public DownStorageCageDetails getGlassInfoMaxCount() { |
| | | return baseMapper.getGlassInfoMaxCount(); |
| | | public String getGlassInfoMaxCount(String glassId) { |
| | | DownStorageCageDetails glassInfoMaxCount = baseMapper.getGlassInfoMaxCount(); |
| | | return null == glassInfoMaxCount ? glassId : glassInfoMaxCount.getGlassId(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.request.DownWorkRequest; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | private DownWorkstationService downWorkstationService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @ApiOperation("获取工位信息") |
| | | @GetMapping("/getone") |
| | | public ResponseEntity<?> getOneDownWorkstations() { |
| | | public Result getOneDownWorkstations() { |
| | | try { |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1,6); |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1, 6); |
| | | // 构建符合预期格式的响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | // 返回 ResponseEntity 对象,包含响应数据和状态码 |
| | | return ResponseEntity.ok(responseData); |
| | | return Result.build(200, "获取工位信息成功", data); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | // 如果出现异常,返回错误信息 |
| | | Map<String, Object> errorResponse = new HashMap<>(); |
| | | errorResponse.put("code", 500); |
| | | errorResponse.put("msg", "服务器内部错误"); |
| | | return ResponseEntity.status(500).body(errorResponse); |
| | | return Result.build(500, "获取工位信息失败", 1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("获取流程卡号") |
| | | @GetMapping("/getflowCardId") |
| | | public ResponseEntity<Map<String, Object>> getflowCardId() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | public Result getflowCardId() { |
| | | |
| | | try { |
| | | List<Map<String, Object>> data = glassInfoService.getFlowCardId(); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | return ResponseEntity.ok(responseData); |
| | | return Result.build(200, "获取流程卡号成功", data); |
| | | } catch (Exception e) { |
| | | responseData.put("code", 500); |
| | | responseData.put("msg", "失败"); |
| | | responseData.put("data", null); |
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData); |
| | | return Result.build(500, "获取流程卡号失败", 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //绑定架子 |
| | | @ApiOperation("绑定架子") |
| | | //绑定架子 |
| | | @ApiOperation("绑定架子") |
| | | @PostMapping("/updateFlowCardId") |
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) { |
| | | // 从 requestData 中获取传入的 flowCardId |
| | | String flowCardId = (String) requestData.get("flowCardId"); |
| | | int workstationId = (int) requestData.get("workstationId"); |
| | | public Result updateFlowCardId(@RequestBody DownWorkRequest request) { |
| | | |
| | | // 查询对应 flowCardId 的玻璃信息总数量 |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId); |
| | | // 绑定架子 |
| | | downWorkstationService.updateFlowCardIdAndCount(request.getFlowCardId(), request.getWorkstationId(), request.getLayer()); |
| | | |
| | | // 更新 down_workstation 表中的总数量 |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | |
| | | // 构建响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | responseData.put("message", "updated successfully"); |
| | | responseData.put("code", 200); |
| | | // 返回处理结果 |
| | | return ResponseEntity.ok(responseData); |
| | | return Result.build(200, "绑定架子成功", 1); |
| | | } |
| | | |
| | | @ApiOperation("清除工位信息") |
| | | @PostMapping("/clear") |
| | | public ResponseEntity<Map<String, Object>> clearWorkstationInfo(@RequestBody Map<String, Object> requestData) { |
| | | public Result clearWorkstationInfo(@RequestBody Map<String, Object> requestData) { |
| | | // 调用 DownWorkstationService 中的方法清除指定工位ID的信息 |
| | | int workstationId = (int) requestData.get("workstationId"); |
| | | |
| | |
| | | |
| | | if (downWorkstations == totalWorkstations) { |
| | | downWorkstationService.clearFlowCardId(workstationId); |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | responseData.put("message", "cleared successfully"); |
| | | responseData.put("code", 200); |
| | | // 返回处理结果 |
| | | return ResponseEntity.ok(responseData); |
| | | } |
| | | else { |
| | | return Result.build(200, "清除工位信息成功", 1); |
| | | } else { |
| | | // 如果总数量和落架数量不一致,返回错误响应 |
| | | Map<String, Object> errorResponse = new HashMap<>(); |
| | | errorResponse.put("message", "Total workstations count does not match down workstations count."); |
| | | errorResponse.put("code", 400); |
| | | return ResponseEntity.badRequest().body(errorResponse); |
| | | return Result.build(500, "清除工位信息失败", 1); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("获取工位显示图1") |
| | | @GetMapping("/getwo") |
| | | public ResponseEntity<Map<String, Object>> getwo() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | public Result getwo() { |
| | | |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(1,3); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | return ResponseEntity.ok(responseData); |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(1, 3); |
| | | return Result.build(200, "获取工位显示图1成功", data); |
| | | } catch (Exception e) { |
| | | responseData.put("code", 500); |
| | | responseData.put("msg", "失败"); |
| | | responseData.put("data", null); |
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData); |
| | | return Result.build(200, "获取工位显示图1失败", 1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("获取工位显示图2") |
| | | @GetMapping("/getwo2") |
| | | public ResponseEntity<Map<String, Object>> getw2o() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | public Result getwo2() { |
| | | |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(4,6); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | return ResponseEntity.ok(responseData); |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(4, 6); |
| | | return Result.build(200, "获取工位显示图2成功", data); |
| | | } catch (Exception e) { |
| | | responseData.put("code", 500); |
| | | responseData.put("msg", "失败"); |
| | | responseData.put("data", null); |
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData); |
| | | return Result.build(200, "获取工位显示图2失败", 1); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(" 功能:对工位进行【启用/禁用】") |
| | | @PostMapping("/updateDownWorkstation") |
| | | @ResponseBody |
| | | public Result updateDownWorkstation(@RequestBody DownWorkstation downWorkstation) { |
| | | boolean isSucess = downWorkstationService.updateDownWorkstationstate(downWorkstation); |
| | | return Result.build(200, "更换成功", isSucess); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | /** |
| | | * 总数量 |
| | | */ |
| | | @TableField("total_quantity") |
| | | private Integer totalquantity; |
| | | private Integer totalQuantity; |
| | | |
| | | /** |
| | | * 落架数量 |
| | | */ |
| | | @TableField("racks_number") |
| | | private Integer Racksnumber; |
| | | private Integer racksNumber; |
| | | /** |
| | | * 人工下片数量 |
| | | */ |
| | | private Integer otherNumber; |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableField;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import lombok.Data;
|
| | | import lombok.EqualsAndHashCode;
|
| | |
| | | @Data
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | |
|
| | | public class DownWorkstionAndDownGlassinfo
|
| | | {
|
| | | public class DownWorkstionAndDownGlassinfo {
|
| | | /**
|
| | | * 下片工位表id
|
| | | */
|
| | |
| | | private Integer workState;
|
| | |
|
| | |
|
| | | @TableField("total_quantity")
|
| | | private Integer totalquantity;
|
| | | private Integer totalQuantity;
|
| | |
|
| | | @TableField("racks_number")
|
| | | private Integer Racksnumber;
|
| | |
|
| | |
|
| | |
|
| | | private Integer racksNumber;
|
| | |
|
| | | /**
|
| | | * 顺序
|
| | |
| | | */ |
| | | private Integer layer; |
| | | /** |
| | | * 落架数量 |
| | | * 已出片数量 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 落架数量 |
| | | */ |
| | | private Integer racksNumber; |
| | | |
| | | /** |
| | | * 流程卡未进片的玻璃信息 |
| | | */ |
| | | private List<GlassInfo> glassInfoList; |
New file |
| | |
| | | package com.mes.downworkstation.entity.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/7/10 14:10 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class DownWorkRequest { |
| | | |
| | | |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String flowCardId; |
| | | |
| | | /** |
| | | * 工位id |
| | | */ |
| | | private int workstationId; |
| | | |
| | | /** |
| | | * 层数 |
| | | */ |
| | | private int layer; |
| | | } |
| | |
| | | |
| | | /** |
| | | * @param flowCardId |
| | | * @param glassInfoCount |
| | | * |
| | | * @param workstationId |
| | | * @return 更新架子和数量 |
| | | */ |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | void updateFlowCardIdAndCount(String flowCardId, int workstationId,int layer); |
| | | |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | DownWorkstation selectByFlowCardId(String flowcardid); |
| | | |
| | | |
| | | /** |
| | | * @param downWorkstation |
| | | * @returnq 启用禁用 |
| | | */ |
| | | boolean updateDownWorkstationstate(DownWorkstation downWorkstation); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.entity.DownWorkstionAndDownGlassinfo; |
| | |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private DownGlassInfoMapper downGlassInfoMapper; |
| | | @Autowired |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Autowired |
| | | private DamageService damageservice; |
| | | |
| | | @Autowired |
| | | private DownWorkstationTaskService downWorkstationTaskService; |
| | |
| | | @Override |
| | | public int getTotalQuantity(int workstationId) { |
| | | DownWorkstation result = baseMapper.selectOne(new QueryWrapper<DownWorkstation>().lambda() |
| | | .select(DownWorkstation::getTotalquantity) |
| | | .select(DownWorkstation::getTotalQuantity) |
| | | .eq(DownWorkstation::getWorkstationId, workstationId)); |
| | | |
| | | return result != null ? result.getTotalquantity() : 0; |
| | | return result != null ? result.getTotalQuantity() : 0; |
| | | } |
| | | |
| | | |
| | |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getRacksnumber() : 0; |
| | | return result != null ? result.getRacksNumber() : 0; |
| | | } |
| | | |
| | | //根据条件获取工位玻璃信息 |
| | |
| | | |
| | | |
| | | @Override |
| | | public int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | public void updateFlowCardIdAndCount(String flowCardId, int workstationId,int layer) { |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,layer); |
| | | QueryWrapper<Damage> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("process_id", flowCardId); |
| | | queryWrapper.eq("technology_number", layer); |
| | | |
| | | int otherNumber=damageservice.count(queryWrapper); |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("total_quantity", glassInfoCount) |
| | | .set("flow_card_id", flowCardId) |
| | | .set("layer", layer) |
| | | .set("other_number", otherNumber) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | return baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | this.update(updateWrapper); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public boolean updateDownWorkstationstate(DownWorkstation downWorkstation) { |
| | | DownWorkstation downWork = baseMapper.selectById(downWorkstation.getId()); |
| | | downWork.setEnableState(downWorkstation.getEnableState()); |
| | | baseMapper.updateById(downWork); |
| | | return true; |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.device.PlcParameterObject; |
| | |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Value("${mes.maxHeight}") |
| | | private Integer maxHeight; |
| | | |
| | | @Value("${mes.minWidth}") |
| | | private Integer minWidth; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Value("${mes.minHeight}") |
| | | private Integer minHeight; |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 3000) |
| | | public void plcHomeEdgTask() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue(); |
| | |
| | | String confirmationWrodValue = plcParameterObject.getPlcParameter("confirmationWord").getValue(); |
| | | String confirmationWrodAddress = plcParameterObject.getPlcParameter("confirmationWord").getAddress(); |
| | | String currentSlot = plcParameterObject.getPlcParameter("currentCell").getValue(); |
| | | |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:g06:{}、g08:{}、g11:{}、g13:{},当前格子号为:{}", |
| | | requestWord, glassIdeValue, confirmationWrodValue, out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, currentSlot); |
| | |
| | | inTo(glassIdeValue, requestWord, currentSlot); |
| | | } else if ("2".equals(requestWord)) { |
| | | //09空闲 :1 10空闲 :2 都空闲:3 其他0 |
| | | log.info("2、出片请求,且确认字为0,执行进片任务"); |
| | | log.info("2、出片请求,且确认字为0,执行出片任务"); |
| | | outTo(out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, glassIdeValue, currentSlot); |
| | | } else if ("3".equals(requestWord)) { |
| | | log.info("2、进片和出片都空闲,执行出片任务"); |
| | |
| | | } |
| | | Boolean checkFlag = Boolean.FALSE; |
| | | //玻璃尺寸是否走人工下片 |
| | | if (glassInfo.getWidth() > maxWidth || glassInfo.getHeight() > maxHeight) { |
| | | log.info("该玻璃尺寸走人工下片,直接进片"); |
| | | if (glassInfo.getWidth() > maxWidth || glassInfo.getHeight() > maxHeight || glassInfo.getWidth() < minWidth || glassInfo.getHeight() < minHeight) { |
| | | log.info("该玻璃尺寸不符合要求,需要走人工下片直接进片"); |
| | | } else { |
| | | log.info("该玻璃尺寸非人工下片"); |
| | | //获取该玻璃的流程卡是否已绑定架子 |
| | |
| | | if (!checkFlag && !isBind) { |
| | | log.info("该玻璃的流程卡未绑定架子,获取是否有空架子"); |
| | | List<DownWorkstation> list = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>() |
| | | .isNull(DownWorkstation::getFlowCardId)); |
| | | .isNull(DownWorkstation::getFlowCardId).orderByDesc(DownWorkstation::getWorkstationId)); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | log.info("有空架子,将流程卡与架子好绑定,执行进片任务 结束"); |
| | | //绑定流程卡 |
| | | downWorkstationService.update(new LambdaUpdateWrapper<DownWorkstation>() |
| | | .set(DownWorkstation::getFlowCardId, glassInfo.getFlowCardId()) |
| | | .set(DownWorkstation::getLayer, glassInfo.getLayer()) |
| | | .eq(DownWorkstation::getWorkstationId, list.get(0).getWorkstationId())); |
| | | downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), glassInfo.getLayer(), list.get(0).getWorkstationId()); |
| | | checkFlag = Boolean.TRUE; |
| | | } |
| | | } |
| | |
| | | endLoop: |
| | | for (DownGlassInfoDTO e : downGlassInfoDTOList) { |
| | | List<GlassInfo> glassInfoList = e.getGlassInfoList(); |
| | | for (GlassInfo item : glassInfoList) { |
| | | if (item.getWidth() == glassInfo.getWidth() && item.getHeight() == glassInfo.getHeight() |
| | | && item.getThickness() == glassInfo.getThickness() && item.getFilmsid().equals(glassInfo.getFilmsid())) { |
| | | //玻璃是否为多层 |
| | | checkFlag = multilayerCheck(item, Boolean.FALSE); |
| | | if (checkFlag) { |
| | | //玻璃替换 仅替换流程卡id及层数 |
| | | String tempFlowCardId = item.getFlowCardId(); |
| | | Integer tempLayer = item.getLayer(); |
| | | String flowCardId = glassInfo.getFlowCardId(); |
| | | Integer layer = glassInfo.getLayer(); |
| | | log.info("替换流程卡信息,当前玻璃信息:{}的流程卡号{}及层数{},替换后玻璃信息:{}的流程卡号{}及层数{}", |
| | | item, glassInfo, flowCardId, layer, tempFlowCardId, tempLayer); |
| | | glassInfo.setFlowCardId(tempFlowCardId); |
| | | glassInfo.setLayer(tempLayer); |
| | | glassInfoService.updateById(glassInfo); |
| | | item.setFlowCardId(flowCardId); |
| | | item.setLayer(layer); |
| | | glassInfoService.updateById(item); |
| | | break endLoop; |
| | | } |
| | | Optional<GlassInfo> glassInfoTempOptional = glassInfoList.stream().filter(item -> item.getWidth() == glassInfo.getWidth() && item.getHeight() == glassInfo.getHeight() |
| | | && item.getThickness() == glassInfo.getThickness() && item.getFilmsid().equals(glassInfo.getFilmsid())) |
| | | .findFirst(); |
| | | if (glassInfoTempOptional.isPresent()) { |
| | | GlassInfo item = glassInfoTempOptional.get(); |
| | | //玻璃是否为多层 |
| | | checkFlag = multilayerCheck(item, Boolean.FALSE); |
| | | if (checkFlag) { |
| | | //玻璃替换 仅替换流程卡id及层数 |
| | | String tempFlowCardId = item.getFlowCardId(); |
| | | Integer tempLayer = item.getLayer(); |
| | | String flowCardId = glassInfo.getFlowCardId(); |
| | | Integer layer = glassInfo.getLayer(); |
| | | log.info("替换流程卡信息,当前玻璃信息:{}的流程卡号{}及层数{},替换后玻璃信息:{}的流程卡号{}及层数{}", |
| | | item, glassInfo, flowCardId, layer, tempFlowCardId, tempLayer); |
| | | glassInfo.setFlowCardId(tempFlowCardId); |
| | | glassInfo.setLayer(tempLayer); |
| | | glassInfoService.updateById(glassInfo); |
| | | item.setFlowCardId(flowCardId); |
| | | item.setLayer(layer); |
| | | glassInfoService.updateById(item); |
| | | break endLoop; |
| | | } |
| | | } |
| | | } |
| | |
| | | downStorageCageDetails.setState(Const.GLASS_STATE_IN); |
| | | downStorageCageDetails.setSlot(nearestEmpty.getSlot()); |
| | | downStorageCageDetailsService.save(downStorageCageDetails); |
| | | // 生成进片任务 |
| | | |
| | | // 生成进片任务 |
| | | initDownGlassTask(glassInfo, 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN); |
| | | } |
| | | |
| | | public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String glassStatus13, String glassId, String currentSlot) { |
| | | public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String |
| | | glassStatus13, String glassId, String currentSlot) { |
| | | if ("2".equals(glassStatus06) && "2".equals(glassStatus11) && "2".equals(glassStatus13)) { |
| | | log.info("G06、G11、G13分别为{},{}、{}非自动状态,无法出片", glassStatus06, glassStatus11, glassStatus13); |
| | | return Boolean.FALSE; |
| | |
| | | return Boolean.FALSE; |
| | | } |
| | | Boolean flag08 = "1".equals(out08Glassstate) ? Boolean.TRUE : Boolean.FALSE; |
| | | if (!generateTaskByShelf(glassStatus11, flag08, glassStatus13, tempList, cageDetails)) { |
| | | return generateTaskByShelf(glassStatus11, !flag08, glassStatus13, tempList, cageDetails); |
| | | if (!generateTaskByShelf(glassStatus06, glassStatus11, flag08, glassStatus13, tempList, cageDetails, glassId)) { |
| | | return generateTaskByShelf(glassStatus06, glassStatus11, !flag08, glassStatus13, tempList, cageDetails, glassId); |
| | | } |
| | | return Boolean.TRUE; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private Boolean generateTaskByShelf(String glassStatus, Boolean flag08, String glassStatus13, List<DownStorageCageDetails> tempList, DownStorageCageDetails cageDetails) { |
| | | private Boolean generateTaskByShelf(String glassStatus06, String glassStatus11, Boolean flag08, String |
| | | glassStatus13, List<DownStorageCageDetails> tempList, DownStorageCageDetails cageDetails, String glassId) { |
| | | //获取2个机械臂范围内的架子绑定的流程卡信息 |
| | | List<Integer> workList = new ArrayList(); |
| | | |
| | | if (flag08) { |
| | | if (!"2".equals(glassStatus)) { |
| | | if (!"2".equals(glassStatus11)) { |
| | | workList.addAll(Const.G11_WORK_STATION); |
| | | } |
| | | } else { |
| | | if (!"2".equals(glassStatus)) { |
| | | if (!"2".equals(glassStatus06)) { |
| | | workList.addAll(Const.G06_WORK_STATION); |
| | | } |
| | | } |
| | |
| | | //对笼内玻璃进行过滤,仅出符合逻辑的玻璃 |
| | | if (CollectionUtils.isNotEmpty(workList)) { |
| | | List<DownWorkstation> downWorkstationList = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getEnableState, 0).in(DownWorkstation::getWorkstationId, workList)); |
| | | .eq(DownWorkstation::getEnableState, Const.SLOT_ON).in(DownWorkstation::getWorkstationId, workList)); |
| | | log.info("架子被禁用,无法出片落架"); |
| | | if (CollectionUtils.isEmpty(downWorkstationList)) { |
| | | log.info("笼子被禁用,无法走机械臂下片"); |
| | |
| | | List<DownGlassInfoDTO> downGlassInfoDTOList = downGlassInfoService.queryWorkStationIsIn(Boolean.TRUE); |
| | | List<String> downGlassFlowList = downGlassInfoDTOList.stream().map(item -> item.getFlowCardId() + ":" + item.getLayer()).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(downGlassFlowList)) { |
| | | //架子都未绑定流程卡,出笼内子数量最多尺寸最大的玻璃 |
| | | DownStorageCageDetails downStorageCageDetails = downStorageCageDetailsService.getGlassInfoMaxCount(); |
| | | //绑定流程卡,更新玻璃状态,生成出片任务, |
| | | tempGlassId = downStorageCageDetails.getGlassId(); |
| | | //架子都未绑定流程卡,出笼内子数量最多尺寸最大的玻璃id,无 则返回扫描扫到的玻璃id进行出片 |
| | | tempGlassId = downStorageCageDetailsService.getGlassInfoMaxCount(glassId); |
| | | isBind = Boolean.TRUE; |
| | | break loop; |
| | | } |
| | |
| | | // List<DownWorkstation> emptyShelfList = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>() |
| | | // .isNull(DownWorkstation::getFlowCardId)); |
| | | if (isEmptyShelf) { |
| | | DownStorageCageDetails downStorageCageDetails = downStorageCageDetailsService.getGlassInfoMaxCount(); |
| | | //绑定流程卡,更新玻璃状态,生成出片任务 |
| | | tempGlassId = downStorageCageDetails.getGlassId(); |
| | | //架子都未绑定流程卡,出笼内子数量最多尺寸最大的玻璃id,无 则返回扫描扫到的玻璃id进行出片 |
| | | tempGlassId = downStorageCageDetailsService.getGlassInfoMaxCount(glassId); |
| | | isBind = Boolean.TRUE; |
| | | break loop; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public Boolean generateDownGlassOutTask(String glassId, Integer taskType, Boolean isBind, DownStorageCageDetails cageDetails) { |
| | | public Boolean generateDownGlassOutTask(String glassId, Integer taskType, Boolean |
| | | isBind, DownStorageCageDetails cageDetails) { |
| | | //按玻璃id获取玻璃信息 |
| | | DownStorageCageDetails downStorageCageDetails = null; |
| | | if (glassId.equals(cageDetails.getGlassId())) { |
| | |
| | | taskType = 3; |
| | | } else { |
| | | downStorageCageDetails = downStorageCageDetailsService.getOne(new LambdaQueryWrapper<DownStorageCageDetails>() |
| | | .eq(DownStorageCageDetails::getGlassId, glassId)); |
| | | .eq(DownStorageCageDetails::getGlassId, glassId).eq(DownStorageCageDetails::getState, Const.GLASS_STATE_IN)); |
| | | } |
| | | |
| | | Integer endCell = null; |
| | |
| | | .isNull(DownWorkstation::getFlowCardId).orderByDesc(DownWorkstation::getWorkstationId).last("limit 1")); |
| | | if (null != emptyDownWorkstation) { |
| | | log.info("获取到空架子信息,绑定流程卡"); |
| | | emptyDownWorkstation.setFlowCardId(downStorageCageDetails.getFlowCardId()); |
| | | emptyDownWorkstation.setLayer(downStorageCageDetails.getLayer()); |
| | | downWorkstationService.updateById(emptyDownWorkstation); |
| | | downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), downStorageCageDetails.getLayer(), emptyDownWorkstation.getWorkstationId()); |
| | | endCell = emptyDownWorkstation.getWorkstationId(); |
| | | } else { |
| | | log.info("没有空架子信息,无法绑定流程卡"); |
| | |
| | | return Boolean.FALSE; |
| | | } |
| | | //更新落架玻璃数量 |
| | | if (endCell == 7) { |
| | | downWorkstationService.update(new UpdateWrapper<DownWorkstation>().eq("flow_card_id", downStorageCageDetails.getFlowCardId()) |
| | | .eq("layer", downStorageCageDetails.getLayer()).setSql("other_number = other_number +1")); |
| | | } else { |
| | | downWorkstationService.update(new UpdateWrapper<DownWorkstation>().eq("flow_card_id", downStorageCageDetails.getFlowCardId()) |
| | | .eq("layer", downStorageCageDetails.getLayer()).setSql("racks_number = racks_number +1")); |
| | | } |
| | | |
| | | //生成任务信息 |
| | | DownGlassInfo downGlassInfo = new DownGlassInfo(); |
| | |
| | | downGlassTask.setHeight((int) glassInfo.getHeight()); |
| | | downGlassTask.setFlowCardId(glassInfo.getFlowCardId()); |
| | | downGlassTask.setLayer(glassInfo.getLayer()); |
| | | downGlassTask.setTaskStauts(0); |
| | | downGlassTask.setTaskStatus(0); |
| | | downGlassTask.setCreateTime(new Date()); |
| | | downGlassTaskService.save(downGlassTask); |
| | | //向plc发送命令 |
| | |
| | | startCell, endCell, taskType); |
| | | } |
| | | |
| | | private Boolean sendMessageToPlc(int width, int height, int thickness, int startCell, int endCell, int taskType) { |
| | | private Boolean sendMessageToPlc(int width, int height, int thickness, int startCell, int endCell, |
| | | int taskType) { |
| | | S7control s7control = S7object.getinstance().plccontrol; |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), width); |
| | |
| | | {
|
| | | "codeId": "requestID",
|
| | | "addressIndex": "2",
|
| | | "addressLenght": "30"
|
| | | "addressLenght": "20"
|
| | | },
|
| | | {
|
| | | "codeId": "currentCell",
|
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://192.168.30.101:1433;databasename=hangzhoumes |
| | | url: jdbc:sqlserver://192.168.10.2:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: cz |
| | | application: |
| | | name: unLoadGlass |
| | | |
| | |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | mes: |
| | | maxWidth: 1000 #下片的最大宽度 |
| | | maxHeight: 1000 #下片的最大高度 |
| | | maxWidth: 2500 #下片的最大宽度 |
| | | maxHeight: 2000 #下片的最大高度 |
| | | minWidth: 400 #下片的最大宽度 |
| | | minHeight: 400 #下片的最大高度 |
| | | throughWidth: 3000 |
| | | throughHeight: 3000 |
| | | throughHeight: 2500 |
| | | threshold: 5 #下片的最大阈值 |
| | |
| | | <resultMap id="downGlassInfo" type="com.mes.downworkstation.entity.dto.DownGlassInfoDTO"> |
| | | <result column="flow_card_id" property="flowCardId"/> |
| | | <result column="layer" property="layer"/> |
| | | <result column="count" property="count"/> |
| | | <result column="racks_number" property="racksNumber"/> |
| | | <collection property="glassInfoList" ofType="com.mes.glassinfo.entity.GlassInfo"> |
| | | <id column="id" property="id"/> |
| | | <result column="flow_card_id" property="flowCardId"/> |
| | |
| | | </select> |
| | | |
| | | <select id="queryWorkStationIsIn" resultMap="downGlassInfo"> |
| | | SELECT T.* |
| | | SELECT |
| | | T.FLOW_CARD_ID, |
| | | T.LAYER, |
| | | T.RACKS_NUMBER |
| | | <if test="!isDownload"> |
| | | ,T1.* |
| | | </if> |
| | | FROM ( |
| | | SELECT T.FLOW_CARD_ID, |
| | | T.LAYER, |
| | | COUNT(T.LAYER) AS COUNT |
| | | FROM |
| | | DOWN_WORKSTATION T |
| | | LEFT JOIN DOWN_GLASS_INFO T1 ON T.FLOW_CARD_ID = T1.FLOW_CARD_ID |
| | | GROUP BY T.FLOW_CARD_ID,LAYER |
| | | HAVING T.FLOW_CARD_ID IS NOT NULL |
| | | ) T |
| | | INNER JOIN GLASS_INFO T1 ON T.FLOW_CARD_ID = T1.FLOW_CARD_ID |
| | | AND T.LAYER = T1.LAYER |
| | | LEFT JOIN DOWN_GLASS_INFO T2 ON T1.GLASS_ID = T2.GLASS_ID |
| | | <where> |
| | | <if test="isDownload"> |
| | | <if test="!isDownload"> |
| | | AND T2.GLASS_ID IS NULL |
| | | </if> |
| | | <if test="!isDownload"> |
| | | <if test="isDownload"> |
| | | AND T2.GLASS_ID IS not NULL |
| | | </if> |
| | | </where> |
| | | order by t.count desc |
| | | ORDER BY |
| | | T.RACKS_NUMBER DESC, |
| | | T1.TEMPERING_LAYOUT_ID, |
| | | T1.TEMPERING_FEED_SEQUENCE DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.impl.DownWorkstationServiceImpl; |
| | | import com.mes.glassinfo.service.impl.GlassInfoServiceImpl; |
| | | import com.mes.job.DownLoadCacheGlassTask; |
| | | import com.mes.utils.Result; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | @Test |
| | | public void testupdateFlowCardIdAndCount() { |
| | | log.info("绑定流程卡号和数量"); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("1", 1, 1); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("NG24060401A020", 1, 2); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testplc() { |
| | | log.info("测试"); |
| | | glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01"); |
| | | glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01",1); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | DownStorageCage downStorageCage= new DownStorageCage(); |
| | | downStorageCage.setEnableState("0"); |
| | | downStorageCage.setEnableState(0); |
| | | downStorageCage.setId(1); |
| | | downStorageCageService.updateDownStorageCage(downStorageCage); |
| | | |
| | | }*/ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <module>LoadGlassModule</module> |
| | | <module>TemperingGlassModule</module> |
| | | <module>UnLoadGlassModule</module> |
| | | <module>GlassStorageModule</module> |
| | | </modules> |
| | | |
| | | <properties> |