|
|
@@ -194,7 +194,7 @@ public class DeviceInfoListener {
|
|
|
*/
|
|
|
private void handleIntelligent(BusDeviceRunningEntity device, DeviceOperator deviceOperator, List<Supplier<?>> cacheOperation) {
|
|
|
if(DeviceTypeEnum.intelligent.equals(device.getType())
|
|
|
- &&null!=device.getWarnFlow()
|
|
|
+ &&null==device.getWarnFlow()
|
|
|
&& Boolean.FALSE.equals(device.isNewInfusion())){
|
|
|
BigDecimal lastContinueDose = deviceOperator.getContinueDose();
|
|
|
if(lastContinueDose==null){
|
|
|
@@ -202,8 +202,10 @@ public class DeviceInfoListener {
|
|
|
log.warn("设备【{}】流速在缓存中不存在",device.getContinueDose());
|
|
|
}else {
|
|
|
if(CompareUtil.compare(device.getContinueDose(),lastContinueDose)>0){
|
|
|
+ log.info("消息【{}】,设备【{}】加档",device.getMsgId(),device.getDeviceId());
|
|
|
device.setWarnFlow(FlowStatusEnum.Up);
|
|
|
}else if(CompareUtil.compare(device.getContinueDose(),lastContinueDose)<0){
|
|
|
+ log.info("消息【{}】,设备【{}】减档",device.getMsgId(),device.getDeviceId());
|
|
|
device.setWarnFlow(FlowStatusEnum.Down);
|
|
|
}else {
|
|
|
device.setWarnFlow(null);
|