公共yml文件 ip 改回10.153.19.150
56个文件已修改
36个文件已添加
2个文件已删除
| | |
| | | export default { |
| | | serverUrl: "10.153.19.150:88/api", |
| | | serverUrl: "127.0.0.1:88/api", |
| | | //serverUrl: "localhost:88/api/", |
| | | serverUrl2: "10.153.19.150:88" |
| | | //serverUrl:"res.abeim.cn" |
| | |
| | | |
| | | //提取菜单模块列表 |
| | | let menuList = $ref([]) |
| | | request.get('/loadGlass/menu/sysMenu/list').then((res) => { |
| | | // request.get('/loadGlass/menu/sysMenu/list').then((res) => { |
| | | request.get('/loadGlass/sys/menu/getMenuTree').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = deepClone(res.data) |
| | | } else { |
| | |
| | | import { createRouter, createWebHistory } from 'vue-router' |
| | | import HomeView from '../views/HomeView.vue' |
| | | import {createRouter, createWebHashHistory} from 'vue-router' |
| | | |
| | | import User from '../views/sys/User.vue' |
| | | import Role from '../views/sys/Role.vue' |
| | | import Menu from '../views/sys/Menu.vue' |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(import.meta.env.BASE_URL), |
| | | history: createWebHashHistory(), |
| | | routes: [ |
| | | { |
| | | path: '/', |
| | |
| | | component: () => import('../views/Caching/caching.vue'), |
| | | children:[ |
| | | { |
| | | path: '/Caching/caching', |
| | | name: 'caching', |
| | | component: () => import('../views/Caching/caching.vue') |
| | | path: '/Caching/cachingbefore', |
| | | name: 'cachingbefore', |
| | | component: () => import('../views/Caching/cachingbefore.vue') |
| | | }, |
| | | { |
| | | path: '/Caching/cachingun', |
| | | name: 'cachingun', |
| | | component: () => import('../views/Caching/cachingun.vue') |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | /*----------- 管理系统 ----------------*/ |
| | | { |
| | | path: 'sys', |
| | | name: 'screen', |
| | | component: () => import('../views/Visualization/screen.vue'), |
| | | children: [ |
| | | { |
| | | path: '/sys/users', |
| | | name: 'SysUser', |
| | | component: User |
| | | }, |
| | | { |
| | | path: '/sys/roles', |
| | | name: 'SysRole', |
| | | component: Role |
| | | }, |
| | | { |
| | | path: '/sys/menus', |
| | | name: 'SysMenu', |
| | | component: Menu |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/Slicecage/slicecage' |
| | |
| | | <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) |
| | | |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from "vue-router"; |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | }); |
| | | |
| | | 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> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | | @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="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> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <!-- <div id="main-div"> --> |
| | | |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </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> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | #main-div{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | #div-title{ |
| | | height: 2%; |
| | | width: 100%; |
| | | } |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | | #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() |
| | | const adda = ref(false) |
| | | |
| | | 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 slot = ref('') |
| | | |
| | | |
| | | request.post("/cacheGlass/edgStorageCage/selectEdgStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | console.log(res.data); |
| | | tableData.value = res.data |
| | | console.log(res.data[0].slot); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | |
| | | // const getTableRow = (row,type) =>{ |
| | | // switch (type) { |
| | | // case 'delete':{ |
| | | // let flowData = ref({ |
| | | // id:0, |
| | | // slot:row.slot |
| | | // }) |
| | | // request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass",flowData.value).then((res) => { |
| | | // if(res.code==200){ |
| | | // ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | // router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}}) |
| | | // }else{ |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }) |
| | | |
| | | // return |
| | | // } |
| | | // } |
| | | // } |
| | | // let slots = ref({ |
| | | // id:0, |
| | | // slot: slot.value |
| | | // }) |
| | | const open = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const deleteResponse = await request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass", { |
| | | id:0, |
| | | slot: row.slot |
| | | }) |
| | | if (response.code == 200) { |
| | | // 删除成功,您可以根据需要处理成功的情况 |
| | | alert('删除成功!'); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // const open = () => { |
| | | // ElMessageBox.confirm( |
| | | // '是否删除该条信息?', |
| | | // '提示', |
| | | // { |
| | | // confirmButtonText: '是', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning', |
| | | // } |
| | | // ) |
| | | // .then(() => { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '删除成功!', |
| | | // }) |
| | | // }) |
| | | // .catch(() => { |
| | | // ElMessage({ |
| | | // type: 'info', |
| | | // message: '删除失败', |
| | | // }) |
| | | // }) |
| | | // } |
| | | // 删除 |
| | | // const handleBindRacka = (row) => { |
| | | // adda.value = true; // 打开绑定架子对话框 |
| | | // }; |
| | | // // 删除 |
| | | // const handleConfirma = async () => { |
| | | // try { |
| | | // window.localStorage.setItem('slot', res.data.slot) |
| | | // let slot = window.localStorage.getItem('slot') |
| | | // const response = await request.post('/cacheGlass/edgStorageCage/edgStorageCageGlass', { |
| | | // slot: slot.value, |
| | | // id: 0 |
| | | // }); |
| | | |
| | | // if (response.code == 200) { |
| | | // // 绑定成功,处理逻辑 |
| | | // ElMessage.success(response.message); |
| | | // adda.value = false; |
| | | // } else { |
| | | // // 请求失败,显示错误消息 |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } catch (error) { |
| | | // // 处理错误 |
| | | // console.error(error); |
| | | // } |
| | | // }; |
| | | |
| | | 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> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="slot" align="center" label="栅格号" min-width="80" /> |
| | | <el-table-column prop="glass_id" align="center" label="玻璃编号" min-width="80" /> |
| | | <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 |
| | | align="center" |
| | | label="启用状态" |
| | | min-width="80" |
| | | prop="enable_state" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.enable_state==1?"启用":"未启用" }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <!-- <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">报缺</el-button> --> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">报缺</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <!-- <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> |
| | | <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> |
| | | |
| | | <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{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #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> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | | @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="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> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </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> |
| | | |
| | | <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{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | | color: black; |
| | | width: 200px; |
| | | height: 100px; |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | height: 460px; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-card style="margin-left: 10px; margin-top: 10px; margin-right: 10px;" v-loading="loading"> |
| | | <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> |
| | | <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> |
| | | <!-- <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> --> |
| | | <div id="app" style="margin-top: 20px;"> |
| | | <div |
| | | :style="{ width: `${olWidth}px`, height: `${olHeight}px`,position: 'relative' }" |
| | | > |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.y_axis}px`, left: `${rect.x_axis}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <!-- 箭头 --> |
| | | <div id="arrow"></div> |
| | | <div id="line"></div> |
| | | <!-- <div class="centered-text" >NG24030401B01</div> --> |
| | | <div class="centered-text"> |
| | | <div>{{ rect.process_id }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> --> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | | <rect |
| | | :x="rack.x" |
| | | :y="rack.y" |
| | | :width="rack.width" |
| | | :height="rack.height" |
| | | :fill="rack.fillColor" |
| | | :data-index="index" |
| | | class="rack-rect" |
| | | style="stroke:#c8c9cc;stroke-width:3;" |
| | | @click="showRectInfo(rack)" |
| | | /> |
| | | <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)" |
| | | :y="calculateItemYPosition(rack, item, itemIndex)" |
| | | :width="item.width" |
| | | :height="item.height" |
| | | :fill="item.fillColor" |
| | | /> |
| | | </g> |
| | | </g> |
| | | </svg> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Swal from 'sweetalert2' |
| | | import request from "@/utils/request"; |
| | | |
| | | |
| | | request.get("/TidyUpGlassModule/CurrentCutTerritory").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }); |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | racks: [ |
| | | { |
| | | x: 70, y: 126, width: 600, height: 240, fillColor: '#93d2f3', |
| | | items: [ |
| | | { position: 'top-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG123456',y: '20'}, |
| | | { position: 'bottom-left', width: 40, height: 30, fillColor: '#ffffff', content: 'NG1234567' }, |
| | | { 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 |
| | | ], |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | calculateItemXPosition(rack, item, index) { |
| | | if (item.position === 'top-right' || item.position === 'bottom-right') { |
| | | return Math.min(rack.x + rack.width - item.width, rack.x + rack.width); |
| | | } else { |
| | | return rack.x; |
| | | } |
| | | }, |
| | | |
| | | calculateItemYPosition(rack, item, index) { |
| | | if (item.position === 'bottom-left' || item.position === 'bottom-right') { |
| | | return Math.min(rack.y + rack.height - item.height, rack.y + rack.height); |
| | | } else { |
| | | return rack.y; |
| | | } |
| | | }, |
| | | |
| | | showCustomAlert(content) { |
| | | Swal.fire({ |
| | | // type: 'warning', // 弹框类型 |
| | | title: '该片玻璃状态', //标题 |
| | | // text: "注销后将无法恢复,请谨慎操作!", //显示内容 |
| | | |
| | | confirmButtonColor: '#3085d6',// 确定按钮的 颜色 |
| | | confirmButtonText: '人工拿走',// 确定按钮的 文字 |
| | | showCancelButton: true, // 是否显示取消按钮 |
| | | cancelButtonColor: '#d33', // 取消按钮的 颜色 |
| | | cancelButtonText: "破损", // 取消按钮的 文字 |
| | | |
| | | // focusCancel: true, // 是否聚焦 取消按钮 |
| | | reverseButtons: true // 是否 反转 两个按钮的位置 默认是 左边 确定 右边 取消 |
| | | }).then((isConfirm) => { |
| | | <script setup> |
| | | import { ref, onMounted } from 'vue'; |
| | | import request from "@/utils/request" |
| | | const olWidth = ref(); |
| | | const olHeight = ref(); |
| | | const process_id = ref(); // 用于存储process_id的响应式引用 |
| | | // const rects = ref([]); // 用于存储矩形数据的响应式引用 |
| | | const adjustedRects = ref([]); |
| | | onMounted(async () => { |
| | | try { |
| | | //判断 是否 点击的 确定按钮 |
| | | if (isConfirm.value) { |
| | | Swal.fire("人工拿走", "点击了人工拿走", "success"); |
| | | } |
| | | else { |
| | | Swal.fire("破损", "点击了破损", "error"); |
| | | } |
| | | } catch (e) { |
| | | alert(e); |
| | | } |
| | | }); |
| | | }, |
| | | const response = await request.post('/cacheGlass/taskCache/currentCutTerritory'); // 替换为你的API端点 |
| | | if (response.code === 200) { |
| | | // const process_id = response.data[0].process_id |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { olWidth: newolWidth, olHeight: newolHeight, process_id: newprocess_id } = response.data; // 获取尺寸 |
| | | olWidth.value = newolWidth; // 设置容器宽度 |
| | | olHeight.value = newolHeight; // 设置容器高度 |
| | | process_id.value = newprocess_id; |
| | | |
| | | showRectInfo(rectInfo) { |
| | | const contents = rectInfo.items.map(item => item.content).join(', '); |
| | | this.$nextTick(() => { |
| | | this.showCustomAlert(contents); |
| | | }); |
| | | }, |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | x_axis: (rect.x_axis*100) * 0.005, // 将x值除以3 |
| | | y_axis: (rect.y_axis*100) * 0.005, |
| | | width: (rect.width*100) * 0.004 , |
| | | height:( rect.height*100) * 0.004 , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | }; |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | width: 100%; |
| | | height: 80vh; |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | background-color: lightblue; /* 设置矩形的背景色 */ |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | .custom-popover-class { |
| | | background-color: lightgrey; |
| | | color: black; |
| | | border: 1px solid black; |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |
| | | /* 其他样式 */ |
| | | } |
| | | |
| | | #home-card { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | padding: 10px 0px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | #home-item { |
| | | border-style: solid; |
| | | border-width: 1px; |
| | | border-color: #E4E4E4; |
| | | width: calc(34% - 20px); |
| | | padding: 20px 0px 20px 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | /* align-items: center; */ |
| | | background: #fff; |
| | | #home-img { |
| | | display: inline-block; |
| | | width: 160px; |
| | | height: 60px; |
| | | margin: 0; |
| | | padding: 0; |
| | | #arrow { |
| | | position: absolute; |
| | | top: 70%; /* 箭头位于矩形中间 */ |
| | | left: 200px; /* 箭头在矩形左侧一些距离 */ |
| | | transform: translateY(-50%); /* 垂直居中 */ |
| | | width: 0; |
| | | height: 0; |
| | | border-top: 10px solid transparent; /* 上边框 */ |
| | | border-bottom: 10px solid transparent; /* 下边框 */ |
| | | border-right: 20px solid #911005; /* 右边框,形成箭头 */ |
| | | /* 根据需要调整边框大小和颜色 */ |
| | | } |
| | | #home-right { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | margin-left: 10px; |
| | | #home-num { |
| | | font-size: 40px; |
| | | margin: 5px 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #line { |
| | | position: absolute; |
| | | top: 70%; /* 直线位于矩形中间 */ |
| | | left: 210px; /* 直线在箭头右侧一些距离 */ |
| | | transform: translateY(-50%); /* 垂直居中 */ |
| | | height: 2px; /* 直线的高度 */ |
| | | width: 240px; /* 直线的长度,根据需要调整 */ |
| | | background-color: #911005; /* 直线的颜色 */ |
| | | } |
| | | </style> |
| | |
| | | if (valid) { |
| | | loginLoadings.value = true |
| | | request |
| | | .post('/loadGlass/userinfo/login', userForm) |
| | | // .post('/loadGlass/userinfo/login', userForm) |
| | | .post('/loadGlass/sys/user/login', userForm) |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | | store.$patch({user: res.data}) |
| | |
| | | ElMessage.success(`登录成功`) |
| | | } else { |
| | | ElMessage.error(res['msg']) |
| | | store.$patch({ |
| | | user: null, |
| | | }) |
| | | loginLoadings.value = false |
| | | return false |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | ElMessage.error('服务器连接失败') |
| | | store.$patch({ |
| | | user: null, |
| | | }) |
| | | loginLoadings.value = false |
| | | return false |
| | | }) |
| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | |
| | | import { ref } from 'vue' |
| | | import { ref, onMounted } from 'vue'; |
| | | // import { ref } from 'vue' |
| | | |
| | | const dialogFormVisible = ref(true) |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | | const width = ref(); // 用于存储process_id的响应式引用 |
| | | const height = ref(); // 用于存储process_id的响应式引用 |
| | | const adjustedRects = ref([]); |
| | | const adjustedRectsa = ref([]); |
| | | const adjustedRectsb = ref([]); |
| | | // 进炉中 |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.get('/temperingGlass/temperingGlassInfo/SelectIntoGlass'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { height: newheight,width: newwidth } = response.data; // 获取尺寸 |
| | | height.value = newheight; |
| | | width.value = newwidth; |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xcoordinate, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate, |
| | | width: rect.width , |
| | | height: rect.height , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | // 进炉前 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/SelectWaitingGlass'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { height: newheight,width: newwidth } = response.data; // 获取尺寸 |
| | | height.value = newheight; |
| | | width.value = newwidth; |
| | | |
| | | adjustedRectsa.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xcoordinate, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate, |
| | | width: rect.width , |
| | | height: rect.height , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }; |
| | | |
| | | // 已出炉 |
| | | const handleConfirma = async () => { |
| | | try { |
| | | const response = await request.get('/temperingGlass/temperingGlassInfo/SelectOutGlass'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { height: newheight,width: newwidth } = response.data; // 获取尺寸 |
| | | height.value = newheight; |
| | | width.value = newwidth; |
| | | |
| | | adjustedRectsb.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xcoordinate, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate, |
| | | width: rect.width , |
| | | height: rect.height , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }; |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | |
| | | <template> |
| | | <div style="margin-top: 10px;"> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false">摆片版图</el-button> |
| | | <el-button id="searchButton" type="success" @click="dialogFormVisiblea = true;dialogFormVisible = false">已出炉玻璃</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">进炉中</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="handleConfirm();dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >进炉前</el-button> |
| | | <el-button id="searchButton" type="success" @click="handleConfirma();dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">已出炉玻璃</el-button> |
| | | <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="display: flex;margin-bottom: 20px;"> |
| | | <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: 200px;height: 300px;margin-left: 70px;"> |
| | | <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 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> --> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="630px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <div id="boxa" style="width: 200px;height: 300px;margin-left: 70px;"> |
| | | <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 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-scrollbar> |
| | | </el-card> |
| | | </div> |
| | | <div v-if="dialogFormVisiblea"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <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 style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </div> |
| | | <div v-if="dialogFormVisibleb"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="630px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | } |
| | | } |
| | | } |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | background-color: lightblue; /* 设置矩形的背景色 */ |
| | | } |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |
| | | /* 其他样式 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | </style> |
| | |
| | | }) |
| | | const tableDataa = ref([]) |
| | | |
| | | const requestData = { |
| | | // projectNo:"P24030805", |
| | | state:100 |
| | | }; |
| | | |
| | | const tableData = reactive([]); |
| | | // let filterData = ref({ |
| | |
| | | processType: [], |
| | | |
| | | }) |
| | | const getBasicData = ref({ |
| | | id: '', |
| | | projectNo: '', |
| | | }) |
| | | request.post("/loadGlass/optimizeProject/listByState", requestData) |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | | titleSelectJson.value.processType = res.data; |
| | | console.log(res.data); |
| | | // const getBasicData = ref({ |
| | | // id: '', |
| | | // projectNo: '', |
| | | // }) |
| | | // const requestData = { |
| | | // // projectNo:"P24030805", |
| | | // state:100 |
| | | // }; |
| | | // request.post("/loadGlass/optimizeProject/listByState", requestData) |
| | | // .then((res) => { |
| | | // if (res.code == 200) { |
| | | // titleSelectJson.value.processType = res.data; |
| | | // console.log(res.data); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // // router.push("/login") |
| | | // } |
| | | // }); |
| | | // 初始请求参数 |
| | | const requestData = { |
| | | state: 100 |
| | | }; |
| | | // 响应式数据 |
| | | const selectedProjectNo = ref(''); // 当前选中的工程号 |
| | | const options = ref<any[]>([]); // 下拉选项列表 |
| | | |
| | | // 调用接口获取选项数据的函数 |
| | | const fetchOptions = async (queryString: string) => { |
| | | try { |
| | | // 发送请求到后端接口 |
| | | const response = await request.post('/loadGlass/optimizeProject/listByState', { |
| | | ...requestData, |
| | | query: queryString // 将查询字符串作为参数传递 |
| | | }); |
| | | |
| | | if (response.code == 200) { |
| | | titleSelectJson.value.processType = response.data; |
| | | |
| | | // titleSelectJson.value.processType = response.data(item => ({ |
| | | // // options.value = response.data.data.map(item => ({ |
| | | // value: item.projectNo, |
| | | // // label: item.id // 假设后端返回的数据中有 字段作为显示标签 |
| | | // })); |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | console.error('Error fetching options:', error); |
| | | } |
| | | }; |
| | | |
| | | // 处理用户输入变化的方法 |
| | | const handleInputChange = async (value: string) => { |
| | | if (value) { |
| | | await fetchOptions(value); |
| | | } else { |
| | | options.value = []; // 清空选项列表 |
| | | } |
| | | }; |
| | | |
| | | // 初始化加载数据(如果需要) |
| | | onMounted(() => { |
| | | // 在组件挂载后调用 fetchOptions('') 来加载初始数据(如果需要) |
| | | fetchOptions(''); |
| | | }); |
| | | |
| | | // const billall = () => { |
| | |
| | | <el-dialog v-model="dialogFormVisible" top="24vh" width="30%" title="工程" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select v-model="getBasicData.projectNo" clearable placeholder="请选择工程" style="width: 220px" |
| | | <el-select |
| | | v-model="selectedProjectNo" |
| | | filterable |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 220px" |
| | | @input="handleInputChange" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select v-model="getBasicData.projectNo" clearable placeholder="请选择工程" style="width: 220px" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | |
| | | <script lang="ts" setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import {reactive, ref} from 'vue' |
| | | import {useRouter} from 'vue-router' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | |
| | | const router = useRouter() |
| | | |
| | | 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 carposition1 = ref(40) |
| | | 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 loading = null |
| | | const handleSelectionChange = null |
| | | |
| | | const currentPage4 = ref(4) |
| | | const pageSize4 = ref(100) |
| | |
| | | e: '1', |
| | | f: '100*100', |
| | | g: '', |
| | | } |
| | | }, |
| | | ] |
| | | const dialogForm = () => { |
| | | ElMessageBox.confirm( |
| | | '确定要急停吗?', |
| | | '提示', |
| | | { |
| | | ElMessageBox.confirm('确定要急停吗?', '提示', { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | }) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | } |
| | | |
| | | var timer=setInterval(() => { |
| | | console.log(million.value,million1.value); |
| | | million.value+=1; |
| | | 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; |
| | | timers1.value = false |
| | | } else if (carposition1.value == 40) { |
| | | timers1.value = true |
| | | } |
| | | if(timers1.value==true){ |
| | | carposition1.value=carposition1.value+14; |
| | | carposition1.value = carposition1.value + 16 |
| | | }else{ |
| | | carposition1.value=carposition1.value-14; |
| | | carposition1.value = carposition1.value - 16 |
| | | } |
| | | |
| | | |
| | | if(carposition2.value==200){ |
| | | timers2.value=false; |
| | | }else if(carposition2.value==60){ |
| | | timers2.value=true; |
| | | timers2.value = false |
| | | } else if (carposition2.value == 40) { |
| | | timers2.value = true |
| | | } |
| | | if(timers2.value==true){ |
| | | carposition2.value+=14; |
| | | carposition2.value += 16 |
| | | }else{ |
| | | carposition2.value-=14; |
| | | carposition2.value -= 16 |
| | | } |
| | | }else{ |
| | | |
| | | } |
| | | }else{ |
| | | million1.value=million.value; |
| | | million1.value = million.value |
| | | if(cellshow.value==true){ |
| | | cellshow.value=false; |
| | | |
| | | cellshow.value = false |
| | | }else{ |
| | | cellshow.value=true; |
| | | |
| | | cellshow.value = true |
| | | } |
| | | if(cellshow1.value==true){ |
| | | cellshow1.value=false; |
| | | cellshow1.value = false |
| | | }else{ |
| | | cellshow1.value=true; |
| | | cellshow1.value = true |
| | | } |
| | | if(cellshow2.value==true){ |
| | | cellshow2.value=false; |
| | | cellshow2.value = false |
| | | }else{ |
| | | cellshow2.value=true; |
| | | cellshow2.value = true |
| | | } |
| | | } |
| | | |
| | | }, 1000); |
| | | |
| | | }, 100000) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | router.push({ |
| | | path: '/main/returns/createReturns', |
| | | query: {ReturnID: 'TH24010101'}, |
| | | }) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | |
| | | } |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | border: 'full', //表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | useKey: true, |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | filterConfig: { |
| | | //筛选配置项 |
| | | remote: true, |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | storage: true, |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | showStatus: true, |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | id: '1', |
| | | long: '5', |
| | | wide: '1005', |
| | | thick: '183.6', |
| | | }, |
| | | ], |
| | | }) |
| | | </script> |
| | |
| | | <template> |
| | | <div style="height: 700px;"> |
| | | <!-- <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisible = true">手动进片</el-button> --> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">订单信息</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">出片队列</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="danger">终止进片</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="danger">终止出片</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="danger" @click="dialogForm">软急停</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="primary" |
| | | @click="dialogFormVisiblea = true">订单信息 |
| | | </el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="success" |
| | | @click="dialogFormVisibleb = true">出片队列 |
| | | </el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="danger">终止进片 |
| | | </el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="danger">终止出片 |
| | | </el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="danger" |
| | | @click="dialogForm">软急停 |
| | | </el-button> |
| | | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" |
| | | v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | | <el-table height="100%" ref="table" |
| | | <el-table height="100%" |
| | | ref="table" |
| | | @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="a" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="b" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="c" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="d" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="e" align="center" label="钢化版图号" min-width="157" /> |
| | | <el-table-column prop="f" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="g" align="center" label="结束任务" min-width="120"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="text">完成任务</el-button> |
| | | :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="a" |
| | | align="center" |
| | | label="笼子" |
| | | min-width="120"/> |
| | | <el-table-column prop="b" |
| | | align="center" |
| | | label="格子" |
| | | min-width="120"/> |
| | | <el-table-column prop="c" |
| | | align="center" |
| | | label="工程号" |
| | | min-width="120"/> |
| | | <el-table-column prop="d" |
| | | align="center" |
| | | label="流程卡号" |
| | | min-width="120"/> |
| | | <el-table-column prop="e" |
| | | align="center" |
| | | label="钢化版图号" |
| | | min-width="157"/> |
| | | <el-table-column prop="f" |
| | | align="center" |
| | | label="尺寸" |
| | | min-width="120"/> |
| | | <el-table-column prop="g" |
| | | align="center" |
| | | label="结束任务" |
| | | min-width="120"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="text">完成任务 |
| | | </el-button> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 3px;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 3px;" |
| | | v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | | <el-table height="100%" ref="table" |
| | | <el-table height="100%" |
| | | ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="进片玻璃ID" min-width="80" /> |
| | | <el-table-column prop="a" align="center" label="笼子" min-width="120" /> |
| | | <el-table-column prop="b" align="center" label="格子" min-width="120" /> |
| | | <el-table-column prop="c" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="d" align="center" label="流程卡号" min-width="120" /> |
| | | <el-table-column prop="e" align="center" label="钢化版图号" min-width="157" /> |
| | | <el-table-column prop="f" align="center" label="尺寸" min-width="120" /> |
| | | <el-table-column prop="g" align="center" label="结束任务" min-width="120"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="text">完成任务</el-button> |
| | | :data="tableDatab" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" |
| | | align="center" |
| | | label="进片玻璃ID" |
| | | min-width="80"/> |
| | | <el-table-column prop="a" |
| | | align="center" |
| | | label="笼子" |
| | | min-width="120"/> |
| | | <el-table-column prop="b" |
| | | align="center" |
| | | label="格子" |
| | | min-width="120"/> |
| | | <el-table-column prop="c" |
| | | align="center" |
| | | label="工程号" |
| | | min-width="120"/> |
| | | <el-table-column prop="d" |
| | | align="center" |
| | | label="流程卡号" |
| | | min-width="120"/> |
| | | <el-table-column prop="e" |
| | | align="center" |
| | | label="钢化版图号" |
| | | min-width="157"/> |
| | | <el-table-column prop="f" |
| | | align="center" |
| | | label="尺寸" |
| | | min-width="120"/> |
| | | <el-table-column prop="g" |
| | | align="center" |
| | | label="结束任务" |
| | | min-width="120"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" |
| | | id="searchButton" |
| | | type="text">完成任务 |
| | | </el-button> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | </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 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:red;"></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 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:red;"></div> |
| | | </div> |
| | | <div v-show="cellshow" style="width: 200px;height: 5px;position: absolute;top:70px;left: 480px;background-color: #409EFF;"> |
| | | <div v-show="cellshow" |
| | | style="width: 200px;height: 5px;position: absolute;top:60px;left: 490px;background-color: red;"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisible" top="12vh" width="85%" title="请确认玻璃信息" > |
| | | <el-dialog v-model="dialogFormVisible" |
| | | top="12vh" |
| | | width="85%" |
| | | title="请确认玻璃信息"> |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <div style="display: flex;"> |
| | | <p style="margin-top: 4px;">确认状态:</p> |
| | | <el-button style="margin-left: 10px;size: mini;" type="success">允许</el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" type="danger">不允许</el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="success">允许 |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="danger">不允许 |
| | | </el-button> |
| | | <p style="margin-left: 60px;margin-top: 4px;">当前状态:</p> |
| | | <div style="margin-top: 4px; margin-left: 10px;">手动</div> |
| | | <el-button style="margin-left: 10px;size: mini;" type="primary">切换</el-button> |
| | | <el-input placeholder="请输入玻璃id" style="width: 180px;size: mini;margin-left: 60px;"></el-input> |
| | | <el-button style="margin-left: 10px;size: mini;" type="primary">添加</el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="primary">切换 |
| | | </el-button> |
| | | <el-input placeholder="请输入玻璃id" |
| | | style="width: 180px;size: mini;margin-left: 60px;"></el-input> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="primary">添加 |
| | | </el-button> |
| | | <p style="margin-left: 60px;margin-top: 4px;">玻璃id:</p> |
| | | <el-input style="width: 180px;size: mini;margin-left: 30px;"></el-input> |
| | | </div> |
| | |
| | | <div style="display: flex;"> |
| | | <div style="margin-top: 20px;"> |
| | | <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">当前信息</p> |
| | | <el-form label-position="right" label-width="90px"> |
| | | <el-form-item style="width: 20vw" label="玻璃id:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input> |
| | | <el-form label-position="right" |
| | | label-width="90px"> |
| | | <el-form-item style="width: 20vw" |
| | | label="玻璃id:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入玻璃id"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="订单编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="订单编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入订单编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="列表编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="列表编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入列表编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="箱子编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="箱子编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入箱子编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="长:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="长:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入长"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="宽:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="宽:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入宽"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">修改信息</p> |
| | | <el-form label-position="right" label-width="90px"> |
| | | <el-form-item style="width: 20vw" label="玻璃id:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input> |
| | | <el-form label-position="right" |
| | | label-width="90px"> |
| | | <el-form-item style="width: 20vw" |
| | | label="玻璃id:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入玻璃id"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="订单编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="订单编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入订单编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="列表编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="列表编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入列表编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="箱子编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="箱子编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入箱子编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="长:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="长:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入长"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="宽:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="宽:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入宽"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">修改信息</p> |
| | | <el-form label-position="right" label-width="90px"> |
| | | <el-form-item style="width: 20vw" label="玻璃id:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input> |
| | | <el-form label-position="right" |
| | | label-width="90px"> |
| | | <el-form-item style="width: 20vw" |
| | | label="玻璃id:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入玻璃id"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="订单编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="订单编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入订单编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="列表编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="列表编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入列表编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="箱子编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="箱子编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入箱子编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="长:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="长:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入长"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="宽:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="宽:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入宽"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <p style="margin-top: 10px;margin-left: 100px;margin-bottom: 20px;">当前信息</p> |
| | | <el-form label-position="right" label-width="90px"> |
| | | <el-form-item style="width: 20vw" label="玻璃id:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入玻璃id"></el-input> |
| | | <el-form label-position="right" |
| | | label-width="90px"> |
| | | <el-form-item style="width: 20vw" |
| | | label="玻璃id:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入玻璃id"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="订单编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入订单编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="订单编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入订单编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="列表编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入列表编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="列表编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入列表编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="箱子编号:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入箱子编号"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="箱子编号:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入箱子编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="长:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入长"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="长:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入长"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="width: 20vw" label="宽:"> |
| | | <el-input style="width: 180px" size="mini" placeholder="请输入宽"></el-input> |
| | | <el-form-item style="width: 20vw" |
| | | label="宽:"> |
| | | <el-input style="width: 180px" |
| | | size="mini" |
| | | placeholder="请输入宽"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisible = false"> |
| | | <el-button type="primary" |
| | | @click="dialogFormVisible = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblea" top="10vh" width="85%" title="订单信息" > |
| | | <el-input placeholder="请输入工程号" style="width: 180px;size: mini;"></el-input> |
| | | <el-button style="margin-left: 10px;size: mini;" type="primary">查询</el-button> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | <el-dialog v-model="dialogFormVisiblea" |
| | | top="10vh" |
| | | width="85%" |
| | | title="订单信息"> |
| | | <el-input placeholder="请输入工程号" |
| | | style="width: 180px;size: mini;"></el-input> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="primary">查询 |
| | | </el-button> |
| | | <el-table ref="table" |
| | | style="margin-top: 20px;height: 500px;" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="ida" align="center" label="玻璃id" min-width="80" /> |
| | | <el-table-column prop="typea" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="长" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="宽" min-width="120" /> |
| | | <el-table-column prop="typea" align="center" label="厚" min-width="120" /> |
| | | :data="tableDataa" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="ida" |
| | | align="center" |
| | | label="玻璃id" |
| | | min-width="80"/> |
| | | <el-table-column prop="typea" |
| | | align="center" |
| | | label="工程号" |
| | | min-width="120"/> |
| | | <el-table-column prop="typea" |
| | | align="center" |
| | | label="长" |
| | | min-width="120"/> |
| | | <el-table-column prop="typea" |
| | | align="center" |
| | | label="宽" |
| | | min-width="120"/> |
| | | <el-table-column prop="typea" |
| | | align="center" |
| | | label="厚" |
| | | min-width="120"/> |
| | | </el-table> |
| | | <div id="demo-pagination-block"> |
| | | <el-pagination |
| | | style="margin-left: 850px;" |
| | | <el-pagination style="margin-left: 850px;" |
| | | v-model:current-page="currentPage4" |
| | | v-model:page-size="pageSize4" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="400" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | @current-change="handleCurrentChange"/> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibleb" top="10vh" width="85%" title="出片队列" > |
| | | <el-dialog v-model="dialogFormVisibleb" |
| | | top="10vh" |
| | | width="85%" |
| | | title="出片队列"> |
| | | <div style="display: flex;"> |
| | | <p style="margin-top: 4px;">队列状态:</p> |
| | | <p style="margin-top: 4px;">开始</p> |
| | | <el-button style="margin-left: 10px;size: mini;" type="danger">停止</el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" type="primary">添加</el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="danger">停止 |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;size: mini;" |
| | | type="primary">添加 |
| | | </el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | <el-table ref="table" |
| | | style="margin-top: 20px;height: 500px;" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" label="铝框id" min-width="80" /> |
| | | <el-table-column prop="type" align="center" label="玻璃id" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="订单编号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="列表编号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="箱子编号" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="长" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="宽" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="玻璃状态" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="顺序" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="完成" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="操作" min-width="120" /> |
| | | :data="tableDatab" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" |
| | | align="center" |
| | | label="铝框id" |
| | | min-width="80"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="玻璃id" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="订单编号" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="列表编号" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="箱子编号" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="长" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="宽" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="玻璃状态" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="顺序" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="完成" |
| | | min-width="120"/> |
| | | <el-table-column prop="type" |
| | | align="center" |
| | | label="操作" |
| | | min-width="120"/> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | | <style scoped> |
| | | #dt { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 100px; |
| | | } |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dta { |
| | | display: block; |
| | | float: left; |
| | | line-height: 20px; |
| | | margin-left: 80%; |
| | | } |
| | | |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | } |
| | | |
| | | #message{ |
| | | text-align: center; |
| | | align-items: center; |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | |
| | | #awatch{ |
| | | height: 450px; |
| | | } |
| | | |
| | | #occupy { |
| | | height: 100%; |
| | | width: 15%; |
| | | background-color: white; |
| | | margin: 0px 8px 0px 8px; |
| | | border: 1px #EBEEF5 solid; |
| | | border: 1px #ebeef5 solid; |
| | | text-align: center; |
| | | padding: 5px; |
| | | } |
| | |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | #demo-pagination-block + #demo-pagination-block { |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | #demo-pagination-block #demonstration { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 0 !important; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | width: 0 !important;height: 0; |
| | | } |
| | | .img-list{ |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 0 !important; |
| | | height: 0; |
| | | } |
| | | |
| | | .img-list { |
| | | position:relative; |
| | | } |
| | | |
| | | .data-img{ |
| | | @apply float-none ; |
| | | |
| | |
| | | background: rgba(0, 0, 0, 0); |
| | | opacity: 1; |
| | | border-radius: 0.5rem 0.5rem 0px 0px; |
| | | |
| | | } |
| | | |
| | | .check-img{ |
| | | position: absolute; |
| | | width: 3.3125rem; |
| | |
| | | top:20rem; |
| | | right: 57rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | |
| | | .check-imga{ |
| | | position: absolute; |
| | | width: 3.3125rem; |
| | |
| | | top:15rem; |
| | | right: 28.5rem; |
| | | z-index: 10; |
| | | |
| | | } |
| | | |
| | | .vertical { |
| | | width: 45px; |
| | | height: 25px; |
| | | background-color: #409EFF; |
| | | background-color: #409eff; |
| | | top: 485px; /* 初始位置 */ |
| | | left: 899px; /* 水平居中 */ |
| | | transform: translateX(-50%); |
| | |
| | | max-width: 100%; |
| | | background-size: 1200px 400px; |
| | | overflow: hidden; |
| | | position:relative |
| | | position: relative; |
| | | } |
| | | |
| | | .img-car1{ |
| | | background-image:url('../../assets/lp.png'); |
| | | background-image: url('../../assets/lpl.jpg'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | position: relative; |
| | | } |
| | | |
| | | .img-car2{ |
| | | background-image:url('../../assets/lpa.png'); |
| | | background-image: url('../../assets/lpla.jpg'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | | background-attachment: local; |
| | |
| | | max-width: 100%; |
| | | background-size: 200px 70px; |
| | | overflow: hidden; |
| | | position:relative |
| | | position: relative; |
| | | } |
| | | </style> |
| | |
| | | https: false, |
| | | proxy: { |
| | | '/api': { |
| | | target: '10.153.19.150:88/', |
| | | target: 'http://127.0.0.1:88/', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api/, '/'), |
| | | }, |
New file |
| | |
| | | package com.mes.glassinfo.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-29 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/glassinfo/glass-info") |
| | | public class GlassInfoController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.glassinfo.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-29 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class GlassInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 玻璃信息表id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 流程卡 |
| | | */ |
| | | private String flowCardId; |
| | | |
| | | /** |
| | | * 流程卡玻璃类型 |
| | | */ |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private String filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | | */ |
| | | private Double edgWidth; |
| | | |
| | | /** |
| | | * 磨前高 |
| | | */ |
| | | private Double edgHeight; |
| | | |
| | | /** |
| | | * 是否配片 |
| | | */ |
| | | private Integer ismultiple; |
| | | |
| | | /** |
| | | * 配片最大宽 |
| | | */ |
| | | private Double maxWidth; |
| | | |
| | | /** |
| | | * 配片最大高 |
| | | */ |
| | | private Double maxHeight; |
| | | |
| | | /** |
| | | * 钢化是否接受横放 |
| | | */ |
| | | private Integer ishorizontal; |
| | | |
| | | /** |
| | | * 原片顺序 |
| | | */ |
| | | private Integer patternSequence; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | | */ |
| | | private Integer temperingLayoutId; |
| | | |
| | | /** |
| | | * 钢化版图片序 |
| | | */ |
| | | private Integer temperingFeedSequence; |
| | | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Integer xCoordinate; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Integer yCoordinate; |
| | | |
| | | /** |
| | | * 旋转角度(逆时针) |
| | | */ |
| | | private Integer angle; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String engineerId; |
| | | |
| | | /** |
| | | * 生产规则id |
| | | */ |
| | | private Integer ruleId; |
| | | |
| | | /** |
| | | * 玻璃ID |
| | | */ |
| | | private String glassId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.glassinfo.entity; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * @author SNG-010 |
| | | */ |
| | | @Setter |
| | | @Getter |
| | | public class OptimizeGlassinfo { |
| | | |
| | | // Getter methods |
| | | // Setter methods |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String projectId; |
| | | |
| | | /** |
| | | * 工程种类 |
| | | */ |
| | | private String type; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | private Double glassThickness; |
| | | |
| | | /** |
| | | * 玻璃膜系 |
| | | */ |
| | | private String glassType; |
| | | |
| | | /** |
| | | * 小片宽(加磨量) |
| | | */ |
| | | private Double pWidth; |
| | | /** |
| | | * 小片高(加磨量) |
| | | */ |
| | | private Double pHeight; |
| | | /** |
| | | * 版图id |
| | | */ |
| | | private Integer stockId; |
| | | /** |
| | | * 钢化版图编号(架号) |
| | | */ |
| | | private Integer heatLayoutId; |
| | | /** |
| | | * 钢化序号 |
| | | */ |
| | | private Integer heatLayoutSort; |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Integer xAxis; |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Integer yAxis; |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String projectNo; |
| | | /** |
| | | * 小片编号 |
| | | */ |
| | | private String glassId; |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.glassinfo.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-29 |
| | | */ |
| | | public interface GlassInfoMapper extends BaseMapper<GlassInfo>, MPJBaseMapper<GlassInfo> { |
| | | |
| | | } |
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.glassinfo.mapper.GlassInfoMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.glassinfo.service; |
| | | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-29 |
| | | */ |
| | | public interface GlassInfoService extends MPJBaseService<GlassInfo> { |
| | | |
| | | List<GlassInfo> selectGlassInfo(String engineeringId); |
| | | } |
New file |
| | |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.entity.OptimizeGlassinfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-04-29 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class GlassInfoServiceImpl extends MPJBaseServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService { |
| | | @Autowired |
| | | OptimizeProjectMapper optimizeProjectMapper; |
| | | @Override |
| | | @DS("pp") |
| | | |
| | | public List<GlassInfo> selectGlassInfo(String engineeringId) { |
| | | List<OptimizeGlassinfo> optimizeGlassinfos=null; |
| | | if (engineeringId != null) { |
| | | optimizeGlassinfos = optimizeProjectMapper.selectJoinList(OptimizeGlassinfo.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("b.process_id,t.type,b.width,b.height,t.glass_thickness,t.glass_type,b.p_width,b.p_height,b.stock_id,b.heat_layout_id,b.heat_layout_sort,b.x_axis,b.y_axis,b.project_no,b.glass_id") |
| | | .leftJoin("optimize_detail b on t.project_no=b.project_no") |
| | | .eq("t.state",200) |
| | | .eq("t.project_no", engineeringId)); |
| | | } |
| | | |
| | | // 创建一个 List 用于保存映射后的实体对象 |
| | | List<GlassInfo> resultList = new ArrayList<>(); |
| | | |
| | | if(optimizeGlassinfos!=null){ |
| | | for (OptimizeGlassinfo map : optimizeGlassinfos) { |
| | | // 创建一个新的 OptimizeGlassinfo 对象 |
| | | GlassInfo glassInfo = new GlassInfo(); |
| | | // 将 Map 中的每个键值对映射到 OptimizeGlassinfo 对象的相应字段上 |
| | | glassInfo.setEngineerId(map.getProjectNo()); |
| | | glassInfo.setFlowCardId(map.getProjectId()); |
| | | glassInfo.setFilmsid(map.getGlassType()); |
| | | glassInfo.setWidth(map.getWidth()); |
| | | glassInfo.setHeight(map.getHeight()); |
| | | glassInfo.setThickness(map.getGlassThickness()); |
| | | glassInfo.setPatternSequence(map.getStockId());// |
| | | glassInfo.setTemperingLayoutId(map.getHeatLayoutId());//钢化版图id |
| | | glassInfo.setTemperingFeedSequence(map.getHeatLayoutSort());//钢化版图顺序 |
| | | glassInfo.setXCoordinate(map.getXAxis()); |
| | | glassInfo.setYCoordinate(map.getYAxis()); |
| | | |
| | | glassInfo.setGlassId(map.getGlassId()); |
| | | // 将映射后的对象添加到结果列表中 |
| | | resultList.add(glassInfo); |
| | | } |
| | | } |
| | | log.info("查询出glassinfo的数据{}:",resultList); |
| | | log.info("查询出glassinfopro的数据{}:",optimizeGlassinfos); |
| | | return resultList; |
| | | } |
| | | } |
| | |
| | | // 2、全局配置 |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent2\\"); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent3\\"); |
| | | |
| | | gc.setServiceName("%sService"); //去掉Service接口的首字母I |
| | | gc.setAuthor("wu"); |
| | |
| | | // 4、包配置 |
| | | PackageConfig pc = new PackageConfig(); |
| | | pc.setParent("com.mes"); |
| | | pc.setModuleName("engineering"); //模块名 |
| | | pc.setModuleName("glassinfo"); //模块名 |
| | | pc.setController("controller"); |
| | | pc.setService("service"); |
| | | pc.setMapper("mapper"); |
| | |
| | | // 5、策略配置 |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | |
| | | strategy.setInclude("engineering"); |
| | | strategy.setInclude("glass_info"); |
| | | |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 |
| | | |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | |
| | | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/up-patten-usage") |
| | | @Slf4j |
| | | public class UpPattenUsageController { |
| | | |
| | | @Autowired |
| | | private UpPattenUsageService upPattenUsageService; |
| | | @ApiOperation("显示正在出片的工程信息") |
| | | @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpPattenUsage>> prioritylist() { |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | public Result<Integer> saveUpPattenUsage(@RequestBody String engineeringId) { |
| | | //List<OptimizeUpPattenUsage> glass = upPattenUsageService.saveUpPattenUsage(engineeringId); |
| | | log.info("显示工位上的玻璃信息:{}", 200); |
| | | return Result.build(200, "", 200); |
| | | } |
| | | } |
| | | // |
| | | //import com.mes.uppattenusage.service.GlassInfoService; |
| | | //import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | | //import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | //import com.mes.glassinfo.entity.GlassInfo; |
| | | //import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | //import com.mes.utils.Result; |
| | | //import io.swagger.annotations.ApiOperation; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.web.bind.annotation.GetMapping; |
| | | //import org.springframework.web.bind.annotation.RequestBody; |
| | | //import org.springframework.web.bind.annotation.RequestMapping; |
| | | //import org.springframework.web.bind.annotation.RestController; |
| | | // |
| | | //import java.util.List; |
| | | // |
| | | ///** |
| | | // * <p> |
| | | // * 前端控制器 |
| | | // * </p> |
| | | // * |
| | | // * @author zhoush |
| | | // * @since 2024-04-18 |
| | | // */ |
| | | //@RestController |
| | | //@RequestMapping("/up-patten-usage") |
| | | //@Slf4j |
| | | //public class UpPattenUsageController { |
| | | // |
| | | // @Autowired |
| | | // private UpPattenUsageService upPattenUsageService; |
| | | // @Autowired |
| | | // private GlassInfoService glassInfoService; |
| | | // @ApiOperation("显示正在出片的工程信息") |
| | | // @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | // public Result<List<UpPattenUsage>> prioritylist() { |
| | | // List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | // log.info("显示工位上的玻璃信息:{}", glass); |
| | | // return Result.build(200, "", glass); |
| | | // } |
| | | // |
| | | // @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | // @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | // public Result<Integer> saveUpPattenUsage(String engineeringId) { |
| | | // List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineeringId); |
| | | // log.info("将查询出的UpPattenUsage数据保存到数据库表里"); |
| | | // upPattenUsageService.saveUpPattenUsage(upPattenUsages); |
| | | // log.info("从PP表查询glassinfo的数据并保存到表里"); |
| | | // List<GlassInfo> glassinfo=glassInfoService.selectGlassInfo(engineeringId); |
| | | // return Result.build(200, "", 200); |
| | | // } |
| | | //} |
| | | |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * @author SNG-010 |
| | | */ |
| | | @Setter |
| | | @Getter |
| | | public class OptimizeUpPattenUsage { |
| | | |
| | | // Getter methods |
| | | // Setter methods |
| | | /** |
| | | * 工程号 |
| | | */ |
| | |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | // Getter methods |
| | | public String getProjectNo() { |
| | | return projectNo; |
| | | } |
| | | |
| | | public String getGlassType() { |
| | | return glassType; |
| | | } |
| | | |
| | | public Double getWidth() { |
| | | return width; |
| | | } |
| | | |
| | | public Double getHeight() { |
| | | return height; |
| | | } |
| | | |
| | | public Double getGlassThickness() { |
| | | return glassThickness; |
| | | } |
| | | |
| | | public Integer getHeatLayoutSort() { |
| | | return heatLayoutSort; |
| | | } |
| | | |
| | | public Integer getState() { |
| | | return state; |
| | | } |
| | | |
| | | // Setter methods |
| | | public void setProjectNo(String projectNo) { |
| | | this.projectNo = projectNo; |
| | | } |
| | | |
| | | public void setGlassType(String glassType) { |
| | | this.glassType = glassType; |
| | | } |
| | | |
| | | public void setWidth(Double width) { |
| | | this.width = width; |
| | | } |
| | | |
| | | public void setHeight(Double height) { |
| | | this.height = height; |
| | | } |
| | | |
| | | public void setGlassThickness(Double glassThickness) { |
| | | this.glassThickness = glassThickness; |
| | | } |
| | | |
| | | public void setHeatLayoutSort(Integer heatLayoutSort) { |
| | | this.heatLayoutSort = heatLayoutSort; |
| | | } |
| | | |
| | | public void setState(Integer state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | } |
| | |
| | | public interface UpPattenUsageService extends MPJBaseService<UpPattenUsage> { |
| | | List<UpPattenUsage> prioritylist(int state); |
| | | |
| | | List<Map> saveUpPattenUsage(String engineeringId); |
| | | List<UpPattenUsage> selectSaveUpPattenUsage(String engineeringId); |
| | | |
| | | void saveUpPattenUsage(List<UpPattenUsage> upPattenUsages); |
| | | } |
| | | |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Override |
| | | @DS("pp") |
| | | public List<Map> saveUpPattenUsage(String engineeringId) { |
| | | public List<UpPattenUsage> selectSaveUpPattenUsage(String engineeringId) { |
| | | |
| | | List<OptimizeUpPattenUsage> upPattenUsageList = null; |
| | | if (engineeringId != null) { |
| | | |
| | | List<Map> upPattenUsageList=optimizeProjectMapper.selectJoinList(Map.class,new MPJQueryWrapper<OptimizeProject>() |
| | | upPattenUsageList = optimizeProjectMapper.selectJoinList(OptimizeUpPattenUsage.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("t.project_no,t.glass_type,b.width,b.height,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.heat_layout_sort") |
| | | .leftJoin("optimize_layout b on t.project_no=b.project_no") |
| | | .eq("b.project_no",engineeringId)); |
| | | } |
| | | return Collections.emptyList(); |
| | | // 创建一个 List 用于保存映射后的实体对象 |
| | | List<UpPattenUsage> resultList = new ArrayList<>(); |
| | | |
| | | // 遍历查询结果中的每个 Map 对象 |
| | | if (upPattenUsageList != null) { |
| | | for (OptimizeUpPattenUsage map : upPattenUsageList) { |
| | | // 创建一个新的 OptimizeProject 对象 |
| | | UpPattenUsage optimizeProject = new UpPattenUsage(); |
| | | // 将 Map 中的每个键值对映射到 OptimizeProject 对象的相应字段上 |
| | | optimizeProject.setEngineeringId((String) map.getProjectNo()); |
| | | optimizeProject.setFilmsId((String) map.getGlassType()); |
| | | optimizeProject.setWidth((Double) map.getWidth()); |
| | | optimizeProject.setHeight((Double) map.getHeight()); |
| | | optimizeProject.setThickness((Double)map.getHeight()); |
| | | optimizeProject.setLayoutSequence((Integer) map.getHeatLayoutSort()); |
| | | optimizeProject.setState(0); |
| | | // 将映射后的对象添加到结果列表中 |
| | | resultList.add(optimizeProject); |
| | | } |
| | | } |
| | | log.info("查询出上片顺序集合保存到实体类{}",resultList); |
| | | return resultList; |
| | | } |
| | | |
| | | @Override |
| | | public void saveUpPattenUsage(List<UpPattenUsage> upPattenUsage) { |
| | | this.saveBatch(upPattenUsage); |
| | | //保存原片使用详情表 |
| | | } |
| | | |
| | | //@Override |
| | | public void selectSaveGlassinfo(String engineeringId) { |
| | | //保存玻璃信息表 |
| | | //optimizeProjectMapper.selectJoinList(); |
| | | } |
| | | |
| | | |
| | |
| | | //解析token |
| | | String userid; |
| | | try { |
| | | Claims claims = JwtUtil.parseJWT(token); |
| | | Claims claims = JwtUtil.getClaimByToken(token); |
| | | userid = claims.getSubject(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | |
| | | |
| | | import io.jsonwebtoken.Claims; |
| | | import io.jsonwebtoken.JwtBuilder; |
| | | import io.jsonwebtoken.Jwts; |
| | | import io.jsonwebtoken.SignatureAlgorithm; |
| | | import lombok.Data; |
| | | |
| | | import javax.crypto.SecretKey; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | import java.util.Base64; |
| | | import java.util.Date; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 19:15 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class JwtUtil { |
| | | |
| | | //有效期为 |
| | | public static final Long JWT_TTL = 60 * 60 * 1000L;// 60 * 60 *1000 一个小时 |
| | | //设置秘钥明文 |
| | | public static final String JWT_KEY = "sangeng"; |
| | | private static final long expire = 60 * 60 * 1000L; |
| | | private static final String secret = "beibo"; |
| | | private static final String header = "Authorization"; |
| | | |
| | | public static String getUUID() { |
| | | String token = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | return token; |
| | | } |
| | | // 生成jwt |
| | | public static String generateToken(String username) { |
| | | |
| | | /** |
| | | * 生成jtw |
| | | * |
| | | * @param subject token中要存放的数据(json格式) |
| | | * @return |
| | | */ |
| | | public static String createJWT(String subject) { |
| | | JwtBuilder builder = getJwtBuilder(subject, null, getUUID());// 设置过期时间 |
| | | return builder.compact(); |
| | | } |
| | | Date nowDate = new Date(); |
| | | Date expireDate = new Date(nowDate.getTime() + 1000 * expire); |
| | | |
| | | /** |
| | | * 生成jtw |
| | | * |
| | | * @param subject token中要存放的数据(json格式) |
| | | * @param ttlMillis token超时时间 |
| | | * @return |
| | | */ |
| | | public static String createJWT(String subject, Long ttlMillis) { |
| | | JwtBuilder builder = getJwtBuilder(subject, ttlMillis, getUUID());// 设置过期时间 |
| | | return builder.compact(); |
| | | } |
| | | |
| | | private static JwtBuilder getJwtBuilder(String subject, Long ttlMillis, String uuid) { |
| | | SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; |
| | | SecretKey secretKey = generalKey(); |
| | | long nowMillis = System.currentTimeMillis(); |
| | | Date now = new Date(nowMillis); |
| | | if (ttlMillis == null) { |
| | | ttlMillis = JwtUtil.JWT_TTL; |
| | | } |
| | | long expMillis = nowMillis + ttlMillis; |
| | | Date expDate = new Date(expMillis); |
| | | return Jwts.builder() |
| | | .setId(uuid) //唯一的ID |
| | | .setSubject(subject) // 主题 可以是JSON数据 |
| | | .setIssuer("sg") // 签发者 |
| | | .setIssuedAt(now) // 签发时间 |
| | | .signWith(signatureAlgorithm, secretKey) //使用HS256对称加密算法签名, 第二个参数为秘钥 |
| | | .setExpiration(expDate); |
| | | .setHeaderParam("typ", "JWT") |
| | | .setSubject(username) |
| | | .setIssuedAt(nowDate) |
| | | .setExpiration(expireDate)// 7天過期 |
| | | .signWith(SignatureAlgorithm.HS512, secret) |
| | | .compact(); |
| | | } |
| | | |
| | | /** |
| | | * 创建token |
| | | * |
| | | * @param id |
| | | * @param subject |
| | | * @param ttlMillis |
| | | * @return |
| | | */ |
| | | public static String createJWT(String id, String subject, Long ttlMillis) { |
| | | JwtBuilder builder = getJwtBuilder(subject, ttlMillis, id);// 设置过期时间 |
| | | return builder.compact(); |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | String token = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjYWM2ZDVhZi1mNjVlLTQ0MDAtYjcxMi0zYWEwOGIyOTIwYjQiLCJzdWIiOiJzZyIsImlzcyI6InNnIiwiaWF0IjoxNjM4MTA2NzEyLCJleHAiOjE2MzgxMTAzMTJ9.JVsSbkP94wuczb4QryQbAke3ysBDIL5ou8fWsbt_ebg"; |
| | | Claims claims = parseJWT(token); |
| | | System.out.println(claims); |
| | | } |
| | | |
| | | /** |
| | | * 生成加密后的秘钥 secretKey |
| | | * |
| | | * @return |
| | | */ |
| | | public static SecretKey generalKey() { |
| | | byte[] encodedKey = Base64.getDecoder().decode(JwtUtil.JWT_KEY); |
| | | SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES"); |
| | | return key; |
| | | } |
| | | |
| | | /** |
| | | * 解析 |
| | | * |
| | | * @param jwt |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static Claims parseJWT(String jwt) throws Exception { |
| | | SecretKey secretKey = generalKey(); |
| | | // 解析jwt |
| | | public static Claims getClaimByToken(String jwt) { |
| | | try { |
| | | return Jwts.parser() |
| | | .setSigningKey(secretKey) |
| | | .setSigningKey(secret) |
| | | .parseClaimsJws(jwt) |
| | | .getBody(); |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | // jwt是否过期 |
| | | public boolean isTokenExpired(Claims claims) { |
| | | return claims.getExpiration().before(new Date()); |
| | | } |
| | | |
| | | } |
| | |
| | | //使用userid生成token |
| | | LoginUser loginUser = (LoginUser) authenticate.getPrincipal(); |
| | | String userId = loginUser.getUser().getId().toString(); |
| | | String jwt = JwtUtil.createJWT(userId); |
| | | String jwt = JwtUtil.generateToken(userId); |
| | | //authenticate存入redis |
| | | redisUtil.setCacheObject("login:" + userId, loginUser); |
| | | //把token响应给前端 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: root |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://localhost:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: localhost:8848 |
| | | server-addr: 10.153.19.150:8848 |
| | | application: |
| | | name: security |
| | | redis: |
| | | database: 0 |
| | | host: localhost |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: |
| | | session: |
New file |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
New file |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | |
| | | server: |
| | | port: 88 |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: gateway |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: localhost:8848 |
| | | gateway: |
| | | discovery: |
| | | locator: |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | application: |
| | | name: cacheGlass |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.56.10:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | application: |
| | | name: cacheGlass |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | application: |
| | | name: cacheGlass |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://localhost:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | |
| | | |
| | | <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> |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | port: 8082 |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: cacheVerticalGlass |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | |
| | | //开始/暂停任务 |
| | | @Override |
| | | public boolean changeTask(String projectId, Integer state) { |
| | | //使用projectId作为条件修改state字段 |
| | | LambdaUpdateChainWrapper<Engineering> wrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper()); |
| | | wrapper.set(Engineering::getState,state); |
| | | wrapper.eq(Engineering::getEngineerId,projectId); |
New file |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class PlcLoadGlassTask { |
| | | |
| | | @Autowired |
| | | private UpWorkstationService upWorkstationService; |
| | | |
| | | |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcLoadGlassTask() throws InterruptedException { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | Thread.sleep(300); |
| | | upWorkstationService.selectPriority(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | return Result.build(200, "", upwork); |
| | | } |
| | | |
| | | @ApiOperation("开始上片任务") |
| | | @PostMapping("/selectPriority") //调用上片任务 |
| | | @ResponseBody |
| | | public void selectPriority() { |
| | | UpWorkSequence work=upWorkstationService.selectPriority(); |
| | | log.info("显示可上的玻璃信息:{}", work); |
| | | |
| | | } |
| | | // @ApiOperation("开始上片任务") |
| | | // @PostMapping("/selectPriority") //调用上片任务 |
| | | // @ResponseBody |
| | | // public void selectPriority() { |
| | | // UpWorkSequence work=upWorkstationService.selectPriority(); |
| | | // log.info("显示可上的玻璃信息:{}", work); |
| | | // |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public UpWorkSequence selectPriority(); |
| | | UpWorkSequence selectPriority(); |
| | | |
| | | //查询正在进行的工程 |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.mapper.UpWorkstationMapper; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | public static final String DB_100_10 = "DB_100_10"; |
| | | |
| | | //判断是否可以吸片进行任务 |
| | |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | |
| | | public UpWorkSequence selectPriority() { |
| | | UpWorkSequence upwork= this.baseMapper.selectPriority(1); |
| | | String start = "吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | if(upwork!=null&&start.equals("1")){ |
| | | String start = "1";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | UpPattenUsage uplist=new UpPattenUsage(); |
| | | if(start.equals("1")){ |
| | | //发送出片任务 |
| | | //plcmes.getPlcParameter("出片信号").setValue("1"); |
| | | UpdateWrapper<UpPattenUsage> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("state",1).last("LIMIT 1"); |
| | | uplist= upPattenUsageMapper.selectOne(updateWrapper); |
| | | log.info("查询出本次出片的玻璃信息[]",uplist); |
| | | } |
| | | return upwork; |
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.56.10:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | server: |
| | | port: 8083 |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: loadGlass |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.impl.UpPattenUsageServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | private OptimizeProjectMapper optimizeProjectMapper; |
| | | @Autowired |
| | | private UpPattenUsageServiceImpl upPattenUsageService; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Test |
| | | public void test() { |
| | | // List<OptimizeProject> list = optimizeProjectMapper.saveProject("P24032204"); |
| | |
| | | |
| | | @Test |
| | | public void testFindPa() { |
| | | List<Map> glass = upPattenUsageService.saveUpPattenUsage("P24032204"); |
| | | List<UpPattenUsage> glass = upPattenUsageService.selectSaveUpPattenUsage("P24032204"); |
| | | log.info("完整路径:{}", Arrays.asList(glass)); |
| | | } |
| | | @Test |
| | | public void textglassinfo(){ |
| | | List<GlassInfo> glass= glassInfoService.selectGlassInfo("P24032204"); |
| | | log.info("glassinfo:{}", Arrays.asList(glass)); |
| | | } |
| | | } |
| | |
| | | package com.mes.temperingglass.controller; |
| | | |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.temperingglass.service.TemperingOverService; |
| | | import com.mes.temperingglass.service.TemperingService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author SNG-010 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/temperingGlassInfo") |
| | | |
| | | @Slf4j |
| | | // TidyUpGlassModule 钢化模块 |
| | | public class TemperingGlassInfoController { |
| | | |
| | | @Autowired |
| | | TemperingService temperingService; |
| | | |
| | | @Autowired |
| | | private TemperingOverService temperingOverService; |
| | | @Autowired |
| | | private TemperingAgoService temperingAgoService; |
| | | |
| | | @PostMapping("/SelectWaitingGlass") // 查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中 |
| | | @ResponseBody |
| | | public Result SelectWaitingGlass(@RequestParam(name = "ProcessId", required = false) String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingService.SelectWaitingGlass(); |
| | | System.out.println(glass); |
| | | @ApiOperation("查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中") |
| | | @GetMapping("/selectWaitingGlass") // 查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中 |
| | | public Result <List<TemperingGlassInfo>> selectWaitingGlass() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass(); |
| | | log.info("等待中的玻璃信息{}",glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @GetMapping("/SelectIntoGlass") // 查询进炉中的钢化等片中的版图信息,状态全为1的为已到。 |
| | | @ResponseBody |
| | | public Result SelectIntoGlass(String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingService.SelectIntoGlass(); |
| | | System.out.println(glass); |
| | | @ApiOperation("查询进炉中的钢化等片中的版图信息,状态全为1的为已到。") |
| | | @GetMapping("/selectIntoGlass") // 查询进炉中的钢化等片中的版图信息,状态全为1的为已到。 |
| | | public Result <List<TemperingGlassInfo>> selectIntoGlass() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(); |
| | | log.info("进炉中的玻璃版图信息{}",glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @GetMapping("/SelectOutGlass") //钢化后显示出炉的版图信息 |
| | | @ResponseBody |
| | | public Result SelectOutGlass(String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingOverService.SelectOutGlass(); |
| | | System.out.println(glass); |
| | | @ApiOperation("//钢化后显示出炉的版图信息。") |
| | | @GetMapping("/selectOutGlass") //钢化后显示出炉的版图信息 |
| | | public Result <List<TemperingGlassInfo>> selectOutGlass() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.SelectOutGlass(); |
| | | log.info("钢化出炉后的玻璃信息{}",glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | |
| | | package com.mes.temperingglass.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | |
| | | /** |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface TemperingGlassInfoMapper extends BaseMapper<TemperingGlassInfo> { |
| | | public interface TemperingGlassInfoMapper extends BaseMapper<TemperingGlassInfo>, MPJBaseMapper<TemperingGlassInfo> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.temperingglass.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface TemperingAgoService extends MPJBaseService<TemperingGlassInfo> { |
| | | |
| | | List<TemperingGlassInfo> selectWaitingGlass(); |
| | | |
| | | List<TemperingGlassInfo> selectIntoGlass(); |
| | | |
| | | List<TemperingGlassInfo> SelectOutGlass(); |
| | | } |
New file |
| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.mapper.TemperingMapper; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | public class TemperingAgoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingAgoService { |
| | | @Autowired |
| | | TemperingMapper temperingMapper; |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> selectWaitingGlass() { |
| | | //获取等待进炉中的玻璃信息 |
| | | QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.inSql("flowcard_id", "select flowcard_id from tempering_glass_info GROUP BY flowcard_id,state having count(state) = 2"); |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> selectIntoGlass() { |
| | | //获取进炉中的玻璃信息 |
| | | QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.inSql("flowcard_id", "select flowcard_id from tempering_glass_info where state=1 GROUP BY flowcard_id,state having count(state) = 1"); |
| | | |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> SelectOutGlass() { |
| | | //获取出炉中的玻璃信息 |
| | | QueryWrapper<TemperingGlassInfo> wapper = new QueryWrapper<>(); |
| | | wapper.eq("state", 3); |
| | | return temperingMapper.selectList(wapper); |
| | | } |
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | application: |
| | | name: temperingGlass |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | application: |
| | | name: temperingGlass |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | server: |
| | | port: 8084 |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: temperingGlass |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.impl.UpPattenUsageServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/27 16:37 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = TemperingGlassModuleApplication.class) |
| | | public class TemperingApplicationTest { |
| | | |
| | | @Resource |
| | | private OptimizeProjectMapper optimizeProjectMapper; |
| | | @Autowired |
| | | private TemperingAgoService temperingAgoService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | |
| | | @Test |
| | | public void testFindPa() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(); |
| | | log.info("进炉中的玻璃:{}", Arrays.asList(glass)); |
| | | } |
| | | @Test |
| | | public void testFindPa2() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.SelectOutGlass(); |
| | | log.info("已出中的玻璃:{}", Arrays.asList(glass)); |
| | | } |
| | | |
| | | @Test |
| | | public void testFindPa3() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass(); |
| | | log.info("等待中的玻璃:{}", Arrays.asList(glass)); |
| | | } |
| | | } |
| | |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | | public class UnLoadGlassApplication { |
| | | |
| | | |
| | |
| | | |
| | | 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 org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.function.Supplier; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class Plcdownglass extends Thread { |
| | | public class Plcdownglass { |
| | | |
| | | public static final String RESULT_IN = "1"; |
| | | public static final String RESULT_OUT = "2"; |
| | |
| | | @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) { |
| | | @Scheduled(fixedDelay = 300) |
| | | public void PlcdownglassTask() throws InterruptedException { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | Thread.sleep(100); |
| | | downWorkstationService = WebSocketServer.applicationContext.getBean(DownWorkstationService.class); |
| | | downStorageCageService = WebSocketServer.applicationContext.getBean(DownStorageCageService.class); |
| | | Thread.sleep(300); |
| | | |
| | | |
| | | // String result = S7control.getinstance().ReadWord("DB14.0", 1).get(0) + ""; |
| | | // String number = S7control.getinstance().ReadWord("DB14.2", 1).get(0) + ""; |
| | | String result ="1"; |
| | | String result = "2"; |
| | | String number ="1"; |
| | | // 进片请求 |
| | | if (RESULT_IN.equals(result)) { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //下片更新 |
| | | downWorkstationService.insertdownglassinfo(); |
| | | |
| | | |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | */ |
| | | private Integer taskStauts; |
| | | |
| | | |
| | | /** |
| | | * 玻璃id |
| | | */ |
| | | private String glassId; |
| | | } |
| | |
| | | public interface DownGlassInfoService extends IService<DownGlassInfo> { |
| | | |
| | | |
| | | /** |
| | | * @param flowCardId |
| | | * @return // 根据流程卡号查询最大序号 |
| | | */ |
| | | Integer getMaxSequenceByFlowCardId(String flowCardId); |
| | | |
| | | /** |
| | | * @param downGlassInfo 插入下片信息 |
| | | */ |
| | | void insertDownGlassInfo(DownGlassInfo downGlassInfo); |
| | | |
| | | |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface DownGlassTaskService extends IService<DownGlassTask> { |
| | | |
| | | /** |
| | | * 查询任务状态为1的信息 |
| | | * |
| | | * @return |
| | | */ |
| | | List<DownGlassTask> getUnloadingTaskState(); |
| | | |
| | | /** |
| | | * 更新任务状态 |
| | | * |
| | | * @return |
| | | */ |
| | | void updateTaskStateToZero(long id); |
| | | |
| | | /** |
| | | * 删除任务 |
| | | * |
| | | * @return |
| | | */ |
| | | void deleteTask(String id); |
| | | |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | |
| | | Integer insertCacheTask(DownGlassTask downGlassTask); |
| | | |
| | | List<DownGlassTask> selectInputTaskCache(); |
| | | |
| | | /** |
| | | * 查询出片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | |
| | | /** |
| | | * 插入任务 |
| | | * |
| | | * @return |
| | | */ |
| | | Integer insertCacheTask(DownGlassTask downGlassTask); |
| | | |
| | | /** |
| | | * 查询进片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | List<DownGlassTask> selectInputTaskCache(); |
| | | |
| | | /** |
| | | * 查询出片任务 备用 |
| | | * |
| | | * @return |
| | | */ |
| | | List<DownGlassTask> selectOutTaskCache(); |
| | |
| | | package com.mes.downglassinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | |
| | | // 根据流程卡号查询最大序号 |
| | | @Override |
| | | public Integer getMaxSequenceByFlowCardId(String flowCardId) { |
| | | QueryWrapper<DownGlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flow_card_id", flowCardId); |
| | | queryWrapper.orderByDesc("sequence"); // 按照序号倒序排序 |
| | | queryWrapper.select("sequence").last("LIMIT 1"); // 选择最大序号并限制结果为1条记录 |
| | | DownGlassInfo downGlassInfo = baseMapper.selectOne(queryWrapper); |
| | | if (downGlassInfo != null) { |
| | | return downGlassInfo.getSequence(); |
| | | LambdaQueryWrapper<DownGlassInfo> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
| | | lambdaQueryWrapper.eq(DownGlassInfo::getFlowCardId, flowCardId) |
| | | .select(DownGlassInfo::getSequence) |
| | | .orderByDesc(DownGlassInfo::getSequence) |
| | | .last("LIMIT 1"); |
| | | |
| | | DownGlassInfo downGlassInfo = baseMapper.selectOne(lambdaQueryWrapper); |
| | | return downGlassInfo != null ? downGlassInfo.getSequence() : 0; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void insertDownGlassInfo(DownGlassInfo downGlassInfo) { |
| | | baseMapper.insert(downGlassInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassTaskMapper; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | public void updateTaskStateToZero(long id) { |
| | | UpdateWrapper<DownGlassTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("task_stauts", 0).eq("id", id); |
| | | baseMapper.update(null, updateWrapper); |
| | | baseMapper.update(new DownGlassTask(), updateWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public Integer insertCacheTask(DownGlassTask downGlassTask) { |
| | | DownGlassTask glassInfo = new DownGlassTask(); |
| | | 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); |
| | | return rows > 0 ? rows : null; |
| | | // 查询数据库,检查主键值是否已经存在 |
| | | DownGlassTask existingTask = baseMapper.selectById(downGlassTask.getId()); |
| | | if (existingTask != null) { |
| | | // 如果已存在相同主键值的任务,则不进行插入操作,返回 null 或者抛出异常 |
| | | // 这里简单起见,直接返回 null |
| | | return null; |
| | | } |
| | | |
| | | // 如果主键值不存在,则进行插入操作 |
| | | DownGlassTask newDownGlassTask = new DownGlassTask(); |
| | | BeanUtils.copyProperties(downGlassTask, newDownGlassTask); |
| | | newDownGlassTask.setTaskStauts(0); // 默认任务状态为0 |
| | | |
| | | int rows = baseMapper.insert(newDownGlassTask); |
| | | return rows > 0 ? rows : null; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * 查询待出片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DownGlassTask> selectOutTaskCache(){ |
| | | return baseMapper.selectList(new QueryWrapper<DownGlassTask>().eq("task_status",0).eq("task_type",2)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @GetMapping("/selectStorageCage") |
| | | @ResponseBody |
| | | public Result selectEdgStorageCage () { |
| | | List<Map> list=downStorageCageService.getCacheInfo(); |
| | | List<Map> list=downStorageCageDetailsService.getCacheInfo(); |
| | | return Result.build(200,"成功",list); |
| | | } |
| | | |
| | |
| | | package com.mes.downstorage.entity; |
| | | |
| | | 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; |
| | |
| | | * 启用状态 |
| | | */ |
| | | @ApiModelProperty(value = "启用状态", position = 5) |
| | | @TableField("enable_state") |
| | | private String enableState; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 膜系id |
| | | */ |
| | | private int filmsid; |
| | | private String filmsid; |
| | | /** |
| | | * 状态 |
| | | */ |
| | |
| | | import java.util.Map; |
| | | |
| | | public interface DownStorageCageDetailsService { |
| | | |
| | | /** |
| | | * @return //添加理片笼内信息 |
| | | */ |
| | | void addDownStorageCageDetails(DownStorageCageDetails details); |
| | | |
| | | //修改理片笼内信息 |
| | | |
| | | /** |
| | | * @return //修改理片笼内信息 |
| | | */ |
| | | boolean updatedownStorageCageDetails(DownStorageCageDetails details); |
| | | |
| | | List<DownStorageCageDetails> getCacheLeisure(); |
| | | |
| | | /** |
| | | * @param start |
| | | * @param end |
| | | * @return 根据传入的工位查询符合按照顺序和大小出片的小片 |
| | | */ |
| | | List<DownStorageCageDetails> getCacheOut(int start, int end); |
| | | |
| | | /** |
| | | * @return 查询笼子内信息 |
| | | */ |
| | | List<Map> getCacheInfo(); |
| | | |
| | | |
| | | /** |
| | | * @param flowcardid |
| | | * @param width |
| | | * @return 查询可进此片玻璃的栅格号 找到空格 |
| | | */ |
| | | List<DownStorageCageDetails> getIsExistIntoCacheByflowcardid(String flowcardid, double width); |
| | | |
| | | /** |
| | | * @param start |
| | | * @param end |
| | | * @return log.info(" 单片情况根据传入的工位查询符合按照大小出片, 并且优先出满架的小片 "); |
| | | */ |
| | | List<DownStorageCageDetails> CacheOut(int start, int end); |
| | | |
| | | /** |
| | | * @return 查询空格子 |
| | | */ |
| | | List<DownStorageCageDetails> selectCacheEmpty2(); |
| | | |
| | | } |
| | |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface DownStorageCageService extends MPJBaseService<DownStorageCage> { |
| | | public List<Map> gettask(); |
| | | |
| | | |
| | | // List<Map<String, Object>> selectCacheLeisure(); |
| | | List<DownStorageCageDetails> getCacheLeisure(); |
| | | List<DownStorageCageDetails> getCacheOut(int start, int end); |
| | | List<Map> getCacheInfo(); |
| | | List<DownStorageCageDetails> getIsExistIntoCacheByLayoutAndSequence(Integer tempering_layout_id, Integer tempering_feed_sequence, double width); |
| | | 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(); |
| | | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return 进片 |
| | | */ |
| | | boolean processInto(String Number); |
| | | |
| | | /** |
| | | |
| | | * @return 空格 |
| | | */ |
| | | |
| | | /** |
| | | * @return 出片 |
| | | */ |
| | | boolean processOut(); |
| | | List<DownStorageCageDetails> selectCacheEmpty() ; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | 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; |
| | |
| | | @Service |
| | | public class DownStorageCageDetailsServiceImpl extends ServiceImpl<DownStorageCageDetailsMapper, DownStorageCageDetails> implements DownStorageCageDetailsService { |
| | | |
| | | |
| | | @Autowired |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | @Autowired |
| | | private DownStorageCageDetailsMapper downStorageCageDetailsMapper; |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> CacheOut(int start, int end) { |
| | | log.info("单片情况根据传入的工位查询符合按照大小出片的小片"); |
| | | 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" |
| | | + "JOIN (SELECT flow_card_id, MAX(width*height) AS max_width FROM glass_info GROUP BY flow_card_id) t " |
| | | + "ON t1.flow_card_id = t.flow_card_id WHERE t1.width*t1.height = 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) |
| | | // 根据 racks_number 排序 |
| | | .orderByDesc("t4.racks_number") |
| | | |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // Other business methods can be implemented here |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheOut(int start, int end) { |
| | | log.info("根据传入的工位查询符合按照顺序和大小出片的小片"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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<DownStorageCageDetails> selectCacheEmpty2(){ |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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<Map> getCacheInfo() { |
| | | log.info(" 查询笼子内信息"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .orderByAsc("t.slot") |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheLeisure() { |
| | | log.info(" 查询笼子内空闲"); |
| | | List<DownStorageCageDetails> list = downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNull("escd.slot") |
| | | |
| | | .orderByAsc("escd.slot") |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号 找到空格"); |
| | | |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNull("escd.slot") |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByAsc("escd.sequence") |
| | | ); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.S7control; |
| | | import com.mes.device.PlcParameterObject; |
| | |
| | | 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.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | |
| | | @Autowired |
| | | private DownStorageCageDetailsMapper downStorageCageDetailsMapper; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Autowired |
| | | private DownGlassTaskService downGlassTaskService; |
| | | @Autowired |
| | | private DownStorageCageDetailsService downStorageCageDetailsService; |
| | | @Override |
| | | public List<Map> gettask(){ |
| | | downStorageCageMapper.selectList(null); |
| | | // downStorageCageMapper.selectJoin(); |
| | | return null; |
| | | }; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheLeisure() { |
| | | log.info(" 查询笼子内空闲"); |
| | | List<DownStorageCageDetails> list = downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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> 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("根据传入的工位查询符合按照顺序和大小出片的小片"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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(" 查询笼子内信息"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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并且大于前面的顺序的空格"); |
| | | List<DownStorageCageDetails> list = downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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> IsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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(" 查询可进此片玻璃的栅格号"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, new MPJQueryWrapper<DownStorageCage>() |
| | | .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<DownStorageCage>() |
| | | .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()); |
| | | |
| | | BeanUtils.copyProperties(glassInfo,downGlassTask); |
| | | |
| | | 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()); |
| | | |
| | | BeanUtils.copyProperties(glassInfo,downGlassTask); |
| | | 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; |
| | | } |
| | | |
| | |
| | | //存在此玻璃编号 |
| | | if (GlassInfo != null) { |
| | | //同找到同流程卡附近空格 |
| | | List<DownStorageCageDetails> list = getIsExistIntoCacheByflowcardid(GlassInfo.getFlowcardId(), GlassInfo.getWidth()); |
| | | List<DownStorageCageDetails> list = selectCacheEmpty(); |
| | | |
| | | List<Map> selectCacheEmpty=selectCacheEmpty(); |
| | | |
| | | |
| | | // list<Map> list=selectCacheEmpty(); |
| | | // list<Map> = downStorageCageService.selectCacheEmpty(); |
| | | if (selectCacheEmpty.size() > 0) { |
| | | if (list.size() > 0) { |
| | | //存在空格 |
| | | //1.生成任务: 起始位置0 结束位置this.slot 任务类型 1 (进片任务) |
| | | //2.回复 1进片 |
| | |
| | | |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 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"); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | // S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | | //如果同时前后端都空闲 优先后端出片并且优先满架 |
| | | else if (!list2.isEmpty()) { |
| | | else if (!list2.isEmpty()&&!list3.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); |
| | | |
| | |
| | | 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"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | |
| | | 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); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> selectCacheEmpty() { |
| | | return baseMapper.selectJoinList(DownStorageCageDetails.class, |
| | | JoinWrappers.lambda(DownStorageCage.class) |
| | | .selectAll(DownStorageCage.class) |
| | | .select(DownStorageCageDetails::getWidth, DownStorageCageDetails::getHeight, DownStorageCageDetails::getGlassId) |
| | | .leftJoin(DownStorageCageDetails.class, on -> on |
| | | .eq(DownStorageCageDetails::getDeviceId, DownStorageCage::getDeviceId) |
| | | .eq(DownStorageCageDetails::getSlot, DownStorageCage::getSlot)) |
| | | .isNull(DownStorageCageDetails::getSlot) |
| | | ); |
| | | } |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.data.annotation.Id; |
| | | //import javax.persistence.Id; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @Id |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | * 任务状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | |
| | | /** |
| | | * 玻璃 |
| | | */ |
| | | private String glassId; |
| | | } |
| | |
| | | */ |
| | | public interface DownWorkstationService extends IService<DownWorkstation> { |
| | | |
| | | /** |
| | | * @param startId |
| | | * @param endId |
| | | * @return 获取工位信息 |
| | | */ |
| | | List<DownWorkstation> getoneDownWorkstations(int startId, int endId); |
| | | |
| | | /** |
| | | * @param workstationId |
| | | * @return 获取总数量 |
| | | */ |
| | | int getTotalQuantity(int workstationId); |
| | | |
| | | /** |
| | | * @param workstationId |
| | | * @return 获取落架数量 |
| | | */ |
| | | int getRacksNumber(int workstationId); |
| | | |
| | | /** |
| | | * @param workstationId 清空架子信息 |
| | | */ |
| | | void clearFlowCardId(int workstationId); |
| | | |
| | | /** |
| | | * @param flowCardId |
| | | * @param racksnumber 更新落架数量 |
| | | */ |
| | | void updateracksnumber(String flowCardId, int racksnumber); |
| | | |
| | | |
| | | /** |
| | | * @param flowCardId |
| | | * @param glassInfoCount |
| | | * @param workstationId |
| | | * @return 更新架子和数量 |
| | | */ |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | |
| | | void insertdownglassinfo(); |
| | | |
| | | /** |
| | | * @return // |
| | | * 工位显示 |
| | | */ |
| | | List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(); |
| | | } |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface DownWorkstationTaskService extends IService<DownWorkstationTask> { |
| | | /** |
| | | * @param downGlassInfo 插入任务 |
| | | */ |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | |
| | | /** |
| | | * @param Id 更新任务状态 |
| | | */ |
| | | void updateTaskStateToZero(long Id); |
| | | |
| | | /** |
| | | * @return 获取任务状态为1的信息 |
| | | */ |
| | | List<DownWorkstationTask> getTaskState(); |
| | | } |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DownWorkstationServiceImpl extends ServiceImpl<DownWorkstationMapper, DownWorkstation> implements DownWorkstationService { |
| | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getTotalquantity() : 0; |
| | | } |
| | | |
| | | //工位显示 |
| | | @Override |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation() { |
| | |
| | | .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<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = null; |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DownWorkstionAndDownGlassinfo downWorkstionAndDownGlassinfo : workstationList) { |
| | | Map<String, Object> rack = new HashMap<>(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | // @Override |
| | | // public int getTotalQuantity(int workstationId) { |
| | | // Integer totalQuantity = downWorkstationMapper.getTotalQuantity(workstationId); |
| | | // return totalQuantity != null ? totalQuantity : 0; |
| | | // } |
| | | |
| | | // @Override |
| | | // public int getRacksNumber(int workstationId) { |
| | | // Integer racksNumber = downWorkstationMapper.getRacksNumber(workstationId); |
| | | // return racksNumber != null ? racksNumber : 0; |
| | | // } |
| | | //根据条件获取落架数量 |
| | | @Override |
| | | public int getRacksNumber(int workstationId) { |
| | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getRacksnumber() : 0; |
| | | } |
| | | |
| | | //根据条件获取工位玻璃信息 |
| | | @Override |
| | | public List<DownWorkstation> getoneDownWorkstations(int startId, int endId) { |
| | |
| | | public void updateracksnumber(String flowCardId, int racksNumber) { |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("racks_number",racksNumber).eq("flow_card_id", flowCardId); |
| | | baseMapper.update(null, updateWrapper); |
| | | baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | .set("flow_card_id", flowCardId) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | return baseMapper.update(null, updateWrapper); |
| | | return baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | .set("racks_number", 0) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | baseMapper.update(null, updateWrapper); |
| | | baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Transactional |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void insertdownglassinfo() { |
| | | |
| | | |
| | | |
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | try { |
| | | //查询下片工位表中架子是否绑定了流程卡号 工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | List<DownWorkstationTask> taskdownWorkstation = downWorkstationTaskService.getTaskState(); |
| | |
| | | // 或者可以进行其他异常处理,比如记录日志或者返回特定的错误信息 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | // 如果没有记录,则将 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()); |
| | | entity.setThickness(downGlassInfo.getThickness()); |
| | | entity.setFilmsid(downGlassInfo.getFilmsid()); |
| | | entity.setState(1); |
| | | |
| | | BeanUtils.copyProperties(entity,downGlassInfo); |
| | | entity.setId(newId); // 设置手动递增的 id |
| | | entity.setState(1); |
| | | baseMapper.insert(entity); |
| | | } |
| | | |
| | |
| | | UpdateWrapper<DownWorkstationTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("state", 0).eq("id", id); |
| | | |
| | | baseMapper.update(null, updateWrapper); |
| | | baseMapper.update(new DownWorkstationTask(), updateWrapper); |
| | | } |
| | | |
| | | } |
| | |
| | | * 流程卡 |
| | | */ |
| | | @TableField("flow_card_Id") |
| | | private String flowcardId; |
| | | private String flowCardId; |
| | | |
| | | /** |
| | | * 流程卡玻璃类型 |
| | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private Integer filmsid; |
| | | private String filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | } |
| | | |
| | | |
| | | // public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | // int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | // if (rowsAffected > 0) { |
| | | // System.out.println("更新架子上流程卡 ID 和数量成功"); |
| | | // } else { |
| | | // System.out.println("更新架子上流程卡 ID 和数量失败"); |
| | | // } |
| | | // } |
| | | |
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: root |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://192.168.56.10:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | port: 8085 |
| | | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: unLoadGlass |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | |
| | | package mes; |
| | | |
| | | import com.mes.UnLoadGlassApplication; |
| | | import com.mes.downglassinfo.service.impl.DownGlassInfoServiceImpl; |
| | | import com.mes.downglassinfo.service.impl.DownGlassTaskServiceImpl; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downstorage.service.impl.DownStorageCageDetailsServiceImpl; |
| | | import com.mes.downstorage.service.impl.DownStorageCageServiceImpl; |
| | | |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | |
| | | @Autowired |
| | | DownStorageCageServiceImpl downStorageCageServiceImpl; |
| | | @Autowired |
| | | DownGlassTaskServiceImpl downGlassTaskServiceImpl; |
| | | @Autowired |
| | | DownGlassInfoServiceImpl downGlassInfoServiceImpl; |
| | | @Autowired |
| | | DownStorageCageDetailsServiceImpl downStorageCageDetailsServiceImpl; |
| | | @Autowired |
| | | DownStorageCageDetailsService downStorageCageDetailsService; |
| | | @Autowired |
| | | DownWorkstationServiceImpl downWorkstationServiceImpl; |
| | |
| | | |
| | | @Test |
| | | public void testCacheGlass() { |
| | | List<Map> map = downStorageCageServiceImpl.getCacheInfo(); |
| | | List<Map> map = downStorageCageDetailsServiceImpl.getCacheInfo(); |
| | | log.info("笼内信息:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | @Test |
| | | public void testselectCacheEmpty() { |
| | | List<DownStorageCageDetails> map = downStorageCageServiceImpl.getCacheLeisure(); |
| | | List<DownStorageCageDetails> map = downStorageCageDetailsServiceImpl.getCacheLeisure(); |
| | | log.info("笼内空格:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void testgetCacheOut() { |
| | | List<DownStorageCageDetails> map = downStorageCageServiceImpl.getCacheOut(1, 5); |
| | | List<DownStorageCageDetails> map = downStorageCageDetailsServiceImpl.getCacheOut(1, 5); |
| | | log.info("根据传入的工位查询符合按照顺序和大小出片的小片:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @Test |
| | | public void testin() { |
| | | public void testin2() { |
| | | log.info("测试进片"); |
| | | downStorageCageServiceImpl.getIsExistIntoCacheByflowcardid("NG2023005",500); |
| | | downStorageCageDetailsServiceImpl.getIsExistIntoCacheByflowcardid("NG2023005",500); |
| | | |
| | | } |
| | | |
| | |
| | | @Test |
| | | public void selectCacheEmpty() { |
| | | log.info("测试进片"); |
| | | downStorageCageServiceImpl.selectCacheEmpty(); |
| | | downStorageCageDetailsServiceImpl.getCacheLeisure(); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void CacheEmpty() { |
| | | log.info("测试出片"); |
| | | downStorageCageDetailsService.CacheOut(1,5); |
| | | downStorageCageDetailsService.CacheOut(1,10); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void getMaxSequenceByFlowCardId() { |
| | | log.info("最大序号"); |
| | | |
| | | downGlassInfoServiceImpl.getMaxSequenceByFlowCardId("NG2023005"); |
| | | } |
| | | |
| | | @Test |
| | | public void updateTaskStateToZero() { |
| | | log.info("更新状态0"); |
| | | |
| | | downGlassTaskServiceImpl.updateTaskStateToZero(3); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void selectCacheEmpty2() { |
| | | |
| | | |
| | | downStorageCageServiceImpl.selectCacheEmpty(); |
| | | } |
| | | |
| | | |
| | | } |