Merge remote-tracking branch 'origin/master'
| | |
| | | { |
| | | "plcAddressBegin": "DB11.0", |
| | | "plcAddressLenght": "92", |
| | | "plcAddressLenght": "94", |
| | | "dataType": "word", |
| | | "parameteInfor": [ |
| | | |
| | |
| | | "codeId": "task_type", |
| | | "addressIndex": "90", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "alarm_signal", |
| | | "addressIndex": "92", |
| | | "addressLenght": "2" |
| | | } |
| | | |
| | | ] |
| | |
| | | export default { |
| | | serverUrl: "10.153.19.150:88/api", |
| | | // serverUrl: "192.168.1.199:88/api", |
| | | // serverUrl: "127.0.0.1:88/api", |
| | | serverUrl2: "10.153.19.150:88" |
| | | // serverUrl2: "192.168.1.199:88" |
| | | // serverUrl2: "127.0.0.1:88" |
| | | |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | basic:'设备', |
| | | add:'确认保存', |
| | | cancel:'取消', |
| | | temperingtotal:'钢化炉数:', |
| | | glasstotal:'玻璃总数:', |
| | | }, |
| | | workOrder:{ |
| | | glassID:'玻璃ID', |
| | |
| | | takemessage:'是否拿走该条信息?', |
| | | breakage:'破损', |
| | | takeout:'拿走', |
| | | glasstype:'玻璃类型', |
| | | }, |
| | | processCard:{ |
| | | intofurnace:'进炉中', |
| | |
| | | // const { $i18n } = useI18n(); // 获取 i18n 实例 |
| | | const router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const user = userStore.user.userName |
| | | // const user = userStore.user.userName |
| | | |
| | | let userInfoStr = window.localStorage.getItem('userInfo') |
| | | console.log(userInfoStr); |
| | |
| | | // WebSocketService.js
|
| | |
|
| | | let socket = null;
|
| | | export const initializeWebSocket = (socketUrl, messageHandler) => {
|
| | | let messages='' ;
|
| | |
| | | console.log("Your browser does not support WebSocket");
|
| | | return null;
|
| | | }
|
| | | |
| | | const socket = new WebSocket(socketUrl);
|
| | | |
| | | socket.onopen = function () {
|
| | | console.log("WebSocket is now open");
|
| | | };
|
| | | |
| | | socket.onmessage = (msg) => {
|
| | | if (!msg.data) {
|
| | | return;
|
| | |
| | | messages= messages.replace('<END>', '');
|
| | | const obj = JSON.parse(messages);
|
| | | messages='';
|
| | | |
| | | // 调用消息处理函数,将数据传递给 Vue 组件
|
| | | if (messageHandler) {
|
| | | messageHandler(obj);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | |
| | | |
| | | };
|
| | | |
| | | return socket;
|
| | | };
|
| | | |
| | |
|
| | | export const closeWebSocket = (socket) => {
|
| | | if (socket && socket.readyState === WebSocket.OPEN) {
|
| | | socket.close();
|
| | |
| | | // export const WebSocketHost = "192.168.1.199"; |
| | | export const WebSocketHost = "10.153.19.150"; |
| | | // export const WebSocketHost = "127.0.0.1"; |
| | | export const host = "88"; |
| | |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.value = data.params2[0] |
| | | // tableData.splice(0, tableData.length, ...data.params2[0]); |
| | | tableData.splice(0, tableData.length, ...data.params[0]); |
| | | // tableData.value = data.params[0] |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0] |
| | | adjustedRects.value = data.params2[0].map(rect => ({ |
| | | adjustedRects.value = data.params[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | width: rect.width * 0.5 , |
| | | id: rect.id * 10, |
| | |
| | | <div style="display: flex;"> |
| | | <el-input v-model="inputValue" style="margin-left: 15px;margin-top: 10px;width: 240px" placeholder="请输入工程号" @blur="handleBlur"/> |
| | | <el-pagination |
| | | v-model:current-page="currentPage3" |
| | | v-model:page-size="pageSize3" |
| | | v-model:current-page="currentPage" |
| | | :page-size="pageSize" |
| | | :size="size" |
| | | :disabled="disabled" |
| | | :background="background" |
| | | layout="prev, pager, next, jumper" |
| | | :total="1000" |
| | | @size-change="handleSizeChange" |
| | | :total="totalPages" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="550px" > |
| | | <div id="app" style="margin-top: 20px;"> |
| | | <!-- <div |
| | | :style="{ width: `${olWidth}px`, height: `${olHeight}px`,position: 'relative',}" |
| | | > --> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading"> |
| | | <el-scrollbar height="550px" width="1200px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect.glass_id" |
| | |
| | | <!-- 箭头 --> |
| | | <!-- <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.widtha }}*{{ rect.heighta }}</div> |
| | | <div>{{ rect.glass_id }}</div> |
| | | <div>{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | <!-- 点击弹出 --> |
| | | </div> |
| | | </el-scrollbar> |
| | | <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;"> |
| | | <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 140px;margin-left: 10px;"> |
| | | {{ $t('order.dilapidation') }} |
| | |
| | | <el-icon class="el-icon--right"><Upload /></el-icon> |
| | | {{ $t('order.Takeaway') }}</el-button> |
| | | </el-dialog> |
| | | </div> |
| | | <!-- </div> --> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { Delete, Upload } from '@element-plus/icons-vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { ref, onMounted, onBeforeUnmount,onUnmounted,watchEffect } from 'vue'; |
| | | import { ref, onMounted, onBeforeUnmount,onUnmounted, computed } from 'vue'; |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | const blind = ref(false) |
| | | const olWidth = ref(); |
| | | const olHeight = ref(); |
| | | const process_id = ref(); // 用于存储process_id的响应式引用 |
| | | const glass_id = ref(); |
| | | const inputValue = ref(''); |
| | | const currentGlassId = ref(null); // 存储当前点击矩形的 glass_id |
| | | const adjustedRects = ref([]); |
| | | const raw = ref([]); |
| | | let webSocket: WebSocket | null = null; |
| | | const totalPages = ref(0); |
| | | const pageSize = ref(1); |
| | | const currentPage = ref(1); |
| | | const disabled = false; |
| | | const size = 'small'; |
| | | const rawData = ref([]); |
| | | // const handleBind = (row) => { |
| | | // blind.value = true; // 打开绑定架子对话框 |
| | | // }; |
| | |
| | | currentGlassId.value = glassId; |
| | | blind.value = true; |
| | | } |
| | | // onMounted(async () => { |
| | | // try { |
| | | // 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 ,glass_id:newglass_id } = response.data; // 获取尺寸 |
| | | // olWidth.value = newolWidth; // 设置容器宽度 |
| | | // olHeight.value = newolHeight; // 设置容器高度 |
| | | // process_id.value = newprocess_id; |
| | | // glass_id.value = newglass_id; |
| | | |
| | | // adjustedRects.value = rawRects.map(rect => ({ |
| | | // ...rect, // 复制原始对象的其他属性 |
| | | // x_axis: (rect.x_axis*100) * 0.003, // 将x值除以3 |
| | | // y_axis: (rect.y_axis*100) * 0.003, |
| | | // width: (rect.width*100) * 0.002 , |
| | | // widtha: rect.width , |
| | | // heighta: rect.height , |
| | | // height:( rect.height*100) * 0.002 , |
| | | // glass_state: rect.glass_state |
| | | // })); |
| | | // console.log(adjustedRects.value); |
| | | |
| | | |
| | | // // 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 handleDamage = async () => { |
| | | try { |
| | |
| | | } |
| | | } |
| | | const handleBlur = async () => { |
| | | if (inputValue.value !== '') { |
| | | try { |
| | | if (inputValue.value) { |
| | | var url="/cacheGlass/taskCache/cutTerritory?current="+inputValue.value; |
| | | const response = await request.post(url) |
| | | if (response.data && response.data.currentCutTerritory) { |
| | | // 假设返回的数据需要调整坐标和尺寸 |
| | | adjustedRects.value = response.data.currentCutTerritory.map(rect => ({ |
| | | if (response.code === 200) { |
| | | console.log(response.data); |
| | | |
| | | const rawRects = response.data[0]; |
| | | rawData.value = response.data; |
| | | totalPages.value = rawData.value.length; |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | x_axis: 1360 - (rect.x_axis + rect.width) * 0.37, |
| | | y_axis: (rect.y_axis * 100) * 0.003, |
| | | width: (rect.width * 100) * 0.002, |
| | | height: (rect.height * 100) * 0.002, |
| | | x_axis: (6000 -(rect.x_axis + rect.width)) * 0.2085, |
| | | y_axis: rect.y_axis * 0.17, |
| | | width: rect.width * 0.2 , |
| | | widtha: rect.width , |
| | | heighta: rect.height , |
| | | height: rect.height * 0.165 , |
| | | glass_state: rect.glass_state |
| | | })); |
| | | // 如果WebSocket已连接,则关闭 |
| | | if (webSocket) { |
| | | webSocket.close(); |
| | | webSocket = null; |
| | | } |
| | | } catch (error) { |
| | | console.error('请求数据失败:', error); |
| | | currentPage.value = 1; |
| | | } |
| | | } else{ |
| | | connectWebSocket(); |
| | | } |
| | | }; |
| | | // const handleBlur = async () => { |
| | | // if (inputValue.value !=''){ |
| | | // try { |
| | | // var url="/cacheGlass/taskCache/cutTerritory?current="+inputValue.value; |
| | | // const response = await request.post(url) |
| | | // console.log(response.data.length); |
| | | // if (response.code == 200) { |
| | | // adjustedRects.value = response.data |
| | | // ElMessage.success(response.message); |
| | | // } else { |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } |
| | | const handleCurrentChange = (val: number) => { |
| | | currentPage.value = val; |
| | | const page = currentPage.value - 1 |
| | | adjustedRects.value = rawData.value[page]?.map(rect => ({ |
| | | // adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, |
| | | x_axis: (6000 -(rect.x_axis + rect.width)) * 0.2085, |
| | | y_axis: rect.y_axis * 0.17, |
| | | width: rect.width * 0.2 , |
| | | widtha: rect.width , |
| | | heighta: rect.height , |
| | | height: rect.height * 0.165 , |
| | | glass_state: rect.glass_state |
| | | })); |
| | | }; |
| | | function getRectColor(state: number): string { |
| | | switch (state) { |
| | | case 0: |
| | |
| | | } |
| | | }); |
| | | } |
| | | let socket = null; |
| | | const connectWebSocket = () => { |
| | | if (!webSocket) { |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`; |
| | | const handleMessage = (data) => { |
| | | // adjustedRects.value = data.currentCutTerritory[0] |
| | | webSocket = new WebSocket(socketUrl); |
| | | webSocket.onmessage = (event) => { |
| | | const data = JSON.parse(event.data); |
| | | adjustedRects.value = data.currentCutTerritory[0].map(rect => ({ |
| | | ...rect, |
| | | x_axis: 1360 -(rect.x_axis + rect.width) * 0.37, |
| | | // x_axis: (rect.x_axis*100) * 0.003, |
| | | y_axis: (rect.y_axis*100) * 0.003, |
| | | width: (rect.width*100) * 0.002 , |
| | | x_axis: (6000 -(rect.x_axis + rect.width)) * 0.2085, |
| | | y_axis: rect.y_axis * 0.17, |
| | | width: rect.width * 0.2 , |
| | | widtha: rect.width , |
| | | heighta: rect.height , |
| | | height:( rect.height*100) * 0.002 , |
| | | height: rect.height * 0.165 , |
| | | glass_state: rect.glass_state |
| | | })); |
| | | }; |
| | | webSocket.onerror = (error) => { |
| | | console.error('WebSocket Error:', error); |
| | | }; |
| | | webSocket.onclose = () => { |
| | | console.log('WebSocket Connection Closed'); |
| | | // 可以选择重新连接 |
| | | }; |
| | | } |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | // 初始时,如果输入框为空,则连接WebSocket |
| | | if (!inputValue.value) { |
| | | connectWebSocket(); |
| | | } |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | | closeWebSocket(socket); |
| | | if (webSocket) { |
| | | webSocket.close(); |
| | | } |
| | | }); |
| | | watchEffect(() => { |
| | | if (inputValue.value === '') { |
| | | handleMessage(); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | /* display: flex; */ |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | font-size: small; |
| | | } |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |
| | |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | | store.$patch({user: res.data}) |
| | | console.log(res.data) |
| | | |
| | | router.push('/main') |
| | | ElMessage.success(t('login.loginSuccessful')) |
| | | } else { |
| | | ElMessage.error(res['msg']) |
| | | // ElMessage.error(res['msg']) |
| | | store.$patch({ |
| | | user: null, |
| | | }) |
| | |
| | | const adjustedRectsh = ref([]); |
| | | const currentRow = reactive({}); // 当前行的数据 |
| | | const inputValuesa = reactive({}); |
| | | |
| | | const add = ref(false) |
| | | const flowCardId = ref(''); |
| | | const gap = ref(''); |
| | |
| | | const cell8=ref(true); |
| | | const cell9=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | |
| | | const temperingtotal = ref(0); |
| | | const glasstotal = ref(0); |
| | | // 当前页码和每页显示的条数 |
| | | const currentPage = ref(1); |
| | | const itemsPerPage = computed(() => { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatagh.value = response.data |
| | | temperingtotal.value = response.data.length |
| | | let totalCount = 0; |
| | | response.data.forEach(item => { |
| | | totalCount += item.count || 0; |
| | | }); |
| | | glasstotal.value = totalCount; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')"> |
| | | <div style="margin-bottom: 20px"> |
| | | <el-form> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="4"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('searchOrder.temperingtotal')" style="width: 14vw"> |
| | | {{ temperingtotal }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('searchOrder.glasstotal')" style="width: 14vw"> |
| | | {{ glasstotal }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/> |
| | |
| | | const requestData = { |
| | | line: 2001 |
| | | }; |
| | | request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | ...requestData, |
| | | // request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | // ...requestData, |
| | | |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | // }).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) |
| | | // console.log(res.data); |
| | | // tableData.value = res.data |
| | | // console.log(res.data[0].slot); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | // } |
| | | // }); |
| | | // 破损 |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | glassId: row.glass_id, |
| | | controlsId: 300, |
| | | line: 2001, |
| | | machine: '冷加工', |
| | |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | glassId: row.glass_id, |
| | | controlsId: 301, |
| | | line: 2001, |
| | | machine: '冷加工', |
| | |
| | | <el-table height="240" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="GlassId" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <el-table-column prop="Height" align="center" :label="$t('workOrder.height')" min-width="80" /> |
| | | <el-table-column prop="Width" align="center" :label="$t('workOrder.width')" min-width="120" /> |
| | | <el-table-column prop="Thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="FilmsId" align="center" :label="$t('workOrder.coatingtypes')" min-width="120" /> |
| | | <el-table-column prop="SerialNumber" align="center" :label="$t('workOrder.productionsequence')" min-width="120" /> |
| | | <el-table-column prop="FlowCardId" align="center" :label="$t('workOrder.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <el-table-column prop="width" align="center" :label="$t('workOrder.width')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('workOrder.height')" min-width="80" /> |
| | | <el-table-column prop="thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="glass_type" align="center" :label="$t('workOrder.glasstype')" min-width="120" /> |
| | | <el-table-column fixed="right" :label="$t('workOrder.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('workOrder.breakage') }}</el-button> |
| | |
| | | const requestData = { |
| | | line: 2002 |
| | | }; |
| | | request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | ...requestData, |
| | | // request.post("/cacheGlass/taskCache/selectEdgTask",{ |
| | | // ...requestData, |
| | | |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | // }).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) |
| | | // console.log(res.data); |
| | | // tableData.value = res.data |
| | | // console.log(res.data[0].slot); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }); |
| | | // } |
| | | // }); |
| | | // 破损 |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | glassId: row.glass_id, |
| | | controlsId: 300, |
| | | line: 2002, |
| | | machine: '冷加工', |
| | |
| | | if (confirmResult === 'confirm') { |
| | | // 用户点击了“是”,现在调用删除接口 |
| | | const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { |
| | | glassId: row.GlassId, |
| | | glassId: row.glass_id, |
| | | controlsId: 301, |
| | | line: 2002, |
| | | machine: '冷加工', |
| | |
| | | <el-table height="240" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="GlassId" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <el-table-column prop="Height" align="center" :label="$t('workOrder.height')" min-width="80" /> |
| | | <el-table-column prop="Width" align="center" :label="$t('workOrder.width')" min-width="120" /> |
| | | <el-table-column prop="Thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="FilmsId" align="center" :label="$t('workOrder.coatingtypes')" min-width="120" /> |
| | | <el-table-column prop="SerialNumber" align="center" :label="$t('workOrder.productionsequence')" min-width="120" /> |
| | | <el-table-column prop="FlowCardId" align="center" :label="$t('workOrder.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="glass_id" align="center" :label="$t('workOrder.glassID')" min-width="180" /> |
| | | <el-table-column prop="width" align="center" :label="$t('workOrder.width')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('workOrder.height')" min-width="80" /> |
| | | <el-table-column prop="thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="glass_type" align="center" :label="$t('workOrder.glasstype')" min-width="120" /> |
| | | <el-table-column fixed="right" :label="$t('workOrder.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('workOrder.breakage') }}</el-button> |
| | |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisiblea2 = ref(false) |
| | | const dialogFormVisibleaDownGlass = ref(false) |
| | | // 数据 |
| | | const loading = ref(false); |
| | | // 弹框显示控制 |
| | |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref('[]'); |
| | | const tableData = reactive([]); |
| | | const downGlass= ref([]); |
| | | // 方法 |
| | | const handleSelectionChange = () => { |
| | | // 处理表格行选择事件 |
| | |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | tableData.splice(0, tableData.length, ...data.params[0]); |
| | | if(data.sendDownGlass!=null){ |
| | | downGlass.value=data.sendDownGlass[0][1]; |
| | | console.log(downGlass.value); |
| | | console.log(tableData.value); |
| | | } |
| | | // tableData.splice(0, tableData.length, ...data.params[0]); |
| | | |
| | | // console.log("更新后数据", data.params[0]); |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | |
| | | </script> |
| | | <template> |
| | | <div> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisibleaDownGlass = true">落架详情</el-button> |
| | | <el-card style="flex: 1;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | |
| | | prop="enableState" |
| | | > |
| | | <template #default="scope"> |
| | | |
| | | <el-tag :type="getTagType(scope.row.enableState)" @click="toggleStatus(scope.row)"> |
| | | {{ scope.row.enableState === 1 ? $t('reportWork.enable') : $t('reportWork.unenable') }} |
| | | </el-tag> |
| | |
| | | <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用' " @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear') }}</el-button> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-table height="200px" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="downGlass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="workStationId" align="center" :label="$t('工位号')" min-width="80" /> |
| | | <el-table-column prop="engineerId" align="center" :label="$t('工程号')" min-width="80" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('流程卡号')" min-width="80" /> |
| | | <el-table-column prop="layer" align="center" :label="$t('层')" min-width="120" /> |
| | | <el-table-column prop="sequence" align="center" :label="$t('顺序')" min-width="150" /> |
| | | <el-table-column prop="width" align="center" :label="$t('宽')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('高')" min-width="120" /> |
| | | <el-table-column prop="Filmsid" align="center" :label="$t('膜系')" min-width="120" /> |
| | | <el-table-column prop="thickness" align="center" label="厚度" min-width="120" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('玻璃id')" min-width="120" /> |
| | | |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | </el-card> |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" :title="$t('reportWork.bindingshelves')"> |
| | |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | {{ $t('reportWork.sure') }} |
| | | </el-button> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div id="center" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;"> |
| | | <div id="parent" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;"> |
| | | <img src="../../assets/d1a.png" alt="" style="margin-left: -10px; width: 100%;height: 100%;position: relative;"> |
| | | <div id="overlay" v-show="flake"></div> |
| | | <div id="overlayb" v-show="flakeb"></div> |
| | | <div id="overlayc" v-show="flakec"></div> |
| | | <div id="overlayd" v-show="flaked"></div> |
| | | </div> |
| | | <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | |
| | | const tableDatac = ref([]) |
| | | const adjustedRects = ref([]); |
| | | const chartRefs = ref([]); |
| | | const flake = ref(true) |
| | | const flakeb = ref(true) |
| | | const flakec = ref(true) |
| | | const flaked = ref(true) |
| | | const thisProcess = ref(); // 用于存储process_id的响应式引用 |
| | | // 定义一个响应式引用来存储图表实例 |
| | | const chartDom = ref(null); |
| | |
| | | chartRefs.value[index].dom = el; |
| | | } |
| | | } |
| | | const socketUrl2 = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingIsRun`; |
| | | |
| | | onMounted(() => { |
| | | socket = new WebSocket(socketUrl); |
| | | socket = new WebSocket(socketUrl2); |
| | | socket.onmessage = (event) => { |
| | | const data = JSON.parse(event.data); |
| | | processesData.value = data.device[0].map(rect => ({ |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | |
| | | .echarts-container { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 20px; |
| | | } |
| | | |
| | | .echarts-item { |
| | | width: 150px; |
| | | height: 150px; |
| | | margin: 20px; |
| | | } |
| | | |
| | | .pie-chart { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | #parent{ |
| | | position: relative; |
| | | width: 1500px; |
| | | margin-left: -300px |
| | | } |
| | | #overlay{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 30px; |
| | | height: 10px; |
| | | background-color: #529b2e; |
| | | margin-top: -39px; |
| | | margin-left: 4px; |
| | | } |
| | | #overlayb{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 16px; |
| | | height: 115px; |
| | | background-color: #529b2e; |
| | | margin-top: -197px; |
| | | margin-left: 9px; |
| | | } |
| | | #overlayc{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 16px; |
| | | height: 16px; |
| | | background-color: #529b2e; |
| | | margin-top: -238px; |
| | | margin-left: 9px; |
| | | } |
| | | #overlayd{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 28px; |
| | | height: 11px; |
| | | background-color: #529b2e; |
| | | margin-top: -234px; |
| | | margin-left: 56px; |
| | | } |
| | | </style> |
| | |
| | | * 人工下片102 |
| | | * 出片中103 |
| | | * 调度中104 |
| | | * 拿走200 |
| | | * 破损201 |
| | | * 破损8 |
| | | * 拿走9 |
| | | */ |
| | | public static final Integer GLASS_STATE_NEW = 0; |
| | | public static final Integer GLASS_STATE_IN = 100; |
| | |
| | | public static final Integer GLASS_STATE_ARTIFICIAL = 102; |
| | | public static final Integer GLASS_STATE_OUT_ING = 103; |
| | | public static final Integer GLASS_STATE_SCHEDULE_ING = 104; |
| | | public static final Integer GLASS_STATE_TAKE = 200; |
| | | public static final Integer GLASS_STATE_DAMAGE = 201; |
| | | public static final Integer GLASS_STATE_DAMAGE = 8; |
| | | public static final Integer GLASS_STATE_TAKE = 9; |
| | | public static final List<Integer> GLASS_STATE_IN_ALL = Arrays.asList(100, 102, 103, 104); |
| | | public static final List<Integer> GLASS_STATE_IN_ALL_ZERO = Arrays.asList(0, 100, 102, 103, 104); |
| | | |
| | |
| | | * 2 卧转立进片完成 |
| | | * 3 大车进片完成 |
| | | * 4 大理片笼进片完成 |
| | | * 5 大理片笼进片失败 |
| | | * 6 大理片笼进片破损 |
| | | * 8 大理片笼进片破损 |
| | | * 9 大理片笼进片拿走 |
| | | */ |
| | | public static final Integer BIG_STORAGE_IN_NEW = 1; |
| | | public static final Integer BIG_STORAGE_IN_UP = 2; |
| | | public static final Integer BIG_STORAGE_IN_CAR = 3; |
| | | public static final Integer BIG_STORAGE_IN_SLOT = 4; |
| | | public static final Integer BIG_STORAGE_IN_ERROR = 5; |
| | | public static final Integer BIG_STORAGE_IN_DAMAGE = 6; |
| | | // public static final Integer BIG_STORAGE_IN_DAMAGE = 8; |
| | | // public static final Integer BIG_STORAGE_IN_ERROR = 9; |
| | | public static final List<Integer> BIG_STORAGE_IN_UP_ALL = Arrays.asList(1, 2); |
| | | /** |
| | | * 卧转立出片请求 |
| | | * 1 任务生成 |
| | | * 2 玻璃进大车完成 |
| | | * 3 大车出片完成 |
| | | * 4 大理片笼进片失败 |
| | | * 5 大理片笼进片破损 |
| | | * 8 大理片笼进片破损 |
| | | * 9 大理片笼进片拿走 |
| | | */ |
| | | public static final Integer BIG_STORAGE_OUT_NEW = 1; |
| | | public static final Integer BIG_STORAGE_OUT_CAR = 2; |
| | | public static final Integer BIG_STORAGE_OUT_SUCCESS = 3; |
| | | public static final Integer BIG_STORAGE_OUT_ERROR = 4; |
| | | public static final Integer BIG_STORAGE_OUT_DAMAGE = 5; |
| | | // public static final Integer BIG_STORAGE_OUT_DAMAGE = 8; |
| | | // public static final Integer BIG_STORAGE_OUT_ERROR = 9; |
| | | public static final List<Integer> BIG_STORAGE_OUT_ALL = Arrays.asList(2, 3); |
| | | |
| | | /** |
| | |
| | | * 2 进炉完成 |
| | | * 3 钢化完成 |
| | | * 4 出片完成 |
| | | * 5 破损 |
| | | * 6 拿走 |
| | | * 8 破损 |
| | | * 9 拿走 |
| | | */ |
| | | |
| | | public static final Integer TEMPERING_NEW = -1; |
| | |
| | | public static final Integer TEMPERING_START = 2; |
| | | public static final Integer TEMPERING_SUCCESS = 3; |
| | | public static final Integer TEMPERING_END = 4; |
| | | public static final Integer TEMPERING_DAMAGE = 5; |
| | | public static final Integer TEMPERING_TAKE = 6; |
| | | // public static final Integer TEMPERING_DAMAGE = 8; |
| | | // public static final Integer TEMPERING_TAKE = 9; |
| | | |
| | | /** |
| | | * 下片 |
| | |
| | | public static final List<Integer> G06_WORK_STATION = Arrays.asList(1, 2, 3); |
| | | public static final List<Integer> G11_WORK_STATION = Arrays.asList(4, 5, 6); |
| | | public static final int G13_WORK_STATION = 7; |
| | | public static final List<Integer> WORK_STATION_ALL = Arrays.asList(1, 2, 3, 4, 5, 6, 7); |
| | | |
| | | /** |
| | | * 启用 1 |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | */ |
| | | public interface EdgGlassTaskInfoService extends IService<EdgGlassTaskInfo> { |
| | | |
| | | List<Map<String, Object>> selectEdgInfo(String line); |
| | | } |
| | |
| | | package com.mes.edgglasstask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.mapper.EdgGlassTaskInfoMapper; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class EdgGlassTaskInfoServiceImpl extends ServiceImpl<EdgGlassTaskInfoMapper, EdgGlassTaskInfo> implements EdgGlassTaskInfoService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectEdgInfo(String line) { |
| | | LambdaQueryWrapper<EdgGlassTaskInfo> edgGlassWrapper = new LambdaQueryWrapper<>(); |
| | | edgGlassWrapper |
| | | .eq(EdgGlassTaskInfo::getLine, line) |
| | | .eq(EdgGlassTaskInfo::getStatus, "1") |
| | | .orderByDesc(EdgGlassTaskInfo::getTime); |
| | | return baseMapper.selectMaps(edgGlassWrapper); |
| | | } |
| | | } |
| | |
| | | log.info("本次任务结束时间:{},共耗时:{}ms", endDate, endDate.getTime() - startDate.getTime()); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void temperingIsRun() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //正在进行的任务 |
| | | List<TaskCache> taskCaches = taskCacheService.selectTaskCacheIsRun(); |
| | | jsonObject.append("taskCaches", taskCaches); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("isRun"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 进片任务 |
| | |
| | | |
| | | //查询玻璃并进行交换 |
| | | GlassInfo glassInfo = queryAndChangeGlass(glassId); |
| | | log.info("3、将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | | if (glassInfo == null) { |
| | | return; |
| | | } |
| | | log.info("4、将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | | EdgStorageCageDetails details = new EdgStorageCageDetails(); |
| | | BeanUtils.copyProperties(glassInfo, details); |
| | | details.setState(Const.GLASS_STATE_IN); |
| | | details.setSlot(nearestEmpty.getSlot()); |
| | | details.setDeviceId(nearestEmpty.getDeviceId()); |
| | | edgStorageCageDetailsService.save(details); |
| | | log.info("4、玻璃信息已存入理片笼详情表,玻璃信息为{}", details); |
| | | log.info("5、玻璃信息已存入理片笼详情表,玻璃信息为{}", details); |
| | | //添加进片任务 |
| | | boolean taskCache = saveTaskCache(details.getGlassId(), 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN); |
| | | log.info("5、生成进片任务信息存入任务表是否完成:{}", taskCache); |
| | | log.info("6、生成进片任务信息存入任务表是否完成:{}", taskCache); |
| | | |
| | | S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1); |
| | | log.info("6、发送确认字完成"); |
| | | log.info("7、发送确认字完成"); |
| | | |
| | | |
| | | } |
| | |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId)); |
| | | // .inSql(GlassInfo::getEngineerId, "select engineer_id from engineering where state = 1")); |
| | | Assert.isFalse(null == glassInfo, "玻璃信息不存在"); |
| | | if ((glassInfo.getWidth() < Double.parseDouble(minTwoFirstLength) && glassInfo.getHeight() < Double.parseDouble(minTwoSecondLength)) || (glassInfo.getWidth() < Double.parseDouble(minTwoSecondLength) && glassInfo.getHeight() < Double.parseDouble(minTwoFirstLength))) { |
| | | log.info("3、玻璃信息不符合进入理片笼最小尺寸,玻璃信息为{}", glassInfo); |
| | | return null; |
| | | } |
| | | //按照玻璃尺寸 |
| | | LambdaQueryWrapper<GlassInfo> queryWrapper = new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getWidth, glassInfo.getWidth()) |
| | |
| | | jsonObject.append("currentCutTerritory", currentCutTerritorys); |
| | | //log.info("本次识别版图{},++++{}",engineerId,currentCutTerritorys); |
| | | //磨边信息 |
| | | List<Map<String, Object>> EdgTasks1 = taskCacheService.selectEdgInfo("2001"); |
| | | List<Map<String, Object>> EdgTasks2 = taskCacheService.selectEdgInfo("2002"); |
| | | List<Map<String, Object>> EdgTasks1 = edgGlassTaskInfoService.selectEdgInfo("2001"); |
| | | List<Map<String, Object>> EdgTasks2 = edgGlassTaskInfoService.selectEdgInfo("2002"); |
| | | jsonObject.append("EdgTasks1", EdgTasks1); |
| | | jsonObject.append("EdgTasks2", EdgTasks2); |
| | | |
| | |
| | | package com.mes.taskcache.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.base.MPJBaseServiceImpl; |
| | |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | |
| | | |
| | | /** |
| | | * 添加理片笼任务 |
| | | * |
| | | * @param taskCache |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询磨边任务 |
| | | * |
| | | * @param line |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询待理片工作的任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询全部任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询待进片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询待出片任务 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 查询 A09 或 A10 最新的一片 出片任务 |
| | | * |
| | | * @param line |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询 A09 或 A10 最新的一片 出片任务 |
| | | * |
| | | * @param line |
| | | * @return |
| | | */ |
| | |
| | | public TaskCache selectLastOutCacheInfo(int line){ |
| | | return baseMapper.selectOne(new MPJLambdaWrapper<TaskCache>().selectAll(TaskCache.class).eq(TaskCache::getEndCell,line).eq(TaskCache::getTaskStatus,1).orderByDesc(TaskCache::getCreateTime)); |
| | | } |
| | | |
| | | /** |
| | | * 查询判断磨边线是否有玻璃运行 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | |
| | | secondLength: 2500 |
| | | min: |
| | | one: #第一条磨边线的最小尺寸信息 |
| | | firstLength: 600 |
| | | secondLength: 350 |
| | | firstLength: 500 |
| | | secondLength: 400 |
| | | two: #第二条磨边线的最小尺寸信息 |
| | | firstLength: 400 |
| | | secondLength: 300 |
| | | secondLength: 400 |
| | | sequence: |
| | | order: false |
| | | |
| | |
| | | |
| | | if (temperingGlassInfo != null) { |
| | | if (status == 0) { |
| | | temperingGlassInfo.setState(Const.TEMPERING_DAMAGE); |
| | | temperingGlassInfo.setState(Const.GLASS_STATE_DAMAGE); |
| | | } else { |
| | | temperingGlassInfo.setState(Const.TEMPERING_TAKE); |
| | | temperingGlassInfo.setState(Const.GLASS_STATE_TAKE); |
| | | } |
| | | temperingGlassInfoMapper.updateById(temperingGlassInfo); |
| | | } |
| | |
| | | if (!REQUEST_WORD.equals(mesD01Value) && REQUEST_WORD.equals(d01ToMES) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | if (!d01GlassId.equals(d01Id)) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | edgGlassTaskInfoService.update(new LambdaUpdateWrapper<EdgGlassTaskInfo>() |
| | | .set(EdgGlassTaskInfo::getStatus, Const.EDG_GLASS_SUCCESS).eq(EdgGlassTaskInfo::getGlassId, d01Id)); |
| | | d01GlassId = d01Id; |
| | | } |
| | | } |
| | |
| | | if (!REQUEST_WORD.equals(mesD04Value) && REQUEST_WORD.equals(d04ToMES) && !REQUEST_WORD.equals(d05State)) { |
| | | if (!d04GlassId.equals(d04Id)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | edgGlassTaskInfoService.update(new LambdaUpdateWrapper<EdgGlassTaskInfo>() |
| | | .set(EdgGlassTaskInfo::getStatus, Const.EDG_GLASS_SUCCESS).eq(EdgGlassTaskInfo::getGlassId, d04Id)); |
| | | d04GlassId = d04Id; |
| | | } |
| | | } |
| | |
| | | log.info("大理片笼破损玻璃清除任务开始执行时间:{}", startDate); |
| | | //获取进片任务表中状态为破损的数据 |
| | | List<BigStorageCageFeedTask> inDamageTaskInfoList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.GLASS_STATE_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(inDamageTaskInfoList)) { |
| | | log.info("获取进片任务表中破损的玻璃信息{}", inDamageTaskInfoList); |
| | | bigStorageCageFeedTaskService.remove(new LambdaQueryWrapper<BigStorageCageFeedTask>().eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | bigStorageCageFeedTaskService.remove(new LambdaQueryWrapper<BigStorageCageFeedTask>().eq(BigStorageCageFeedTask::getTaskState, Const.GLASS_STATE_DAMAGE)); |
| | | //理片笼详情表数据状态更新 |
| | | bigStorageCageDetailsService.remove(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_NEW).in(BigStorageCageDetails::getGlassId, inDamageTaskInfoList.stream().map(BigStorageCageFeedTask::getGlassId).collect(Collectors.toList()))); |
| | |
| | | } |
| | | //获取出片任务表中状态为破损的数据 |
| | | List<BigStorageCageOutTask> outDamageTaskInfoList = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_DAMAGE)); |
| | | .eq(BigStorageCageOutTask::getTaskState, Const.GLASS_STATE_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(outDamageTaskInfoList)) { |
| | | log.info("获取出片任务表中破损的玻璃信息{}", outDamageTaskInfoList); |
| | | bigStorageCageOutTaskService.remove(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_DAMAGE)); |
| | | bigStorageCageOutTaskService.remove(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.GLASS_STATE_DAMAGE)); |
| | | List<String> glassIdList = outDamageTaskInfoList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | //移除钢化下片表数据 |
| | | temperingGlassInfoService.remove(new LambdaQueryWrapper<TemperingGlassInfo>().in(TemperingGlassInfo::getGlassId, glassIdList)); |
| | |
| | | package com.mes.downglassinfo.controller; |
| | | |
| | | import com.mes.downglassinfo.entity.request.DownGlassInfoRequest; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.utils.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @RequestMapping("/downGlassInfo") |
| | | public class DownGlassInfoController { |
| | | |
| | | @Autowired |
| | | DownGlassInfoService downGlassInfoService; |
| | | |
| | | @PostMapping("/selectDownGlassInfo") |
| | | public Result<String> setDownGlassInfoRequest(@RequestBody DownGlassInfoRequest request) { |
| | | return Result.success(downGlassInfoService.setDownGlassInfoRequest(request)); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date gmtCreate; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.downglassinfo.entity.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class DownGlassInfoRequest implements Serializable { |
| | | |
| | | /** |
| | | * 工位id |
| | | */ |
| | | private Integer workStationId; |
| | | |
| | | /** |
| | | * 工程id |
| | | */ |
| | | private String engineerId; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date beginDate; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endDate; |
| | | |
| | | |
| | | } |
| | |
| | | * @param isDownload 是否获取未落架玻璃信息 True 已落架 false 未落架 |
| | | * @return |
| | | */ |
| | | List<DownGlassInfoDTO> queryWorkStationIsIn(@Param(value = "isDownload") Boolean isDownload); |
| | | List<DownGlassInfoDTO> queryWorkStationIsIn(@Param(value = "workList") List<Integer> workList, @Param(value = "isDownload") Boolean isDownload); |
| | | |
| | | /** |
| | | * 获取 |
| | | * |
| | | * @param workList |
| | | * @return |
| | | */ |
| | | List<DownGlassInfoDTO> queryWorkStationFlowCard(@Param(value = "workList") List<Integer> workList); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.request.DownGlassInfoRequest; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.dto.DownGlassInfoDTO; |
| | | |
| | | import java.util.List; |
| | |
| | | * @param isDownload true/false |
| | | * @return |
| | | */ |
| | | List<DownGlassInfoDTO> queryWorkStationIsIn(Boolean isDownload); |
| | | List<DownGlassInfoDTO> queryWorkStationIsIn(List<Integer> workList, Boolean isDownload); |
| | | |
| | | /** |
| | | * 获取指定架子已绑定流程卡的架子未落玻璃的数据信息 |
| | | * |
| | | * @param workList 指定的架子号 |
| | | * @return |
| | | */ |
| | | List<DownGlassInfoDTO> queryWorkStationFlowCard(List<Integer> workList); |
| | | |
| | | /** |
| | | * 生成出片任务 |
| | |
| | | * @return |
| | | */ |
| | | boolean generateOutGlassTask(String glassId); |
| | | |
| | | /** |
| | | * 设置架子定时任务查询条件 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | String setDownGlassInfoRequest(DownGlassInfoRequest request); |
| | | |
| | | /** |
| | | * 查询架子上绑定流程卡的玻璃是否到齐 |
| | | */ |
| | | List<DownWorkstation> queryWorkStationIsFull(); |
| | | } |
| | |
| | | package com.mes.downglassinfo.service.impl; |
| | | |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.common.utils.RedisUtil; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.request.DownGlassInfoRequest; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.dto.DownGlassInfoDTO; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.job.DownLoadCacheGlassTask; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService { |
| | |
| | | |
| | | @Autowired |
| | | DownStorageCageDetailsService downStorageCageDetailsService; |
| | | |
| | | |
| | | @Autowired |
| | | DownWorkstationService downWorkstationService; |
| | | |
| | | @Autowired |
| | | RedisUtil redisUtil; |
| | | |
| | | /** |
| | | * 根据流程卡号查询最大序号 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<DownGlassInfoDTO> queryWorkStationIsIn(Boolean isDownload) { |
| | | return baseMapper.queryWorkStationIsIn(isDownload); |
| | | public List<DownGlassInfoDTO> queryWorkStationIsIn(List<Integer> workList, Boolean isDownload) { |
| | | //按照要求获取已落架/未落架的玻璃信息 |
| | | return baseMapper.queryWorkStationIsIn(workList, isDownload); |
| | | } |
| | | |
| | | @Override |
| | | public List<DownGlassInfoDTO> queryWorkStationFlowCard(List<Integer> workList) { |
| | | //获取已绑定流程卡的架子未落玻璃的数据信息 |
| | | return baseMapper.queryWorkStationFlowCard(workList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | BeanUtils.copyProperties(details, glassInfo); |
| | | return downLoadCacheGlassTask.initDownGlassTask(glassInfo, details.getSlot(), Const.G13_WORK_STATION, 2); |
| | | } |
| | | |
| | | @Override |
| | | public String setDownGlassInfoRequest(DownGlassInfoRequest request) { |
| | | if (request == null) { |
| | | redisUtil.deleteObject("downGlassRequest"); |
| | | } else { |
| | | redisUtil.setCacheObject("downGlassRequest", request); |
| | | } |
| | | return "success"; |
| | | } |
| | | |
| | | @Override |
| | | public List<DownWorkstation> queryWorkStationIsFull() { |
| | | //查询可以落架的玻璃信息且已绑定流程卡的工位信息 |
| | | List<DownWorkstation> list = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getEnableState, Const.SLOT_ON) |
| | | .isNotNull(DownWorkstation::getFlowCardId).ne(DownWorkstation::getFlowCardId, "")); |
| | | List<DownWorkstation> workstationFull = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | //都有玻璃的工位信息(包括绑定流程卡) |
| | | List<Integer> workstationList = list.stream().map(DownWorkstation::getWorkstationId).collect(Collectors.toList()); |
| | | //按照符合条件的工位获取未落架的流程卡玻璃,如果返回为空,则表明所有都已落架完成 |
| | | List<DownGlassInfoDTO> downGlassInfoDTOList = queryWorkStationIsIn(workstationList, Boolean.FALSE); |
| | | //获取工位上的未满的流程卡及层数 |
| | | List<String> flowCardIdList = downGlassInfoDTOList.stream().map(item -> item.getFlowCardId() + ":" + item.getLayer()).collect(Collectors.toList()); |
| | | //可以落架的玻璃信息且已绑定流程卡的所有的工位 - 玻璃未满流程卡及层数的工位 = 已满工位 |
| | | workstationFull = list.stream().filter(item -> !flowCardIdList.contains(item.getFlowCardId() + ":" + item.getLayer())).collect(Collectors.toList()); |
| | | //是否需要将已满的工位置为不可落架 |
| | | List<Integer> workstationIds = workstationFull.stream().map(DownWorkstation::getWorkstationId).collect(Collectors.toList()); |
| | | downWorkstationService.update(new LambdaUpdateWrapper<DownWorkstation>().set(DownWorkstation::getEnableState, Const.SLOT_OFF) |
| | | .in(DownWorkstation::getWorkstationId, workstationIds)); |
| | | |
| | | } |
| | | return workstationFull; |
| | | } |
| | | } |
| | |
| | | */ |
| | | boolean DirectConnection(GlassInfo glassInfo); |
| | | |
| | | /** |
| | | * 获取当前非本架子可落架的玻璃信息 |
| | | * |
| | | * @param glassId |
| | | * @param workList G06/G11:传入G06实际获取的为可落架G11的玻璃 反之同理 |
| | | * @return |
| | | */ |
| | | String getGlassInfoMaxCount(String glassId, List<Integer> workList); |
| | | |
| | | /** |
| | |
| | | return Result.build(200, "更换成功", isSucess); |
| | | } |
| | | |
| | | @ApiOperation("关闭工位已满警报") |
| | | @PostMapping("/closeAlarmSignal") |
| | | @ResponseBody |
| | | public Result<String> closeAlarmSignal() { |
| | | return Result.build(200, "更换成功", downWorkstationService.closeAlarmSignal()); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | * @returnq 启用禁用 |
| | | */ |
| | | boolean updateDownWorkstationstate(DownWorkstation downWorkstation); |
| | | |
| | | String closeAlarmSignal(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String closeAlarmSignal() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | S7object.getinstance().plccontrol.writeWord(plcParameterObject.getPlcParameter("alarm_signal").getAddress(), 0); |
| | | return "success"; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcShelfFull() { |
| | | List<DownWorkstation> list = downGlassInfoService.queryWorkStationIsFull(); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | S7control s7control = S7object.getinstance().plccontrol; |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | s7control.writeWord(plcMesObject.getPlcParameter("alarm_signal").getAddress(), 1); |
| | | } |
| | | } |
| | | |
| | | public void inTo(String glassId, String requestWord, String currentSlot) { |
| | | log.info("1、按照玻璃id:{}获取玻璃小片信息,当前格子为:{}", glassId, currentSlot); |
| | | //添加进片任务 查找空格 |
| | |
| | | } |
| | | if (!checkFlag) { |
| | | log.info("无空架子,获取已绑定架子的流程卡信息,查看玻璃信息是否可被对调"); |
| | | List<DownGlassInfoDTO> downGlassInfoDTOList = downGlassInfoService.queryWorkStationIsIn(Boolean.FALSE); |
| | | List<DownGlassInfoDTO> downGlassInfoDTOList = downGlassInfoService.queryWorkStationIsIn(Const.WORK_STATION_ALL, Boolean.FALSE); |
| | | log.info("获取架子上已绑定流程卡落架的数量及未落架的玻璃数据:{}", downGlassInfoDTOList); |
| | | if (CollectionUtils.isEmpty(downGlassInfoDTOList)) { |
| | | log.info("已绑定流程卡均无未落架玻璃,请及时处理架子上的玻璃,清除流程卡,执行进片任务"); |
| | |
| | | } |
| | | } |
| | | List<Integer> workStationAll = Arrays.asList(1, 2, 3, 4, 5, 6); |
| | | //获取非本次落架的架子信息 |
| | | List<Integer> offWorkStationList = workStationAll.stream().filter(e -> !workList.contains(e)).collect(Collectors.toList()); |
| | | List<DownStorageCageDetails> list = new ArrayList(); |
| | | //是否有空架子 true:有 false:无 |
| | |
| | | loop: |
| | | if (StringUtils.isBlank(tempGlassId)) { |
| | | //获取正在落架的绑定流程卡的信息(流程卡、层数、落架数量) |
| | | List<DownGlassInfoDTO> downGlassInfoDTOList = downGlassInfoService.queryWorkStationIsIn(Boolean.TRUE); |
| | | //todo:落架玻璃数为0,即使绑定了流程卡,也无法找到对应的架子信息,只能重新绑定 |
| | | List<DownGlassInfoDTO> downGlassInfoDTOList = downGlassInfoService.queryWorkStationFlowCard(workList); |
| | | List<String> downGlassFlowList = downGlassInfoDTOList.stream().map(item -> item.getFlowCardId() + ":" + item.getLayer()).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(downGlassFlowList)) { |
| | | //架子都未绑定流程卡,出笼内子数量最多尺寸最大的玻璃id,无 则返回扫描扫到的玻璃id进行出片 |
| | | tempGlassId = downStorageCageDetailsService.getGlassInfoMaxCount(glassId, offWorkStationList); |
| | | |
| | | isNeedBind = Boolean.TRUE; |
| | | break loop; |
| | | } |
| | |
| | | //落架片序 |
| | | downGlassInfo.setSequence(downGlassInfoService.queryMaxSequence(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer())); |
| | | downGlassInfo.setWorkStationId(endCell); |
| | | downGlassInfo.setGmtCreate(new Date()); |
| | | downGlassInfoService.save(downGlassInfo); |
| | | //生成任务信息 |
| | | GlassInfo glassInfo = new GlassInfo(); |
| | |
| | |
|
| | | import cn.hutool.json.JSONObject;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.mes.common.config.Const;
|
| | | import com.mes.common.utils.RedisUtil;
|
| | | import com.mes.downglassinfo.entity.DownGlassInfo;
|
| | | import com.mes.downglassinfo.entity.request.DownGlassInfoRequest;
|
| | | import com.mes.downglassinfo.service.DownGlassInfoService;
|
| | | import com.mes.downstorage.service.DownStorageCageService;
|
| | | import com.mes.downworkstation.entity.DownWorkstation;
|
| | | import com.mes.downworkstation.service.DownWorkstationService;
|
| | | import com.mes.tools.WebSocketServer;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.apache.commons.lang.StringUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
| | | private DownStorageCageService downStorageCageService;
|
| | | @Autowired
|
| | | private DownGlassInfoService downGlassInfoService;
|
| | |
|
| | | @Autowired
|
| | | private RedisUtil redisUtil;
|
| | |
|
| | | @Scheduled(fixedDelay = 2000)
|
| | | public void sendDownWorkstations() {
|
| | |
| | |
|
| | | @Scheduled(fixedDelay = 2000)
|
| | | public void sendDownGlassInfo() {
|
| | | DownGlassInfoRequest request = redisUtil.getCacheObject("downGlassRequest");
|
| | | if (null == request) {
|
| | | request = new DownGlassInfoRequest();
|
| | | }
|
| | | log.info("发送当前正在执行工程已落架的玻璃信息");
|
| | | List<DownGlassInfo> downGlassInfos = downGlassInfoService.list(new LambdaQueryWrapper<DownGlassInfo>()
|
| | | .inSql(DownGlassInfo::getEngineerId, "select engineer_id from engineering where state = 1"));
|
| | | LambdaQueryWrapper<DownGlassInfo> wrapper = new LambdaQueryWrapper<DownGlassInfo>()
|
| | | .between(null != request.getBeginDate(), DownGlassInfo::getGmtCreate, request.getBeginDate(), request.getEndDate())
|
| | | .eq(StringUtils.isNotBlank(request.getEngineerId()), DownGlassInfo::getEngineerId, request.getEngineerId());
|
| | | if (null == request.getWorkStationId() || 0 == request.getWorkStationId()) {
|
| | | wrapper.in(DownGlassInfo::getWorkStationId, Const.WORK_STATION_ALL);
|
| | | } else {
|
| | | wrapper.eq(DownGlassInfo::getWorkStationId, request.getWorkStationId());
|
| | | }
|
| | | List<DownGlassInfo> downGlassInfos = downGlassInfoService.list(wrapper);
|
| | | Map<Integer, List<DownGlassInfo>> listMap = downGlassInfos.stream().collect(Collectors.groupingBy(DownGlassInfo::getWorkStationId));
|
| | | List<Object> engineerIdListTemp = downGlassInfoService.listObjs(new QueryWrapper<DownGlassInfo>().select("distinct engineer_id"));
|
| | | List<String> engineerIdList = engineerIdListTemp.stream().map(String::valueOf).collect(Collectors.toList());
|
| | | JSONObject jsonObject4 = new JSONObject();
|
| | | List<Map<String, Object>> list = downStorageCageService.selectDownStorageCages();
|
| | | jsonObject4.append("params", listMap);
|
| | | ArrayList<WebSocketServer> sendwServer4 = WebSocketServer.sessionMap.get("sendDownGlass");
|
| | | jsonObject4.append("downGlassInfos", listMap);
|
| | | jsonObject4.append("engineerIdList", engineerIdList);
|
| | | ArrayList<WebSocketServer> sendwServer4 = WebSocketServer.sessionMap.get("unloadglass");
|
| | | if (sendwServer4 != null) {
|
| | | for (WebSocketServer webserver : sendwServer4) {
|
| | | if (webserver != null && webserver.session.isOpen()) {
|
| | |
| | | AND T.LAYER = T1.LAYER |
| | | LEFT JOIN DOWN_GLASS_INFO T2 ON T1.GLASS_ID = T2.GLASS_ID |
| | | <where> |
| | | t.workstation_id in |
| | | <foreach collection="workList" item="item" open='(' close=')' separator=','> |
| | | #{item} |
| | | </foreach> |
| | | <if test="!isDownload"> |
| | | AND T2.GLASS_ID IS NULL |
| | | </if> |
| | | <if test="isDownload"> |
| | | AND T2.GLASS_ID IS not NULL |
| | | </if> |
| | | |
| | | </where> |
| | | ORDER BY |
| | | T.RACKS_NUMBER DESC, |
| | | T1.TEMPERING_LAYOUT_ID, |
| | | T1.TEMPERING_FEED_SEQUENCE DESC |
| | | </select> |
| | | <select id="queryWorkStationFlowCard" resultMap="downGlassInfo"> |
| | | SELECT |
| | | T.FLOW_CARD_ID, |
| | | T.LAYER, |
| | | T.RACKS_NUMBER |
| | | FROM |
| | | DOWN_WORKSTATION T |
| | | where |
| | | (t.flow_card_id is not null and t.flow_card_id != '') |
| | | and t.workstation_id in |
| | | <foreach collection="workList" item="item" open='(' close=')' separator=','> |
| | | #{item} |
| | | </foreach> |
| | | ORDER BY T.RACKS_NUMBER DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | FROM DOWN_STORAGE_CAGE_DETAILS |
| | | WHERE STATE = 100 |
| | | and (FLOW_CARD_ID, LAYER) not in ( |
| | | select FLOW_CARD_ID, LAYER from down_workstation where flow_card_id is not null and workstation_id not in |
| | | select FLOW_CARD_ID, LAYER from down_workstation where flow_card_id is not null and workstation_id in |
| | | <foreach collection="workList" item="item" open='(' close=')' separator=','> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | |
| | | GROUP BY FLOW_CARD_ID, LAYER |
| | | ORDER BY COUNT(FLOW_CARD_ID) DESC |
| | | LIMIT 1 ) |