|
@@ -55,17 +55,18 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
|
|
|
}
|
|
|
|
|
|
// 线路
|
|
|
- CameraTree.CameraTreeBuilder builder = CameraTree.builder()
|
|
|
+ CameraTree.CameraTreeBuilder builder = CameraTree.builder()
|
|
|
.code(o.getRailwayCode())
|
|
|
- .name(o.getLineNumber()+o.getRailwayName())
|
|
|
.railwayName(o.getRailwayName())
|
|
|
.flay(true)
|
|
|
.publicWorksSection(o.getPublicWorksSection())
|
|
|
.children(new ArrayList<>());
|
|
|
if (o.getLineNumber() != null && !o.getLineNumber().isEmpty()) {
|
|
|
builder.number(Integer.valueOf(o.getLineNumber()));
|
|
|
+ builder.name(o.getLineNumber()+o.getRailwayName());
|
|
|
+ }else {
|
|
|
+ builder.name(o.getRailwayName());
|
|
|
}
|
|
|
-
|
|
|
CameraTree build = builder.build();
|
|
|
if (!cameraTree.getChildren().stream()
|
|
|
.map(CameraTree::getCode)
|
|
@@ -74,17 +75,17 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
|
|
|
cameraTree.getChildren().add(build);
|
|
|
map.put(o.getRailwayCode(), build);
|
|
|
}
|
|
|
- //工务段
|
|
|
+ //工务段
|
|
|
CameraTree build3 = CameraTree.builder()
|
|
|
.code(o.getRailwayCode())
|
|
|
- .name(o.getLineNumber()+o.getRailwayName())
|
|
|
+ .name(o.getLineNumber() + o.getRailwayName())
|
|
|
.railwayName(o.getRailwayName())
|
|
|
.flay(true)
|
|
|
.publicWorksSection(o.getPublicWorksSection())
|
|
|
.children(new ArrayList<>())
|
|
|
.build();
|
|
|
if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode()))) {
|
|
|
- CameraTree cameraTree3=map.get(o.getRailwayCode()+"-"+o.getPublicWorksSection());
|
|
|
+ CameraTree cameraTree3 = map.get(o.getRailwayCode() + "-" + o.getPublicWorksSection());
|
|
|
if (ObjectUtils.isEmpty(cameraTree3)) {
|
|
|
map.put(o.getRailwayCode() + "-" + o.getPublicWorksSection(), build3);
|
|
|
map.get(o.getRailwayCode()).getChildren().add(build3);
|
|
@@ -101,11 +102,11 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
|
|
|
.mileage(o.getInstallMile())
|
|
|
.children(new ArrayList<>())
|
|
|
.build();
|
|
|
- if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode()+"-"+o.getPublicWorksSection()))) {
|
|
|
- CameraTree cameraTree1 = map.get(o.getRailwayCode()+"-"+o.getPublicWorksSection()+"-"+o.getInstallMile() + "-" + lineDirName);
|
|
|
+ if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode() + "-" + o.getPublicWorksSection()))) {
|
|
|
+ CameraTree cameraTree1 = map.get(o.getRailwayCode() + "-" + o.getPublicWorksSection() + "-" + o.getInstallMile() + "-" + lineDirName);
|
|
|
if (ObjectUtils.isEmpty(cameraTree1)) {
|
|
|
- map.put(o.getRailwayCode()+"-"+o.getPublicWorksSection()+"-"+o.getInstallMile() + "-" + lineDirName, build1);
|
|
|
- map.get(o.getRailwayCode()+"-"+o.getPublicWorksSection()).getChildren().add(build1);
|
|
|
+ map.put(o.getRailwayCode() + "-" + o.getPublicWorksSection() + "-" + o.getInstallMile() + "-" + lineDirName, build1);
|
|
|
+ map.get(o.getRailwayCode() + "-" + o.getPublicWorksSection()).getChildren().add(build1);
|
|
|
}
|
|
|
}
|
|
|
// 摄像头
|
|
@@ -116,8 +117,8 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
|
|
|
.publicWorksSection(o.getPublicWorksSection())
|
|
|
.children(new ArrayList<>())
|
|
|
.build();
|
|
|
- if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode()+"-"+o.getPublicWorksSection()+"-"+o.getInstallMile() + "-" + lineDirName))) {
|
|
|
- map.get(o.getRailwayCode()+"-"+o.getPublicWorksSection()+"-"+o.getInstallMile() + "-" + lineDirName).getChildren().add(build2);
|
|
|
+ if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode() + "-" + o.getPublicWorksSection() + "-" + o.getInstallMile() + "-" + lineDirName))) {
|
|
|
+ map.get(o.getRailwayCode() + "-" + o.getPublicWorksSection() + "-" + o.getInstallMile() + "-" + lineDirName).getChildren().add(build2);
|
|
|
}
|
|
|
}
|
|
|
}
|