From b89d56282fc88075f103de4ed38a65b25b54de60 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期日, 25 六月 2023 17:47:15 +0800
Subject: [PATCH] 解决资料馆的多项目+多类型查询时过滤数据不准确

---
 src/main/java/com/lf/server/controller/data/PublishController.java |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/data/PublishController.java b/src/main/java/com/lf/server/controller/data/PublishController.java
index 9ff5f52..b2ab5fb 100644
--- a/src/main/java/com/lf/server/controller/data/PublishController.java
+++ b/src/main/java/com/lf/server/controller/data/PublishController.java
@@ -77,12 +77,20 @@
         switch (type) {
             case "DOM":
                 return "type in ('tif', 'tiff', 'img')";
+            case "DEM":
+                return "type in ('tif', 'tiff')";
             case "MPT":
                 return "type = 'mpt'";
             case "3DML":
                 return "type = '3dml'";
+            case "CPT":
+                return "type = 'cpt'";
             case "BIM":
                 return "type in ('ifc', 'fbx', 'rvt')";
+            case "LAS":
+                return "type in ('las', 'laz')";
+            case "OSGB":
+                return "type = 'osgb'";
             default:
                 throw new Exception("鏁版嵁绫诲瀷涓嶅尮閰�");
         }
@@ -136,7 +144,7 @@
     @ApiImplicitParams({
             @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "PubEntity", paramType = "body")
     })
-    @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
+    @PostMapping(value = "/insertForPub", produces = "application/json; charset=UTF-8")
     public ResponseMsg<Object> insertForPub(@RequestBody PubEntity entity, HttpServletRequest req) {
         try {
             if (null == entity || null == entity.getIds() || entity.getIds().isEmpty()) {
@@ -168,11 +176,18 @@
         switch (type) {
             case "DOM":
                 return "/Convert/ToTiles";
+            case "DEM":
+                return "/Convert/ToTerra";
             case "MPT":
             case "3DML":
+            case "CPT":
                 return "/Convert/ToSG";
             case "BIM":
                 return "/Convert/ToTileset";
+            case "LAS":
+                return "/Convert/ToLas";
+            case "OSGB":
+                return "/Convert/ToOsgb";
             default:
                 throw new Exception("鏁版嵁绫诲瀷涓嶅尮閰�");
         }
@@ -184,13 +199,13 @@
             @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1")
     })
     @GetMapping(value = "/deletes")
-    public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) {
+    public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids, HttpServletRequest req) {
         try {
             if (ids == null || ids.isEmpty()) {
                 return fail("id鏁扮粍涓嶈兘涓虹┖", -1);
             }
 
-            int count = publishService.deletes(StringHelper.join(ids, ","));
+            int count = publishService.deletes(ids, req);
 
             return success(count);
         } catch (Exception ex) {

--
Gitblit v1.9.3