|
|
@@ -1019,7 +1019,10 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
// 云盒传入数据如果没有落入传感器区间 有可能是之前预案关闭
|
|
|
|
|
|
|
|
|
-
|
|
|
+ //todo 这里判断火焰预案,就不继续往下执行了,锁死火焰预案
|
|
|
+ if(redisService.getCacheObject("subjectByHuoyan"+subFunction.getSubId())!=null){
|
|
|
+ return flag;
|
|
|
+ }
|
|
|
|
|
|
//将风险预案写入归属组级表里面
|
|
|
LabRiskPlanAbnormalGroup labRiskPlanAbnormalGroup = new LabRiskPlanAbnormalGroup();
|
|
|
@@ -1047,10 +1050,6 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
labRiskPlanLevel.setFloorId(labRiskPlan.getFloorId());
|
|
|
labRiskPlanLevel.setTopName(labRiskPlan.getTopName());
|
|
|
|
|
|
- //todo 这里判断火焰预案,就不继续往下执行了,锁死火焰预案
|
|
|
- if(redisService.getCacheObject("subjectByHuoyan"+subFunction.getSubId())!=null){
|
|
|
- return flag;
|
|
|
- }
|
|
|
|
|
|
//这里处理,如果是火焰预案,需要redis额外缓存
|
|
|
Optional.ofNullable(subFunction.getFunctionStatuses()).orElseGet(Collections::emptyList).stream().filter(a -> "huoyan".equals(a.getFunNum())).forEach(a -> {
|
|
|
@@ -1726,9 +1725,13 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
* @return 结果
|
|
|
*/
|
|
|
public LabRiskPlanLevel matchingRiskPlan(SubFunction<SensorFunctionStatus> subFunction) {
|
|
|
- LabRiskPlan newRiskPlan = null;
|
|
|
+ LabRiskPlanLevel labRiskPlanLevel = new LabRiskPlanLevel();
|
|
|
//实验室关联预案的所有传感器列表
|
|
|
List<LabRiskPlanSensorRelation> labRiskPlanSensorRelations = labRiskPlanSensorRelationMapper.selectSensorListBySubId(subFunction.getSubId());
|
|
|
+ if (labRiskPlanSensorRelations == null || labRiskPlanSensorRelations.size() == 0) {
|
|
|
+ log.info("实验室未绑定预案!");
|
|
|
+ return labRiskPlanLevel;
|
|
|
+ }
|
|
|
LinkedHashMap<Long, List<LabRiskPlanSensorRelation>> collect = Optional.ofNullable(labRiskPlanSensorRelations).orElseGet(Collections::emptyList).stream().collect(Collectors.groupingBy(LabRiskPlanSensorRelation::getRiskPlanLevelId, LinkedHashMap::new, Collectors.toList()));
|
|
|
List<Long> list = new ArrayList<>();
|
|
|
collect.forEach((key, value) -> {
|
|
|
@@ -1770,10 +1773,10 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
//根据预案级别查询预案信息
|
|
|
// LabRiskPlanLevel labRiskPlanLevel = labRiskPlanLevelService.getOne(new LambdaQueryWrapper<LabRiskPlanLevel>().in(LabRiskPlanLevel::getId, sb.substring(0, sb.length() - 1)).orderByDesc(LabRiskPlanLevel::getRiskPlanLevel).last(" limit 1"));
|
|
|
if(StringUtils.isNotBlank(sb.toString())){
|
|
|
- LabRiskPlanLevel labRiskPlanLevel = labRiskPlanLevelService.queryRiskPlanLevelByLevelIds(sb.substring(0, sb.length() - 1));
|
|
|
+ labRiskPlanLevel = labRiskPlanLevelService.queryRiskPlanLevelByLevelIds(sb.substring(0, sb.length() - 1));
|
|
|
return labRiskPlanLevel;
|
|
|
}
|
|
|
- return new LabRiskPlanLevel();
|
|
|
+ return labRiskPlanLevel;
|
|
|
|
|
|
// //预案列表循环
|
|
|
// int maxCount = 0;
|