Ver Fonte

两亩恢复

gushoubang há 8 meses atrás
pai
commit
19ba18a11b

+ 2 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/vector/TableDataMapper.java

@@ -35,4 +35,6 @@ public interface TableDataMapper {
     void clearTable(@Param("tableName") String tableName);
 
     void delByColumns(@Param("tableName") String tableName, @Param("column") String column, @Param("values") List<String> values);
+
+    List<String> getTableNames(@Param("schema") String schema, @Param("startWith") String startWith);
 }

+ 2 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/ITableDateService.java

@@ -33,4 +33,6 @@ public interface ITableDateService {
     void delOutIds(String tableName, List<String> ids);
 
     void delByColumns(String tableName, String column, List<String> values);
+
+    List<String> getTableNames(String schema, String startWith);
 }

+ 8 - 8
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/FzssServiceImpl.java

@@ -211,14 +211,14 @@ public class FzssServiceImpl implements IFzssService {
         if (rawTable.equals("")) return RequestResult.error("区域筛选条件筛选未找到符合条件数据!", null);
 
         // 5.切割地块,面积筛选
-        // TODO 删除异常面积,临时方案
-        tableDateService.delByAreaAnd(rawTable, 0, 1500);
-        integer = tableDateService.getTableCount(rawTable);
-        if (integer == 0) {
-            iLogService.saveLog(taskId, "辅助选址", "计算完成,未找到符合用地性质条件数据", "info");
-            updateFzxzStatus(taskId, Rwzt.getNoRes());
-            return RequestResult.error("区域筛选条件筛选未找到符合条件数据!", null);
-        }
+        // // TODO 删除异常面积,临时方案
+        // tableDateService.delByAreaAnd(rawTable, 0, 1500);
+        // integer = tableDateService.getTableCount(rawTable);
+        // if (integer == 0) {
+        //     iLogService.saveLog(taskId, "辅助选址", "计算完成,未找到符合用地性质条件数据", "info");
+        //     updateFzxzStatus(taskId, Rwzt.getNoRes());
+        //     return RequestResult.error("区域筛选条件筛选未找到符合条件数据!", null);
+        // }
 
 
         List<Map<String, Object>> multLandList = new ArrayList<>();

+ 5 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/TableDateServiceImpl.java

@@ -82,6 +82,11 @@ public class TableDateServiceImpl implements ITableDateService {
         }
     }
 
+    @Override
+    public List<String> getTableNames(String schema, String startWith) {
+        return tableDataMapper.getTableNames(schema, startWith);
+    }
+
     @Override
     public void delByLandType(String temporaryTable, String rawTable, String landTypeCode) {
         tableDataMapper.delByLandType(temporaryTable, rawTable, landTypeCode);

+ 10 - 0
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/vector/TableDateMapper.xml

@@ -187,4 +187,14 @@
             tableIn.${column} = #{columnValue}
         </foreach>
     </delete>
+
+    <select id="getTableNames" resultType="String">
+        SELECT TABLE_NAME
+        FROM information_schema.tables
+        WHERE table_schema = #{schema}
+          AND TABLE_NAME LIKE '#{startWith}%';
+        SELECT table_name
+        FROM user_tables
+        WHERE table_name LIKE #{tableName}
+    </select>
 </mapper>