From 2022682967ad0b0d1cd6e2e86f8fb628478d4e9c Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 11 十月 2025 12:00:03 +0800
Subject: [PATCH] 1、 上片界面/钢化前大理片笼数据推送接口,供第一次进入界面调用
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
index 82720c8..91c11e4 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
@@ -83,9 +83,9 @@
private static final String ALARM_CODE_SIZE = "sizeSame";
private static final String ALARM_CODE_ID = "idSame";
- private JSONObject jsonObject = new JSONObject();
- public void queryDataSource1() throws Exception {
+ public JSONObject queryDataSource1() throws Exception {
+ JSONObject jsonObject = new JSONObject();
jsonObject.append("alarmInfo", productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>()
.eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW)
.eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE)
@@ -248,10 +248,11 @@
//褰撳墠鎸囧畾宸ョ▼
jsonObject.append("temperingEngineerId", redisUtil.getCacheObject("temperingEngineerId"));
-
+ return jsonObject;
}
public void queryDataSource2() throws InterruptedException {
+ JSONObject jsonObject = new JSONObject();
//鍑虹墖闃熷垪
List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.list(
new LambdaQueryWrapper<TemperingGlassInfo>()
@@ -267,9 +268,8 @@
*/
@Scheduled(fixedDelay = 3000)
public void plcStorageCageTask() throws Exception {
- jsonObject = new JSONObject();
//鏌ヨ浣跨敤鏁版嵁婧�1鏌ヨ鏁版嵁
- queryDataSource1();
+ JSONObject jsonObject = queryDataSource1();
//鏌ヨ浣跨敤鏁版嵁婧�2鏌ヨ鏁版嵁
// queryDataSource2();
webSocketUtils.sendToWeb("slicecage", jsonObject);
--
Gitblit v1.8.0