|
@@ -186,7 +186,7 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
ArrayList <Integer[][]> oldList = flody(oldRelationalData);
|
|
ArrayList <Integer[][]> oldList = flody(oldRelationalData);
|
|
|
//计算楼层各个实验室的逃生线路
|
|
//计算楼层各个实验室的逃生线路
|
|
|
Map <String, Object> joinPointVOS = displayPath(list, newRelationalData, labExitLineEvacuationVo, oldList, oldRelationalData);
|
|
Map <String, Object> joinPointVOS = displayPath(list, newRelationalData, labExitLineEvacuationVo, oldList, oldRelationalData);
|
|
|
-
|
|
|
|
|
|
|
+ joinPointVOS.put("doorPointNames",labExitLineEvacuationVo.getDoorPointNames());
|
|
|
return joinPointVOS;
|
|
return joinPointVOS;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -194,9 +194,6 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
//todo 计算坏点(目前只有发生预案的实验室需要标记为坏点),需要把非坏点关联坏点点位全部改成无限大
|
|
//todo 计算坏点(目前只有发生预案的实验室需要标记为坏点),需要把非坏点关联坏点点位全部改成无限大
|
|
|
public void badPoints(List <LabExitLineJoinPointVO> newRelationalData, String badPointName) {
|
|
public void badPoints(List <LabExitLineJoinPointVO> newRelationalData, String badPointName) {
|
|
|
//这里计算预案发生的实验室坏点
|
|
//这里计算预案发生的实验室坏点
|
|
@@ -510,6 +507,57 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
logger.info("->" + linePointVOList.get(j).getPointName() + "##" + linePointVOList.get(j).getPointAttribute());
|
|
logger.info("->" + linePointVOList.get(j).getPointName() + "##" + linePointVOList.get(j).getPointAttribute());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public int openLight(LabExitPointRelay labExitPointRelay) {
|
|
|
|
|
+ List <LabExitPointRelay> labExitPointRelays = labExitPointRelayMapper.selectLabExitPointRelayList(labExitPointRelay);
|
|
|
|
|
+ //todo 开启继电器开关
|
|
|
|
|
+ Optional.ofNullable(labExitPointRelays).orElseGet(Collections::emptyList)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .forEach(a->{
|
|
|
|
|
+ try {
|
|
|
|
|
+ if(a.getRelayType().intValue()==1){
|
|
|
|
|
+ //这里打卡继电器的开关(老继电器)
|
|
|
|
|
+ socketService.sendCommand(Symbol.order.control, a.getRelayCode(), Symbol.command.open, a.getRelayBit());
|
|
|
|
|
+ Thread.sleep(timeWaitConfigUtils.getWaitTime());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //这里打卡继电器的开关(新继电器)
|
|
|
|
|
+ socketService.sendMqttCommand(a.getRelayCode(), Symbol.command.open ,a.getRelayBit()+"");
|
|
|
|
|
+ Thread.sleep(timeWaitConfigUtils.getWaitTime());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public int closeLight(LabExitPointRelay labExitPointRelay) {
|
|
|
|
|
+ List <LabExitPointRelay> labExitPointRelays = labExitPointRelayMapper.selectLabExitPointRelayList(labExitPointRelay);
|
|
|
|
|
+ //todo 开启继电器开关
|
|
|
|
|
+ Optional.ofNullable(labExitPointRelays).orElseGet(Collections::emptyList)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .forEach(a->{
|
|
|
|
|
+ try {
|
|
|
|
|
+ if(a.getRelayType().intValue()==1){
|
|
|
|
|
+ //这里打卡继电器的开关(老继电器)
|
|
|
|
|
+ socketService.sendCommand(Symbol.order.control, a.getRelayCode(), Symbol.command.close, a.getRelayBit());
|
|
|
|
|
+ Thread.sleep(timeWaitConfigUtils.getWaitTime());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //这里打卡继电器的开关(新继电器)
|
|
|
|
|
+ socketService.sendMqttCommand(a.getRelayCode(), Symbol.command.close ,a.getRelayBit()+"");
|
|
|
|
|
+ Thread.sleep(timeWaitConfigUtils.getWaitTime());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 新增逃生线路主
|
|
* 新增逃生线路主
|
|
|
*
|
|
*
|
|
@@ -647,6 +695,9 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
.stream()
|
|
.stream()
|
|
|
.filter(b->a.getSubId().longValue()==b.getId())
|
|
.filter(b->a.getSubId().longValue()==b.getId())
|
|
|
.forEach(b->{
|
|
.forEach(b->{
|
|
|
|
|
+ if(b.getAdminId().longValue()==SecurityUtils.getUserId().longValue()){
|
|
|
|
|
+ a.setLoginAdmin(true);
|
|
|
|
|
+ }
|
|
|
a.setSubName(b.getName());
|
|
a.setSubName(b.getName());
|
|
|
}));
|
|
}));
|
|
|
//实验室下的在线人员
|
|
//实验室下的在线人员
|