From 5029f0d42ec5ef0df87d34b97ac639f6e72586ca Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 24 十二月 2024 10:33:01 +0800
Subject: [PATCH] 1、中空/大理片笼前端推送数据改成格子号及数量,减少websocket向前端推送的数量
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java
index 204ef25..fcbc261 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java
@@ -492,7 +492,7 @@
.orderByDesc(EdgStorageDeviceTaskHistory::getCreateTime).last("limit 1"));
//濡傛灉浠诲姟绫诲瀷涓�1锛�3锛屽皢鍒囧壊瀹屾垚鐨勭幓鐠冭嚜鍔ㄦ姤宸�
if (Const.GLASS_CACHE_TYPE_IN_ALL.contains(taskHistory.getTaskType())) {
- damageService.autoSubmitReport(taskHistory.getGlassIdIn(), taskHistory.getDeviceId(),"鍒囧壊","杩涘崸鐞�");
+ damageService.autoSubmitReport(taskHistory.getGlassIdIn(), taskHistory.getDeviceId(),"鍒囧壊","杩涘崸鐞�",1);
}
updateCellRemainWidth(cell, device, taskHistory);
edgStorageDeviceTaskHistoryService.update(new LambdaUpdateWrapper<EdgStorageDeviceTaskHistory>()
@@ -535,10 +535,23 @@
.last("Limit 1");
GlassInfo swapGlassInfo = glassInfoService.getOne(queryWrapper);
if (swapGlassInfo != null && !glassInfo.getGlassId().equals(swapGlassInfo.getGlassId())) {
+
+ int patternSequence = glassInfo.getPatternSequence();
+ int xAxis = glassInfo.getXAxis();
+ int yAxis = glassInfo.getYAxis();
String swapGlassId = swapGlassInfo.getGlassId();
- log.info("灏嗙幓鐠儃}鍜岀幓鐠儃}锛屼俊鎭簰鎹�,杩涚幓鐠� {}", glassInfo, swapGlassInfo, swapGlassInfo);
+ int swapPatternSequence = swapGlassInfo.getPatternSequence();
+ int swapXAxis = swapGlassInfo.getXAxis();
+ int swapYAxis = swapGlassInfo.getYAxis();
swapGlassInfo.setGlassId(glassId);
+ swapGlassInfo.setPatternSequence(patternSequence);
+ swapGlassInfo.setXAxis(xAxis);
+ swapGlassInfo.setYAxis(yAxis);
glassInfo.setGlassId(swapGlassId);
+ glassInfo.setPatternSequence(swapPatternSequence);
+ glassInfo.setXAxis(swapXAxis);
+ glassInfo.setYAxis(swapYAxis);
+ log.info("灏嗙幓鐠儃}鍜岀幓鐠儃}锛屼俊鎭簰鎹�(鍘熺墖搴忓彿鍙婂潗鏍囬櫎澶�),杩涚幓鐠� {}", glassInfo, swapGlassInfo, swapGlassInfo);
glassInfoService.updateById(swapGlassInfo);
glassInfoService.updateById(glassInfo);
return swapGlassId;
--
Gitblit v1.8.0