From 6facef85e36e9596a36bd85f3c822ceb3ed2ffe2 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期一, 29 七月 2024 15:47:09 +0800
Subject: [PATCH] 大理片笼进出片任务逻辑初次提交:调度功能生成
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcSlicecage.java | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 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..d0a78db 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,16 +32,17 @@
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);
@@ -57,6 +59,13 @@
//鐞嗙墖绗艰〃鏍间俊鎭�
jsonObject.append("bigStorageCageInfo", bigStorageCageService.querybigStorageCageDetailAll());
+ //閽㈠寲寮�鍏�
+ boolean temperingSwitch=false;
+ if(redisUtil.getCacheObject("temperingSwitch")==null){
+ temperingSwitch=redisUtil.getCacheObject("temperingSwitch");
+ }
+ jsonObject.append("temperingSwitch", temperingSwitch);
+
}
public void queryDataSource2() throws InterruptedException {
@@ -72,7 +81,6 @@
@Scheduled(fixedDelay = 1000)
public void plcStorageCageTask() throws InterruptedException {
jsonObject = new JSONObject();
- jsonObject1 = new JSONObject();
try {
//鏌ヨ浣跨敤鏁版嵁婧�1鏌ヨ鏁版嵁
queryDataSource1();
@@ -84,7 +92,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