Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
| | |
| | | { |
| | | "plcAddressBegin": "DB100.0", |
| | | "plcAddressLenght": "142", |
| | | "plcAddressBegin": "DB11.0", |
| | | "plcAddressLenght": "92", |
| | | "dataType": "word", |
| | | "parameteInfor": [ |
| | | |
| | | { |
| | | "codeId": "RequestWord", |
| | | "codeId": "requestWord", |
| | | "addressIndex": "0", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04ID", |
| | | "codeId": "requestID", |
| | | "addressIndex": "2", |
| | | "addressLenght": "2" |
| | | "addressLenght": "30" |
| | | }, |
| | | { |
| | | "codeId": "G06RobotTaskRequestWord", |
| | | "addressIndex": "4", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06ID", |
| | | "addressIndex": "6", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11RobotTaskRequestWord", |
| | | "addressIndex": "8", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G011ID", |
| | | "addressIndex": "10", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "12", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "14", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "16", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "18", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "MESSendingWord", |
| | | "addressIndex": "20", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InputGrid", |
| | | "addressIndex": "22", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "OutputGrid", |
| | | "addressIndex": "24", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "OutputID", |
| | | "addressIndex": "26", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "FrontOrRearLowerSlice", |
| | | "addressIndex": "28", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "30", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06RobotTaskReply", |
| | | "codeId": "currentCell", |
| | | "addressIndex": "32", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06Rack", |
| | | "addressIndex": "34", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11RobotTaskReply", |
| | | "codeId": "glassStatus08", |
| | | "addressIndex": "36", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11Rack", |
| | | "addressIndex": "38", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "glassStatus06", |
| | | "addressIndex": "40", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "glassStatus11", |
| | | "addressIndex": "42", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "glassStatus13", |
| | | "addressIndex": "44", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "46", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G04_error_status", |
| | | "addressIndex": "48", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G05_error_status", |
| | | "addressIndex": "50", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G06_error_status", |
| | | "addressIndex": "52", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "robot_error_status", |
| | | "addressIndex": "54", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "MESTaskState", |
| | | "codeId": "G08_error_status", |
| | | "addressIndex": "56", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G09_error_status", |
| | | "addressIndex": "58", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "AlarmState", |
| | | "codeId": "G10_error_status", |
| | | "addressIndex": "60", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm1", |
| | | "codeId": "G11_error_status", |
| | | "addressIndex": "62", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm2", |
| | | "codeId": "robot_error_status", |
| | | "addressIndex": "64", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm3", |
| | | "codeId": "G13_error_status", |
| | | "addressIndex": "66", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm4", |
| | | "addressIndex": "68", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "neirong", |
| | | "addressIndex": "70", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "device", |
| | | "codeId": "confirmationWord", |
| | | "addressIndex": "72", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G06_prohibit_film_production", |
| | | "addressIndex": "74", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G11_prohibit_film_production", |
| | | "addressIndex": "76", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut1", |
| | | "codeId": "G13_prohibit_film_production", |
| | | "addressIndex": "78", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut2", |
| | | "codeId": "Glass_width", |
| | | "addressIndex": "80", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut3", |
| | | "codeId": "Glass_height", |
| | | "addressIndex": "82", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut4", |
| | | "codeId": "Glass_thickness", |
| | | "addressIndex": "84", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut5", |
| | | "codeId": "Start_cell", |
| | | "addressIndex": "86", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut6", |
| | | "codeId": "End_cell", |
| | | "addressIndex": "88", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut7", |
| | | "codeId": "task_type", |
| | | "addressIndex": "90", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "92", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "94", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "96", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "98", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "100", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04ActionState", |
| | | "addressIndex": "102", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G05ActionState", |
| | | "addressIndex": "104", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06ActionState", |
| | | "addressIndex": "106", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G07ActionState", |
| | | "addressIndex": "108", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G08ActionState", |
| | | "addressIndex": "110", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G09ActionState", |
| | | "addressIndex": "112", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G10ActionState", |
| | | "addressIndex": "114", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11ActionState", |
| | | "addressIndex": "116", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G12ActionState", |
| | | "addressIndex": "118", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G13ActionState", |
| | | "addressIndex": "120", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04IDS", |
| | | "addressIndex": "122", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G05IDS", |
| | | "addressIndex": "124", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06IDS", |
| | | "addressIndex": "126", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G07IDS", |
| | | "addressIndex": "128", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G08IDS", |
| | | "addressIndex": "130", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G09IDS", |
| | | "addressIndex": "132", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G10IDS", |
| | | "addressIndex": "134", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11IDS", |
| | | "addressIndex": "136", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G12IDS", |
| | | "addressIndex": "138", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G13ID", |
| | | "addressIndex": "140", |
| | | "addressLenght": "2" |
| | | } |
| | | |
| | | ] |
| | | } |
| | |
| | | disable:'禁用', |
| | | start:'启用', |
| | | deficiencieste:'报缺', |
| | | updown:'人工下片', |
| | | operate:'操作', |
| | | prompt:'提示', |
| | | information:'是否报缺该条信息?', |
| | | infor:'是否人工下片该条信息?', |
| | | yes:'是', |
| | | cancel:'取消', |
| | | }, |
| | |
| | | fin:'是否完成任务?', |
| | | sureadd:'确认添加', |
| | | sureadda:'是否确认添加?', |
| | | zailong:'在笼中', |
| | | rengongxp:'人工下片', |
| | | up:'上一页', |
| | | down:'下一页', |
| | | now:'当前页显示', |
| | | tit:'条数据', |
| | | }, |
| | | workOrder:{ |
| | | glassID:'玻璃ID', |
| | |
| | | <el-table-column fixed="right" :label="$t('sorter.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('sorter.deficiencieste') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('sorter.updown') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | var url="/unLoadGlass/downStorage/deleteDownStorageCage?edgStorageCageId="+row.id; |
| | | console.log(url); |
| | | const response = await request.post(url, { |
| | | esdId: row.esdId |
| | |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | ElMessage.error(response.msg); |
| | | ElMessage.error(response.message); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 人工下片 |
| | | const opena = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('sorter.infor'), |
| | | t('sorter.prompt'), |
| | | { |
| | | confirmButtonText: t('sorter.yes'), |
| | | cancelButtonText: t('sorter.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/unLoadGlass/downGlassTask/generateOutGlassTask", { |
| | | glassId: row.glass_id |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | | ElMessage.error(response.message); |
| | | // alert('删除失败:' + deleteResponse.message); |
| | | } |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理可能出现的错误,比如 ElMessageBox 抛出的异常等 |
| | | console.error('发生错误:', error); |
| | |
| | | const router = useRouter() |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { ref, onMounted , onBeforeUnmount, reactive} from "vue"; |
| | | import { ref, onMounted , onBeforeUnmount, reactive, computed } from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { tr } from "element-plus/es/locale"; |
| | |
| | | const cell7=ref(true); |
| | | const cell8=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | const currentPage4 = ref(4) |
| | | const pageSize4 = ref(100) |
| | | |
| | | |
| | | // 当前页码和每页显示的条数 |
| | | const currentPage = ref(1); |
| | | const itemsPerPage = computed(() => { |
| | | if (currentPage.value === 1) { |
| | | return 21; |
| | | } else if (currentPage.value === 2) { |
| | | return 21; |
| | | } else if (currentPage.value === 3) { |
| | | return 21; |
| | | } else if (currentPage.value === 4) { |
| | | return 21; |
| | | } else if (currentPage.value === 5) { |
| | | return 21; |
| | | } else if (currentPage.value === 6) { |
| | | return 21; |
| | | } else if (currentPage.value === 7) { |
| | | return 21; |
| | | } else { |
| | | return 21; // 默认值,可以根据实际需求修改 |
| | | } |
| | | }); |
| | | |
| | | // 计算分页后的数据 |
| | | const paginatedUsers = computed(() => { |
| | | const startIndex = calculateStartIndex(); |
| | | const endIndex = startIndex + itemsPerPage.value; |
| | | return tableData.value.slice(startIndex, endIndex); |
| | | }); |
| | | |
| | | // 计算当前页的起始索引 |
| | | function calculateStartIndex() { |
| | | let index = 0; |
| | | for (let i = 1; i < currentPage.value; i++) { |
| | | if (i === 1) { |
| | | index += 21; |
| | | } else if (i === 2) { |
| | | index += 21; |
| | | } else if (i === 3) { |
| | | index += 21; |
| | | }else if (i === 4) { |
| | | index += 21; |
| | | }else if (i === 5) { |
| | | index += 21; |
| | | }else if (i === 6) { |
| | | index += 21; |
| | | }else if (i === 7) { |
| | | index += 21; |
| | | } else { |
| | | index += 31; |
| | | } |
| | | } |
| | | return index; |
| | | } |
| | | |
| | | // 上一页和下一页方法 |
| | | const prevPage = () => { |
| | | if (currentPage.value > 1) { |
| | | currentPage.value--; |
| | | } |
| | | }; |
| | | |
| | | const nextPage = () => { |
| | | if (currentPage.value < totalPages.value) { |
| | | currentPage.value++; |
| | | } |
| | | }; |
| | | |
| | | // 总页数计算 |
| | | const totalPages = computed(() => { |
| | | // let total = 0; |
| | | // for (let i = 1; i <= users.value.length; i++) { |
| | | // if (i === 1) { |
| | | // total += 1; |
| | | // } else if (i === 2) { |
| | | // total += 2; |
| | | // } else if (i === 3) { |
| | | // total += 5; |
| | | // } else { |
| | | // total += 10; |
| | | // } |
| | | // } |
| | | return 8; |
| | | }); |
| | | |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | selectedRow.value = row; // 更新选中的行数据 |
| | | currentRow.deviceId = row.deviceId; // 直接设置响应式属性 |
| | | currentRow.slot = row.slot; |
| | | console.log(row.deviceId); |
| | | console.log(row.slot); |
| | | window.localStorage.setItem('deviceId', row.deviceId) |
| | | window.localStorage.setItem('slot', row.slot) |
| | | add.value = true; // 打开绑定架子对话框 |
| | | |
| | | }; |
| | | // 搜索 |
| | | const searchout = async () => { |
| | |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/deleteBigStorageCageDetails",row) |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | // 删除失败,您可以处理错误或显示错误信息给用户 |
| | |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/damageBigStorageCageDetails?status="+0, row) |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/damageBigStorageCageDetails?status="+1, row) |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | }; |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/insertBigStorageCageDetails", dataToSend) |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | | add.value = false; |
| | | ElMessage.success(response.message); |
| | | glassId.value = ''; |
| | | tableDataf.value = ''; |
| | | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | function handleRowClick(row) { |
| | | selectedRow.value = row; // 更新选中的行数据 |
| | | } |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | |
| | | }); |
| | | function getStatusType(enableState: number) { |
| | | switch (enableState) { |
| | | case 0: |
| | | return 'warning'; |
| | | case 1: |
| | | case 100: |
| | | return 'success'; |
| | | case 102: |
| | | return 'warning'; |
| | | } |
| | | } |
| | | function getStatusText(enableState: number) { |
| | | switch (enableState) { |
| | | case 0: |
| | | return t('searchOrder.disable'); |
| | | case 1: |
| | | return t('searchOrder.enable'); |
| | | case 100: |
| | | return t('searchOrder.zailong'); |
| | | case 102: |
| | | return t('searchOrder.rengongxp'); |
| | | } |
| | | } |
| | | function getStatusTypea(ishorizontal: number) { |
| | |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblea" top="5vh" width="97%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-table |
| | | :data="tableData" |
| | | :data="paginatedUsers" |
| | | @row-click="handleRowClick" |
| | | height="500" |
| | | @expand-change="handleExpandChange" |
| | |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <!-- <el-table-column prop="menuName" label="二级菜单栏" align="center" min-width="140" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"/> --> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="80"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="100" /> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="90"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="110" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="80" /> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="80" /> |
| | |
| | | :label="$t('searchOrder.startstatus')" |
| | | min-width="80" |
| | | prop="state" |
| | | |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.state)"> |
| | |
| | | <el-button size="mini" type="text" plain @click="broke(scope.row)">{{ $t('searchOrder.breakage') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokec(scope.row)">{{ $t('searchOrder.takeout') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('searchOrder.delete') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="outfil(scope.row)">{{ $t('searchOrder.outfilm') }}</el-button> |
| | | <el-button size="mini" type="text" |
| | | :disabled="!((props.row.bigStorageCageDetails[0].state !== 102 && scope.$index == 0 ) || (props.row.bigStorageCageDetails[(scope.$index - 1)<0?0:scope.$index-1].state==102)&&(scope.row.state!=102))" |
| | | plain @click="outfil(scope.row)"> |
| | | {{ $t('searchOrder.outfilm') }} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div id="demo-pagination-block"> |
| | | <el-pagination |
| | | style="margin-left: 850px;" |
| | | v-model:current-page="currentPage4" |
| | | v-model:page-size="pageSize4" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :small="small" |
| | | :disabled="disabled" |
| | | :background="background" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="400" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | <div> |
| | | <div style="margin-top: 20px; text-align: center;"> |
| | | <!-- 上一页按钮 --> |
| | | <el-button @click="prevPage" :disabled="currentPage === 1">{{ $t('searchOrder.up') }}</el-button> |
| | | |
| | | <!-- 下一页按钮 --> |
| | | <el-button @click="nextPage" :disabled="currentPage >= totalPages">{{ $t('searchOrder.down') }}</el-button> |
| | | |
| | | <!-- 当前页显示的条数 --> |
| | | <span style="margin-left: 10px;">{{ $t('searchOrder.now') }} {{ itemsPerPage }} {{ $t('searchOrder.tit') }}</span> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- </el-dialog> --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="5vh" width="85%" :title="$t('searchOrder.productionqueue')"> |
| | | <!-- <div style="display: flex;"> |
| | | <p style="margin-top: 3px;">队列状态:</p> |
| | |
| | | { |
| | | "plcAddressBegin": "DB100.0", |
| | | "plcAddressLenght": "142", |
| | | "plcAddressBegin": "DB11.0", |
| | | "plcAddressLenght": "100", |
| | | "dataType": "word", |
| | | "parameteInfor": [ |
| | | |
| | | { |
| | | "codeId": "RequestWord", |
| | | "codeId": "requestWord", |
| | | "addressIndex": "0", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04ID", |
| | | "codeId": "requestID", |
| | | "addressIndex": "2", |
| | | "addressLenght": "2" |
| | | "addressLenght": "30" |
| | | }, |
| | | { |
| | | "codeId": "G06RobotTaskRequestWord", |
| | | "addressIndex": "4", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06ID", |
| | | "addressIndex": "6", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11RobotTaskRequestWord", |
| | | "addressIndex": "8", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G011ID", |
| | | "addressIndex": "10", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "12", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "14", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "16", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "18", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "MESSendingWord", |
| | | "addressIndex": "20", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InputGrid", |
| | | "addressIndex": "22", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "OutputGrid", |
| | | "addressIndex": "24", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "OutputID", |
| | | "addressIndex": "26", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "FrontOrRearLowerSlice", |
| | | "addressIndex": "28", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "30", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06RobotTaskReply", |
| | | "codeId": "currentCell", |
| | | "addressIndex": "32", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06Rack", |
| | | "addressIndex": "34", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11RobotTaskReply", |
| | | "codeId": "glassStatus08", |
| | | "addressIndex": "36", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11Rack", |
| | | "addressIndex": "38", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G06_glass_status", |
| | | "addressIndex": "40", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G11_glass_status", |
| | | "addressIndex": "42", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G13_glass_status", |
| | | "addressIndex": "44", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "46", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G04_error_status", |
| | | "addressIndex": "48", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G05_error_status", |
| | | "addressIndex": "50", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G06_error_status", |
| | | "addressIndex": "52", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "robot_error_status", |
| | | "addressIndex": "54", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "MESTaskState", |
| | | "codeId": "G08_error_status", |
| | | "addressIndex": "56", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G09_error_status", |
| | | "addressIndex": "58", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "AlarmState", |
| | | "codeId": "G10_error_status", |
| | | "addressIndex": "60", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm1", |
| | | "codeId": "G11_error_status", |
| | | "addressIndex": "62", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm2", |
| | | "codeId": "robot_error_status", |
| | | "addressIndex": "64", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm3", |
| | | "codeId": "G13_error_status", |
| | | "addressIndex": "66", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "Alarm4", |
| | | "addressIndex": "68", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "neirong", |
| | | "addressIndex": "70", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "device", |
| | | "codeId": "confirmationWord", |
| | | "addressIndex": "72", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G06_prohibit_film_production", |
| | | "addressIndex": "74", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "G11_prohibit_film_production", |
| | | "addressIndex": "76", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut1", |
| | | "codeId": "G13_prohibit_film_production", |
| | | "addressIndex": "78", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut2", |
| | | "addressIndex": "80", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut3", |
| | | "codeId": "Glass_width", |
| | | "addressIndex": "82", |
| | | "addressLenght": "2" |
| | | "addressLenght": "4" |
| | | }, |
| | | { |
| | | "codeId": "InOut4", |
| | | "addressIndex": "84", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut5", |
| | | "codeId": "Glass_height", |
| | | "addressIndex": "86", |
| | | "addressLenght": "2" |
| | | "addressLenght": "4" |
| | | }, |
| | | { |
| | | "codeId": "InOut6", |
| | | "addressIndex": "88", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "InOut7", |
| | | "codeId": "Glass_thickness", |
| | | "addressIndex": "90", |
| | | "addressLenght": "2" |
| | | "addressLenght": "4" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "92", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "Start_cell", |
| | | "addressIndex": "94", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "End_cell", |
| | | "addressIndex": "96", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "codeId": "task_type", |
| | | "addressIndex": "98", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "spare", |
| | | "addressIndex": "100", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04ActionState", |
| | | "addressIndex": "102", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G05ActionState", |
| | | "addressIndex": "104", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06ActionState", |
| | | "addressIndex": "106", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G07ActionState", |
| | | "addressIndex": "108", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G08ActionState", |
| | | "addressIndex": "110", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G09ActionState", |
| | | "addressIndex": "112", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G10ActionState", |
| | | "addressIndex": "114", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11ActionState", |
| | | "addressIndex": "116", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G12ActionState", |
| | | "addressIndex": "118", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G13ActionState", |
| | | "addressIndex": "120", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G04IDS", |
| | | "addressIndex": "122", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G05IDS", |
| | | "addressIndex": "124", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G06IDS", |
| | | "addressIndex": "126", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G07IDS", |
| | | "addressIndex": "128", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G08IDS", |
| | | "addressIndex": "130", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G09IDS", |
| | | "addressIndex": "132", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G10IDS", |
| | | "addressIndex": "134", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G11IDS", |
| | | "addressIndex": "136", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G12IDS", |
| | | "addressIndex": "138", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "G13ID", |
| | | "addressIndex": "140", |
| | | "addressLenght": "2" |
| | | } |
| | | |
| | | ] |
| | | } |
| | |
| | | public static final List<Integer> G11_WORK_STATION = Arrays.asList(4, 5, 6); |
| | | public static final List<Integer> G13_WORK_STATION = Arrays.asList(7); |
| | | |
| | | /** |
| | | * 启用 1 |
| | | * 禁用 0 |
| | | */ |
| | | public static final Integer SLOT_ON = 1; |
| | | public static final Integer SLOT_OFF = 0; |
| | | |
| | | } |
| | |
| | | MPJLambdaWrapper<BigStorageCage> wrapper = new MPJLambdaWrapper<>(BigStorageCage.class) |
| | | .selectAll(BigStorageCage.class) |
| | | .leftJoin(BigStorageCageDetails.class, BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .gt(BigStorageCage::getRemainWidth, glassInfo.getWidth()) |
| | | .last("limit 1"); |
| | |
| | | return bigStorageDTO; |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .inSql(BigStorageCage::getDeviceId, |
| | | "select distinct device_id from big_storage_cage_details where tempering_layout_id = " + glassInfo.getTemperingLayoutId()) |
| | |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .last("limit 1")); |
| | | Assert.isTrue(null != bigStorageCage, "没有空余的笼子存放玻璃"); |
| | | bigStorageDTO = new BigStorageDTO(); |
| | |
| | | package com.mes.bigstoragetask.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageDTO; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageDTO; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("salve_hangzhoumes") |
| | | @DS("salve_hangzhoumes_1") |
| | | public interface BigStorageCageFeedTaskMapper extends MPJBaseMapper<BigStorageCageFeedTask> { |
| | | |
| | | List<Integer> querySitToUpGlass(); |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("salve_hangzhoumes") |
| | | @DS("salve_hangzhoumes_1") |
| | | public interface BigStorageCageOutTaskMapper extends BaseMapper<BigStorageCageOutTask> { |
| | | |
| | | boolean saveBatch(@Param(value = "list") List<BigStorageCageOutTask> list); |
| | |
| | | @Value("${mes.slotWidth}") |
| | | private Integer slotWidth; |
| | | |
| | | @Value("${mes.carMaxSize}") |
| | | private Integer carMaxSize; |
| | | @Value("${mes.inCarMaxSize}") |
| | | private Integer inCarMaxSize; |
| | | |
| | | @Value("${mes.outCarMaxSize}") |
| | | private Integer outCarMaxSize; |
| | | |
| | | @Value("${mes.galssGap}") |
| | | private Integer galssGap; |
| | |
| | | public void plcToHomeEdgScan() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String d01Id = plcParameterObject.getPlcParameter("D01ID").getValue(); |
| | | String d02Id = plcParameterObject.getPlcParameter("D02ID").getValue(); |
| | | String d04Id = plcParameterObject.getPlcParameter("D04ID").getValue(); |
| | | String d03State = plcParameterObject.getPlcParameter("D03State").getValue(); |
| | | String d05State = plcParameterObject.getPlcParameter("D05State").getValue(); |
| | | String mesD03Address = plcParameterObject.getPlcParameter("MESToD03").getAddress(); |
| | | String mesD05Address = plcParameterObject.getPlcParameter("MESToD05").getAddress(); |
| | | |
| | | |
| | | log.info("1、获取d01Id扫描ID为:{};获取d02Id扫描ID为:{};", d01Id, d02Id); |
| | | if (StringUtils.isBlank(d01Id) && StringUtils.isBlank(d02Id)) { |
| | | log.info("1、获取d01Id扫描ID为:{};获取d04Id扫描ID为:{};", d01Id, d04Id); |
| | | if (StringUtils.isBlank(d01Id) && StringUtils.isBlank(d04Id)) { |
| | | log.info("两条线未收到进片任务,结束本次扫描进卧转立任务"); |
| | | return; |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(d01Id) && !REQUEST_WORD.equals(d03State)) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD03Address); |
| | | } |
| | | if (StringUtils.isNotBlank(d02Id) && !REQUEST_WORD.equals(d05State)) { |
| | | judgeGlassTypeStatus(d02Id, Const.A10_OUT_TARGET_POSITION, mesD05Address); |
| | | if (StringUtils.isNotBlank(d04Id) && !REQUEST_WORD.equals(d05State)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD05Address); |
| | | } |
| | | log.info("结束扫码任务"); |
| | | // if (flag01 && flag04) { |
| | |
| | | } |
| | | } |
| | | String d01Id = plcParameterObject.getPlcParameter("D01ID").getValue(); |
| | | String d02Id = plcParameterObject.getPlcParameter("D02ID").getValue(); |
| | | log.info("1、获取d01Id扫描ID为:{};获取d02Id扫描ID为:{};", d01Id, d02Id); |
| | | String d04Id = plcParameterObject.getPlcParameter("D04ID").getValue(); |
| | | log.info("1、获取d01Id扫描ID为:{};获取d04Id扫描ID为:{};", d01Id, d04Id); |
| | | //两条线都有进卧转立任务,直接结束 |
| | | // if (StringUtils.isNotBlank(d01Id) && StringUtils.isNotBlank(d02Id)) { |
| | | // if (StringUtils.isNotBlank(d01Id) && StringUtils.isNotBlank(d04Id)) { |
| | | // log.info("两条线都存在进片任务,结束任务"); |
| | | // return; |
| | | // } |
| | |
| | | return; |
| | | } |
| | | Integer lineFirst = lineList.get(0); |
| | | String lineGlassId = lineFirst.equals(Const.A09_OUT_TARGET_POSITION) ? d01Id : d02Id; |
| | | String lineGlassId = lineFirst.equals(Const.A09_OUT_TARGET_POSITION) ? d01Id : d04Id; |
| | | //仅有一条先符合启动启动条件 |
| | | if (lineList.size() == 1) { |
| | | //如果进片请求但玻璃为空,计算任务表进片格子 发送进片任务 |
| | |
| | | return; |
| | | } |
| | | //两条先均可执行进片任务,判断两条线是否进片请求是否都为空 |
| | | if (StringUtils.isBlank(d01Id) && StringUtils.isBlank(d02Id)) { |
| | | if (StringUtils.isBlank(d01Id) && StringUtils.isBlank(d04Id)) { |
| | | //比较最早一片任务的版图id及版序 求出卧转立的线路 |
| | | Integer line = getStartLine(); |
| | | //计算任务表进片格子 发送进片任务 |
| | | computeTargetByLine(line); |
| | | return; |
| | | } else if (StringUtils.isNotBlank(d01Id) && StringUtils.isNotBlank(d02Id)) { |
| | | } else if (StringUtils.isNotBlank(d01Id) && StringUtils.isNotBlank(d04Id)) { |
| | | // todo:两个都有进片玻璃 |
| | | if (computeIsRun(Const.A09_OUT_TARGET_POSITION, d01Id) && computeIsRun(Const.A10_OUT_TARGET_POSITION, d02Id)) { |
| | | if (computeIsRun(Const.A09_OUT_TARGET_POSITION, d01Id) && computeIsRun(Const.A10_OUT_TARGET_POSITION, d04Id)) { |
| | | //比较最早一片任务的版图id及版序 求出卧转立的线路 |
| | | Integer line = getStartLine(); |
| | | //计算任务表进片格子 发送进片任务 |
| | | computeTargetByLine(line); |
| | | } else if (computeIsRun(Const.A09_OUT_TARGET_POSITION, d01Id)) { |
| | | computeTargetByLine(Const.A09_OUT_TARGET_POSITION); |
| | | } else if (computeIsRun(Const.A10_OUT_TARGET_POSITION, d02Id)) { |
| | | } else if (computeIsRun(Const.A10_OUT_TARGET_POSITION, d04Id)) { |
| | | computeTargetByLine(Const.A10_OUT_TARGET_POSITION); |
| | | } else { |
| | | return; |
| | |
| | | Integer widthSecond = edgGlassTaskInfoList.get(1).getWidth(); |
| | | if (remainWidth >= widthFirst) { |
| | | if (remainWidth - widthFirst - galssGap >= widthSecond) { |
| | | if (glassCount <= carMaxSize - 1) { |
| | | if (glassCount <= inCarMaxSize - 1) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst); |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst); |
| | |
| | | String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getAddress(); |
| | | String outLine = line.equals(Const.A09_OUT_TARGET_POSITION) ? mesD03Address : mesD05Address; |
| | | for (int i = 1; i <= taskList.size(); i++) { |
| | | s7control.writeWord(plcMesObject.getPlcParameter("StartAddToImport" + i).getAddress(), (short) taskList.get(i).getLine()); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("TargetAddToImport1" + i).getAddress(), (short) taskList.get(i).getTargetSlot()); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("StartAddToImport" + i).getAddress(), (short) taskList.get(i - 1).getLine()); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("TargetAddToImport" + i).getAddress(), (short) taskList.get(i - 1).getTargetSlot()); |
| | | } |
| | | s7control.writeWord(outLine, (short) 1); |
| | | } |
| | |
| | | //打车剩余尺寸 |
| | | Integer remainWidth = carWidth; |
| | | for (T e : list) { |
| | | if (bigStorageCageOutTaskList.size() > carMaxSize || e.getWidth() > remainWidth) { |
| | | if (bigStorageCageOutTaskList.size() > outCarMaxSize || e.getWidth() > remainWidth) { |
| | | break; |
| | | } |
| | | remainWidth = remainWidth - (int) e.getWidth() - galssGap; |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://192.168.20.2:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | minCount: 5 |
| | | carWidth: 5000 #大车宽度 |
| | | slotWidth: 5000 #大车宽度 |
| | | carMaxSize: 6 #大车最大存放玻璃数量 |
| | | galssGap: 20 #玻璃间距 |
| | | inCarMaxSize: 6 #进片大车最大存放玻璃数量 |
| | | outCarMaxSize: 1 #出片大车最大存放玻璃数量 |
| | | galssGap: 300 #玻璃间距 |
| | |
| | | ) T2 |
| | | INNER JOIN (SELECT ENGINEER_ID, TEMPERING_LAYOUT_ID, COUNT(TEMPERING_FEED_SEQUENCE) AS COUNT |
| | | FROM BIG_STORAGE_CAGE_DETAILS |
| | | WHERE STATE = 100 |
| | | WHERE STATE in (100, 101, 102) |
| | | GROUP BY ENGINEER_ID, TEMPERING_LAYOUT_ID) T3 ON T2.ENGINEER_ID = T3.ENGINEER_ID |
| | | AND T2.TEMPERING_LAYOUT_ID = T3.TEMPERING_LAYOUT_ID |
| | | AND T2.COUNT = T3.COUNT LIMIT 1 |
| | |
| | | package com.mes; |
| | | |
| | | //import com.mes.common.S7object; |
| | | |
| | | import com.mes.common.S7object; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | |
| | | @Slf4j |
| | | @Component |
| | | @Order(1) |
| | | |
| | | public class AppRunnerConfig implements ApplicationRunner { |
| | | |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | log.info("启动完成"); |
| | | //S7object.getinstance().start(); |
| | | |
| | | S7object.getinstance().start(); |
| | | } |
| | | } |
| | |
| | | public class S7object extends Thread { |
| | | public S7control plccontrol; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1200; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private String ip = "192.168.30.100"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | private Integer maxHeight; |
| | | |
| | | |
| | | // @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void plcHomeEdgTask() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String requestWord = plcParameterObject.getPlcParameter("RequestWord").getValue(); |
| | | String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue(); |
| | | String glassIdeValue = plcParameterObject.getPlcParameter("requestID").getValue(); |
| | | //A08 A09表示线路相同 可做等价 无数据转int异常 |
| | | String out06Glassstate = plcParameterObject.getPlcParameter("glassStatus06").getValue(); |
| | |
| | | private Boolean sendMessageToPlc(int width, int height, int thickness, int startCell, int endCell, int taskType) { |
| | | S7control s7control = S7object.getinstance().plccontrol; |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), (short) width * 10); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_height").getAddress(), (short) height * 10); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_thickness").getAddress(), (short) thickness * 10); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_width").getAddress(), (short) width); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_height").getAddress(), (short) height); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Glass_thickness").getAddress(), (short) thickness); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("Start_cell").getAddress(), (short) startCell); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("End_cell").getAddress(), (short) endCell); |
| | | s7control.writeWord(plcMesObject.getPlcParameter("task_type").getAddress(), (short) taskType); |
| | |
| | | {
|
| | | "plcAddressBegin": "DB100.0",
|
| | | "plcAddressBegin": "DB11.0",
|
| | | "plcAddressLenght": "100",
|
| | | "dataType": "word",
|
| | | "parameteInfor": [
|