Commit 1b136b63 authored by KeYong's avatar KeYong

修改配置

parent 74bd50c0
......@@ -56,10 +56,10 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
private static final String VALUE = "true";
// 停运本极对端换流器
private static final int stepIndex = 9;
// private static final int stepIndex = 9;
// 消防泵正常启动
private static final int pumpStepIndex = 7;
// private static final int pumpStepIndex = 7;
@Autowired
private IEquipmentFireEquipmentService equipmentFireEquipmentService;
......@@ -191,20 +191,20 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
String fireEquipId = String.valueOf(map.get("fireEquipId"));
List<Long> fireEquipments = new ArrayList<>();
// 若是停运本极对端换流器,则需查出本极对应的电力设备列表,暂用电力设备名称过滤出本极电力设备,注意此处的电力设备按照标准有两极(极I,极II)
if (stepIndex == index) {
Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId));
if (equipment.get() != null) {
String fireEquipNamePrefix = equipment.get().getName().substring(0, 2);
List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix);
String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]);
// 获取消防设备id列表
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings);
}
} else {
// if (stepIndex == index) {
// Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId));
// if (equipment.get() != null) {
// String fireEquipNamePrefix = equipment.get().getName().substring(0, 2);
// List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix);
// String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]);
// // 获取消防设备id列表
// fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings);
// }
// } else {
String[] fireEquipIds = new String[]{fireEquipId};
// 获取消防设备id列表
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(fireEquipIds);
}
// }
PlanStepJsonVO vo = result.stream().filter(x -> x.getIndex() == index).collect(Collectors.toList()).get(0);
List<ConditionVO> list = vo.getCondition();
......@@ -232,11 +232,11 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
planMessageDao.save(message);
}
}
if (pumpStepIndex == index) {
return 0 < resultSize;
} else {
// if (pumpStepIndex == index) {
// return 0 < resultSize;
// } else {
return (0 < resultSize && num == resultSize);
}
// }
} else {
return false;
}
......
......@@ -547,6 +547,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
// for (RoleModel roleModel : roleModelList) {
// roles.add(roleModel.getRoleName());
// }
if (null != roleModelList && roleModelList.size() == 0) {
return new Page<>();
}
if ("1".equals(String.valueOf(dataType))) {
// 根据当前用户预案角色、未执行动作 (dataType = 2 查询所有)
status = "1";
......@@ -581,6 +584,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
// 根据当前用户预案角色、未执行动作 (dataType = 2 查询所有)
status = "1";
}
if (null != roleModelList && roleModelList.size() == 0) {
return new ArrayList<>();
}
return contingencyInstanceInfoMapper.selectTaskActionList(type, status, roleModelList, batchNo);
}
......@@ -688,14 +694,14 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
JSONArray taskObjects = JSON.parseArray(planTask);
redisTemplate.opsForValue().set("planTask", taskObjects);
}
if (bool) {
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
Map<String, Object> map = new HashMap<>();
map.put("contingency", new ContingencyRo());
map.put("msgContext", Collections.EMPTY_MAP);
map.put("msgType", "refreshTaskRecord");
webMqttComponent.publish(topic, JSON.toJSONString(map));
}
// if (bool) {
// String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
// Map<String, Object> map = new HashMap<>();
// map.put("contingency", new ContingencyRo());
// map.put("msgContext", Collections.EMPTY_MAP);
// map.put("msgType", "refreshTaskRecord");
// webMqttComponent.publish(topic, JSON.toJSONString(map));
// }
return bool;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment