冀北电网一张图相关接口
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
device.com_flag comFlag,
|
||||
1 as lineType,
|
||||
0 as type,
|
||||
lineDetail.Monitor_Flag as isUpToGrid
|
||||
lineDetail.monitor_flag as isUpToGrid
|
||||
</if>
|
||||
<!--母线-->
|
||||
<if test="type == 2">
|
||||
|
||||
@@ -67,6 +67,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
||||
DeptGetBase deptGetBase = new DeptGetBase();
|
||||
deptGetBase.setUnitId(it.getId());
|
||||
deptGetBase.setUnitName(it.getName());
|
||||
deptGetBase.setDeptLevel(getDeptLevel(it.getPids()));
|
||||
List<String> deptChildren = deptDTOList.stream().filter(deptDTO -> deptDTO.getPids().contains(it.getId())).map(DeptDTO::getId).collect(Collectors.toList());
|
||||
deptChildren.add(it.getId());
|
||||
deptGetBase.setUnitChildrenList(deptChildren);
|
||||
@@ -379,4 +380,9 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
||||
});
|
||||
}
|
||||
|
||||
private Integer getDeptLevel(String pids) {
|
||||
List<String> list = Arrays.stream(pids.split(",")).map(String::trim).collect(Collectors.toList());
|
||||
return list.size();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user