Commit 1b136b63 authored by KeYong's avatar KeYong

修改配置

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