Explorar o código

Merge branch 'release/V1.3.2.mx/test' of http://192.168.4.240:3000/LINK/LINK-SERVER into release/V2.0.0/test

liaoyitao hai 3 meses
pai
achega
364de4c74a

+ 15 - 0
src/main/java/com/lqkj/link/module/zone/controller/GeomInfoController.java

@@ -43,6 +43,8 @@ public class GeomInfoController {
43 43
         return geomInfoService.findAllByZoneId(zoneId);
44 44
     }
45 45
 
46
+
47
+
46 48
     @Operation(
47 49
             summary = "5.1.2.33 下载场景信息接口V2",
48 50
             description = "5.1.2.33 下载场景信息接口V2",
@@ -112,4 +114,17 @@ public class GeomInfoController {
112 114
     public MessageBean<String> uploadVideo(@RequestParam MultipartFile file) {
113 115
         return baseService.uploadVideo(file, "zone/video/");
114 116
     }
117
+
118
+
119
+    @Operation(
120
+            summary = "获取导航信息",
121
+            description = "获取导航信息",
122
+            parameters = {
123
+                    @Parameter(name = "zoneId", required = true, description = "作品/区域ID")
124
+            }
125
+    )
126
+    @GetMapping("/getNavigationInfo")
127
+    public List<GeomInfo> getNavigationInfo(@RequestParam Integer zoneId) {
128
+        return geomInfoService.getNavigationInfo(zoneId);
129
+    }
115 130
 }

+ 12 - 0
src/main/java/com/lqkj/link/module/zone/repository/GeomInfoRepository.java

@@ -77,4 +77,16 @@ public interface GeomInfoRepository extends JpaRepository<GeomInfo, String> {
77 77
     )
78 78
     void deleteAllByZoneId(Integer zoneId);
79 79
 
80
+    @Query(nativeQuery = true,
81
+        value = "SELECT *  " +
82
+                "FROM geom_info  " +
83
+                "WHERE zone_id = :zoneId AND navigation = 't' " +
84
+                "ORDER BY  " +
85
+                "    CASE  " +
86
+                "        WHEN geom_name ~ '^[\\u4e00-\\u9fa5]' THEN 0  " +
87
+                "        ELSE 1  " +
88
+                "    END, " +
89
+                "    geom_name;"
90
+    )
91
+    List<GeomInfo> getNavigationInfo(Integer zoneId);
80 92
 }

+ 4 - 0
src/main/java/com/lqkj/link/module/zone/service/GeomInfoService.java

@@ -78,4 +78,8 @@ public class GeomInfoService {
78 78
             layerInfoRepository.deleteAllByIdInBatch(infos.getDeleteLayerList());
79 79
         saveGeomByZone(infos);
80 80
     }
81
+
82
+    public List<GeomInfo> getNavigationInfo(Integer zoneId) {
83
+        return geomInfoRepository.getNavigationInfo(zoneId);
84
+    }
81 85
 }