|
@@ -6,6 +6,7 @@ import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
|
|
|
import com.ruoyi.ams.config.domain.dto.LotattDTO;
|
|
|
import com.ruoyi.base.constant.Constant;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.redis.RedisCache;
|
|
|
import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
|
|
|
import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -25,6 +26,8 @@ public class AutoButtonBoxTask {
|
|
|
private IBusinessService businessService;
|
|
|
@Autowired
|
|
|
private AutoDoorClient autoDoorClient;
|
|
|
+ @Autowired
|
|
|
+ private RedisCache redisCache;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -36,9 +39,17 @@ public class AutoButtonBoxTask {
|
|
|
Boolean readBtn01 = buttonBoxClient.readBtn01();
|
|
|
Boolean readBtn02 = buttonBoxClient.readBtn02();
|
|
|
if (readBtn01) {
|
|
|
+ if (redisCache.getCacheObject("BUTTON_BOX_VALID") == null) {
|
|
|
+ log.error("按钮盒不在有效时间段内!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
buttonTask01();
|
|
|
}
|
|
|
if (readBtn02) {
|
|
|
+ if (redisCache.getCacheObject("BUTTON_BOX_VALID") == null) {
|
|
|
+ log.error("按钮盒不在有效时间段内!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
buttonTask02();
|
|
|
}
|
|
|
}
|
|
@@ -76,7 +87,7 @@ public class AutoButtonBoxTask {
|
|
|
buttonBoxClient.writeLamp01Death();
|
|
|
log.info("按钮1已经灭灯");
|
|
|
// 关闭墙外同时 打开墙里第二层自动门
|
|
|
- autoDoorClient.sendOpen(AutoDoorClient.AUTO_DOOR_NO.C);
|
|
|
+// autoDoorClient.sendOpen(AutoDoorClient.AUTO_DOOR_NO.C);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -112,6 +123,6 @@ public class AutoButtonBoxTask {
|
|
|
buttonBoxClient.writeLamp02Death();
|
|
|
log.info("按钮2已经灭灯");
|
|
|
// 关闭墙外同时 打开墙里第二层自动门
|
|
|
- autoDoorClient.sendOpen(AutoDoorClient.AUTO_DOOR_NO.C);
|
|
|
+// autoDoorClient.sendOpen(AutoDoorClient.AUTO_DOOR_NO.C);
|
|
|
}
|
|
|
}
|