From 86739d74c6a28421d6a92edd50b01953146adbad Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期五, 23 八月 2024 16:40:54 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue | 227 +++++
UI-Project/src/views/User/rolelist.vue | 2
hangzhoumesParent/gateway/src/main/resources/application.yml | 2
UI-Project/src/views/Identify/identify.vue | 73 +
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java | 5
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml | 2
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/entity/DamagePrint.java | 69 +
hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml | 105 ++
hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml | 2
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue | 103 ++
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml | 95 ++
UI-Project/src/lang/companyInfo.js | 4
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java | 19
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/impl/FlowCardServiceImpl.java | 37
UI-Project/src/views/User/userlist.vue | 2
UI-Project/src/views/UnLoadGlass/PrintFlow.vue | 167 +--
UI-Project/src/views/largescreen/largescreen.vue | 34
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml | 6
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/DateUtil.java | 24
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java | 10
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/FlowCardService.java | 24
hangzhoumesParent/JsonFile/PlcTemperingGlass.json | 132 +++
UI-Project/src/lang/zh.js | 20
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/FlowCard.java | 163 ++++
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/mapper/FlowCardMapper.java | 27
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml | 12
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java | 22
hangzhoumesParent/common/servicebase/src/main/resources/application.yml | 8
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml | 2
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcTemperingGlassTask.java | 47 +
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java | 13
hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java | 64 +
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue | 77 +
hangzhoumesParent/JsonFile/PlcdownGlass.json | 149 +++
hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java | 10
hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/controller/FlowCardController.java | 21
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java | 4
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingGlassInfoServiceImpl.java | 2
hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java | 34
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue | 492 ++++++++++--
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/PlcScreenTask.java | 21
41 files changed, 1,994 insertions(+), 338 deletions(-)
diff --git a/UI-Project/src/lang/companyInfo.js b/UI-Project/src/lang/companyInfo.js
index 1fc09b3..cdbfc7b 100644
--- a/UI-Project/src/lang/companyInfo.js
+++ b/UI-Project/src/lang/companyInfo.js
@@ -42,8 +42,8 @@
labelType3: '鎴愬搧鏍囩3',
labelValue3:3,
printFlowCard: {
- patch:'姝e搧',
- lackOf:'娆″搧',
+ patch:'姝�',
+ lackOf:'娆�',
processingNote: (itemtextarea) => {
return `${itemtextarea.processing_note}`
},
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index ff52e1c..7c79146 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -247,6 +247,22 @@
intofurnace:'杩涚倝涓�',
beforefurnace:'杩涚倝鍓�',
outfurnace:'宸插嚭鐐夌幓鐠�',
+ print:'鎷胯蛋鎵撳嵃',
+ printing:'鎵撳嵃',
+ projectnumber:'璇疯緭鍏ュ伐绋嬪彿',
+ inquire:'鏌ヨ',
+ project:'宸ョ▼鍙�',
+ awayprocess:'鎷胯蛋宸ュ簭',
+ awayequipment:'鎷胯蛋璁惧',
+ awayteam:'鎷胯蛋鐝粍',
+ flowcard:'娴佺▼鍗�',
+ layer:'灞傚彿',
+ temperinglayout:'鐐夊彿',
+ temperingfeed:'鐗囧簭',
+ width:'瀹�',
+ height:'楂�',
+ thickness:'鍘�',
+ glasstakeout:'鐜荤拑鎷胯蛋娓呭崟',
},
reportWork:{
lowerbit:'涓嬬墖浣�',
@@ -424,7 +440,7 @@
customerName: '瀹㈡埛鍚嶇О',
project: '椤圭洰鍚嶇О',
are: '闈㈢Н',
- quantity: '鍖呰鏂瑰紡',
+ quantity: '鏁伴噺',
warehousing: '鐘舵��',
deliveryDate: '閫佽揣鏃堕棿',
notstocked: '鏈叆搴�',
@@ -485,5 +501,5 @@
presponsibleequipment :'璇烽�夋嫨璐d换璁惧',
remark :'澶囨敞',
premark :'璇疯緭鍏ュ娉�',
- },
+ }
}
\ No newline at end of file
diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index d973668..590269c 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -21,7 +21,7 @@
@click="showDialog(rect.glass_id)"
:style="{ position: 'absolute',
top: `${rect.y_axis}px`, left: `${rect.x_axis}px`, width: `${rect.width}px`, height: `${rect.height}px`,
- backgroundColor: getRectColor(rect.glass_state)
+ backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor(rect.glass_state)
}"
>
<!-- 绠ご -->
@@ -34,7 +34,7 @@
</div>
</div>
</el-scrollbar>
- <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
+ <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
<el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 140px;margin-left: 10px;">
{{ $t('order.dilapidation') }}
</el-button>
@@ -76,7 +76,16 @@
function showDialog(glassId: number) {
currentGlassId.value = glassId;
blind.value = true;
+ adjustedRects.value = adjustedRects.value.map(rect =>
+ rect.glass_id === glassId ? { ...rect, isActive: true } : rect
+ );
}
+const handleDialogClose = () => {
+ adjustedRects.value = adjustedRects.value.map(rect => ({
+ ...rect,
+ isActive: false
+ }));
+}
// 鐮存崯
const handleDamage = async () => {
try {
@@ -211,29 +220,47 @@
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
webSocket = new WebSocket(socketUrl);
webSocket.onmessage = (event) => {
- const data = JSON.parse(event.data);
- const scaleFactor = 1621.78/6000;
- adjustedRects.value = data.currentCutTerritory[0].map(rect => ({
- ...rect,
- x_axis: (6000 -(rect.x_axis + rect.width)) * scaleFactor,
- y_axis: rect.y_axis * 0.17,
- width: rect.width * scaleFactor ,
- widtha: rect.width ,
- heighta: rect.height ,
- height: rect.height * 0.165 ,
- glass_state: rect.glass_state
- }));
+ const data = JSON.parse(event.data);
+ const scaleFactor = 1621.78 / 6000;
+ if (data.currentCutTerritory && data.currentCutTerritory.length > 0) {
+ const newRects = data.currentCutTerritory[0].map(rect => {
+ const existingRect = adjustedRects.value.find(r => r.glass_id === rect.glass_id);
+
+ if (existingRect) {
+ return {
+ ...existingRect,
+ x_axis: (6000 - (rect.x_axis + rect.width)) * scaleFactor,
+ y_axis: rect.y_axis * 0.17,
+ width: rect.width * scaleFactor,
+ height: rect.height * 0.165,
+ widtha: rect.width,
+ heighta: rect.height,
+ glass_state: rect.glass_state,
+ // 淇濇寔 isActive 鐘舵�佷笉鍙�
+ };
+ } else {
+ // 濡傛灉涓嶅瓨鍦紝鍒欐坊鍔犳柊鐭╁舰锛岄粯璁� isActive 涓� false
+ return {
+ ...rect,
+ x_axis: (6000 - (rect.x_axis + rect.width)) * scaleFactor,
+ y_axis: rect.y_axis * 0.17,
+ width: rect.width * scaleFactor,
+ height: rect.height * 0.165,
+ widtha: rect.width,
+ heighta: rect.height,
+ glass_state: rect.glass_state,
+ isActive: false,
+ glass_id: rect.glass_id,
+ };
+ }
+ });
+ adjustedRects.value = newRects;
+ } else if (data.currentCutTerritory == '') {
+ adjustedRects.value = [];
+ }
};
- webSocket.onerror = (error) => {
- console.error('WebSocket Error:', error);
- };
- webSocket.onclose = () => {
- console.log('WebSocket Connection Closed');
- // 鍙互閫夋嫨閲嶆柊杩炴帴
- };
- }
+ }
};
-
onMounted(() => {
// 鍒濆鏃讹紝濡傛灉杈撳叆妗嗕负绌猴紝鍒欒繛鎺ebSocket
if (!inputValue.value) {
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
index 1b332f2..d329c50 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -1,32 +1,97 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive} from "vue";
-import {useRouter} from "vue-router"
import request from "@/utils/request"
-import { ref, onMounted, onBeforeUnmount } from 'vue';
+import { ref, onMounted, onBeforeUnmount,nextTick } from 'vue';
import { WebSocketHost ,host} from '@/utils/constants'
import { ElMessage, ElMessageBox } from 'element-plus'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import { useI18n } from 'vue-i18n'
+ import { useRouter } from 'vue-router'
const { t } = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(true)
const dialogFormVisibleb = ref(false)
-const blind = ref(false)
+const dialogFormVisiblec = ref(false)
+const blind1 = ref(false)
+const blind2 = ref(false)
+const blinda = ref(false)
+const blindb = ref(false)
+const dialogVisible = ref(false)
const width = ref();
const height = ref();
const adjustedRects1 = ref([]);
const adjustedRects2 = ref([]);
const adjustedRectsa = ref([]);
const adjustedRectsb = ref([]);
+const tableData = ref([])
+const engineerId = ref('')
+const router = useRouter()
const currentGlassId = ref(null);
const currenttemperingFeedSequence = ref(null);
+onMounted(async () => {
+ try {
+ const response = await request.post('/loadGlass/damage/selectDamagePrint', {
+ type: 9,
+ workingProcedure: '閽㈠寲',
+ })
+ if (response.code === 200) {
+ tableData.value = response.data
+ console.log(response.data);
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ } catch (error) {
+ // console.error('Error fetching rects :', error);
+ }
+});
+const selectReportData = async () => {
+ let postData = {
+ type: 9,
+ workingProcedure: '閽㈠寲',
+ ...(engineerId.value !== '' && { engineerId: engineerId.value }),
+ };
+ const response = await request.post("/loadGlass/damage/selectDamagePrint", postData)
+ if (response.code === 200) {
+ tableData.value = response.data;
+ ElMessage.success(response.message);
+ } else {
+ ElMessage.error(response.message);
+ }
+};
+const printing = async () => {
+ let postData = {
+ type: 9,
+ workingProcedure: '閽㈠寲',
+ ...(engineerId.value !== '' && { engineerId: engineerId.value }),
+ };
+ console.log(engineerId.value);
+
+ const response = await request.post("/loadGlass/damage/selectDamagePrintDetails", postData)
+ if (response.code === 200) {
+ dialogVisible.value = true;
+ tableData.value = response.data;
+ await nextTick();
+ window.print();
+} else {
+ ElMessage.error(response.message);
+ }
+};
+const printTable = () => {
+ // 杩欓噷鍙互娣诲姞涓�浜汣SS鏍峰紡鏉ヤ紭鍖栨墦鍗版晥鏋�
+ // 渚嬪锛屽彲浠ユ坊鍔犱竴涓殣钘忕殑鎵撳嵃鏍峰紡琛�
+ window.print();
+};
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
-const handleMessage = (data) => {
-// 杩涚倝涓�
- if(data.intoGlass!=null){
- adjustedRects1.value = data.intoGlass[0].map(rect => {
+const handleMessage = (data) => {
+ if (data.intoGlass2 && data.intoGlass2.length > 0) {
+ // 鎻愬彇鏂扮殑鐭╁舰ID
+ const newGlassIds = new Set(data.intoGlass2[0].map(rect => rect.glassId));
+ // 杩囨护鍑哄凡瀛樺湪鐨勭煩褰�
+ const existingRects = adjustedRects2.value.filter(rect => newGlassIds.has(rect.glassId));
+ // 璁$畻鏂扮殑鐭╁舰
+ const newRects = data.intoGlass2[0].map(rect => {
const scaleFactor = 794.67/5087;
let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
let newX = rect.yCoordinate;
@@ -58,13 +123,27 @@
height: adjustedHeight,
widtha: rect.width,
heighta: rect.height,
- };
- });
- }else{
- adjustedRects1.value = ''
}
- if(data.intoGlass2!=null){
- adjustedRects2.value = data.intoGlass2[0].map(rect => {
+ });
+ // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��
+ adjustedRects2.value = existingRects.map(oldRect => {
+ const newRect = newRects.find(r => r.glassId === oldRect.glassId);
+ if (newRect) {
+ return { ...oldRect, ...newRect, isActive: oldRect.isActive };
+ }
+ return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�
+ }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
+ }
+ else if (data.intoGlass2 == null) {
+ adjustedRects2.value = []
+ }
+ if (data.intoGlass && data.intoGlass.length > 0) {
+ // 鎻愬彇鏂扮殑鐭╁舰ID
+ const newGlassIds = new Set(data.intoGlass[0].map(rect => rect.glassId));
+ // 杩囨护鍑哄凡瀛樺湪鐨勭煩褰�
+ const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId));
+ // 璁$畻鏂扮殑鐭╁舰
+ const newRects = data.intoGlass[0].map(rect => {
const scaleFactor = 794.67/5087;
let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
let newX = rect.yCoordinate;
@@ -96,14 +175,27 @@
height: adjustedHeight,
widtha: rect.width,
heighta: rect.height,
- };
- });
- }else{
- adjustedRects2.value = ''
}
- // 杩涚倝鍓�
- if(data.waitingGlass!=null){
- adjustedRectsa.value = data.waitingGlass[0].map(rect => {
+ });
+ // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��
+ adjustedRects1.value = existingRects.map(oldRect => {
+ const newRect = newRects.find(r => r.glassId === oldRect.glassId);
+ if (newRect) {
+ return { ...oldRect, ...newRect, isActive: oldRect.isActive };
+ }
+ return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�
+ }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
+ }
+ else if (data.overGlass == null) {
+ adjustedRects1.value = []
+ }
+ if (data.waitingGlass && data.waitingGlass.length > 0) {
+ // 鎻愬彇鏂扮殑鐭╁舰ID
+ const newGlassIds = new Set(data.waitingGlass[0].map(rect => rect.glassId));
+ // 杩囨护鍑哄凡瀛樺湪鐨勭煩褰�
+ const existingRects = adjustedRectsa.value.filter(rect => newGlassIds.has(rect.glassId));
+ // 璁$畻鏂扮殑鐭╁舰
+ const newRects = data.waitingGlass[0].map(rect => {
const scaleFactor = 1621.78/5190;
let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
let newX = rect.yCoordinate;
@@ -135,16 +227,30 @@
height: adjustedHeight,
widtha: rect.width,
heighta: rect.height,
- };
-});
- }else{
- adjustedRectsa.value = ''
- }
- // 宸插嚭鐐�
- if(data.outGlass!=null){
- adjustedRectsb.value = data.outGlass[0].map(rect => {
+ }
+ });
+ // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��
+ adjustedRectsa.value = existingRects.map(oldRect => {
+ const newRect = newRects.find(r => r.glassId === oldRect.glassId);
+ if (newRect) {
+ return { ...oldRect, ...newRect, isActive: oldRect.isActive };
+ }
+ return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�
+ }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
+ }
+ else if (data.waitingGlass == null) {
+ adjustedRectsa.value = []
+ }
+ if (data.outGlass && data.outGlass.length > 0) {
+ // 鎻愬彇鏂扮殑鐭╁舰ID
+ const newGlassIds = new Set(data.outGlass[0].map(rect => rect.glassId));
+ // 杩囨护鍑哄凡瀛樺湪鐨勭煩褰�
+ const existingRects = adjustedRectsb.value.filter(rect => newGlassIds.has(rect.glassId));
+ // 璁$畻鏂扮殑鐭╁舰
+ const newRects = data.outGlass[0].map(rect => {
const scaleFactor = 1621.78/5190;
- let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;;
+ const scaleFactory = 550/2800;
+ let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta,newY;
let newX = rect.yCoordinate;
if (rect.width < rect.height) {
widtha = rect.height;
@@ -155,38 +261,71 @@
}
if (rect.angle === 0) {
adjustedWidth = widtha * scaleFactor;
- adjustedHeight = heighta * 0.16;
+ adjustedHeight = heighta * scaleFactory;
// adjustedWidtha = widtha;
// adjustedHeighta = heighta;
// newX = 5190 - (rect.yCoordinate + widtha);
+ newY = 2800 - (rect.xCoordinate + heighta);
} else {
adjustedWidth = heighta * scaleFactor;
- adjustedHeight = widtha * 0.16;
+ adjustedHeight = widtha * scaleFactory;
// adjustedWidtha = heighta;
// adjustedHeighta = widtha;
// newX = 5190 - (rect.yCoordinate + heighta);
+ newY = 2800 - (rect.xCoordinate + widtha);
}
return {
...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�
x: newX * scaleFactor,
- y: rect.xCoordinate * 0.16,
+ y: newY * scaleFactory,
width: adjustedWidth,
height: adjustedHeight,
widtha: rect.width,
heighta: rect.height,
- };
-});
- }else{
- adjustedRectsb.value = ''
- }
-};
+ }
+ });
+
+ // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��
+ adjustedRectsb.value = existingRects.map(oldRect => {
+ const newRect = newRects.find(r => r.glassId === oldRect.glassId);
+ if (newRect) {
+ return { ...oldRect, ...newRect, isActive: oldRect.isActive };
+ }
+ return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�
+ }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
+ }
+ else if (data.outGlass == null) {
+ adjustedRectsb.value = []
+ }
+};
onMounted(() => {
initializeWebSocket(socketUrl, handleMessage);
});
-function updateRectColors() {
+function updateRectColorsa() {
adjustedRectsa.value.forEach(rect => {
if (rect.glassId === glassId) {
- rect.state = 5;
+ rect.state = 8;
+ }
+ });
+}
+function updateRectColorsb() {
+ adjustedRectsb.value.forEach(rect => {
+ if (rect.glassId === glassId) {
+ rect.state = 8;
+ }
+ });
+}
+function updateRectColors1() {
+ adjustedRects1.value.forEach(rect => {
+ if (rect.glassId === glassId) {
+ rect.state = 8;
+ }
+ });
+}
+function updateRectColors2() {
+ adjustedRects2.value.forEach(rect => {
+ if (rect.glassId === glassId) {
+ rect.state = 8;
}
});
}
@@ -198,7 +337,7 @@
return '#95d475';
case -1:
return '#CDAF95';
- case 5:
+ case 8:
return '#911005';
}
}
@@ -208,41 +347,84 @@
return '#eebe77';
case 4:
return '#CD6090';
- case 5:
+ case 8:
return '#911005';
}
}
-// if (adjustedRectsb[0].engineerId != null) {
-// engineerIdDisplayb = adjustedRectsb[0].engineerId
-// }
-// if (adjustedRectsa[0].engineerId != null) {
-// engineerIdDisplaya = adjustedRectsa[0].engineerId
-// }
-// if (adjustedRects2[0].engineerId != null) {
-// engineerIdDisplay2 = adjustedRects2[0].engineerId
-// }
-// if (adjustedRects[0].engineerId != null) {
-// engineerIdDisplay = adjustedRects[0].engineerId
-// }
-function showDialog(rect) {
+function showDialog1(rect) {
+ const index = adjustedRects1.value.findIndex(r => r.glassId === rect.glassId);
+ if (index !== -1) {
+ adjustedRects1.value[index].isActive = true;
+ }
currentGlassId.value = rect.glassId;
currenttemperingFeedSequence.value = rect.temperingFeedSequence;
- blind.value = true;
-}
+ blind1.value = true;
+}
+function showDialog2(rect) {
+ const index = adjustedRects2.value.findIndex(r => r.glassId === rect.glassId);
+ if (index !== -1) {
+ adjustedRects2.value[index].isActive = true;
+ }
+ currentGlassId.value = rect.glassId;
+ currenttemperingFeedSequence.value = rect.temperingFeedSequence;
+ blind2.value = true;
+}
+function showDialoga(rect) {
+ const index = adjustedRectsa.value.findIndex(r => r.glassId === rect.glassId);
+ if (index !== -1) {
+ adjustedRectsa.value[index].isActive = true;
+ }
+ currentGlassId.value = rect.glassId;
+ currenttemperingFeedSequence.value = rect.temperingFeedSequence;
+ blinda.value = true;
+}
+function showDialogb(rect) {
+ const index = adjustedRectsb.value.findIndex(r => r.glassId === rect.glassId);
+ if (index !== -1) {
+ adjustedRectsb.value[index].isActive = true;
+ }
+ currentGlassId.value = rect.glassId;
+ currenttemperingFeedSequence.value = rect.temperingFeedSequence;
+ blindb.value = true;
+}
+ const handleDialogClose1 = () => {
+ adjustedRects1.value.forEach(rect => {
+ rect.isActive = false;
+ });
+ blind1.value = false;
+};
+ const handleDialogClose2 = () => {
+ adjustedRects2.value.forEach(rect => {
+ rect.isActive = false;
+ });
+ blind2.value = false;
+};
+ const handleDialogClosea = () => {
+ adjustedRectsa.value.forEach(rect => {
+ rect.isActive = false;
+ });
+ blinda.value = false;
+};
+ const handleDialogCloseb = () => {
+ adjustedRectsb.value.forEach(rect => {
+ rect.isActive = false;
+ });
+ blindb.value = false;
+};
// 鐮存崯
-const handleDamage = async () => {
+const handleDamage1 = async () => {
try {
const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
glassId: currentGlassId.value,
// temperingFeedSequence: currenttemperingFeedSequence.value,
line: 4001,
- status: 2,
+ status: 8,
workingProcedure: '閽㈠寲',
})
if (response.code == 200) {
ElMessage.success(response.message);
- blind.value = false;
- updateRectColors();
+ blind1.value = false;
+ updateRectColors1();
} else {
// 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
ElMessage.error(response.message);
@@ -253,6 +435,75 @@
console.error(error);
}
}
+const handleDamage2 = async () => {
+ try {
+ const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+ glassId: currentGlassId.value,
+ // temperingFeedSequence: currenttemperingFeedSequence.value,
+ line: 4001,
+ status: 8,
+ workingProcedure: '閽㈠寲',
+ })
+ if (response.code == 200) {
+ ElMessage.success(response.message);
+ blind2.value = false;
+ updateRectColors2();
+ } else {
+ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+}
+const handleDamagea = async () => {
+ try {
+ const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+ glassId: currentGlassId.value,
+ // temperingFeedSequence: currenttemperingFeedSequence.value,
+ line: 4001,
+ status: 8,
+ workingProcedure: '閽㈠寲',
+ })
+ if (response.code == 200) {
+ ElMessage.success(response.message);
+ blinda.value = false;
+ updateRectColorsa();
+ } else {
+ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+}
+const handleDamageb = async () => {
+ try {
+ const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingState', {
+ glassId: currentGlassId.value,
+ // temperingFeedSequence: currenttemperingFeedSequence.value,
+ line: 4001,
+ status: 8,
+ workingProcedure: '閽㈠寲',
+ })
+ if (response.code == 200) {
+ ElMessage.success(response.message);
+ blindb.value = false;
+ updateRectColorsb();
+ } else {
+ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ // console.error(error);
+ }
+}
onBeforeUnmount(() => {
console.log("鍏抽棴浜�")
closeWebSocket();
@@ -260,9 +511,10 @@
</script>
<template>
<div style="margin-top: 10px;">
- <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >{{ $t('processCard.beforefurnace') }}</el-button>
- <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">{{ $t('processCard.intofurnace') }}</el-button>
- <el-button id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.outfurnace') }}</el-button>
+ <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;dialogFormVisiblec = false;" >{{ $t('processCard.beforefurnace') }}</el-button>
+ <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;dialogFormVisiblec = false;">{{ $t('processCard.intofurnace') }}</el-button>
+ <el-button id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false;dialogFormVisiblec = false;">{{ $t('processCard.outfurnace') }}</el-button>
+ <el-button id="searchButton" type="info" @click="dialogFormVisiblec = true;dialogFormVisibleb = false;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.print') }}</el-button>
<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;">
@@ -274,19 +526,19 @@
<div
v-for="(rect, index) in adjustedRects1"
:key="index"
- @click="showDialog(rect)"
+ @click="showDialog1(rect)"
class="rect"
:style="{ position: 'absolute',
top: `${rect.ycoordinate}px`,
left: `${rect.xcoordinate}px`,
width: `${rect.width}px`,
height: `${rect.height}px`,
- backgroundColor: rect.state === 5 ? '#911005' : 'lightblue' }"
+ backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 8 ? '#911005' : 'lightblue' }"
>
<div class="centered-text">
- <div >{{ rect.glassId }}</div>
- <div >{{ rect.flowCardId }}</div>
- <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
+ <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
@@ -302,19 +554,19 @@
<div
v-for="(rect, index) in adjustedRects2"
:key="index"
- @click="showDialog(rect)"
+ @click="showDialog2(rect)"
class="rect"
:style="{ position: 'absolute',
top: `${rect.ycoordinate}px`,
left: `${rect.xcoordinate}px`,
width: `${rect.width}px`,
height: `${rect.height}px`,
- backgroundColor: rect.state === 5 ? '#911005' : 'lightblue' }"
+ backgroundColor: rect.isActive ? '#ADFF2F' : rect.state === 8 ? '#911005' : 'lightblue' }"
>
<div class="centered-text">
- <div >{{ rect.glassId }}</div>
- <div >{{ rect.flowCardId }}</div>
- <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
+ <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
@@ -334,15 +586,15 @@
<div
v-for="(rect, index) in adjustedRectsa"
:key="index"
- @click="showDialog(rect)"
+ @click="showDialoga(rect)"
class="rect"
:style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
- backgroundColor: getRectColora(rect.state) }">
+ backgroundColor: rect.isActive ? '#ADFF2F' : getRectColora(rect.state) }">
<div class="centered-text">
- <div>{{ rect.glassId }}</div>
- <div >{{ rect.flowCardId }}</div>
- <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
+ <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
@@ -361,16 +613,16 @@
<div
v-for="(rect, index) in adjustedRectsb"
:key="index"
- @click="showDialog(rect)"
+ @click="showDialogb(rect)"
class="rect"
:style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
- backgroundColor: getRectColorb(rect.state) }">
+ backgroundColor: rect.isActive ? '#ADFF2F' : getRectColorb(rect.state) }">
<!-- backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }"> -->
<div class="centered-text">
- <div >{{ rect.glassId }}</div>
- <div >{{ rect.flowCardId }}</div>
- <div>{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
+ <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
@@ -378,12 +630,75 @@
</div>
</el-card>
</div>
+<div v-if="dialogFormVisiblec">
+ <!-- 鎵撳嵃 -->
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
+ <div style="display: flex; flex-direction: row; align-items: center; margin-top: 5px;margin-left: 10px;">
+ <el-input :placeholder="$t('processCard.projectnumber')" v-model="engineerId" autocomplete="off" style="width: 300px;"/>
+ <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('processCard.inquire') }}</el-button>
+ <el-button type="info" style="margin-left: 10px;" @click="printing()">{{ $t('processCard.printing') }}</el-button>
+ </div>
-<el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
- <el-button type="warning" plain :icon="Delete" @click="handleDamage" style="width: 140px;margin-left: 10px;">
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
+ <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
+ <el-table
+ height="350"
+ ref="table"
+ :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
+ :data="tableData"
+ >
+ <el-table-column prop="engineerId" :label="$t('processCard.project')" width="200" align="center"/>
+ <el-table-column prop="workingProcedure" :label="$t('processCard.awayprocess')" align="center"/>
+ <el-table-column prop="deviceName" :label="$t('processCard.awayequipment')" align="center"/>
+ <el-table-column prop="teamsGroupsName" :label="$t('processCard.awayteam')" align="center"/>
+ </el-table>
+ </div>
+ </el-card>
+ </el-card>
+</div>
+<el-dialog v-model="blind1" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose1">
+ <el-button type="warning" plain :icon="Delete" @click="handleDamage1" style="width: 140px;margin-left: 10px;">
+ {{ $t('order.dilapidation') }}
+ </el-button>
+ </el-dialog>
+<el-dialog v-model="blind2" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose2">
+ <el-button type="warning" plain :icon="Delete" @click="handleDamage2" style="width: 140px;margin-left: 10px;">
+ {{ $t('order.dilapidation') }}
+ </el-button>
+ </el-dialog>
+<el-dialog v-model="blinda" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClosea">
+ <el-button type="warning" plain :icon="Delete" @click="handleDamagea" style="width: 140px;margin-left: 10px;">
+ {{ $t('order.dilapidation') }}
+ </el-button>
+ </el-dialog>
+<el-dialog v-model="blindb" top="30vh" width="15%" style="text-align: center;" @close="handleDialogCloseb">
+ <el-button type="warning" plain :icon="Delete" @click="handleDamageb" style="width: 140px;margin-left: 10px;">
{{ $t('order.dilapidation') }}
</el-button>
</el-dialog>
+ <el-dialog
+ v-model="dialogVisible"
+ width="100%"
+ top="0vh"
+ :show-close="false"
+ >
+ <div class="custom-title" style="text-align: center; margin-bottom: 20px;">
+ {{ $t('processCard.glasstakeout') }}
+ </div>
+ <el-table
+ :data="tableData"
+ style="width: 100%;height: 760px"
+ >
+ <el-table-column prop="flowCardId" :label="$t('processCard.flowcard')" width="140" align="center"/>
+ <el-table-column prop="layer" :label="$t('processCard.layer')" align="center" width="52"/>
+ <el-table-column prop="engineerId" :label="$t('processCard.project')" align="center" width="110"/>
+ <el-table-column prop="temperingLayoutId" :label="$t('processCard.temperinglayout')" align="center" width="52"/>
+ <el-table-column prop="temperingFeedSequence" :label="$t('processCard.temperingfeed')" align="center" width="52"/>
+ <el-table-column prop="width" :label="$t('processCard.width')" align="center" width="80"/>
+ <el-table-column prop="height" :label="$t('processCard.height')" align="center" width="80"/>
+ <el-table-column prop="thickness" :label="$t('processCard.thickness')" align="center" width="52"/>
+ </el-table>
+ </el-dialog>
</div>
</template>
<style scoped>
@@ -457,7 +772,6 @@
}
#rect {
position: relative; /* 纭繚绠ご鍙互鐩稿浜庣煩褰㈠畾浣� */
- /* 鍏朵粬鏍峰紡 */
}
.centered-text {
/* 璁剧疆鏂囧瓧灞呬腑鏍峰紡 */
@@ -467,4 +781,8 @@
height: 100%; /* 纭繚div鍗犳嵁鏁翠釜鐭╁舰鐨勯珮搴� */
/* font-size: small; */
}
+.custom-title {
+ font-size: 20px;
+ font-weight: bold;
+}
</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 8f28ec9..87f0c2f 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -4,18 +4,18 @@
import {useRouter} from "vue-router"
import { ElMessage, ElMessageBox } from 'element-plus'
import request from "@/utils/request"
-
+
import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
const adjustedRects = ref([]);
const currentGlassId = ref(null);
const currenttemperingFeedSequence = ref(null);
-
+
const dialogFormVisible = ref(true)
const dialogFormVisiblea = ref(false)
const blind = ref(false)
-
+
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
@@ -31,14 +31,20 @@
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
-// 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
-const handleMessage = (data) => {
- // 鏇存柊 tableData 鐨勬暟鎹�
- if(data.overGlass!=null){
- adjustedRects.value = data.overGlass[0].map(rect => {
+const handleMessage = (data) => {
+ if (data.overGlass && data.overGlass.length > 0) {
+ // 鎻愬彇鏂扮殑鐭╁舰ID
+ const newGlassIds = new Set(data.overGlass[0].map(rect => rect.glassId));
+
+ // 杩囨护鍑哄凡瀛樺湪鐨勭煩褰�
+ const existingRects = adjustedRects.value.filter(rect => newGlassIds.has(rect.glassId));
+
+ // 璁$畻鏂扮殑鐭╁舰
+ const newRects = data.overGlass[0].map(rect => {
const scaleFactor = 1621.78/5190;
let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
let newX = rect.yCoordinate;
+
if (rect.width < rect.height) {
widtha = rect.height;
heighta = rect.width;
@@ -49,15 +55,9 @@
if (rect.angle === 0) {
adjustedWidth = widtha * scaleFactor;
adjustedHeight = heighta * 0.16;
- // adjustedWidtha = widtha;
- // adjustedHeighta = heighta;
- // newX = 5190 - (rect.yCoordinate + rect.width);
} else {
adjustedWidth = heighta * scaleFactor;
adjustedHeight = widtha * 0.16;
- // adjustedWidtha = heighta;
- // adjustedHeighta = widtha;
- // newX = 5190 - (rect.yCoordinate + rect.height);
}
return {
...rect,
@@ -67,8 +67,20 @@
height: adjustedHeight,
widtha: rect.width,
heighta: rect.height,
- };
-});
+ }
+ });
+
+ // 鍚堝苟鏂版棫鐭╁舰锛屽苟淇濈暀 isActive 鐘舵��
+ adjustedRects.value = existingRects.map(oldRect => {
+ const newRect = newRects.find(r => r.glassId === oldRect.glassId);
+ if (newRect) {
+ return { ...oldRect, ...newRect, isActive: oldRect.isActive };
+ }
+ return oldRect; // 濡傛灉鏃х煩褰㈠湪鏂版暟鎹腑涓嶅瓨鍦紝浣嗕繚鐣欏湪newGlassIds涓紝鍒欎繚鐣欏師鏍�
+ }).concat(newRects.filter(r => !existingRects.some(o => o.glassId === r.glassId)));
+ }
+ else if (data.overGlass == null) {
+ adjustedRects.value = []
}
};
function updateRectColors() {
@@ -77,7 +89,7 @@
rect.state = 8;
}
});
-}
+}
function getRectColora(state) {
switch (state) {
case 3:
@@ -88,11 +100,22 @@
return '#911005';
}
}
-function showDialog(rect) {
+function showDialog(rect) {
+ const index = adjustedRects.value.findIndex(r => r.glassId === rect.glassId);
+ if (index !== -1) {
+ adjustedRects.value[index].isActive = true;
+ }
currentGlassId.value = rect.glassId;
currenttemperingFeedSequence.value = rect.temperingFeedSequence;
blind.value = true;
}
+
+const handleDialogClose = () => {
+ adjustedRects.value.forEach(rect => {
+ rect.isActive = false;
+ });
+ blind.value = false;
+};
// 鐮存崯
const handleDamage = async () => {
try {
@@ -130,7 +153,7 @@
closeWebSocket();
});
</script>
-
+
<template>
<div style="margin-top: 10px;">
<div>
@@ -147,12 +170,12 @@
class="rect"
:style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
width: `${rect.width}px`, height: `${rect.height}px`,
- backgroundColor: getRectColora(rect.state) }">
+ backgroundColor: rect.isActive ? '#ADFF2F' : getRectColora(rect.state)
+ }">
<div class="centered-text">
- <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 style="font-size: 15px;font-weight: bold;">{{ rect.glassId }}</div>
+ <div style="font-size: 15px;font-weight: bold;">{{ rect.flowCardId }}</div>
+ <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
@@ -160,15 +183,15 @@
</div>
</el-card>
</div>
- <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;">
+ <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
<el-button type="warning" plain :icon="Delete" @click="handleDamage" style="width: 140px;margin-left: 10px;">
{{ $t('order.dilapidation') }}
</el-button>
</el-dialog>
</div>
-
+
</template>
-
+
<style scoped>
#boxa{
border: 1px solid rgb(119, 116, 116);
diff --git a/UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue b/UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue
new file mode 100644
index 0000000..2927b8f
--- /dev/null
+++ b/UI-Project/src/views/UnLoadGlass/PrintCustomLabelSemi1.vue
@@ -0,0 +1,227 @@
+<script setup>
+import request from "@/utils/request"
+import {ElDatePicker, ElMessage} from "element-plus"
+import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+// import {useRouter} from 'vue-router'
+// import {changeFilterEvent, filterChanged} from "@/hook"
+// import {useI18n} from 'vue-i18n'
+// import deepClone from "@/utils/deepClone";
+import companyInfo from "@/lang/companyInfo"
+
+const company = companyInfo()
+//璇█鑾峰彇
+const {t} = useI18n()
+// let router = useRouter()
+let produceList = ref([])
+let labelList = ref([])
+let titleList = ref([])
+let dataList = ref([])
+let list = ref([])
+let lastList=ref([])
+
+let filterData = ref({})
+
+const data = ref({
+ printList: []
+})
+
+
+// const {currentRoute} = useRouter()
+// const route = currentRoute.value
+// data.value.printList = JSON.parse(route.query.printList)
+// const type = route.query.type
+// const faceOrientation = route.query.faceOrientation
+// const lableType = route.query.lableType
+let props = defineProps({
+ printFlowCardId: null,
+ printLayer: null,
+})
+
+onMounted(async () => {
+ console.log(props.printFlowCardId,props.printLayer)
+ const response = await request.post('/unLoadGlass/downGlassInfo/downGlassLabelPrint',{
+ flowCardId:props.printFlowCardId,
+ layer:props.printLayer
+ });
+ if (response.code == 200) {
+ console.log("lastList.value",response.data)
+ lastList.value=response.data;
+
+ } else {
+ ElMessage.error(response.message);
+ }
+
+ }
+
+)
+
+
+// // 鎵撳嵃鏂规硶
+// const printFlowCard = () => {
+// // 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
+// let el = document.getElementById("printFlowCard");
+// let doc = document;
+// let body = doc.body || doc.getElementsByTagName("body")[0];
+// let printId = "print-" + Date.now();
+
+// // 鍒涘缓鏃犲壇浣滅敤鐨勬墦鍗板鍣�(鍥犱笉纭畾椤甸潰鐨勬墦鍗板厓绱犳湁鏃犲叾瀹冩牱寮�)
+// let content = doc.createElement("div");
+// content.id = printId;
+
+// // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
+// let style = doc.createElement("style");
+// style.innerHTML =
+// "body>#" +
+// printId +
+// "{display:none}@media print{" +
+// "@page {" +
+// " size: auto; " +
+// " margin: 2mm 2mm 2mm 2mm; " +
+// " }body>:not(#" +
+// printId +
+// "){display:none !important}body>#" +
+// printId +
+// "{display:block;padding-top:1px}}";
+// //
+// content.innerHTML = el.outerHTML;
+// // // console.log("el.outerHTML", el.outerHTML);
+// body.appendChild(style);
+
+// // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎
+// // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡)
+// body.appendChild(content);
+// setTimeout(() => {
+// window.print();
+// body.removeChild(content);
+// body.removeChild(style);
+// }, 20);
+// }
+</script>
+
+<template>
+ <!-- <el-button id="printButton" @click="printFlowCard();">鎵撳嵃</el-button> -->
+ <div id="printFlowCard" >
+ <template v-for="(item,index) in lastList">
+ <div id="entirety" >
+
+ <div class="row1">
+ <div style="position: absolute;font-weight: bold;margin-left: 5px;" v-if="item.tempering_layout_id!=null">{{ item.tempering_layout_id }}/{{ item.tempering_feed_sequence }}</div>
+ <span>{{ item.customer_name }}</span>
+ <span>{{ item.order_id }}</span>
+ <span v-if="item.process.includes('澶硅兌')">鑳剁墖</span>
+ <span v-else-if="item.process.includes('涓┖')">涓┖</span>
+<span v-else-if="item.process.includes('鐧惧彾')">鐧惧彾</span>
+<span v-else></span>
+ <div style="position: absolute;font-weight: bold;margin-left: 210px;margin-top: -26px;" >{{ index+1 }}</div>
+ </div>
+ <div class="row2">
+ <span>{{ item.project }}</span>
+ <span>{{ item.building_number }}</span>
+ </div>
+ <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div>
+ <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div>
+ <div class="row5">
+ <span>{{item.glass_child }}</span>
+ <span>{{ item.processing_note }}</span>
+ </div>
+ </div>
+ <div style="width: 20px" v-if="index%2===0"></div>
+ <div class="print-page" v-else></div>
+ </template>
+ </div>
+
+</template>
+
+<style scoped>
+* {
+ margin: 0;
+ padding: 0;
+}
+
+#printButton {
+ /*margin-top: -20px;*/
+ width: 100px;
+}
+
+#printFlowCard {
+ display: flex;
+ justify-content: left;
+ flex-wrap: wrap;
+ width: 500px;
+}
+
+#entirety{
+ text-align: center;
+ width: 46%;
+ height: 170px;
+ border: black 1px;
+ word-wrap: break-word;
+ margin-left: 10px;
+}
+
+.row1 {
+ font-size: 12pt;
+ font-weight: bold;
+ height: 35px;
+}
+.row1 span {
+ font-size: 12pt;
+}
+
+.row2 {
+ font-size: 14pt;
+ font-weight: bold;
+ height: 35px;
+}
+.row2 span {
+ font-size: 12pt;
+}
+span {
+ font-size: 12pt;
+ font-weight: bold;
+}
+
+.row3 {
+ margin-top: -5px;
+ height: 35px;
+ font-size: 22pt;
+ font-weight: bolder;
+ line-height: 35px;
+}
+
+.row5 {
+ height: 50px;
+ font-weight: bold;
+ font-size: 12pt;
+ /* margin-left: 20px; */
+}
+.row5 span {
+ font-size: 12pt;
+}
+
+.row6 {
+ height: 15px;
+ font-weight: bold;
+ font-size: 8pt;
+}
+
+
+
+
+
+@media print {
+ .print-page {
+ page-break-after: always; /* 娣诲姞鍒嗛〉绗︼紝鍦ㄦ瘡涓猵rint-page div涔嬪悗鍒嗛〉 */
+ }
+ div {
+ page-break-inside: avoid;
+ }
+ @page {
+ size: auto; /* auto is the initial value */
+ margin: 2mm 2mm 2mm 2mm; /* this affects the margin in the printer settings */
+
+ }
+}
+
+</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/UnLoadGlass/PrintFlow.vue b/UI-Project/src/views/UnLoadGlass/PrintFlow.vue
index 235e147..fa5a0e8 100644
--- a/UI-Project/src/views/UnLoadGlass/PrintFlow.vue
+++ b/UI-Project/src/views/UnLoadGlass/PrintFlow.vue
@@ -47,6 +47,8 @@
for (let i = 0; i < produceList.value.length; i++) {
//鏁伴噺
let totalQuantity = 0;
+ //钀芥灦鏁伴噺
+ let totalQuantity1 = 0;
//闈㈢Н
let totalArea = 0;
//閲嶉噺
@@ -54,6 +56,7 @@
// 瀵规瘡涓泦鍚堜腑鐨� detailList 杩涜璁$畻
produceList.value[i].detailList.forEach(collection => {
totalQuantity += collection.quantity * 1;
+ totalQuantity1 += collection.quantity1 * 1;
//姣忎釜搴忓彿闈㈢Н
collection.total_area = parseFloat((collection.width * collection.height * collection.quantity / 1000000).toFixed(2))
totalArea += collection.total_area * 1;
@@ -63,51 +66,13 @@
});
// 杈撳嚭姣忎釜闆嗗悎涓殑鎬绘暟閲�
produceList.value[i].detail[0].quantity = totalQuantity
+ produceList.value[i].detail[0].quantity1 = totalQuantity
produceList.value[i].detail[0].gross_area = totalArea
produceList.value[i].detail[0].weight = totalWeight
}
}
-// const printFlowCard = () => {
-// // 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
-// let el = document.getElementById("printFlowCard");
-// let doc = document;
-// let body = doc.body || doc.getElementsByTagName("body")[0];
-// let printId = "print-" + Date.now();
-
-// // 鍒涘缓鏃犲壇浣滅敤鐨勬墦鍗板鍣�(鍥犱笉纭畾椤甸潰鐨勬墦鍗板厓绱犳湁鏃犲叾瀹冩牱寮�)
-// let content = doc.createElement("div");
-// content.id = printId;
-
-// // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
-// let style = doc.createElement("style");
-// style.innerHTML =
-// "body>#" +
-// printId +
-// "{display:none}@media print{" +
-// "@page {" +
-// " size: auto; " +
-// " margin: 5mm 5mm 5mm 5mm; " +
-// " }body>:not(#" +
-// printId +
-// "){display:none !important}body>#" +
-// printId +
-// "{display:block;padding-top:1px}}";
-// //
-// content.innerHTML = el.outerHTML;
-// // // console.log("el.outerHTML", el.outerHTML);
-// body.appendChild(style);
-
-// // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎
-// // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡)
-// body.appendChild(content);
-// setTimeout(() => {
-// window.print();
-// body.removeChild(content);
-// body.removeChild(style);
-// }, 20);
-// }
onMounted(async () => {
console.log(props.printFlowCardId,props.printLayer)
@@ -162,30 +127,20 @@
<table v-for="(item,id) in produceList" id="contentTable" :key="id">
<thead>
<tr v-for="(itemFlow,index) in item.detail" :key="index">
- <td v-if="like='1'" colspan="26">
+ <td colspan="29">
<div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div>
<div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div>
<div>{{ company.companyName }}</div>
<div>鐢熶骇娴佺▼鍗�</div>
- <div v-if="itemFlow.technologyNumber!=''" style="text-align: right;font-weight: bolder">娴佺▼鍗″彿锛� {{
+ <div v-if="itemFlow.technologyNumberMerge!=''" style="text-align: right;font-weight: bolder">
+ {{itemFlow.otherRemarks}}
+ 娴佺▼鍗″彿锛� {{
itemFlow.process_id
- }}/{{ itemFlow.technologyNumber }}
+ }}/{{ itemFlow.technologyNumberMerge }} 鍏� {{ flowCardCount }} 鏋�
</div>
- <div v-else style="text-align: right;font-weight: bolder">娴佺▼鍗″彿锛� {{
- itemFlow.process_id
- }}/{{ itemFlow.technologyNumber }}
- </div>
- </td>
- <td v-else colspan="24">
- <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px "/></div>
- <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div>
- <div>{{ company.companyName }}</div>
- <div>鐢熶骇娴佺▼鍗�</div>
- <div v-if="itemFlow.technologyNumber!=''" style="text-align: right;font-weight: bolder">娴佺▼鍗″彿锛� {{
- itemFlow.process_id
- }}/{{ itemFlow.technologyNumber }} 鍏� {{ flowCardCount }} 鏋�
- </div>
- <div v-else style="text-align: right;font-weight: bolder">娴佺▼鍗″彿锛� {{
+ <div v-else style="text-align: right;font-weight: bolder">
+ {{itemFlow.otherRemarks}}
+ 娴佺▼鍗″彿锛� {{
itemFlow.process_id
}}/{{ itemFlow.technologyNumber }} 鍏� {{ flowCardCount }} 鏋�
</div>
@@ -197,8 +152,7 @@
<td class="tdNowrap">椤圭洰鍚嶇О锛�</td>
<td colspan="2">{{ items.project }}</td>
<td class="tdNowrap">宸ヨ壓娴佺▼锛�</td>
- <td colspan="19" v-if="like='1'" style="width: 500px">{{ items.process }}</td>
- <td colspan="17" v-else style="width: 500px">{{ items.process }}</td>
+ <td colspan="22" style="width: 500px">{{ items.process }}</td>
</tr>
<tr v-for="(itemTr,index) in item.detail" :key="index">
<td class="tdNowrap">纾ㄨ竟绫诲瀷锛�</td>
@@ -206,16 +160,15 @@
<td class="tdNowrap">鍗曠墖鍚嶇О锛�</td>
<td colspan="2">{{ itemTr.glass_child }}</td>
<td class="tdNowrap">浜у搧鍚嶇О锛�</td>
- <td v-if="like=='1'" colspan="19">{{ itemTr.product_name }}</td>
- <td v-else colspan="17">{{ itemTr.product_name }}</td>
+ <td colspan="22">{{ itemTr.product_name }}</td>
</tr>
<tr>
<td rowspan='2'>搴忓彿</td>
- <td rowspan='2'>缂栧彿</td>
- <td v-if="like!=null" rowspan="2">灏忕墖椤哄簭</td>
- <td v-else style="display: none;" rowspan="2">灏忕墖椤哄簭</td>
- <td rowspan='2'>瀹�*楂�</td>
+ <!-- <td rowspan='2'>缂栧彿</td> -->
+ <td rowspan="2">灏忕墖椤哄簭</td>
+ <td rowspan='2' style="width: 90px">瀹�*楂�</td>
<td rowspan='2'>鏁伴噺</td>
+ <td rowspan='2'>钀芥灦</td>
<td rowspan='2'>闈㈢Н</td>
<td rowspan='2'>鍛ㄩ暱</td>
<td rowspan='2'>鍗婂緞</td>
@@ -240,23 +193,24 @@
<td>{{ company.printLabel.printFlowCard.lackOf }}</td>
<td>{{ company.printLabel.printFlowCard.patch }}</td>
<td>{{ company.printLabel.printFlowCard.lackOf }}</td>
+ <td>{{ company.printLabel.printFlowCard.patch }}</td>
+ <td>{{ company.printLabel.printFlowCard.lackOf }}</td>
+ <td>{{ company.printLabel.printFlowCard.patch }}</td>
+ <td>{{ company.printLabel.printFlowCard.lackOf }}</td>
</tr>
</thead>
<tbody>
<tr v-for="(itemDatile,index) in item.detailList" :key="index">
<td>{{ itemDatile.order_number }}</td>
- <td>{{ itemDatile.s01Value }}</td>
- <td v-if="like=='1'">{{ itemDatile.technology_number }}</td>
- <td v-else style="display: none"></td>
+ <!-- <td>{{ itemDatile.s01Value }}</td> -->
+ <td>{{ itemDatile.technology_number }}</td>
<td>{{ itemDatile.child_width }}</td>
<td class="item" style="width: 5%;height: 100%;">
- <!-- <el-input v-model="itemDatile.quantity" style="border: none" @keyup="handleSummary()"></el-input> -->
{{ itemDatile.quantity }}
+ <!-- <input v-model="itemDatile.quantity" style="width: 100%;height: 100%" @keyup="handleSummary()"/> -->
</td>
- <!-- <td class="item" style="width: 5%;height: 100%;">
- {{ itemDatile.quantity1 }}
- </td> -->
+ <td>{{ itemDatile.quantity1 }}</td>
<td>{{ itemDatile.total_area }}</td>
<td>{{ itemDatile.perimeter }}</td>
<td>{{ itemDatile.bend_radius }}</td>
@@ -277,13 +231,19 @@
<td></td>
<td></td>
<td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
</tr>
</tbody>
<tfoot>
<tr style="height: 14px">
- <td v-for="(itemsum,index) in item.detail" :key="index" colspan="26">
+ <td v-for="(itemsum,index) in item.detail" :key="index" colspan="29">
鏁伴噺锛�
<label>{{ itemsum.quantity }}</label>
+ 钀藉姞鏁伴噺锛�
+ <label>{{ itemsum.quantity1 }}</label>
闈㈢Н锛�
<label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label>
閲嶉噺锛�
@@ -291,17 +251,12 @@
</td>
</tr>
<tr v-for="(itemtextarea,index) in item.detail" :key="index">
- <td v-if="like='1'" colspan="4" rowspan="6" style="width: 480px;height: 100px ">
- <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{itemtextarea.otherRemarks}}</textarea>
- </div>
- </td>
- <td v-else colspan="6" rowspan="2" style="width: 480px;height: 100px ">
- <!-- <div style="width: 100%;height: 100%"><textarea style="height: 99%;width: 99%;font-size: 11px">{{ itemtextarea.processing_note }}</textarea>-->
- <!-- </div>-->
- <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{itemtextarea.otherRemarks}}</textarea>
- </div>
- </td>
- <td colspan="2">瀹屽伐绛惧悕</td>
+
+ <td>瀹屽伐绛惧悕</td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
@@ -314,7 +269,11 @@
<td colspan="2"></td>
</tr>
<tr>
- <td colspan="2">鐢熶骇鏃ユ湡</td>
+ <td>鐢熶骇鏃ユ湡</td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
@@ -327,7 +286,9 @@
<td colspan="2"></td>
</tr>
<tr>
- <td colspan="2">璐ㄦ绛惧悕</td>
+ <td>璐ㄦ绛惧悕</td>
+ <td colspan="2"></td>
+ <td colspan="2">鐢熶骇绛惧悕</td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
@@ -338,9 +299,15 @@
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
+ <td colspan="2"></td>
+ <td colspan="2"></td>
+ </tr>
+ <tr>
+ <td>鍘熺墖绠卞彿</td>
+ <td colspan="28"></td>
</tr>
<tr v-for="(qrCodeItem,index) in item.detail" :key="index">
- <td colspan="23">
+ <td colspan="29">
<span style="display: flex;">
<span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%">
<div class='qrCode' style="width: 80px;height: 80px;">
@@ -353,6 +320,12 @@
</span>
</td>
+ </tr>
+ <tr v-for="(itemtextareas,index) in item.detail" :key="index">
+ <td colspan="29" rowspan="6" style="width: 480px;height: 150px ">
+ <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px;overflow: hidden;">{{itemtextareas.processing_note}}</textarea>
+ </div>
+ </td>
</tr>
</tfoot>
</table>
@@ -368,8 +341,7 @@
#printFlowCard {
text-align: center;
-font-weight: bolder;
- height: 600px;
+//font-weight: bolder; height: 600px;
}
#contentTable {
@@ -395,12 +367,10 @@
}
#contentTable tbody {
- white-space: nowrap;
}
.tdNowrap {
- white-space: nowrap;
}
@@ -410,17 +380,20 @@
}
input{
- font-weight: bolder;
+ border: none;
+ background: none;
}
-@page {
- size: auto; /* auto is the initial value */
- margin: 10mm 2mm 10mm 1mm; /* this affects the margin in the printer settings */
-}
@media print {
+ @page {
+ size: auto;
+ margin: 4mm 5mm 5mm 5mm
+
+ }
+
table {
page-break-before: always;
page-break-inside: auto;
@@ -441,4 +414,6 @@
height: 100%;
}
+
+
</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
index 7b035df..513c5a5 100644
--- a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
+++ b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -9,6 +9,7 @@
import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue";
import Landingindication from "./Landingindication.vue";
import Landingindicationtwo from "./Landingindicationtwo.vue";
+import PrintLabel from "@/views/UnLoadGlass/PrintCustomLabelSemi1.vue";
const router = useRouter()
const {t} = useI18n()
@@ -36,10 +37,12 @@
const selectValuesa = reactive({});
const selectOptionsa = ref([]);
const dialogTableVisible = ref(false)
+const dialogTableVisible1 = ref(false)
const printFlowCardId = ref('')
const printLayer = ref('')
const now = new Date();
const timeRange = ref([])
+const browser=ref(false)
const handleChange = async () => {
console.log("瑙﹀彂寮�鍏�")
@@ -62,7 +65,15 @@
console.error(error);
}
}
-
+const confirmBrowser = () =>{
+ if (/chrome|chromium/i.test(navigator.userAgent) && !/edg/i.test(navigator.userAgent)) {
+ browser.value=true
+} else if (/edg/i.test(navigator.userAgent)) {
+ browser.value=false
+} else {
+ browser.value=false
+}
+}
const handleInputChangea = (value, rowId) => {
// 鏇存柊瀵瑰簲琛岀殑 select 鍊�
@@ -107,7 +118,6 @@
flowCardId: firstPart,
layer: twoPart
});
- console.log(response)
if (response.code == 200) {
// 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
console.log('缁戝畾鎴愬姛');
@@ -191,7 +201,7 @@
// 鏇存柊 tableData 鐨勬暟鎹�
if (data.downGlassInfos != null) {
- downGlass.value = data.downGlassInfos[0][1];
+ downGlass.value = data.downGlassInfos[0];
}
if (data.engineerIdList != null) {
selectOptionsa.value = data.engineerIdList[0]
@@ -200,8 +210,8 @@
autoPrint.value = data.autoPrint[0];
}
-
- if (fullFlowCard.value == ""&&autoPrint.value==true) {
+ //鑷姩鎵撳嵃
+ if (fullFlowCard.value == ""&&autoPrint.value==true&&browser.value==true) {
for (let i = 0; i < tableData.length; i++) {
if (tableData[i].totalQuantity != 0) {
if (tableData[i].totalQuantity == tableData[i].racksNumber + tableData[i].otherNumber && fullFlowCard.value != tableData[i].flowCardId) {
@@ -223,6 +233,7 @@
};
// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
onMounted(() => {
+ confirmBrowser();//鑾峰彇娴忚鍣�
fetchFlowCardId();
fetchTableData(); // 鑾峰彇鏁版嵁
socket = initializeWebSocket(socketUrl, handleMessage);
@@ -293,16 +304,69 @@
printLayer.value = row.layer
dialogTableVisible.value = true;
setTimeout(() => {
- printFlowCard(); // 鏇挎崲鎴愪綘瑕佹墽琛岀殑鍑芥暟鍚�
+ printFlowCard();
dialogTableVisible.value = false;
- }, 1000);
- ;
+ }, 2000);
+}
+const open1 = async (row) => {
+printFlowCardId.value = row.flowCardId;
+printLayer.value = row.layer
+dialogTableVisible1.value = true;
+setTimeout(() => {
+ printFlowCard1();
+ //dialogTableVisible1.value = false;
+}, 1000);
}
const printFlowCard = () => {
// 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
let el = document.getElementById("child");
+ let doc = document;
+ let body = doc.body || doc.getElementsByTagName("body")[0];
+ let printId = "print-" + Date.now();
+
+ // 鍒涘缓鏃犲壇浣滅敤鐨勬墦鍗板鍣�(鍥犱笉纭畾椤甸潰鐨勬墦鍗板厓绱犳湁鏃犲叾瀹冩牱寮�)
+ let content = doc.createElement("div");
+ content.id = printId;
+
+ // alert(/Chrome/.test(userAgent) && !/Edge/.test(userAgent));
+
+ // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
+ let style = doc.createElement("style");
+ console.log("style1:"+style.innerHTML)
+ style.innerHTML =
+ "body>#" +
+ printId +
+ "{display:none;}@media print{" +
+ "@page {" +
+ " size: auto; " +
+ " margin: 10mm 5mm 10mm 5mm; " +
+ " }body>:not(#" +
+ printId +
+ "){display:none !important;}body>#" +
+ printId +
+ "{display:block;}#" +
+ printId +
+ "{display: block; padding: 0; margin: 0; width: 100%; position: absolute; top: 0; left: 0; height: 100vh; box-sizing: border-box;}} ";
+
+ content.innerHTML = el.outerHTML;
+ // // console.log("el.outerHTML", el.outerHTML);
+ body.appendChild(style);
+
+ // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎
+ // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡)
+ body.appendChild(content);
+ setTimeout(() => {
+ window.print();
+ body.removeChild(content);
+ body.removeChild(style);
+ }, 20);
+}
+
+const printFlowCard1 = () => {
+ // 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
+ let el = document.getElementById("printFlowCard");
let doc = document;
let body = doc.body || doc.getElementsByTagName("body")[0];
let printId = "print-" + Date.now();
@@ -319,7 +383,7 @@
"{display:none}@media print{" +
"@page {" +
" size: auto; " +
- " margin: 10mm 2mm 10mm 1mm; " +
+ " margin: 2mm 2mm 2mm 2mm; " +
" }body>:not(#" +
printId +
"){display:none !important}body>#" +
@@ -341,6 +405,8 @@
}
+
+
// beforeUnmount(() => {
// closeWebSocket();
// });
@@ -356,7 +422,7 @@
<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;">
- <el-table height="200px" ref="table" @selection-change="handleSelectionChange" :data="tableData"
+ <el-table height="350px" ref="table" @selection-change="handleSelectionChange" :data="tableData"
:header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }">
<el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80"/>
<el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')"
@@ -376,14 +442,15 @@
</el-tag>
</template>
</el-table-column>
- <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="200">
+ <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="400">
<template #default="scope">
<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>
- <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">鎵撳嵃</el-button>
+ <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">鎵撳嵃娴佺▼鍗�</el-button>
+ <el-button @click="open1(scope.row)" :disabled="scope.row.flowCardId == null">鎵撳嵃鏍囩</el-button>
</template>
</el-table-column>
@@ -401,9 +468,6 @@
<el-option label="5" value="5"></el-option>
<el-option label="6" value="6"></el-option>
<el-option label="7" value="7"></el-option>
- <el-option label="8" value="8"></el-option>
- <el-option label="9" value="9"></el-option>
- <el-option label="10" value="10"></el-option>
</el-select>
<el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable
@@ -492,13 +556,14 @@
</template>
</el-dialog>
- <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close style="width: 75%;height:75% ">
- <!-- <template #header="{ close, titleId, titleClass }">
- <el-button @click="printFlowCard" >鎵撳嵃</el-button>
- </template> -->
+ <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close >
<print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
style="width: 100%;height: 100%"/>
</el-dialog>
+ <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close >
+ <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
+ style=""/>
+ </el-dialog>
</template>
<style scoped>
diff --git a/UI-Project/src/views/User/rolelist.vue b/UI-Project/src/views/User/rolelist.vue
index 78dfa0f..5d180ed 100644
--- a/UI-Project/src/views/User/rolelist.vue
+++ b/UI-Project/src/views/User/rolelist.vue
@@ -262,7 +262,7 @@
<el-button type="primary" style="margin-top: 10px;margin-left: 10px;" size="mini" id="searchButton" @click="add = true">{{ $t('delivery.addrole') }}</el-button>
<el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
- <el-table height="240" ref="table"
+ <el-table height="500" ref="table"
@selection-change="handleSelectionChange"
:data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
<el-table-column prop="name" align="center" :label="$t('delivery.role')" min-width="180" />
diff --git a/UI-Project/src/views/User/userlist.vue b/UI-Project/src/views/User/userlist.vue
index 5d79a7b..5ebb196 100644
--- a/UI-Project/src/views/User/userlist.vue
+++ b/UI-Project/src/views/User/userlist.vue
@@ -216,7 +216,7 @@
<el-button type="primary" style="margin-top: 10px;margin-left: 10px;" size="mini" id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button>
<el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
- <el-table height="240" ref="table"
+ <el-table height="500" ref="table"
@selection-change="handleSelectionChange"
:data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
<el-table-column prop="userName" align="center" :label="$t('productStock.username')" min-width="180" />
diff --git a/UI-Project/src/views/largescreen/largescreen.vue b/UI-Project/src/views/largescreen/largescreen.vue
index 0ac8dc0..b376d15 100644
--- a/UI-Project/src/views/largescreen/largescreen.vue
+++ b/UI-Project/src/views/largescreen/largescreen.vue
@@ -1,6 +1,6 @@
<template>
<el-card style="flex: 1;margin-left: 1px;margin-top: 10px;margin-right: 1px;" v-loading="loading">
- <el-scrollbar height="600px">
+ <el-scrollbar height="800px">
<div id="top" style="height: 150px;display: flex;">
<div class="echarts-container">
<div v-for="(processData, index) in processesData" :key="index" class="echarts-item">
@@ -46,32 +46,9 @@
<div class="moving-rect xiapianji5" v-show="xiapian5"></div>
<div class="moving-rect xiapianji6" v-show="xiapian6"></div>
</div>
-<!-- <div class="parter" style="margin-top: 10px;margin-left: 150px; height: 240px;width: 1000px;">
- <img src="../../assets/dpxsa.png" style="margin-left: -10px; width: 100%;height: 100%;" alt="Your Image">
- <div class="moving-rect vertical"></div>
- <div class="moving-rect all"></div>
- <div class="moving-rect horizontal"></div>
- <div class="moving-rect xiao"></div>
- <div class="moving-rect zhan"></div>
- <div class="moving-rect tu"></div>
- <div class="moving-rect zi"></div>
- <div class="moving-rect xia"></div>
- <div class="moving-rect zan"></div>
- <div class="moving-rect fa"></div>
- <div class="moving-rect hua"></div>
- <div class="moving-rect shui"></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"
- @selection-change="handleSelectionChange"
- :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="projectNo" align="center" :label="$t('large.projectnumber')" min-width="50" />
- <el-table-column prop="projectName" align="center" :label="$t('large.projectname')" min-width="50" />
- </el-table>
-</div> -->
</div>
-<div id="bottom" style="margin-top: 10px;height: 190px;background-color: #911005;">
-<el-table height="190" ref="table"
+<div id="bottom" style="margin-top: 10px;height: 190px;">
+<el-table height="390" ref="table"
@selection-change="handleSelectionChange"
:data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
<el-table-column prop="orderId" align="center" :label="$t('large.orderId')" min-width="50" />
@@ -288,8 +265,9 @@
const socketUrl6 = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unLoadGlassIsRun`;
const handleMessage6 = (data) => {
const tasks = data.downWorkstation[0];
- if (tasks && tasks.length >= 6) {
- xiapian.value = tasks.some(task => task.racksNumber!== 0);
+ const tasks1 = data.downGlassTask[0];
+ xiapian.value = tasks1.some(task => task.thickness!== '');
+ if (tasks && tasks.length >= 6) {
xiapian1.value = tasks[0].racksNumber !== 0;
xiapian2.value = tasks[1].racksNumber !== 0;
xiapian3.value = tasks[2].racksNumber !== 0;
diff --git a/hangzhoumesParent/JsonFile/PlcTemperingGlass.json b/hangzhoumesParent/JsonFile/PlcTemperingGlass.json
new file mode 100644
index 0000000..3abe9a6
--- /dev/null
+++ b/hangzhoumesParent/JsonFile/PlcTemperingGlass.json
@@ -0,0 +1,132 @@
+{
+ "plcAddressBegin": "DB88.0",
+ "plcAddressLenght": "58",
+ "dataType": "word",
+ "parameteInfor": [
+ {
+ "codeId": "confirmationWord",
+ "addressIndex": "0",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "temperingLayoutId",
+ "addressIndex": "2",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "filmsid",
+ "addressIndex": "4",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "temperingType",
+ "addressIndex": "6",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "thickness",
+ "addressIndex": "8",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "loadingRate",
+ "addressIndex": "10",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "areaDifference",
+ "addressIndex": "12",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "state",
+ "addressIndex": "22",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "deviceState",
+ "addressIndex": "24",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "resultState",
+ "addressIndex": "26",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "loadSpeed",
+ "addressIndex": "28",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "downSpeed",
+ "addressIndex": "30",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "load1",
+ "addressIndex": "32",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "heat1",
+ "addressIndex": "34",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "heat2",
+ "addressIndex": "36",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "cool1",
+ "addressIndex": "38",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "cool2",
+ "addressIndex": "40",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "downId",
+ "addressIndex": "42",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "productionTime",
+ "addressIndex": "44",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "heatEnergy",
+ "addressIndex": "46",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "coolEnergy",
+ "addressIndex": "48",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "temperatureUp1",
+ "addressIndex": "50",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "temperatureDown1",
+ "addressIndex": "52",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "temperatureUp2",
+ "addressIndex": "54",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "temperatureDown2",
+ "addressIndex": "56",
+ "addressLenght": "2"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/JsonFile/PlcdownGlass.json b/hangzhoumesParent/JsonFile/PlcdownGlass.json
new file mode 100644
index 0000000..a5698c2
--- /dev/null
+++ b/hangzhoumesParent/JsonFile/PlcdownGlass.json
@@ -0,0 +1,149 @@
+{
+ "plcAddressBegin": "DB11.0",
+ "plcAddressLenght": "94",
+ "dataType": "word",
+ "parameteInfor": [
+
+ {
+ "codeId": "requestWord",
+ "addressIndex": "0",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "requestID",
+ "addressIndex": "2",
+ "addressLenght": "30"
+ },
+ {
+ "codeId": "currentCell",
+ "addressIndex": "32",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "glassStatus08",
+ "addressIndex": "36",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "glassStatus06",
+ "addressIndex": "40",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "glassStatus11",
+ "addressIndex": "42",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "glassStatus13",
+ "addressIndex": "44",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G04_error_status",
+ "addressIndex": "48",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G05_error_status",
+ "addressIndex": "50",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G06_error_status",
+ "addressIndex": "52",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "robot_error_status",
+ "addressIndex": "54",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G08_error_status",
+ "addressIndex": "56",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G09_error_status",
+ "addressIndex": "58",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G10_error_status",
+ "addressIndex": "60",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G11_error_status",
+ "addressIndex": "62",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "robot_error_status",
+ "addressIndex": "64",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G13_error_status",
+ "addressIndex": "66",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "confirmationWord",
+ "addressIndex": "72",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G06_prohibit_film_production",
+ "addressIndex": "74",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G11_prohibit_film_production",
+ "addressIndex": "76",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "G13_prohibit_film_production",
+ "addressIndex": "78",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "Glass_width",
+ "addressIndex": "80",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "Glass_height",
+ "addressIndex": "82",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "Glass_thickness",
+ "addressIndex": "84",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "Start_cell",
+ "addressIndex": "86",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "End_cell",
+ "addressIndex": "88",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "task_type",
+ "addressIndex": "90",
+ "addressLenght": "2"
+ },
+ {
+ "codeId": "alarm_signal",
+ "addressIndex": "92",
+ "addressLenght": "2"
+ }
+
+ ]
+}
\ No newline at end of file
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
index 2ea5807..47b4769 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/common/config/Const.java
@@ -41,8 +41,8 @@
* 浜哄伐涓嬬墖102
* 鍑虹墖涓�103
* 璋冨害涓�104
- * 鎷胯蛋200
- * 鐮存崯201
+ * 鐮存崯8
+ * 鎷胯蛋9
*/
public static final Integer GLASS_STATE_NEW = 0;
public static final Integer GLASS_STATE_IN = 100;
@@ -50,8 +50,9 @@
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_DAMAGE_TAKE = Arrays.asList(8, 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);
@@ -98,29 +99,29 @@
* 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);
/**
@@ -139,8 +140,8 @@
* 2 杩涚倝瀹屾垚
* 3 閽㈠寲瀹屾垚
* 4 鍑虹墖瀹屾垚
- * 5 鐮存崯
- * 6 鎷胯蛋
+ * 8 鐮存崯
+ * 9 鎷胯蛋
*/
public static final Integer TEMPERING_NEW = -1;
@@ -149,8 +150,8 @@
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;
/**
* 涓嬬墖
@@ -161,6 +162,7 @@
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
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
index d096488..fc36b35 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/controller/DamageController.java
@@ -3,6 +3,7 @@
import cn.hutool.core.date.DateTime;
import com.mes.damage.entity.Damage;
+import com.mes.damage.entity.DamagePrint;
import com.mes.damage.service.DamageService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
@@ -62,6 +63,18 @@
damageService.insertDamage(damage);
return Result.build(200,"鏂板鎴愬姛",1);
}
+ @ApiOperation("鎷胯蛋鏁版嵁鏌ヨ")
+ @PostMapping("/selectDamagePrint")
+ public Result selectDamagePrint(@RequestBody Damage damage) {
+ List<Damage> damage2=damageService.selectDamagePrint(damage);
+ return Result.build(200,"鏌ヨ鎴愬姛",damage2);
+ }
+ @ApiOperation("鎷胯蛋鎵撳嵃鏌ヨ")
+ @PostMapping("/selectDamagePrintDetails")
+ public Result selectDamagePrintDetails(@RequestBody Damage damage) {
+ List<DamagePrint> damage2=damageService.selectDamagePrintDetails(damage);
+ return Result.build(200,"鏌ヨ鎴愬姛",damage2);
+ }
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/entity/DamagePrint.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/entity/DamagePrint.java
new file mode 100644
index 0000000..001bb85
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/entity/DamagePrint.java
@@ -0,0 +1,69 @@
+package com.mes.damage.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author wu
+ * @since 2024-06-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class DamagePrint implements Serializable {
+
+ /**
+ * 娴佺▼鍗�
+ */
+ private String flowCardId;
+
+ /**
+ * 宸ョ▼鍙�
+ */
+ private String engineerId;
+ /**
+ * 灞傚彿
+ */
+ private String layer;
+
+ /**
+ * 鐗堝浘id
+ */
+ private String temperingLayoutId;
+
+ /**
+ * 鐗囧簭
+ */
+ private String temperingFeedSequence;
+
+ /**
+ * 鐜荤拑id
+ */
+ private String glassId;
+
+ /**
+ * 瀹藉害
+ */
+ private double width;
+
+ /**
+ * 楂樺害
+ */
+ private double height;
+
+ /**
+ * 鍘氬害
+ */
+ private Integer thickness;
+
+
+
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
index 05a5e5a..528b941 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/DamageService.java
@@ -1,12 +1,12 @@
package com.mes.damage.service;
-import cn.hutool.core.date.DateTime;
+import com.baomidou.mybatisplus.extension.service.IService;
import com.github.yulichang.base.MPJBaseService;
import com.mes.damage.entity.Damage;
-import com.baomidou.mybatisplus.extension.service.IService;
+import com.mes.damage.entity.DamagePrint;
-import java.util.Date;
import java.util.List;
+import java.util.Map;
/**
* <p>
@@ -22,5 +22,21 @@
void submitDamage(List<Damage> damageList);
+ /**
+ * 鍗曚釜鐮存崯
+ *
+ * @param damage
+ */
void insertDamage(Damage damage);
+
+ /**
+ * 鎵归噺鐮存崯
+ *
+ * @param damageList
+ */
+ void batchInsertDamage(List<Damage> damageList);
+
+ List<Damage> selectDamagePrint(Damage damage);
+
+ List<DamagePrint> selectDamagePrintDetails(Damage damage);
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
index 98587bb..c4debd3 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/damage/service/impl/DamageServiceImpl.java
@@ -1,26 +1,29 @@
package com.mes.damage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.query.MPJQueryWrapper;
import com.mes.damage.entity.Damage;
+import com.mes.damage.entity.DamagePrint;
import com.mes.damage.mapper.DamageMapper;
import com.mes.damage.service.DamageService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.mapper.GlassInfoMapper;
-import com.mes.pp.entity.ReportingWork;
import com.mes.work_assignment.entity.WorkAssignment;
import com.mes.work_assignment.mapper.WorkAssignmentMapper;
import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.Timestamp;
import java.time.LocalDateTime;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import java.util.stream.Collectors;
/**
@@ -38,6 +41,8 @@
GlassInfoMapper glassInfoMapper;
@Resource
WorkAssignmentMapper workAssignmentMapper;
+ @Autowired
+ private DamageMapper damageMapper;
/**
* 鏌ヨ鎶ュ伐淇℃伅
@@ -111,7 +116,58 @@
damage.setOrderNumber(glassInfo.getGlassType());
damage.setTechnologyNumber(glassInfo.getLayer());
damage.setDamageTime(Timestamp.valueOf(LocalDateTime.now()));
- damage.setType(2);
baseMapper.insert(damage);
}
+
+ /**
+ * 娣诲姞鎶ュ伐淇℃伅
+ */
+ @Override
+ public void batchInsertDamage(List<Damage> damageList) {
+ WorkAssignment workAssignment = workAssignmentMapper.selectOne(new LambdaQueryWrapper<WorkAssignment>()
+ .eq(WorkAssignment::getLine, damageList.get(0).getLine())
+ .eq(WorkAssignment::getWorkProcesses, damageList.get(0).getWorkingProcedure()));
+
+ List<String> glassList = damageList.stream().map(Damage::getGlassId).collect(Collectors.toList());
+ List<GlassInfo> glassInfoList = glassInfoMapper.selectList(new LambdaQueryWrapper<GlassInfo>().in(GlassInfo::getGlassId, glassList));
+ Map<String, List<GlassInfo>> listMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getGlassId));
+ for (Damage damage : damageList) {
+ GlassInfo glassInfo = listMap.get(damage.getGlassId()).get(0);
+ BeanUtils.copyProperties(glassInfo, damage);
+ if (workAssignment != null) {
+ damage.setTeamsGroupsName(workAssignment.getTeamsGroupsName());
+ damage.setDeviceName(workAssignment.getDeviceName());
+ }
+ damage.setProcessId(glassInfo.getFlowCardId());
+ damage.setOrderNumber(glassInfo.getGlassType());
+ damage.setTechnologyNumber(glassInfo.getLayer());
+ damage.setDamageTime(Timestamp.valueOf(LocalDateTime.now()));
+ }
+ this.saveBatch(damageList);
+ }
+
+ @Override
+ public List<Damage> selectDamagePrint(Damage damage) {
+ QueryWrapper<Damage> wrapper = new QueryWrapper<>();
+ wrapper.select("working_procedure,engineer_id,teams_groups_name,device_name,count(glass_id)as glass_id")
+ .eq("type",damage.getType())
+ .eq("working_procedure",damage.getWorkingProcedure())
+ .groupBy("working_procedure,engineer_id,teams_groups_name,device_name");
+ if (damage.getEngineerId() != null) {
+ wrapper.eq("engineer_id", damage.getEngineerId());
+ }
+ return this.list(wrapper);
+ }
+
+ @Override
+ public List<DamagePrint> selectDamagePrintDetails(Damage damage) {
+ List<DamagePrint> listDamage=damageMapper.selectJoinList(DamagePrint.class,new MPJQueryWrapper<Damage>()
+ .select("b.flow_card_id,b.layer,t.engineer_id,b.tempering_layout_id,b.tempering_feed_sequence,t.glass_id,b.width,b.height,b.thickness")
+ .leftJoin("glass_info as b on t.glass_id=b.glass_id")
+ .eq("t.working_procedure",damage.getWorkingProcedure())
+ .eq("t.type",damage.getType())
+ .eq("t.engineer_id",damage.getEngineerId())
+ );
+ return listDamage;
+ }
}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/controller/FlowCardController.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/controller/FlowCardController.java
new file mode 100644
index 0000000..a265c19
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/controller/FlowCardController.java
@@ -0,0 +1,21 @@
+package com.mes.pp.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 鍓嶇鎺у埗鍣�
+ * </p>
+ *
+ * @author wu
+ * @since 2024-08-07
+ */
+@RestController
+@RequestMapping("/flow_card/flow-card")
+public class FlowCardController {
+
+}
+
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/FlowCard.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/FlowCard.java
new file mode 100644
index 0000000..3378be3
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/entity/FlowCard.java
@@ -0,0 +1,163 @@
+package com.mes.pp.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author wu
+ * @since 2024-08-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class FlowCard implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * (宸ョ▼鍙�,2024.0302澶╂満)
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 閿�鍞崟鍙�
+ */
+ private String orderId;
+
+ /**
+ * 鐢熶骇璁㈠崟鍙�
+ */
+ private String productionId;
+
+ /**
+ * 娴佺▼鍗″彿
+ */
+ private String processId;
+
+ /**
+ * 钀芥灦椤哄簭
+ */
+ private String landingSequence;
+
+ /**
+ * 搴忓彿
+ */
+ private Integer orderNumber;
+
+ /**
+ * 宸ヨ壓纭搴忓彿
+ */
+ private Integer technologyNumber;
+
+ /**
+ * 鍒嗘灦鏁伴噺
+ */
+ private Integer quantity;
+
+ /**
+ * 浠ヤ紭鍖栨暟閲�
+ */
+ private Integer optimizeQuantity;
+
+ /**
+ * 鎺掔増鐘舵��(榛樿0,1鍏佽鎺掔増2浼樺寲鍗犵敤)
+ */
+ private Integer layoutStatus;
+
+ /**
+ * 琛ョ墖鏁伴噺
+ */
+ private Integer numberPatches;
+
+ /**
+ * 鏈�鍚庡伐搴忔姤宸� 搴撳瓨鏁伴噺
+ */
+ private Integer inventoryQuantity;
+
+ /**
+ * 宸插叆鏁伴噺
+ */
+ private Integer receivedQuantity;
+
+ /**
+ * 琛ョ墖缂栧彿
+ */
+ private String patchId;
+
+ /**
+ * 宸ョ▼鍗犵敤鐘舵�侊紝0涓哄崰鐢�1鍗犵敤
+ */
+ private Integer engineeringOccupancy;
+
+ /**
+ * 宸ョ▼鍙�(2024.0302娣诲姞)
+ */
+ private String projectNo;
+
+ /**
+ * 鍖呰鍓嶅伐搴忔姤宸� 搴撳瓨鏁伴噺
+ */
+ private Integer inventoryNumber;
+
+ /**
+ * 鍏ュ簱鏃堕棿
+ */
+ private LocalDateTime storageTime;
+
+ /**
+ * 鐢熶骇缁堟鐘舵��(榛樿0,1鐢熶骇缁堟)
+ */
+ private Integer terminationStatus;
+
+ /**
+ * 鎵撳嵃鐘舵��
+ */
+ private Integer printStatus;
+
+ /**
+ * 澶囩敤閿�
+ */
+ private Integer alternateKey;
+
+ /**
+ * 鍒嗘灦鍛�
+ */
+ private String founder;
+
+ /**
+ * 鍒嗘灦鏃堕棿
+ */
+ @TableField("splitFrame_time")
+ private LocalDateTime splitframeTime;
+
+ /**
+ * 灞傛暟
+ */
+ private Integer layersNumber;
+
+ /**
+ * 娴佺▼鍗℃墦鍗版帓搴�
+ */
+ private Integer sort;
+
+ /**
+ * 寤虹珛鏃堕棿
+ */
+ private LocalDateTime createTime;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ private LocalDateTime updateTime;
+
+
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/mapper/FlowCardMapper.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/mapper/FlowCardMapper.java
new file mode 100644
index 0000000..865ca5c
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/mapper/FlowCardMapper.java
@@ -0,0 +1,27 @@
+package com.mes.pp.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.mes.pp.entity.FlowCard;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import feign.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * Mapper 鎺ュ彛
+ * </p>
+ *
+ * @author wu
+ * @since 2024-08-07
+ */
+@DS("pp")
+public interface FlowCardMapper extends BaseMapper<FlowCard> {
+
+ List<Map<String, Object>> selectProject(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber);
+
+ List<Map<String, Object>> selectFlowCard(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber);
+
+ List<Map<String, Object>> selectLabel(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber);
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/FlowCardService.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/FlowCardService.java
new file mode 100644
index 0000000..7120afb
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/FlowCardService.java
@@ -0,0 +1,24 @@
+package com.mes.pp.service;
+
+import com.mes.pp.entity.FlowCard;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 鏈嶅姟绫�
+ * </p>
+ *
+ * @author wu
+ * @since 2024-08-07
+ */
+public interface FlowCardService extends IService<FlowCard> {
+
+ List<Map<String, Object>> selectProject(String processId, Integer technologyNumber);
+
+ List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber);
+
+ List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber);
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/impl/FlowCardServiceImpl.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/impl/FlowCardServiceImpl.java
new file mode 100644
index 0000000..3fed7cc
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/pp/service/impl/FlowCardServiceImpl.java
@@ -0,0 +1,37 @@
+package com.mes.pp.service.impl;
+
+import com.mes.pp.entity.FlowCard;
+import com.mes.pp.mapper.FlowCardMapper;
+import com.mes.pp.service.FlowCardService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 鏈嶅姟瀹炵幇绫�
+ * </p>
+ *
+ * @author wu
+ * @since 2024-08-07
+ */
+@Service
+public class FlowCardServiceImpl extends ServiceImpl<FlowCardMapper, FlowCard> implements FlowCardService {
+
+ @Override
+ public List<Map<String, Object>> selectProject(String processId, Integer technologyNumber){
+ return baseMapper.selectProject(processId,technologyNumber);
+ }
+
+ @Override
+ public List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber){
+ return baseMapper.selectFlowCard(processId, technologyNumber);
+ }
+
+ @Override
+ public List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber){
+ return baseMapper.selectLabel(processId, technologyNumber);
+ }
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
index 9a83681..aecb3b9 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
import com.mes.base.entity.BigStorageCageBaseInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -91,4 +92,7 @@
*/
@ApiModelProperty(value = "宸ョ▼id", position = 17)
private String engineerId;
+
+ @TableLogic
+ private int deleted;
}
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 9944d58..c400f4e 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
@@ -108,7 +108,7 @@
public Integer updateTemperingState(TemperingGlassInfo temperingGlassInfo) {
UpdateWrapper<TemperingGlassInfo> wrapper = new UpdateWrapper<>();
wrapper.eq("glass_id",temperingGlassInfo.getGlassId())
- .lt("state",5)
+ .lt("state",6)
.set("state", temperingGlassInfo.getState());;
if (temperingMapper.update(null,wrapper) > 0) {
return 200;
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/DateUtil.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/DateUtil.java
new file mode 100644
index 0000000..5fe0e17
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/DateUtil.java
@@ -0,0 +1,24 @@
+package com.mes.tools;
+
+import java.util.Calendar;
+import java.util.Date;
+
+public class DateUtil {
+ public static Date getBeginDate(){
+ Calendar now = Calendar.getInstance();
+ Calendar startOfDay = (Calendar) now.clone();
+ startOfDay.set(Calendar.HOUR_OF_DAY, 0);
+ startOfDay.set(Calendar.MINUTE, 0);
+ startOfDay.set(Calendar.SECOND, 0);
+ return startOfDay.getTime();
+ }
+
+ public static Date getEndDate(){
+ Calendar now = Calendar.getInstance();
+ Calendar endOfDay = (Calendar) now.clone();
+ endOfDay.set(Calendar.HOUR_OF_DAY, 23);
+ endOfDay.set(Calendar.MINUTE, 59);
+ endOfDay.set(Calendar.SECOND, 59);
+ return endOfDay.getTime();
+ }
+}
diff --git a/hangzhoumesParent/common/servicebase/src/main/resources/application.yml b/hangzhoumesParent/common/servicebase/src/main/resources/application.yml
new file mode 100644
index 0000000..0edfb92
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/resources/application.yml
@@ -0,0 +1,8 @@
+mybatis-plus-join:
+ sub-table-logic: true
+mybatis-plus:
+ global-config:
+ db-config:
+ logic-delete-field: deleted
+ logic-delete-value: 1
+ logic-not-delete-value: 0
\ No newline at end of file
diff --git a/hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml
new file mode 100644
index 0000000..1af4682
--- /dev/null
+++ b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/FlowCardMapper.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mes.pp.mapper.FlowCardMapper">
+
+
+ <select id="selectFlowCard" resultType="java.util.Map">
+ select fc.order_number,
+ concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
+ od.quantity,
+ round(ogd.total_area, 2) as total_area,
+ od.perimeter,
+ od.bend_radius,
+ concat(IFNULL(od.processing_note,''), IFNULL(od.remarks,'')) as remarks,
+ od.other_columns,
+ round(ogd.child_width) as width,
+ round(ogd.child_height) as height,
+ pd.separation,
+ fc.technology_number
+ from pp.flow_card as fc
+ left join sd.order_glass_detail as ogd
+ on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
+ fc.technology_number = ogd.technology_number
+ left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.product_detail as pd
+ on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
+ where fc.process_id = #{processId}
+ and position(fc.technology_number in #{technologyNumber})
+ group by fc.process_id, fc.order_number, fc.technology_number
+ order by IF(sort != NULL || sort != '', sort, fc.order_number)
+
+ </select>
+
+ <select id="selectProject" resultType="java.util.Map">
+ select o.customer_name,
+ o.project,
+ (select process from sd.order_glass_detail where order_id=fc.order_id and order_number=fc.order_number and technology_number=fc.technology_number) as process ,
+ od.edging_type,
+ (select glass_child from sd.order_glass_detail where order_id=fc.order_id and order_number=fc.order_number and technology_number=fc.technology_number) as glass_child ,
+ od.product_name,
+ o.processing_note,
+ fc.process_id,
+ SUM(od.quantity) as quantity,
+ round(SUM(ogd.total_area), 2) as gross_area,
+ sum(od.weight) as weight,
+ 1 as technologyNumber,
+ concat(fc.process_id, '/', 1) as processIdNumber,
+ concat('瀵瑰簲鎴戝徃鍗曞彿',o.batch) AS otherRemarks
+ from pp.flow_card as fc
+ left join sd.order_glass_detail as ogd
+ on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
+ fc.technology_number = ogd.technology_number
+ left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.`order` as o on o.order_id = fc.order_id
+ left join sd.product as p on p.id = od.product_id
+ left join (select ogd.order_id,
+ ogd.order_number,
+ ogd.technology_number,
+ ogd.glass_child,
+ GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
+ from sd.order_glass_detail as ogd
+ where ogd.order_id = left(#{processId}, 10)
+ and position(ogd.technology_number in #{technologyNumber})
+ GROUP BY order_id, order_number) as ogdc
+ on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
+ ogdc.technology_number = ogd.technology_number
+ where fc.process_id = #{processId}
+ and position(fc.technology_number in #{technologyNumber})
+ group by fc.process_id
+ </select>
+
+ <select id="selectLabel" resultType="java.util.Map">
+ select fc.process_id,
+ o.order_id,
+ o.project,
+ o.customer_id,
+ ogd.child_width as width,
+ ogd.child_height as height,
+ od.quantity,
+ od.order_number as orderNumber,
+ fc.technology_number as technologyNumber,
+ ogd.glass_child,
+ ogd.process,
+ c.customer_abbreviation as customer_name,
+ ifnull(od.processing_note, '') as processing_note,
+ bgt.type_name,
+ od.other_columns,
+ od.building_number,
+ od.bend_radius
+ from sd.order as o
+ left join sd.order_detail as od on o.order_id = od.order_id
+ left join sd.order_glass_detail as ogd
+ on ogd.order_id = od.order_id and ogd.order_number = od.order_number
+ left join pp.flow_card as fc on o.order_id = fc.order_id and
+ od.order_number = fc.order_number and
+ fc.technology_number = ogd.technology_number
+ left join sd.product pt on pt.id = od.product_id
+ left join sd.customer c on c.id = o.customer_id
+ left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id
+ where fc.process_id = #{processId}
+ and fc.technology_number = #{technologyNumber}
+ group by od.order_number, od.width, od.height
+ </select>
+
+
+</mapper>
\ No newline at end of file
diff --git a/hangzhoumesParent/gateway/src/main/resources/application.yml b/hangzhoumesParent/gateway/src/main/resources/application.yml
index 93b9826..a369150 100644
--- a/hangzhoumesParent/gateway/src/main/resources/application.yml
+++ b/hangzhoumesParent/gateway/src/main/resources/application.yml
@@ -6,7 +6,7 @@
cloud:
nacos:
discovery:
- server-addr: 10.153.19.150:8848
+ server-addr: 127.0.0.1:8848
gateway:
discovery:
locator:
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
index 7d8c5da..99bc35f 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/application.yml
@@ -3,20 +3,20 @@
spring:
profiles:
- active: cz
+ active: dev
application:
name: cacheVerticalGlass
mybatis-plus:
mapper-locations: classpath*:mapper/*.xml
-# configuration:
-# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mes:
sequence:
order: false
minCount: 20
carWidth: 5000 #澶ц溅瀹藉害
slotWidth: 5000 #澶ц溅瀹藉害
- inCarMaxSize: 3 #杩涚墖澶ц溅鏈�澶у瓨鏀剧幓鐠冩暟閲�
- outCarMaxSize: 3 #鍑虹墖澶ц溅鏈�澶у瓨鏀剧幓鐠冩暟閲�
+ inCarMaxSize: 1 #杩涚墖澶ц溅鏈�澶у瓨鏀剧幓鐠冩暟閲�
+ outCarMaxSize: 2 #鍑虹墖澶ц溅鏈�澶у瓨鏀剧幓鐠冩暟閲�
glassGap: 350 #鐜荤拑闂磋窛
- xMaxSize: 2850
\ No newline at end of file
+ xMaxSize: 2800
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
index 5a26257..6fc80c0 100644
--- a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/application.yml
@@ -3,7 +3,7 @@
spring:
profiles:
- active: prod
+ active: dev
application:
name: glassStorage
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
index 7ecbf06..0118321 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/job/PlcLoadGlassTask.java
@@ -169,13 +169,13 @@
@Scheduled(fixedDelay = 1000)
public void loadGlassIsRun() {
JSONObject jsonObject = new JSONObject();
+ //鏄惁寮�濮嬪伐绋�
Engineering engineering = engineeringService.selectInitiate(1);
- if (engineering != null){
jsonObject.append("engineering", engineering);
- }else {
- jsonObject.append("engineering", "0");
- }
- ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("IsRun");
+ //宸ヤ綅淇℃伅
+ List<UpWorkstation> upWorkstations = upWorkstationService.list();
+ jsonObject.append("list", upWorkstations);
+ ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("loadGlassIsRun");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
if (webserver != null) {
diff --git a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
index 3920d3c..ee801d2 100644
--- a/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/LoadGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
port: 8083
spring:
profiles:
- active: cz
+ active: dev
application:
name: loadGlass
mybatis-plus:
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 ea60109..3d06990 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
@@ -12,6 +12,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
+
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
@@ -33,14 +36,28 @@
* fixedDelay : 涓婁竴涓皟鐢ㄧ粨鏉熷悗鍐嶆璋冪敤鐨勫欢鏃�
*/
- @Scheduled(fixedDelay = 2000)
+ @Scheduled(fixedDelay = 10000)
public void screenHome() {
JSONObject jsonObject = new JSONObject();
Reportingdamage reportingdamage = new Reportingdamage();
- reportingdamage.setReportingWorkTime("2024-05-11");
+ //reportingdamage.setReportingWorkTime("2024-05-11");
+ // 鑾峰彇褰撳墠鏃ユ湡
+ LocalDate today = LocalDate.now();
+ // 璁$畻鏈�杩戜竷澶╃殑寮�濮嬫棩鏈�
+ LocalDate startOfPeriod = today.minusDays(6); // 7澶╃殑鑼冨洿鍖呮嫭浠婂ぉ锛屾墍浠ュ噺鍘�6澶�
+ // 鏈�杩戜竷澶╃殑缁撴潫鏃ユ湡灏辨槸浠婂ぉ
+ LocalDate endOfPeriod = today;
+ // 鏍煎紡鍖栨棩鏈熶负瀛楃涓�
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ String startOfPeriodStr = startOfPeriod.format(formatter);
+ String endOfPeriodStr = endOfPeriod.format(formatter);
+ // 璁剧疆涓烘渶杩戜竷澶╃殑鏃堕棿鑼冨洿
+ reportingdamage.setReportingWorkTime("2024-05-11" + " to " + endOfPeriodStr);
+ //reportingdamage.setReportingWorkTime(startOfPeriodStr + " to " + endOfPeriodStr);
//鎵囧舰鍥惧悇璁惧鐨勫姞宸ョ牬鎹熸暟閲�
List<Reportingdamage> device = reportingWorkService.selectDamage(reportingdamage);
jsonObject.append("device", device);
+
//鑾峰彇娆$牬鏈ˉ淇℃伅
List<AwaitingRepair> awaitingRepairs = reportingWorkService.selectAwaitingRepair();
jsonObject.append("awaitingRepairs", awaitingRepairs);
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 e0a91f0..acd2fcf 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
@@ -1,5 +1,10 @@
package com.mes.job;
+
import cn.hutool.json.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.mes.common.config.Const;
+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.tools.WebSocketServer;
@@ -10,6 +15,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
/**
* @author SNG-010
@@ -20,24 +26,27 @@
@Autowired
private TemperingGlassInfoService temperingAgoService;
+ @Autowired
+ private DamageService damageService;
+
/**
* fixedRate : 涓婁竴涓皟鐢ㄥ紑濮嬪悗鍐嶆璋冪敤鐨勫欢鏃讹紙涓嶇敤绛夊緟涓婁竴娆¤皟鐢ㄥ畬鎴愶級
* fixedDelay : 涓婁竴涓皟鐢ㄧ粨鏉熷悗鍐嶆璋冪敤鐨勫欢鏃�
*/
@Scheduled(fixedDelay = 1000)
- public void temperingGlassHome(){
+ public void temperingGlassHome() {
JSONObject jsonObject = new JSONObject();
//姝e湪绛夊緟杩涚墖鐨勭幓鐠�
List<TemperingGlassInfo> waitingGlass = temperingAgoService.selectWaitingGlass();
- if(waitingGlass!=null){
+ if (waitingGlass != null) {
jsonObject.append("waitingGlass", waitingGlass);
}
//鑾峰彇鏁村湪鐐変腑鐨勪袱涓増鍥緄d
List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId();
//杩涚倝涓殑鐜荤拑
- if(!layoutId.isEmpty()) {
+ if (!layoutId.isEmpty()) {
List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0));
jsonObject.append("intoGlass", intoGlass);
//杩涚倝涓殑绗簩涓増鍥�
@@ -48,7 +57,7 @@
}
//鍑虹倝鍚庣殑鐜荤拑
List<TemperingGlassInfo> outGlass = temperingAgoService.selectOutGlass();
- if(outGlass!=null){
+ if (outGlass != null) {
jsonObject.append("outGlass", outGlass);
}
@@ -57,7 +66,27 @@
if (outGlass != null) {
jsonObject.append("overGlass", overGlass);
}
+ //褰撳墠閽㈠寲宸ョ▼鐨勬嬁璧版暟鎹�
+ LambdaQueryWrapper<TemperingGlassInfo> queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.select(TemperingGlassInfo::getEngineerId)
+ .lt(TemperingGlassInfo::getState, Const.TEMPERING_END)
+ .groupBy(TemperingGlassInfo::getEngineerId);
+ List<String> engineerIds = temperingAgoService.list(queryWrapper)
+ .stream()
+ .map(TemperingGlassInfo::getEngineerId)
+ .distinct()
+ .collect(Collectors.toList());
+
+ List<Damage> temperingTakeGlassInfos = damageService.list(
+ new LambdaQueryWrapper<Damage>()
+ .in(Damage::getEngineerId, engineerIds)
+ .eq(Damage::getType, Const.GLASS_STATE_TAKE)
+ .orderByAsc(Damage::getId)
+ );
+
+
+ jsonObject.append("temperingTakeGlassInfos", temperingTakeGlassInfos);
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingGlass");
if (sendwServer != null) {
@@ -70,13 +99,16 @@
}
}
}
+
@Scheduled(fixedDelay = 1000)
- public void temperingIsRun(){
+ public void temperingIsRun() {
JSONObject jsonObject = new JSONObject();
//姝e湪杩涜鐨勪换鍔�
- List<TemperingGlassInfo>temperingTaskType=temperingAgoService.selectTaskType();
+ List<TemperingGlassInfo> temperingTaskType = temperingAgoService.selectTaskType();
jsonObject.append("temperingTaskType", temperingTaskType);
- ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("isRun");
+
+
+ ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingIsRun");
if (sendwServer != null) {
for (WebSocketServer webserver : sendwServer) {
if (webserver != null) {
@@ -86,6 +118,7 @@
}
}
}
+
}
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
index e9fcc1e..12e113b 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/application.yml
@@ -2,7 +2,7 @@
port: 8084
spring:
profiles:
- active: prod
+ active: dev
application:
name: temperingGlass
mybatis-plus:
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
index d3a8e05..fcf4eb3 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/controller/DownGlassInfoController.java
@@ -37,4 +37,9 @@
return Result.build(200, "鏌ヨ鎴愬姛", downGlassInfoService.downGlassPrint(downGlassInfo));
}
+ @PostMapping("/downGlassLabelPrint")
+ public Result downGlassLabelPrint(@RequestBody DownGlassInfo downGlassInfo) {
+ return Result.build(200, "鏌ヨ鎴愬姛", downGlassInfoService.downGlassLabelPrint(downGlassInfo));
+ }
+
}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
index da649b8..c0cacb7 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/mapper/DownGlassInfoMapper.java
@@ -7,6 +7,7 @@
import org.springframework.stereotype.Repository;
import java.util.List;
+import java.util.Map;
@Repository
public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> {
@@ -42,4 +43,13 @@
* @return
*/
List<DownGlassInfoDTO> queryWorkStationFlowCard(@Param(value = "workList") List<Integer> workList);
+
+ /**
+ * 鑾峰彇涓嬬墖淇℃伅
+ *
+ * @param processId,technologyNumber
+ * @return
+ */
+ List<Map<String, Object>> downGlassLabelPrint(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber);
+
}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
index 6e9c45d..e921817 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassInfoService.java
@@ -60,9 +60,26 @@
*/
String setDownGlassInfoRequest(DownGlassInfoRequest request);
+ /**
+ * 娴佺▼鍗℃墦鍗版煡璇�
+ *
+ * @param downGlassInfo
+ * @return
+ */
List<Map<String, List<Map<String, Object>>>> downGlassPrint(DownGlassInfo downGlassInfo);
+ /**
+ * 宸ヤ綅鏄惁婊℃灦鏌ヨ
+ *
+ * @return
+ */
List<DownWorkstation> queryWorkStationIsFull();
-
+ /**
+ * 鏍囩鎵撳嵃鏌ヨ
+ *
+ * @param downGlassInfo
+ * @return
+ */
+ List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo);
}
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
index 8df8e09..9468ed9 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
@@ -3,15 +3,15 @@
spring:
profiles:
- active: cz
+ active: dev
application:
name: unLoadGlass
mybatis-plus:
mapper-locations: classpath*:mapper/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+# configuration:
+# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mes:
maxWidth: 2500 #涓嬬墖鐨勬渶澶у搴�
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
index c633e7d..41072b0 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -90,4 +90,99 @@
</foreach>
ORDER BY T.RACKS_NUMBER DESC
</select>
+
+ <select id="selectFlowCard" resultType="java.util.Map">
+ select fc.order_number,
+ concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width,
+ od.quantity,
+ round(ogd.total_area, 2) as total_area,
+ od.perimeter,
+ od.bend_radius,
+ concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
+ od.other_columns,
+ round(ogd.child_width) as width,
+ round(ogd.child_height) as height,
+ pd.separation,
+ fc.technology_number
+ from pp.flow_card as fc
+ left join sd.order_glass_detail as ogd
+ on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
+ fc.technology_number = ogd.technology_number
+ left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.product_detail as pd
+ on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
+ where fc.process_id = #{processId}
+ and position(fc.technology_number in #{technologyNumber})
+ group by fc.process_id, fc.order_number, fc.technology_number
+ order by IF(sort != NULL || sort != '', sort, fc.order_number)
+
+ </select>
+
+ <select id="selectProject" resultType="java.util.Map">
+ select o.customer_name,
+ o.project,
+ (select process
+ from sd.order_glass_detail
+ where order_id = fc.order_id
+ and order_number = fc.order_number
+ and technology_number = fc.technology_number) as process,
+ od.edging_type,
+ (select glass_child
+ from sd.order_glass_detail
+ where order_id = fc.order_id
+ and order_number = fc.order_number
+ and technology_number = fc.technology_number) as glass_child,
+ od.product_name,
+ o.processing_note,
+ fc.process_id,
+ SUM(od.quantity) as quantity,
+ round(SUM(ogd.total_area), 2) as gross_area,
+ sum(od.weight) as weight,
+ 1 as technologyNumber,
+ concat(fc.process_id, '/', 1) as processIdNumber,
+ concat('瀵瑰簲鎴戝徃鍗曞彿', o.batch) AS otherRemarks
+ from pp.flow_card as fc
+ left join sd.order_glass_detail as ogd
+ on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
+ fc.technology_number = ogd.technology_number
+ left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.`order` as o on o.order_id = fc.order_id
+ left join sd.product as p on p.id = od.product_id
+ left join (select ogd.order_id,
+ ogd.order_number,
+ ogd.technology_number,
+ ogd.glass_child,
+ GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child
+ from sd.order_glass_detail as ogd
+ where ogd.order_id = left (#{processId}
+ , 10)
+ and position (ogd.technology_number in #{technologyNumber})
+ GROUP BY order_id, order_number) as ogdc
+ on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and
+ ogdc.technology_number = ogd.technology_number
+ where fc.process_id = #{processId}
+ and position(fc.technology_number in #{technologyNumber})
+ group by fc.process_id
+ </select>
+
+ <select id="downGlassLabelPrint" resultType="java.util.Map">
+ select a.flow_card_id,
+ a.layer,
+ a.width,
+ a.height,
+ a.filmsid,
+ a.thickness,
+ a.glass_type,
+ COUNT(*) AS quantity,
+ b.tempering_layout_id,
+ b.tempering_feed_sequence
+ from down_glass_info a
+ inner join glass_info b on a.glass_id = b.glass_id
+ where a.flow_card_id = #{processId}
+ and a.layer = #{technologyNumber}
+ group by a.flow_card_id, a.layer, a.width, a.height, a.filmsid, a.thickness, a.glass_type, a.id
+ order by a.id
+ </select>
+
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0