From 7138440c99b0d914982a10f1345ad1d4eb4f296f Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 24 七月 2024 08:29:42 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java | 2
UI-Project/src/lang/zh.js | 6
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java | 3
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/mapper/DamageMapper.java | 2
hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java | 2
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java | 34 +++
hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java | 4
UI-Project/src/views/Slicecage/slicecage.vue | 56 ++++++
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue | 61 ++++--
hangzhoumesParent/common/servicebase/src/main/java/com/mes/work_assignment/mapper/WorkAssignmentMapper.java | 2
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java | 14 +
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java | 28 ++
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue | 232 +++++++++++++++++++------
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java | 41 +---
14 files changed, 361 insertions(+), 126 deletions(-)
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index 3a9af7a..0117165 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -205,6 +205,12 @@
down:'涓嬩竴椤�',
now:'褰撳墠椤垫樉绀�',
tit:'鏉℃暟鎹�',
+ temperingqueries:'閽㈠寲鏌ヨ',
+ specifytempering:'鎸囧畾閽㈠寲',
+ projectnumber:'宸ョ▼鍙�',
+ layoutnumber:'閽㈠寲鐗堝浘鍙�',
+ numberglasses:'鐜荤拑鏁伴噺',
+ specifytemperinga:'鏄惁鎸囧畾閽㈠寲璇ユ潯淇℃伅锛�',
},
workOrder:{
glassID:'鐜荤拑ID',
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
index a0a6912..42ec676 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -12,6 +12,7 @@
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(true)
const dialogFormVisibleb = ref(false)
+const blind = ref(false)
const width = ref();
const height = ref();
const adjustedRects = ref([]);
@@ -21,51 +22,137 @@
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {
// 杩涚倝涓�
- adjustedRects.value = data.intoGlass[0].map(rect => ({
+ if(data.intoGlass!=null){
+ adjustedRects.value = data.intoGlass[0].map(rect => {
+ let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta;
+ let newX = rect.yCoordinate;
+ if (rect.angle === 0) {
+ adjustedWidth = rect.height * 0.12;
+ adjustedHeight = rect.width * 0.1;
+ adjustedWidtha = rect.height;
+ adjustedHeighta = rect.width;
+ newX = 5087 - (rect.xCoordinate + rect.height);
+ } else {
+ adjustedWidth = rect.width * 0.12;
+ adjustedHeight = rect.height * 0.1;
+ adjustedWidtha = rect.width;
+ adjustedHeighta = rect.height;
+ newX = 5087 - (rect.xCoordinate + rect.width);
+ }
+ return {
...rect,
- xcoordinate: rect.xCoordinate * 0.3,
- ycoordinate: rect.ycoordinate * 0.3,
- width: rect.width * 0.2,
- height: rect.height * 0.2,
- widtha: rect.width,
- heighta: rect.height,
- }));
- adjustedRects2.value = data.intoGlass2[0].map(rect => ({
+ xcoordinate: newX * 0.12,
+ ycoordinate: rect.yCoordinate * 0.1,
+ width: adjustedWidth,
+ height: adjustedHeight,
+ widtha: adjustedWidtha,
+ heighta: adjustedHeighta,
+ };
+ });
+ }
+ if(data.intoGlass2!=null){
+ adjustedRects2.value = data.intoGlass2[0].map(rect => {
+ let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta;
+ let newX = rect.yCoordinate;
+ if (rect.angle === 0) {
+ adjustedWidth = rect.height * 0.12;
+ adjustedHeight = rect.width * 0.1;
+ adjustedWidtha = rect.height;
+ adjustedHeighta = rect.width;
+ newX = 5087 - (rect.xCoordinate + rect.height);
+ } else {
+ adjustedWidth = rect.width * 0.12;
+ adjustedHeight = rect.height * 0.1;
+ adjustedWidtha = rect.width;
+ adjustedHeighta = rect.height;
+ newX = 5087 - (rect.xCoordinate + rect.width);
+ }
+ return {
...rect,
- xcoordinate: rect.xCoordinate * 0.3,
- ycoordinate: rect.ycoordinate * 0.3,
- width: rect.width * 0.2,
- height: rect.height * 0.2,
- widtha: rect.width,
- heighta: rect.height,
- }));
- console.log(data.intoGlass[0]);
+ xcoordinate: newX * 0.12,
+ ycoordinate: rect.yCoordinate * 0.1,
+ width: adjustedWidth,
+ height: adjustedHeight,
+ widtha: adjustedWidtha,
+ heighta: adjustedHeighta,
+ };
+ });
+ }
// 杩涚倝鍓�
- adjustedRectsa.value = data.waitingGlass[0].map(rect => ({
- ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
- xcoordinate: rect.xCoordinate * 0.5,
- ycoordinate: rect.ycoordinate * 0.5,
- width: rect.width * 0.4,
- height: rect.height * 0.4,
- widtha: rect.width,
- heighta: rect.height,
- state: rect.state
- }));
+ if(data.waitingGlass!=null){
+ adjustedRectsa.value = data.waitingGlass[0].map(rect => {
+ let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta;
+ let newX = rect.yCoordinate;
+ if (rect.angle === 0) {
+ adjustedWidth = rect.width * 0.24;
+ adjustedHeight = rect.height * 0.16;
+ adjustedWidtha = rect.width;
+ adjustedHeighta = rect.height;
+ newX = 5190 - (rect.yCoordinate + rect.width);
+ } else {
+ adjustedWidth = rect.height * 0.24;
+ adjustedHeight = rect.width * 0.16;
+ adjustedWidtha = rect.height;
+ adjustedHeighta = rect.width;
+ newX = 5190 - (rect.yCoordinate + rect.height);
+ }
+ return {
+ ...rect,
+ x: newX * 0.24,
+ y: rect.xCoordinate * 0.16,
+ width: adjustedWidth,
+ height: adjustedHeight,
+ widtha: adjustedWidtha,
+ heighta: adjustedHeighta,
+ };
+});
+ }
// 宸插嚭鐐�
- adjustedRectsb.value = data.outGlass[0].map(rect => ({
+ if(data.outGlass!=null){
+ adjustedRectsb.value = data.outGlass[0].map(rect => {
+ let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta;
+ let newX = rect.yCoordinate;
+ if (rect.angle === 0) {
+ adjustedWidth = rect.width * 0.24;
+ adjustedHeight = rect.height * 0.16;
+ adjustedWidtha = rect.width;
+ adjustedHeighta = rect.height;
+ newX = 5190 - (rect.yCoordinate + rect.width);
+ } else {
+ adjustedWidth = rect.height * 0.24;
+ adjustedHeight = rect.width * 0.16;
+ adjustedWidtha = rect.height;
+ adjustedHeighta = rect.width;
+ newX = 5190 - (rect.yCoordinate + rect.height);
+ }
+ return {
...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
- xcoordinate: rect.xCoordinate * 0.5,
- ycoordinate: rect.ycoordinate * 0.5,
- width: rect.width * 0.4,
- height: rect.height * 0.4,
- widtha: rect.width,
- heighta: rect.height,
- state: rect.state
- }));
+ x: newX * 0.24,
+ y: rect.xCoordinate * 0.16,
+ width: adjustedWidth,
+ height: adjustedHeight,
+ widtha: adjustedWidtha,
+ heighta: adjustedHeighta,
+ };
+});
+ }
};
onMounted(() => {
initializeWebSocket(socketUrl, handleMessage);
});
+function getRectColor(state) {
+ switch (state) {
+ case 0:
+ return '#f8e3c5';
+ case 1:
+ return '#d1edc4';
+ case -1:
+ return '#dedfe0';
+ }
+}
+function showDialog(row) {
+ blind.value = true;
+}
onBeforeUnmount(() => {
console.log("鍏抽棴浜�")
closeWebSocket();
@@ -79,8 +166,10 @@
<div v-if="dialogFormVisible" >
<el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
<div style="width: 49%;float: left;background-color: #f4f4f5;height: 550px;">
- <el-scrollbar height="630px">
- <div style="position: relative;width: 1400px;">
+ <div v-if="adjustedRects.length > 0">
+ <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div>
+ <el-scrollbar height="550px" style="background-color: #e9e9eb;">
+ <div style="position: relative;max-width: 1400px;">
<div
v-for="(rect, index) in adjustedRects"
:key="index"
@@ -88,16 +177,20 @@
:style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }"
>
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
- <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div >{{ rect.glassId }}</div>
+ <div >{{ rect.flowCardId }}</div>
+ <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</div>
<div style="width: 49%;float: right;background-color: #f4f4f5;height: 550px;">
- <el-scrollbar height="550px">
- <div style="position: relative;width: 1400px;">
+ <div v-if="adjustedRects2.length > 0">
+ <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div>
+ <el-scrollbar height="550px" style="background-color: #e9e9eb;">
+ <div style="position: relative;max-width: 1400px;">
<div
v-for="(rect, index) in adjustedRects2"
:key="index"
@@ -105,57 +198,75 @@
:style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }"
>
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
- <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div >{{ rect.glassId }}</div>
+ <div >{{ rect.flowCardId }}</div>
+ <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</div>
</el-card>
</div>
<div v-if="dialogFormVisiblea">
<!-- 杩涚倝鍓� -->
- <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
- <el-scrollbar height="550px">
- <div style="position: relative;width: 1400px;">
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
+ <div v-if="adjustedRectsa.length > 0">
+ <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div>
+ <!-- <div style="text-align: center;">娴佺▼鍗�: {{ adjustedRectsa[0].flowCardId }}</div> -->
+ <el-scrollbar height="550px" style="background-color: #e9e9eb;">
+ <div style="position: relative;max-width: 1400px;">
<div
v-for="(rect, index) in adjustedRectsa"
:key="index"
+ @click="showDialog"
class="rect"
- :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+ :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
- backgroundColor: rect.state === 0 ? '#dedfe0' : '#d1edc4' }">
- <div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
- <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ backgroundColor: getRectColor(rect.state) }">
+ <div class="centered-text">
+ <div>{{ rect.glassId }}</div>
+ <div >{{ rect.flowCardId }}</div>
+ <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</el-card>
</div>
<div v-if="dialogFormVisibleb">
<!-- 宸插嚭鐐� -->
- <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
- <el-scrollbar height="550px">
- <div style="position: relative;width: 1400px;">
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
+ <div v-if="adjustedRectsb.length > 0">
+ <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div>
+ <el-scrollbar height="550px" style="background-color: #e9e9eb;">
+ <div style="position: relative;max-width: 1400px;">
<div
v-for="(rect, index) in adjustedRectsb"
:key="index"
class="rect"
- :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
+ :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }">
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
- <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div >{{ rect.glassId }}</div>
+ <div >{{ rect.flowCardId }}</div>
+ <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</el-card>
</div>
+
+<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-button>
+ </el-dialog>
</div>
</template>
<style scoped>
@@ -233,9 +344,10 @@
}
.centered-text {
/* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */
- display: flex;
+ /* display: flex; */
justify-content: center;
- align-items: center;
+ align-items: center;
height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */
+ font-size: small;
}
</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
index 5c0133f..4e372e6 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -25,20 +25,38 @@
}
}
-const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
+const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
const handleMessage = (data) => {
// 鏇存柊 tableData 鐨勬暟鎹�
- adjustedRects.value = data.overGlass[0].map(rect => ({
- ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
- xcoordinate: rect.xCoordinate * 0.5, // 灏唜鍊奸櫎浠�3
- ycoordinate: rect.ycoordinate * 0.5,
- width: rect.width * 0.4,
- height: rect.height * 0.4,
- widtha: rect.width,
- heighta: rect.height,
- }));
- console.log(adjustedRects.value);
+ if(data.overGlass!=null){
+ adjustedRects.value = data.overGlass[0].map(rect => {
+ let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta;
+ let newX = rect.yCoordinate;
+ if (rect.angle === 0) {
+ adjustedWidth = rect.width * 0.24;
+ adjustedHeight = rect.height * 0.16;
+ adjustedWidtha = rect.width;
+ adjustedHeighta = rect.height;
+ newX = 5190 - (rect.yCoordinate + rect.width);
+ } else {
+ adjustedWidth = rect.height * 0.24;
+ adjustedHeight = rect.width * 0.16;
+ adjustedWidtha = rect.height;
+ adjustedHeighta = rect.width;
+ newX = 5190 - (rect.yCoordinate + rect.height);
+ }
+ return {
+ ...rect,
+ xcoordinate: newX * 0.24,
+ ycoordinate: rect.xCoordinate * 0.16,
+ width: adjustedWidth,
+ height: adjustedHeight,
+ widtha: adjustedWidtha,
+ heighta: adjustedHeighta,
+ };
+});
+ }
};
onMounted(() => {
// fetchFlowCardId();
@@ -55,9 +73,12 @@
<template>
<div style="margin-top: 10px;">
<div>
- <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading">
- <el-scrollbar height="600px">
- <div style="position: relative;width: 1400px;">
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
+ <!-- <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> -->
+ <div v-if="adjustedRects.length > 0">
+ <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div>
+ <el-scrollbar height="550px" width="1200px" style="background-color: #e9e9eb;">
+ <div style="position: relative;">
<div
v-for="(rect, index) in adjustedRects"
:key="index"
@@ -66,12 +87,15 @@
width: `${rect.width}px`, height: `${rect.height}px`,
backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }">
<div class="centered-text">
- <div >{{ rect.flowcardId }}</div>
- <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div >{{ rect.glassId }}</div>
+ <div >{{ rect.flowCardId }}</div>
+ <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <!-- <div style="margin-top: 25px;margin-left: -60px;">{{ rect.widtha }}*{{ rect.heighta }}</div> -->
</div>
</div>
</div>
</el-scrollbar>
+ </div>
</el-card>
</div>
</div>
@@ -94,9 +118,10 @@
}
.centered-text {
/* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */
- display: flex;
+ /* display: flex; */
justify-content: center;
- align-items: center;
+ align-items: center;
height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */
+ font-size: small;
}
</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 749d012..5870cad 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -14,7 +14,9 @@
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const dialogFormVisibleb = ref(false)
+const dialogFormVisiblec = ref(false)
const tableData = ref([])
+const tableDatagh = ref([])
const tableDatab = ref([])
const tableDatac = ref([])
const tableDatad = ref([])
@@ -70,7 +72,18 @@
const cell9=ref(true);
const selectedRow = ref(null); // 瀛樺偍閫変腑鐨勮鏁版嵁
-
+onMounted(async () => {
+ try {
+ const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass');
+ if (response.code === 200) {
+ tableDatagh.value = response.data
+ } else {
+ ElMessage.warning(response.msg)
+ }
+ } catch (error) {
+ // console.error('Error fetching rects :', error);
+ }
+});
// 褰撳墠椤电爜鍜屾瘡椤垫樉绀虹殑鏉℃暟
const currentPage = ref(1);
const itemsPerPage = computed(() => {
@@ -349,6 +362,33 @@
console.error('鍙戠敓閿欒:', error);
}
};
+ // 鎸囧畾閽㈠寲
+ const brokee = async(row) => {
+ try {
+ const confirmResult = await ElMessageBox.confirm(
+ t('searchOrder.specifytemperinga'),
+ t('searchOrder.prompt'),
+ {
+ confirmButtonText: t('searchOrder.yes'),
+ cancelButtonText: t('searchOrder.cancel'),
+ type: 'warning',
+ }
+ );
+ if (confirmResult === 'confirm') {
+ const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/TemperingGlass",{
+ engineerId: row.engineer_id,
+ temperingLayoutId: row.tempering_layout_id,
+ });
+ if (response.code === 200) {
+ ElMessage.success(response.message);
+ } else {
+ ElMessage.error(response.message);
+ }
+ }
+ } catch (error) {
+ console.error('鍙戠敓閿欒:', error);
+ }
+};
// 鍑虹墖闃熷垪鎷胯蛋
const brokeb = async(row) => {
try {
@@ -617,6 +657,7 @@
<div style="height: 600px;">
<el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
+ <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
<el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
<el-table height="100px" ref="table"
@@ -1239,6 +1280,19 @@
</el-table-column>
</el-table>
</el-dialog>
+<el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
+ <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"/>
+ <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" />
+ <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" />
+ <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150">
+ <template #default="scope">
+ <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+</el-dialog>
</template>
<style scoped>
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/mapper/DamageMapper.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/mapper/DamageMapper.java
index 2b2bc54..a993bd7 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/mapper/DamageMapper.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/mapper/DamageMapper.java
@@ -1,5 +1,6 @@
package com.mes.damage.mapper;
+import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.damage.entity.Damage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -11,6 +12,7 @@
* @author wu
* @since 2024-06-13
*/
+@DS("hangzhoumes")
public interface DamageMapper extends BaseMapper<Damage> {
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
index bdfb970..e8b3016 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
@@ -1,5 +1,6 @@
package com.mes.glassinfo.mapper;
+import com.baomidou.dynamic.datasource.annotation.DS;
import com.github.yulichang.base.MPJBaseMapper;
import com.mes.glassinfo.entity.GlassInfo;
@@ -11,6 +12,7 @@
* @author wu
* @since 2024-04-29
*/
+@DS("hangzhoumes")
public interface GlassInfoMapper extends MPJBaseMapper<GlassInfo> {
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
index 9e37b94..17e7aec 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingGlassInfoService.java
@@ -24,4 +24,7 @@
List<TemperingGlassInfo> selectLayoutId();
List<TemperingGlassInfo> selectTaskType();
+
+ Integer updateTemperingState(TemperingGlassInfo temperingGlassInfo);
+
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
index 806ee21..36359f6 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java
@@ -30,7 +30,7 @@
//鑾峰彇绛夊緟杩涚倝涓殑鐜荤拑淇℃伅
QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
//wrapper.eq("state",1);
- wrapper.in("state",1,0);
+ wrapper.in("state",1,0,-1);
return temperingMapper.selectList(wrapper);
}
@@ -86,4 +86,16 @@
.groupBy("state");
return temperingMapper.selectList(wrapper);
}
+
+ @Override
+ public Integer updateTemperingState(TemperingGlassInfo temperingGlassInfo) {
+ QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>();
+ wrapper.eq("glass_id",temperingGlassInfo.getGlassId())
+ .lt("state",5);
+ if (temperingMapper.update(temperingGlassInfo,wrapper) > 0) {
+ return 200;
+ }else {
+ return 100;
+ }
+ }
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/work_assignment/mapper/WorkAssignmentMapper.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/work_assignment/mapper/WorkAssignmentMapper.java
index e713455..c5acc6b 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/work_assignment/mapper/WorkAssignmentMapper.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/work_assignment/mapper/WorkAssignmentMapper.java
@@ -1,5 +1,6 @@
package com.mes.work_assignment.mapper;
+import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.work_assignment.entity.WorkAssignment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -11,6 +12,7 @@
* @author wu
* @since 2024-07-01
*/
+@DS("hangzhoumes")
public interface WorkAssignmentMapper extends BaseMapper<WorkAssignment> {
}
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
index 4bf1348..6673bc9 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/test/java/com/mes/CacheGlassModuleApplicationTest.java
@@ -121,8 +121,8 @@
@Test
public void testSelectCacheEmpty() {
- List<EdgStorageCage> map = edgStorageCageService.selectCacheEmpty();
- log.info("绗煎唴绌烘牸锛歿}", Arrays.asList(map));
+// List<EdgStorageCage> map = edgStorageCageService.selectCacheEmpty();
+// log.info("绗煎唴绌烘牸锛歿}", Arrays.asList(map));
}
@Test
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
index cf4443d..e8b731f 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java
@@ -66,7 +66,7 @@
List<OptimizeUpPattenUsage> upPattenUsageList = null;
if (engineeringId != null) {
upPattenUsageList = optimizeProjectMapper.selectJoinList(OptimizeUpPattenUsage.class, new MPJQueryWrapper<OptimizeProject>()
- .select("t.project_no,t.glass_type,b.width,b.height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.count")
+ .select("t.project_no,t.glass_type,b.width,b.height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.count as stockId")
.leftJoin("optimize_layout b on t.project_no=b.project_no")
.eq("b.project_no", engineeringId));
}
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java
index d5d59a5..ea60109 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java
@@ -25,7 +25,7 @@
@Autowired
private ReportingWorkService reportingWorkService;
@Autowired
- private OptimizeProjectService optimizeProjectService;
+ private OptimizeProjectService optimizeProjectService;
@Autowired
private OrdersService ordersService;
/**
@@ -34,45 +34,26 @@
*/
@Scheduled(fixedDelay = 2000)
- public void screenHome(){
+ public void screenHome() {
JSONObject jsonObject = new JSONObject();
- //姝e湪绛夊緟杩涚墖鐨勭幓鐠�
Reportingdamage reportingdamage = new Reportingdamage();
reportingdamage.setReportingWorkTime("2024-05-11");
- //鑾峰彇鍒囧壊淇℃伅
- reportingdamage.setThisProcess("鍒囧壊");
- List<Reportingdamage> cutting = reportingWorkService.selectDamage(reportingdamage);
- jsonObject.append("cutting", cutting);
- //鑾峰彇纾ㄨ竟淇℃伅
- reportingdamage.setThisProcess("纾ㄨ竟");
- List<Reportingdamage> edging = reportingWorkService.selectDamage(reportingdamage);
- jsonObject.append("edging", edging);
- //鑾峰彇閽㈠寲淇℃伅
- reportingdamage.setThisProcess("閽㈠寲");
- List<Reportingdamage> tempering = reportingWorkService.selectDamage(reportingdamage);
- jsonObject.append("tempering", tempering);
- //鑾峰彇澶硅兌淇℃伅
- reportingdamage.setThisProcess("澶硅兌");
- List<Reportingdamage> doubling = reportingWorkService.selectDamage(reportingdamage);
- jsonObject.append("doubling", doubling);
- //鑾峰彇涓┖淇℃伅
- reportingdamage.setThisProcess("涓┖");
- List<Reportingdamage> hollow = reportingWorkService.selectDamage(reportingdamage);
- jsonObject.append("hollow", hollow);
- //鑾峰彇鍖呰淇℃伅
- reportingdamage.setThisProcess("鍖呰");
- List<Reportingdamage> packaging = reportingWorkService.selectDamage(reportingdamage);
- jsonObject.append("packaging", packaging);
+ //鎵囧舰鍥惧悇璁惧鐨勫姞宸ョ牬鎹熸暟閲�
+ List<Reportingdamage> device = reportingWorkService.selectDamage(reportingdamage);
+ jsonObject.append("device", device);
//鑾峰彇娆$牬鏈ˉ淇℃伅
- List<AwaitingRepair>awaitingRepairs = reportingWorkService.selectAwaitingRepair();
+ List<AwaitingRepair> awaitingRepairs = reportingWorkService.selectAwaitingRepair();
jsonObject.append("awaitingRepairs", awaitingRepairs);
//鑾峰彇姝e湪杩涜鐨勫伐绋�
- List<OptimizeProject>optimizeProjects= optimizeProjectService.getDoingTask();
+ List<OptimizeProject> optimizeProjects = optimizeProjectService.getDoingTask();
jsonObject.append("DoingTask", optimizeProjects);
//鑾峰彇褰撳墠璁㈠崟
- List<Orders>orders=ordersService.selectOrders();
+ List<Orders> orders = ordersService.selectOrders();
jsonObject.append("orders", orders);
+ /*鐜板満瑙勫垝鍥炬樉绀�*/
+
+
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("screen");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
index 794ee4a..a58215e 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java
@@ -25,7 +25,7 @@
* fixedDelay : 涓婁竴涓皟鐢ㄧ粨鏉熷悗鍐嶆璋冪敤鐨勫欢鏃�
*/
- @Scheduled(fixedDelay = 2000)
+ @Scheduled(fixedDelay = 1000)
public void temperingGlassHome(){
JSONObject jsonObject = new JSONObject();
//姝e湪绛夊緟杩涚墖鐨勭幓鐠�
@@ -34,12 +34,14 @@
//鑾峰彇鏁村湪鐐変腑鐨勪袱涓増鍥緄d
List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
//杩涚倝涓殑鐜荤拑
- List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId());
- jsonObject.append("intoGlass", intoGlass);
- //杩涚倝涓殑绗簩涓増鍥�
- if (layoutId.size() > 1) {
- List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId());
- jsonObject.append("intoGlass2", intoGlass2);
+ if(!layoutId.isEmpty()) {
+ List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0).getTemperingLayoutId());
+ jsonObject.append("intoGlass", intoGlass);
+ //杩涚倝涓殑绗簩涓増鍥�
+ if (layoutId.size() > 1) {
+ List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1).getTemperingLayoutId());
+ jsonObject.append("intoGlass2", intoGlass2);
+ }
}
//鍑虹倝鍚庣殑鐜荤拑
List<TemperingGlassInfo> outGlass = temperingAgoService.selectOutGlass();
@@ -60,5 +62,23 @@
}
}
}
+ @Scheduled(fixedDelay = 1000)
+ public void temperingIsRun(){
+ JSONObject jsonObject = new JSONObject();
+ //姝e湪杩涜鐨勪换鍔�
+ List<TemperingGlassInfo>temperingTaskType=temperingAgoService.selectTaskType();
+ jsonObject.append("temperingTaskType", temperingTaskType);
+ 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");
+ }
+ }
+ }
+ }
+
}
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
index 408199a..73cc34b 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
@@ -1,13 +1,13 @@
package com.mes.temperingglass.controller;
+import com.mes.damage.entity.Damage;
+import com.mes.damage.service.DamageService;
import com.mes.temperingglass.service.TemperingGlassInfoService;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -22,12 +22,14 @@
public class TemperingGlassInfoController {
@Autowired
- private TemperingGlassInfoService temperingAgoService;
+ private TemperingGlassInfoService temperingGlassInfoService;
+ @Autowired
+ private DamageService damageService;
@ApiOperation("鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�")
@GetMapping("/selectWaitingGlass") // 鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�
public Result <List<TemperingGlassInfo>> selectWaitingGlass() {
- List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass();
+ List<TemperingGlassInfo> glass = temperingGlassInfoService.selectWaitingGlass();
log.info("绛夊緟涓殑鐜荤拑淇℃伅{}",glass);
return Result.build(200, "", glass);
}
@@ -41,10 +43,24 @@
@ApiOperation("//閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅銆�")
@GetMapping("/selectOutGlass") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
public Result <List<TemperingGlassInfo>> selectOutGlass() {
- List<TemperingGlassInfo> glass = temperingAgoService.selectOutGlass();
+ List<TemperingGlassInfo> glass = temperingGlassInfoService.selectOutGlass();
log.info("閽㈠寲鍑虹倝鍚庣殑鐜荤拑淇℃伅{}",glass);
return Result.build(200, "", glass);
}
+ @ApiOperation("//閽㈠寲鐮存崯")
+ @PostMapping("/updateTemperingState") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
+ public Result <Integer> updateTemperingState(@RequestBody Damage damage) {
+ damageService.insertDamage(damage);
+ TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo();
+ if(damage.getStatus()==2){
+ temperingGlassInfo.setState(5);
+
+ }
+ temperingGlassInfo.setGlassId(damage.getGlassId());
+ int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo);
+ return Result.build(200, "鐮存崯鎴愬姛", result);
+ }
+
}
--
Gitblit v1.8.0