Merge remote-tracking branch 'origin/master'
# Conflicts:
# hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
| | |
| | | takeon:'The arrangement is complete', |
| | | }, |
| | | searchOrder:{ |
| | | totallogarithms:'总对数', |
| | | numberpairs:'配对数', |
| | | numberoccupied:'占用格子数', |
| | | totalfurnaces:'总炉数', |
| | | cagesnumber:'笼内数量', |
| | | slotnumber:'占有格子数', |
| | | progress:'进度', |
| | | whethersame:'是否相同', |
| | | same:'相同', |
| | | notsame:'不相同', |
| | |
| | | basicData: { |
| | | rackreset:'架子复位', |
| | | prackreset:'是否架子复位?', |
| | | deletemessage: 'Удалить эту информацию или нет?', |
| | | laserprinting: 'Машина лазерной маркировки готова:', |
| | | cuttingmachine: 'Машина для резки готова:', |
| | | machine: 'Состояние станок загрузки в режиме онлайн:', |
| | |
| | | takeaway: 'Взять вручную', |
| | | }, |
| | | searchOrder: { |
| | | totallogarithms:'总对数', |
| | | numberpairs:'配对数', |
| | | numberoccupied:'占用格子数', |
| | | totalfurnaces:'总炉数', |
| | | cagesnumber:'笼内数量', |
| | | slotnumber:'占有格子数', |
| | | progress:'进度', |
| | | whethersame:'是否相同', |
| | | same:'相同', |
| | | notsame:'不相同', |
| | |
| | | takeon:'摆片完成', |
| | | }, |
| | | searchOrder:{ |
| | | totallogarithms:'总对数', |
| | | numberpairs:'配对数', |
| | | numberoccupied:'占用格子数', |
| | | totalfurnaces:'总炉数', |
| | | cagesnumber:'笼内数量', |
| | | slotnumber:'占有格子数', |
| | | progress:'进度', |
| | | whethersame:'是否相同', |
| | | same:'相同', |
| | | notsame:'不相同', |
| | |
| | | import userInfo from '@/stores/userInfo' |
| | | import request from '@/utils/request' |
| | | import {ElMessage} from 'element-plus' |
| | | import {ref, watch, onMounted } from 'vue' |
| | | import {ref, watch, onMounted, onUnmounted } from 'vue' |
| | | import deepClone from '@/utils/deepClone' |
| | | import { useRouter } from 'vue-router'; |
| | | import { useI18n } from 'vue-i18n' |
| | | import { provide } from 'vue'; |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | const globalDate = ref(''); |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const store = userInfo() |
| | |
| | | }) |
| | | router.push('/login') |
| | | } |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/mainMes`; |
| | | const handleMessage = (data) => { |
| | | if(data.globalDate!=null){ |
| | | window.localStorage.setItem('getglobalDate', data.globalDate[0]) |
| | | }else{ |
| | | globalDate.value = '' |
| | | } |
| | | } |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | provide('globalDate', getglobalDate); |
| | | function replaceChineseWithEnglish(menuData) { |
| | | // 定义中俄文对照关系对象 |
| | | const translation = { |
| | |
| | | function toggleCollapse() { |
| | | isCollapse.value = !isCollapse.value; |
| | | } |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | </script> |
| | | <template> |
| | | <div id="all"> |
| | |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | import {useI18n} from 'vue-i18n' |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableDataa = ref([]) |
| | |
| | | // id: rect.id * 10, |
| | | // })); |
| | | }; |
| | | onMounted(() => { |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(globalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | const endTime = dayjs().startOf('minute'); // 当前时间,精确到分钟 |
| | | const startTime = endTime.subtract(1, 'day').startOf('minute'); // 当前时间的前一天,精确到分钟 |
| | | // 设置时间范围为 [开始时间, 结束时间] |
| | | timeRange.value = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')]; |
| | | parseAndSetTime(); |
| | | }); |
| | | // 历史任务 |
| | | const handlehistorical = (row) => { |
| | |
| | | // 历史任务 |
| | | const historical = async () => { |
| | | try { |
| | | var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+1 + "&startTime=" + '' + "&endTime=" + '' + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + ''; |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+1 + "&startTime=" + startTime + "&endTime=" + globalDate + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + ''; |
| | | const response = await request.get(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | import {useI18n} from 'vue-i18n' |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableDataa = ref([]) |
| | |
| | | // id: rect.id * 10, |
| | | // })); |
| | | }; |
| | | onMounted(() => { |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(globalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | const endTime = dayjs().startOf('minute'); // 当前时间,精确到分钟 |
| | | const startTime = endTime.subtract(1, 'day').startOf('minute'); // 当前时间的前一天,精确到分钟 |
| | | // 设置时间范围为 [开始时间, 结束时间] |
| | | timeRange.value = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')]; |
| | | parseAndSetTime(); |
| | | }); |
| | | // 历史任务 |
| | | const handlehistorical = (row) => { |
| | |
| | | // 历史任务 |
| | | const historical = async () => { |
| | | try { |
| | | var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+2 + "&startTime=" + '' + "&endTime=" + '' + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + ''; |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | var url="/cacheGlass/edgStorageDeviceTaskHistory?deviceId="+2 + "&startTime=" + startTime + "&endTime=" + globalDate + "&glassId=" + '' + "&taskState=" + '' + "&taskType=" + ''; |
| | | const response = await request.get(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | import dayjs from 'dayjs'; |
| | | import request from "@/utils/request" |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import { inject } from 'vue'; |
| | | const router = useRouter() |
| | | const tableDataa = ref([]) |
| | | const tableDatab = ref([]) |
| | |
| | | const leftingStation = ref(''); |
| | | const loadingline = ref(''); |
| | | let webSocket: WebSocket | null = null; |
| | | const globalDate = inject('globalDate'); |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | |
| | | taskState: '', |
| | | }); |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let endTime = window.localStorage.getItem('endTime') |
| | | request.post("/glassStorage/rawGlassStorageTask/setRawGlassTaskRequest",{ |
| | | beginDate: startTime, |
| | | endDate: endTime, |
| | | endDate: globalDate, |
| | | }).then((response) => { |
| | | if (response.code == 200) { |
| | | tableDataa.value = response.data |
| | | console.log(tableDataa.value); |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | |
| | | } |
| | | }); |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(globalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | const endTime = dayjs().startOf('minute'); // 当前时间,精确到分钟 |
| | | const startTime = endTime.subtract(7, 'day').startOf('minute'); // 当前时间的前一天,精确到分钟 |
| | | // 设置时间范围为 [开始时间, 结束时间] |
| | | timeRange.value = [startTime.format('YYYY-MM-DD HH:mm:ss'), endTime.format('YYYY-MM-DD HH:mm:ss')]; |
| | | window.localStorage.setItem('startTime', startTime.format('YYYY-MM-DD HH:mm:ss')) |
| | | window.localStorage.setItem('endTime', endTime.format('YYYY-MM-DD HH:mm:ss')) |
| | | parseAndSetTime(); |
| | | }); |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/rawGlass`; |
| | |
| | | } |
| | | }; |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | function formatTimestamp(timestamp: number | Date): string { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(date.getDate()).padStart(2, '0'); |
| | | const hours = String(date.getHours()).padStart(2, '0'); |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | function getStatusType1(taskType) { |
| | |
| | | <div style="height: 600px;"> |
| | | <div style="display: flex; flex-direction: row; align-items: center; margin-top: 20px;"> |
| | | <span style="margin-left: 10px;" class="demonstration">{{ $t('reportmanage.productiontime') }}</span> |
| | | <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="daterange" format="YYYY/MM/DD" |
| | | <!-- <el-date-picker style="margin-left: 10px;" v-model="timeRange" type="daterange" format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" :start-placeholder="$t('reportmanage.starttime')" |
| | | :end-placeholder="$t('reportmanage.endtime')" :default-time="defaultTime" /> |
| | | :end-placeholder="$t('reportmanage.endtime')" :default-time="defaultTime" /> --> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-select v-model="report.type" :placeholder="$t('reportmanage.ctype')" style="margin-left: 10px;"> |
| | | <!-- <el-option :label="$t('reportmanage.all')" value="0"></el-option> --> |
| | | <!-- <el-option :label="$t('reportmanage.completed')" value="1"></el-option> --> |
| | |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { useI18n } from 'vue-i18n' |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const timeRange = ref([]) |
| | | const { t } = useI18n() |
| | | const report = ref({ |
| | | type: '8', |
| | |
| | | workingProcedure: '0', |
| | | }); |
| | | const reportData = ref([]) |
| | | const endDate = new Date(); |
| | | const startDate = new Date(); |
| | | startDate.setDate(endDate.getDate() - 7); // 获取一个星期前的时间 |
| | | // 格式化为 "YYYY-MM-DD" 格式 |
| | | const formatDate = (date) => { |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(date.getDate()).padStart(2, '0'); |
| | | return `${year}-${month}-${day}`; |
| | | }; |
| | | |
| | | const timeRange = ref([formatDate(startDate), formatDate(endDate)]); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(globalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | // const timeRange = ref([formatTimestamp(startDate), formatTimestamp(globalDate)]); |
| | | const selectOptionsa = ref([]); |
| | | const selectOptionsb = ref([]); |
| | | const selectOptionsc = ref([]); |
| | |
| | | // 查询数据 |
| | | const selectReportData = async () => { |
| | | const response = await request.post("/cacheVerticalGlass/damage/selectDamage", { |
| | | startTime: timeRange.value[0], |
| | | endTime: timeRange.value[1]+" 23:59:59", |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | type: report.value.type, |
| | | status: report.value.status, |
| | | workingProcedure: report.value.workingProcedure |
| | |
| | | // })); |
| | | // }; |
| | | // let socket; |
| | | onMounted(() => { |
| | | // socket = new WebSocket(socketUrl); |
| | | // socket.onmessage = (event) => { |
| | | // const data = JSON.parse(event.data); |
| | | |
| | | // // updateCharts(); |
| | | // }; |
| | | // }; |
| | | }); |
| | | onUnmounted(() => { |
| | | socket.close(); |
| | | }); |
| | | onMounted(() => { |
| | | fetchTableData(); |
| | | parseAndSetTime(); |
| | | // socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |
| | |
| | | window.localStorage.setItem('engineeringIda', tableData[0].engineeringId) |
| | | } |
| | | } catch (error) { |
| | | ElMessage.error(response.message); |
| | | // ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`; |
| | | const handleMessage = (data: any) => { |
| | | if (data.LoadOneState != null) { |
| | | cuttingMachineStatusColor.value = data.LoadOneState[0] == 1 ? 'green' : '#911005'; |
| | | } |
| | | if (data.list!=null) { |
| | | tableDataa.value = data.list[0].slice(0, 2); |
| | | if(data.loadTask1.length !=0){ |
| | | }else { |
| | | tableDataa.value = '' |
| | | } |
| | | if(data.loadTask1!=null){ |
| | | tableData.value = data.loadTask1[0] |
| | | window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId) |
| | | canSelectProjecta.value = false; |
| | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`; |
| | | const handleMessage = (data: any) => { |
| | | tableDataa.value = data.list[0].slice(2, 4); |
| | | if(data.loadTask2.length !=0){ |
| | | if (data.list!=null) { |
| | | tableDataa.value = data.list[0].slice(2, 4); |
| | | }else { |
| | | tableDataa.value = '' |
| | | } |
| | | if (data.LoadTwoervice != null) { |
| | | cuttingMachineStatusColor.value = data.LoadTwoervice[0] == 1 ? 'green' : '#911005'; |
| | | } |
| | | if(data.loadTask2!=null){ |
| | | // tableData.splice(0, tableData.length, ...data.loadTask2[0]); |
| | | tableData.value = data.loadTask2[0] |
| | | window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId) |
| | |
| | | </el-button> |
| | | <div style="margin-left: 70px;">{{ upstatus }}</div> |
| | | <i :style="{ marginTop: '2px', backgroundColor: cuttingMachineStatusColor, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i> |
| | | <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;">{{ |
| | | $t('basicData.change') |
| | | }} |
| | | </el-button> |
| | | </div> |
| | | <el-button :disabled="!canSelectProjecta" style="margin-top: 5px;margin-left: 15px;" type="primary" @click="selectproject">{{ $t('Mounting.previewproject') }}</el-button> |
| | | <el-button :disabled="!canSelectProjectb" style="margin-top: 5px;margin-left: 20px;" type="success" @click="handleBind">{{ $t('basicData.startloading') }}</el-button> |
| | |
| | | const tableDatae = ref([]) |
| | | const tableDatax = ref([]) |
| | | const tableDatas = ref([]) |
| | | const tableDatass = ref([]) |
| | | const tableDatalack = ref([]) |
| | | const tableDataspecify = ref([]) |
| | | const tableDatacagedetails = ref([]) |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`; |
| | | const handleMessage = (data) => { |
| | | if(data.bigStorageSummary!=null){ |
| | | tableDatass.value = data.bigStorageSummary[0] |
| | | }else{ |
| | | tableDatass.value = '' |
| | | } |
| | | if (data.inkageEntity != null) { |
| | | inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005'; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-card style="flex: 1;margin-left: 1220px;margin-top: -510px;" v-loading="loading"> |
| | | <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 420px;"> |
| | | <el-table height="420px" ref="table" border |
| | | :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="engineerId" align="center" :label="$t('Mounting.project')" min-width="140" /> |
| | | <el-table-column prop="countTemp" align="center" :label="$t('searchOrder.totalfurnaces')" min-width="120" /> |
| | | <el-table-column prop="countGlass" align="center" :label="$t('searchOrder.cagesnumber')" min-width="120" /> |
| | | <el-table-column prop="area" align="center" :label="$t('large.are')" min-width="120" /> |
| | | <el-table-column prop="fullTemp" align="center" :label="$t('searchOrder.fullfurnaces')" min-width="120" /> |
| | | <el-table-column prop="countSlot" align="center" :label="$t('searchOrder.slotnumber')" min-width="120" /> |
| | | <el-table-column prop="percent" align="center" :label="$t('searchOrder.progress')" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | <el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" > |
| | | <div style="margin-bottom: 20px"> |
| | |
| | | const dialogFormVisibled = ref(false) |
| | | const dialogFormVisiblee = ref(false) |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | const adda = ref(false) |
| | | const currentPage2 = ref(1) |
| | | const currentRow = reactive({}); |
| | | const formattedProcessType = ref([]); |
| | |
| | | const tableDataf = ref([]) |
| | | const tableDatae = ref([]) |
| | | const carPosition = ref([]) |
| | | const tableDatass = ref([]) |
| | | const ganghua = ref('') |
| | | const diaodu = ref('') |
| | | const flowCardId = ref('') |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`; |
| | | const handleMessage = (data) => { |
| | | if(data.bigStorageSummary!=null){ |
| | | tableDatass.value = data.bigStorageSummary[0] |
| | | }else{ |
| | | tableDatass.value = '' |
| | | } |
| | | if (data.inkageEntity != null) { |
| | | inkageEntity.value = data.inkageEntity[0] == true ? 'green' : '#911005'; |
| | | } |
| | |
| | | const rectStyle = (rect, index) => ({ |
| | | position: 'absolute', |
| | | width: '170px', |
| | | right: '0px', |
| | | left: '0px', |
| | | top: `${index*rect.top}px`, |
| | | height: `${rect.height}px`, |
| | | }); |
| | |
| | | // 计算每个小矩形的样式 |
| | | const subRectStyle = (rectIndex, subIndex) => { |
| | | const width = '18px'; |
| | | const marginRight = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginRight)); |
| | | const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`; |
| | | const marginLeft = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft)); |
| | | const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`; |
| | | return { |
| | | position: 'absolute', |
| | | width, |
| | | height: '100%', |
| | | marginRight, |
| | | marginLeft, |
| | | top: '0px', |
| | | backgroundColor: '#911005', |
| | | right, |
| | | left, |
| | | }; |
| | | }; |
| | | // 计算每个大矩形的样式 |
| | | const rectStylea = (rect, index) => ({ |
| | | position: 'absolute', |
| | | width: '170px', |
| | | right: '0px', |
| | | left: '0px', |
| | | top: `${index*rect.top}px`, |
| | | height: `${rect.height}px`, |
| | | }); |
| | |
| | | // 计算每个小矩形的样式 |
| | | const subRectStylea = (rectIndex, subIndex) => { |
| | | const width = '18px'; |
| | | const marginRight = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginRight)); |
| | | const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`; |
| | | const marginLeft = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft)); |
| | | const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`; |
| | | return { |
| | | position: 'absolute', |
| | | width, |
| | | height: '100%', |
| | | marginRight, |
| | | marginLeft, |
| | | top: '0px', |
| | | backgroundColor: '#911005', |
| | | right, |
| | | left, |
| | | }; |
| | | }; |
| | | // 计算每个大矩形的样式 |
| | | const rectStyleb = (rect, index) => ({ |
| | | position: 'absolute', |
| | | width: '170px', |
| | | right: '0px', |
| | | left: '0px', |
| | | top: `${index*rect.top}px`, |
| | | height: `${rect.height}px`, |
| | | }); |
| | |
| | | // 计算每个小矩形的样式 |
| | | const subRectStyleb = (rectIndex, subIndex) => { |
| | | const width = '18px'; |
| | | const marginRight = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginRight)); |
| | | const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`; |
| | | const marginLeft = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft)); |
| | | const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`; |
| | | return { |
| | | position: 'absolute', |
| | | width, |
| | | height: '100%', |
| | | marginRight, |
| | | marginLeft, |
| | | top: '0px', |
| | | backgroundColor: '#911005', |
| | | right, |
| | | left, |
| | | }; |
| | | }; |
| | | // 计算每个大矩形的样式 |
| | | const rectStylec = (rect, index) => ({ |
| | | position: 'absolute', |
| | | width: '170px', |
| | | right: '0px', |
| | | left: '0px', |
| | | top: `${index*rect.top}px`, |
| | | height: `${rect.height}px`, |
| | | }); |
| | |
| | | // 计算每个小矩形的样式 |
| | | const subRectStylec = (rectIndex, subIndex) => { |
| | | const width = '18px'; |
| | | const marginRight = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginRight)); |
| | | const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`; |
| | | const marginLeft = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft)); |
| | | const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`; |
| | | return { |
| | | position: 'absolute', |
| | | width, |
| | | height: '100%', |
| | | marginRight, |
| | | marginLeft, |
| | | top: '0px', |
| | | backgroundColor: '#911005', |
| | | right, |
| | | left, |
| | | }; |
| | | }; |
| | | // 计算每个大矩形的样式 |
| | | const rectStyled = (rect, index) => ({ |
| | | position: 'absolute', |
| | | width: '170px', |
| | | right: '0px', |
| | | left: '0px', |
| | | top: `${index*rect.top}px`, |
| | | height: `${rect.height}px`, |
| | | }); |
| | |
| | | // 计算每个小矩形的样式 |
| | | const subRectStyled = (rectIndex, subIndex) => { |
| | | const width = '18px'; |
| | | const marginRight = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginRight)); |
| | | const right = `${(subIndex * (parseInt(width) + parseInt(marginRight))) / totalWidth * 100}%`; |
| | | const marginLeft = '8px'; |
| | | const totalWidth = 6 * (parseInt(width) + parseInt(marginLeft)); |
| | | const left = `${(subIndex * (parseInt(width) + parseInt(marginLeft))) / totalWidth * 100}%`; |
| | | return { |
| | | position: 'absolute', |
| | | width, |
| | |
| | | marginLeft, |
| | | top: '0px', |
| | | backgroundColor: '#911005', |
| | | right, |
| | | left, |
| | | }; |
| | | }; |
| | | onMounted(() => { |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-card style="flex: 1;margin-left: 1020px;margin-top: -670px;" v-loading="loading"> |
| | | <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 550px;"> |
| | | <el-table height="550px" ref="table" border |
| | | :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140" /> |
| | | <el-table-column prop="sumCount" align="center" :label="$t('searchOrder.totallogarithms')" min-width="120" /> |
| | | <el-table-column prop="pairCount" align="center" :label="$t('searchOrder.numberpairs')" min-width="120" /> |
| | | <el-table-column prop="sumCountlayer" align="center" :label="$t('hellow.totalnumber')" min-width="120" /> |
| | | <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="120" /> |
| | | <el-table-column prop="slotCount" align="center" :label="$t('searchOrder.numberoccupied')" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!-- 添加理片笼信息 --> |
| | | <el-dialog v-model="add" top="10vh" width="70%" :title="$t('searchOrder.addcage')" > |
New file |
| | |
| | | package com.mes.bigstorage.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/6/11 16:45 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class BigStorageSummaryDTO { |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String engineerId; |
| | | |
| | | /** |
| | | * 笼内总炉数 |
| | | */ |
| | | private Integer countTemp; |
| | | |
| | | /** |
| | | * 笼内玻璃数量 |
| | | */ |
| | | private Integer countGlass; |
| | | |
| | | /** |
| | | * 面积 |
| | | */ |
| | | private Double area; |
| | | |
| | | /** |
| | | * 满炉数 |
| | | */ |
| | | private Integer fullTemp; |
| | | |
| | | /** |
| | | * 占用格子数 |
| | | */ |
| | | private Integer countSlot; |
| | | |
| | | /** |
| | | * 进度 |
| | | */ |
| | | private Double percent; |
| | | |
| | | } |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.dto.BigStorageSummaryDTO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | public interface BigStorageCageMapper extends MPJBaseMapper<BigStorageCage> { |
| | | |
| | | List<Integer> queryFreeDeviceByUsed(@Param(value = "thickness") double thickness); |
| | | |
| | | List<BigStorageSummaryDTO> selectBigStorageSummary(); |
| | | // |
| | | // List<Integer> queryFreeDeviceByNotUsed(@Param(value = "thickness") double thickness); |
| | | } |
| | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.BigStorageAndDetailsDTO; |
| | | import com.mes.bigstorage.entity.dto.BigStorageSummaryDTO; |
| | | import com.mes.bigstorage.entity.vo.BigStorageDetailsQueryVO; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | |
| | | |
| | | List<Integer> queryFreeDeviceByUsed(double thickness); |
| | | |
| | | List<BigStorageSummaryDTO> selectBigStorageSummary(); |
| | | |
| | | // List<Integer> queryFreeDeviceByNotUsed(double thickness); |
| | | } |
| | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.BigStorageAndDetailsDTO; |
| | | import com.mes.bigstorage.entity.dto.BigStorageSummaryDTO; |
| | | import com.mes.bigstorage.entity.vo.BigStorageDetailsQueryVO; |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | |
| | | return baseMapper.queryFreeDeviceByUsed(thickness); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageSummaryDTO> selectBigStorageSummary() { |
| | | return baseMapper.selectBigStorageSummary(); |
| | | } |
| | | |
| | | // @Override |
| | | // public List<Integer> queryFreeDeviceByNotUsed(double thickness) { |
| | | // return baseMapper.queryFreeDeviceByNotUsed(thickness); |
| | |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.BigStorageSummaryDTO; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageTask; |
| | |
| | | List<Map<String, Object>> bigStorageCageUsage = bigStorageCageService.selectBigStorageCageUsage(); |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | |
| | | //大理片汇总信息 |
| | | List<BigStorageSummaryDTO> bigStorageSummary = bigStorageCageService.selectBigStorageSummary(); |
| | | jsonObject.append("bigStorageSummary", bigStorageSummary); |
| | | |
| | | //打印开关 |
| | | boolean autoPrint = false; |
| | |
| | | <?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.bigstorage.mapper.BigStorageCageMapper"> |
| | | <resultMap id="downStorageCageDetails" type="com.mes.bigstorage.entity.dto.BigStorageSummaryDTO"> |
| | | <result column="engineer_id" property="engineerId"/> |
| | | <result column="countTemp" property="countTemp"/> |
| | | <result column="countGlass" property="countGlass"/> |
| | | <result column="area" property="area"/> |
| | | <result column="fullTemp" property="fullTemp"/> |
| | | <result column="countSlot" property="countSlot"/> |
| | | <result column="percent" property="percent"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="queryFreeDeviceByUsed" resultType="java.lang.Integer"> |
| | |
| | | COUNT(DISTINCT T1.SLOT) |
| | | </select> |
| | | |
| | | <select id="selectBigStorageSummary" resultType="com.mes.bigstorage.entity.dto.BigStorageSummaryDTO"> |
| | | SELECT |
| | | engineer_id as engineerId, |
| | | count( tempering_layout_id ) AS countTemp, |
| | | sum( countGlass ) AS countGlass, |
| | | round( sum( area ), 2 ) as area, |
| | | sum( fullTemp ) AS fullTemp, |
| | | sum( countSlot ) AS countSlot, |
| | | sum( countGlass )/ sum( countGlass1 )* 100 AS percent, |
| | | thickness |
| | | FROM |
| | | ( |
| | | SELECT |
| | | bscd.engineer_id, |
| | | bscd.tempering_layout_id, |
| | | count(*) AS countGlass, |
| | | sum( bscd.width * bscd.height / 1000000 ) AS area, |
| | | IF |
| | | ( gi.countGlass1 = count(*), 1, 0 ) AS fullTemp, |
| | | count( DISTINCT bscd.slot ) AS countSlot, |
| | | countGlass1, |
| | | gi.thickness |
| | | FROM |
| | | big_storage_cage_details bscd |
| | | INNER JOIN ( SELECT engineer_id, tempering_layout_id, count(*) AS countGlass1, thickness FROM glass_info GROUP BY engineer_id, tempering_layout_id ) gi ON bscd.engineer_id = gi.engineer_id |
| | | AND bscd.tempering_layout_id = gi.tempering_layout_id |
| | | WHERE |
| | | bscd.state = 100 |
| | | GROUP BY |
| | | bscd.engineer_id, |
| | | bscd.tempering_layout_id |
| | | ) AS cageSummary |
| | | GROUP BY |
| | | engineer_id |
| | | ORDER BY |
| | | percent DESC, |
| | | thickness DESC, |
| | | countSlot DESC |
| | | </select> |
| | | |
| | | |
| | | |
| | | <!-- <select id="queryFreeDeviceByNotUsed" resultType="java.lang.Integer">--> |
| | | <!-- SELECT T.DEVICE_ID--> |
| | | <!-- FROM BIG_STORAGE_CAGE T--> |
| | |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.service.EngineeringService; |
| | | import com.mes.opctask.entity.LoadGlassDeviceTask; |
| | | import com.mes.opctask.service.LoadGlassDeviceTaskService; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import com.mes.tools.DateUtil; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | private OptimizeProjectService optimizeProjectService; |
| | | @Autowired |
| | | RedisUtil redisUtil; |
| | | @Resource |
| | | private LoadGlassDeviceTaskService loadGlassDeviceTaskService; |
| | | |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | |
| | | private static final String LOAD_GLASS_DEVICE_ONE_TASK = "load_glass_device_one_task"; |
| | | |
| | | private static final String LOAD_GLASS_DEVICE_TWO_TASK = "load_glass_device_two_task"; |
| | | |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | @Scheduled(fixedDelay = 300) |
| | | |
| | | // @Scheduled(fixedDelay = 300) |
| | | public void plcLoadGlassTask() throws InterruptedException { |
| | | try { |
| | | //获取联机状态 |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | // @Scheduled(fixedDelay = 300) |
| | | public void plcLoadGlassReport() { |
| | | //获取是否有汇报 |
| | | String loadStatus = plcParameterObject.getPlcParameter("PlcStatus").getValue(); |
| | |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void loadGlassHome() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //正在进行的任务 |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.prioritylist(); |
| | | if(upPattenUsages!=null){ |
| | | jsonObject.append("prioritylist", upPattenUsages); |
| | | } |
| | | //查询1号线的任务 |
| | | Engineering request = redisUtil.getCacheObject("loadGlassRequest"); |
| | | if (request == null) { |
| | | request = new Engineering(); |
| | | request.setStationCell(5); |
| | | } |
| | | List<UpPattenUsage> upPattenUsages1 = upPattenUsageService.selectLoadTask(request); |
| | | jsonObject.append("loadTask1", upPattenUsages1); |
| | | //查询2号线的任务 |
| | | Engineering request2 = redisUtil.getCacheObject("loadGlassRequest2"); |
| | | if (request2 == null) { |
| | | request2 = new Engineering(); |
| | | request2.setStationCell(6); |
| | | } |
| | | List<UpPattenUsage> upPattenUsages2 = upPattenUsageService.selectLoadTask(request2); |
| | | jsonObject.append("loadTask2", upPattenUsages2); |
| | | //查询工位任务 |
| | | |
| | | try { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //正在进行的任务 |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.prioritylist(); |
| | | if(upPattenUsages!=null){ |
| | | jsonObject.append("prioritylist", upPattenUsages); |
| | | } |
| | | //查询1号线的任务 |
| | | Engineering request = redisUtil.getCacheObject("loadGlassRequest"); |
| | | if (request == null) { |
| | | request = new Engineering(); |
| | | request.setStationCell(5); |
| | | } |
| | | List<UpPattenUsage> upPattenUsages1 = upPattenUsageService.selectLoadTask(request); |
| | | jsonObject.append("loadTask1", upPattenUsages1); |
| | | //查询2号线的任务 |
| | | Engineering request2 = redisUtil.getCacheObject("loadGlassRequest2"); |
| | | if (request2 == null) { |
| | | request2 = new Engineering(); |
| | | request2.setStationCell(6); |
| | | } |
| | | List<UpPattenUsage> upPattenUsages2 = upPattenUsageService.selectLoadTask(request2); |
| | | jsonObject.append("loadTask2", upPattenUsages2); |
| | | // 查询工位任务 |
| | | //联机状态 |
| | | LoadGlassDeviceTask LoadOneState = loadGlassDeviceTaskService.queryTaskMessage(LOAD_GLASS_DEVICE_ONE_TASK); |
| | | LoadGlassDeviceTask LoadTwoState = loadGlassDeviceTaskService.queryTaskMessage(LOAD_GLASS_DEVICE_TWO_TASK); |
| | | jsonObject.append("LoadOneState", LoadOneState.getInkageState()); |
| | | jsonObject.append("LoadTwoervice", LoadTwoState.getInkageState()); |
| | | |
| | | //工位信息 |
| | | List<UpWorkstation> upWorkstations = upWorkstationService.list(); |
| | | jsonObject.append("list", upWorkstations); |
| | | //工位信息 |
| | | List<UpWorkstation> upWorkstations = upWorkstationService.list(); |
| | | jsonObject.append("list", upWorkstations); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("loadGlass"); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("loadGlass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | // } |
| | | } else { |
| | | log.info("loadGlass is closed"); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void send() { |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("mainMes"); |
| | | if (sendwServer != null) { |
| | | //推送服务器当前时间 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | jsonObject.append("globalDate", sdf.format(DateUtil.getEndDate())); |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | // List<String> messages = webserver.getMessages(); |
| | | // if (!messages.isEmpty()) { |
| | | // // // 将最后一个消息转换为整数类型的列表 |
| | | // webserver.clearMessages(); |
| | | // } |
| | | } else { |
| | | log.info("Home is closed"); |
| | | log.info("mainMes is closed"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 5000) |
| | | // @Scheduled(fixedDelay = 5000) |
| | | public void loadGlassStatus() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //正在进行的任务 |
| | |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } else { |
| | | log.info("Home is closed"); |
| | | log.info("loadGlass is closed"); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } else { |
| | | log.info("Home is closed"); |
| | | log.info("loadGlassIsRun is closed"); |
| | | } |
| | | } |
| | | } |
| | |
| | | * 缺少数量 |
| | | */ |
| | | private int lackCount; |
| | | /** |
| | | * 占用格子 |
| | | */ |
| | | private int slotCount; |
| | | } |
| | |
| | | |
| | | Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | Map<String, FlowCardGlassInfoDTO> queryHollowAllFlowCardSummary(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId); |
| | | |
| | | int queryLayerByFlowCardId(String flowCardId); |
| | |
| | | HollowBigStorageCageDetails cageDetails = v.get(0); |
| | | dtos.addAll(hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE)); |
| | | }); |
| | | Map<String, FlowCardGlassInfoDTO> result = dtos.stream() |
| | | .collect(Collectors.toMap( |
| | | FlowCardGlassInfoDTO::getFlowCardId, |
| | | dto -> { |
| | | FlowCardGlassInfoDTO newDto = new FlowCardGlassInfoDTO(); |
| | | newDto.setFlowCardId(dto.getFlowCardId()); |
| | | newDto.setSumCount(dto.getSumCount()); |
| | | newDto.setPairCount(dto.getPairCount()); |
| | | newDto.setRealCount(dto.getRealCount()); |
| | | newDto.setLayer(dto.getLayer()); |
| | | return newDto; |
| | | }, |
| | | (dto1, dto2) -> { |
| | | dto1.setRealCount(dto1.getRealCount() + dto2.getRealCount()); // 累加 realCount |
| | | dto1.setLayer(Math.max(dto1.getLayer(),dto2.getLayer())); // 累加 最大层数 |
| | | return dto1; // 返回合并后的对象 |
| | | } |
| | | )); |
| | | return dtos.stream().collect(Collectors.groupingBy(FlowCardGlassInfoDTO::getFlowCardId)); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, FlowCardGlassInfoDTO> queryHollowAllFlowCardSummary(HollowBigStorageDetailsQueryVO query) { |
| | | List<HollowBigStorageCageDetails> detailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .like(StringUtils.isNotBlank(query.getFilmsId()), HollowBigStorageCageDetails::getFilmsId, query.getFilmsId()) |
| | | .like(StringUtils.isNotBlank(query.getFlowCardId()), HollowBigStorageCageDetails::getFlowCardId, query.getFlowCardId()) |
| | | .eq(query.getThickness() != 0, HollowBigStorageCageDetails::getThickness, query.getThickness()) |
| | | .orderByAsc(HollowBigStorageCageDetails::getFlowCardId) |
| | | ); |
| | | if (CollectionUtil.isEmpty(detailsList)) { |
| | | log.info("笼内无玻璃"); |
| | | return new HashMap<>(); |
| | | } |
| | | Map<String, List<HollowBigStorageCageDetails>> listMap = detailsList.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getFlowCardId)); |
| | | List<FlowCardGlassInfoDTO> dtos = new ArrayList<>(); |
| | | listMap.forEach((e, v) -> { |
| | | HollowBigStorageCageDetails cageDetails = v.get(0); |
| | | dtos.addAll(hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE)); |
| | | }); |
| | | Map<String, FlowCardGlassInfoDTO> result = dtos.stream() |
| | | .collect(Collectors.toMap( |
| | | FlowCardGlassInfoDTO::getFlowCardId, |
| | | dto -> { |
| | | FlowCardGlassInfoDTO newDto = new FlowCardGlassInfoDTO(); |
| | | newDto.setFlowCardId(dto.getFlowCardId()); |
| | | newDto.setSumCount(dto.getSumCount()); |
| | | newDto.setPairCount(dto.getPairCount()); |
| | | newDto.setRealCount(dto.getRealCount()); |
| | | newDto.setLayer(dto.getLayer()); |
| | | newDto.setSlotCount(dto.getSlotCount()); |
| | | return newDto; |
| | | }, |
| | | (dto1, dto2) -> { |
| | | dto1.setRealCount(dto1.getRealCount() + dto2.getRealCount()); // 累加 realCount |
| | | dto1.setLayer(Math.max(dto1.getLayer(),dto2.getLayer())); // 累加 最大层数 |
| | | dto1.setSlotCount(dto1.getSlotCount() + dto2.getSlotCount()); |
| | | return dto1; // 返回合并后的对象 |
| | | } |
| | | )); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) { |
| | | List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(flowCardId); |
| | | Map<Integer, List<LackDetailsDTO>> listMap = lackDetailsList.stream().collect(Collectors.groupingBy(LackDetailsDTO::getLayer)); |
| | |
| | | import com.mes.common.config.Const; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | import com.mes.hollowqueue.service.HollowGlassQueueInfoService; |
| | | import com.mes.tools.WebSocketServer; |
| | |
| | | HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService; |
| | | @Resource |
| | | BigStorageCageTaskService bigStorageCageTaskService; |
| | | @Resource |
| | | HollowGlassRelationInfoService hollowGlassRelationInfoService; |
| | | |
| | | @Autowired(required = false) |
| | | MiloService miloService; |
| | |
| | | //理片笼使用情况 |
| | | List<Map<String, Object>> bigStorageCageUsage = hollowBigStorageCageService.selectBigStorageCageUsage(); |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | |
| | | //理片笼使用情况汇总 |
| | | HollowBigStorageDetailsQueryVO hollowBigStorageDetailsQueryVO=new HollowBigStorageDetailsQueryVO(); |
| | | Map<String, FlowCardGlassInfoDTO> bigStorageCageUsageSummary= hollowGlassRelationInfoService.queryHollowAllFlowCardSummary(hollowBigStorageDetailsQueryVO); |
| | | jsonObject.append("bigStorageCageUsageSummary", bigStorageCageUsageSummary); |
| | | } |
| | | |
| | | } |
| | |
| | | <select id="hollowIsAll" resultMap="baseMap"> |
| | | WITH sum_flow_layer_count AS ( SELECT flow_card_id, layer, min( films_id ) AS films_id, min(thickness) as |
| | | thickness,count(*) AS sum_count FROM hollow_glass_relation_info GROUP BY flow_card_id, layer ), |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count FROM |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count, count(distinct slot) as slot_count FROM |
| | | hollow_big_storage_cage_details t WHERE state = 100 GROUP BY flow_card_id, layer ), |
| | | damage_flow_layer_count AS ( SELECT process_id AS flow_card_id, technology_number AS layer, count(*) as |
| | | damage_count FROM damage where type in(8,9) GROUP BY process_id, technology_number ), |
| | |
| | | IFNULL( t3.pair_count, 0 ) AS pair_count, |
| | | IFNULL( real_count, 0 ) AS real_count, |
| | | IFNULL( damage_count, 0 ) AS damage_count, |
| | | IFNULL( lack_count, 0 ) AS lack_count |
| | | IFNULL( lack_count, 0 ) AS lack_count, |
| | | IFNULL(slot_count,0) AS slot_count |
| | | FROM |
| | | sum_flow_layer_count t |
| | | LEFT JOIN real_flow_layer_count t1 ON t.flow_card_id = t1.flow_card_id |