Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
af199636f7
@ -56,13 +56,13 @@ public class HeartbeatCommand implements BaseCommand{
|
|||||||
}
|
}
|
||||||
//判断是不是风机
|
//判断是不是风机
|
||||||
String keyPLCDeviceStatus = String.format("RT:%d:iturbineoperationmode", deviceId);
|
String keyPLCDeviceStatus = String.format("RT:%d:iturbineoperationmode", deviceId);
|
||||||
String keyDeviceStatus = String.format("RT:%d:commfaultstate");
|
String keyCommFaultState = String.format("RT:%d:commfaultstate");
|
||||||
Integer plcDeviceStatus = adminRedisTemplate.get(keyPLCDeviceStatus);
|
Integer plcDeviceStatus = adminRedisTemplate.get(keyPLCDeviceStatus);
|
||||||
if (plcDeviceStatus == null){
|
if (plcDeviceStatus == null){
|
||||||
adminRedisTemplate.set(keyDeviceStatus, online ? 1 : 0);
|
adminRedisTemplate.set(keyCommFaultState, online ? 0 : 1);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
adminRedisTemplate.set(keyDeviceStatus, online && plcDeviceStatus == 1 ? 1 : 0);
|
adminRedisTemplate.set(keyCommFaultState, online && plcDeviceStatus != 0 ? 0 : 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user