Browse Source

railwayCode类型修改

gao.qiang 1 year ago
parent
commit
e192ca8ccc

+ 1 - 1
business-service/src/main/java/com/ozs/service/entity/vo/BaseCameraManagementDto.java

@@ -52,6 +52,6 @@ public class BaseCameraManagementDto extends BaseEntity implements Serializable
      * 线路编码(四位数字)
      */
     @Excel(name = "线路编码")
-    private Long railwayCode;
+    private String railwayCode;
     
 }

+ 4 - 4
business-service/src/main/java/com/ozs/service/service/impl/BaseDeviceDynamicManagementServiceImpl.java

@@ -44,7 +44,7 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
             for (BaseCameraManagementDto o : list) {
                 // 线路
                 CameraTree build = CameraTree.builder()
-                        .code(o.getRailwayCode().toString())
+                        .code(o.getRailwayCode())
                         .name(o.getRailwayName())
                         .flay(true)
                         .children(new ArrayList<>())
@@ -55,7 +55,7 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
                         .collect(Collectors.toList())
                         .contains(build.getCode())) {
                     cameraTree.getChildren().add(build);
-                    map.put(o.getRailwayCode().toString(), build);
+                    map.put(o.getRailwayCode(), build);
                 }
 
                 // 里程
@@ -67,11 +67,11 @@ public class BaseDeviceDynamicManagementServiceImpl extends ServiceImpl<BaseDevi
                         .build();
 
 
-                if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode().toString()))) {
+                if (!ObjectUtils.isEmpty(map.get(o.getRailwayCode()))) {
                     CameraTree cameraTree1 = map.get(o.getInstallMile() + "-" + (o.getLineDir().equals("1") ? "上行" : "下行"));
                     if (ObjectUtils.isEmpty(cameraTree1)) {
                         map.put(o.getInstallMile() + "-" + (o.getLineDir().equals("1") ? "上行" : "下行"), build1);
-                        map.get(o.getRailwayCode().toString()).getChildren().add(build1);
+                        map.get(o.getRailwayCode()).getChildren().add(build1);
                     }
                 }