Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/edgstoragecage/entity/EdgStorageCageDetails.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageController.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/BigStorageCageDetails.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/mapper/BigStorageCageDetailsMapper.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageService.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageServiceImpl.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/entity/BigStorageCageOutTask.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/BigStorageCageOutTaskService.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstoragetask/service/impl/BigStorageCageOutTaskServiceImpl.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/component/PlcStorageCage.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/edgstoragetask/entity/TaskCache.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
# hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/GlassInfo.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassInfo.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/entity/DownGlassTask.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/entity/DownStorageCageDetails.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/entity/DownWorkstationTask.java
20个文件已修改
16个文件已添加
289个文件已删除
| | |
| | | // export default { |
| | | // serverUrl: "localhost:8083/api/loadGlass", |
| | | // serverUrl2: "localhost:8085" |
| | | // //serverUrl:"res.abeim.cn" |
| | | // } |
| | | export default { |
| | | serverUrl: "localhost:8085", |
| | | serverUrl2: "localhost:8085" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | | serverUrl: "localhost:88/api", |
| | | serverUrl2: "localhost:8085" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | |
| | | //提取模块列表 |
| | | let menuList = $ref([]) |
| | | request.get('/menu/sysMenu/list').then((res) => { |
| | | request.get('/loadGlass/menu/sysMenu/list').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = deepClone(res.data) |
| | | } else { |
| | |
| | | const userStore=useUserInfoStore() |
| | | const request = axios.create({ |
| | | baseURL: `http://${config.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! |
| | | timeout: 5000 |
| | | timeout: 30000 |
| | | }) |
| | | |
| | | // |
| | |
| | | <div style="margin-left: 400px; font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 150px; font-size: 20px;">版图编号:1</div> |
| | | </div> |
| | | <el-scrollbar height="650px"> |
| | | <div id="home-card"> |
| | | <div id="home-item" v-for="n in 20" :key="n"> |
| | | <svg width="100%" height="690" xmlns="http://www.w3.org/2000/svg" style="margin-top: -40px;"> |
| | | <defs> |
| | | <marker id="arrow" markerUnits="strokeWidth" markerWidth="12" markerHeight="12" viewBox="0 0 12 12" refX="6" |
| | |
| | | /> |
| | | <line x1='510' y1='309' x2='260' y2='310' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='850' y1='309' x2='1100' y2='310' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='510' y1='409' x2='260' y2='410' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <line x1='1200' y1='650' x2='1200' y2='470' stroke='#911005' stroke-width='2' marker-end='url(#arrow)'> |
| | | </line> |
| | | <text x="370" y="240" dominant-baseline="middle" text-anchor="middle">NG2024030501A-01</text> |
| | | <text x="370" y="260" dominant-baseline="middle" text-anchor="middle">500*300</text> |
| | | |
| | | <text x="970" y="240" dominant-baseline="middle" text-anchor="middle">NG2024030501A-02</text> |
| | | <text x="970" y="260" dominant-baseline="middle" text-anchor="middle">500*300</text> |
| | | |
| | | <text x="600" y="500" dominant-baseline="middle" text-anchor="middle">NG2024030501A-03</text> |
| | | <text x="600" y="520" dominant-baseline="middle" text-anchor="middle">800*450</text> |
| | | |
| | | |
| | | <text x="1280" y="520" dominant-baseline="middle" text-anchor="middle">NG2024030501A-04</text> |
| | | <text x="1280" y="540" dominant-baseline="middle" text-anchor="middle">400*300</text> |
| | | <g v-for="(item, itemIndex) in rack.items" :key="itemIndex"> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, item, itemIndex)" |
| | |
| | | </g> |
| | | </g> |
| | | </svg> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </template> |
| | | |
| | |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG12345678' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 685, y: 126, width: 600, height: 240, fillColor: '#93d2f3', |
| | | items: [ |
| | | { position: 'bottom-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 70, y: 380, width: 1100, height: 260, fillColor: '#81b337', |
| | | items: [ |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' } |
| | | ] |
| | | }, |
| | | { |
| | | x: 1185, y: 380, width: 200, height: 300,fillColor: '#81b337', |
| | | items: [ |
| | | { position: 'bottom-right', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-right',width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456' }, |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' }, |
| | | ] |
| | | } |
| | | |
| | | // Add more racks and items here as needed |
| | | ], |
| | |
| | | color: black; |
| | | border: 1px solid black; |
| | | } |
| | | |
| | | #home-card { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | padding: 10px 0px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | #home-item { |
| | | border-style: solid; |
| | | border-width: 1px; |
| | | border-color: #E4E4E4; |
| | | width: calc(34% - 20px); |
| | | padding: 20px 0px 20px 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | /* align-items: center; */ |
| | | background: #fff; |
| | | #home-img { |
| | | display: inline-block; |
| | | width: 160px; |
| | | height: 60px; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | #home-right { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | margin-left: 10px; |
| | | #home-num { |
| | | font-size: 40px; |
| | | margin: 5px 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | if (valid) { |
| | | loginLoadings.value = true |
| | | request |
| | | .post('/userinfo/login', userForm) |
| | | .post('/loadGlass/userinfo/login', userForm) |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | | store.$patch({user: res.data}) |
| | |
| | | |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | const tableData = ref([]) |
| | | // const tableData = ref([]) |
| | | // let app = ref({ |
| | | // data(){ |
| | | // return { |
| | | // enableState:'', |
| | | // } |
| | | // }, |
| | | // }) |
| | | // const tableData = ref({ |
| | | // workstationId:'', |
| | | // patternWidth :'', |
| | | // patternHeigth :'', |
| | | // filmsId :'', |
| | | // number :'', |
| | | // patternThickness :'', |
| | | // enableState:'', |
| | | // }) |
| | | // request.post(`/LoadGlass/list`).then((res) => { |
| | | // if (res.code == 200) { |
| | | // console.log(res.data); |
| | |
| | | // router.push("/login") |
| | | // } |
| | | // }); |
| | | onMounted(() => { |
| | | request |
| | | .get("/LoadGlass/list") |
| | | |
| | | // request |
| | | // const requestData = { |
| | | // projectNo:"P24030805", |
| | | // state:0 |
| | | // }; |
| | | |
| | | |
| | | const requestData = { |
| | | // projectNo:"P24030805", |
| | | state:100 |
| | | }; |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | const response = await request.get("/loadGlass/LoadGlass/list"); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | const user = ref(''); |
| | | const remoteMethod = () => { |
| | | request.post("/loadGlass/optimizeProject/listByState", requestData) |
| | | .then((res: any) => { |
| | | // if (res.code == 200) { |
| | | tableData.value = res.data; |
| | | // let self = this |
| | | // } |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | onMounted(() => { |
| | | request |
| | | .post("/LoadGlass/selectPriority") |
| | | .then((res: any) => { |
| | | tableData.value = res.data; |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | } |
| | | |
| | | |
| | | onMounted(fetchTableData); |
| | | |
| | | |
| | | // onMounted(() => { |
| | | // request |
| | | // .post("/loadGlass/LoadGlass/selectPriority") |
| | | // .then((res: any) => { |
| | | // tableData.value = res.data; |
| | | // }) |
| | | // .catch((err: any) => {}); |
| | | // }); |
| | | interface User { |
| | | id: string |
| | | name: string |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option4', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option5', |
| | | label: 'P202561456', |
| | | }, |
| | | ] |
| | | // const tableData: User[] = [ |
| | | |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // }, |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '105', |
| | | // wide: '183', |
| | | // thick: '191', |
| | | // } |
| | | // ] |
| | | const tableDataa = [ |
| | | { |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | station: '1' |
| | | }, |
| | | { |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | station: '1' |
| | | } |
| | | ] |
| | | } |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" >停止任务</el-button> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto"> |
| | | <!-- <el-table height="100%" ref="table" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="工程号" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="原片宽" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="原片长" min-width="120" /> |
| | | <el-table-column prop="thick" align="center" label="膜系" min-width="120" /> |
| | | <el-table-column prop="thick" align="center" label="数量" min-width="120" /> |
| | | <el-table-column |
| | | align="center" |
| | | label="状态" |
| | | min-width="80" |
| | | > |
| | | <el-tag type="success">就绪</el-tag> |
| | | </el-table-column> |
| | | </el-table> --> |
| | | <el-table |
| | | height="100%" |
| | | ref="table" |
| | |
| | | :data="tableData" |
| | | :span-method="objectSpanMethod" |
| | | > |
| | | <el-table-column prop="workstationId" label="工程号" width="200" align="center"/> |
| | | <el-table-column prop="workstationId" label="工程号" width="200" align="center"/> |
| | | <el-table-column prop="patternWidth" label="原片宽" align="center"/> |
| | | <el-table-column prop="patternHeigth" label="原片长" align="center"/> |
| | | <el-table-column prop="filmsId" label="膜系" align="center"/> |
| | |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select |
| | | v-model="form.workstationId" |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 300px" |
| | | filterable |
| | | :remote-method="remoteMethod" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in remoteMethod" |
| | | :key="item.projectNo" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select clearable filterable size="mini" v-model="form.fvId" |
| | | style="margin-right: 50px;width: 200px" placeholder="请选择果蔬种类"> |
| | | <el-option v-for="item in billall" |
| | | :key="item.id" |
| | | :label="item.fruitVagetableCate" |
| | | :value="item.id"></el-option> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | |
| | | |
| | | const currentPage4 = ref(4) |
| | | const pageSize4 = ref(100) |
| | | // const tableData = [ |
| | | // { |
| | | // id: '1', |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // type: '1234567', |
| | | // typea: '1', |
| | | // }, |
| | | // ] |
| | | // const tableDatab = [ |
| | | // { |
| | | // idb: '2', |
| | | // longb: '105', |
| | | // wideb: '183', |
| | | // typeb: '123456', |
| | | // } |
| | | // ] |
| | | const tableDataa = [ |
| | | const tableData = [ |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | }, |
| | | { |
| | | ida: '3', |
| | | typea: '1991', |
| | | id: '1', |
| | | a: '1', |
| | | b: '1', |
| | | c: '123456789', |
| | | d: '1568251', |
| | | e: '1', |
| | | f: '100', |
| | | g: '', |
| | | }, |
| | | ] |
| | | |
| | | const tableDatab = [ |
| | | { |
| | | id: '2', |
| | | a: '2', |
| | | b: '2', |
| | | c: '123456789', |
| | | d: '1568251', |
| | | e: '1', |
| | | f: '100', |
| | | g: '', |
| | | } |
| | | ] |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '确定要急停吗?', |
| | |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="出片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="钢化版图号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="结束任务" min-width="120" /> |
| | | <el-table-column prop="a" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="b" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="c" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="d" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="e" align="center" label="钢化版图号" min-width="157" /> |
| | | <el-table-column prop="f" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="g" align="center" label="结束任务" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="idb" align="center" label="进片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="longb" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="wideb" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="钢化版图号" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="typeb" align="center" label="结束任务" min-width="120" /> |
| | | <el-table-column prop="id" align="center" label="进片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="a" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="b" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="c" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="d" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="e" align="center" label="钢化版图号" min-width="157" /> |
| | | <el-table-column prop="f" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="g" align="center" label="结束任务" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <!-- <div id="awatch"> |
| | | <img src="../../assets/lpl.jpg" alt="" style="width: 10%;height: 10%;margin-left: 160px;"> |
| | | </div> --> |
| | | |
| | | |
| | | <div id="awatch"> |
| | | <img src="../../assets/xmjc.png" alt="" style="width: 70%;height: 100%;margin-left: 160px;"> |
| | | <img src="../../assets/cp.png" alt="" style="width: 1305px;height: 400px;margin-left: 240px;margin-top: 50px;"> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisible" top="12vh" width="85%" title="请确认玻璃信息" > |
| | |
| | | ::-webkit-scrollbar { |
| | | width: 0 !important;height: 0; |
| | | } |
| | | .img-list{ |
| | | |
| | | position:relative; |
| | | } |
| | | .data-img{ |
| | | @apply float-none ; |
| | | |
| | | width:100%; |
| | | height:16rem; |
| | | background: rgba(0, 0, 0, 0); |
| | | opacity: 1; |
| | | border-radius: 0.5rem 0.5rem 0px 0px; |
| | | |
| | | } |
| | | .check-img{ |
| | | position: absolute; |
| | | width: 3.3125rem; |
| | | height: 2.9375rem; |
| | | top:20rem; |
| | | right: 52rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | .check-imga{ |
| | | position: absolute; |
| | | width: 3.3125rem; |
| | | height: 2.9375rem; |
| | | top:15rem; |
| | | right: 37rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | |
| | | </style> |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive, onMounted} from "vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import unloadrequest from "@/utils/unloadrequest"; |
| | | const dialogFormVisiblea = ref(false) |
| | | // import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | |
| | | |
| | | |
| | | const dialogFormVisiblea2 = ref(false) |
| | | |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | |
| | | let socket; |
| | | |
| | | |
| | | const initWebSocket = (token) =>{ //初始化we |
| | | |
| | | let viewname = "unloadglass"; |
| | | |
| | | if (typeof WebSocket === "undefined") { |
| | | console.log("您的浏览器不支持WebSocket"); |
| | | } else { |
| | | let socketUrl = "ws://" + "localhost"+":88" + "/api/unLoadGlass/api/talk/" + viewname; |
| | | if (socket != null) { |
| | | socket.close(); |
| | | socket = null; |
| | | } |
| | | |
| | | // 开启一个websocket服务 |
| | | socket = new WebSocket(socketUrl); |
| | | |
| | | // 打开事件 |
| | | socket.onopen = function () { |
| | | console.log("websocket已打开"); |
| | | }; |
| | | |
| | | |
| | | |
| | | socket.onmessage = (msg) => { |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | |
| | | |
| | | |
| | | let obj = JSON.parse(msg.data); |
| | | |
| | | |
| | | console.log('收到消息:', obj.data); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 数据 |
| | | const loading = ref(false); |
| | | |
| | | |
| | | // 弹框显示控制 |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | |
| | | // 表单数据 |
| | | const workstationId = ref(''); |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref([]); |
| | | |
| | | |
| | | // 方法 |
| | | const handleSelectionChange = () => { |
| | | // 处理表格行选择事件 |
| | | }; |
| | | |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | // 发起接口请求获取流程卡号 |
| | | fetchFlowCardId(); |
| | | |
| | | |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | |
| | | |
| | | |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getflowCardId'); |
| | | console.log(response) |
| | | if (response.code === 200) { |
| | | flowCardOptions.value = response.data.map(item => ({ flowcard_id: item.flowcard_id })); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | }; |
| | | //确认 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | }); |
| | | |
| | | console.log(response) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | console.log('绑定成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | const handleBindRack2 = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | |
| | | |
| | | |
| | | dialogFormVisiblea2.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | //清除内容 |
| | | const handleclear = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/clear', { |
| | | workstationId: workstationId.value, |
| | | }); |
| | | |
| | | console.log(response); |
| | | |
| | | if (response.code === 200) { |
| | | // 清除成功的逻辑 |
| | | console.log('清除成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } else if (response.code === 400) { |
| | | // 清除失败的逻辑 |
| | | console.log('清除失败'); |
| | | console.log(response.message); // 打印服务器返回的错误信息 |
| | | ElMessage.error(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | } catch (error) { |
| | | // console.log(error); |
| | | ElMessage.error("清除失败"); |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getone'); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | initWebSocket(); |
| | | onMounted(fetchTableData); |
| | | setInterval(fetchTableData, 2000) |
| | | |
| | | const tableData = [ |
| | | { |
| | | id: '1', |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | state: '未启用', |
| | | }, |
| | | { |
| | | id: '2', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '3', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '4', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | { |
| | | id: '5', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | state: '未启用' |
| | | }, |
| | | ] |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | |
| | | } |
| | | } |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否清空该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | } |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | ], |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-table height="100%" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="workstationId" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="workstationId" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="flowCardId" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="totalquantity" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" label="状态" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" label="设备号" min-width="120" /> |
| | | <el-table-column prop="enableState" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column prop="id" align="center" label="下片位" min-width="80" /> |
| | | <el-table-column prop="long" align="center" label="架号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="总数量" min-width="120" /> |
| | | <el-table-column prop="wide" align="center" label="已落架数量" min-width="120" /> |
| | | <el-table-column prop="state" align="center" label="启用状态" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用' " @click="handleBindRack(scope.row)">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">清空</el-button> |
| | | </template> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain v-show="state !== '已启用' " @click="dialogFormVisiblea = true">绑定架子</el-button> |
| | | <el-button size="mini" type="text" plain @click="dialogForm">清空</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <!-- <div id="main-body"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div> --> |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="30%" title="绑定架子" > |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input v-model="workstationId" autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-select v-model="flowCardId" placeholder="请选择流程卡号"> |
| | | <el-option v-for="item in flowCardOptions" :key="item.flowcard_id" :label="item.flowcard_id" :value="item.flowcard_id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-form-item label="架号:" :required="true" style="width: 18vw"> |
| | | <el-input autocomplete="off"/> |
| | | </el-form-item> |
| | | <el-form-item label="流程卡号:" :required="true" style="width: 18vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | <el-button type="primary" @click="dialogFormVisiblea = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea2" top="21vh" width="30%" title="清除架子玻璃" > |
| | | |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleclear"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea2 = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | | flowCardId: '183.6', |
| | | totalquantity: '1991', |
| | | racksnumber:"1", |
| | | work_state: '待识别', --> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div></div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | height: 450px; |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 300px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
| | | margin-left: 100px; |
| | | margin-left: 450px; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <artifactId>servicebase</artifactId> |
| | | |
| | | <!-- <dependencies>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join</artifactId>--> |
| | | <!-- <version>1.1.6</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- </dependencies>--> |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-project") |
| | | @RequestMapping("/optimizeProject") |
| | | @Slf4j |
| | | public class OptimizeProjectController { |
| | | @Autowired |
| | | //获取待选择的工程号 |
| | | private OptimizeProjectService optimizeProjectService; |
| | | |
| | | @ApiOperation("显示工程选择信息") |
| | | @PostMapping("/listByState") //显示工程选择信息 |
| | | public Result<List<OptimizeProject>> listByState(@RequestBody OptimizeRequest optimizeRequest) { |
| | | log.info("将请求参数封装在请求类里面"); |
| | | List<OptimizeProject> glass = optimizeProjectService.listByState(optimizeRequest); |
| | | log.info("显示工程选择信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @ApiOperation("保存工程信息") |
| | | @PostMapping("/saveProject") //显示工程选择信息 |
| | | public Result<List<OptimizeProject>> saveProject(@RequestBody OptimizeRequest optimizeRequest) { |
| | | log.info("获取选择好的工程id进行查询数据后保存"); |
| | | List<OptimizeProject> glass = optimizeProjectService.saveProject(optimizeRequest); |
| | | log.info("显示工程选择信息后进行保存:{}", glass); |
| | | //void insetProject(glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.entity.request; |
| | | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author wu |
| | | */ |
| | | @Data |
| | | public class OptimizeRequest { |
| | | @ApiParam("") |
| | | private String projectNo; |
| | | |
| | | @ApiParam("") |
| | | private Integer state; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | @DS("pp") |
| | | public interface OptimizeProjectMapper extends BaseMapper<OptimizeProject> { |
| | | |
| | | List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface OptimizeProjectService extends IService<OptimizeProject> { |
| | | |
| | | /** |
| | | * 查询可领取的任务工程信息 |
| | | * @return |
| | | */ |
| | | List<OptimizeProject> listByState(OptimizeRequest optimizeRequest); |
| | | /** |
| | | * 查询保存到原片使用详情表的数据 |
| | | * @return |
| | | */ |
| | | List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest); |
| | | /** |
| | | * 将工程信息保存到原片使用详情表 |
| | | * @return |
| | | */ |
| | | void insetProject(OptimizeProject glass); |
| | | } |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | @Slf4j |
| | | public class OptimizeProjectServiceImpl extends ServiceImpl<OptimizeProjectMapper, OptimizeProject> implements OptimizeProjectService { |
| | | |
| | | |
| | | @Override |
| | | public List<OptimizeProject> listByState(OptimizeRequest optimizeRequest) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | LambdaQueryWrapper<OptimizeProject> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(OptimizeProject::getState,optimizeRequest.getState()) |
| | | .like(StringUtils.isNotBlank(optimizeRequest.getProjectNo()),OptimizeProject::getProjectNo,optimizeRequest.getProjectNo()) |
| | | //.groupBy(OptimizeProject::getProjectNo) |
| | | ; |
| | | log.info("返回工程信息"); |
| | | return this.list(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void insetProject(OptimizeProject glass) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | |
| | | log.info("返回工程信息"); |
| | | return this.baseMapper.saveProject(optimizeRequest); |
| | | } |
| | | |
| | | } |
| | |
| | | // 2、全局配置 |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | gc.setOutputDir("D:\\workspace\\hangzhoumesParent1\\"); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent1\\"); |
| | | |
| | | gc.setServiceName("%sService"); //去掉Service接口的首字母I |
| | | gc.setAuthor("zhoush"); |
| | |
| | | // 5、策略配置 |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | |
| | | // strategy.setInclude("activity_info", "activity_rule", "activity_sku", "coupon_info", "coupon_range", |
| | | // "coupon_use"); |
| | | strategy.setInclude("up_patten_usage"); |
| | | |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 |
| | | |
New file |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | |
| | | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/up-patten-usage") |
| | | @Slf4j |
| | | public class UpPattenUsageController { |
| | | |
| | | @Autowired |
| | | private UpPattenUsageService upPattenUsageService; |
| | | @ApiOperation("显示正在出片的工程信息") |
| | | @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpPattenUsage>> prioritylist() { |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class UpPattenUsage implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 原片使用情况表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String engineeringId; |
| | | |
| | | /** |
| | | * 膜系id |
| | | */ |
| | | private Integer filmsId; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 原片版图片序 |
| | | */ |
| | | private Integer layoutSequence; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.uppattenusage.mapper; |
| | | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | public interface UpPattenUsageMapper extends BaseMapper<UpPattenUsage> { |
| | | |
| | | } |
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.uppattenusage.mapper.UpPattenUsageMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.uppattenusage.service; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | public interface UpPattenUsageService extends IService<UpPattenUsage> { |
| | | List<UpPattenUsage> prioritylist(int state); |
| | | } |
New file |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UpPattenUsageServiceImpl extends ServiceImpl<UpPattenUsageMapper, UpPattenUsage> implements UpPattenUsageService { |
| | | @Override |
| | | public List<UpPattenUsage> prioritylist(int state) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(UpPattenUsage::getState,state); |
| | | log.info("返回工程信息"); |
| | | return this.list(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
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.pp.mapper.OptimizeProjectMapper"> |
| | | |
| | | <resultMap id="sequenceMap" type="com.mes.uppattenusage.entity.UpPattenUsage"> |
| | | <result property="engineeringId" column="project_no"/> |
| | | <result property="filmsId" column="glass_type"/> |
| | | <result property="width" column="width"/> |
| | | <result property="height" column="height"/> |
| | | <result property="thickness" column="glass_thickness"/> |
| | | <result property="layoutSequence" column="heat_layout_sort"/> |
| | | <result property="state" column="state"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="saveProject" parameterType="com.mes.pp.entity.request.OptimizeRequest" resultMap="sequenceMap"> |
| | | select a.project_no, 1 as glass_type, a.width, a.height, REGEXP_REPLACE(b.glass_thickness, '\\D', '')as glass_thickness, a.heat_layout_sort, 0 as state |
| | | from optimize_detail a |
| | | left join optimize_project b on a.project_no = b.project_no |
| | | where a.project_no = #{projectNo} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | // Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | // false, true ,true }; |
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | List<Boolean> getplcvlues = S7object.getinstance().plccontrol.ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | plcBitObject.setPlcBitList(getplcvlues); |
| | | // List<Boolean> getplcvlues = S7object.getinstance().plccontrol.ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | // plcBitObject.setPlcBitList(getplcvlues); |
| | | } |
| | | |
| | | |
| | | public static void readAndUpdateWordValues(PlcParameterObject plcParameterObject) { |
| | | |
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02}; |
| | | byte[] getplcvlues = S7object.getinstance().plccontrol.ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | plcParameterObject.setPlcParameterList(getplcvlues); |
| | | // byte[] getplcvlues = S7object.getinstance().plccontrol.ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | // plcParameterObject.setPlcParameterList(getplcvlues); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.PlcParameterObject; |
| | | import com.mes.common.S7object; |
| | | //import com.mes.common.S7object; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.taskcache.mapper.HangzhouMesMapper; |
| | |
| | | //2.回复 1进片 |
| | | EdgStorageCageDetails item=list.get(0); |
| | | hangzhouMesMapper.insertCacheTask(GlassInfo.getId()+"","0",item.getSlot()+"","1"); |
| | | S7object.getinstance().plccontrol.WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | // S7object.getinstance().plccontrol.WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | return true; |
| | | } |
| | | |
New file |
| | |
| | | { |
| | | "plcAddressBegin":"DB14.0", |
| | | "plcAddressLenght":"208", |
| | | "dataType":"word", |
| | | "parameteInfor":[ |
| | | { |
| | | "codeId": "PLCToMES", |
| | | "addressIndex":"0", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus1", |
| | | "addressIndex":"2", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus2", |
| | | "addressIndex":"4", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"m/min" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus3", |
| | | "addressIndex":"6", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus4", |
| | | "addressIndex":"8", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "IDStatus5", |
| | | "addressIndex":"10", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "IDStatus6", |
| | | "addressIndex":"12", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "StautsID1", |
| | | "addressIndex":"14", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID2", |
| | | "addressIndex":"16", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID3", |
| | | "addressIndex":"18", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID4", |
| | | "addressIndex":"20", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "StautsID5", |
| | | "addressIndex":"22", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "StautsID6", |
| | | "addressIndex":"24", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "GaToMES", |
| | | "addressIndex":"26", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "Height", |
| | | "addressIndex":"28", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "width", |
| | | "addressIndex":"30", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "ExportTOMES1", |
| | | "addressIndex":"32", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | , |
| | | { |
| | | "codeId": "ExportToMES2", |
| | | "addressIndex":"34", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } , |
| | | { |
| | | "codeId": "MESToPLC", |
| | | "addressIndex":"36", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } , |
| | | { |
| | | "codeId": "MESID1", |
| | | "addressIndex":"38", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } , |
| | | { |
| | | "codeId": "MESID2", |
| | | "addressIndex":"54", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID3", |
| | | "addressIndex":"70", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID4", |
| | | "addressIndex":"86", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID5", |
| | | "addressIndex":"102", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESID6", |
| | | "addressIndex":"118", |
| | | "addressLenght":"14", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | }, |
| | | { |
| | | "codeId": "MESToPLCStart1", |
| | | "addressIndex":"134", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStart2", |
| | | "addressIndex":"136", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStart3", |
| | | "addressIndex":"138", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ,{ |
| | | "codeId": "MESToPLCStart4", |
| | | "addressIndex":"140", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ,{ |
| | | "codeId": "MESToPLCStart5", |
| | | "addressIndex":"142", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ,{ |
| | | "codeId": "MESToPLCStart6", |
| | | "addressIndex":"144", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget1", |
| | | "addressIndex":"146", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget2", |
| | | "addressIndex":"148", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget3", |
| | | "addressIndex":"150", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget4", |
| | | "addressIndex":"152", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget5", |
| | | "addressIndex":"154", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCTarget6", |
| | | "addressIndex":"156", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus1", |
| | | "addressIndex":"158", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus2", |
| | | "addressIndex":"160", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus3", |
| | | "addressIndex":"162", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus4", |
| | | "addressIndex":"164", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus5", |
| | | "addressIndex":"166", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToPLCStatus6", |
| | | "addressIndex":"168", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "MESToGaStatus", |
| | | "addressIndex":"170", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A01Err", |
| | | "addressIndex":"172", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A02Err", |
| | | "addressIndex":"174", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "B01Err", |
| | | "addressIndex":"176", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C01Err", |
| | | "addressIndex":"178", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C02Err", |
| | | "addressIndex":"180", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "ErrSpace1", |
| | | "addressIndex":"182", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "ErrSpace2", |
| | | "addressIndex":"184", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "ErrSpace3", |
| | | "addressIndex":"186", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "B01Position", |
| | | "addressIndex":"188", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C01Position", |
| | | "addressIndex":"190", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C02Position", |
| | | "addressIndex":"192", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "DeviceState", |
| | | "addressIndex":"194", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "AllFVRun", |
| | | "addressIndex":"196", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A01State", |
| | | "addressIndex":"198", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "A02State", |
| | | "addressIndex":"200", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "B01State", |
| | | "addressIndex":"202", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C01State", |
| | | "addressIndex":"204", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | },{ |
| | | "codeId": "C02State", |
| | | "addressIndex":"206", |
| | | "addressLenght":"2", |
| | | "ratio":"1", |
| | | "unit":"mm/S" |
| | | } |
| | | ] |
| | | } |
| | |
| | | package com.mes.workstation.controller; |
| | | |
| | | |
| | | import com.mes.workstation.entity.GlassInfo; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import com.mes.utils.Result; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class UpWorkstationController { |
| | | @Autowired |
| | | private UpWorkstationService upWorkstationService; |
| | | |
| | | private GlassInfo glassInfo; |
| | | @ApiOperation("显示工位上的玻璃信息") |
| | | @GetMapping("/list") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpWorkstation>> list() { |
| | |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @PostMapping("/updateGlassMessage") //修改一条工位信息,接收实例类字段为宽高厚膜系数量工位id |
| | | //新增工位信息修改一条工位信息,接收实例类字段为宽高厚膜系数量工位id |
| | | //删除工位信息也用这个,除了工位id玻璃信息传null |
| | | @ApiOperation("修改工位表增加玻璃信息或者删除玻璃信息") |
| | | @PostMapping("/updateGlassMessage") |
| | | @ResponseBody |
| | | public void updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | upWorkstationService.updateGlassMessage(upwork); |
| | | } |
| | | |
| | | //todo: 和updateGlassMessage类似 |
| | | // @PostMapping("/deleteGlass") //修改一条工位的玻璃信息,传输工位id将玻璃信息相关字段更改为null |
| | | // @ResponseBody |
| | | // public void selectCutTerritory(int upworkid) { |
| | | // loadGlassService.deleteGlass(upworkid); |
| | | // } |
| | | |
| | | @ApiOperation("开始上片任务") |
| | | @PostMapping("/selectPriority") //开始上片任务 |
| | | @ResponseBody |
| | | public void selectPriority() { |
| | |
| | | public interface UpWorkstationMapper extends BaseMapper<UpWorkstation> { |
| | | |
| | | List<UpWorkSequence> selectPriority(@Param("id") int id); |
| | | |
| | | } |
| | |
| | | package com.mes.workstation.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() ; |
| | | |
| | | //查询正在进行的工程 |
| | | |
| | | |
| | | /** |
| | | * 增加人工输入的工位玻璃信息 |
| | |
| | | package com.mes.workstation.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.S7object; |
| | | //import com.mes.common.S7object; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.mapper.UpWorkstationMapper; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | |
| | | public static final String DB_100_10 = "DB_100_10"; |
| | |
| | | return "1".equals(loadstart); |
| | | |
| | | } |
| | | //显示正在进行任务的工程信息 |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() { |
| | | //todo:判断是否可以吸片进行任务 |
| | |
| | | UpWorkSequence loadid1 = this.baseMapper.selectPriority(1).get(0); |
| | | UpWorkSequence loadid2 = this.baseMapper.selectPriority(2).get(0); |
| | | //判断一二号工位哪边的顺序更先 |
| | | if(loadid1.getSequence()>loadid2.getSequence()) { |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2); |
| | | }else if(loadid1.getSequence()==loadid2.getSequence()){ |
| | | //当两个工位上的玻璃数相同时,判断哪个工位上的玻璃数更少,优先清空一个架子 |
| | | int glassnum1=loadid1.getNumber();//Integer.parseInt(plcmes.getPlcParameter("玻璃数").getValue()); |
| | | int glassnum2=loadid2.getNumber();//Integer.parseInt(plcmes.getPlcParameter("玻璃数").getValue()); |
| | | if(glassnum1>glassnum2){ |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2); |
| | | }else{ |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1); |
| | | } |
| | | }else{ |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1); |
| | | } |
| | | // if(loadid1.getSequence()>loadid2.getSequence()) { |
| | | // S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2); |
| | | // }else if(loadid1.getSequence()==loadid2.getSequence()){ |
| | | // //当两个工位上的玻璃数相同时,判断哪个工位上的玻璃数更少,优先清空一个架子 |
| | | // int glassnum1=loadid1.getNumber();//Integer.parseInt(plcmes.getPlcParameter("玻璃数").getValue()); |
| | | // int glassnum2=loadid2.getNumber();//Integer.parseInt(plcmes.getPlcParameter("玻璃数").getValue()); |
| | | // if(glassnum1>glassnum2){ |
| | | // S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2); |
| | | // }else{ |
| | | // S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1); |
| | | // } |
| | | // }else{ |
| | | // S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1); |
| | | // } |
| | | } |
| | | |
| | | /** |
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.workstation.mapper.UpWorkstationMapper"> |
| | | |
| | | <resultMap id="sequenceMap" type="com.mes.workstation.entity.UpWorkSequence"> |
| | | <id property="sequence" column="layout_sequence"/> |
| | | <result property="number" column="number"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectPriority" resultMap="sequenceMap"> |
| | | SELECT |
| | | b.layout_sequence,a."number" |
| | | FROM |
| | | up_workstation a |
| | | LEFT JOIN up_patten_usage b ON a.pattern_width = b.width |
| | | AND a.pattern_heigth = b.width |
| | | AND a.pattern_thickness = b.thickness |
| | | WHERE |
| | | a.workstation_id = #{id} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/27 16:37 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = LoadGlassModuleApplication.class) |
| | | public class LoadGlassModuleApplicationTest { |
| | | |
| | | @Resource |
| | | private OptimizeProjectMapper optimizeProjectMapper; |
| | | |
| | | @Test |
| | | public void test() { |
| | | // List<OptimizeProject> list = optimizeProjectMapper.saveProject("P24032204"); |
| | | // log.info("list:{}", list); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | log.info("完整路径:{}", Arrays.asList("123")); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.temperingglass.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class GlassInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 玻璃信息表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 流程卡 |
| | | */ |
| | | private String flowcardId; |
| | | |
| | | /** |
| | | * 流程卡玻璃类型 |
| | | */ |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private Integer filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | | */ |
| | | private Double edgWidth; |
| | | |
| | | /** |
| | | * 磨前高 |
| | | */ |
| | | private Double edgHeight; |
| | | |
| | | /** |
| | | * 是否配片 |
| | | */ |
| | | private Integer ismultiple; |
| | | |
| | | /** |
| | | * 配片最大宽 |
| | | */ |
| | | private Double maxWidth; |
| | | |
| | | /** |
| | | * 配片最大高 |
| | | */ |
| | | private Double maxHeight; |
| | | |
| | | /** |
| | | * 钢化是否接受横放 |
| | | */ |
| | | private Integer ishorizontal; |
| | | |
| | | /** |
| | | * 原片顺序 |
| | | */ |
| | | private Integer patternSequence; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | | */ |
| | | private Integer temperingLayoutId; |
| | | |
| | | /** |
| | | * 钢化版图片序 |
| | | */ |
| | | private Integer temperingFeedSequence; |
| | | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Integer xCoordinate; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Integer yCoordinate; |
| | | |
| | | /** |
| | | * 旋转角度(逆时针) |
| | | */ |
| | | private Integer angle; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private Long engineerId; |
| | | |
| | | /** |
| | | * 生产规则id |
| | | */ |
| | | private Integer ruleId; |
| | | |
| | | |
| | | } |