Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# UI-Project/src/views/Returns/returns.vue
# hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/CodeGet.java
# hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/impl/DownStorageCageDetailsServiceImpl.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/impl/DownStorageCageServiceImpl.java
数据库查询语句 SQL 改实体类
47个文件已修改
17个文件已添加
100个文件已删除
| | |
| | | export default { |
| | | serverUrl: "10.153.19.150:88/api", |
| | | //serverUrl: "localhost:88/api/", |
| | | serverUrl2: "10.153.19.150:8085" |
| | | serverUrl2: "10.153.19.150:88" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | /*----------- 可视化系统 ----------------*/ |
| | | { |
| | | path: 'Visualization', |
| | | name: 'screen', |
| | | component: () => import('../views/Visualization/screen.vue'), |
| | | children:[ |
| | | { |
| | | path: '/Visualization/screenone', |
| | | name: 'screenone', |
| | | component: () => import('../views/Visualization/screenone.vue') |
| | | }, |
| | | { |
| | | path: '/Visualization/screentwo', |
| | | name: 'screentwo', |
| | | component: () => import('../views/Visualization/screentwo.vue') |
| | | }, |
| | | { |
| | | path: '/Visualization/screenthree', |
| | | name: 'screenthree', |
| | | component: () => import('../views/Visualization/screenthree.vue') |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/Slicecage/slicecage' |
| | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | const response = await request.get("/unLoadGlass/unLoadGlass/downstorage"); |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | | // // 发送获取表格数据的请求,并等待响应 |
| | | // // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | // const response = await request.get("unLoadGlass/downStorage/selectStorageCage"); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | onMounted(fetchTableData); |
| | | // // 检查响应状态 |
| | | // if (response.code === 200) { |
| | | // // 更新表格数据 |
| | | // console.log('成功获取表格数据:', response.data); |
| | | // tableData.splice(0, tableData.length, ...response.data); |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | 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="sequence" align="center" label="位置" min-width="120" /> |
| | | <el-table-column prop="width" align="center" label="宽" min-width="120" /> |
| | | <el-table-column prop="height" align="center" label="长" min-width="120" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain @click="dialogForm">报缺</el-button> |
| | |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;"> |
| | | |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: -124px;margin-left: 480px;"></div> |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: -30px;margin-left: 850px;"></div> |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: 30px;margin-left: 695px;"></div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <el-card style="margin-left: 10px; margin-top: 10px; margin-right: 10px;" v-loading="loading"> |
| | | <div style="display: flex;margin-bottom: 30px;"> |
| | | <div style="display: flex;"> |
| | | <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="400" xmlns="http://www.w3.org/2000/svg" style="margin-top: -100px;margin-left: -80px;"> |
| | | <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" |
| | | refY="6" orient="auto"> |
| | | <path d="M2,2 L10,6 L2,10 L2,2" style="fill: #911005;" /> |
| | | </marker> |
| | | </defs> |
| | | <!-- <el-scrollbar height="630px"> |
| | | <div id="home-card"> |
| | | <div id="home-item" v-for="n in 20" :key="n"> |
| | | <div id="box" style="width: 100px;height: 165px;">100*65</div> |
| | | <div id="box" style="width: 107px;height: 150px;">107*60</div> |
| | | <div id="box" style="width: 107px;height: 155px;">109*60</div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> --> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | | <rect |
| | | :x="rack.x" |
| | |
| | | /> |
| | | <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 |
| | | ], |
| | |
| | | border-color: #E4E4E4; |
| | | width: calc(34% - 20px); |
| | | padding: 20px 0px 20px 20px; |
| | | margin-right: 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | /* align-items: center; */ |
| | | background: #fff; |
| | | width: 700px; |
| | | #home-img { |
| | | display: inline-block; |
| | | width: 160px; |
| | |
| | | <div v-if="dialogFormVisible" > |
| | | <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <div style="display: flex;margin-bottom: 20px;"> |
| | | <div style="margin-left: 400px;font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 450px;font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 150px;font-size: 20px;">版图编号:1</div> |
| | | </div> |
| | | <div> |
| | | <div id="boxa" style="width: 400px;height: 120px;margin-left: 260px;"> |
| | | <div id="boxa" style="width: 200px;height: 300px;margin-left: 70px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1500</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 400px;height: 120px;"> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1500</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <div id="boxa" style="width: 400px;height: 120px;margin-left: 260px;"> |
| | | <div id="boxa" style="width: 200px;height: 300px;margin-left: 70px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1500</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxb" style="width: 400px;height: 120px;"> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1500</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxb" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | import type { TableColumnCtx } from 'element-plus' |
| | | |
| | | |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | const dialogFormVisible = ref(false) |
| | | const blind = ref(false) |
| | | const blinda = ref(false) |
| | | const blindb = ref(false) |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | const flake = ref(false) |
| | | const flakea = ref(false) |
| | | // const value = ref('') |
| | | import request from "@/utils/request" |
| | | |
| | | |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | |
| | | let ruleForm = ref({ |
| | | // engineeringId: '', |
| | | workstationId: '', |
| | | patternHeigth: '', |
| | | patternWidth: '', |
| | | filmsId: '', |
| | | patternThickness: '', |
| | | number: '', |
| | | |
| | | }) |
| | | const tableDataa = ref([]) |
| | | |
| | | const requestData = { |
| | |
| | | // damageDetails: { |
| | | // state: '', |
| | | // }, |
| | | |
| | | |
| | | // }) |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | const response = await request.get("/loadGlass/up-patten-usage/prioritylist"); |
| | | |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | window.localStorage.setItem('engineeringId', response.data[0].engineeringId) |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableDataa.value = res.data |
| | | window.localStorage.setItem('patternWidth', res.data.patternWidth) |
| | | window.localStorage.setItem('workstationId', res.data.workstationId) |
| | | let workstationIda = window.localStorage.getItem('workstationId') |
| | | let patternWidth = window.localStorage.getItem('patternWidth') |
| | | if (patternWidth !== '' || workstationIda == '1') { |
| | | flake.value = true |
| | | } else if (patternWidth !== '' || workstationIda == '2') { |
| | | flakea.value = true |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | // router.push("/login") |
| | | } |
| | | }); |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | |
| | | |
| | | }) |
| | | const getBasicData = ref({ |
| | | id: '', |
| | |
| | | console.log(res.data); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | // router.push("/login") |
| | | } |
| | | }); |
| | | |
| | |
| | | let titleUploadData = ref({ |
| | | projectNo:'', |
| | | }) |
| | | // const billall = { |
| | | // data () { |
| | | // return { |
| | | // form: { |
| | | // projectNo: '', |
| | | // }, |
| | | // billall:[], |
| | | // } |
| | | // }, |
| | | // methods:{ |
| | | |
| | | // } |
| | | // } |
| | | |
| | | |
| | | onMounted(fetchTableData); |
| | | interface User { |
| | | id: string |
| | | name: string |
| | | amount1: string |
| | | amount2: string |
| | | amount3: number |
| | | } |
| | | |
| | | interface SpanMethodProps { |
| | | row: User |
| | | column: TableColumnCtx<User> |
| | | rowIndex: number |
| | | columnIndex: number |
| | | } |
| | | |
| | | const objectSpanMethod = ({ |
| | | row, |
| | | column, |
| | | rowIndex, |
| | | columnIndex, |
| | | }: SpanMethodProps) => { |
| | | if (columnIndex === 0) { |
| | | if (rowIndex % 2 === 0) { |
| | | return { |
| | | rowspan: 2, |
| | | colspan: 1, |
| | | } |
| | | // const engineeringId = ref(''); |
| | | const workstationId = ref(''); |
| | | const patternHeigth = ref(''); |
| | | const patternWidth = ref(''); |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | |
| | | // 添加 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { |
| | | workstationId: workstationId.value, |
| | | patternHeigth: patternHeigth.value, |
| | | patternWidth: patternWidth.value, |
| | | filmsId: filmsId.value, |
| | | patternThickness: patternThickness.value, |
| | | number: number.value |
| | | }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | add.value = false; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId == '1') { |
| | | flake.value = true |
| | | } else if (workstationId == '2'){ |
| | | flakea.value = true |
| | | } |
| | | } else { |
| | | return { |
| | | rowspan: 0, |
| | | colspan: 0, |
| | | } |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 删除 |
| | | const handleConfirma = async () => { |
| | | try { |
| | | const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { |
| | | workstationId: workstationId.value, |
| | | patternHeigth: 0, |
| | | patternWidth: 0, |
| | | filmsId: "", |
| | | patternThickness: 0, |
| | | number: 0 |
| | | }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId == '1') { |
| | | flake.value = false |
| | | } else if (workstationId == '2'){ |
| | | flakea.value = false |
| | | } |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 开始上片 |
| | | const handle = async () => { |
| | | try { |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | | console.log(engineeringId); |
| | | if (engineeringId !== '') { |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | engineeringId: engineeringId, |
| | | state: 1, |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | blind.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | message: '工程号不能为空!', |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | const getTableRow = (type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | // router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | state: true |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 暂停 |
| | | const handlea = async () => { |
| | | try { |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | | console.log(engineeringId); |
| | | if (engineeringId !== '') { |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | engineeringId: engineeringId, |
| | | state: 0, |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '工程号不能为空!', |
| | | }) |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 开始上片 |
| | | const handleb = async () => { |
| | | try { |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | | console.log(engineeringId); |
| | | if (engineeringId !== '') { |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | engineeringId: engineeringId, |
| | | state: 0, |
| | | }) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | blindb.value = false; |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '工程号不能为空!', |
| | | }) |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | onMounted(fetchTableData); |
| | | |
| | | // const open = () => { |
| | | // ElMessageBox.confirm( |
| | | // '是否删除该条信息?', |
| | | // '提示', |
| | | // { |
| | | // confirmButtonText: '是', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning', |
| | | // } |
| | | // ) |
| | | // .then(() => { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '删除成功!', |
| | | // }) |
| | | // }) |
| | | // .catch(() => { |
| | | // ElMessage({ |
| | | // type: 'info', |
| | | // message: '删除失败', |
| | | // }) |
| | | // }) |
| | | // } |
| | | // 开始上片 |
| | | const handleBind = (row) => { |
| | | // engineeringId.value = row.engineeringId; |
| | | |
| | | blind.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 暂停 |
| | | const handleBinda = (row) => { |
| | | // engineeringId.value = row.engineeringId; |
| | | |
| | | blinda.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 停止任务 |
| | | const handleBindb = (row) => { |
| | | // engineeringId.value = row.engineeringId; |
| | | |
| | | blindb.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 添加 |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | add.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 删除 |
| | | const handleBindRacka = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | adda.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | ], |
| | | }) |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | <div> |
| | | <div id="dotClass"> |
| | |
| | | <el-button style="margin-left: 30px;margin-top: -3px;" >手动确认</el-button> |
| | | </div> |
| | | <el-button style="margin-top: 5px;margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true">选择工程</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary">开始上片</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" >暂停</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" >停止任务</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary" @click="handleBind">开始上片</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">暂停</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="handleBindb">停止任务</el-button> |
| | | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <!-- <el-table |
| | | height="150" |
| | | ref="table" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | :data="tableData" |
| | | :span-method="objectSpanMethod" |
| | | > --> |
| | | <el-table |
| | | height="150" |
| | | ref="table" |
| | |
| | | min-width="80" |
| | | prop="state" |
| | | > |
| | | <!-- <el-tag type="success" v-if="damageDetails.state === 1">就绪</el-tag> --> |
| | | <!-- <el-tag type="danger" v-if="row.enableState==2">未就绪</el-tag> --> |
| | | <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.state==1?"就绪":"未就绪" }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | </el-card> |
| | | <el-dialog v-model="blind" top="30vh" width="25%" title="是否开始上片?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handle"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="blind = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="blinda" top="30vh" width="25%" title="是否暂停?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handlea"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="blinda = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="blindb" top="30vh" width="25%" title="是否停止任务?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleb"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="blindb = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <div id="parent"> |
| | | <img src="../../assets/shangpianji.png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 500px;"> |
| | | <!-- <el-button style="margin-top: -830px;margin-left: -40px;" size="mini" id="searchButton" @click="add = true">添加原片</el-button> --> |
| | | <!-- <el-button style="margin-top: -10px;margin-left: -80px;" size="mini" id="searchButton" @click="adda = true">添加原片</el-button> --> |
| | | <div id="overlay" v-show="flake"></div> |
| | | <div id="overlaya" v-show="flakea"></div> |
| | | </div> |
| | | <div style="margin-top: -350px;margin-left: 650px;"> |
| | | <el-table :data="tableDataa" border style="width: 60%" |
| | |
| | | <el-table-column prop="filmsId" align="center" label="膜系" min-width="80" /> |
| | | <el-table-column prop="number" align="center" label="数量" min-width="80" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="150"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain @click="add = true">添加</el-button> |
| | | <el-button size="mini" type="text" plain @click="open">删除</el-button> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack(scope.row)">添加</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <el-dialog v-model="add" top="23vh" width="45%" title="添加原片" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="70px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input v-model="patternHeigth" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-input v-model="patternWidth" autocomplete="off" /> |
| | | </el-form-item></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="膜系:" :required="true" style="width: 14vw;"> |
| | | <el-input v-model="filmsId" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="厚度:" :required="true" style="width: 14vw"> |
| | | <el-input v-model="patternThickness" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw;"> |
| | | <el-input v-model="number" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="add = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="adda" top="30vh" width="25%" title="是否删除该条信息?" > |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirma"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="adda = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisible" top="24vh" width="30%" title="工程" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 300px" |
| | | v-model="form.id" |
| | | > |
| | | <el-option |
| | | v-for="item in billall" |
| | | :key="item.id" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="add" top="23vh" width="45%" title="添加原片" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="70px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="膜系:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="厚度:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="getTableRow('edit')"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="add = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="adda" top="23vh" width="45%" title="添加原片" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" > |
| | | <el-form label-width="70px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="长:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="宽:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="膜系:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="厚度:" :required="true" style="width: 14vw"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item label="数量:" :required="true" style="width: 14vw;"> |
| | | <el-input autocomplete="off" style="width: 180px" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-form> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="adda = false">确认</el-button> |
| | | <el-button @click="adda = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | width: 212px; |
| | | height: 15px; |
| | | background-color: #529b2e; |
| | | margin-top: -407px; |
| | | margin-left: 171px; |
| | | margin-top: -404px; |
| | | margin-left: 542px; |
| | | } |
| | | #overlaya{ |
| | | position: absolute; |
| | |
| | | width: 212px; |
| | | height: 15px; |
| | | background-color: #529b2e; |
| | | margin-top: -40px; |
| | | margin-left: 167px; |
| | | margin-top: -38px; |
| | | margin-left: 537px; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | |
| | | import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { tr } from "element-plus/es/locale"; |
| | | const dialogFormVisible = ref(false) |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | | |
| | | const carposition1 = ref(60); |
| | | const carposition2 = ref(200); |
| | | const timers1 =ref(true); |
| | | const timers2 =ref(true); |
| | | const cellshow=ref(false); |
| | | const cellshow1=ref(true); |
| | | const cellshow2=ref(true); |
| | | const million=ref(0); |
| | | const million1=ref(0); |
| | | |
| | | const currentPage4 = ref(4) |
| | | const pageSize4 = ref(100) |
| | |
| | | c: '123456789', |
| | | d: '1568251', |
| | | e: '1', |
| | | f: '100', |
| | | f: '100*100', |
| | | g: '', |
| | | }, |
| | | ] |
| | |
| | | c: '123456789', |
| | | d: '1568251', |
| | | e: '1', |
| | | f: '100', |
| | | f: '100*100', |
| | | g: '', |
| | | } |
| | | ] |
| | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | var timer=setInterval(() => { |
| | | console.log(million.value,million1.value); |
| | | million.value+=1; |
| | | if(million.value-million1.value!==12){ |
| | | |
| | | if(million.value-million1.value>=2){ |
| | | if(carposition1.value==200){ |
| | | timers1.value=false; |
| | | }else if(carposition1.value==60){ |
| | | timers1.value=true; |
| | | } |
| | | if(timers1.value==true){ |
| | | carposition1.value=carposition1.value+14; |
| | | }else{ |
| | | carposition1.value=carposition1.value-14; |
| | | } |
| | | |
| | | |
| | | if(carposition2.value==200){ |
| | | timers2.value=false; |
| | | }else if(carposition2.value==60){ |
| | | timers2.value=true; |
| | | } |
| | | if(timers2.value==true){ |
| | | carposition2.value+=14; |
| | | }else{ |
| | | carposition2.value-=14; |
| | | } |
| | | }else{ |
| | | |
| | | } |
| | | }else{ |
| | | million1.value=million.value; |
| | | if(cellshow.value==true){ |
| | | cellshow.value=false; |
| | | |
| | | }else{ |
| | | cellshow.value=true; |
| | | |
| | | } |
| | | if(cellshow1.value==true){ |
| | | cellshow1.value=false; |
| | | }else{ |
| | | cellshow1.value=true; |
| | | } |
| | | if(cellshow2.value==true){ |
| | | cellshow2.value=false; |
| | | }else{ |
| | | cellshow2.value=true; |
| | | } |
| | | } |
| | | |
| | | }, 1000); |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | <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-column prop="g" align="center" label="结束任务" min-width="120"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="text">完成任务</el-button> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | |
| | | <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-column prop="g" align="center" label="结束任务" min-width="120"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="text">完成任务</el-button> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <div style="padding: 10px;display: flex;height:110px;"> |
| | | <div v-for="n in 9" :key="n" id="occupy"> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#1</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">33%</span> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空间(片数)</span><span id="zhi">555</span> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#2</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#3</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#4</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#5</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#6</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#7</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <div id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#8</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> |
| | | <!-- <div v-for="n in 8" :key="n" id="occupy"> |
| | | <el-col style="text-align:left;font-weight: bold;">#1</el-col> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">使用率</span><span id="zhi">35%</span> |
| | | </el-col> |
| | | <hr style="width:80%;margin: 0 auto;" /> |
| | | <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;"> |
| | | <span id="biao">空闲(格子数)</span><span id="zhi">555</span> |
| | | </el-col> |
| | | </div> --> |
| | | </div> |
| | | <!-- <div id="awatch"> |
| | | <img src="../../assets/lpl.jpg" alt="" style="width: 10%;height: 10%;margin-left: 160px;"> |
| | | <img src="../../assets/cp.png" alt="" style="width: 70%;height: 70%;margin-left: 160px;"> |
| | | </div> --> |
| | | <!-- // 父级框 --> |
| | | <div class="img-list"> |
| | | <!-- // 浮在上方的图片 --> |
| | | <img class="check-img" src="../../assets/lpl.jpg" alt="" style="width: 13%;height: 12%;margin-left: 160px;"> |
| | | <img class="check-imga" src="../../assets/lpl.jpg" alt="" style="width: 13%;height: 12%;margin-left: 160px;"> |
| | | <!-- // 底图 --> |
| | | <img class="data-img " src="../../assets/dlpl.png" alt="" style="width: 1200px;height: 400px;margin-left: 130px;margin-top: 50px;"> |
| | | </div> |
| | | <div class="img-dlpl" > |
| | | <div class="img-car1" :style="'z-index:999;left:247px;top:' + carposition1 + 'px;position:absolute;'"> |
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | </div> |
| | | |
| | | <div 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="cellshow" style="width: 200px;height: 5px;position: absolute;top:70px;left: 480px;background-color: #409EFF;"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisible" top="12vh" width="85%" title="请确认玻璃信息" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | |
| | | } |
| | | #occupy { |
| | | height: 100%; |
| | | width: 10%; |
| | | width: 15%; |
| | | background-color: white; |
| | | margin: 0px 8px 0px 8px; |
| | | border: 1px #EBEEF5 solid; |
| | |
| | | width: 3.3125rem; |
| | | height: 2.9375rem; |
| | | top:15rem; |
| | | right: 29rem; |
| | | right: 28.5rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | .vertical { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 485px; /* 初始位置 */ |
| | | left: 899px; /* 水平居中 */ |
| | | transform: translateX(-50%); |
| | | animation: move-vertical 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-vertical { |
| | | 0% { |
| | | top: 485px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | top: calc(100% - 210px); /* 从上到下结束位置 */ |
| | | } |
| | | } |
| | | |
| | | .img-dlpl{ |
| | | margin-left: 200px; |
| | | background-image:url('../../assets/dlpl.png'); |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | | min-height: 400px; |
| | | width: 1200px; |
| | | max-width: 100%; |
| | | background-size: 1200px 400px; |
| | | overflow: hidden; |
| | | 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 |
| | | } |
| | | </style> |
| | |
| | | :width="rack.width" |
| | | :height="rack.height" |
| | | :fill="rack.fillColor" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | @click="showRectInfo(rack)" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | @click="showRectInfo(rack)" |
| | | /> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, rack.item, index)" |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | <script setup> |
| | | import Swal from 'sweetalert2' |
| | | export default { |
| | | data() { |
| | | return { |
| | | racks: [ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ] |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 计算内部物品的 x 坐标位置 |
| | | calculateItemXPosition(rack, item, index) { |
| | | if (index === 0 || index === 1) { // 如果是第一或第二个物品 |
| | | return rack.x; // 返回左边界 x 坐标 |
| | | } else if (index === 2 || index === 3) { // 如果是第三或第四个物品 |
| | | return rack.x + rack.width - item.width; // 返回右边界 x 坐标 |
| | | } else { |
| | | return rack.x + (rack.width - item.width) / 2; // 返回水平居中的 x 坐标 |
| | | } |
| | | }, |
| | | // 计算内部物品的 y 坐标位置 |
| | | calculateItemYPosition(rack, item, index) { |
| | | if (index === 0 || index === 1) { // 如果是第一或第二个物品 |
| | | return rack.y + (rack.height - item.height) / 2; // 返回垂直居中的 y 坐标 |
| | | } else if (index === 2 || index === 3) { // 如果是第三或第四个物品 |
| | | return rack.y + (rack.height - item.height) / 2; // 返回垂直居中的 y 坐标 |
| | | } else { |
| | | return rack.y + rack.height - item.height; // 返回底部对齐的 y 坐标 |
| | | } |
| | | }, |
| | | showCustomAlert(content) { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | } |
| | | }); |
| | | const racks = [ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ]; |
| | | |
| | | }, |
| | | showRectInfo( rectInfo) { |
| | | const content = rectInfo.item.content; |
| | | this.$nextTick(() => { |
| | | this.showCustomAlert(content); |
| | | }); |
| | | }, |
| | | const calculateItemXPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | return rack.x; |
| | | } else if (index === 2 || index === 3) { |
| | | return rack.x + rack.width - item.width; |
| | | } else { |
| | | return rack.x + (rack.width - item.width) / 2; |
| | | } |
| | | }; |
| | | |
| | | const calculateItemYPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else if (index === 2 || index === 3) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else { |
| | | return rack.y + rack.height - item.height; |
| | | } |
| | | }; |
| | | |
| | | const showCustomAlert = (content) => { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const showRectInfo = (rectInfo) => { |
| | | const content = rectInfo.item.content; |
| | | showCustomAlert(content); |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | margin-left: 20px; |
| | | width: 500px; |
| | | margin-top: 10px; |
| | | /* background-color: antiquewhite; */ |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | |
| | | padding: 10px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | </style> |
| | | </style> |
| | |
| | | <template> |
| | | <div class="glass-rack"> |
| | | <div> |
| | | <div > |
| | | <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <g stroke="null" id="Layer_1"> |
| | | <!-- 使用 v-for 循环渲染数据 --> |
| | |
| | | :width="rack.width" |
| | | :height="rack.height" |
| | | :fill="rack.fillColor" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | @click="showRectInfo(rack)" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | @click="showRectInfo(rack)" |
| | | /> |
| | | <rect |
| | | :x="calculateItemXPosition(rack, rack.item, index)" |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | <script setup> |
| | | import Swal from 'sweetalert2' |
| | | export default { |
| | | data() { |
| | | return { |
| | | racks: [ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ] |
| | | }; |
| | | }, |
| | | methods: { |
| | | calculateItemXPosition(rack, item, index) { |
| | | if (index === 0 || index === 1) { |
| | | return rack.x; |
| | | } else if (index === 2 || index === 3) { |
| | | return rack.x + rack.width - item.width; |
| | | } else { |
| | | return rack.x + (rack.width - item.width) / 2; |
| | | } |
| | | }, |
| | | calculateItemYPosition(rack, item, index) { |
| | | if (index === 0 || index === 1) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else if (index === 2 || index === 3) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else { |
| | | return rack.y + rack.height - item.height; |
| | | } |
| | | }, |
| | | showCustomAlert(content) { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | } |
| | | }); |
| | | const racks = [ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 20, width: 10, fillColor: 'yellow', content: 'NG1234567' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 30, width: 20, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 270, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 35, width: 23, fillColor: 'yellow', content: 'NG123456910' } }, |
| | | { x: 140, y: 420, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 30, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | ]; |
| | | |
| | | }, |
| | | showRectInfo( rectInfo) { |
| | | const content = rectInfo.item.content; |
| | | this.$nextTick(() => { |
| | | this.showCustomAlert(content); |
| | | }); |
| | | }, |
| | | const calculateItemXPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | return rack.x; |
| | | } else if (index === 2 || index === 3) { |
| | | return rack.x + rack.width - item.width; |
| | | } else { |
| | | return rack.x + (rack.width - item.width) / 2; |
| | | } |
| | | }; |
| | | |
| | | const calculateItemYPosition = (rack, item, index) => { |
| | | if (index === 0 || index === 1) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else if (index === 2 || index === 3) { |
| | | return rack.y + (rack.height - item.height) / 2; |
| | | } else { |
| | | return rack.y + rack.height - item.height; |
| | | } |
| | | }; |
| | | |
| | | const showCustomAlert = (content) => { |
| | | var str="架号 : 111\n" + |
| | | "长 : 111\n" + |
| | | "宽 : 111\n" + |
| | | "厚 : 111\n"+ |
| | | "玻璃ID : 111\n"+ |
| | | "膜系 : 111\n"; |
| | | |
| | | Swal.fire({ |
| | | title: '玻璃信息', |
| | | html: '<pre>' + str + '</pre>', |
| | | customClass: { |
| | | popup: 'format-pre' |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const showRectInfo = (rectInfo) => { |
| | | const content = rectInfo.item.content; |
| | | showCustomAlert(content); |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | width: 500px; |
| | | margin-top: 10px; |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | |
| | | padding: 10px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | </style> |
| | | </style> |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import unloadrequest from "@/utils/unloadrequest"; |
| | | import request from "@/utils/request"; |
| | | const dialogFormVisiblea = ref(false) |
| | | |
| | | |
| | |
| | | if (typeof WebSocket === "undefined") { |
| | | console.log("您的浏览器不支持WebSocket"); |
| | | } else { |
| | | let socketUrl = "ws://" + "localhost"+":88" + "/api/unLoadGlass/api/talk/" + viewname; |
| | | let socketUrl = "ws://" + "localhost"+":88" + "/api/talk/" + viewname; |
| | | if (socket != null) { |
| | | socket.close(); |
| | | socket = null; |
| | |
| | | if (!msg.data) { |
| | | return; // 如果收到空数据,则直接返回,不执行后续逻辑 |
| | | } |
| | | |
| | | |
| | | |
| | | let obj = JSON.parse(msg.data); |
| | | |
| | |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getflowCardId'); |
| | | const response = await request.get('unLoadGlass/downWorkStation/getflowCardId'); |
| | | console.log(response) |
| | | if (response.code === 200) { |
| | | flowCardOptions.value = response.data.map(item => ({ flowcard_id: item.flowcard_id })); |
| | | flowCardOptions.value = response.data.map(item => ({ flowcard_id: item.flow_card_id })); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | |
| | | //确认 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/updateFlowCardId', { |
| | | const response = await request.post('unLoadGlass/downWorkStation/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | }); |
| | |
| | | //清除内容 |
| | | const handleclear = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/clear', { |
| | | const response = await request.post('unLoadGlass/downWorkStation/clear', { |
| | | workstationId: workstationId.value, |
| | | }); |
| | | |
| | |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getone'); |
| | | const response = await request.get('unLoadGlass/downWorkStation/getone'); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | |
| | | |
| | | initWebSocket(); |
| | | onMounted(fetchTableData); |
| | | setInterval(fetchTableData, 2000) |
| | | // setInterval(fetchTableData, 2000) |
| | | |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 300px; |
| | | margin-left: 200px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
New file |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from "vue-router"; |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | #div-title{ |
| | | height: 2%; |
| | | width: 100%; |
| | | } |
| | | #searchButton{ |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | /* #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } */ |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | | /* margin-top: 1%; */ |
| | | } |
| | | #select{ |
| | | margin-left:0.5rem; |
| | | } |
| | | :deep(.indexTag .el-breadcrumb__inner){ |
| | | color: #5CADFE !important; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | | // // 发送获取表格数据的请求,并等待响应 |
| | | // // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | // const response = await request.get("unLoadGlass/downStorage/selectStorageCage"); |
| | | |
| | | // // 检查响应状态 |
| | | // if (response.code === 200) { |
| | | // // 更新表格数据 |
| | | // console.log('成功获取表格数据:', response.data); |
| | | // tableData.splice(0, tableData.length, ...response.data); |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否报缺?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // this.boxa = true |
| | | // this.box = false |
| | | |
| | | }) |
| | | } |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | }) |
| | | }) |
| | | } |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- 父级框 --> |
| | | <div class="container"> |
| | | <img src="../../assets/d1.png" style="width: 1500px;height: 750px;" alt="Your Image"> |
| | | <div class="moving-rect vertical"></div> |
| | | <div class="moving-rect all"></div> |
| | | <div class="moving-rect horizontal"></div> |
| | | <div class="moving-rect xiao"></div> |
| | | <div class="moving-rect zhan"></div> |
| | | <div class="moving-rect tu"></div> |
| | | <div class="moving-rect zi"></div> |
| | | <div class="moving-rect xia"></div> |
| | | <div class="moving-rect zan"></div> |
| | | <div class="moving-rect fa"></div> |
| | | <div class="moving-rect hua"></div> |
| | | <div class="moving-rect shui"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | position: relative; |
| | | display: inline-block; /* 使容器大小适应图片大小 */ |
| | | } |
| | | |
| | | img { |
| | | display: block; /* 让图片以块级元素显示 */ |
| | | max-width: 100%; /* 确保图片不超出容器 */ |
| | | } |
| | | |
| | | .moving-rect { |
| | | width: 100px; |
| | | height: 50px; |
| | | position: absolute; |
| | | } |
| | | |
| | | .vertical { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 510px; /* 初始位置 */ |
| | | left: 899px; /* 水平居中 */ |
| | | transform: translateX(-50%); |
| | | animation: move-vertical 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-vertical { |
| | | 0% { |
| | | top: 510px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | top: calc(100% - 210px); /* 从上到下结束位置 */ |
| | | } |
| | | } |
| | | .all { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 490px; /* 垂直居中 */ |
| | | right: 560px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-all 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-all { |
| | | 0% { |
| | | right: 560px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 863px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | .horizontal { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 488px; /* 垂直居中 */ |
| | | right: 210px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-horizontal 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-horizontal { |
| | | 0% { |
| | | right: 210px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 1030px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | |
| | | .xiao { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 569px; /* 垂直居中 */ |
| | | right: 660px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-xiao 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-xiao { |
| | | 0% { |
| | | right: 660px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 820px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | .tu { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 569px; /* 垂直居中 */ |
| | | right: 778px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-tu 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-tu { |
| | | 0% { |
| | | right: 778px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 580px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | .zhan { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 632px; /* 垂直居中 */ |
| | | right: 572px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-zhan 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-zhan { |
| | | 0% { |
| | | right: 572px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 885px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | .zi { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 632px; /* 垂直居中 */ |
| | | right: 710px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-zi 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-zi { |
| | | 0% { |
| | | right: 710px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 645px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | .xia { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 628px; /* 垂直居中 */ |
| | | right: 1185px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-xia 6s infinite; /* 从右到左动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-xia { |
| | | 0% { |
| | | right: 1185px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 198px); /* 从右到左结束位置 */ |
| | | } |
| | | } |
| | | |
| | | .zan { |
| | | width: 25px; |
| | | height: 45px; |
| | | background-color: #409EFF; |
| | | top: 570px; /* 初始位置 */ |
| | | left: 172px; /* 水平居中 */ |
| | | transform: translateX(-50%); |
| | | animation: move-zan 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-zan { |
| | | 0% { |
| | | top: 570px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | top: calc(100% - 242px); /* 从下到上结束位置 */ |
| | | } |
| | | } |
| | | .fa { |
| | | width: 25px; |
| | | height: 45px; |
| | | background-color: #409EFF; |
| | | top: 150px; /* 初始位置 */ |
| | | left: 172px; /* 水平居中 */ |
| | | transform: translateX(-50%); |
| | | animation: move-fa 6s infinite; /* 从上到下动画,持续6秒,无限循环 */ |
| | | } |
| | | |
| | | @keyframes move-fa { |
| | | 0% { |
| | | top: 150px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | top: calc(100% - 660px); /* 从下到上结束位置 */ |
| | | } |
| | | } |
| | | .hua { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 117px; /* 垂直居中 */ |
| | | right: 1250px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-hua 6s infinite; /* 从左到右动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-hua { |
| | | 0% { |
| | | right: 1250px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 360px); /* 结束位置 */ |
| | | } |
| | | } |
| | | .shui { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | top: 117px; /* 垂直居中 */ |
| | | right: 1050px; /* 初始位置 */ |
| | | transform: translateY(-50%); |
| | | animation: move-shui 6s infinite; /* 从左到右动画,持续6秒,无限循环 */ |
| | | } |
| | | @keyframes move-shui { |
| | | 0% { |
| | | right: 1050px; /* 起始位置 */ |
| | | } |
| | | 100% { |
| | | right: calc(100% - 610px); /* 结束位置 */ |
| | | } |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | | // // 发送获取表格数据的请求,并等待响应 |
| | | // // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | // const response = await request.get("unLoadGlass/downStorage/selectStorageCage"); |
| | | |
| | | // // 检查响应状态 |
| | | // if (response.code === 200) { |
| | | // // 更新表格数据 |
| | | // console.log('成功获取表格数据:', response.data); |
| | | // tableData.splice(0, tableData.length, ...response.data); |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否报缺?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // this.boxa = true |
| | | // this.box = false |
| | | |
| | | }) |
| | | } |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | }) |
| | | }) |
| | | } |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | <div id="awatch"> |
| | | <img src="../../assets/d3.png" alt="" style="width: 100%;height: 160%;margin-top: 20px;"> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | |
| | | const tableData = ref([]) |
| | | |
| | | // 发送获取表格数据的请求 |
| | | // const fetchTableData = async () => { |
| | | // try { |
| | | // // 发送获取表格数据的请求,并等待响应 |
| | | // // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | // const response = await request.get("unLoadGlass/downStorage/selectStorageCage"); |
| | | |
| | | // // 检查响应状态 |
| | | // if (response.code === 200) { |
| | | // // 更新表格数据 |
| | | // console.log('成功获取表格数据:', response.data); |
| | | // tableData.splice(0, tableData.length, ...response.data); |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理请求失败的情况 |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | // } |
| | | // }; |
| | | // onMounted(fetchTableData); |
| | | |
| | | |
| | | |
| | | request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '是否报缺?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // this.boxa = true |
| | | // this.box = false |
| | | |
| | | }) |
| | | } |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | }) |
| | | }) |
| | | } |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | <div id="awatch"> |
| | | <img src="../../assets/d2.png" alt="" style="width: 100%;height: 160%;margin-top: 20px;"> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
| | |
| | | https: false, |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://10.153.19.150:88/', |
| | | target: '10.153.19.150:88/', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api/, '/'), |
| | | }, |
| | |
| | | // 2、全局配置 |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent1\\"); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent2\\"); |
| | | |
| | | gc.setServiceName("%sService"); //去掉Service接口的首字母I |
| | | gc.setAuthor("zhoush"); |
| | | gc.setAuthor("wu"); |
| | | gc.setOpen(false); |
| | | mpg.setGlobalConfig(gc); |
| | | |
| | |
| | | // 4、包配置 |
| | | PackageConfig pc = new PackageConfig(); |
| | | pc.setParent("com.mes"); |
| | | //pc.setModuleName("userinfo"); //模块名 |
| | | pc.setModuleName("engineering"); //模块名 |
| | | pc.setController("controller"); |
| | | pc.setService("service"); |
| | | pc.setMapper("mapper"); |
| | |
| | | // 5、策略配置 |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | |
| | | //strategy.setInclude("up_patten_usage"); |
| | | strategy.setInclude("engineering"); |
| | | |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-generator</artifactId> |
| | | <version>3.4.1</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.velocity</groupId> |
| | | <artifactId>velocity-engine-core</artifactId> |
| | | <version>2.0</version> |
| | | </dependency> |
| | | */ |
| | |
| | | <artifactId>cacheVerticalGlass</artifactId> |
| | | <dependencies> |
| | | |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.1.6</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>junit</groupId> |
| | | <artifactId>junit</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.microsoft.sqlserver</groupId> |
| | | <artifactId>sqljdbc4</artifactId> |
| | | <version>4.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel(description = "<p> 大理片笼 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCage implements Serializable { |
| | |
| | | /** |
| | | * 大理片笼表id |
| | | */ |
| | | @ApiModelProperty(value = "大理片笼表id", position = 2) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备id |
| | | */ |
| | | @ApiModelProperty(value = "设备id", position = 3) |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * 栅格号 |
| | | */ |
| | | @ApiModelProperty(value = "栅格号", position = 4) |
| | | private Integer slot; |
| | | |
| | | /** |
| | | * 启用状态 |
| | | */ |
| | | @ApiModelProperty(value = "启用状态", position = 5) |
| | | private String enableState; |
| | | |
| | | /** |
| | | * 剩余宽度 |
| | | */ |
| | | @ApiModelProperty(value = "剩余宽度", position = 6) |
| | | private Integer remainWidth; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | @TableField(exist = false) |
| | | private List<BigStorageCageDetails> bigStorageCageDetails; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel(description = "<p> 大理片笼详情 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCageDetails implements Serializable { |
| | |
| | | /** |
| | | * 大理片笼详情表id |
| | | */ |
| | | @ApiModelProperty(value = "大理片笼详情表id", position = 2) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备id |
| | | */ |
| | | @ApiModelProperty(value = "设备id", position = 3) |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * 栅格号 |
| | | */ |
| | | @ApiModelProperty(value = "栅格号", position = 4) |
| | | private Integer slot; |
| | | |
| | | /** |
| | | * 玻璃id |
| | | */ |
| | | @ApiModelProperty(value = "玻璃id", position = 5) |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 小片在格内的顺序 |
| | | */ |
| | | @ApiModelProperty(value = "小片在格内的顺序", position = 6) |
| | | private Integer sequence; |
| | | |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | @ApiModelProperty(value = "流程卡号", position = 7) |
| | | private String flowCardId; |
| | | |
| | | /** |
| | | * 玻璃类型 |
| | | */ |
| | | @ApiModelProperty(value = "玻璃类型", position = 8) |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | @ApiModelProperty(value = "宽", position = 9) |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | @ApiModelProperty(value = "高", position = 10) |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | @ApiModelProperty(value = "厚度", position = 11) |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | | */ |
| | | @ApiModelProperty(value = "钢化版图id", position = 12) |
| | | private Integer temperingLayoutId; |
| | | |
| | | /** |
| | | * 钢化版图片序 |
| | | */ |
| | | @ApiModelProperty(value = "钢化版图片序", position = 13) |
| | | private Integer temperingFeedSequence; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value = "状态", position = 14) |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 玻璃间隙 |
| | | */ |
| | | @ApiModelProperty(value = "玻璃间隙", position = 15) |
| | | private Integer gap; |
| | | |
| | | |
| | |
| | | bigStorageCageMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<BigStorageCage> querybigStorageCageDetail() { |
| | | //1、获取大理片笼信息 |
| | |
| | | @Override |
| | | public List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState){ |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> getFeedTaskWrapper=new LambdaQueryWrapper<>(); |
| | | getFeedTaskWrapper.eq(BigStorageCageFeedTask::getTaskState,1); |
| | | getFeedTaskWrapper.eq(BigStorageCageFeedTask::getTaskState,taskState); |
| | | return baseMapper.selectList(getFeedTaskWrapper); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes; |
| | | |
| | | 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 java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/27 16:37 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = CacheVerticalClassModuleApplication.class) |
| | | public class CacheVerticalGlassModuleApplicationTest { |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | log.info("完整路径:{}", Arrays.asList("123")); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.engineering.controller; |
| | | |
| | | |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.service.impl.EngineeringServiceImpl; |
| | | import com.mes.utils.Result; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.mes.engineering.service.EngineeringService; |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-22 |
| | | */ |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping("/engineering/engineering") |
| | | public class EngineeringController { |
| | | @Autowired |
| | | private EngineeringService engineeringService; |
| | | |
| | | @ApiOperation("开始/暂停任务/传递工程号和状态,开始是1 暂停是0") |
| | | @PostMapping("/changeTask") //调用上片任务 |
| | | @ResponseBody |
| | | public Result <Engineering> changeTask(String projectId , Integer state) { |
| | | boolean work=engineeringService.changeTask(projectId,state); |
| | | log.info("开始任务返回:{}", work); |
| | | return Result.build(200, "",null); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.engineering.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class Engineering implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 工程表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String engineerId; |
| | | |
| | | /** |
| | | * 工程名称 |
| | | */ |
| | | private String engineerName; |
| | | |
| | | /** |
| | | * 平均利用率 |
| | | */ |
| | | private Double avgAvailability; |
| | | |
| | | /** |
| | | * 有效利用率 |
| | | */ |
| | | private Double validAvailability; |
| | | |
| | | /** |
| | | * 尾片利用率 |
| | | */ |
| | | private Double lastAvailability; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 小片总数 |
| | | */ |
| | | private Integer glassTotal; |
| | | |
| | | /** |
| | | * 小片总面积 |
| | | */ |
| | | private Double glassTotalArea; |
| | | |
| | | /** |
| | | * 计划原片总数 |
| | | */ |
| | | private Integer planPatternTotal; |
| | | |
| | | /** |
| | | * 计划原片总面积 |
| | | */ |
| | | private Double planPatternTotalArea; |
| | | |
| | | /** |
| | | * 实际原片总数 |
| | | */ |
| | | private Integer realityPatternTotal; |
| | | |
| | | /** |
| | | * 实际原片总面积 |
| | | */ |
| | | private Double realityPatternTotalArea; |
| | | |
| | | /** |
| | | * 膜系id |
| | | */ |
| | | private Integer filmsId; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String notes; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.engineering.mapper; |
| | | |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-22 |
| | | */ |
| | | public interface EngineeringMapper extends BaseMapper<Engineering> { |
| | | |
| | | } |
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.engineering.mapper.EngineeringMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.engineering.service; |
| | | |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-22 |
| | | */ |
| | | public interface EngineeringService extends IService<Engineering> { |
| | | |
| | | boolean changeTask(String projectId,Integer state); |
| | | } |
New file |
| | |
| | | package com.mes.engineering.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.mapper.EngineeringMapper; |
| | | import com.mes.engineering.service.EngineeringService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-22 |
| | | */ |
| | | @Service |
| | | public class EngineeringServiceImpl extends ServiceImpl<EngineeringMapper, Engineering> implements EngineeringService { |
| | | //开始/暂停任务 |
| | | @Override |
| | | public boolean changeTask(String projectId, Integer state) { |
| | | LambdaUpdateChainWrapper<Engineering> wrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper()); |
| | | wrapper.set(Engineering::getState,state); |
| | | wrapper.eq(Engineering::getEngineerId,projectId); |
| | | return wrapper.update(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.mes.utils.Result; |
| | | import com.mes.workstation.entity.GlassInfo; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public class UpWorkstationController { |
| | | @Autowired |
| | | private UpWorkstationService upWorkstationService; |
| | | private GlassInfo glassInfo; |
| | | @ApiOperation("显示工位上的玻璃信息") |
| | | @GetMapping("/list") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpWorkstation>> list() { |
| | |
| | | @ApiOperation("修改工位表增加玻璃信息或者删除玻璃信息,传递Upworkstation类,只修改宽高厚数量膜系") |
| | | @PostMapping("/updateGlassMessage") |
| | | @ResponseBody |
| | | public void updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | public Result<UpWorkstation> updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | upWorkstationService.updateGlassMessage(upwork); |
| | | return Result.build(200, "", upwork); |
| | | } |
| | | |
| | | @ApiOperation("开始上片任务") |
| | | @PostMapping("/selectPriority") //开始上片任务 |
| | | @PostMapping("/selectPriority") //调用上片任务 |
| | | @ResponseBody |
| | | public void selectPriority() { |
| | | upWorkstationService.selectPriority(); |
| | | UpWorkSequence work=upWorkstationService.selectPriority(); |
| | | log.info("显示可上的玻璃信息:{}", work); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | public class UpWorkSequence { |
| | | |
| | | private int sequence; |
| | | |
| | | private int workId; |
| | | private int number; |
| | | |
| | | } |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface UpWorkstationMapper extends BaseMapper<UpWorkstation> { |
| | | //获取工位信息 |
| | | UpWorkSequence selectPriority(@Param("id") int id); |
| | | |
| | | List<UpWorkSequence> selectPriority(@Param("id") int id); |
| | | |
| | | //获取下一片玻璃信息 |
| | | } |
| | |
| | | package com.mes.workstation.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | |
| | | /** |
| | |
| | | public interface UpWorkstationService extends IService<UpWorkstation> { |
| | | //PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | |
| | | //删除人工搬走的玻璃信息 |
| | | // public void deleteGlass(int id); |
| | | //判断是否可以吸片进行任务 |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority(); |
| | | public UpWorkSequence selectPriority(); |
| | | |
| | | //查询正在进行的工程 |
| | | |
| | |
| | | * |
| | | * @param upwork |
| | | */ |
| | | //修改工位表增加玻璃信息或者删除玻璃信息 |
| | | void updateGlassMessage(UpWorkstation upwork); |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() { |
| | | //todo:判断是否可以吸片进行任务 |
| | | // String loadstart="吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | // if (!"1".equals(loadstart)) { |
| | | // return; |
| | | // } |
| | | 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); |
| | | // } |
| | | public UpWorkSequence selectPriority() { |
| | | UpWorkSequence upwork= this.baseMapper.selectPriority(1); |
| | | String start = "吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | if(upwork!=null&&start.equals("1")){ |
| | | //发送出片任务 |
| | | //plcmes.getPlcParameter("出片信号").setValue("1"); |
| | | } |
| | | return upwork; |
| | | } |
| | | |
| | | /** |
| | |
| | | int update = this.baseMapper.update(upwork, updateWrapper); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <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"/> |
| | | <id property="workId" column="workstation_id"/> |
| | | <!-- <result property="number" column="number"/>--> |
| | | </resultMap> |
| | | |
| | | <select id="selectPriority" resultMap="sequenceMap"> |
| | | SELECT |
| | | b.layout_sequence,a."number" |
| | | b.workstation_id |
| | | 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 * FROM up_patten_usage a WHERE state = 1 ORDER BY a.layout_sequence LIMIT 1 )as a |
| | | LEFT JOIN up_workstation b ON a.width =b.pattern_width |
| | | AND a.height = b.pattern_heigth |
| | | AND a.thickness = b.pattern_thickness |
| | | AND a.films_id = b.films_id |
| | | </select> |
| | | |
| | | |
New file |
| | |
| | | package com.mes.common; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageDetailsMapper; |
| | | import com.mes.downstorage.service.DownStorageCageService; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | import java.util.function.Supplier; |
| | | |
| | | @Slf4j |
| | | public class Plcdownglass extends Thread { |
| | | |
| | | public static final String RESULT_IN = "1"; |
| | | public static final String RESULT_OUT = "2"; |
| | | public static final String RESULT_IN_OUT = "3"; |
| | | |
| | | @Autowired |
| | | private DownStorageCageService downStorageCageService; |
| | | @Autowired |
| | | private DownWorkstationService downWorkstationService; |
| | | |
| | | // private final Supplier<DownWorkstationService> plcServiceSupplier; |
| | | // |
| | | // public Plcdownglass() { |
| | | // this.plcServiceSupplier = () -> WebSocketServer.applicationContext.getBean(DownWorkstationService.class); |
| | | // } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | Thread.sleep(100); |
| | | downWorkstationService = WebSocketServer.applicationContext.getBean(DownWorkstationService.class); |
| | | downStorageCageService = WebSocketServer.applicationContext.getBean(DownStorageCageService.class); |
| | | // String result = S7control.getinstance().ReadWord("DB14.0", 1).get(0) + ""; |
| | | // String number = S7control.getinstance().ReadWord("DB14.2", 1).get(0) + ""; |
| | | String result ="1"; |
| | | String number ="1"; |
| | | // 进片请求 |
| | | if (RESULT_IN.equals(result)) { |
| | | downStorageCageService.processInto(number); |
| | | } |
| | | // 出片请求 |
| | | else if (RESULT_OUT.equals(result)) { |
| | | downStorageCageService.processOut(); |
| | | } |
| | | // 进出片请求 |
| | | else if (RESULT_IN_OUT.equals(result)) { |
| | | // 先出后进 |
| | | if (!downStorageCageService.processOut()) { |
| | | downStorageCageService.processInto(number); |
| | | } |
| | | } |
| | | |
| | | |
| | | downWorkstationService.insertdownglassinfo(); |
| | | |
| | | |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | package com.mes.common; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.downworkstation.service.DownGlassLogic; |
| | | |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.function.Supplier; |
| | | |
| | | @Component |
| | | public class Plchome extends Thread { |
| | | private int i = 1; |
| | | private static final Logger log = LogManager.getLogger(Plchome.class); |
| | | @Autowired |
| | | private DownWorkstationService downWorkstationService; |
| | | |
| | | private final Supplier<DownGlassLogic> plcServiceSupplier; |
| | | // private final Supplier<DownGlassLogic> plcServiceSupplier; |
| | | |
| | | public Plchome() { |
| | | this.plcServiceSupplier = () -> WebSocketServer.applicationContext.getBean(DownGlassLogic.class); |
| | | } |
| | | // public Plchome() { |
| | | // this.plcServiceSupplier = () -> WebSocketServer.applicationContext.getBean(DownGlassLogic.class); |
| | | // } |
| | | |
| | | |
| | | @Override |
| | |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | i++; |
| | | Thread.sleep(100); |
| | | DownGlassLogic plcService = plcServiceSupplier.get(); |
| | | |
| | | |
| | | //当下片任务表状态为1时候将数据插入到下片玻璃信息表 |
| | | plcService.insertdownglassinfo(); |
| | | |
| | | |
| | | //当机械手任务表中状态为1 更新已经落架数量,并且把下片任务表的那条记录删掉 工位表流程卡绑定了架子 |
| | | plcService.downWorkstation(); |
| | | Thread.sleep(1000); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | System.out.println(77); |
| | | downWorkstationService = WebSocketServer.applicationContext.getBean(DownWorkstationService.class); |
| | | List<Map<String, Object>> yy= downWorkstationService.getTotalGlassDimensionsByWorkstation(); |
| | | jsonObject.append("data", yy); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | log.info("准备向 WebSocket 服务器发送消息: {}", jsonObject.toString()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } catch (InterruptedException e) { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | // System.out.println(arraylist6); |
| | | jsonObject.append("data", 1); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | log.info("准备向 WebSocket 服务器发送消息: {}", jsonObject.toString()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | package com.mes.config; |
| | | |
| | | import com.mes.common.Plcdownglass; |
| | | import com.mes.common.Plchome; |
| | | import com.mes.device.PLCAutoMes; |
| | | import org.springframework.boot.ApplicationArguments; |
| | |
| | | // |
| | | System.out.println("启动完成"); |
| | | |
| | | |
| | | //new Plcdownglass().start(); |
| | | |
| | | // new PLCAutoMes().start(); |
| | | // |
| | | // new Plchome().start(); |
| | | // new Plchome().start(); |
| | | |
| | | } |
| | | } |
| | |
| | | @Repository |
| | | public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> { |
| | | |
| | | // @Select("SELECT MAX(sequence) FROM down_glass_info WHERE flow_card_id = #{flowCardId} LIMIT 1") |
| | | // Integer getMaxSequenceByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | //// |
| | | // @Delete("delete from down_glass_task where flow_card_id = #{flowCardId}") |
| | | // void deletetask(@Param("flowCardId") String flowCardId); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | void updateTaskStateToZero(long id); |
| | | |
| | | void deleteTask(long id); |
| | | void deleteTask(String id); |
| | | |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | |
| | | Integer insertCacheTask(Long id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId); |
| | | Integer insertCacheTask(DownGlassTask downGlassTask); |
| | | |
| | | List<DownGlassTask> selectInputTaskCache(); |
| | | |
| | | /** |
| | | * 查询出片任务 |
| | | * @return |
| | | */ |
| | | List<DownGlassTask> selectOutTaskCache(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteTask(long id) { |
| | | public void deleteTask(String id) { |
| | | LambdaQueryWrapper<DownGlassTask> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(DownGlassTask::getId, id); |
| | | queryWrapper.eq(DownGlassTask::getFlowCardId, id); |
| | | |
| | | baseMapper.delete(queryWrapper); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertCacheTask(Long id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId) { |
| | | public Integer insertCacheTask(DownGlassTask downGlassTask) { |
| | | DownGlassTask glassInfo = new DownGlassTask(); |
| | | glassInfo.setId(id); |
| | | glassInfo.setStartCell(start); |
| | | glassInfo.setEndCell(end); |
| | | glassInfo.setTaskType(type); |
| | | glassInfo.setWidth(width); |
| | | glassInfo.setHeight(height); |
| | | glassInfo.setFilmsid(filmsId); |
| | | glassInfo.setThickness(thickness); |
| | | glassInfo.setFlowCardId(flowCardId); |
| | | glassInfo.setId(downGlassTask.getId()); |
| | | glassInfo.setStartCell(downGlassTask.getStartCell()); |
| | | glassInfo.setEndCell(downGlassTask.getEndCell()); |
| | | glassInfo.setTaskType(downGlassTask.getTaskType()); |
| | | glassInfo.setWidth(downGlassTask.getWidth()); |
| | | glassInfo.setHeight(downGlassTask.getHeight()); |
| | | glassInfo.setFilmsid(downGlassTask.getFilmsid()); |
| | | glassInfo.setThickness(downGlassTask.getThickness()); |
| | | glassInfo.setFlowCardId(downGlassTask.getFlowCardId()); |
| | | glassInfo.setTaskStauts(0); // 默认任务状态为0 |
| | | |
| | | int rows = baseMapper.insert(glassInfo); |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownGlassTask> selectInputTaskCache(){ |
| | | return baseMapper.selectList(new QueryWrapper<DownGlassTask>().eq("task_status",0).eq("task_type",1)); |
| | | } |
| | | |
| | | /** |
| | | * 查询待出片任务 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DownGlassTask> selectOutTaskCache(){ |
| | | return baseMapper.selectList(new QueryWrapper<DownGlassTask>().eq("task_status",0).eq("task_type",2)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | /** |
| | | * 玻璃id |
| | | */ |
| | | private Integer glassId; |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 小片在格内的顺序 |
| | |
| | | package com.mes.downstorage.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | public interface DownStorageCageDetailsMapper extends BaseMapper<DownStorageCageDetails> { |
| | | // |
| | | // @Select("select * from `glass_info` where id=#{id}") |
| | | // GlassInfo SelectGlassId(String id); |
| | | // 查询笼子内空闲 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot") |
| | | List<DownStorageCageDetails> SelectCacheLeisure(); |
| | | |
| | | // 查询符合工位的出片玻璃 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot left join down_workstation as dw on escd.flow_card_id=dw.flow_card_id WHERE escd.slot IS NOT NULL and dw.workstation_id BETWEEN #{start} and #{end} order by escd.tempering_layout_id,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectCacheOut(int start,int end); |
| | | //SELECT* from (SELECT DISTINCT escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot left join down_workstation as dw on escd.flow_card_id=dw.flow_card_id WHERE escd.slot IS NOT NULL and dw.workstation_id BETWEEN 1 and 5 order by escd.tempering_layout_id,escd.tempering_feed_sequence) as cc ORDER BY cc.width desc |
| | | // 查询笼子内信息 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot") |
| | | List<DownStorageCageDetails> SelectCachInfo(); |
| | | |
| | | // 查询可进此片玻璃的栅格号 找到相同版图id并且大于前面的顺序的空格 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null and escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence, |
| | | double width); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id<#{tempering_layout_id} and esc.remain_width-#{width}>0 order by escd.tempering_layout_id desc,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, double width); |
| | | |
| | | // // 查询全部任务 |
| | | // @Select("select * from down_glass_task") |
| | | // List<DownGlassTask> SelectCacheInfoAll(); |
| | | // |
| | | // // 查询进片任务 |
| | | // @Select("select * from down_glass_task where task_type='1' and task_stauts='0'") |
| | | // List<DownGlassTask> SelectInputCacheInfo(); |
| | | // |
| | | // // 查询出片任务 |
| | | // @Select("select * from down_glass_task where task_type='2' and task_stauts='0'") |
| | | // List<DownGlassTask> SelectOutCacheInfo(); |
| | | |
| | | // 查询 A06 或 A11 最新的一片 出片任务 |
| | | // @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1") |
| | | // GlassInfo SelectLastOutCacheInfo(String EndCell); |
| | | |
| | | // 修改笼子内信息 |
| | | // @Update("update") |
| | | // Integer UpdateCache(@Param("id") Integer id, @Param("order_id") String order_id); |
| | | |
| | | // 添加下片任务 |
| | | @Insert("INSERT into down_glass_task VALUES(#{id},#{start},#{end},#{type},0,)") |
| | | Integer insertCacheTask(String id, String start, String end, String type,double width,double height,Integer filmsId,double thickness,String flowCardId); |
| | | |
| | | public interface DownStorageCageDetailsMapper extends MPJBaseMapper<DownStorageCageDetails> { |
| | | |
| | | } |
| | |
| | | package com.mes.downstorage.service; |
| | | |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | //修改理片笼内信息 |
| | | boolean updatedownStorageCageDetails(DownStorageCageDetails details); |
| | | |
| | | List<DownStorageCageDetails> CacheOut(int start, int end); |
| | | } |
| | |
| | | List<DownStorageCageDetails> getIsExistIntoCacheByLayout(Integer tempering_layout_id, double width); |
| | | List<DownStorageCageDetails> getIsExistIntoCacheByflowcardid(String flowcardid, double width); |
| | | List<DownStorageCageDetails> IsExistIntoCacheByflowcardid(String flowcardid, double width); |
| | | List<Map> selectCacheEmpty(); |
| | | boolean processInto(String Number); |
| | | boolean processOut(); |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | 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.glassinfo.entity.GlassInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DownStorageCageDetailsServiceImpl extends ServiceImpl<DownStorageCageDetailsMapper, DownStorageCageDetails> implements DownStorageCageDetailsService { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private DownStorageCageDetailsMapper downStorageCageDetailsMapper; |
| | | @Override |
| | | public void addDownStorageCageDetails(DownStorageCageDetails details) { |
| | | this.save(details); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> CacheOut(int start, int end) { |
| | | log.info("单片情况根据传入的工位查询符合按照大小出片的小片"); |
| | | return downStorageCageDetailsMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("t.*") |
| | | .leftJoin("(SELECT t1.* FROM down_storage_cage_details t1 " |
| | | + "JOIN (SELECT flow_card_id, MAX(width) AS max_width FROM glass_info GROUP BY flow_card_id) t " |
| | | + "ON t1.flow_card_id = t.flow_card_id WHERE t1.width = t.max_width) t3" |
| | | + " ON t.glass_id = t3.glass_id") |
| | | .leftJoin("down_workstation t4 ON t3.flow_card_id = t4.flow_card_id") |
| | | .isNull(Boolean.parseBoolean("t.glass_id"), "SELECT glass_id FROM down_glass_info") |
| | | .between("t4.workstation_id", start, end) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.S7control; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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.downstorage.service.DownStorageCageService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class DownStorageCageServiceImpl extends MPJBaseServiceImpl<DownStorageCageMapper, DownStorageCage> implements DownStorageCageService { |
| | | public class DownStorageCageServiceImpl extends ServiceImpl<DownStorageCageMapper, DownStorageCage> implements DownStorageCageService { |
| | | @Autowired |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Autowired |
| | | private DownGlassTaskService downGlassTaskService; |
| | | @Autowired |
| | | private DownStorageCageDetailsService downStorageCageDetailsService; |
| | | @Override |
| | | public List<Map> gettask(){ |
| | | downStorageCageMapper.selectList(null); |
| | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheLeisure() { |
| | | log.info(" 查询笼子内空闲"); |
| | | MPJQueryWrapper mpjQueryWrapper = new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNull("escd.slot") |
| | | .orderByAsc("escd.slot"); |
| | | List<DownStorageCageDetails> list = baseMapper.selectJoinList( |
| | | DownStorageCageDetails.class,mpjQueryWrapper |
| | | List<DownStorageCageDetails> list = downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNull("escd.slot") |
| | | .orderByAsc("escd.slot") |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // public List<Map> getCacheOut(int start, int end) { |
| | | // log.info(" 根据传入的工位查询符合按照顺序和大小出片的小片"); |
| | | // List<Map> map = downStorageCageMapper.selectJoinList( |
| | | // Map.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | // .select("escd.*") |
| | | // .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | // .leftJoin("down_workstation dw on escd.flow_card_id = dw.flow_card_id") |
| | | // .isNotNull("escd.slot") |
| | | // .between("dw.workstation_id", start, end) |
| | | // .orderByAsc("escd.tempering_layout_id, escd.tempering_feed_sequence") |
| | | // ); |
| | | // return map; |
| | | // } |
| | | @Override |
| | | public List<Map> selectCacheEmpty(){ |
| | | return baseMapper.selectJoinList( |
| | | Map.class,new MPJQueryWrapper<DownStorageCage>().selectAll(DownStorageCage.class) |
| | | .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | .leftJoin("down_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | .isNull("escd.slot") |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheOut(int start, int end) { |
| | | log.info("根据传入的工位查询符合按照顺序和大小出片的小片"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .leftJoin("down_workstation dw on escd.flow_card_id = dw.flow_card_id") |
| | | .leftJoin("glass_info gi on dw.flow_card_id = gi.flowcard_id and gi.flowcard_id=escd.flow_card_id ") |
| | | .isNotNull("escd.slot") |
| | | .between("dw.workstation_id", start, end) |
| | | .orderByDesc("escd.width") |
| | | .orderByDesc("escd.height"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .leftJoin("down_workstation dw on escd.flow_card_id = dw.flow_card_id") |
| | | .leftJoin("glass_info gi on dw.flow_card_id = gi.flowcard_id and gi.flowcard_id=escd.flow_card_id ") |
| | | .isNotNull("escd.slot") |
| | | .between("dw.workstation_id", start, end) |
| | | .orderByDesc("escd.width") |
| | | .orderByDesc("escd.height") |
| | | ); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public List<Map> getCacheInfo() { |
| | | log.info(" 查询笼子内信息"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .orderByAsc("t.slot"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | Map.class,mpjQueryWrapper |
| | | Map.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .orderByAsc("t.slot") |
| | | ); |
| | | |
| | | } |
| | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByLayoutAndSequence(Integer tempering_layout_id, Integer tempering_feed_sequence, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号 找到相同版图id并且大于前面的顺序的空格"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .eq("escd.tempering_layout_id", tempering_layout_id) |
| | | .lt("escd.tempering_feed_sequence", tempering_feed_sequence) |
| | | .gt("t.remain_width", width) |
| | | .orderByAsc("escd.tempering_feed_sequence"); |
| | | List<DownStorageCageDetails> list = downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .eq("escd.tempering_layout_id", tempering_layout_id) |
| | | .lt("escd.tempering_feed_sequence", tempering_feed_sequence) |
| | | .gt("t.remain_width", width) |
| | | .orderByAsc("escd.tempering_feed_sequence") |
| | | ); |
| | | return list; |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号 找到相同流程卡号的空格"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .eq("escd.flow_card_id", flowcardid) |
| | | .gt("t.remain_width", width) |
| | | .orderByAsc("escd.tempering_feed_sequence"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> IsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .lt("escd.flow_card_id", flowcardid) |
| | | // 条件 t.remain_width - width > 0 |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByDesc("escd.tempering_layout_id, escd.tempering_feed_sequence"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class,mpjQueryWrapper |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .lt("escd.flow_card_id", flowcardid) |
| | | // 条件 t.remain_width - width > 0 |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByDesc("escd.tempering_layout_id, escd.tempering_feed_sequence") |
| | | ); |
| | | |
| | | } |
| | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByLayout(Integer tempering_layout_id, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .lt("escd.tempering_layout_id", tempering_layout_id) |
| | | // 条件 t.remain_width - width > 0 |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByDesc("escd.tempering_layout_id, escd.tempering_feed_sequence"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .lt("escd.tempering_layout_id", tempering_layout_id) |
| | | // 条件 t.remain_width - width > 0 |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByDesc("escd.tempering_layout_id, escd.tempering_feed_sequence") |
| | | ); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 单片情况 查询可进此片玻璃的栅格号 找到相同流程卡号的空格"); |
| | | |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .eq("escd.flow_card_id", flowcardid) |
| | | .gt("t.remain_width", width) |
| | | .orderByAsc("escd.sequence") |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public DownGlassTask createDownGlassTask(GlassInfo glassInfo, String startCell, String endCell,String taskType ) { |
| | | DownGlassTask downGlassTask = new DownGlassTask(); |
| | | downGlassTask.setId(glassInfo.getId()); |
| | | downGlassTask.setStartCell(startCell); |
| | | downGlassTask.setTaskType(taskType); |
| | | downGlassTask.setEndCell(endCell); |
| | | downGlassTask.setWidth(glassInfo.getWidth()); |
| | | downGlassTask.setHeight(glassInfo.getHeight()); |
| | | downGlassTask.setFilmsid(String.valueOf(glassInfo.getFilmsid())); |
| | | downGlassTask.setThickness(glassInfo.getThickness()); |
| | | downGlassTask.setFlowCardId(glassInfo.getFlowcardId()); |
| | | |
| | | return downGlassTask; |
| | | } |
| | | |
| | | |
| | | public DownGlassTask createDownGlassTask(DownStorageCageDetails glassInfo, String startCell, String endCell,String taskType ) { |
| | | DownGlassTask downGlassTask = new DownGlassTask(); |
| | | downGlassTask.setId(glassInfo.getId()); |
| | | downGlassTask.setStartCell(startCell); |
| | | downGlassTask.setTaskType(taskType); |
| | | downGlassTask.setEndCell(endCell); |
| | | downGlassTask.setWidth(glassInfo.getWidth()); |
| | | downGlassTask.setHeight(glassInfo.getHeight()); |
| | | downGlassTask.setFilmsid(String.valueOf(glassInfo.getFilmsid())); |
| | | downGlassTask.setThickness(glassInfo.getThickness()); |
| | | downGlassTask.setFlowCardId(glassInfo.getFlowCardId()); |
| | | |
| | | return downGlassTask; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean processInto(String Number) { |
| | | |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo = glassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | //存在此玻璃编号 |
| | | if (GlassInfo != null) { |
| | | //同找到同流程卡附近空格 |
| | | List<DownStorageCageDetails> list = getIsExistIntoCacheByflowcardid(GlassInfo.getFlowcardId(), GlassInfo.getWidth()); |
| | | |
| | | List<Map> selectCacheEmpty=selectCacheEmpty(); |
| | | |
| | | // list<Map> list=selectCacheEmpty(); |
| | | // list<Map> = downStorageCageService.selectCacheEmpty(); |
| | | if (selectCacheEmpty.size() > 0) { |
| | | //存在空格 |
| | | //1.生成任务: 起始位置0 结束位置this.slot 任务类型 1 (进片任务) |
| | | //2.回复 1进片 |
| | | DownStorageCageDetails item = list.get(0); |
| | | |
| | | //selectInfo.insertCacheTask(GlassInfo.getId() + "", "0", item.getSlot() + "", "1", GlassInfo.getWidth(), GlassInfo.getHeight(), GlassInfo.getFilmsid(), GlassInfo.getThickness(), GlassInfo.getFlowcardId()); |
| | | |
| | | DownGlassTask downGlassTask = createDownGlassTask(GlassInfo,"0",item.getSlot()+"","1"); |
| | | |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | |
| | | |
| | | //完成后插入小片数据到缓存表 |
| | | return true; |
| | | } |
| | | |
| | | } else { |
| | | // ID编号不存在 不处理/回复PLC 进行报警提示 |
| | | } |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 理片 出 |
| | | * @return |
| | | */ |
| | | // |
| | | @Override |
| | | public boolean processOut() { |
| | | // 查询任务 |
| | | |
| | | |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | |
| | | List<DownStorageCageDetails> list = downStorageCageDetailsService.CacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = downStorageCageDetailsService.CacheOut(6, 10); |
| | | List<DownStorageCageDetails> list3 = downStorageCageDetailsService.CacheOut(1, 10); |
| | | //自动绑定架子 |
| | | |
| | | |
| | | |
| | | |
| | | // 优先 超出尺寸优先人工出片 人工处理 |
| | | |
| | | if (!list3.isEmpty()) { |
| | | DownStorageCageDetails item3 = list3.get(0); |
| | | if (item3.getHeight() >= 1 && item3.getWidth() >= 1) { |
| | | |
| | | String endcell = "13"; |
| | | String SendEndcell = "1"; |
| | | |
| | | // selectInfo.insertCacheTask(item3.getGlassId() + "", "0", endcell, "2", item3.getWidth(), item3.getHeight(), item3.getFilmsid(), item3.getThickness(), item3.getFlowCardId()); |
| | | |
| | | DownGlassTask downGlassTask =createDownGlassTask(item3,"0",endcell,"2"); |
| | | |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | | //如果同时前后端都空闲 优先后端出片并且优先满架 |
| | | else if (!list2.isEmpty()) { |
| | | |
| | | DownStorageCageDetails item3 = list2.get(0); |
| | | String endcell = "11"; |
| | | String SendEndcell = "1"; |
| | | // selectInfo.insertCacheTask(item3.getGlassId() + "", "0", endcell, "2", item3.getWidth(), item3.getHeight(), item3.getFilmsid(), item3.getThickness(), item3.getFlowCardId()); |
| | | DownGlassTask downGlassTask =createDownGlassTask(item3,"0",endcell,"2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | |
| | | } |
| | | // 按照大小符合前端出片 |
| | | else if (!list.isEmpty()) { |
| | | DownStorageCageDetails item = list.get(0); |
| | | |
| | | // 出到 G06 |
| | | //selectInfo.insertCacheTask(item.getGlassId() + "", "0", "06", "2", item.getWidth(), item.getHeight(), item.getFilmsid(), item.getThickness(), item.getFlowCardId()); |
| | | |
| | | DownGlassTask downGlassTask =createDownGlassTask(item,"0","06","2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | |
| | | // 按照大小符合后端出片 |
| | | } else if (!list2.isEmpty()) { |
| | | DownStorageCageDetails item2 = list2.get(0); |
| | | |
| | | // 出到 G11 |
| | | // selectInfo.insertCacheTask(item2.getGlassId() + "", "0", "11", "2", item2.getWidth(), item2.getHeight(), item2.getFilmsid(), item2.getThickness(), item2.getFlowCardId()); |
| | | DownGlassTask downGlassTask =createDownGlassTask(item2,"0","11","2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | // 返回结果 |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation("获取工位显示图") |
| | | @GetMapping("/getwo") |
| | | public ResponseEntity<Map<String, Object>> getwo() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getTotalGlassDimensionsByWorkstation(); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | | return ResponseEntity.ok(responseData); |
| | | } catch (Exception e) { |
| | | responseData.put("code", 500); |
| | | responseData.put("msg", "失败"); |
| | | responseData.put("data", null); |
| | | return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseData); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.data.annotation.Id; |
| | | import javax.persistence.GeneratedValue; |
| | | import javax.persistence.GenerationType; |
| | | //import javax.persistence.Id; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | * id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | |
| | | |
| | | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| | | private Long id; |
| | | |
| | | /** |
New file |
| | |
| | | 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;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | /**
|
| | | * <p>
|
| | | *
|
| | | * </p>
|
| | | *
|
| | | * @author zhoush
|
| | | * @since 2024-03-27
|
| | | */
|
| | | @Data
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | |
|
| | | public class DownWorkstionAndDownGlassinfo
|
| | | {
|
| | | /**
|
| | | * 下片工位表id
|
| | | */
|
| | | @TableId(value = "id", type = IdType.AUTO)
|
| | | private Integer id;
|
| | |
|
| | | /**
|
| | | * 工位id
|
| | | */
|
| | | private Integer workstationId;
|
| | |
|
| | | /**
|
| | | * 流程卡号
|
| | | */
|
| | | private String flowCardId;
|
| | |
|
| | | /**
|
| | | * 设备id
|
| | | */
|
| | | private Integer deviceId;
|
| | |
|
| | | /**
|
| | | * 启用状态
|
| | | */
|
| | | private Integer enableState;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | private Integer workState;
|
| | |
|
| | |
|
| | | @TableField("total_quantity")
|
| | | private Integer totalquantity;
|
| | |
|
| | | @TableField("racks_number")
|
| | | private Integer Racksnumber;
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 顺序
|
| | | */
|
| | | private Integer sequence;
|
| | |
|
| | | /**
|
| | | * 宽
|
| | | */
|
| | | private Double width;
|
| | |
|
| | | /**
|
| | | * 高
|
| | | */
|
| | | private Double height;
|
| | | private Double totalwidth;
|
| | |
|
| | | private Double totalheight;
|
| | | /**
|
| | | * 厚度
|
| | | */
|
| | | private Double thickness;
|
| | |
|
| | |
|
| | | private String Filmsid;
|
| | | }
|
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源 |
| | | |
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> { |
| | | public interface DownWorkstationMapper extends MPJBaseMapper<DownWorkstation> { |
| | | |
| | | |
| | | //查询工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | @Select("SELECT dwt.flow_card_id,dw.id,dw.racks_number FROM down_workstation_task dwt JOIN down_workstation dw ON dwt.flow_card_id = dw.flow_card_id WHERE dwt.state = 1 LIMIT 1") |
| | | List<DownWorkstation> selectdownWorkstationstate(); |
| | | |
| | | |
| | | // @Select("SELECT flow_card_id,filmsid,width,height,thickness FROM down_glass_task WHERE task_stauts = 1;") |
| | | // List<DownGlassTask> selectunloadingtaskstate(); |
| | | //更新落架数量 |
| | | // @Update("UPDATE down_workstation SET racks_number = #{racksNumber} " + |
| | | // "WHERE flow_card_id = #{flowCardId}") |
| | | // void update_racks_number(@Param("flowCardId") String flowCardId, |
| | | // @Param("racksNumber") Integer racksNumber); |
| | | |
| | | //插入机械任务表 |
| | | // @Insert("INSERT INTO down_workstation_task (flow_card_id, width, height, thickness, filmsid,state) " + |
| | | // "VALUES (#{flowCardId}, #{width}, #{height}, #{thickness}, #{filmsid},1)") |
| | | // void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | |
| | | //根据工位id更新实体类接收的数据 |
| | | // @Update("UPDATE down_workstation SET width = #{width}, height = #{height}, flow_card_id = #{flowCardId} WHERE workstation_id = #{workstationId}") |
| | | // void updateFlowCardId(DownWorkstation downWorkstation); |
| | | |
| | | |
| | | // @Update("UPDATE down_workstation_task SET state = 0 WHERE flow_card_id = #{flowCardId}") |
| | | // void update_task_state_to_zero(@Param("flowCardId") String flowCardId); |
| | | |
| | | |
| | | // @Select("SELECT * FROM down_workstation WHERE workstation_id BETWEEN #{startId} AND #{endId}") |
| | | // List<DownWorkstation> getDownWorkstationsInRange(@Param("startId") int startId, @Param("endId") int endId); |
| | | |
| | | |
| | | // @Select("SELECT DISTINCT flowcard_id from glass_info") |
| | | // @ResultType(Map.class) |
| | | // List<Map<String, Object>> getflowCardId(); |
| | | |
| | | // @Update("UPDATE down_workstation SET flow_card_id = NULL, total_quantity = 0, racks_number = 0 WHERE workstation_id = #{workstationId}") |
| | | // void clearFlowCardInfoByWorkstationId(@Param("workstationId") int workstationId); |
| | | |
| | | // 获取总数量 |
| | | // @Select("SELECT total_quantity FROM down_workstation WHERE workstation_id = #{workstationId}") |
| | | // int getTotalQuantity(@Param("workstationId") int workstationId); |
| | | |
| | | // 获取落架数量 |
| | | // @Select("SELECT racks_number FROM down_workstation WHERE workstation_id = #{workstationId}") |
| | | // int getRacksNumber(@Param("workstationId") int workstationId); |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @DS("salve_hangzhoumes") |
| | | public interface DownWorkstationTaskMapper extends BaseMapper<DownWorkstationTask> { |
| | | |
| | | List<DownWorkstationTask> selectList(); |
| | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | |
| | | |
| | | void insertdownglassinfo(); |
| | | List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(); |
| | | } |
| | |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | |
| | | void updateTaskStateToZero(long Id); |
| | | |
| | | List<DownWorkstationTask> getTaskState(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.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.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.entity.DownWorkstionAndDownGlassinfo; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DownWorkstationServiceImpl extends ServiceImpl<DownWorkstationMapper, DownWorkstation> implements DownWorkstationService { |
| | | |
| | | @Autowired |
| | | private DownWorkstationMapper downWorkstationMapper; |
| | | @Autowired |
| | | private DownWorkstationTaskMapper downWorkstationTaskMapper; |
| | | @Autowired |
| | | private DownGlassInfoService downGlassInfoService; |
| | | @Autowired |
| | | private DownGlassInfoMapper downGlassInfoMapper; |
| | | @Autowired |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | |
| | | @Autowired |
| | | private DownWorkstationTaskService downWorkstationTaskService; |
| | | |
| | | // @Override |
| | | // public List<DownWorkstation> gettwoDownWorkstations() { |
| | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getTotalquantity() : 0; |
| | | } |
| | | //工位显示 |
| | | @Override |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation() { |
| | | MPJQueryWrapper<DownWorkstionAndDownGlassinfo> queryWrapper = new MPJQueryWrapper<>(); |
| | | queryWrapper.select("t.workstation_id", "t.flow_card_id", "COALESCE(SUM(b.width), 0) AS totalwidth", "COALESCE(SUM(b.height), 0) AS totalheight") |
| | | .leftJoin("down_glass_info b on t.flow_card_id = b.flow_card_id") |
| | | .groupBy("t.workstation_id", "t.flow_card_id"); |
| | | |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DownWorkstionAndDownGlassinfo downWorkstionAndDownGlassinfo : workstationList) { |
| | | Map<String, Object> rack = new HashMap<>(); |
| | | |
| | | // 创建子项(item)对象 |
| | | Map<String, Object> item = new HashMap<>(); |
| | | item.put("height", downWorkstionAndDownGlassinfo.getTotalheight()); // 设置子项高度,根据实际情况设置 |
| | | item.put("width", downWorkstionAndDownGlassinfo.getTotalwidth()); // 设置子项宽度,根据实际情况设置 |
| | | item.put("fillColor", "yellow"); // 设置子项颜色 |
| | | item.put("content", downWorkstionAndDownGlassinfo.getFlowCardId()); // 使用流程卡号作为子项内容 |
| | | |
| | | rack.put("item", item); // 将子项对象放入货架对象中 |
| | | |
| | | result.add(rack); // 将货架对象添加到结果列表中 |
| | | //log.info("货架对象: {}", rack); |
| | | } |
| | | |
| | | return result; // 返回最终结果 |
| | | } |
| | | |
| | | |
| | | |
| | | // @Override |
| | | // public int getTotalQuantity(int workstationId) { |
| | |
| | | |
| | | |
| | | |
| | | public DownWorkstation selectByFlowCardId(String flowcardid) { |
| | | QueryWrapper<DownWorkstation> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flow_card_id", flowcardid); |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void insertdownglassinfo() { |
| | | |
| | | |
| | | |
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState(); |
| | | // |
| | | |
| | | |
| | | if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) { |
| | | |
| | | // |
| | | |
| | | for (DownGlassTask downGlassInfo : taskdownGlassInf) { |
| | | // 创建新的 DownGlassInfo 对象并设置相关属性 |
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo(); |
| | | |
| | | newdownGlassInfo.setFlowCardId(downGlassInfo.getFlowCardId()); |
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | // 初始化顺序字段值 |
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1; |
| | | // newdownGlassInfo.setId(downGlassInfo.getId()); |
| | | newdownGlassInfo.setWidth(downGlassInfo.getWidth()); |
| | | newdownGlassInfo.setHeight(downGlassInfo.getHeight()); |
| | | newdownGlassInfo.setThickness(downGlassInfo.getThickness()); |
| | | newdownGlassInfo.setFilmsid(downGlassInfo.getFilmsid()); |
| | | // 设置顺序字段值 |
| | | newdownGlassInfo.setSequence(sequence); |
| | | |
| | | // 插入数据到下片玻璃信息表 |
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo); |
| | | //插入数据到机械手任务表 |
| | | |
| | | downWorkstationTaskService.insertdownWorkstationtask(newdownGlassInfo); |
| | | //更新下片任务表状态为0 |
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getId()); |
| | | //删除下片任务表中的记录 |
| | | downGlassTaskService.deleteTask(downGlassInfo.getFlowCardId()); |
| | | |
| | | sequence++; // 递增顺序字段值 |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | try { |
| | | //查询下片工位表中架子是否绑定了流程卡号 工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | List<DownWorkstationTask> taskdownWorkstation = downWorkstationTaskService.getTaskState(); |
| | | if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) { |
| | | //,如果已经绑定则更新已落架数量,并且删除下片任务表中的记录 |
| | | for (DownWorkstationTask downWorkstation : taskdownWorkstation) { |
| | | //更新下片工位表中已落架数量 |
| | | DownWorkstation downWorkstation1 = selectByFlowCardId(downWorkstation.getFlowCardId()); |
| | | updateracksnumber(downWorkstation.getFlowCardId(),downWorkstation1.getRacksnumber() + 1); |
| | | //更新机械任务表中状态为0 |
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getId()); |
| | | //删除机械任务表 |
| | | downWorkstationTaskService.removeById(downWorkstation.getId()); |
| | | |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // 打印异常信息 |
| | | e.printStackTrace(); |
| | | // 或者可以进行其他异常处理,比如记录日志或者返回特定的错误信息 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | public void insertdownWorkstationtask(DownGlassInfo downGlassInfo) { |
| | | DownWorkstationTask entity = new DownWorkstationTask(); |
| | | // 查询当前最大的 id 值 |
| | | Long maxId = getMaxId(); |
| | | // 如果没有记录,则将 id 设置为 1;否则,将 id 设置为当前最大 id 值加 1 |
| | | Long newId = (maxId == null) ? 1 : maxId + 1; |
| | | |
| | | entity.setId(newId); // 设置手动递增的 id |
| | | entity.setFlowCardId(downGlassInfo.getFlowCardId()); |
| | | entity.setWidth(downGlassInfo.getWidth()); |
| | | entity.setHeight(downGlassInfo.getHeight()); |
| | |
| | | baseMapper.insert(entity); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 查询最大的 ID |
| | | private Long getMaxId() { |
| | | QueryWrapper<DownWorkstationTask> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("MAX(id) as max_id"); |
| | | List<Object> list = baseMapper.selectObjs(wrapper); |
| | | if (list != null && !list.isEmpty()) { |
| | | Object obj = list.get(0); |
| | | if (obj != null) { |
| | | return Long.parseLong(obj.toString()); |
| | | } |
| | | } |
| | | // 如果没有查询到结果,则返回 0 |
| | | return 0L; |
| | | } |
| | | @Override |
| | | public List<DownWorkstationTask> getTaskState() { |
| | | QueryWrapper<DownWorkstationTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("state", 1); |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | @Override |
| | | public void updateTaskStateToZero(long id) { |
| | | UpdateWrapper<DownWorkstationTask> updateWrapper = new UpdateWrapper<>(); |
| | |
| | | package com.mes.glassinfo.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("flow_card_Id") |
| | | private String flowcardId; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private Integer engineerId; |
| | | private String engineerId; |
| | | |
| | | /** |
| | | * 生产规则id |
| | | */ |
| | | private Integer ruleId; |
| | | |
| | | |
| | | /** |
| | | * 玻璃id |
| | | */ |
| | | private String glassId; |
| | | } |
| | |
| | | public interface GlassInfoMapper extends BaseMapper<GlassInfo> { |
| | | |
| | | |
| | | // @Select("SELECT COUNT(*) FROM glass_info WHERE flowcard_id = #{flowCardId}") |
| | | // int getGlassInfoCountByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | |
| | | // @Update("UPDATE down_workstation SET total_quantity = #{glassInfoCount},flow_card_id=#{flowCardId} WHERE workstation_id = #{workstationId}") |
| | | // int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount,@Param("workstationId")int workstationId); |
| | | |
| | | } |
| | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flowcard_id", flowCardId); |
| | | queryWrapper.eq("flow_card_id", flowCardId); |
| | | |
| | | return baseMapper.selectCount(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getFlowCardId() { |
| | | return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flowcard_id")); |
| | | return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flow_card_id")); |
| | | } |
| | | |
| | | |
| | |
| | | @Override |
| | | public GlassInfo selectGlassId(String id) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("id", id); |
| | | queryWrapper.eq("glass_id", id); |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | |
| | | |
| | | import com.mes.UnLoadGlassApplication; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downstorage.service.impl.DownStorageCageServiceImpl; |
| | | |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.impl.DownWorkstationServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | |
| | | |
| | | @Autowired |
| | | DownStorageCageServiceImpl downStorageCageServiceImpl; |
| | | @Autowired |
| | | DownStorageCageDetailsService downStorageCageDetailsService; |
| | | @Autowired |
| | | DownWorkstationServiceImpl downWorkstationServiceImpl; |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | |
| | | |
| | | @Test |
| | | public void testCacheGlass() { |
| | | List<Map> map= downStorageCageServiceImpl.getCacheInfo(); |
| | | List<Map> map = downStorageCageServiceImpl.getCacheInfo(); |
| | | log.info("笼内信息:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | @Test |
| | | public void testselectCacheEmpty() { |
| | | List<DownStorageCageDetails> map= downStorageCageServiceImpl.getCacheLeisure(); |
| | | List<DownStorageCageDetails> map = downStorageCageServiceImpl.getCacheLeisure(); |
| | | log.info("笼内空格:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void testgetCacheOut() { |
| | | List<DownStorageCageDetails> map= downStorageCageServiceImpl.getCacheOut(1,5); |
| | | List<DownStorageCageDetails> map = downStorageCageServiceImpl.getCacheOut(1, 5); |
| | | log.info("根据传入的工位查询符合按照顺序和大小出片的小片:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testupdateFlowCardIdAndCount() { |
| | | log.info("绑定流程卡号和数量"); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("1", 1, 1); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testplc() { |
| | | log.info("测试"); |
| | | downWorkstationServiceImpl.insertdownglassinfo(); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testin() { |
| | | log.info("测试进片"); |
| | | downStorageCageServiceImpl.getIsExistIntoCacheByflowcardid("NG2023005",500); |
| | | |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void selectCacheEmpty() { |
| | | log.info("测试进片"); |
| | | downStorageCageServiceImpl.selectCacheEmpty(); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void CacheEmpty() { |
| | | log.info("测试出片"); |
| | | downStorageCageDetailsService.CacheOut(1,5); |
| | | |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void getTotalGlassDimensionsByWorkstation() { |
| | | log.info("工位显示"); |
| | | downWorkstationServiceImpl.getTotalGlassDimensionsByWorkstation(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |