From c1cb663f4308ddf02ee6ea435c809c8162585b03 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 01 八月 2024 16:38:25 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcSlicecage.java | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcSlicecage.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcSlicecage.java
index 95616b3..c6587ca 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcSlicecage.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcSlicecage.java
@@ -5,6 +5,7 @@
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
import com.mes.common.S7object;
+import com.mes.common.utils.RedisUtil;
import com.mes.device.PlcParameterObject;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.temperingglass.service.TemperingGlassInfoService;
@@ -31,23 +32,24 @@
private BigStorageCageDetailsService bigStorageCageDetailsService;
@Resource
private TemperingGlassInfoService temperingGlassInfoService;
+ @Resource
+ private RedisUtil redisUtil;
private JSONObject jsonObject = new JSONObject();
- private JSONObject jsonObject1 = new JSONObject();
public void queryDataSource1() throws InterruptedException {
List<Double> carPostion=new ArrayList<>();
carPostion.add(0.25);
carPostion.add(0.5);
jsonObject.append("carPostion",carPostion);
//鐣岄潰灞曠ず绗煎瓙淇℃伅
- jsonObject1.append("bigStorageCageInfos", bigStorageCageService.querybigStorageCageDetail());
+ jsonObject.append("bigStorageCageInfos", bigStorageCageService.querybigStorageCageDetail());
//杩涚墖浠诲姟鏁版嵁
- List<BigStorageCageDetails> bigStorageCageDetailsFeedTask=bigStorageCageDetailsService.selectTask(1);
+ List<BigStorageCageDetails> bigStorageCageDetailsFeedTask=bigStorageCageDetailsService.selectFeedTask();
jsonObject.append("bigStorageCageDetailsFeedTask", bigStorageCageDetailsFeedTask);
//鍑虹墖浠诲姟鏁版嵁
- List<BigStorageCageDetails> bigStorageCageDetailsOutTask=bigStorageCageDetailsService.selectTask(2);
+ List<BigStorageCageDetails> bigStorageCageDetailsOutTask=bigStorageCageDetailsService.selectOutTask();
jsonObject.append("bigStorageCageDetailsOutTask", bigStorageCageDetailsOutTask);
//鐞嗙墖绗间娇鐢ㄦ儏鍐�
@@ -56,6 +58,15 @@
//鐞嗙墖绗艰〃鏍间俊鎭�
jsonObject.append("bigStorageCageInfo", bigStorageCageService.querybigStorageCageDetailAll());
+
+ //閽㈠寲寮�鍏�
+ boolean temperingSwitch=false;
+ if(redisUtil.getCacheObject("temperingSwitch")==null){
+ redisUtil.setCacheObject("temperingSwitch", false);
+ }else{
+ temperingSwitch=redisUtil.getCacheObject("temperingSwitch");
+ }
+ jsonObject.append("temperingSwitch", temperingSwitch);
}
@@ -72,7 +83,6 @@
@Scheduled(fixedDelay = 1000)
public void plcStorageCageTask() throws InterruptedException {
jsonObject = new JSONObject();
- jsonObject1 = new JSONObject();
try {
//鏌ヨ浣跨敤鏁版嵁婧�1鏌ヨ鏁版嵁
queryDataSource1();
@@ -84,7 +94,6 @@
for (WebSocketServer webserver : sendwServer) {
if (webserver != null) {
webserver.sendMessage(jsonObject.toString());
- webserver.sendMessage(jsonObject1.toString());
List<String> messages = webserver.getMessages();
if (!messages.isEmpty()) {
// // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
--
Gitblit v1.8.0