|
@@ -279,7 +279,11 @@ public class BasePigpenServiceImpl extends ServiceImpl<BasePigpenDao, BasePigpen
|
|
|
deviceTempEntityQueryWrapper.orderByDesc("id");
|
|
|
deviceTempEntityQueryWrapper.last("limit 1");
|
|
|
DeviceTempEntity deviceTempEntity = deviceTempDao.selectOne(deviceTempEntityQueryWrapper);
|
|
|
- basePigpenEntity.setPigpenTemp( deviceTempEntity.getTempValue());
|
|
|
+ Double tempValue = deviceTempEntity.getTempValue();
|
|
|
+ basePigpenEntity.setPigpenTemp( tempValue );
|
|
|
+ if (tempValue > 35.0||tempValue<10.0){
|
|
|
+ basePigpenEntity.setTempAnomaly(0);
|
|
|
+ }
|
|
|
baseMapper.updateById(basePigpenEntity);
|
|
|
}
|
|
|
|