From 261698358e2b756a61e992bc1651e01b3f45290b Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 23 十月 2025 16:50:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 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