Pārlūkot izejas kodu

提交spotoverlap微服务模块代码(套合分析数据库从SpatiaLite换成PostgreSQL)

wanger 1 gadu atpakaļ
vecāks
revīzija
577cfb1483
100 mainītis faili ar 7797 papildinājumiem un 3 dzēšanām
  1. 1 1
      onemap-modules/onemap-overlap/src/main/java/com/onemap/overlap/utils/GeoServer.java
  2. 1 1
      onemap-modules/onemap-overlap/src/main/java/com/onemap/overlap/utils/WebViewExample.java
  3. 1 1
      onemap-modules/onemap-overlap/src/main/resources/application.yml
  4. 0 0
      onemap-modules/onemap-overlap/src/main/resources/static/static/js/app.fb70ee3c.js
  5. 281 0
      onemap-modules/onemap-spotoverlap/pom.xml
  6. 25 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/OneMapSpotOverlapApplication.java
  7. 18 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/config/CorsConfig.java
  8. 28 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/config/ResourcesConfig.java
  9. 442 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/controller/yzt/YztController.java
  10. 41 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/analyseModel.java
  11. 23 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/featureGeom.java
  12. 23 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/hfxjg.java
  13. 144 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tAnalyseVector.java
  14. 90 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tBaseVector.java
  15. 61 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tBasemap.java
  16. 52 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tGeoserver.java
  17. 34 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tMapConfig.java
  18. 61 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tModel.java
  19. 68 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/yswfDto.java
  20. 15 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TAnalyseVectorMapper.java
  21. 14 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TBaseVectorMapper.java
  22. 14 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TBasemapMapper.java
  23. 14 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TGeoServerMapper.java
  24. 14 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TMapConfigMapper.java
  25. 14 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TModelMapper.java
  26. 54 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/YztMapper.java
  27. 1032 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/service/impl/yzt/YztServiceImpl.java
  28. 69 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/service/yzt/IYztService.java
  29. 289 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/AchievementPackage.java
  30. 12 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/CustomUtils.java
  31. 72 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/DozerUtils.java
  32. 45 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ExcelExport.java
  33. 68 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/FileToZipDownload.java
  34. 43 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/FixedThreadUtil.java
  35. 173 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/GeoServer.java
  36. 180 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/HttpClientUtil.java
  37. 93 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/MappedBiggerFileReader.java
  38. 101 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/Md5Utils.java
  39. 15 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/PublicTool.java
  40. 520 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/RInterfaceUtil.java
  41. 206 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ShpToPostGISWithReproject.java
  42. 197 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ShpToSpatiaLite.java
  43. 76 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/SpatiaLiteToShapefile.java
  44. 21 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/SpatialiteUtils.java
  45. 81 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/UnPackageUtils.java
  46. 117 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/WordExport.java
  47. 175 0
      onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ZipDownload.java
  48. 8 0
      onemap-modules/onemap-spotoverlap/src/main/resources/banner.txt
  49. 42 0
      onemap-modules/onemap-spotoverlap/src/main/resources/bootstrap.yml
  50. 74 0
      onemap-modules/onemap-spotoverlap/src/main/resources/logback.xml
  51. 17 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/cggl/CgglMapper.xml
  52. 69 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/cggl/EscalationImpMapper.xml
  53. 449 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/cggl/EscalationMapper.xml
  54. 21 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/config/CfgDbMapper.xml
  55. 20 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCgglGhbgMapper.xml
  56. 21 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCgglGhbgsxMapper.xml
  57. 9 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCtfxYzMapper.xml
  58. 17 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCzjsbsyqMapper.xml
  59. 17 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCzjssyqMapper.xml
  60. 25 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TDictYsdmMapper.xml
  61. 44 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TDysczczgmMapper.xml
  62. 53 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TDyskczgdgmMapper.xml
  63. 22 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TGhwbMapper.xml
  64. 26 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TNyscsyxpjMapper.xml
  65. 23 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TSgtjMapper.xml
  66. 20 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TStbhzyxpjMapper.xml
  67. 60 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TSysczczgmMapper.xml
  68. 60 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TSyskczgdgmMapper.xml
  69. 45 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fzss/FzxzMapper.xml
  70. 109 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fzss/HgxfxMapper.xml
  71. 160 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/ghss/ZbmxJcyjMapper.xml
  72. 13 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesAnswerMapper.xml
  73. 92 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesListMapper.xml
  74. 13 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesOptionAnsMapper.xml
  75. 48 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesOptionMapper.xml
  76. 96 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesQuestionMapper.xml
  77. 13 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesShortAnsMapper.xml
  78. 14 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesSortAnsMapper.xml
  79. 26 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/sbjk/XzxzghcgsbMapper.xml
  80. 36 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExamgctaskMapper.xml
  81. 10 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExammodelMapper.xml
  82. 39 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExammodeldicMapper.xml
  83. 34 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExamruleMapper.xml
  84. 26 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExamtaskMapper.xml
  85. 15 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/PlanningAppendixMapper.xml
  86. 18 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/PlanningListMapper.xml
  87. 18 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TCfgSettingMapper.xml
  88. 106 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwGkgsMapper.xml
  89. 115 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwGzjdMapper.xml
  90. 18 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwWzlbMapper.xml
  91. 131 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwXwzxMapper.xml
  92. 66 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwYjzxMapper.xml
  93. 15 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGhcgAppendixMapper.xml
  94. 89 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGhcgMapper.xml
  95. 28 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGkgsMapper.xml
  96. 18 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGsxxAppendixDao.xml
  97. 45 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGsxxDao.xml
  98. 70 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwXwzxMapper.xml
  99. 13 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwYztAppendixMapper.xml
  100. 43 0
      onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwYztMapper.xml

+ 1 - 1
onemap-modules/onemap-overlap/src/main/java/com/onemap/overlap/utils/GeoServer.java

@@ -26,7 +26,7 @@ public class GeoServer {
 
     public static void main(String[] args) {
         try {
-            List<String> styles = getStyles("http://127.0.0.1:28085/geoserver", "admin", "geoserver", "spot");
+            List<String> styles = getStyles("http://192.168.60.52:28085/geoserver", "admin", "geoserver", "spot");
             System.out.println(styles);
         } catch (IOException e) {
             e.printStackTrace();

+ 1 - 1
onemap-modules/onemap-overlap/src/main/java/com/onemap/overlap/utils/WebViewExample.java

@@ -14,7 +14,7 @@ public class WebViewExample extends Application {
         // 创建 WebView
         WebView webView = new WebView();
         // 加载 Web 页面
-        webView.getEngine().load("http://127.0.0.1:8080");
+        webView.getEngine().load("http://192.168.60.52:8080");
 
         // 布局
         StackPane root = new StackPane();

+ 1 - 1
onemap-modules/onemap-overlap/src/main/resources/application.yml

@@ -16,7 +16,7 @@ spring:
 # tomcat配置
 server:
   port: 9206
-  host: http://127.0.0.1
+  host: http://192.168.60.52
 # swagger配置
 swagger:
   title: 系统模块接口文档

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
onemap-modules/onemap-overlap/src/main/resources/static/static/js/app.fb70ee3c.js


+ 281 - 0
onemap-modules/onemap-spotoverlap/pom.xml

@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>onemap-modules</artifactId>
+        <groupId>com.onemap</groupId>
+        <version>3.6.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>onemap-modules-spotoverlap</artifactId>
+
+    <properties>
+        <org.geotools.version>24.0</org.geotools.version>
+        <org.postgresql.version>42.3.6</org.postgresql.version>
+    </properties>
+
+    <dependencies>
+
+        <!-- SpringCloud Alibaba Nacos -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+
+        <!-- SpringCloud Alibaba Nacos Config -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+
+        <!-- SpringCloud Alibaba Sentinel -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
+        </dependency>
+
+        <!-- SpringBoot Actuator -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+
+        <!-- Swagger UI -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.fox.version}</version>
+        </dependency>
+
+        <!-- Mysql Connector -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!-- RuoYi Common DataSource -->
+        <dependency>
+            <groupId>com.onemap</groupId>
+            <artifactId>onemap-common-datasource</artifactId>
+        </dependency>
+
+        <!-- RuoYi Common DataScope -->
+        <dependency>
+            <groupId>com.onemap</groupId>
+            <artifactId>onemap-common-datascope</artifactId>
+        </dependency>
+
+        <!-- RuoYi Common Log -->
+        <dependency>
+            <groupId>com.onemap</groupId>
+            <artifactId>onemap-common-log</artifactId>
+        </dependency>
+
+        <!-- RuoYi Common Swagger -->
+        <dependency>
+            <groupId>com.onemap</groupId>
+            <artifactId>onemap-common-swagger</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>1.10.5</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+            <version>4.5.6</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>31.1-jre</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-mock</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.7.13</version>
+        </dependency>
+        <!-- 解压rar -->
+        <dependency>
+            <groupId>com.github.junrar</groupId>
+            <artifactId>junrar</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <!--zip4j依赖,解压zip压缩-->
+        <dependency>
+            <groupId>net.lingala.zip4j</groupId>
+            <artifactId>zip4j</artifactId>
+            <version>1.3.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-main</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-cql</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools.jdbc</groupId>
+            <artifactId>gt-jdbc-postgis</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-coverage</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-render</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-opengis</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-referencing</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-geojson</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-geotiff</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-swing</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-shapefile</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-tile-client</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-epsg-hsql</artifactId>
+            <version>${org.geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.locationtech.jts</groupId>
+            <artifactId>jts-core</artifactId>
+            <version>1.19.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.media</groupId>
+            <artifactId>jai-core</artifactId>
+            <version>1.1.3</version> <!-- 或者最新版本 -->
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.13</version> <!-- 版本可以根据需要调整 -->
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4.13</version> <!-- 版本可以根据需要调整 -->
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-core-asl</artifactId>
+            <version>1.9.13</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.8.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.xerial</groupId>
+            <artifactId>sqlite-jdbc</artifactId>
+            <version>3.47.1.0</version>
+        </dependency>
+    </dependencies>
+
+    <repositories>
+        <repository>
+            <id>osgeo</id>
+            <name>OSGeo Release Repository</name>
+            <url>https://repo.osgeo.org/repository/release/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+        <repository>
+            <id>osgeo-snapshot</id>
+            <name>OSGeo Snapshot Repository</name>
+            <url>https://repo.osgeo.org/repository/snapshot/</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.6.2</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 25 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/OneMapSpotOverlapApplication.java

@@ -0,0 +1,25 @@
+package com.onemap.spotoverlap;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import com.onemap.common.security.annotation.EnableCustomConfig;
+import com.onemap.common.security.annotation.EnableRyFeignClients;
+import com.onemap.common.swagger.annotation.EnableCustomSwagger2;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * 一张图应用模块
+ *
+ * @author siwei
+ */
+@EnableScheduling
+@EnableCustomConfig
+@EnableCustomSwagger2
+@EnableRyFeignClients
+@SpringBootApplication
+public class OneMapSpotOverlapApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(OneMapSpotOverlapApplication.class, args);
+        System.out.println("(♥◠‿◠)ノ゙  套合分析模块启动成功   ლ(´ڡ`ლ)゙ ");
+    }
+}

+ 18 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/config/CorsConfig.java

@@ -0,0 +1,18 @@
+package com.onemap.spotoverlap.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class CorsConfig implements WebMvcConfigurer {
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**") // 对所有路径应用跨域配置
+                .allowedOrigins("*") // 允许任何域进行跨域访问
+                .allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的请求方法
+                .allowedHeaders("*") // 允许的请求头
+        ;
+    }
+}

+ 28 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/config/ResourcesConfig.java

@@ -0,0 +1,28 @@
+package com.onemap.spotoverlap.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+import java.io.File;
+
+/**
+ * 通用映射配置
+ *
+ * @author onemap
+ */
+@Component
+public class ResourcesConfig implements WebMvcConfigurer {
+
+    @Value("${file.temp}")
+    String tempfilepath;
+    @Value("${file.proxy}")
+    String proxypath;
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler(proxypath + "/**")
+                .addResourceLocations("file:" + tempfilepath + File.separator);
+    }
+}

+ 442 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/controller/yzt/YztController.java

@@ -0,0 +1,442 @@
+package com.onemap.spotoverlap.controller.yzt;
+
+import com.onemap.spotoverlap.service.yzt.IYztService;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.RequestResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@RestController
+@RequestMapping("/yzt")
+public class YztController extends BaseController {
+
+    @Autowired
+    private IYztService yztService;
+    
+
+    /**
+     * 上传数据包
+     *
+     * @param file 前端传入的zip压缩包
+     * @return
+     */
+    @PostMapping("/upload")
+    public RequestResult upload(MultipartFile file) {
+        try {
+            return yztService.upload(file);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 导入数据 file/path 二选一 入库到spatialite
+     *
+     * @param file 前端传入的zip压缩包
+     * @param path 前端选择的shp文件的位置
+     * @return
+     */
+    @PostMapping("/import")
+    public RequestResult importIn(MultipartFile file, String path, String type, String name, String ufield, String style) {
+        try {
+            return yztService.importIn(file, path, type, name, ufield, style);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取shp文件字段集合
+     *
+     * @param path 前端选择的shp文件的位置
+     * @return
+     */
+    @PostMapping("/getShpFields")
+    public RequestResult getShpFields(String path) {
+        try {
+            return yztService.getShpFields(path);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 查询模型列表
+     *
+     * @return
+     */
+    @RequestMapping("/modellist")
+    public RequestResult modellist() {
+        try {
+            return yztService.modellist();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 查询模型列表
+     *
+     * @return
+     */
+    @RequestMapping("/modeldetails")
+    public RequestResult modeldetails(String modelname) {
+        try {
+            return yztService.modeldetails(modelname);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 删除分析模型
+     *
+     * @return
+     */
+    @RequestMapping("/modeldelete")
+    public RequestResult modeldelete(String modelname) {
+        try {
+            return yztService.modeldelete(modelname);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 修改或新增模型
+     *
+     * @return
+     */
+    @RequestMapping("/modelupdate")
+    public RequestResult modelupdate(HttpServletRequest request, HttpServletResponse response) {
+        try {
+            return yztService.modelupdate(request);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 查询所有管控数据
+     *
+     * @return
+     */
+    @RequestMapping("/basevector")
+    public RequestResult basevector() {
+        try {
+            return yztService.basevector();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 删除指定管控数据
+     *
+     * @return
+     */
+    @RequestMapping("/basevectordelete")
+    public RequestResult basevectordelete(String tablename) {
+        try {
+            return yztService.basevectordelete(tablename);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 查询所有分析图斑数据列表
+     *
+     * @return
+     */
+    @RequestMapping("/analysevector")
+    public RequestResult analysevector(String name) {
+        try {
+            return yztService.analysevector(name);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 删除指定分析套合数据
+     *
+     * @return
+     */
+    @RequestMapping("/analysevectordelete")
+    public RequestResult analysevectordelete(String tablename) {
+        try {
+            return yztService.analysevectordelete(tablename);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    @GetMapping("/{tiftype}/{tableid}/{uuid}.{filetype}")
+    public ResponseEntity<InputStreamResource> getTiff(@PathVariable("tiftype") String tiftype, @PathVariable("tableid") String tableid, @PathVariable("uuid") String uuid, @PathVariable("filetype") String filetype) {
+        return yztService.getTiff(tiftype, tableid, uuid, filetype);
+    }
+
+    /**
+     * 查询图斑前后时相影像地址
+     *
+     * @return
+     */
+    @RequestMapping("/getImageUrls")
+    public RequestResult getImageUrls(String tableid, String uuid) {
+        try {
+            return yztService.getImageUrls(tableid, uuid);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取空间表的全量空间数据
+     *
+     * @return
+     */
+    @RequestMapping("/getTableGeoms")
+    public RequestResult getTableGeoms(String tablename, String swid) {
+        try {
+            return yztService.getTableGeoms(tablename, swid);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 根据swid获取空间表的属性信息
+     *
+     * @return
+     */
+    @RequestMapping("/getFeatureBySwid")
+    public RequestResult getFeatureBySwid(String tablename, String swid) {
+        try {
+            return yztService.getFeatureBySwid(tablename, swid);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 根据swid获取空间表的属性信息
+     *
+     * @return
+     */
+    @RequestMapping("/getTableRecord")
+    public RequestResult getTableRecord(String tablename, Integer page, Integer limit, String swid, String hfxpd) {
+        try {
+            return yztService.getTableRecord(tablename, page, limit, swid, hfxpd);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取地图配置
+     *
+     * @return
+     */
+    @RequestMapping("/getMapConfig")
+    public RequestResult getMapConfig(String key) {
+        try {
+            return yztService.getMapConfig(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取地图服务器信息
+     *
+     * @return
+     */
+    @RequestMapping("/getServerConfig")
+    public RequestResult getServerConfig(String key) {
+        try {
+            return yztService.getServerConfig(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取地图样式集合
+     *
+     * @return
+     */
+    @RequestMapping("/getGeoServerStyles")
+    public RequestResult getGeoServerStyles() {
+        try {
+            return yztService.getGeoServerStyles();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 修改地图配置
+     *
+     * @return
+     */
+    @RequestMapping("/updateMapConfig")
+    public RequestResult updateMapConfig(HttpServletRequest request, HttpServletResponse response) {
+        try {
+            return yztService.updateMapConfig(request);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 修改地图服务器信息
+     *
+     * @return
+     */
+    @RequestMapping("/updateServerConfig")
+    public RequestResult updateServerConfig(HttpServletRequest request, HttpServletResponse response) {
+        try {
+            return yztService.updateServerConfig(request);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 执行套合分析
+     *
+     * @return
+     */
+    @RequestMapping("/overlapAnalysis")
+    public RequestResult overlapAnalysis(String modelname, String tablename) {
+        try {
+            return yztService.overlapAnalysis(modelname, tablename);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 导出分析报告
+     *
+     * @return
+     */
+    @RequestMapping("/exportReport")
+    public void exportReport(String modelname, String tablename, String layername, HttpServletRequest request, HttpServletResponse response) {
+        try {
+            yztService.exportReport(modelname, tablename, layername, request, response);
+        } catch (Exception e) {
+            e.printStackTrace();
+//            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 生成套合分析成果包
+     *
+     * @return
+     */
+    @RequestMapping("/exportAchievementPackage")
+    public void exportAchievementPackage(String tablename, String layername, HttpServletRequest request, HttpServletResponse response) {
+        try {
+            yztService.exportAchievementPackage(tablename, layername, request, response);
+        } catch (Exception e) {
+            e.printStackTrace();
+//            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取分析结果--制作统计图
+     *
+     * @return
+     */
+    @RequestMapping("/getAnalyseResult")
+    public RequestResult getAnalyseResult(String tablename) {
+        try {
+            return yztService.getAnalyseResult(tablename);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 新增底图配置
+     *
+     * @param file
+     * @param name
+     * @param invalid
+     * @param serviceuri
+     * @return
+     */
+    @PostMapping("/basemap")
+    public RequestResult basemap(MultipartFile file, String name, String invalid, String serviceuri, String id, String image, String indexnum) {
+        try {
+            return yztService.basemap(file, name, invalid, serviceuri, id, image, indexnum);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 获取底图配置
+     *
+     * @param name
+     * @return
+     */
+    @GetMapping("/basemap")
+    public RequestResult getbasemap(String name, String invalid) {
+        try {
+            return yztService.getbasemap(name, invalid);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+
+    /**
+     * 删除底图配置
+     *
+     * @param id
+     * @return
+     */
+    @DeleteMapping("/basemap")
+    public RequestResult deletebasemap(String id) {
+        try {
+            return yztService.deletebasemap(id);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.error("失败", null);
+        }
+    }
+}

+ 41 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/analyseModel.java

@@ -0,0 +1,41 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+//当前分析图斑数据的最后一次分析模型中的管控数据列表
+public class analyseModel {
+    private String type;
+    private String layername;
+    private String tablename;
+    private String servicename;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getLayername() {
+        return layername;
+    }
+
+    public void setLayername(String layername) {
+        this.layername = layername;
+    }
+
+    public String getTablename() {
+        return tablename;
+    }
+
+    public void setTablename(String tablename) {
+        this.tablename = tablename;
+    }
+
+    public String getServicename() {
+        return servicename;
+    }
+
+    public void setServicename(String servicename) {
+        this.servicename = servicename;
+    }
+}

+ 23 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/featureGeom.java

@@ -0,0 +1,23 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+//要素信息和空间信息
+public class featureGeom {
+    private String swid;
+    private String geom;
+
+    public String getSwid() {
+        return swid;
+    }
+
+    public void setSwid(String swid) {
+        this.swid = swid;
+    }
+
+    public String getGeom() {
+        return geom;
+    }
+
+    public void setGeom(String geom) {
+        this.geom = geom;
+    }
+}

+ 23 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/hfxjg.java

@@ -0,0 +1,23 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+//分析结果查询类
+public class hfxjg {
+    private String type;
+    private Integer count;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+}

+ 144 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tAnalyseVector.java

@@ -0,0 +1,144 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("t_analyse_vector")
+public class tAnalyseVector {
+    private String id;
+    private String layername;
+    private String tablename;
+    private Date inserttime;
+    private String path;
+    private String ufield;
+    private String fxzt;
+    private Date fxkssj;
+    private Date fxjssj;
+    private String fxrz;
+    private String fxmodel;
+    private String serviceuri;
+    private String servicetype;
+    private String servicename;
+    private String serviceproj;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getLayername() {
+        return layername;
+    }
+
+    public void setLayername(String layername) {
+        this.layername = layername;
+    }
+
+    public String getTablename() {
+        return tablename;
+    }
+
+    public void setTablename(String tablename) {
+        this.tablename = tablename;
+    }
+
+    public Date getInserttime() {
+        return inserttime;
+    }
+
+    public void setInserttime(Date inserttime) {
+        this.inserttime = inserttime;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public String getUfield() {
+        return ufield;
+    }
+
+    public void setUfield(String ufield) {
+        this.ufield = ufield;
+    }
+
+    public String getFxzt() {
+        return fxzt;
+    }
+
+    public void setFxzt(String fxzt) {
+        this.fxzt = fxzt;
+    }
+
+    public Date getFxkssj() {
+        return fxkssj;
+    }
+
+    public void setFxkssj(Date fxkssj) {
+        this.fxkssj = fxkssj;
+    }
+
+    public Date getFxjssj() {
+        return fxjssj;
+    }
+
+    public void setFxjssj(Date fxjssj) {
+        this.fxjssj = fxjssj;
+    }
+
+    public String getFxrz() {
+        return fxrz;
+    }
+
+    public void setFxrz(String fxrz) {
+        this.fxrz = fxrz;
+    }
+
+    public String getFxmodel() {
+        return fxmodel;
+    }
+
+    public void setFxmodel(String fxmodel) {
+        this.fxmodel = fxmodel;
+    }
+
+    public String getServiceuri() {
+        return serviceuri;
+    }
+
+    public void setServiceuri(String serviceuri) {
+        this.serviceuri = serviceuri;
+    }
+
+    public String getServicetype() {
+        return servicetype;
+    }
+
+    public void setServicetype(String servicetype) {
+        this.servicetype = servicetype;
+    }
+
+    public String getServicename() {
+        return servicename;
+    }
+
+    public void setServicename(String servicename) {
+        this.servicename = servicename;
+    }
+
+    public String getServiceproj() {
+        return serviceproj;
+    }
+
+    public void setServiceproj(String serviceproj) {
+        this.serviceproj = serviceproj;
+    }
+}

+ 90 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tBaseVector.java

@@ -0,0 +1,90 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("t_base_vector")
+public class tBaseVector {
+    private String id;
+    private String layername;
+    private String tablename;
+    private String geometry;
+    private String serviceuri;
+    private String servicetype;
+    private String servicename;
+    private String serviceproj;
+    private Date inserttime;
+
+    public Date getInserttime() {
+        return inserttime;
+    }
+
+    public void setInserttime(Date inserttime) {
+        this.inserttime = inserttime;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getLayername() {
+        return layername;
+    }
+
+    public void setLayername(String layername) {
+        this.layername = layername;
+    }
+
+    public String getTablename() {
+        return tablename;
+    }
+
+    public void setTablename(String tablename) {
+        this.tablename = tablename;
+    }
+
+    public String getGeometry() {
+        return geometry;
+    }
+
+    public void setGeometry(String geometry) {
+        this.geometry = geometry;
+    }
+
+    public String getServiceuri() {
+        return serviceuri;
+    }
+
+    public void setServiceuri(String serviceuri) {
+        this.serviceuri = serviceuri;
+    }
+
+    public String getServicetype() {
+        return servicetype;
+    }
+
+    public void setServicetype(String servicetype) {
+        this.servicetype = servicetype;
+    }
+
+    public String getServicename() {
+        return servicename;
+    }
+
+    public void setServicename(String servicename) {
+        this.servicename = servicename;
+    }
+
+    public String getServiceproj() {
+        return serviceproj;
+    }
+
+    public void setServiceproj(String serviceproj) {
+        this.serviceproj = serviceproj;
+    }
+}

+ 61 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tBasemap.java

@@ -0,0 +1,61 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_basemap")
+public class tBasemap {
+    private String id;
+    private String image;
+    private String name;
+    private String invalid;
+    private String serviceuri;
+    private String indexnum;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getImage() {
+        return image;
+    }
+
+    public void setImage(String image) {
+        this.image = image;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getInvalid() {
+        return invalid;
+    }
+
+    public void setInvalid(String invalid) {
+        this.invalid = invalid;
+    }
+
+    public String getServiceuri() {
+        return serviceuri;
+    }
+
+    public void setServiceuri(String serviceuri) {
+        this.serviceuri = serviceuri;
+    }
+
+    public String getIndexnum() {
+        return indexnum;
+    }
+
+    public void setIndexnum(String indexnum) {
+        this.indexnum = indexnum;
+    }
+}

+ 52 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tGeoserver.java

@@ -0,0 +1,52 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_geoserver")
+public class tGeoserver {
+    private String id;
+    private String uri;
+    private String username;
+    private String password;
+    private String workspace;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUri() {
+        return uri;
+    }
+
+    public void setUri(String uri) {
+        this.uri = uri;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getWorkspace() {
+        return workspace;
+    }
+
+    public void setWorkspace(String workspace) {
+        this.workspace = workspace;
+    }
+}

+ 34 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tMapConfig.java

@@ -0,0 +1,34 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_map_config")
+public class tMapConfig {
+    private String id;
+    private String name;
+    private String value;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 61 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/tModel.java

@@ -0,0 +1,61 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_model")
+public class tModel {
+    private String id;
+    private String layername;
+    private String type;
+    private String index;
+    private String isvalid;
+    private String modelname;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getLayername() {
+        return layername;
+    }
+
+    public void setLayername(String layername) {
+        this.layername = layername;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getIndex() {
+        return index;
+    }
+
+    public void setIndex(String index) {
+        this.index = index;
+    }
+
+    public String getIsvalid() {
+        return isvalid;
+    }
+
+    public void setIsvalid(String isvalid) {
+        this.isvalid = isvalid;
+    }
+
+    public String getModelname() {
+        return modelname;
+    }
+
+    public void setModelname(String modelname) {
+        this.modelname = modelname;
+    }
+}

+ 68 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/domain/yzt/yswfDto.java

@@ -0,0 +1,68 @@
+package com.onemap.spotoverlap.domain.yzt;
+
+//疑似违法信息查询
+public class yswfDto {
+    private String swids;
+    private String swid;
+    private Double xmin;
+    private Double xmax;
+    private Double ymin;
+    private Double ymax;
+    private String servicename;
+
+    public String getSwids() {
+        return swids;
+    }
+
+    public void setSwids(String swids) {
+        this.swids = swids;
+    }
+
+    public String getSwid() {
+        return swid;
+    }
+
+    public void setSwid(String swid) {
+        this.swid = swid;
+    }
+
+    public Double getXmin() {
+        return xmin;
+    }
+
+    public void setXmin(Double xmin) {
+        this.xmin = xmin;
+    }
+
+    public Double getXmax() {
+        return xmax;
+    }
+
+    public void setXmax(Double xmax) {
+        this.xmax = xmax;
+    }
+
+    public Double getYmin() {
+        return ymin;
+    }
+
+    public void setYmin(Double ymin) {
+        this.ymin = ymin;
+    }
+
+    public Double getYmax() {
+        return ymax;
+    }
+
+    public void setYmax(Double ymax) {
+        this.ymax = ymax;
+    }
+
+    public String getServicename() {
+        return servicename;
+    }
+
+    public void setServicename(String servicename) {
+        this.servicename = servicename;
+    }
+}

+ 15 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TAnalyseVectorMapper.java

@@ -0,0 +1,15 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.spotoverlap.domain.yzt.tAnalyseVector;
+import com.onemap.spotoverlap.domain.yzt.tModel;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface TAnalyseVectorMapper extends BaseMapper<tAnalyseVector> {
+
+
+}

+ 14 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TBaseVectorMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.spotoverlap.domain.yzt.tBaseVector;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface TBaseVectorMapper extends BaseMapper<tBaseVector> {
+
+
+}

+ 14 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TBasemapMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.spotoverlap.domain.yzt.tBasemap;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface TBasemapMapper extends BaseMapper<tBasemap> {
+
+
+}

+ 14 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TGeoServerMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.spotoverlap.domain.yzt.tGeoserver;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface TGeoServerMapper extends BaseMapper<tGeoserver> {
+
+
+}

+ 14 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TMapConfigMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.spotoverlap.domain.yzt.tMapConfig;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface TMapConfigMapper extends BaseMapper<tMapConfig> {
+
+
+}

+ 14 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/TModelMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.spotoverlap.domain.yzt.tModel;
+
+/**
+ * 数据层
+ *
+ * @author onemap
+ */
+public interface TModelMapper extends BaseMapper<tModel> {
+
+
+}

+ 54 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/mapper/yzt/YztMapper.java

@@ -0,0 +1,54 @@
+package com.onemap.spotoverlap.mapper.yzt;
+
+import com.onemap.spotoverlap.domain.yzt.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 资源目录 数据层
+ *
+ * @author onemap
+ */
+@Mapper
+public interface YztMapper {
+
+    Integer getTheGeomCount(@Param("dbschema") String dbschema, @Param("tablename") String tablename);
+
+    void updateGeomField(String tablename);
+
+    void createTableGeomIndex(@Param("tablename") String tablename, @Param("indexname") String indexname);
+
+    List<Map<String, Object>> executeSQL(String sql);
+
+    List<featureGeom> selectFeatureGeom(@Param("tablename") String tablename, @Param("swid") String swid);
+
+    List<hfxjg> getHfxpd(String tablename);
+
+    List<hfxjg> getHfxsm(String tablename);
+
+    List<String> getTableField(@Param("dbschema") String dbschema, @Param("tablename") String tablename);
+
+    List<Map<String, Object>> getTableDetailJoinGeomstr(@Param("fields") String fields, @Param("tablename") String tablename);
+
+    List<Map<String, Object>> getTableYswfDetailJoinGeomstr(@Param("fields") String fields, @Param("tablename") String tablename);
+
+    List<Map<String, Object>> getTableDetail(@Param("fields") String fields, @Param("tablename") String tablename);
+
+    List<Map<String, Object>> getTableDetailBySwids(@Param("fields") String fields, @Param("tablename") String tablename, @Param("swids") String swids);
+
+    List<analyseModel> getAnalyseModel(String tablename);
+
+    List<yswfDto> getYswfList(String tablename);
+
+    String getLayerNameByTableName(String tablename);
+
+    void executeAnalyse(@Param("tablename") String tablename,
+                        @Param("analyseTablename") String analyseTablename,
+                        @Param("analyseLayername") String analyseLayername,
+                        @Param("decimalPlaces") String decimalPlaces,
+                        @Param("querywhere") String querywhere
+    );
+}

+ 1032 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/service/impl/yzt/YztServiceImpl.java

@@ -0,0 +1,1032 @@
+package com.onemap.spotoverlap.service.impl.yzt;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.utils.UnPackageUtils;
+import com.onemap.spotoverlap.domain.yzt.*;
+import com.onemap.spotoverlap.mapper.yzt.*;
+import com.onemap.spotoverlap.mapper.yzt.YztMapper;
+import com.onemap.spotoverlap.service.yzt.IYztService;
+import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.common.security.utils.SecurityUtils;
+import com.onemap.spotoverlap.utils.*;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.Statement;
+import java.util.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+@Service
+public class YztServiceImpl implements IYztService {
+
+    @Autowired
+    private TAnalyseVectorMapper tAnalyseVectorMapper;
+    @Autowired
+    private TBasemapMapper tBasemapMapper;
+    @Autowired
+    private TBaseVectorMapper tBaseVectorMapper;
+    @Autowired
+    private TGeoServerMapper tGeoServerMapper;
+    @Autowired
+    private TMapConfigMapper tMapConfigMapper;
+    @Autowired
+    private TModelMapper tModelMapper;
+    @Autowired
+    private YztMapper yztMapper;
+
+    @Value("${decimalPlaces}")
+    private String decimalPlaces;
+    @Value("${dbschema}")
+    private String dbschema;
+    @Value("${file.temp}")
+    String localFilePath;
+    @Value("${file.proxy}")
+    String localFileProxy;
+    @Value("${server.port}")
+    String serverport;
+    @Value("${server.host}")
+    String serverhost;
+    @Value("${file.wkid}")
+    Integer shpWkid;
+    @Value("${file.prefix}")
+    String prefix;
+    @Value("${image.qsx}")
+    String qsx;
+    @Value("${image.hsx}")
+    String hsx;
+    @Value("${qgis}")
+    String qgis;
+    @Value("${swid}")
+    String swid;
+    @Value("${swarea}")
+    String swarea;
+    @Value("${exportFields}")
+    String exportFields;
+    @Value("${mapExport.fixed}")
+    String mapExportFixed;
+    @Value("${mapExport.size}")
+    Integer mapExportSize;
+    @Value("${checkedstyle}")
+    String checkedstyle;
+    @Value("${spotstyle}")
+    String spotstyle;
+    @Value("${charset}")
+    String charset;
+
+    @Override
+    public RequestResult upload(MultipartFile file) {
+        if (file == null) {
+            return RequestResult.error("未上传文件!");
+        }
+        String currentTime = CustomUtils.getCurrentTime();
+        String currentPath = localFilePath + "/" + currentTime + "/";
+        String username = SecurityUtils.getUsername();
+        if (StringUtils.isEmpty(username)) {
+            username = "admin";
+        }
+        String shpPath = "";
+        String fileName = file.getOriginalFilename();
+        String filetype = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+        String filename = fileName.replace(filetype, "").replace(".", "");
+        if (!filetype.equals("zip") && !filetype.equals("rar")) {
+            return RequestResult.error("请上传zip/rar压缩包文件", null);
+        }
+        String filepath = currentPath + "" + fileName;
+        File dest = new File(filepath);
+        File dir = dest.getParentFile();
+        if (!dir.exists()) {
+            dir.mkdirs();
+        }
+        String unzippath = currentPath;
+        try {
+            file.transferTo(dest);
+            if (filetype.equals("zip")) {
+                new UnPackageUtils().unPackZip(dest, unzippath);
+            } else {
+                new UnPackageUtils().unPackRar(dest, unzippath);
+            }
+            File[] files = new File(unzippath).listFiles();
+            for (File file1 : files) {
+                if (file1.getAbsolutePath().substring(file1.getAbsolutePath().lastIndexOf(".") + 1).equals("shp")) {
+                    shpPath = file1.getAbsolutePath();
+                    shpPath = shpPath.replaceAll("\\\\", "/");
+                    break;
+                }
+            }
+            if (!"".equals(shpPath)) {
+
+            } else {
+                return RequestResult.error("未检索到shp文件");
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+            return RequestResult.error(e.getMessage());
+        }
+        return RequestResult.success("上传成功", shpPath);
+    }
+
+    @Override
+    public RequestResult importIn(MultipartFile file, String path, String type, String name, String ufield, String style) {
+        if (StringUtils.isEmpty(style)) {
+            style = spotstyle;
+        }
+        if (file == null && path == null) {
+            return RequestResult.error("参数未传递", null);
+        }
+        String currentTime = CustomUtils.getCurrentTime();
+        String currentPath = localFilePath + "/" + currentTime + "/";
+        String username = SecurityUtils.getUsername();
+        if (StringUtils.isEmpty(username)) {
+            username = "admin";
+        }
+        String shpPath = path;
+        if (StringUtils.isEmpty(shpPath)) {
+            String fileName = file.getOriginalFilename();
+            String filetype = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+            String filename = fileName.replace(filetype, "").replace(".", "");
+            if (!filetype.equals("zip") && !filetype.equals("rar")) {
+                return RequestResult.error("请上传zip/rar压缩包文件", null);
+            }
+            String filepath = currentPath + "" + fileName;
+            File dest = new File(filepath);
+            File dir = dest.getParentFile();
+            if (!dir.exists()) {
+                dir.mkdirs();
+            }
+            String unzippath = currentPath;
+            try {
+                file.transferTo(dest);
+                if (filetype.equals("zip")) {
+                    new UnPackageUtils().unPackZip(dest, unzippath);
+                } else {
+                    new UnPackageUtils().unPackRar(dest, unzippath);
+                }
+                File[] files = new File(unzippath).listFiles();
+                for (File file1 : files) {
+                    if (file1.getAbsolutePath().substring(file1.getAbsolutePath().lastIndexOf(".") + 1).equals("shp")) {
+                        shpPath = file1.getAbsolutePath();
+                        shpPath = shpPath.replaceAll("\\\\", "/");
+                        break;
+                    }
+                }
+                if (!"".equals(shpPath)) {
+
+                } else {
+                    return RequestResult.error("未检索到shp文件");
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+                return RequestResult.error(e.getMessage());
+            }
+        }
+        String tablename = "";
+        String folderpath = "";
+        if (StringUtils.isEmpty(shpPath)) {
+            return RequestResult.error("未检索到shp文件!");
+        } else {
+            File currentfile = new File(shpPath);
+            String fileName = currentfile.getName();
+            folderpath = currentfile.getParentFile().getAbsolutePath();
+            String filetype = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+            String filename = fileName.replace(filetype, "").replace(".", "");
+            tablename = prefix + filename + "_" + currentTime;
+            try {
+                //TODO wanger 第一步:指定坐标系将本地shp文件导入到postgis
+                ShpToPostGISWithReproject.importShpToPostGISWithReproject(shpPath, tablename, "EPSG:" + shpWkid, false);
+                //TODO wanger 第二步:指定的空间数据库表的geom字段
+                Integer count = yztMapper.getTheGeomCount(dbschema, tablename);
+                if (count > 0) {
+                    yztMapper.updateGeomField(tablename);
+                }
+                //TODO wanger 第三步:创建空间索引
+                yztMapper.createTableGeomIndex(tablename, String.format("idx_%s_geom", tablename));
+            } catch (Exception e) {
+                e.printStackTrace();
+                return RequestResult.error("shp数据入库失败!");
+            }
+        }
+        try {
+            //TODO wanger 增加swid字段
+            String swidSql = "ALTER TABLE " + tablename + " ADD COLUMN " + swid + " TEXT";
+            yztMapper.executeSQL(swidSql);
+            swidSql = "UPDATE " + tablename + " set " + swid + " = \"" + ufield + "\"";
+            yztMapper.executeSQL(swidSql);
+            //TODO wanger 增加swarea字段
+            String swareaSql = "ALTER TABLE " + tablename + " ADD COLUMN " + swarea + "  TEXT";
+            yztMapper.executeSQL(swareaSql);
+            swareaSql = "UPDATE " + tablename + " set " + swarea + " = round(cast(st_area(geom) as numeric), " + decimalPlaces + ")";
+            yztMapper.executeSQL(swareaSql);
+            //TODO wanger 发布到geoserver
+            File shp = new File(shpPath);
+            String fileName = shp.getName();
+            int dotIndex = fileName.lastIndexOf('.');
+            String datasource = dotIndex != -1 ? fileName.substring(0, dotIndex) : fileName;
+            tGeoserver geoserverconfig = tGeoServerMapper.selectOne(null);
+            String geoserverurl = geoserverconfig.getUri();
+            String geoserverusername = geoserverconfig.getUsername();
+            String geoserverpassword = geoserverconfig.getPassword();
+            String geoserverworkspace = geoserverconfig.getWorkspace();
+            GeoServer.publishShp(geoserverurl, geoserverusername, geoserverpassword, geoserverworkspace, shpPath, style, datasource, charset);
+            String layerurl = geoserverurl + "/" + geoserverworkspace + "/wms";
+            String layername = geoserverworkspace + ":" + datasource;
+            String epsg = GeoServer.getShpEPSG(shpPath);
+            String uuid = StringUtils.getUUID();
+            if ("base".equals(type)) {//管控数据
+                tBaseVector baseVector = new tBaseVector();
+                baseVector.setId(uuid);
+                baseVector.setInserttime(new Date());
+                baseVector.setLayername(name);
+                baseVector.setTablename(tablename);
+                baseVector.setServiceuri(layerurl);
+                baseVector.setServicetype("WMS");
+                baseVector.setServicename(layername);
+                baseVector.setServiceproj(epsg);
+                tBaseVectorMapper.insert(baseVector);
+            } else if ("analyse".equals(type)) {//分析图斑
+                tAnalyseVector analyseVector = new tAnalyseVector();
+                analyseVector.setId(uuid);
+                analyseVector.setLayername(name);
+                analyseVector.setInserttime(new Date());
+                analyseVector.setTablename(tablename);
+                analyseVector.setPath(folderpath);
+                analyseVector.setServiceuri(layerurl);
+                analyseVector.setServicetype("WMS");
+                analyseVector.setServicename(layername);
+                analyseVector.setServiceproj(epsg);
+                analyseVector.setUfield(ufield);
+                tAnalyseVectorMapper.insert(analyseVector);
+            }
+        } catch (Exception w) {
+            w.printStackTrace();
+            return RequestResult.error("数据库表处理异常!");
+        }
+        Map<String, Object> result = new HashMap<>();
+        result.put("tablename", tablename);
+        result.put("path", shpPath);
+        return RequestResult.success("上传成功", result);
+    }
+
+    @Override
+    public RequestResult modellist() {
+        try {
+            QueryWrapper<tModel> wrapper = new QueryWrapper();
+            wrapper.select("distinct modelname");
+            List<tModel> models = tModelMapper.selectList(wrapper);
+            List<String> res = new ArrayList<String>();
+            for (tModel model : models) {
+                res.add(model.getModelname());
+            }
+            return RequestResult.success("查询成功!", res);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    /**
+     * 查询模型详情
+     *
+     * @param modelname
+     * @return
+     */
+    @Override
+    public RequestResult modeldetails(String modelname) {
+        try {
+            QueryWrapper<tModel> wrapper = new QueryWrapper();
+            wrapper.eq("modelname", modelname);
+            List<tModel> models = tModelMapper.selectList(wrapper);
+            return RequestResult.success("查询成功!", models);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    /**
+     * 查询模型详情
+     *
+     * @param modelname
+     * @return
+     */
+    @Override
+    public RequestResult modeldelete(String modelname) {
+        try {
+            QueryWrapper<tModel> wrapper = new QueryWrapper();
+            wrapper.eq("modelname", modelname);
+            tModelMapper.delete(wrapper);
+            return RequestResult.success("删除成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("删除失败!", null);
+    }
+
+    @Override
+    public RequestResult modelupdate(HttpServletRequest request) {
+        try {
+            JSONObject parameters = (JSONObject) new JSONParser().parse(request.getReader());
+            String modelname = (String) parameters.get("modelname");
+            JSONArray details = (JSONArray) parameters.get("details");
+            QueryWrapper<tModel> wrapper = new QueryWrapper();
+            wrapper.eq("modelname", modelname);
+            tModelMapper.delete(wrapper);
+            for (int i = 0; i < details.size(); i++) {
+                JSONObject curObj = (JSONObject) details.get(i);
+                String layername = (String) curObj.get("layername");
+                String isvalid = (String) curObj.get("isvalid");
+                String type = (String) curObj.get("type");
+                tModel model = new tModel();
+                model.setId(StringUtils.getUUID());
+                model.setLayername(layername);
+                model.setType(type);
+                model.setIndex(String.valueOf(i));
+                model.setIsvalid(isvalid);
+                model.setModelname(modelname);
+                tModelMapper.insert(model);
+            }
+            return RequestResult.success("修改成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("失败!", null);
+    }
+
+    @Override
+    public RequestResult basevectordelete(String tablename) {
+        try {
+            //TODO wanger 删除主表
+            String deleteSQL = "delete from t_base_vector where tablename = '" + tablename + "'";
+            yztMapper.executeSQL(deleteSQL);
+            //TODO wanger 删除模型分析因子项
+            deleteSQL = "delete from t_model where layername = (select layername from t_base_vector where tablename = '" + tablename + "')";
+            yztMapper.executeSQL(deleteSQL);
+            //TODO wanger 删除矢量表
+            deleteSQL = "drop table " + tablename + "";
+            yztMapper.executeSQL(deleteSQL);
+            return RequestResult.success("删除成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("失败!", null);
+    }
+
+    @Override
+    public RequestResult analysevectordelete(String tablename) {
+        try {
+            //TODO wanger 删除主表
+            String deleteSQL = "delete from t_analyse_vector where tablename = '" + tablename + "'";
+            yztMapper.executeSQL(deleteSQL);
+            //TODO wanger 删除矢量表
+            deleteSQL = "drop table " + tablename + "";
+            yztMapper.executeSQL(deleteSQL);
+            return RequestResult.success("删除成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("失败!", null);
+    }
+
+    @Override
+    public RequestResult getShpFields(String path) {
+        List<String> fields = ShpToSpatiaLite.getShpFields(path, charset);
+        return RequestResult.success("查询成功", fields);
+    }
+
+    @Override
+    public ResponseEntity<InputStreamResource> getTiff(String tiftype, String tableid, String uuid, String filetype) {
+        Connection connection = null;
+        String folderpath = "";
+        try {
+            QueryWrapper<tAnalyseVector> wrapper = new QueryWrapper();
+            wrapper.eq("id", tableid);
+            tAnalyseVector analyseVector = tAnalyseVectorMapper.selectOne(wrapper);
+            folderpath = analyseVector.getPath();
+            connection.close();
+            if (StringUtils.isEmpty(folderpath)) {
+                return null;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        String filepath = folderpath + "\\" + tiftype + "\\" + uuid + tiftype + "." + filetype;
+        File file = new File(filepath); // 文件路径
+        InputStream tiffInputStream = null;
+        try {
+            tiffInputStream = new FileInputStream(file);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+        HttpHeaders headers = new HttpHeaders();
+        if ("tif".equals(filetype)) {
+            headers.add(HttpHeaders.CONTENT_TYPE, "image/tiff");
+        } else if ("png".equals(filetype)) {
+            headers.add(HttpHeaders.CONTENT_TYPE, "image/png");
+        }
+        headers.add(HttpHeaders.CONTENT_LENGTH, String.valueOf(file.length()));
+        headers.add(HttpHeaders.CONTENT_DISPOSITION, "inline; filename=image.tif");
+        return ResponseEntity.status(HttpStatus.PARTIAL_CONTENT)
+                .headers(headers)
+                .body(new InputStreamResource(tiffInputStream));
+    }
+
+    @Override
+    public RequestResult getImageUrls(String tableid, String uuid) {
+        String qsxfilepath = localFilePath + "\\" + tableid + "\\" + uuid + qsx + ".tif";
+        File file = new File(qsxfilepath);
+        if (!file.exists()) {
+            try {
+                String directoryPath = localFilePath + "\\" + tableid;
+                File directory = new File(directoryPath);
+                if (!directory.exists()) {
+                    boolean result = directory.mkdirs();
+                    if (result) {
+                        System.out.println("目录创建成功:" + directoryPath);
+                    } else {
+                        System.out.println("目录创建失败:" + directoryPath);
+                    }
+                } else {
+                    System.out.println("目录已存在:" + directoryPath);
+                }
+                String folderpath = "";
+                QueryWrapper<tAnalyseVector> wrapper = new QueryWrapper();
+                wrapper.eq("id", tableid);
+                tAnalyseVector analyseVector = tAnalyseVectorMapper.selectOne(wrapper);
+                folderpath = analyseVector.getPath();
+                if (StringUtils.isEmpty(folderpath)) {
+                    return null;
+                }
+                //TODO wanger  前时相
+                Path qsxpath = Paths.get(folderpath + "\\" + qsx + "\\" + uuid + qsx + ".tif");
+                Path qsxtarget = Paths.get(qsxfilepath);
+                Files.copy(qsxpath, qsxtarget, StandardCopyOption.REPLACE_EXISTING);
+                //TODO wanger  后时相
+                Path hsxpath = Paths.get(folderpath + "\\" + hsx + "\\" + uuid + hsx + ".tif");
+                Path hsxtarget = Paths.get(localFilePath + "\\" + tableid + "\\" + uuid + hsx + ".tif");
+                Files.copy(hsxpath, hsxtarget, StandardCopyOption.REPLACE_EXISTING);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        Map res = new HashMap();
+        res.put("qsx", serverhost + ":" + serverport + "/" + localFileProxy + "/" + tableid + "/" + uuid + qsx + ".tif");
+        res.put("hsx", serverhost + ":" + serverport + "/" + localFileProxy + "/" + tableid + "/" + uuid + hsx + ".tif");
+        return RequestResult.success("查询成功!", res);
+    }
+
+    @Override
+    public RequestResult getTableGeoms(String tablename, String swid) {
+        try {
+            List<featureGeom> featureGeoms = yztMapper.selectFeatureGeom(tablename, swid);
+            QueryWrapper<tAnalyseVector> wrapper = new QueryWrapper();
+            wrapper.eq("tablename", tablename);
+            tAnalyseVector dto = tAnalyseVectorMapper.selectOne(wrapper);
+            Map<String, Object> result = new HashMap<>();
+            result.put("geom", featureGeoms);
+            result.put("proj", dto.getServiceproj());
+            return RequestResult.success("查询成功!", result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult getFeatureBySwid(String tablename, String swid) {
+        try {
+            String querySQL = "select * from  " + tablename + " where swid = '" + swid + "'";
+            List<Map<String, Object>> results = yztMapper.executeSQL(querySQL);
+            List<Map> res = new ArrayList<Map>();
+            for (Map<String, Object> thisdata : results) {
+                Map cur = new HashMap();
+                for (Map.Entry<String, Object> entry : thisdata.entrySet()) {
+                    String key = entry.getKey();
+                    if (!"geom".equals(key)) {
+                        cur.put(key, entry.getValue());
+                    }
+                }
+                res.add(cur);
+            }
+            return RequestResult.success("查询成功!", res);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult getTableRecord(String tablename, Integer page, Integer limit, String swid, String hfxpd) {
+        try {
+            String wheresql = "";
+            if (StringUtils.isNotEmpty(swid)) {
+                wheresql += " and swid like '%" + swid + "%'";
+            }
+            if (StringUtils.isNotEmpty(hfxpd)) {
+                wheresql += " and 合法性判断 = '" + hfxpd + "'";
+            }
+            String querySQL = "select * from  " + tablename + " where 1 = 1 " + wheresql;
+            querySQL += "order by swid limit " + limit + " OFFSET " + ((page - 1) * limit);
+            List<Map<String, Object>> results = yztMapper.executeSQL(querySQL);
+            List<Map> res = new ArrayList<Map>();
+            List<String> fields = new ArrayList<>();
+            Map<String, Object> firstMap = results.get(0);
+            for (Map.Entry<String, Object> entry : firstMap.entrySet()) {
+                String key = entry.getKey();
+                if (!"geom".equals(key)) {
+                    fields.add(key);
+                }
+            }
+            for (Map<String, Object> thisdata : results) {
+                Map cur = new HashMap();
+                for (Map.Entry<String, Object> entry : thisdata.entrySet()) {
+                    String key = entry.getKey();
+                    if (!"geom".equals(key)) {
+                        cur.put(key, entry.getValue());
+                    }
+                }
+                res.add(cur);
+            }
+            String countSQL = "select count(1) as count from  " + tablename + " where 1 = 1 " + wheresql;
+            List<Map<String, Object>> countresults = yztMapper.executeSQL(countSQL);
+            Integer count = Integer.valueOf(String.valueOf(countresults.get(0).get("count")));
+            Map<String, Object> result = new HashMap<>();
+            result.put("count", count);
+            result.put("record", res);
+            result.put("fields", fields);
+            return RequestResult.success("查询成功!", result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult basevector() {
+        try {
+            QueryWrapper<tBaseVector> wrapper = new QueryWrapper();
+            wrapper.orderByDesc("inserttime");
+            List<tBaseVector> tBaseVectorList = tBaseVectorMapper.selectList(null);
+            return RequestResult.success("查询成功!", tBaseVectorList);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult analysevector(String name) {
+        try {
+            if (StringUtils.isEmpty(name)) {
+                name = "";
+            }
+            QueryWrapper<tAnalyseVector> wrapper = new QueryWrapper();
+            if (StringUtils.isNotEmpty(name)) {
+                wrapper.eq("layername", name);
+            }
+            wrapper.orderByDesc("inserttime");
+            return RequestResult.success("查询成功!", tAnalyseVectorMapper.selectList(wrapper));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult getMapConfig(String key) {
+        try {
+            QueryWrapper<tMapConfig> wrapper = new QueryWrapper();
+            if (StringUtils.isNotEmpty(key)) {
+                wrapper.eq("name", key);
+            }
+            List<tMapConfig> list = tMapConfigMapper.selectList(wrapper);
+            Map res = new HashMap();
+            for (tMapConfig cur : list) {
+                res.put(cur.getName(), cur.getValue());
+            }
+            return RequestResult.success("查询成功!", res);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult getServerConfig(String key) {
+        try {
+            QueryWrapper<tGeoserver> wrapper = new QueryWrapper();
+            if (StringUtils.isNotEmpty(key)) {
+                wrapper.eq("id", key);
+            }
+            List<tGeoserver> list = tGeoServerMapper.selectList(wrapper);
+            return RequestResult.success("查询成功!", list.get(0));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult getGeoServerStyles() {
+        try {
+            QueryWrapper<tGeoserver> wrapper = new QueryWrapper();
+            List<tGeoserver> list = tGeoServerMapper.selectList(wrapper);
+            tGeoserver res = list.get(0);
+            List<String> styles = GeoServer.getStyles(res.getUri(), res.getUsername(),
+                    res.getPassword(), res.getWorkspace());
+            return RequestResult.success("查询成功!", styles);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult updateMapConfig(HttpServletRequest request) {
+        try {
+            JSONObject parameters = (JSONObject) new JSONParser().parse(request.getReader());
+            for (Object name : parameters.keySet()) {
+                String cname = String.valueOf(name);
+                String cvalue = String.valueOf(parameters.get(name));
+                String updateSQL = "update t_map_config set value = '" + cvalue + "' where name = '" + cname + "'";
+                yztMapper.executeSQL(updateSQL);
+            }
+            return RequestResult.success("修改成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("失败!", null);
+    }
+
+    @Override
+    public RequestResult updateServerConfig(HttpServletRequest request) {
+        try {
+            JSONObject parameters = (JSONObject) new JSONParser().parse(request.getReader());
+            for (Object name : parameters.keySet()) {
+                Object value = parameters.get(name);
+                String updateSQL = "update t_geoserver set " + name + " = '" + (String) value + "'";
+                yztMapper.executeSQL(updateSQL);
+            }
+            return RequestResult.success("修改成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("失败!", null);
+    }
+
+    @Override
+    public RequestResult overlapAnalysis(String modelname, String tablename) {
+        try {
+            //TODO wanger 修改数据的分析状态和开始时间
+            String updateSql = "update t_analyse_vector set fxzt = '1' , fxkssj = CURRENT_TIMESTAMP, fxmodel= '" + modelname + "' where tablename = '" + tablename + "'";
+            yztMapper.executeSQL(updateSql);
+            try {
+                //TODO wanger 对分析数据新增研判结果字段
+                yztMapper.executeSQL("ALTER TABLE " + tablename + " ADD COLUMN 合法性判断 TEXT");
+                yztMapper.executeSQL("ALTER TABLE " + tablename + " ADD COLUMN 合法性说明 TEXT");
+                yztMapper.executeSQL("ALTER TABLE " + tablename + " ADD COLUMN 面积 TEXT");
+                yztMapper.executeSQL("ALTER TABLE " + tablename + " ADD COLUMN 面积集合 TEXT");
+                yztMapper.executeSQL("ALTER TABLE " + tablename + " ADD COLUMN 编号集合 TEXT");
+            } catch (Exception e) {
+                System.out.println("分析图斑数据已存在附加字段,请忽略!");
+            }
+            //TODO wanger 重置附加字段为空字符串
+            String resetSql = "update " + tablename + " set 合法性判断 = '' , 合法性说明 = '' , 面积 = '' , 编号集合 = '', 面积集合 = ''";
+            yztMapper.executeSQL(resetSql);
+            // 查询分析模型因子
+            List<analyseModel> analyseModels = yztMapper.getAnalyseModel(tablename);
+            List<String> sqlOverlap = new ArrayList<>();
+            for (analyseModel curModel : analyseModels) {
+                String layerName = curModel.getLayername();
+                String tableName = curModel.getTablename();
+                String type = curModel.getType();
+                //TODO wanger 执行分析模型因子叠加分析
+                if (type.equals("外部")) {
+                    yztMapper.executeAnalyse(tablename, tableName, layerName, decimalPlaces, null);
+                } else if (type.equals("内部")) {
+                    String updateInside = String.format("update  " + tablename + "  as c set " +
+                            "合法性说明 = case when c.合法性说明 is null then '' else c.合法性说明 || ';' end || '符合%s用地'," +
+                            "面积 = case when 面积 is null then '' else 面积  end || round(cast( ST_Area(ST_Intersection(c.geom,d.geom)) as numeric), 2) || ';' " +
+                            "from %s d where ST_Covers ( c.geom, d.geom )", layerName, tableName);
+                    sqlOverlap.add(updateInside);
+                }
+            }
+            String updateInlegal = "update " + tablename + "  set 合法性判断 = '疑似违法'  where 合法性说明 like '%疑似%'";
+            yztMapper.executeSQL(updateInlegal);
+            String updateLegal = "update " + tablename + " set 合法性判断 = '合法用地'  where 合法性判断 is null or 合法性判断 = ''";
+            yztMapper.executeSQL(updateLegal);
+            //TODO wanger 修改数据的分析状态和结束时间
+            updateSql = "update t_analyse_vector set fxzt = '2' , fxjssj = CURRENT_TIMESTAMP, fxrz = '分析正常结束' where tablename = '" + tablename + "'";
+            yztMapper.executeSQL(updateSql);
+            return RequestResult.success("分析完成!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+            try {
+                String updateSql = "update t_analyse_vector set fxzt = '3' , fxjssj = CURRENT_TIMESTAMP, fxrz = '" + e.toString() + "' where tablename = '" + tablename + "'";
+                yztMapper.executeSQL(updateSql);
+            } catch (Exception exception) {
+                exception.printStackTrace();
+            }
+        }
+        return RequestResult.error("分析失败!", 0);
+    }
+
+    @Override
+    public void exportReport(String modelname, String tablename, String layername, HttpServletRequest request, HttpServletResponse response) {
+        String folderPath = localFilePath + "" + layername + "\\" + "report";
+        File folder = new File(folderPath);
+        String zippath = localFilePath + "" + layername + "\\report.zip";
+        if (folder.exists()) {
+            // TODO 如果已存在则打开系统文件夹
+            try {
+                FileToZipDownload.downloadLocalZipBuffered(response, zippath);
+//                Runtime.getRuntime().exec("explorer.exe " + folderPath);
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+//            return RequestResult.success("导出成功", 1);
+        } else {
+            folder.mkdirs();
+            String excelpath = folderPath + "/" + layername + "report.xlsx";
+            String wordpath = folderPath + "/" + layername + "report.docx";
+            String shppath = folderPath + "/" + layername + ".shp";
+            try {
+                String[] exportField = exportFields.split(",");
+                //TODO 第一步:查询数据库表结构  除过包含geom和shape的字段
+                List<String> fields = yztMapper.getTableField(dbschema, tablename);
+                //TODO 第二步:查询数据库表详情  附带geomstr
+                List<Map<String, Object>> tableDetail = yztMapper.getTableYswfDetailJoinGeomstr(String.join(",", fields), tablename);
+                //TODO 第三步:导出shape
+                List<hfxjg> Hfxpd = yztMapper.getHfxpd(tablename);
+                //TODO 第一步:查询数据的分析模型数据源列表   仅查询状态为可用的管控数据列表
+                List<analyseModel> analyseModels = yztMapper.getAnalyseModel(tablename);
+                ExcelExport.export(fields, excelpath, tableDetail, modelname, exportField);
+                WordExport.export(fields, wordpath, tableDetail, modelname, exportField, layername, Hfxpd, analyseModels);
+                SpatiaLiteToShapefile.execute(fields, shppath, shpWkid, tableDetail);
+                //TODO 压缩包数据流下载
+                zipDirectory(folderPath, zippath);
+                FileToZipDownload.downloadLocalZipBuffered(response, zippath);
+//                String[] filelist = {excelpath, wordpath};
+//                FileToZipDownload.download(filelist, request, response);
+            } catch (Exception e) {
+                e.printStackTrace();
+//                return RequestResult.error("导出失败", e.toString());
+            }
+            // TODO 系统打开文件夹
+//            try {
+//                Runtime.getRuntime().exec("explorer.exe " + folderPath);
+//            } catch (IOException e) {
+//                e.printStackTrace();
+//            }
+        }
+//        return RequestResult.success("导出成功", 1);
+    }
+
+    @Override
+    public void exportAchievementPackage(String tablename, String layername, HttpServletRequest request, HttpServletResponse response) {
+        String folderPath = localFilePath + "" + layername + "\\" + "package";
+        String zippath = localFilePath + "" + layername + "\\package.zip";
+        File folder = new File(folderPath);
+        if (!folder.exists()) {
+            folder.mkdirs();
+        }
+        if (Files.exists(Paths.get(zippath))) {
+            // TODO 系统打开文件夹
+            try {
+                FileToZipDownload.downloadLocalZipBuffered(response, zippath);
+//                Runtime.getRuntime().exec("explorer.exe " + folderPath);
+//                return null;
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+//            return RequestResult.success("导出成功", 1);
+        } else {
+            String excelpath = folderPath + "/" + layername + ".xlsx";
+            String shppath = folderPath + "/" + layername + ".shp";
+            try {
+                tGeoserver geoserver = tGeoServerMapper.selectOne(null);
+                String geoserverurl = geoserver.getUri() + "/" + geoserver.getWorkspace() + "/wms";
+                QueryWrapper<tAnalyseVector> wrapper = new QueryWrapper();
+                wrapper.eq("tablename", tablename);
+                tAnalyseVector analyseVector = tAnalyseVectorMapper.selectOne(wrapper);
+                String analysefolder = analyseVector.getPath();
+                copyDirectory(Paths.get(analysefolder + "/" + qsx), Paths.get(folderPath + "/" + qsx));
+                copyDirectory(Paths.get(analysefolder + "/" + hsx), Paths.get(folderPath + "/" + hsx));
+                //TODO wanger 第一:导出shape数据文件
+                //第一步:查询数据库表结构  除过包含geom和shape的字段
+                List<String> fields = yztMapper.getTableField(dbschema, tablename);
+                //第二步:查询数据库表详情  附带geomstr
+                List<Map<String, Object>> tableDetail = yztMapper.getTableDetailJoinGeomstr(String.join(",", fields), tablename);
+                //第二步:导出shape
+                SpatiaLiteToShapefile.execute(fields, shppath, shpWkid, tableDetail);
+                //TODO wanger 第二:导出excel和矢量数据压覆图
+                AchievementPackage.exportAttributes(tablename, excelpath, "EPSG:" + shpWkid, mapExportFixed, mapExportSize, geoserverurl);
+                zipDirectory(folderPath, zippath);
+                FileToZipDownload.downloadLocalZipBuffered(response, zippath);
+                // TODO 系统打开文件夹
+//            Runtime.getRuntime().exec("explorer.exe " + folderPath);
+            } catch (Exception e) {
+                e.printStackTrace();
+//                return RequestResult.error("导出失败", e.toString());
+            }
+//            return RequestResult.success("导出成功", 1);
+        }
+    }
+
+    @Override
+    public RequestResult getAnalyseResult(String tablename) {
+        try {
+            List<hfxjg> Hfxpd = yztMapper.getHfxpd(tablename);
+            List<hfxjg> Hfxsm = yztMapper.getHfxsm(tablename);
+            Map hfxpd = new HashMap();
+            for (hfxjg cur : Hfxpd) {
+                hfxpd.put(cur.getType(), cur.getCount());
+            }
+            Map hfxsm = new HashMap();
+            for (hfxjg cur : Hfxsm) {
+                hfxsm.put(cur.getType(), cur.getCount());
+            }
+            Map res = new HashMap();
+            res.put("hfxpd", hfxpd);
+            res.put("hfxsm", hfxsm);
+            return RequestResult.success("查询成功!", res);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", null);
+    }
+
+    @Override
+    public RequestResult basemap(MultipartFile file, String name, String invalid, String serviceuri, String id, String image, String indexnum) {
+        String imageuri = "";
+        if (file != null) {
+            String filename = file.getOriginalFilename();
+            String currentPath = localFilePath + "/" + filename;
+            try {
+                file.transferTo(new File(currentPath));
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            imageuri = serverhost + ":" + serverport + "/" + localFileProxy + "/" + filename;
+        } else if (StringUtils.isNotEmpty(image)) {
+            imageuri = image;
+        }
+        try {
+            QueryWrapper<tBasemap> wrapper = new QueryWrapper();
+            if (StringUtils.isNotEmpty(id)) {
+                wrapper.eq("id", id);
+            }
+            tBasemapMapper.delete(wrapper);
+            tBasemap basemap = new tBasemap();
+            basemap.setId(id);
+            basemap.setImage(imageuri);
+            basemap.setIndexnum(indexnum);
+            basemap.setInvalid(invalid);
+            basemap.setName(name);
+            basemap.setServiceuri(serviceuri);
+            tBasemapMapper.insert(basemap);
+            return RequestResult.success("保存成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("保存失败!", 0);
+    }
+
+    @Override
+    public RequestResult getbasemap(String name, String invalid) {
+        try {
+            QueryWrapper<tBasemap> wrapper = new QueryWrapper();
+            if (StringUtils.isNotEmpty(name)) {
+                wrapper.like("name", name);
+            }
+            if (StringUtils.isNotEmpty(invalid)) {
+                wrapper.eq("invalid", invalid);
+            }
+            wrapper.orderByAsc("indexnum");
+            return RequestResult.success("查询成功!", tBasemapMapper.selectList(wrapper));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("查询失败!", 0);
+    }
+
+    @Override
+    public RequestResult deletebasemap(String id) {
+        try {
+            QueryWrapper<tBasemap> wrapper = new QueryWrapper();
+            if (StringUtils.isNotEmpty(id)) {
+                wrapper.eq("id", id);
+            }
+            tBasemapMapper.delete(wrapper);
+            return RequestResult.success("删除成功!", 1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return RequestResult.error("删除失败!", 0);
+    }
+
+    // 运行cmd
+    public String ExecuteCMD(String command) {
+        String res = "";
+        try {
+            // 执行命令
+            Process process = Runtime.getRuntime().exec(command);
+            // 获取命令输出
+            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                System.out.println(line); // 输出命令结果
+                res = line;
+            }
+            // 等待命令执行结束
+            process.waitFor();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return res;
+    }
+
+    public static void zipDirectory(String sourceDir, String zipFilePath) throws IOException {
+        Path sourcePath = Paths.get(sourceDir);
+        try (FileOutputStream fos = new FileOutputStream(zipFilePath);
+             ZipOutputStream zos = new ZipOutputStream(fos)) {
+
+            // 递归遍历目录
+            Files.walk(sourcePath).forEach(path -> {
+                // 计算文件或目录的相对路径
+                Path relativePath = sourcePath.relativize(path);
+                // 确保目录也被加入到ZIP文件中
+                if (Files.isDirectory(path)) {
+                    try {
+                        // 如果是目录,直接创建一个目录条目
+                        zos.putNextEntry(new ZipEntry(relativePath.toString().replace("\\", "/") + "/"));
+                        zos.closeEntry();  // 必须调用closeEntry(),即使只是目录
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                } else {
+                    try (InputStream is = Files.newInputStream(path)) {
+                        // 如果是文件,则创建文件条目
+                        ZipEntry zipEntry = new ZipEntry(relativePath.toString().replace("\\", "/"));
+                        zos.putNextEntry(zipEntry);
+
+                        // 写入文件内容
+                        byte[] buffer = new byte[1024];
+                        int length;
+                        while ((length = is.read(buffer)) > 0) {
+                            zos.write(buffer, 0, length);
+                        }
+                        zos.closeEntry();
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+            });
+        }
+    }
+
+    // 递归拷贝文件夹及其内容
+    public void copyDirectory(Path sourceDir, Path targetDir) throws IOException {
+        // 如果目标目录不存在,创建目标目录
+        if (Files.notExists(targetDir)) {
+            Files.createDirectories(targetDir);
+        }
+        // 遍历源目录的内容,并拷贝到目标目录
+        Files.walkFileTree(sourceDir, new SimpleFileVisitor<Path>() {
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                // 计算目标文件路径
+                Path targetFile = targetDir.resolve(sourceDir.relativize(file));
+                // 拷贝文件到目标目录,覆盖已存在的文件
+                Files.copy(file, targetFile, StandardCopyOption.REPLACE_EXISTING);
+                return FileVisitResult.CONTINUE;
+            }
+
+            @Override
+            public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+                // 拷贝完目录内容后,拷贝该目录
+                Path targetDirForCurrentDir = targetDir.resolve(sourceDir.relativize(dir));
+                Files.createDirectories(targetDirForCurrentDir);
+                return FileVisitResult.CONTINUE;
+            }
+        });
+    }
+
+}

+ 69 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/service/yzt/IYztService.java

@@ -0,0 +1,69 @@
+package com.onemap.spotoverlap.service.yzt;
+
+import com.onemap.common.core.web.domain.RequestResult;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+public interface IYztService {
+    RequestResult importIn(MultipartFile file, String path, String type, String name, String ufield, String style);
+
+    RequestResult modellist();
+
+    RequestResult modeldetails(String modelname);
+
+    RequestResult basevector();
+
+    RequestResult analysevector(String name);
+
+    RequestResult modeldelete(String modelname);
+
+    RequestResult modelupdate(HttpServletRequest request);
+
+    RequestResult basevectordelete(String tablename);
+
+    RequestResult getShpFields(String path);
+
+    ResponseEntity<InputStreamResource> getTiff(String tiftype, String tableid, String uuid, String filetype);
+
+    RequestResult getImageUrls(String tableid, String uuid);
+
+    RequestResult getTableGeoms(String tablename, String swid);
+
+    RequestResult getFeatureBySwid(String tablename, String swid);
+
+    RequestResult getTableRecord(String tablename, Integer page, Integer limit, String swid, String hfxpd);
+
+    RequestResult getMapConfig(String key);
+
+    RequestResult updateMapConfig(HttpServletRequest request);
+
+    RequestResult overlapAnalysis(String modelname, String tablename);
+
+    void exportReport(String modelname, String tablename, String layername, HttpServletRequest request, HttpServletResponse response);
+
+    RequestResult getGeoServerStyles();
+
+    RequestResult analysevectordelete(String tablename);
+
+    void exportAchievementPackage(String tablename, String layername, HttpServletRequest request, HttpServletResponse response);
+
+    RequestResult getServerConfig(String key);
+
+    RequestResult updateServerConfig(HttpServletRequest request);
+
+    RequestResult getAnalyseResult(String tablename);
+
+    RequestResult upload(MultipartFile file);
+
+    RequestResult basemap(MultipartFile file, String name, String invalid, String serviceuri, String id, String image, String indexnum);
+
+    RequestResult getbasemap(String name, String invalid);
+
+    RequestResult deletebasemap(String id);
+
+}

+ 289 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/AchievementPackage.java

@@ -0,0 +1,289 @@
+package com.onemap.spotoverlap.utils;
+
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.spotoverlap.domain.yzt.analyseModel;
+import com.onemap.spotoverlap.domain.yzt.yswfDto;
+import com.onemap.spotoverlap.mapper.yzt.YztMapper;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class AchievementPackage {
+
+    public static YztMapper yztMapper;
+
+    @Autowired
+    public void setYztMapper(YztMapper yztMapper) {
+        AchievementPackage.yztMapper = yztMapper;
+    }
+
+    public static String dbschema;
+
+    @Value("${dbschema}")
+    public void setDbschema(String dbschema) {
+        AchievementPackage.dbschema = dbschema;
+    }
+
+    public static class GeometryParams {
+        private String layername;
+        private String xmin;
+        private String xmax;
+        private String ymin;
+        private String ymax;
+        private String swid;
+
+        public String getLayername() {
+            return layername;
+        }
+
+        public void setLayername(String layername) {
+            this.layername = layername;
+        }
+
+        public String getXmin() {
+            return xmin;
+        }
+
+        public void setXmin(String xmin) {
+            this.xmin = xmin;
+        }
+
+        public String getXmax() {
+            return xmax;
+        }
+
+        public void setXmax(String xmax) {
+            this.xmax = xmax;
+        }
+
+        public String getYmin() {
+            return ymin;
+        }
+
+        public void setYmin(String ymin) {
+            this.ymin = ymin;
+        }
+
+        public String getYmax() {
+            return ymax;
+        }
+
+        public void setYmax(String ymax) {
+            this.ymax = ymax;
+        }
+
+        public String getSwid() {
+            return swid;
+        }
+
+        public void setSwid(String swid) {
+            this.swid = swid;
+        }
+    }
+
+    /**
+     * 根据tablename 导出重叠的管控数据属性信息表
+     *
+     * @param tablename
+     * @param filepath
+     * @return
+     */
+    public static Boolean exportAttributes(String tablename, String filepath,
+                                           String proj, String fixed, Integer imageSize, String geoserverurl) {
+        try {
+            //第一步:查询数据的分析模型数据源列表   仅查询状态为可用的管控数据列表
+            List<analyseModel> analyseModels = yztMapper.getAnalyseModel(tablename);
+            //第二步:疑似违法图斑数据查询
+            List<yswfDto> yswfDtos = yztMapper.getYswfList(tablename);
+            //TODO 查询当前数据表叠加的管控数据swid集合
+            List<String> gkdataswids = new ArrayList<>();
+            List<GeometryParams> geometrys = new ArrayList<>();
+            for(yswfDto cur : yswfDtos) {
+                gkdataswids.add(cur.getSwids());
+                GeometryParams geometry = new GeometryParams();
+                geometry.setSwid(cur.getSwid());
+                geometry.setXmin(String.valueOf(cur.getXmin()));
+                geometry.setXmax(String.valueOf(cur.getXmax()));
+                geometry.setYmin(String.valueOf(cur.getYmin()));
+                geometry.setYmax(String.valueOf(cur.getYmax()));
+                geometry.setLayername(cur.getServicename());
+                geometrys.add(geometry);
+            }
+            //TODO 创建Excel工作簿和工作表
+            Workbook workbook = new XSSFWorkbook();
+            //TODO 压覆截图外扩的比例  0-1表示0%-100%
+            Double sizeBuffer = 0.1;
+            //TODO 遍历管控数据,根据重叠的swid集合查询属性表并保存到excel的sheet
+            for (int i = 0; i < analyseModels.size(); i++) {
+                String curtablename = analyseModels.get(i).getTablename();
+                String curlayername = analyseModels.get(i).getLayername();
+                String curservicename =  analyseModels.get(i).getServicename();
+
+                //TODO 导入地图压覆图片 存储到本地指定位置
+                for (int m = 0; m < geometrys.size(); m++) {
+                    GeometryParams geometry = geometrys.get(m);
+                    Map<String, Object> params = new HashMap<>();
+                    Double xmin = Double.valueOf(geometry.getXmin());
+                    Double xmax = Double.valueOf(geometry.getXmax());
+                    Double ymin = Double.valueOf(geometry.getYmin());
+                    Double ymax = Double.valueOf(geometry.getYmax());
+                    //TODO wanger 压覆截图统一根据sizeBuffer外扩
+                    xmin = xmin - (xmax - xmin) * sizeBuffer;
+                    xmax = xmax + (xmax - xmin) * sizeBuffer;
+                    ymin = ymin - (ymax - ymin) * sizeBuffer;
+                    ymax = ymax + (ymax - ymin) * sizeBuffer;
+
+                    params.put("SERVICE", "WMS");
+                    params.put("VERSION", "1.1.1");
+                    params.put("REQUEST", "GetMap");
+                    params.put("TRANSPARENT", true);
+                    params.put("FORMAT", "image/jpeg");
+                    params.put("EXCEPTIONS", "application/vnd.ogc.se_inimage");
+                    params.put("STYLES", "");
+                    params.put("LAYERS", encode(curservicename + "," + geometry.getLayername()));
+                    params.put("SRS", proj);
+                    //TODO 计算出图尺寸
+                    if ("width".equals(fixed)) {
+                        params.put("WIDTH", imageSize);
+                        params.put("HEIGHT", Integer.valueOf((int) ((ymax - ymin) / (xmax - xmin) * imageSize)));
+                    } else if ("height".equals(fixed)) {
+                        params.put("HEIGHT", imageSize);
+                        params.put("WIDTH", Integer.valueOf((int) ((xmax - xmin) / (ymax - ymin) * imageSize)));
+                    }
+                    params.put("BBOX", String.format("%s,%s,%s,%s", xmin, ymin, xmax, ymax));
+                    File f = new File(filepath);
+                    String parent = f.getParentFile().getAbsolutePath() + "/mapimages/";
+                    String imageUrl = geoserverurl; // 替换为实际的图片 URL
+                    String outputFilePath = parent + "" + geometry.getSwid() + "_" + curlayername + ".png"; // 保存图片的文件路径
+                    try {
+                        File folder = new File(parent);
+                        if (!folder.exists()) {
+                            folder.mkdirs();
+                        }
+                        downloadImage(imageUrl, outputFilePath, params);
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+                Sheet sheet = workbook.createSheet(curlayername);
+                List<String> gkdataswid = new ArrayList<>();
+                for (int u = 0; u < gkdataswids.size(); u++) {
+                    String[] swid = gkdataswids.get(u).split("(?<=;)(?=;)|;")[i].split(",");
+                    for (int p = 0; p < swid.length; p++) {
+                        if (StringUtils.isNotEmpty(swid[p])) {
+                            gkdataswid.add("'" + swid[p] + "'");
+                        }
+                    }
+                }
+                String swids = String.join(",", gkdataswid);
+                List<String> fields = yztMapper.getTableField(dbschema, curtablename);
+                //第二步:查询数据库表详情  附带geomstr
+                List<Map<String, Object>> tableDetail = yztMapper.getTableDetailBySwids(String.join(",", fields), curtablename, swids);
+                if(tableDetail == null || tableDetail.size() == 0){
+                    continue;
+                }
+                // 写入标题行
+                Row header = sheet.createRow(0);
+                Map<String, Object> first = tableDetail.get(0);
+                List<String> curfields = new ArrayList<>();
+                for (Map.Entry<String, Object> entry : first.entrySet()) {
+                    curfields.add(entry.getKey());
+                }
+                for (int r = 0; r < curfields.size(); r++) {
+                    header.createCell(r).setCellValue(curfields.get(r));
+                }
+                // 写入数据行
+                int rowCount = 1;
+                for(Map<String, Object> creMap : tableDetail) {
+                    Row row = sheet.createRow(rowCount++);
+                    for (int r = 0; r < curfields.size(); r++) {
+                        String field = curfields.get(r);
+                        row.createCell(r).setCellValue(String.valueOf(creMap.get(field)));
+                    }
+                }
+            }
+            //TODO 写入Excel文件
+            FileOutputStream outputStream = new FileOutputStream(filepath);
+            workbook.write(outputStream);
+            outputStream.close();
+            System.out.println("Excel文件已导出");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return true;
+    }
+
+    /**
+     * 转换地址栏中的中文
+     *
+     * @param value
+     * @return
+     */
+    public static String encode(String value) {
+        try {
+            return URLEncoder.encode(value, "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        return value;
+    }
+
+
+    /**
+     * 根据http get地址请求图片 并保存到指定磁盘路径
+     *
+     * @param imageUrl
+     * @param outputFilePath
+     * @param params
+     * @throws IOException
+     */
+    public static void downloadImage(String imageUrl, String outputFilePath, Map<String, Object> params) throws IOException {
+        String requestUrl = imageUrl + "?";
+        for (String key : params.keySet()) {
+            Object value = params.get(key); // 使用 key 获取值
+            requestUrl += key + "=" + value + "&";
+        }
+        URL url = new URL(requestUrl);
+        // 打开连接并设置请求方法
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setRequestMethod("GET");
+        connection.setConnectTimeout(5000);  // 设置连接超时
+        connection.setReadTimeout(5000);     // 设置读取超时
+        // 获取响应状态码
+        int statusCode = connection.getResponseCode();
+        if (statusCode != HttpURLConnection.HTTP_OK) {
+            throw new IOException("HTTP request failed with status code: " + statusCode);
+        }
+        // 获取输入流(图片数据)
+        try (InputStream inputStream = connection.getInputStream();
+             FileOutputStream outputStream = new FileOutputStream(outputFilePath)) {
+            // 缓冲区
+            byte[] buffer = new byte[4096];
+            int bytesRead;
+            // 读取输入流并写入文件
+            while ((bytesRead = inputStream.read(buffer)) != -1) {
+                outputStream.write(buffer, 0, bytesRead);
+            }
+        } finally {
+            connection.disconnect();  // 关闭连接
+        }
+    }
+}

+ 12 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/CustomUtils.java

@@ -0,0 +1,12 @@
+package com.onemap.spotoverlap.utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class CustomUtils {
+    public static String getCurrentTime() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        String currentTimeString = sdf.format(new Date());
+        return currentTimeString;
+    }
+}

+ 72 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/DozerUtils.java

@@ -0,0 +1,72 @@
+package com.onemap.spotoverlap.utils;
+
+
+import com.github.dozermapper.core.Mapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+@Component
+public class DozerUtils {
+
+    /**
+     * dozer转换的核心mapper对象
+     */
+    private static Mapper dozerMapper;
+
+    @Autowired
+    private Mapper mapper;
+
+    @PostConstruct
+    private void construct() {
+        DozerUtils.setDozerMapper(mapper);
+    }
+
+    private static void setDozerMapper(Mapper dozerMapper) {
+        DozerUtils.dozerMapper = dozerMapper;
+    }
+
+    /**
+     * 构造新的destinationClass实例对象,通过source对象中的字段内容
+     * 映射到destinationClass实例对象中,并返回新的destinationClass实例对象。
+     *
+     * @param source           源数据对象
+     * @param destinationClass 要构造新的实例对象Class
+     */
+    public static <T> T map(Object source, Class<T> destinationClass) {
+        return dozerMapper.map(source, destinationClass);
+    }
+
+    /**
+     * 将对象source的所有属性值拷贝到对象destination中.
+     *
+     * @param source            对象source
+     * @param destinationObject 对象destination
+     */
+    public static void map(Object source, Object destinationObject) {
+        dozerMapper.map(source, destinationObject);
+    }
+
+    /**
+     * List数据源映射
+     *
+     * @param sourceList
+     * @param destinationClass
+     * @param <T>
+     * @return List<T>
+     */
+    public static <T> List<T> mapList(Collection sourceList, Class<T> destinationClass) {
+        List destinationList = new ArrayList<>();
+        for (Iterator iterator = sourceList.iterator(); iterator.hasNext(); ) {
+            Object sourceObject = iterator.next();
+            Object destinationObject = dozerMapper.map(sourceObject, destinationClass);
+            destinationList.add(destinationObject);
+        }
+        return destinationList;
+    }
+}

+ 45 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ExcelExport.java

@@ -0,0 +1,45 @@
+package com.onemap.spotoverlap.utils;
+
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+import java.io.FileOutputStream;
+import java.sql.*;
+import java.util.List;
+import java.util.Map;
+
+public class ExcelExport {
+    public static Boolean export(List<String> fields, String filepath, List<Map<String, Object>> tableDetail, String modelname, String[] exportField) throws Exception {
+        try {
+            // 创建Excel工作簿和工作表
+            Workbook workbook = new XSSFWorkbook();
+            Sheet sheet = workbook.createSheet("套合分析结果");
+            // 写入标题行
+            Row header = sheet.createRow(0);
+            for (int i = 0; i < exportField.length; i++) {
+                String field = exportField[i];
+                header.createCell(i).setCellValue(field);
+            }
+            // 写入数据行
+            int rowCount = 1;
+            for(Map<String, Object> cur: tableDetail) {
+                Row row = sheet.createRow(rowCount++);
+                for (int i = 0; i < exportField.length; i++) {
+                    String field = exportField[i];
+                    row.createCell(i).setCellValue(String.valueOf(cur.get(field)));
+                }
+            }
+            // 写入Excel文件
+            FileOutputStream outputStream = new FileOutputStream(filepath);
+            workbook.write(outputStream);
+            outputStream.close();
+            System.out.println("Excel文件已导出");
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return false;
+    }
+}

+ 68 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/FileToZipDownload.java

@@ -0,0 +1,68 @@
+package com.onemap.spotoverlap.utils;
+
+import org.springframework.http.HttpStatus;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+public class FileToZipDownload {
+    public static void download(String[] filelist ,HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        List<File> files = new ArrayList<>();
+        for(int i = 0 ; i < filelist.length ; i ++){
+            files.add(new File(filelist[i]));
+        }
+        response.setHeader("Content-Disposition", "attachment; filename=\"report.zip\"");
+        try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) {
+            for(int i = 0 ; i < files.size() ; i ++){
+                addFileToZip(zipOut, files.get(i));
+            }
+            zipOut.finish();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void addFileToZip(ZipOutputStream zipOut, File file) throws IOException {
+        try (FileInputStream fileIn = new FileInputStream(file)) {
+            ZipEntry zipEntry = new ZipEntry(file.getName());
+            zipOut.putNextEntry(zipEntry);
+            byte[] buffer = new byte[1024];
+            int length;
+            while ((length = fileIn.read(buffer)) > 0) {
+                zipOut.write(buffer, 0, length);
+            }
+            zipOut.closeEntry();
+        }
+    }
+
+    public static void downloadLocalZipBuffered(HttpServletResponse response, String filepath) throws IOException {
+        // 1. 获取要下载的ZIP文件路径(根据请求参数)
+        String filePath = filepath; // 替换为实际路径
+        // 2. 创建File对象
+        File zipFile = new File(filePath);
+        if (!zipFile.exists()) {
+            response.sendError(HttpStatus.NOT_FOUND.value(), "File not found");
+            return;
+        }
+        // 3. 设置响应头
+        response.setContentType("application/zip");
+        response.setHeader("Content-Disposition", "attachment; filename=\"" + zipFile.getName() + "\"");
+        response.setContentLength((int) zipFile.length());
+        // 4. 使用缓冲流写入响应
+        try (InputStream in = new BufferedInputStream(new FileInputStream(zipFile));
+             OutputStream out = response.getOutputStream()) {
+            byte[] buffer = new byte[1024 * 8]; // 8KB buffer
+            int bytesRead;
+            while ((bytesRead = in.read(buffer)) != -1) {
+                out.write(buffer, 0, bytesRead);
+            }
+            out.flush();
+        }
+    }
+}

+ 43 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/FixedThreadUtil.java

@@ -0,0 +1,43 @@
+package com.onemap.spotoverlap.utils;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 异步线程池
+ *
+ * @author GW00229833
+ **/
+public class FixedThreadUtil {
+
+    private FixedThreadUtil() {
+
+    }
+
+
+    /**
+     * 线程数
+     */
+    private static final int N_CPUS = Runtime.getRuntime().availableProcessors();
+    /**
+     * 使用 ThreadFactoryBuilder 创建自定义线程名称的 ThreadFactory
+     */
+    private static final ThreadFactory NAMED_THREAD_FACTORY = new ThreadFactoryBuilder()
+            .setNameFormat("hyn-demo-pool-%d").build();
+    /**
+     * 创建线程池,其中任务队列需要结合实际情况设置合理的容量  消费大数据kafka
+     */
+    public static final ThreadPoolExecutor FIXED_THREAD_POOL = new ThreadPoolExecutor(N_CPUS,
+            N_CPUS * 2,
+            0L,
+            TimeUnit.MILLISECONDS,
+            new LinkedBlockingQueue<>(10240),
+            NAMED_THREAD_FACTORY,
+            new ThreadPoolExecutor.CallerRunsPolicy());
+
+
+}

+ 173 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/GeoServer.java

@@ -0,0 +1,173 @@
+package com.onemap.spotoverlap.utils;
+
+import com.google.gson.Gson;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.geotools.data.FileDataStore;
+import org.geotools.data.shapefile.ShapefileDataStoreFactory;
+import org.geotools.referencing.CRS;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.List;
+import java.util.Map;
+
+public class GeoServer {
+
+    public static void main(String[] args) {
+        try {
+            List<String> styles = getStyles("http://127.0.0.1:28085/geoserver", "admin", "geoserver", "spot");
+            System.out.println(styles);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取geoserver工作空间下的所有样式
+     *
+     * @param geoserverurl
+     * @param username
+     * @param password
+     * @param workspace
+     * @return
+     * @throws IOException
+     */
+    public static List<String> getStyles(String geoserverurl, String username, String password, String workspace) throws IOException {
+        CloseableHttpClient client = HttpClients.createDefault();
+        // TODO 设置 Basic Authentication 头
+        String auth = username + ":" + password;
+        String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes(StandardCharsets.UTF_8));
+
+        HttpGet getRequest = new HttpGet(geoserverurl + "/rest/workspaces/" + workspace + "/styles");
+        getRequest.setHeader("Authorization", "Basic " + encodedAuth);
+        List<String> style = new ArrayList<>();
+        try (CloseableHttpResponse response = client.execute(getRequest)) {
+            String responseEntity = EntityUtils.toString(response.getEntity());
+            System.out.println(responseEntity);
+            Gson gson = new Gson();
+            // 将 JSON 字符串转换为 Map
+            Map<String, Object> responseMap = gson.fromJson(responseEntity, Map.class);
+            Map<String, Object> styles = (Map<String, Object>) responseMap.get("styles");
+            List<Map> stylelist = (List<Map>) styles.get("style");
+            System.out.println(stylelist);
+            for (int i = 0; i < stylelist.size(); i++) {
+                Map<String, Object> cur = stylelist.get(i);
+                style.add(workspace + ":" + cur.get("name"));
+            }
+        }
+        return style;
+    }
+
+    /**
+     * 将本地shp文件发布到geoserver并配置相应样式
+     *
+     * @param geoserverurl
+     * @param username
+     * @param password
+     * @param workspace
+     * @param filepath
+     * @param stylename
+     * @throws IOException
+     */
+    public static void publishShp(String geoserverurl, String username, String password, String workspace, String filepath, String stylename, String datasource, String charset) throws IOException {
+//        File file = new File(filepath);
+//        String fileName = file.getName();
+//        int dotIndex = fileName.lastIndexOf('.');
+//        String datasource = dotIndex != -1 ? fileName.substring(0, dotIndex) : fileName;
+
+        CloseableHttpClient client = HttpClients.createDefault();
+        // TODO 设置 Basic Authentication 头
+        String auth = username + ":" + password;
+        String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes(StandardCharsets.UTF_8));
+
+        // TODO 创建数据存储时的XML请求体,指定文件路径
+        String xmlRequest = "<dataStore>" +
+                "<name>" + datasource + "</name>" +
+                "<connectionParameters>" +
+                "<entry key=\"url\">file:" + filepath + "</entry>" +
+                "<entry key=\"connector\">Shapefile</entry>" +
+                "<entry key=\"charset\">" + charset + "</entry>" +
+                "</connectionParameters>" +
+                "</dataStore>";
+        HttpPost postRequest = new HttpPost(geoserverurl + "/rest/workspaces/" + workspace + "/datastores");
+        postRequest.setHeader("Authorization", "Basic " + encodedAuth);
+        postRequest.setEntity(new StringEntity(xmlRequest));
+        postRequest.setHeader("Content-Type", "application/xml");
+        try (CloseableHttpResponse response = client.execute(postRequest)) {
+            String responseEntity = EntityUtils.toString(response.getEntity());
+            System.out.println(responseEntity);
+        }
+
+        // TODO 创建发布图层的请求体
+        String publishRequest = "<featureType>" +
+                "<title>" + datasource + "</title>" +
+                "<name>" + datasource + "</name>" +
+                "</featureType>";
+        postRequest = new HttpPost(geoserverurl + "/rest/workspaces/" + workspace + "/datastores/" + datasource + "/featuretypes");
+        postRequest.setEntity(new StringEntity(publishRequest));
+        postRequest.setHeader("Authorization", "Basic " + encodedAuth);
+        postRequest.setHeader("Content-Type", "application/xml");
+        try (CloseableHttpResponse response = client.execute(postRequest)) {
+            String responseEntity = EntityUtils.toString(response.getEntity());
+            System.out.println(responseEntity);
+        }
+        updateStyle(stylename, geoserverurl, username, password, workspace + ":" + datasource);
+        client.close();
+    }
+
+    public static void updateStyle(String stylename, String geoserverurl, String username, String password, String datasource) {
+        try {
+            CloseableHttpClient client = HttpClients.createDefault();
+            // TODO 创建图层样式的请求体
+            String styleRequest = "<layer><defaultStyle>" +
+                    "<name>" + stylename + "</name>" +
+                    "</defaultStyle></layer>";
+            String auth = username + ":" + password;
+            String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes(StandardCharsets.UTF_8));
+            HttpPut putRequest = new HttpPut(geoserverurl + "/rest/layers/" + datasource);
+            putRequest.setEntity(new StringEntity(styleRequest));
+            putRequest.setHeader("Authorization", "Basic " + encodedAuth);
+            putRequest.setHeader("Content-Type", "application/xml");
+            try (CloseableHttpResponse response = client.execute(putRequest)) {
+                String responseEntity = EntityUtils.toString(response.getEntity());
+                System.out.println(responseEntity);
+            }
+            client.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取shp文件的epsg编码
+     *
+     * @param shpFilePath
+     * @return
+     */
+    public static String getShpEPSG(String shpFilePath) {
+        try {
+            File shpFile = new File(shpFilePath);
+            // 通过Shapefile加载数据
+            FileDataStore store = new ShapefileDataStoreFactory().createDataStore(shpFile.toURI().toURL());
+            // 获取CoordinateReferenceSystem
+            CoordinateReferenceSystem crs = store.getSchema().getCoordinateReferenceSystem();
+            // 获取SRID
+            Integer srid = CRS.lookupEpsgCode(crs, false);
+            return "EPSG:" + srid;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "EPSG:4326";
+    }
+}

+ 180 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/HttpClientUtil.java

@@ -0,0 +1,180 @@
+package com.onemap.spotoverlap.utils;
+
+import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class HttpClientUtil {
+    /**
+     * 带参数的get请求
+     *
+     * @param url
+     * @param param
+     * @return String
+     */
+    public static String doGet(String url, Map<String, String> param) {
+        // 创建Httpclient对象
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+
+        String resultString = null;
+        CloseableHttpResponse response = null;
+        try {
+            // 创建uri
+            URIBuilder builder = new URIBuilder(url);
+            if (param != null) {
+                for (String key : param.keySet()) {
+                    builder.addParameter(key, param.get(key));
+                }
+            }
+            URI uri = builder.build();
+            // 创建http GET请求
+            HttpGet httpGet = new HttpGet(uri);
+            //设置超时设置
+            RequestConfig requestConfig = RequestConfig.custom()
+                    .setConnectionRequestTimeout(10000)
+                    .setConnectTimeout(10000)
+                    .setSocketTimeout(10000).build();
+            httpGet.setConfig(requestConfig);
+            // 执行请求
+            response = httpclient.execute(httpGet);
+            // 判断返回状态是否为200
+            if (response.getStatusLine().getStatusCode() == 200) {
+                resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
+                return resultString;
+            }
+            return null;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * 不带参数的get请求
+     *
+     * @param url
+     * @return String
+     */
+    public static String doGet(String url) {
+        return doGet(url, null);
+    }
+
+    /**
+     * 带参数的post请求
+     *
+     * @param url
+     * @param param
+     * @return String
+     */
+    public static String doPost(String url, Map<String, String> param) {
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = null;
+        try {
+            // 创建Http Post请求
+            HttpPost httpPost = new HttpPost(url);
+            // 创建参数列表
+            if (param != null) {
+                List<NameValuePair> paramList = new ArrayList<>();
+                for (String key : param.keySet()) {
+                    paramList.add(new BasicNameValuePair(key, param.get(key)));
+                }
+                // 模拟表单
+                UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);
+                httpPost.setEntity(entity);
+            }
+            RequestConfig requestConfig = RequestConfig.custom()
+                    .setConnectionRequestTimeout(10000)
+                    .setConnectTimeout(10000)
+                    .setSocketTimeout(10000).build();
+            httpPost.setConfig(requestConfig);
+            // 执行http请求
+            response = httpClient.execute(httpPost);
+            resultString = EntityUtils.toString(response.getEntity(), "utf-8");
+            return resultString;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * 不带参数的post请求
+     *
+     * @param url
+     * @return String
+     */
+    public static String doPost(String url) {
+        return doPost(url, null);
+    }
+
+    /**
+     * 传送json类型的post请求
+     *
+     * @param url
+     * @param json
+     * @return String
+     */
+    public static String doPostJson(String url, String json) {
+        // 创建Httpclient对象
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        CloseableHttpResponse response = null;
+        String resultString = null;
+        try {
+            // 创建Http Post请求
+            HttpPost httpPost = new HttpPost(url);
+            // 创建请求内容
+            StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);
+            httpPost.setEntity(entity);
+            RequestConfig requestConfig = RequestConfig.custom()
+                    .setConnectionRequestTimeout(10000)
+                    .setConnectTimeout(10000)
+                    .setSocketTimeout(10000).build();
+            httpPost.setConfig(requestConfig);
+            // 执行http请求
+            response = httpClient.execute(httpPost);
+            resultString = EntityUtils.toString(response.getEntity(), "utf-8");
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                response.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return resultString;
+    }
+}

+ 93 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/MappedBiggerFileReader.java

@@ -0,0 +1,93 @@
+package com.onemap.spotoverlap.utils;
+
+import javax.servlet.ServletOutputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
+
+/**
+ * Created by zfh on 16-4-19.
+ */
+public class MappedBiggerFileReader {
+    private MappedByteBuffer[] mappedBufArray;
+    private int count = 0;
+    private int number;
+    private FileInputStream fileIn;
+    private long fileLength;
+    private int arraySize;
+    private byte[] array;
+    private int[] totalArray;
+    private Integer index = 0;
+    private ServletOutputStream outputStream;
+
+    public MappedBiggerFileReader(String fileName, int arraySize, ServletOutputStream out) throws IOException {
+        if (out != null) {
+            outputStream = out;
+        }
+        this.fileIn = new FileInputStream(fileName);
+        FileChannel fileChannel = fileIn.getChannel();
+        this.fileLength = fileChannel.size();
+        this.number = (int) Math.ceil((double) fileLength / (double) Integer.MAX_VALUE);
+        this.mappedBufArray = new MappedByteBuffer[number];// 内存文件映射数组
+        long preLength = 0;
+        long regionSize = (long) Integer.MAX_VALUE;// 映射区域的大小
+        for (int i = 0; i < number; i++) {// 将文件的连续区域映射到内存文件映射数组中
+            if (fileLength - preLength < (long) Integer.MAX_VALUE) {
+                regionSize = fileLength - preLength;// 最后一片区域的大小
+            }
+            mappedBufArray[i] = fileChannel.map(FileChannel.MapMode.READ_ONLY, preLength, regionSize);
+            preLength += regionSize;// 下一片区域的开始
+        }
+        this.arraySize = arraySize;
+    }
+
+    public int read() throws IOException {
+        if (count >= number) {
+            return -1;
+        }
+        int limit = mappedBufArray[count].limit();
+        int position = mappedBufArray[count].position();
+        if (limit - position > arraySize) {
+            array = new byte[arraySize];
+            mappedBufArray[count].get(array);
+            if (outputStream != null) {
+                outputStream.write(array);
+            }
+            index = index + arraySize;
+            return arraySize;
+        } else {// 本内存文件映射最后一次读取数据
+            array = new byte[limit - position];
+            mappedBufArray[count].get(array);
+            if (outputStream != null) {
+                outputStream.write(array);
+            }
+            index = index + arraySize;
+            if (count < number) {
+                count++;// 转换到下一个内存文件映射
+            }
+            return limit - position;
+        }
+    }
+
+    public void close() throws IOException {
+        fileIn.close();
+        array = null;
+    }
+
+    public byte[] getArray() {
+        return array;
+    }
+
+    public long getFileLength() {
+        return fileLength;
+    }
+
+    public static void main(String[] args) throws IOException {
+//        FileOutputStream out = new FileOutputStream("D:\\soft\\ArcGIS_Engine_1041_15100222.iso");
+        MappedBiggerFileReader reader = new MappedBiggerFileReader("D:\\soft\\ArcGIS_Engine_1041_151002.iso", 65536, null);
+        while (reader.read() != -1) {
+        }
+        reader.close();
+    }
+}

+ 101 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/Md5Utils.java

@@ -0,0 +1,101 @@
+package com.onemap.spotoverlap.utils;
+
+import org.apache.commons.codec.binary.Hex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+
+/**
+ * Md5加密方法
+ *
+ */
+public class Md5Utils
+{
+    private static final Logger log = LoggerFactory.getLogger(Md5Utils.class);
+
+    private static byte[] md5(String s)
+    {
+        MessageDigest algorithm;
+        try
+        {
+            algorithm = MessageDigest.getInstance("MD5");
+            algorithm.reset();
+            algorithm.update(s.getBytes("UTF-8"));
+            byte[] messageDigest = algorithm.digest();
+            return messageDigest;
+        }
+        catch (Exception e)
+        {
+            log.error("MD5 Error...", e);
+        }
+        return null;
+    }
+
+    private static final String toHex(byte hash[])
+    {
+        if (hash == null)
+        {
+            return null;
+        }
+        StringBuffer buf = new StringBuffer(hash.length * 2);
+        int i;
+
+        for (i = 0; i < hash.length; i++)
+        {
+            if ((hash[i] & 0xff) < 0x10)
+            {
+                buf.append("0");
+            }
+            buf.append(Long.toString(hash[i] & 0xff, 16));
+        }
+        return buf.toString();
+    }
+
+    public static String hash(String s)
+    {
+        try
+        {
+            return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
+        }
+        catch (Exception e)
+        {
+            log.error("not supported charset...{}", e);
+            return s;
+        }
+    }
+
+
+    /**
+     * 获取一个文件的md5值(可处理大文件)
+     * @return md5 value
+     */
+    public static String getMD5(File file) {
+        FileInputStream fileInputStream = null;
+        try {
+            MessageDigest MD5 = MessageDigest.getInstance("MD5");
+            fileInputStream = new FileInputStream(file);
+            byte[] buffer = new byte[8192];
+            int length;
+            while ((length = fileInputStream.read(buffer)) != -1) {
+                MD5.update(buffer, 0, length);
+            }
+            return new String(Hex.encodeHex(MD5.digest()));
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        } finally {
+            try {
+                if (fileInputStream != null){
+                    fileInputStream.close();
+                }
+            } catch (IOException e) {
+                System.out.println(e.getMessage());
+            }
+        }
+    }
+}

+ 15 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/PublicTool.java

@@ -0,0 +1,15 @@
+package com.onemap.spotoverlap.utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class PublicTool {
+
+    public static Integer getDateYear(Date date){
+        return Integer.valueOf(new SimpleDateFormat("yyyy").format(date));
+    }
+
+    public static Integer getDateMonth(Date date){
+        return date.getMonth() + 1;
+    }
+}

+ 520 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/RInterfaceUtil.java

@@ -0,0 +1,520 @@
+package com.onemap.spotoverlap.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import com.onemap.common.core.utils.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.*;
+import org.apache.http.entity.BasicHttpEntity;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.entity.mime.HttpMultipartMode;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.entity.mime.content.StringBody;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.params.HttpParams;
+import org.apache.http.util.EntityUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.channels.FileChannel;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 调用厅里接口工具类
+ */
+public class RInterfaceUtil {
+    public static String Authorization = "Basic c2FiZXI6c2FiZXJfc2VjcmV0";
+    public static String TenantId = "000000";
+
+    public static long sliceSize = 10 * 1024 * 1024;
+
+    /**
+     * post调用远程接口
+     *
+     * @param url
+     * @param jsonParam access_token、param都为空时,为获取token请求
+     *                  access_token不为空 param为空时,为findByMd5Url请求
+     *                  access_token、param都不为空时,为上传文件请求
+     * @return
+     */
+    public static JSONObject postRemote(String access_token, String url, JSONObject jsonParam, Map<String, Object> param) {
+        //CloseableHttpClient closeableHttpClient = HttpClients.createDefault();
+        RequestConfig config = RequestConfig.custom()
+                .setConnectTimeout(0)
+                .setSocketTimeout(0)
+                .setConnectionRequestTimeout(0)
+                .build();
+        CloseableHttpClient closeableHttpClient = HttpClients.custom()
+                .setDefaultRequestConfig(config)
+                .build();
+        CloseableHttpResponse closeableHttpResponse = null;
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (param != null) {
+                //文件上传
+                ContentType ctype = ContentType.create("content-disposition", "UTF-8");
+                MultipartEntityBuilder mentity = MultipartEntityBuilder.create().setMode(HttpMultipartMode.RFC6532);
+                Set<String> keyset = param.keySet();
+                for (String key : keyset) {
+                    System.out.println("postRemote 文件上传参数:" + key + ":" + param.get(key));
+                    Object paramObj = param.get(key);
+                    if (paramObj != null) {
+                        if (paramObj instanceof MultipartFile) {
+                            mentity.addBinaryBody(key, ((MultipartFile) paramObj).getInputStream(), ctype, ((MultipartFile) paramObj).getOriginalFilename());
+                        } else if (paramObj instanceof File) {
+                            mentity.addBinaryBody(key, (File) paramObj);//(key, new FileInputStream((File)paramObj),ctype,((File)paramObj).getName());
+                        } else {
+                            mentity.addPart(key, new StringBody(paramObj.toString(), ctype));
+                        }
+                    }
+                }
+                HttpEntity entity = mentity.build();
+                HttpUriRequest post = RequestBuilder.post().setUri(url).setEntity(entity).build();
+                //设置HTTP访问header
+                post.setHeader("Authorization", access_token);
+//                post.addHeader("Tenant-Id", TenantId);
+//                if (StringUtils.isNotEmpty(access_token)) {
+//                    post.setHeader("Token-Auth", access_token);
+//                }
+                closeableHttpResponse = closeableHttpClient.execute(post);
+            } else {
+                //普通请求
+                HttpPost httpPost = new HttpPost(url);
+                //设置HTTP访问header
+                httpPost.setHeader("Authorization", access_token);
+//                httpPost.addHeader("Tenant-Id", TenantId);
+//                if (StringUtils.isNotEmpty(access_token)) {
+//                    httpPost.setHeader("Token-Auth", access_token);
+//                }
+                //设置请求参数
+                //StringEntity entity = new StringEntity(jsonParam.toString(), ContentType.create("text/json", "UTF-8"));
+                List<BasicNameValuePair> list = new ArrayList<BasicNameValuePair>();
+                StringEntity entity = new StringEntity(String.valueOf(jsonParam), ContentType.APPLICATION_JSON);
+                for (String str : jsonParam.keySet()) {
+                    list.add(new BasicNameValuePair(str, jsonParam.getString(str)));
+                    System.out.println(" key : str : " + str + " value : " + jsonParam.getString(str));
+                }
+                //创建参数集合
+                httpPost.setEntity(entity);
+//                httpPost.setEntity(new UrlEncodedFormEntity(list, "UTF-8"));
+                //配置请求时间、超时时间
+                RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build();
+                httpPost.setConfig(requestConfig);
+
+                //开始发送请求
+                closeableHttpResponse = closeableHttpClient.execute(httpPost);
+            }
+            //获取请求状态码
+            int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+            //请求状态码放入到返回json
+            jsonObject.put("code", statusCode);
+            if (statusCode != HttpStatus.SC_OK) {
+                //TODO:状态码非200代表没有正常返回,此处处理你的业务
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                try {
+                    //错误是否能解析成json,不能的话直接返回字符串到msg
+                    jsonObject = JSONObject.parseObject(asset_synchronization);
+                } catch (Exception e) {
+                    jsonObject.put("msg", asset_synchronization);
+                }
+            } else {
+                //返回值200
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                return JSONObject.parseObject(asset_synchronization);
+            }
+        } catch (IOException e) {
+            //程序异常返回值
+            jsonObject.put("code", -1);
+            jsonObject.put("msg", e.toString());
+            return jsonObject;
+        } finally {
+            if (closeableHttpResponse != null) {
+                try {
+                    //关闭http请求
+                    closeableHttpResponse.close();
+                } catch (IOException e) {
+                    System.out.println(e.toString());
+                }
+            }
+        }
+        System.out.println("postRemote jsonObject: " + jsonObject);
+        return jsonObject;
+    }
+
+    /**
+     * get调用远程接口
+     *
+     * @param url
+     * @param jsonParam access_token、param都为空时,为获取token请求
+     *                  access_token不为空 param为空时,为findByMd5Url请求
+     *                  access_token、param都不为空时,为上传文件请求
+     * @return
+     */
+    public static JSONObject getRemote(String access_token, String url, JSONObject jsonParam, Map<String, Object> param) {
+        RequestConfig config = RequestConfig.custom()
+                .setConnectTimeout(0)
+                .setSocketTimeout(0)
+                .setConnectionRequestTimeout(0)
+                .build();
+        CloseableHttpClient closeableHttpClient = HttpClients.custom()
+                .setDefaultRequestConfig(config)
+                .build();
+        CloseableHttpResponse closeableHttpResponse = null;
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (param != null) {
+                //文件上传
+                ContentType ctype = ContentType.create("content-disposition", "UTF-8");
+                MultipartEntityBuilder mentity = MultipartEntityBuilder.create().setMode(HttpMultipartMode.RFC6532);
+                Set<String> keyset = param.keySet();
+                for (String key : keyset) {
+                    System.out.println("postRemote 文件上传参数:" + key + ":" + param.get(key));
+                    Object paramObj = param.get(key);
+                    if (paramObj != null) {
+                        if (paramObj instanceof MultipartFile) {
+                            mentity.addBinaryBody(key, ((MultipartFile) paramObj).getInputStream(), ctype, ((MultipartFile) paramObj).getOriginalFilename());
+                        } else if (paramObj instanceof File) {
+                            mentity.addBinaryBody(key, (File) paramObj);
+                        } else {
+                            mentity.addPart(key, new StringBody(paramObj.toString(), ctype));
+                        }
+                    }
+                }
+                HttpEntity entity = mentity.build();
+                HttpUriRequest get = RequestBuilder.get().setUri(url).setEntity(entity).build();
+                //设置HTTP访问header
+                get.setHeader("Authorization", access_token);
+                closeableHttpResponse = closeableHttpClient.execute(get);
+            } else {
+                String newUrl = url + "?";
+                List<BasicNameValuePair> list = new ArrayList<BasicNameValuePair>();
+                HttpParams params = new BasicHttpParams();
+                for (String str : jsonParam.keySet()) {
+                    params.setParameter(str, jsonParam.get(str));
+                    newUrl += str + "=" + jsonParam.get(str) + "&";
+                    System.out.println(" key : str : " + str + " value : " + jsonParam.getString(str));
+                }
+                //普通请求
+                HttpGet httpGet = new HttpGet(newUrl);
+                //设置HTTP访问header
+                httpGet.setHeader("Authorization", access_token);
+//                httpGet.setParams(params);
+                //配置请求时间、超时时间
+                RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build();
+                httpGet.setConfig(requestConfig);
+                //开始发送请求
+                closeableHttpResponse = closeableHttpClient.execute(httpGet);
+            }
+            //获取请求状态码
+            int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+            //请求状态码放入到返回json
+            jsonObject.put("code", statusCode);
+            if (statusCode != HttpStatus.SC_OK) {
+                //TODO:状态码非200代表没有正常返回,此处处理你的业务
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                try {
+                    //错误是否能解析成json,不能的话直接返回字符串到msg
+                    jsonObject = JSONObject.parseObject(asset_synchronization);
+                } catch (Exception e) {
+                    jsonObject.put("msg", asset_synchronization);
+                }
+            } else {
+                //返回值200
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                return JSONObject.parseObject(asset_synchronization);
+            }
+        } catch (IOException e) {
+            //程序异常返回值
+            jsonObject.put("code", -1);
+            jsonObject.put("msg", e.toString());
+            return jsonObject;
+        } finally {
+            if (closeableHttpResponse != null) {
+                try {
+                    //关闭http请求
+                    closeableHttpResponse.close();
+                } catch (IOException e) {
+                    System.out.println(e.toString());
+                }
+            }
+        }
+        System.out.println("postRemote jsonObject: " + jsonObject);
+        return jsonObject;
+    }
+
+    /**
+     * get调用远程接口
+     *
+     * @param url
+     * @param jsonParam access_token、param都为空时,为获取token请求
+     *                  access_token不为空 param为空时,为findByMd5Url请求
+     *                  access_token、param都不为空时,为上传文件请求
+     * @return
+     */
+    public static JSONObject getRemoteByJson(String access_token, String url, JSONObject jsonParam, Map<String, Object> param) {
+        RequestConfig config = RequestConfig.custom()
+                .setConnectTimeout(0)
+                .setSocketTimeout(0)
+                .setConnectionRequestTimeout(0)
+                .build();
+        CloseableHttpClient closeableHttpClient = HttpClients.custom()
+                .setDefaultRequestConfig(config)
+                .build();
+        CloseableHttpResponse closeableHttpResponse = null;
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (param != null) {
+                //文件上传
+                ContentType ctype = ContentType.create("content-disposition", "UTF-8");
+                MultipartEntityBuilder mentity = MultipartEntityBuilder.create().setMode(HttpMultipartMode.RFC6532);
+                Set<String> keyset = param.keySet();
+                for (String key : keyset) {
+                    System.out.println("postRemote 文件上传参数:" + key + ":" + param.get(key));
+                    Object paramObj = param.get(key);
+                    if (paramObj != null) {
+                        if (paramObj instanceof MultipartFile) {
+                            mentity.addBinaryBody(key, ((MultipartFile) paramObj).getInputStream(), ctype, ((MultipartFile) paramObj).getOriginalFilename());
+                        } else if (paramObj instanceof File) {
+                            mentity.addBinaryBody(key, (File) paramObj);
+                        } else {
+                            mentity.addPart(key, new StringBody(paramObj.toString(), ctype));
+                        }
+                    }
+                }
+                HttpEntity entity = mentity.build();
+                HttpUriRequest get = RequestBuilder.get().setUri(url).setEntity(entity).build();
+                //设置HTTP访问header
+                get.setHeader("Authorization", access_token);
+                closeableHttpResponse = closeableHttpClient.execute(get);
+            } else {
+                List<BasicNameValuePair> list = new ArrayList<BasicNameValuePair>();
+                HttpParams params = new BasicHttpParams();
+                for (String str : jsonParam.keySet()) {
+                    params.setParameter(str, jsonParam.getString(str));
+                    System.out.println(" key : str : " + str + " value : " + jsonParam.getString(str));
+                }
+                //普通请求
+                HttpGet httpGet = new HttpGet(url);
+                //设置HTTP访问header
+                httpGet.setHeader("Authorization", access_token);
+                httpGet.setParams(params);
+                //配置请求时间、超时时间
+                RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build();
+                httpGet.setConfig(requestConfig);
+                //开始发送请求
+                closeableHttpResponse = closeableHttpClient.execute(httpGet);
+            }
+            //获取请求状态码
+            int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+            //请求状态码放入到返回json
+            jsonObject.put("code", statusCode);
+            if (statusCode != HttpStatus.SC_OK) {
+                //TODO:状态码非200代表没有正常返回,此处处理你的业务
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                try {
+                    //错误是否能解析成json,不能的话直接返回字符串到msg
+                    jsonObject = JSONObject.parseObject(asset_synchronization);
+                } catch (Exception e) {
+                    jsonObject.put("msg", asset_synchronization);
+                }
+            } else {
+                //返回值200
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                return JSONObject.parseObject(asset_synchronization);
+            }
+        } catch (IOException e) {
+            //程序异常返回值
+            jsonObject.put("code", -1);
+            jsonObject.put("msg", e.toString());
+            return jsonObject;
+        } finally {
+            if (closeableHttpResponse != null) {
+                try {
+                    //关闭http请求
+                    closeableHttpResponse.close();
+                } catch (IOException e) {
+                    System.out.println(e.toString());
+                }
+            }
+        }
+        System.out.println("postRemote jsonObject: " + jsonObject);
+        return jsonObject;
+    }
+
+    /**
+     * 调用远程文件流接口
+     *
+     * @param url
+     * @param jsonParam access_token、param都为空时,为获取token请求
+     *                  access_token不为空 param为空时,为gfindByMd5Url请求
+     *                  access_token、param都不为空时,为上传文件请求
+     * @return
+     */
+    public static JSONObject postRemoteFile(String access_token, String url, JSONObject jsonParam, Map<String, Object> param, HttpServletResponse response) {
+        CloseableHttpClient closeableHttpClient = HttpClients.createDefault();
+        CloseableHttpResponse closeableHttpResponse = null;
+        JSONObject jsonObject = new JSONObject();
+        try {
+            if (param != null) {
+                //文件上传
+                ContentType ctype = ContentType.create("content-disposition", "UTF-8");
+                MultipartEntityBuilder mentity = MultipartEntityBuilder.create().setMode(HttpMultipartMode.RFC6532);
+                Set<String> keyset = param.keySet();
+                for (String key : keyset) {
+                    System.out.println("postRemote 文件上传参数:" + key + ":" + param.get(key));
+                    Object paramObj = param.get(key);
+                    if (paramObj != null) {
+                        if (paramObj instanceof MultipartFile) {
+                            mentity.addBinaryBody(key, ((MultipartFile) paramObj).getInputStream(), ctype, ((MultipartFile) paramObj).getOriginalFilename());
+                        } else if (paramObj instanceof File) {
+                            mentity.addBinaryBody(key, (File) paramObj);//(key, new FileInputStream((File)paramObj),ctype,((File)paramObj).getName());
+                        } else {
+                            mentity.addPart(key, new StringBody(paramObj.toString(), ctype));
+                        }
+                    }
+                }
+                HttpEntity entity = mentity.build();
+                HttpUriRequest post = RequestBuilder.post().setUri(url).setEntity(entity).build();
+                //设置HTTP访问header
+                post.setHeader("Authorization", access_token);
+//                post.addHeader("Tenant-Id", TenantId);
+//                if (StringUtils.isNotEmpty(access_token)) {
+//                    post.setHeader("Token-Auth", access_token);
+//                }
+                closeableHttpResponse = closeableHttpClient.execute(post);
+            } else {
+                //普通请求
+                HttpPost httpPost = new HttpPost(url);
+                //设置HTTP访问header
+                httpPost.setHeader("Authorization", access_token);
+//                httpPost.addHeader("Tenant-Id", TenantId);
+//                if (StringUtils.isNotEmpty(access_token)) {
+//                    httpPost.setHeader("Token-Auth", access_token);
+//                }
+                //设置请求参数
+                //StringEntity entity = new StringEntity(jsonParam.toString(), ContentType.create("text/json", "UTF-8"));
+                List<BasicNameValuePair> list = new ArrayList<BasicNameValuePair>();
+                for (String str : jsonParam.keySet()) {
+                    list.add(new BasicNameValuePair(str, jsonParam.getString(str)));
+                    System.out.println(" key : str : " + str + " value : " + jsonParam.getString(str));
+                }
+                //创建参数集合
+                httpPost.setEntity(new UrlEncodedFormEntity(list, "UTF-8"));
+                //配置请求时间、超时时间
+                RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build();
+                httpPost.setConfig(requestConfig);
+
+                //开始发送请求
+                closeableHttpResponse = closeableHttpClient.execute(httpPost);
+            }
+            //获取请求状态码
+            int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+            //请求状态码放入到返回json
+            jsonObject.put("code", statusCode);
+            if (statusCode != HttpStatus.SC_OK) {
+                //TODO:状态码非200代表没有正常返回,此处处理你的业务
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                try {
+                    //错误是否能解析成json,不能的话直接返回字符串到msg
+                    jsonObject = JSONObject.parseObject(asset_synchronization);
+                } catch (Exception e) {
+                    jsonObject.put("msg", asset_synchronization);
+                }
+            } else {
+                //返回值200
+                HttpEntity httpEntity = closeableHttpResponse.getEntity();
+                String responseType = httpEntity.getContentType().getValue();
+                if (responseType.contains("zip")) {
+                    byte[] outstream = EntityUtils.toByteArray(httpEntity);
+                    response.getOutputStream().write(outstream);
+                    response.getOutputStream().close();
+                    return null;
+                } else {
+                    String asset_synchronization = EntityUtils.toString(httpEntity, "UTF-8");
+                    return JSONObject.parseObject(asset_synchronization);
+                }
+            }
+        } catch (IOException e) {
+            //程序异常返回值
+            jsonObject.put("code", -1);
+            jsonObject.put("msg", e.toString());
+            return jsonObject;
+        } finally {
+            if (closeableHttpResponse != null) {
+                try {
+                    //关闭http请求
+                    closeableHttpResponse.close();
+                } catch (IOException e) {
+                    System.out.println(e.toString());
+                }
+            }
+        }
+        System.out.println("postRemote jsonObject: " + jsonObject);
+        return jsonObject;
+    }
+
+    /**
+     * 切割文件
+     *
+     * @param fromFileName 源文件的完整路径带文件名
+     * @param toFileName   目标文件的完整路径带文件名
+     * @return
+     * @throws IOException
+     */
+    public static long spilt(String fromFileName, String toFileName, String splice) throws IOException {
+        long curSliceSize = 0;
+        File f = new File(fromFileName);
+        FileInputStream in = new FileInputStream(f);
+        FileOutputStream out = null;
+        FileChannel inChannel = in.getChannel();
+        FileChannel outChannel = null;
+        // 计算最终会分成几个文件
+        int count = (int) (f.length() / sliceSize);
+        for (int i = 0; i <= count; i++) {
+            // 生成文件的路径
+            String t = toFileName + splice + i;
+            try {
+                out = new FileOutputStream(new File(t));
+                outChannel = out.getChannel();
+                // 从inChannel的m*i处,读取固定长度的数据,写入outChannel
+                if (i != count) {
+                    curSliceSize = sliceSize;
+                    inChannel.transferTo(sliceSize * i, curSliceSize, outChannel);
+                } else {// 最后一个文件,大小不固定,所以需要重新计算长度
+                    curSliceSize = f.length() - sliceSize * count;
+                    inChannel.transferTo(sliceSize * i, curSliceSize, outChannel);
+                }
+            } catch (IOException e) {
+                System.out.println(e.toString());
+                return curSliceSize;
+            } finally {
+                out.close();
+                outChannel.close();
+            }
+        }
+        in.close();
+        inChannel.close();
+        return curSliceSize;
+    }
+}

+ 206 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ShpToPostGISWithReproject.java

@@ -0,0 +1,206 @@
+package com.onemap.spotoverlap.utils;
+
+import com.alibaba.fastjson2.JSON;
+import org.geotools.data.DataStore;
+import org.geotools.data.DataStoreFinder;
+import org.geotools.data.FeatureWriter;
+import org.geotools.data.Transaction;
+import org.geotools.data.postgis.PostgisNGDataStoreFactory;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.data.simple.SimpleFeatureIterator;
+import org.geotools.data.simple.SimpleFeatureSource;
+import org.geotools.data.simple.SimpleFeatureStore;
+import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
+import org.geotools.geometry.jts.JTS;
+import org.geotools.jdbc.SQLDialect;
+import org.geotools.referencing.CRS;
+import org.json.simple.JSONObject;
+import org.locationtech.jts.geom.Geometry;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.TransformException;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.nio.charset.Charset;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+public class ShpToPostGISWithReproject {
+
+    /**
+     * 将Shapefile导入PostGIS并转换到指定坐标系
+     *
+     * @param shpFilePath        Shapefile文件路径
+     * @param tableName          目标表名
+     * @param targetCRS          目标坐标系EPSG代码(如"EPSG:4326")
+     * @param createSpatialIndex 是否创建空间索引
+     */
+    public static void importShpToPostGISWithReproject(
+            String shpFilePath,
+            String tableName,
+            String targetCRS,
+            boolean createSpatialIndex) throws IOException, FactoryException, TransformException {
+
+        // 1. 读取Shapefile文件
+        File shpFile = new File(shpFilePath);
+        ShapefileDataStore shpDataStore = new ShapefileDataStore(shpFile.toURI().toURL());
+        shpDataStore.setCharset(Charset.forName("UTF-8"));
+
+        // 获取源特征类型和特征集合
+        SimpleFeatureSource featureSource = shpDataStore.getFeatureSource();
+        SimpleFeatureType sourceSchema = featureSource.getSchema();
+        SimpleFeatureCollection featureCollection = featureSource.getFeatures();
+
+        // 2. 准备坐标系转换
+        CoordinateReferenceSystem sourceCrs = sourceSchema.getCoordinateReferenceSystem();
+        CoordinateReferenceSystem targetCrs = CRS.decode(targetCRS);
+
+        // 检查是否需要坐标转换
+        boolean needsReproject = !CRS.equalsIgnoreMetadata(sourceCrs, targetCrs);
+        MathTransform transform = needsReproject ? CRS.findMathTransform(sourceCrs, targetCrs, true) : null;
+
+        // 3. 创建目标特征类型(使用新的坐标系)
+        SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
+        typeBuilder.init(sourceSchema);
+        typeBuilder.setName(tableName);
+        typeBuilder.setCRS(targetCrs);
+        // 将the_geom重命名为geom
+//        typeBuilder.setDefaultGeometry("geom");
+//        typeBuilder.remove("the_geom");
+//        typeBuilder.add("geom", sourceSchema.getGeometryDescriptor().getType().getBinding());
+        SimpleFeatureType targetSchema = typeBuilder.buildFeatureType();
+
+        // 4. 准备PostGIS数据存储连接参数
+        Map<String, Serializable> params = new HashMap<>();
+        params.put(PostgisNGDataStoreFactory.DBTYPE.key, "postgis");
+        params.put(PostgisNGDataStoreFactory.HOST.key, "127.0.0.1");
+        params.put(PostgisNGDataStoreFactory.PORT.key, 5432);
+        params.put(PostgisNGDataStoreFactory.DATABASE.key, "spot");
+        params.put(PostgisNGDataStoreFactory.SCHEMA.key, "public");
+        params.put(PostgisNGDataStoreFactory.USER.key, "postgres");
+        params.put(PostgisNGDataStoreFactory.PASSWD.key, "postgres");
+
+        DataStore postgisDataStore = DataStoreFinder.getDataStore(params);
+        if (postgisDataStore == null) {
+            throw new IOException("无法连接到PostGIS数据库,请检查连接参数");
+        }
+
+        // 5. 创建目标表(如果不存在)
+        if (!Arrays.asList(postgisDataStore.getTypeNames()).contains(tableName)) {
+            postgisDataStore.createSchema(targetSchema);
+        }
+
+
+        // 6. 获取目标特征存储
+        SimpleFeatureStore featureStore = (SimpleFeatureStore) postgisDataStore.getFeatureSource(tableName);
+        featureStore.setTransaction(Transaction.AUTO_COMMIT);
+
+        // 7. 导入数据(带坐标系转换)
+        try (SimpleFeatureIterator iterator = featureCollection.features()) {
+            try (FeatureWriter<SimpleFeatureType, SimpleFeature> writer =
+                         postgisDataStore.getFeatureWriterAppend(tableName, Transaction.AUTO_COMMIT)) {
+
+                while (iterator.hasNext()) {
+                    SimpleFeature sourceFeature = iterator.next();
+                    SimpleFeature targetFeature = writer.next();
+
+                    sourceFeature.getAttributes().remove(0);
+                    // 复制所有属性
+                    targetFeature.setAttributes(sourceFeature.getAttributes());
+
+                    // 处理几何字段(进行坐标转换)
+                    Geometry geometry = (Geometry) sourceFeature.getDefaultGeometry();
+                    if (geometry != null && needsReproject) {
+                        Geometry transformedGeometry = JTS.transform(geometry, transform);
+                        targetFeature.setDefaultGeometry(transformedGeometry);
+                    } else {
+                        targetFeature.setDefaultGeometry(geometry);
+                    }
+
+                    writer.write();
+                }
+            }
+        }
+
+        // 8. 可选:创建空间索引
+        if (createSpatialIndex) {
+            createSpatialIndex(postgisDataStore, tableName);
+        }
+
+        //TODO wanger 查询表是否含有the_geom字段
+        //select count(1) as count from information_schema.columns where table_schema = 'public' and table_name = 'imported_features_432666'  and column_name = 'the_geom';
+        //TODO wanger 修改表结构
+        //alter table "imported_features_432666" rename column the_geom TO geom;
+        //TODO wanger 创建空间索引
+        //create index idx_imported_features_432666_geom on imported_features_432666 using gist (geom)
+        System.out.println("Shapefile导入成功,共导入 " + featureCollection.size() + " 条记录");
+        System.out.println("目标坐标系: " + targetCRS);
+
+        // 9. 关闭数据存储
+        shpDataStore.dispose();
+        postgisDataStore.dispose();
+    }
+
+    private static Map jsonToMap(String params) {
+        JSONObject jsonObject = (JSONObject) JSON.parse(params);
+        // 将JSONObject转换为Map
+        Map<String, Object> map = new HashMap<>();
+        Iterator<?> keys = (Iterator<?>) jsonObject.keySet();
+        while(keys.hasNext()) {
+            String key = (String)keys.next();
+            map.put(key, jsonObject.get(key));
+        }
+        return map;
+    }
+
+    /**
+     * 在PostGIS中创建空间索引
+     */
+    private static void createSpatialIndex(DataStore dataStore, String tableName) throws IOException {
+//        SimpleFeatureType schema = dataStore.getSchema(tableName);
+//        String geomColumn = schema.getGeometryDescriptor().getLocalName();
+//
+//        // 使用SQL直接创建索引
+//        String sql = "CREATE INDEX idx_" + tableName + "_geom ON " + tableName + " USING GIST (" + geomColumn + ")";
+//
+//        try {
+//            // 使用PostGIS数据存储的SQL执行能力
+//            ((SQLDialect)dataStore).getConnection().createStatement().execute(sql);
+//            System.out.println("空间索引创建成功: " + sql);
+//        } catch (Exception e) {
+//            System.err.println("创建空间索引失败: " + e.getMessage());
+//        }
+    }
+
+    /**
+     * 获取表的几何列名
+     */
+//    private static String getGeometryColumn(DataStore dataStore, String tableName) throws IOException {
+//        SimpleFeatureType schema = dataStore.getSchema(tableName);
+//        return schema.getGeometryDescriptor().getLocalName();
+//    }
+
+    public static void main(String[] args) {
+        try {
+            // 示例用法
+            String shpFilePath = "D:\\gisdata\\hainanShp\\村界\\村.shp";
+            String tableName = "imported_features_4525_2";
+            String targetCRS = "EPSG:4525"; // Web墨卡托投影
+
+            importShpToPostGISWithReproject(shpFilePath, tableName, targetCRS, true);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 197 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ShpToSpatiaLite.java

@@ -0,0 +1,197 @@
+package com.onemap.spotoverlap.utils;
+
+import com.onemap.common.core.utils.StringUtils;
+import org.geotools.data.DataStore;
+import org.geotools.data.DataStoreFinder;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.data.simple.SimpleFeatureIterator;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+import org.springframework.beans.factory.annotation.Value;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class ShpToSpatiaLite {
+
+
+//    public static void main(String[] args) throws Exception {
+//        String shapefilePath = "D:\\temp\\ccs.shp";
+//        String spatialiteDbPath = "D:\\temp\\mappatchcheck.sqlite";
+//        // TODO 1. 连接到 Spatialite 数据库
+//        Connection conn = SpatialiteUtils.getSpatialiteConnection(spatialiteDbPath);
+//        // TODO 2. 解析 Shapefile 数据
+//        File shapefile = new File(shapefilePath);
+//        DataStore dataStore = DataStoreFinder.getDataStore(Collections.singletonMap("url", shapefile.toURI().toURL()));
+//        String typeName = dataStore.getTypeNames()[0];  // 获取第一个图层的名称
+//        SimpleFeatureCollection featureCollection = dataStore.getFeatureSource(typeName).getFeatures();
+//        //TODO  3. 创建表结构
+//        createSpatialTable(conn, typeName, featureCollection);
+//        // TODO 4. 遍历每个要素并插入数据
+//        insertFeaturesToSpatialite(conn, featureCollection, typeName);
+//        // TODO 5. 为几何字段创建空间索引
+//        createSpatialIndex(conn, typeName);
+//        // TODO 6. 关闭数据库连接
+//        conn.close();
+//    }
+
+    /**
+     * 导入shp到spatialite
+     *
+     * @param dbpath    sqlite文件位置
+     * @param shppath   shp文件路径
+     * @param wkid      坐标系
+     * @param tablename 入库表名
+     * @return
+     * @throws Exception
+     */
+    public static Boolean ImportShpToSpatialite(String dbpath, String shppath, Integer wkid, String tablename, String ufield) {
+        Connection conn = null;
+        try {
+            String shapefilePath = shppath;
+            String spatialiteDbPath = dbpath;
+            // TODO 1. 连接到 Spatialite 数据库
+            conn = SpatialiteUtils.getSpatialiteConnection(spatialiteDbPath);
+            // TODO 2. 解析 Shapefile 数据
+            File shapefile = new File(shapefilePath);
+            DataStore dataStore = DataStoreFinder.getDataStore(Collections.singletonMap("url", shapefile.toURI().toURL()));
+            ShapefileDataStore shapefileDataStore = (ShapefileDataStore) dataStore;
+            // 设置字符编码为 GBK,避免乱码
+            shapefileDataStore.setCharset(Charset.forName("GBK"));
+            String typeName = shapefileDataStore.getTypeNames()[0];  // 获取第一个图层的名称
+            SimpleFeatureCollection featureCollection = shapefileDataStore.getFeatureSource(typeName).getFeatures();
+            //TODO  3. 创建表结构
+            createSpatialTable(conn, tablename, featureCollection, ufield);
+            // TODO 4. 遍历每个要素并插入数据
+            insertFeaturesToSpatialite(conn, featureCollection, tablename, wkid, ufield);
+            // TODO 5. 为几何字段创建空间索引
+            createSpatialIndex(conn, tablename);
+            // TODO 6. 关闭数据库连接
+            conn.close();
+            return true;
+        } catch (Exception e) {
+            if (conn != null) {
+                //conn.close();
+            }
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    /**
+     * 获取shp文件字段集合
+     *
+     * @param shppath shp文件路径
+     * @return
+     * @throws Exception
+     */
+    public static List<String> getShpFields(String shppath, String charset) {
+        List<String> fields = new ArrayList<>();
+        if (StringUtils.isNotEmpty(shppath)) {
+            try {
+                File shapefile = new File(shppath);
+                ShapefileDataStore dataStore = null;
+                dataStore = (ShapefileDataStore) DataStoreFinder.getDataStore(Collections.singletonMap("url", shapefile.toURI().toURL()));
+                // 设置字符编码为 GBK,避免乱码
+                dataStore.setCharset(Charset.forName(charset));
+                SimpleFeatureType featureType = dataStore.getSchema();
+                for (int i = 0; i < featureType.getAttributeCount(); i++) {
+                    String fieldName = featureType.getDescriptor(i).getName().getLocalPart();
+                    fields.add(fieldName);
+                }
+            } catch (IOException e) {
+//            e.printStackTrace();
+                System.out.println("shppath参数为空!");
+            }
+        }
+        return fields;
+    }
+
+    // 3. 创建空间表结构
+    public static void createSpatialTable(Connection conn, String tableName, SimpleFeatureCollection featureCollection, String ufield) throws SQLException {
+        SimpleFeatureType featureType = featureCollection.getSchema();
+        StringBuilder createTableSQL = new StringBuilder();
+        Statement stmt = conn.createStatement();
+        stmt.execute("drop table if exists '" + tableName + "';");
+        // 创建表结构,注意字段名称和类型要根据实际的 FeatureType 构建
+        createTableSQL.append("CREATE TABLE ").append(tableName).append(" (");
+        // 遍历属性字段,构建 SQL 表字段
+        for (int i = 0; i < featureType.getAttributeCount(); i++) {
+            String fieldName = featureType.getDescriptor(i).getName().getLocalPart();
+            if (fieldName.toLowerCase().contains("geom")) {
+                continue;
+            }
+            String fieldType = "TEXT";  // 默认字段类型,GeoTools 可以根据字段类型调整
+            // 根据字段类型调整
+            if (featureType.getDescriptor(i).getType().getBinding().equals(Integer.class)) {
+                fieldType = "INTEGER";
+            } else if (featureType.getDescriptor(i).getType().getBinding().equals(Double.class)) {
+                fieldType = "REAL";
+            } else if (featureType.getDescriptor(i).getType().getBinding().equals(String.class)) {
+                fieldType = "TEXT";
+            }
+            createTableSQL.append(fieldName).append(" ").append(fieldType).append(",");
+        }
+        // 添加swid
+        createTableSQL.append("swid TEXT").append(",");
+        // 添加几何列
+        createTableSQL.append("geom GEOMETRY");
+        createTableSQL.append(");");
+        stmt.execute(createTableSQL.toString());
+//        stmt.execute("SELECT CreateSpatialIndex('" + tableName + "', 'geom');");
+    }
+
+    // 4. 遍历要素并插入数据
+    public static void insertFeaturesToSpatialite(Connection conn, SimpleFeatureCollection featureCollection, String tableName, Integer wkid, String ufield) throws SQLException {
+        StringBuilder fields = new StringBuilder();
+        Statement stmt = conn.createStatement();
+        SimpleFeatureType featureType = featureCollection.getSchema();
+        for (int i = 0; i < featureType.getAttributeCount(); i++) {
+            String fieldName = featureType.getDescriptor(i).getName().getLocalPart();
+            if (fieldName.toLowerCase().contains("geom")) {
+                continue;
+            }
+            fields.append(fieldName).append(",");
+        }
+        fields.append("swid").append(",");
+        // 去除末尾的逗号
+        fields.append("geom");
+        // 遍历所有要素
+        SimpleFeatureIterator iterator = featureCollection.features();
+        while (iterator.hasNext()) {
+            SimpleFeature feature = iterator.next();
+            // 为每个字段设置值
+            StringBuilder current = new StringBuilder();
+            for (int i = 0; i < featureType.getAttributeCount(); i++) {
+                String fieldName = featureType.getDescriptor(i).getName().getLocalPart();
+                if (fieldName.toLowerCase().contains("geom")) {
+                    continue;
+                }
+                Object value = feature.getAttribute(i);
+                current.append("'" + value + "'").append(",");
+            }
+            //swid处理
+            Object value = feature.getAttribute(ufield);
+            current.append("'" + value + "'").append(",");
+            Object geometry = feature.getDefaultGeometry();
+            String sql = "INSERT INTO " + tableName + " (" + fields.toString() + ") VALUES (" + current.toString() + "GeomFromText('" + geometry + "', " + wkid + "))";
+            stmt.executeUpdate(sql);
+        }
+        String sql = "select recovergeometrycolumn('" + tableName + "', 'geom', " + wkid + ", 'MULTIPOLYGON', 'XY')";
+        stmt.executeUpdate(sql);
+    }
+
+    // 5. 创建空间索引
+    public static void createSpatialIndex(Connection conn, String tableName) throws SQLException {
+        Statement stmt = conn.createStatement();
+        stmt.execute("SELECT CreateSpatialIndex('" + tableName + "', 'geom');");
+    }
+}

+ 76 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/SpatiaLiteToShapefile.java

@@ -0,0 +1,76 @@
+package com.onemap.spotoverlap.utils;
+
+import org.geotools.data.FeatureWriter;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.geotools.feature.DefaultFeatureCollection;
+import org.geotools.feature.simple.SimpleFeatureBuilder;
+import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
+import org.geotools.referencing.CRS;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.MultiPolygon;
+import org.locationtech.jts.io.WKTReader;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+import java.io.File;
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class SpatiaLiteToShapefile {
+    public static void execute(List<String> fields, String shppath, Integer epsg, List<Map<String, Object>> tableDetail) throws Exception {
+        File file = new File(shppath);
+        String srid = "EPSG:" + epsg;
+        SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
+        builder.setName("");
+        CoordinateReferenceSystem crs = CRS.decode(srid);
+        builder.setCRS(crs);
+        builder.add("geometry", MultiPolygon.class);
+        for (int i = 0; i < fields.size(); i++) {
+            builder.add(fields.get(i), String.class);
+        }
+        SimpleFeatureType featureType = builder.buildFeatureType();
+        // 创建数据存储对象
+        URI uri = file.toURI();
+        ShapefileDataStore dataStore = new ShapefileDataStore(uri.toURL());
+        // 设置字符编码为 UTF-8,避免中文乱码
+        dataStore.setCharset(StandardCharsets.UTF_8);
+        // 设置数据存储的特征类型
+        dataStore.createSchema(featureType);
+        // 创建特征集合
+        SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(featureType);
+        DefaultFeatureCollection featureCollection = new DefaultFeatureCollection();
+        // 创建几个简单的点特征
+        List<SimpleFeature> features = new ArrayList<>();
+        for (Map cur : tableDetail) {
+            //读取转换WKT
+            WKTReader wktReader = new WKTReader();
+            String wkt = String.valueOf(cur.get("geomstr"));
+            // 使用 WKTReader 将 WKT 字符串解析为 Geometry 对象
+            Geometry geometry = wktReader.read(wkt);
+            featureBuilder.add(geometry);
+            SimpleFeature feature = featureBuilder.buildFeature(null);
+            for (int i = 0; i < fields.size(); i++) {
+                feature.setAttribute(fields.get(i), String.valueOf(cur.get(fields.get(i))));
+            }
+            features.add(feature);
+            featureCollection.add(feature);
+        }
+        String typename = dataStore.getTypeNames()[0];
+        try (FeatureWriter<SimpleFeatureType, SimpleFeature> writer = dataStore.getFeatureWriter(typename, null)) {
+            for (SimpleFeature feature : features) {
+                SimpleFeature nextFeature = writer.next();
+                nextFeature.setAttributes(feature.getAttributes());
+                writer.write();
+            }
+        }
+        System.out.println("Shapefile created at: " + file.getAbsolutePath());
+    }
+}

+ 21 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/SpatialiteUtils.java

@@ -0,0 +1,21 @@
+package com.onemap.spotoverlap.utils;
+
+import org.sqlite.SQLiteConfig;
+
+import java.sql.Connection;
+import java.sql.Statement;
+
+public class SpatialiteUtils {
+    public static Connection getSpatialiteConnection(String dbFile) throws Exception {
+        Class.forName("org.sqlite.JDBC");
+        Connection conn = null;
+//        System.out.println(org.sqlite.SQLiteJDBCLoader.getVersion());
+        SQLiteConfig config = new SQLiteConfig();
+        config.enableLoadExtension(true);
+        conn = config.createConnection("jdbc:sqlite:" + dbFile);
+        Statement stmt = conn.createStatement();
+        stmt.setQueryTimeout(30000000);
+        stmt.execute("SELECT load_extension('mod_spatialite')");
+        return conn;
+    }
+}

+ 81 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/UnPackageUtils.java

@@ -0,0 +1,81 @@
+package com.onemap.spotoverlap.utils;
+
+
+import com.github.junrar.Archive;
+import com.github.junrar.rarfile.FileHeader;
+import net.lingala.zip4j.core.ZipFile;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+/**
+ * @author : wangping
+ * @createDate: 2021/7/12
+ * @description:解压缩工具
+ **/
+
+
+public class UnPackageUtils {
+
+    /**
+     * zip文件解压
+     *
+     * @param destPath 解压文件路径
+     * @param zipFile  压缩文件
+     *                 //* @param password 解压密码(如果有)
+     */
+    public static void unPackZip(File zipFile, String destPath) {
+
+        try {
+            ZipFile zip = new ZipFile(zipFile);
+            /*zip4j默认用GBK编码去解压,这里设置编码为GBK的*/
+            zip.setFileNameCharset("GBK");
+            zip.extractAll(destPath);
+
+            // 如果解压需要密码
+//            if (zip.isEncrypted()) {
+//                zip.setPassword(password);
+//            }
+        } catch (Exception e) {
+        }
+    }
+
+    /**
+     * rar文件解压(不支持有密码的压缩包)
+     *
+     * @param rarFile  rar压缩包
+     * @param destPath 解压保存路径
+     */
+    public static void unPackRar(File rarFile, String destPath) {
+        try (Archive archive = new Archive(rarFile)) {
+            if (null != archive) {
+                FileHeader fileHeader = archive.nextFileHeader();
+                File file = null;
+                while (null != fileHeader) {
+                    // 防止文件名中文乱码问题的处理
+                    String fileName = fileHeader.getFileNameW().isEmpty() ? fileHeader.getFileNameString() : fileHeader.getFileNameW();
+                    if (fileHeader.isDirectory()) {
+                        //是文件夹
+                        file = new File(destPath + File.separator + fileName);
+                        file.mkdirs();
+                    } else {
+                        //不是文件夹
+                        file = new File(destPath + File.separator + fileName.trim());
+                        if (!file.exists()) {
+                            if (!file.getParentFile().exists()) {
+                                // 相对路径可能多级,可能需要创建父目录.
+                                file.getParentFile().mkdirs();
+                            }
+                            file.createNewFile();
+                        }
+                        FileOutputStream os = new FileOutputStream(file);
+                        archive.extractFile(fileHeader, os);
+                        os.close();
+                    }
+                    fileHeader = archive.nextFileHeader();
+                }
+            }
+        } catch (Exception e) {
+        }
+    }
+}

+ 117 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/WordExport.java

@@ -0,0 +1,117 @@
+package com.onemap.spotoverlap.utils;
+
+import com.onemap.spotoverlap.domain.yzt.analyseModel;
+import com.onemap.spotoverlap.domain.yzt.hfxjg;
+import org.apache.poi.xwpf.usermodel.*;
+
+import java.io.FileOutputStream;
+import java.sql.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class WordExport {
+    public static Boolean export(List<String> fields, String filepath, List<Map<String, Object>> tableDetail, String modelname, String[] exportField, String layername, List<hfxjg> Hfxpd, List<analyseModel> analyseModels) {
+        try {
+            // 创建一个空的Word文档
+            XWPFDocument document = new XWPFDocument();
+            // 插入标题
+            XWPFParagraph titleParagraph = document.createParagraph();
+            titleParagraph.setAlignment(ParagraphAlignment.CENTER); // 标题居中
+            XWPFRun titleRun = titleParagraph.createRun();
+            titleRun.setText(layername + "检查报告");
+            titleRun.setBold(true); // 设置加粗
+            titleRun.setFontSize(20); // 设置字体大小
+            // 分析总览段落
+            Integer totalcount = 0;
+            String str = "";
+            for(hfxjg cur : Hfxpd) {
+                Integer count = cur.getCount();
+                String type = cur.getType();
+                totalcount += count;
+                str += count + "个" + type + "图斑,";
+            }
+            String totalstr = "本次检查共计" + totalcount + "个图斑,其中" + str.substring(0, str.length() - 1) + "。";
+            XWPFParagraph textParagraph = document.createParagraph();
+            textParagraph.setIndentationFirstLine(480); // 2个字符的首行缩进(1个字符约240的单位,480表示2个字符)
+            XWPFRun textRun = textParagraph.createRun();
+            textRun.setText(totalstr);
+            // 分析图斑详情介绍
+            List<String> sqlOverlap = new ArrayList<>();
+            for(analyseModel cur: analyseModels) {
+                sqlOverlap.add(cur.getLayername());
+            }
+            String details = "其中";
+            // 根据每一项数据进行汇总分析
+            for (int i = 0; i < sqlOverlap.size(); i++) {
+                String curLayer = sqlOverlap.get(i);
+                Integer count = 0;
+                Double totalMj = 0.0;
+                for (int u = 0; u < tableDetail.size(); u++) {
+                    Map<String, Object> curMap = tableDetail.get(u);
+                    String hfxsm = String.valueOf(curMap.get("合法性说明"));
+                    String mj = String.valueOf(curMap.get("面积"));
+                    if (hfxsm.contains(curLayer)) {
+                        count += 1;
+                        totalMj += Double.valueOf(mj.split(";")[i]);
+                    }
+                }
+                totalMj = totalMj / 667;
+                String formattedValue = String.format("%.2f", totalMj);
+                details += curLayer + "内疑似违法图斑" + count + "个,疑似违法面积" + formattedValue + "亩。";
+            }
+            XWPFParagraph textParagraph2 = document.createParagraph();
+            textParagraph2.setIndentationFirstLine(480); // 2个字符的首行缩进(1个字符约240的单位,480表示2个字符)
+            XWPFRun textRun2 = textParagraph2.createRun();
+            textRun2.setText(details);
+            // 插入一个表格
+            XWPFTable table = document.createTable();
+            // 设置表格居中
+            table.setTableAlignment(TableRowAlign.CENTER); // 设置表格居中
+            // 设置表格宽度占满整页
+            table.setWidth(9000); // 设置表格宽度为10000个单位,最大为10000,占满页面
+            // 在表格中添加数据
+            XWPFTableRow row1 = table.getRow(0);
+            row1.getCell(0).setText(exportField[0]);
+            for (int i = 1; i < exportField.length; i++) {
+                row1.createCell().setText(exportField[i]);
+            }
+            for (int i = 0; i < tableDetail.size(); i++) {
+                XWPFTableRow row2 = table.createRow();
+                Map<String, Object> curMap = tableDetail.get(i);
+                for (int u = 0; u < exportField.length; u++) {
+                    row2.getCell(u).setText(String.valueOf(curMap.get(exportField[u])));
+                }
+            }
+            // 将文档保存到本地文件
+            try (FileOutputStream out = new FileOutputStream(filepath)) {
+                document.write(out);
+            }
+            System.out.println("Word文档已生成!");
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return false;
+    }
+
+    // 将ResultSet转换为List<Map<String, Object>>
+    public static List<Map<String, Object>> resultSetToMap(ResultSet rs) throws Exception {
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        // 获取 ResultSet 的元数据(列名信息)
+        ResultSetMetaData metaData = rs.getMetaData();
+        int columnCount = metaData.getColumnCount();
+        // 处理每一行数据
+        while (rs.next()) {
+            Map<String, Object> rowMap = new HashMap<>();
+            for (int i = 1; i <= columnCount; i++) {
+                String columnName = metaData.getColumnLabel(i); // 获取列名
+                Object columnValue = rs.getObject(i); // 获取列值
+                rowMap.put(columnName, columnValue);
+            }
+            resultList.add(rowMap);
+        }
+        return resultList;
+    }
+}

+ 175 - 0
onemap-modules/onemap-spotoverlap/src/main/java/com/onemap/spotoverlap/utils/ZipDownload.java

@@ -0,0 +1,175 @@
+package com.onemap.spotoverlap.utils;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.nio.file.Files;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+public class ZipDownload {
+
+    //定义所有的shapeFile 文件的后缀名
+    private static final String[] FILE_SUFFIX = {".shp", ".shx", ".dbf", ".prj", ".sbnand.sbx", ".ainand.aih", ".ixs", ".mxs", ".atx", ".shp.xml", ".cpg"};
+
+    /**
+     * 直接下载zip文件
+     *
+     * @param response
+     * @param filepath
+     * @param name
+     */
+    public static void download(HttpServletResponse response, String filepath, String name) {
+        try {
+            response.setHeader("Content-Disposition", "attachment;filename=" + new String(name.getBytes("UTF-8"), "ISO-8859-1"));  // 需要编z码否则中文乱码
+            response.setContentType("application/zip;charset=utf-8");
+            response.setCharacterEncoding("UTF-8");
+            File file = new File(filepath);
+            if (file.length() >= Integer.MAX_VALUE) {
+                MappedBiggerFileReader reader = new MappedBiggerFileReader(filepath, 65536, response.getOutputStream());
+                while (reader.read() != -1) {
+                }
+                reader.close();
+            } else {
+                // 直接返回zip输出流不生成临时文件。
+                byte[] readAllBytes = Files.readAllBytes(file.toPath());
+                response.getOutputStream().write(readAllBytes);
+            }
+            response.getOutputStream().close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                response.getOutputStream().close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    /**
+     * 递归压缩方法
+     *
+     * @param sourceFile       源文件
+     * @param zos              zip输出流
+     * @param name             压缩后的名称
+     * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
+     *                         false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败)
+     * @throws Exception
+     */
+    private static void compress(File sourceFile, ZipOutputStream zos, String name,
+                                 boolean KeepDirStructure) throws Exception {
+        byte[] buf = new byte[2048];
+        if (sourceFile.isFile()) {
+            // 向zip输出流中添加一个zip实体,构造器中name为zip实体的文件的名字
+            zos.putNextEntry(new ZipEntry(name));
+            // copy文件到zip输出流中
+            int len;
+            FileInputStream in = new FileInputStream(sourceFile);
+            while ((len = in.read(buf)) != -1) {
+                zos.write(buf, 0, len);
+            }
+            // Complete the entry
+            zos.closeEntry();
+            in.close();
+        } else {
+            File[] listFiles = sourceFile.listFiles();
+            if (listFiles == null || listFiles.length == 0) {
+                // 需要保留原来的文件结构时,需要对空文件夹进行处理
+                if (KeepDirStructure) {
+                    // 空文件夹的处理
+                    zos.putNextEntry(new ZipEntry(name + "/"));
+                    // 没有文件,不需要文件的copy
+                    zos.closeEntry();
+                }
+
+            } else {
+                for (File file : listFiles) {
+                    // 判断是否需要保留原来的文件结构
+                    if (KeepDirStructure) {
+                        // 注意:file.getName()前面需要带上父文件夹的名字加一斜杠,
+                        // 不然最后压缩包中就不能保留原来的文件结构,即:所有文件都跑到压缩包根目录下了
+                        compress(file, zos, name + "/" + file.getName(), KeepDirStructure);
+                    } else {
+                        compress(file, zos, file.getName(), KeepDirStructure);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 压缩成ZIP 方法1
+     *
+     * @param srcDir           压缩文件夹路径
+     * @param out              压缩文件输出流
+     * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
+     *                         false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败)
+     * @throws RuntimeException 压缩失败会抛出运行时异常
+     */
+    public static void toZip(String srcDir, OutputStream out, boolean KeepDirStructure)
+            throws RuntimeException {
+
+        long start = System.currentTimeMillis();
+        ZipOutputStream zos = null;
+        try {
+            zos = new ZipOutputStream(out);
+            File sourceFile = new File(srcDir);
+            compress(sourceFile, zos, sourceFile.getName(), KeepDirStructure);
+            long end = System.currentTimeMillis();
+            System.out.println("压缩完成,耗时:" + (end - start) + " ms");
+        } catch (Exception e) {
+            throw new RuntimeException("zip error from ZipUtils", e);
+        } finally {
+            if (zos != null) {
+                try {
+                    zos.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 将shp文件相关所有文件打包成zip并下载
+     *
+     * @param response
+     * @param filepath
+     */
+    public static void shpToZip(HttpServletResponse response, String filepath) {
+//        ZipOutputStream zipOutputStream = null;
+//        try {
+//            response.setHeader("Content-Disposition", "attachment;filename=" + new String((name + ".zip").getBytes("UTF-8"), "ISO-8859-1"));  // 需要编z码否则中文乱码
+//            response.setContentType("application/zip;charset=utf-8");
+//            response.setCharacterEncoding("UTF-8");
+//            // 直接返回zip输出流不生成临时文件。
+//            zipOutputStream = new ZipOutputStream(response.getOutputStream());
+//            for (String fileSuffix : FILE_SUFFIX) {
+//
+//                File file = new File(filePath + name + fileSuffix);
+//                if (file.exists()) {
+//                  /*  int b =0;
+//                    byte[] bb = new byte[1024];
+//                     FileInputStream in = new FileInputStream(file);
+//                      while ((b=in.read(bb)) !=-1){
+//                          zipOutputStream.write(bb,0,b);
+//                      }*/
+//                    byte[] readAllBytes = Files.readAllBytes(file.toPath());
+//                    org.apache.tools.zip.ZipEntry zipEntry = new org.apache.tools.zip.ZipEntry(name + fileSuffix);
+//                    zipOutputStream.putNextEntry(zipEntry);
+//                    zipOutputStream.write(readAllBytes);
+//                }
+//            }
+//            zipOutputStream.close();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        } finally {
+//            try {
+//                zipOutputStream.close();
+//            } catch (Exception e) {
+//
+//
+//            }
+//        }
+    }
+}

+ 8 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/banner.txt

@@ -0,0 +1,8 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
+                     .__
+_____  ______ ______ |  | ___.__.
+\__  \ \____ \\____ \|  |<   |  |
+ / __ \|  |_> >  |_> >  |_\___  |
+(____  /   __/|   __/|____/ ____|
+     \/|__|   |__|        \/

+ 42 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/bootstrap.yml

@@ -0,0 +1,42 @@
+#Feign Client配置
+feign:
+  client:
+    config:
+      FooClient: #contextId
+        connectTimeout: 1000000
+        readTimeout: 2000000
+      default:
+        connectTimeout: 6000000
+        readTimeout: 1000000
+# Tomcat
+server:
+  port: 9209
+
+# Spring
+spring:
+  servlet:
+    multipart:
+      enabled: true
+      max-file-size: 10240MB
+      max-request-size: 10240MB
+  application:
+    # 应用名称
+    name: onemap-spotoverlap
+  profiles:
+    # 环境配置
+    active: dev
+  cloud:
+    nacos:
+      discovery:
+        namespace: spot
+        # 服务注册地址
+        server-addr: 127.0.0.1:8848
+      config:
+        namespace: spot
+        # 配置中心地址
+        server-addr: 127.0.0.1:8848
+        # 配置文件格式
+        file-extension: yml
+        # 共享配置
+        shared-configs:
+          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

+ 74 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/logback.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="60 seconds" debug="false">
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="logs/onemap-system" />
+   <!-- 日志输出格式 -->
+	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+
+    <!-- 控制台输出 -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+
+    <!-- 系统日志输出 -->
+	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+			<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+	</appender>
+
+    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+			<!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+			<!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 系统模块日志级别控制  -->
+	<logger name="com.onemap" level="info" />
+	<!-- Spring日志级别控制  -->
+	<logger name="org.springframework" level="warn" />
+
+	<root level="info">
+		<appender-ref ref="console" />
+	</root>
+	
+	<!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_error" />
+    </root>
+</configuration>

+ 17 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/cggl/CgglMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.cggl.EscalationRzMapper">
+
+
+    <select id="getStatus" parameterType="java.lang.String" resultType="com.onemap.apply.domain.cggl.EscalationRzDTO">
+        select t.id as "id",
+       t.operatetime as "operatetime",
+       t.operateuser as "operateuser",
+       (select dict.dict_label from sys_dict_data dict where dict.dict_type = 'escalationstatus' and dict.dict_value = t.operatetype) as "operatetype",
+       t.remark from t_cggl_escalation_rz t where t.targetid = #{id} and t.operatetype != '999' order by t.operatetime
+    </select>
+
+
+</mapper>

+ 69 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/cggl/EscalationImpMapper.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.cggl.EscalationImpMapper">
+
+    <select id="selectInfoImpList" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationIMPDTO">
+       select t.id as cgid,t.name,t.year,t.XZQDM,t.XZQMC,CONCAT(CONCAT(s.unzippath,'\'),s.name) unzippath,'0' as status,plantype
+       from t_cggl_escalation t
+       inner join t_cggl_escalation_file s
+       on t.fileid = s.id
+       where t.id = #{gcid}
+    </select>
+
+
+    <select id="getlist" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationIMPDTO">
+        select t.id as "id",
+        t.cgid as "cgid",
+        t.name as "name",
+        t.year as "year",
+        t.xzqdm as "xzqdm",
+        t.xzqmc as "xzqmc",
+        (case
+        when t.plantype = '1' then
+        '评估成果'
+        when t.plantype = '2' then
+        '规划成果'
+        when t.plantype = '3' then
+        '总体规划'
+        when t.plantype = '4' then
+        '详细规划'
+        when t.plantype = '5' then
+        '专项规划'
+        end) as "plantype",
+        (case
+        when t.status = '0' then
+        '待入库'
+        when t.status = '1' then
+        '正在入库'
+        when t.status = '2' then
+        '入库成功'
+        when t.status = '4' then
+        '入库失败'
+        end) as "status",
+        t.unzippath as "unzippath",
+        t.rkr as "rkr",
+        t.rktime as "rktime",
+        t.remark as "remark",
+        s.sctime as "sctime"
+        from  (select * from t_cggl_escalationimp   where 1=1
+        <if test="xzqdm != null and xzqdm != ''">
+            and xzqdm = #{xzqdm}
+        </if>
+        <if test="cgmc != null and cgmc != ''">
+            and name like  '%'||#{cgmc}||'%'
+        </if>
+        <if test="cglx != null and cglx != ''">
+            and plantype =#{cglx}
+        </if>
+        ) t
+        left join t_cggl_escalation s on s.id=t.cgid
+        order by sctime desc
+    </select>
+
+
+
+</mapper>

+ 449 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/cggl/EscalationMapper.xml

@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.cggl.EscalationMapper">
+
+    <sql id="PgcgSbqkWhere">
+        where cglevel = '1' and uploadstatus != '6' and plantype = '1' and xzqdm is not null
+        <if test="year != null and year != ''">
+            and year like #{year}||'%'
+        </if>
+    </sql>
+
+    <sql id="GhcgSbqkWhere">
+        where cglevel = '1' and uploadstatus != '6' and plantype = '3' and xzqdm is not null
+        <if test="year != null and year != ''">
+            and year like #{year}||'%'
+        </if>
+    </sql>
+
+    <sql id="GhcgSbqkWhere2">
+        where cglevel = '1' and uploadstatus != '6' and plantype = '3' and sczt in ('4','5','6','7') and xzqdm is not null
+        <if test="year != null and year != ''">
+            and year like #{year}||'%'
+        </if>
+    </sql>
+
+    <sql id="GhcgSbqkWhere3">
+        where cglevel = '1' and uploadstatus != '6' and plantype = '3' and sczt in ('4') and xzqdm is not null
+        <if test="year != null and year != ''">
+            and year like #{year}||'%'
+        </if>
+    </sql>
+
+    <select id="getXzqsl" parameterType="java.lang.String" resultType="java.lang.Integer">
+        select count(1) from v_yzt_zysxcx where length(id) = 6 and type = 'XZQ'
+    </select>
+
+    <select id="getPgcgSbqk" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.PgcgStctisticsDTO">
+        select count(1) as "qxcg",
+        count(distinct(t.xzqdm)) as "ysbqx",
+        (${xzqsl} - count(distinct(t.xzqdm))) as "wsbqx",
+        round(count(distinct(t.xzqdm)) / ${xzqsl} * 100 , 1) as "sbjd"
+        from t_cggl_escalation t
+        <include refid="PgcgSbqkWhere"></include>
+    </select>
+
+    <select id="getPgcgClqk" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.PgcgClqkDTO">
+        select count(1) as "count",t.uploadstatus as "uploadstatus" from t_cggl_escalation t
+        <include refid="PgcgSbqkWhere"></include>
+        group by t.uploadstatus
+    </select>
+
+    <select id="getPgcgWsbList" parameterType="java.lang.String" resultType="java.lang.String">
+        select t.name
+        from v_yzt_zysxcx t
+        where length(id) = 6 and type = 'XZQ'
+        and t.id not in (
+        select distinct(xzqdm) from t_cggl_escalation
+        <include refid="PgcgSbqkWhere"></include>
+        )
+    </select>
+
+    <select id="getGhcgSbqk" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.GhcgStctisticsDTO">
+        select count(1) as "sbsl",
+        count(distinct(t.xzqdm)) as "ysbqx",
+        (${xzqsl} - count(distinct(t.xzqdm))) as "wsbqx",
+        round(count(distinct(t.xzqdm)) / ${xzqsl} * 100 , 1) as "sbjd"
+        from t_cggl_escalation t
+        <include refid="GhcgSbqkWhere"></include>
+    </select>
+
+    <select id="getGhcgSbqkSj" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.GhcgStctisticsDTO">
+        select count(1) as "sbsjsl",
+        count(distinct(t.xzqdm)) as "ysbsjqx"
+        from t_cggl_escalation t
+        <include refid="GhcgSbqkWhere2"></include>
+    </select>
+
+    <select id="getGhcgWsbList" parameterType="java.lang.String" resultType="java.lang.String">
+        select t.name
+        from v_yzt_zysxcx t
+        where length(id) = 6 and type = 'XZQ'
+        and t.id not in (
+        select distinct(xzqdm) from t_cggl_escalation
+        <include refid="GhcgSbqkWhere"></include>
+        )
+    </select>
+
+    <select id="getGhcgClqk" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.PgcgClqkDTO">
+        select count(1) as "count",t.sczt as "uploadstatus" from t_cggl_escalation t
+        <include refid="GhcgSbqkWhere"></include>
+        group by t.sczt
+    </select>
+
+    <select id="getGhcgZxxx" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.ZxxxDTO">
+        select t.name as "name",
+        t.uploadtime as "uploaddate",
+        t.xzqmc as "xzqmc"
+        from t_cggl_escalation t
+        <include refid="GhcgSbqkWhere3"></include>
+    </select>
+
+    <select id="getGhcgSbqkList" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.SbqkChartDTO">
+        select t.name as "xzqmc",
+        (select count(1) from t_cggl_escalation ta where ta.cglevel = '1'
+        <if test="year != null and year != ''">
+            and ta.year like #{year}||'%'
+        </if>
+        and ta.plantype = '3' and ta.sczt = '5' and ta.xzqdm = t.id ) as "sczsl" ,
+        (select count(1) from t_cggl_escalation ta where ta.cglevel = '1'
+        <if test="year != null and year != ''">
+            and ta.year like #{year}||'%'
+        </if>
+        and ta.plantype = '3' and ta.sczt = '6' and ta.xzqdm = t.id ) as "wjsl",
+        (select count(1) from t_cggl_escalation ta where ta.cglevel = '1'
+        <if test="year != null and year != ''">
+            and ta.year like #{year}||'%'
+        </if>
+        and ta.plantype = '3' and ta.sczt = '7' and ta.xzqdm = t.id ) as "thsl",
+        (select count(1) from t_cggl_escalation ta where ta.cglevel = '1'
+        <if test="year != null and year != ''">
+            and ta.year like #{year}||'%'
+        </if>
+        and ta.plantype = '3'  and ta.xzqdm = t.id and ta.sczt in ('5','6','7')) as "total"
+        from v_yzt_zysxcx t where length(id) = 6 and type = 'XZQ'
+    </select>
+
+    <select id="getCgSclistbyzt" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationTaskDTO">
+        select t.id as "id",
+               t.name as "name",
+               t.uploadtime as "uploadtime",
+               t.xzqmc as "xzqmc",
+               t.xzqdm as "xzqdm",
+               (case
+                    when t.plantype = '1' then
+                        '评估成果'
+                    when t.plantype = '2' then
+                        '规划成果'
+                    when t.plantype = '3' then
+                        '总体规划'
+                    when t.plantype = '4' then
+                        '详细规划'
+                    when t.plantype = '5' then
+                        '专项规划'
+                   end) as "plantype",
+               t.fileid as "fileid",
+               (case
+                    when t.sczt = '0' then
+                        '待审(旗县)'
+                    when t.sczt = '1' then
+                        '审查中(旗县)'
+                    when t.sczt = '2' then
+                        '完结(旗县)'
+                    when t.sczt = '3' then
+                        '退回(旗县)'
+                    when t.sczt = '4' then
+                        '待审(市级)'
+                    when t.sczt = '5' then
+                        '审查中(市级)'
+                    when t.sczt = '6' then
+                        '完结(市级)'
+                    when t.sczt = '7' then
+                        '退回(市级)'
+                   end) as "sczt",
+               s.path as "filepath"
+        from (select * from t_cggl_escalation  where sczt=#{type}) t
+                 left join t_cggl_escalation_file s
+                           on s.id = t.fileid
+        order by uploadtime desc
+    </select>
+
+    <select id="getSelectCgSclistbyzt" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationTaskDTO">
+        select t.id as "id",
+        t.name as "name",
+        t.uploadtime as "uploadtime",
+        t.xzqmc as "xzqmc",
+        t.xzqdm as "xzqdm",
+        (case
+        when t.plantype = '1' then
+        '评估成果'
+        when t.plantype = '2' then
+        '规划成果'
+        when t.plantype = '3' then
+        '总体规划'
+        when t.plantype = '4' then
+        '详细规划'
+        when t.plantype = '5' then
+        '专项规划'
+        end) as "plantype",
+        t.fileid as "fileid",
+        (case
+        when t.sczt = '0' then
+        '待审(旗县)'
+        when t.sczt = '1' then
+        '审查中(旗县)'
+        when t.sczt = '2' then
+        '完结(旗县)'
+        when t.sczt = '3' then
+        '退回(旗县)'
+        when t.sczt = '4' then
+        '待审(市级)'
+        when t.sczt = '5' then
+        '审查中(市级)'
+        when t.sczt = '6' then
+        '完结(市级)'
+        when t.sczt = '7' then
+        '退回(市级)'
+        end) as "sczt",
+        s.path as "filepath",
+        s.status as "status",
+        m.modelsname as "modelsname"
+        from (select * from t_cggl_escalation where sczt=#{type} and uploadstatus != '6'
+        <if test="xzqdm != null and xzqdm != ''">
+            and xzqdm like '%'||#{xzqdm}||'%'
+        </if>
+        <if test="cgmc != null and cgmc != ''">
+            and name like '%'||#{cgmc}||'%'
+        </if>
+        <if test="cglx != null and cglx != ''">
+            and plantype =#{cglx}
+        </if>
+        ) t
+        left join t_cggl_escalation_file s
+        on s.id = t.fileid
+        left join TS_EXAMMODELDIC m
+        on m.type = (case
+        when t.plantype = '1' then
+        '评估成果'
+        when t.plantype = '2' then
+        '规划成果'
+        when t.plantype = '3' then
+        '总体规划'
+        when t.plantype = '4' then
+        '详细规划'
+        when t.plantype = '5' then
+        '专项规划'
+        end) and m.xzqdm = t.xzqdm
+        order by uploadtime desc
+    </select>
+
+    <select id="getSelectCgSclistbyztwj" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationTaskDTO">
+        select t.id as "id",
+        t.name as "name",
+        t.uploadtime as "uploadtime",
+        t.xzqmc as "xzqmc",
+        t.xzqdm as "xzqdm",
+        (case
+        when t.plantype = '1' then
+        '评估成果'
+        when t.plantype = '2' then
+        '规划成果'
+        when t.plantype = '3' then
+        '总体规划'
+        when t.plantype = '4' then
+        '详细规划'
+        when t.plantype = '5' then
+        '专项规划'
+        end) as "plantype",
+        t.fileid as "fileid",
+        (case
+        when t.sczt = '0' then
+        '待审(旗县)'
+        when t.sczt = '1' then
+        '审查中(旗县)'
+        when t.sczt = '2' then
+        '完结(旗县)'
+        when t.sczt = '3' then
+        '退回(旗县)'
+        when t.sczt = '4' then
+        '待审(市级)'
+        when t.sczt = '5' then
+        '审查中(市级)'
+        when t.sczt = '6' then
+        '完结(市级)'
+        when t.sczt = '7' then
+        '退回(市级)'
+        end) as "sczt",
+        s.path as "filepath",
+        s.status as "status"
+        from (select * from t_cggl_escalation where sczt &gt;= #{type} and sczt!=3
+        <if test="xzqdm != null and xzqdm != ''">
+            and xzqdm like '%'||#{xzqdm}||'%'
+        </if>
+        <if test="cgmc != null and cgmc != ''">
+            and name like '%'||#{cgmc}||'%'
+        </if>
+        <if test="cglx != null and cglx != ''">
+            and plantype =#{cglx}
+        </if>
+        ) t
+        left join t_cggl_escalation_file s
+        on s.id = t.fileid
+        order by uploadtime desc
+    </select>
+    <select id="getSelectCgSclistbyztqx" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationTaskDTO">
+        select t.id as "id",
+        t.name as "name",
+        t.uploadtime as "uploadtime",
+        t.xzqmc as "xzqmc",
+        t.xzqdm as "xzqdm",
+        (case
+        when t.plantype = '1' then
+        '评估成果'
+        when t.plantype = '2' then
+        '规划成果'
+        when t.plantype = '3' then
+        '总体规划'
+        when t.plantype = '4' then
+        '详细规划'
+        when t.plantype = '5' then
+        '专项规划'
+        end) as "plantype",
+        t.fileid as "fileid",
+        (case
+        when t.sczt = '0' then
+        '待审(旗县)'
+        when t.sczt = '1' then
+        '审查中(旗县)'
+        when t.sczt = '2' then
+        '完结(旗县)'
+        when t.sczt = '3' then
+        '退回(旗县)'
+        when t.sczt = '4' then
+        '待审(市级)'
+        when t.sczt = '5' then
+        '审查中(市级)'
+        when t.sczt = '6' then
+        '完结(市级)'
+        when t.sczt = '7' then
+        '退回(市级)'
+        end) as "sczt",
+        s.path as "filepath"
+        from (select * from t_cggl_escalation where sczt=#{type}
+        <if test="xzqdm != null and xzqdm != ''">
+            and xzqdm = #{xzqdm}
+        </if>
+        <if test="cgmc != null and cgmc != ''">
+            and name like '%'||#{cgmc}||'%'
+        </if>
+        <if test="cglx != null and cglx != ''">
+            and plantype =#{cglx}
+        </if>
+        ) t
+        left join t_cggl_escalation_file s
+        on s.id = t.fileid
+        order by uploadtime desc
+    </select>
+    <update id="updatescinfo">
+        update t_cggl_escalation
+              set sczt=${sczt},scresult=#{scresult},scr=#{scr},sctime=sysdate  where id=#{gcid}
+    </update>
+
+    <update id="updatescqxinfo">
+        update t_cggl_escalation
+        set sczt=${sczt},qxscresult=#{scresult},qxscr=#{scr},qxsctime=sysdate  where id=#{gcid}
+    </update>
+
+    <select id="getscinfo" parameterType="java.lang.String" resultType="java.lang.String">
+        select scresult from t_cggl_escalation
+        where id=#{gcid}
+    </select>
+
+    <select id="getqxscinfo" parameterType="java.lang.String" resultType="java.lang.String">
+        select qxscresult from t_cggl_escalation
+        where id=#{gcid}
+    </select>
+
+    <select id="selectWaitCheck" parameterType="java.lang.String"
+            resultType="java.lang.String">
+        select t.id from t_cggl_escalation t
+        inner join t_cggl_escalation_file f on f.id = t.fileid
+        where f.status = '9' and rownum = 1
+        <if test="param != null and param != ''">
+            and t.username = #{param}
+        </if>
+        order by t.uploadtime desc
+    </select>
+
+    <update id="updateWaitCheck" parameterType="java.lang.String">
+        update t_cggl_escalation_file t set t.status = '0'
+        where t.id = (select fileid from t_cggl_escalation where id = #{param})
+    </update>
+
+    <!-- <if test="(uploadstatus == null or uploadstatus == '') and userlevel != '1' and cglevel != '1'">
+            and t.uploadstatus != '0'
+        </if>-->
+    <select id="selectInfoList" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationInfoDTO">
+        select t.*,f.status "fileupload",f.remark "fileuploadremark" from t_cggl_escalation t
+        left join t_cggl_escalation_file f on f.id = t.fileid
+        where 1 = 1
+        <if test="year != null and year != ''">
+            and t.year like #{year}||'%'
+        </if>
+        <if test="xzqdm != null and xzqdm != ''">
+            and t.xzqdm = #{xzqdm}
+        </if>
+        <choose>
+            <when test="uploadstatus != null and uploadstatus != ''">
+                and t.uploadstatus = #{uploadstatus}
+            </when>
+            <!--            <when test='userlevel != null and userlevel != "0"'>-->
+            <!--                and (t.cglevel = 1 and t.uploadstatus != '0')-->
+            <!--            </when>-->
+            <otherwise>
+                and 1 = 1
+            </otherwise>
+        </choose>
+        <if test="username != null and username != ''">
+            and t.username = #{username}
+        </if>
+        <if test="cglevel != null and cglevel != ''">
+            and t.cglevel = #{cglevel}
+        </if>
+        <if test="plantype != null and plantype != ''">
+            and t.plantype = #{plantype}
+        </if>
+        order by t.uploadtime desc
+    </select>
+
+    <select id="selectInfoImpList" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.cggl.EscalationIMPDTO">
+       select t.id as cgid,t.name,t.year,t.XZQDM,t.XZQMC,s.unzippath,'0' as status
+       from t_cggl_escalation t
+       inner join t_cggl_escalation_file s
+       on t.fileid = s.id
+       where t.id = #{gcid}
+    </select>
+
+    <select id="getInstIds" parameterType="java.lang.String"
+            resultType="java.lang.String">
+select distinct (t.instid)
+      from t_cggl_escalation t
+     where t.instid is not null
+       and t.instid not like '%#'
+    </select>
+</mapper>

+ 21 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/config/CfgDbMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.config.CfgDbMapper">
+
+    <resultMap id="TZbmxMxfzMap" type="com.onemap.apply.domain.config.CfgDbDTO">
+        <result property="id" column="ID"/>
+        <result property="sjkmc" column="SJKMC"/>
+        <result property="sjklx" column="SJKLX"/>
+        <result property="ip" column="IP"/>
+        <result property="dkh" column="DKH"/>
+        <result property="fwmc" column="FWMC"/>
+        <result property="yhm" column="YHM"/>
+        <result property="yhmm" column="YHMM"/>
+        <result property="ljfs" column="LJFS"/>
+        <result property="sde" column="SDE"/>
+    </resultMap>
+
+
+</mapper>

+ 20 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCgglGhbgMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TCgglGhbgMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TCgglGhbgDo" id="tCgglGhbgMap">
+        <result property="bsm" column="BSM"/>
+        <result property="wjgzBsm" column="WJGZ_BSM"/>
+        <result property="xh" column="XH"/>
+        <result property="bgfl" column="BGFL"/>
+        <result property="bgmc" column="BGMC"/>
+        <result property="bgbm" column="BGBM"/>
+        <result property="ystj" column="YSTJ"/>
+        <result property="bz" column="BZ"/>
+        <result property="sjkyh" column="SJKYH"/>
+    </resultMap>
+
+
+</mapper>

+ 21 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCgglGhbgsxMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TCgglGhbgsxMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TCgglGhbgsxDo" id="tCgglGhbgsxMap">
+        <result property="bsm" column="BSM"/>
+        <result property="bgBsm" column="BG_BSM"/>
+        <result property="zddm" column="ZDDM"/>
+        <result property="zdmc" column="ZDMC"/>
+        <result property="zdlx" column="ZDLX"/>
+        <result property="zdcd" column="ZDCD"/>
+        <result property="xsws" column="XSWS"/>
+        <result property="zy" column="ZY"/>
+        <result property="ystj" column="YSTJ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+
+</mapper>

+ 9 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCtfxYzMapper.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TCtfxYzMapper">
+    <select id="getFxyzYear" resultType="java.lang.String">
+        select t.name from tb_resourcehooktb t
+        where t.name like #{sjlx}||'%' order by t.name desc
+    </select>
+</mapper>

+ 17 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCzjsbsyqMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TCzjsbsyqMapper">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TCzjsbsyqDo" id="TCzjsbsyqMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="bsymj" column="BSYMJ"/>
+        <result property="bsybz" column="BSYBZ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+
+</mapper>

+ 17 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TCzjssyqMapper.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TCzjssyqMapper">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TCzjssyqDo" id="TCzjssyqMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="symj" column="SYMJ"/>
+        <result property="sybz" column="SYBZ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+
+</mapper>

+ 25 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TDictYsdmMapper.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TDictYsdmMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TDictYsdmDo" id="tDictYsdmMap">
+        <result property="id" column="ID"/>
+        <result property="name" column="NAME"/>
+        <result property="pid" column="PID"/>
+        <result property="type" column="TYPE"/>
+        <result property="range" column="RANGE"/>
+        <result property="clazz" column="CLAZZ"/>
+        <result property="note" column="NOTE"/>
+    </resultMap>
+
+    <!--    查询所有 id -->
+    <select id="selectIds" resultMap="tDictYsdmMap">
+
+        SELECT ID, NAME, PID, TYPE, RANGE, CLAZZ, NOTE
+        FROM T_DICT_YSDM
+        WHERE clazz = 'nyscpj'
+        AND type = '图片'
+
+    </select>
+</mapper>

+ 44 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TDysczczgmMapper.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TDysczczgmMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TDysczczgmDo" id="TDyskczgdgmMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="kczjsgm" column="KCZJSGM"/>
+        <result property="xzczjsydmj" column="XZCZJSYDMJ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+    <!--    根据行政区查询 -->
+    <select id="selectList" resultMap="TDyskczgdgmMap">
+
+        SELECT YSDM, XZQDM, XZQMC, KCZJSGM, XZCZJSYDMJ, BZ
+        FROM sde.TDYSCZCZGM
+
+        <where>
+            <choose>
+                <when test="xzqdm != null and xzqdm != ''">
+                    XZQDM LIKE CONCAT(#{xzqdm}, '%')
+                </when>
+            </choose>
+        </where>
+    </select>
+
+    <select id="selectGroupByXzq" resultMap="TDyskczgdgmMap">
+
+        SELECT YSDM, T1.XZQDM, T2.XZQMC, KCZJSGM, XZCZJSYDMJ, BZ
+        FROM sde.TDYSCZCZGM T1,
+             (
+                 SELECT XZQDM, XZQMC
+                 FROM sde.TDYSCZCZGM
+             ) T2
+
+        <where>
+            <if test="xzqdm != null and xzqdm != ''">
+                T1.XZQDM LIKE CONCAT(#{xzqdm}, '%') AND T1.XZQDM = T2.XZQDM AND T1.XZQMC = T2.XZQMC
+            </if>
+        </where>
+    </select>
+</mapper>

+ 53 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TDyskczgdgmMapper.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TDyskczgdgmMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TDyskczgdgmDo" id="TDyskczgdgmMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="kczgdmj1" column="KCZGDMJ1"/>
+        <result property="kczgdmj2" column="KCZGDMJ2"/>
+        <result property="xzgdmj1" column="XZGDMJ1"/>
+        <result property="xzgdmj2" column="XZGDMJ2"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+    <!--    根据行政区代码进行查询 -->
+    <select id="selectList" parameterType="String" resultMap="TDyskczgdgmMap">
+
+        SELECT YSDM, XZQDM, XZQMC, KCZGDMJ1, KCZGDMJ2, XZGDMJ1, XZGDMJ2, BZ
+        FROM sde.TDYSKCZGDGM
+
+        <where>
+            <choose>
+                <when test="xzqdm != null  and xzqdm != ''">
+                    XZQDM LIKE CONCAT(#{xzqdm}, '%')
+                </when>
+            </choose>
+        </where>
+    </select>
+
+    <!--    查询 GDGMTJ (耕地规模统计) -->
+    <select id="selectGDGMTJ" parameterType="String" resultMap="TDyskczgdgmMap">
+
+        SELECT T1.YSDM, T1.XZQDM, T1.XZQMC, T1.KCZGDMJ1, T1.KCZGDMJ2,
+               T1.XZGDMJ1, T1.XZGDMJ2, T1.BZ
+        FROM sde.TDYSKCZGDGM T1,
+        (
+            SELECT XZQDM, XZQMC
+            FROM sde.TDYSKCZGDGM
+            GROUP BY XZQDM, XZQMC
+        ) T2
+
+        <where>
+            <if test="xzqdm != null and xzqdm != ''">
+                T1.XZQDM LIKE CONCAT(#{xzqdm}, '%')
+            </if>
+            <if test="xzqdm != null and xzqdm != ''">
+                AND T2.XZQDM = T1.XZQDM AND T2.XZQMC = T1.XZQMC
+            </if>
+        </where>
+    </select>
+</mapper>

+ 22 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TGhwbMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TGhwbMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TGhwbDo" id="TGhwbMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="wdmc" column="WDMC"/>
+        <result property="wdwj" column="WDWJ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+    <select id="selectByYsdm" resultMap="TGhwbMap">
+
+        SELECT YSDM, XZQDM, XZQMC, WDMC, WDWJ, BZ
+        FROM sde.GHWB
+        WHERE YSDM = #{str}
+
+    </select>
+</mapper>

+ 26 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TNyscsyxpjMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TNyscsyxpjMapper">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TNyscsyxpjDo" id="TNyscsyxpjMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="zzysymj" column="ZZYSYMJ"/>
+        <result property="zzysybz" column="ZZYSYBZ"/>
+        <result property="zzybsymj" column="ZZYBSYMJ"/>
+        <result property="zzybsybz" column="ZZYBSYBZ"/>
+        <result property="xmysymj" column="XMYSYMJ"/>
+        <result property="xmysybz" column="XMYSYBZ"/>
+        <result property="xmybsymj" column="XMYBSYMJ"/>
+        <result property="xmybsybz" column="XMYBSYBZ"/>
+        <result property="yysymj" column="YYSYMJ"/>
+        <result property="yysybz" column="YYSYBZ"/>
+        <result property="yybsymj" column="YYBSYMJ"/>
+        <result property="yybsybz" column="YYBSYBZ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+</mapper>

+ 23 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TSgtjMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TSgtjMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TSgtjDo" id="TSgtjMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="tpmc" column="TPMC"/>
+        <result property="tpwj" column="TPWJ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+    <select id="selectByYsdm" resultMap="TSgtjMap">
+        SELECT YSDM, XZQDM, XZQMC, TPMC, TPWJ, BZ
+        FROM sde.SGTJ
+                WHERE YSDM IN
+        <foreach collection="list" item="item" open="(" close=")" separator=" , ">
+            #{item}
+        </foreach>
+    </select>
+</mapper>

+ 20 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TStbhzyxpjMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TStbhzyxpjMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TStbhzyxpjDo" id="StbhzyxpjMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="qylx" column="QYLX"/>
+        <result property="jzymj" column="JZYMJ"/>
+        <result property="jzybz" column="JZYBZ"/>
+        <result property="zymj" column="ZYMJ"/>
+        <result property="zybz" column="ZYBZ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+
+
+</mapper>

+ 60 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TSysczczgmMapper.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TSysczczgmMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TSysczczgmDo" id="TSyskczgdgmMap">
+        <result property="czrjxsl" column="CZRJXSL"/>
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="qj" column="QJ"/>
+        <result property="czkysl" column="CZKYSL"/>
+        <result property="kzczrkgm" column="KZCZRKGM"/>
+        <result property="rjczjsyd" column="RJCZJSYD"/>
+        <result property="kczczjsydgm" column="KCZCZJSYDGM"/>
+        <result property="xzczjsydmj" column="XZCZJSYDMJ"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+    <select id="selectList" resultMap="TSyskczgdgmMap">
+
+        SELECT CZRJXSL, YSDM, XZQDM, XZQMC, QJ, CZKYSL, KZCZRKGM, RJCZJSYD, KCZCZJSYDGM, XZCZJSYDMJ, BZ
+        FROM sde.SYSCZCZGM
+
+        <where>
+            <choose>
+                <when test="xzqdm != null and xzqdm != ''">
+                    XZQDM LIKE CONCAT(#{xzqdm}, '%')
+                </when>
+            </choose>
+        </where>
+    </select>
+
+    <select id="selectListGroupByQjXzq" resultMap="TSyskczgdgmMap">
+
+        SELECT CZRJXSL, YSDM, T1.XZQDM, T1.XZQMC, T1.QJ, CZKYSL, KZCZRKGM, RJCZJSYD, KCZCZJSYDGM, XZCZJSYDMJ, BZ
+        FROM sde.SYSCZCZGM T1,
+        (
+        SELECT QJ, XZQDM, XZQMC
+        FROM sde.SYSCZCZGM
+        GROUP BY QJ, XZQDM, XZQMC
+        ) T2
+
+        <where>
+            <if test="xzqdm != null and xzqdm != ''">
+                T2.QJ = T1.QJ AND T2.XZQDM = T1.XZQDM AND T2.XZQMC = T1.XZQMC AND T1.XZQDM LIKE CONCAT(#{xzqdm}, '%')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectListGroupByQj" resultType="java.lang.String">
+        select distinct(t.qj)
+        from sde.sysczczgm t
+        <where>
+            <if test="xzqdm != null and xzqdm != ''">
+                t.xzqdm like ''||#{xzqdm}||'%'
+            </if>
+        </where>
+    </select>
+</mapper>

+ 60 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fxpj/TSyskczgdgmMapper.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.fxpj.TSyskczgdgmMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.fxpj.TSyskczgdgmDo" id="TSyskczgdgmMap">
+        <result property="ysdm" column="YSDM"/>
+        <result property="xzqdm" column="XZQDM"/>
+        <result property="xzqmc" column="XZQMC"/>
+        <result property="qj" column="QJ"/>
+        <result property="nyysl" column="NYYSL"/>
+        <result property="ntggsyxlyxs" column="NTGGSYXLYXS"/>
+        <result property="mjgdggysl" column="MJGDGGYSL"/>
+        <result property="kczdgdgm1" column="KCZDGDGM1"/>
+        <result property="kczdgdgm2" column="KCZDGDGM2"/>
+        <result property="gggdmj" column="GGGDMJ"/>
+        <result property="yygdmj" column="YYGDMJ"/>
+        <result property="xzgdmj1" column="XZGDMJ1"/>
+        <result property="xzgdmj2" column="XZGDMJ2"/>
+        <result property="bz" column="BZ"/>
+    </resultMap>
+
+    <!--    根据行政区查询 -->
+    <select id="selectList" parameterType="String" resultMap="TSyskczgdgmMap">
+
+        SELECT YSDM, XZQDM, XZQMC, QJ, NYYSL, NTGGSYXLYXS, MJGDGGYSL, KCZDGDGM1, KCZDGDGM2, GGGDMJ, YYGDMJ, XZGDMJ1, XZGDMJ2, BZ
+        FROM sde.SYSKCZGDGM
+
+        <where>
+            <choose>
+                <when test="xzqdm != null and xzqdm != ''">
+                    XZQDM LIKE CONCAT(#{xzqdm}, '%')
+                </when>
+            </choose>
+        </where>
+    </select>
+
+    <!--    构建结果集: 耕地规模统计(表) -->
+    <select id="selectGDGMTJ" parameterType="String" resultMap="TSyskczgdgmMap">
+
+        SELECT YSDM, T1.XZQDM, T1.XZQMC, T1.QJ, NYYSL,
+               NTGGSYXLYXS, MJGDGGYSL, KCZDGDGM1, KCZDGDGM2, GGGDMJ,
+               YYGDMJ, XZGDMJ1, XZGDMJ2, BZ
+        FROM sde.SYSKCZGDGM T1,
+        (
+            SELECT QJ, XZQDM, XZQMC
+            FROM sde.SYSKCZGDGM
+            GROUP BY QJ, XZQDM, XZQMC
+        ) T2
+
+        <where>
+            <if test="xzqdm != null and xzqdm != ''">
+                T1.XZQDM LIKE CONCAT(#{xzqdm}, '%')
+            </if>
+            <if test="xzqdm != null and xzqdm != ''">
+                AND T2.QJ = T1.QJ AND T2.XZQDM = T1.XZQDM AND T2.XZQMC = T1.XZQMC
+            </if>
+        </where>
+    </select>
+</mapper>

+ 45 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fzss/FzxzMapper.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.fzss.FzxzMapper">
+
+
+    <select id="GetDldmTree" parameterType="java.lang.String" resultType="com.onemap.apply.domain.fzss.FzxzDldmTreeDTO">
+        select t.dm as "value",
+       t.mc as "label",
+       t.fdm as "parent" from T_FZSS_FZXZ_DICT t where t.fzbs = #{fzbs} order by t.dm , t.fdm, t.xssx
+    </select>
+
+    <select id="GetFzxzList" parameterType="java.lang.String" resultType="com.onemap.apply.domain.fzss.FzxzEntityDTO">
+        select t.bsm as "bsm",
+        t.sjy as "sjy",
+        sjy.sjymc "sjymc",
+        t.fwlx as "fwlx",
+        t.ydxz_bsm as "ydbsm",
+        (select dict.mc from t_fzss_fzxz_dict dict where dict.dm = t.ydxz_bsm and dict.fzbs = sjy.fzbs) as "ydmc",
+        t.ydmjbegin as "ydmjbegin",
+        t.ydmjend as "ydmjend",
+        t.xmmc as "xmmc",
+        t.jsdw as "jsdw",
+        t.fxbg as "fxbg",
+        t.rwzt as "rwzt",
+        t.xzfw as "xzfw",
+        t.zip as "zip" from t_fzss_fzxz t left join t_fzss_fzxz_sjy sjy on sjy.bsm = t.sjy
+        where 1 = 1
+        <if test="kssj != null and kssj != ''">
+            and t.cjsj &gt;= to_date(#{kssj}, 'yyyy-MM-dd hh24:mi:ss')
+        </if>
+        <if test="jssj != null and jssj != ''">
+            and t.cjsj &lt;= to_date(#{jssj}, 'yyyy-MM-dd hh24:mi:ss')
+        </if>
+        <if test="xmmc != null and xmmc != ''">
+            and t.xmmc like '%'||#{xmmc}||'%'
+        </if>
+        <if test="username != null and username != ''">
+            and t.cjyh = #{username}
+        </if>
+        order by t.cjsj desc
+    </select>
+
+</mapper> 

+ 109 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/fzss/HgxfxMapper.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.fzss.HgxfxMapper">
+
+
+    <select id="GetPage" parameterType="java.lang.String" resultType="com.onemap.apply.domain.fzss.HgxfxDTO">
+        select t.bsm as "bsm",
+        t.fxmj as "fxmj",
+        t.xmmc as "xmmc",
+        t.xmlx as "xmlx",
+        t.jsdw as "jsdw",
+        t.ydxz_bsm as "ydxz_bsm",
+        t.fxbg as "fxbg",
+        t.rwzt as "rwzt",
+        t.cjsj as "cjsj" from t_fzss_hgxfx t where 1 = 1
+        <if test="kssj != null and kssj != ''">
+            and t.cjsj &gt;= to_date(#{kssj}, 'yyyy-MM-dd hh24:mi:ss')
+        </if>
+        <if test="jssj != null and jssj != ''">
+            and t.cjsj &lt;= to_date(#{jssj}, 'yyyy-MM-dd hh24:mi:ss')
+        </if>
+        <if test="xmmc != null and xmmc != ''">
+            and t.xmmc like '%'||#{xmmc}||'%'
+        </if>
+        <if test="username != null and username != ''">
+            and t.cjyh = #{username}
+        </if>
+        order by t.cjsj desc
+    </select>
+
+    <select id="getJcxs" parameterType="java.lang.String" resultType="com.onemap.apply.domain.fzss.HgxfxJcxsDTO">
+        select t.bsm as "bsm",
+       t.rwbsm as "rwbsm",
+       t.scxbsm as "scxbsm",
+       t.zdmj as "zdmj",
+       t.jcjg as "jcjg",
+       scx.kzxjb as "kzxjb",
+       case when scx.kzxjb = 1 then '一级控制线'
+            when  scx.kzxjb = 2 then '二级控制线'
+            else scx.tjzd end as "classify",
+       scx.ysmc as "ysmc" from t_fzss_hgxfx_hgscx t
+       left join t_fzss_hgxfx_scx scx on scx.bsm = t.scxbsm
+       where t.rwbsm = #{bsm} and scx.kzxjb > 0
+       order by scx.kzxjb
+    </select>
+
+    <select id="getFxtb" parameterType="java.lang.String" resultType="com.onemap.apply.domain.fzss.HgxfxFxtbDTO">
+       select xz.ydyhfldm as "dldm2",
+        xz.ydyhflmc as "dlmc2",
+        (select d.dldm from t_dict_dldm d where d.fzbs = 'GH' and d.dldm = substr(xz.ydyhfldm,0,2)) as "dldm1",
+        (select d.dlmc from t_dict_dldm d where d.fzbs = 'GH' and d.dldm = substr(xz.ydyhfldm,0,2)) as "dlmc1",
+        sum(t.yzmj) as "yzmj",
+        sum(xz.mj) as "mj"
+         from (select * from t_fzss_hgxfx_jg_gis t where t.scxbsm = (select hgscx.bsm from t_fzss_hgxfx_hgscx hgscx left join t_fzss_hgxfx_scx scx on scx.bsm = hgscx.scxbsm where scx.kzxjb = 0
+        and hgscx.rwbsm = #{bsm})) t
+        inner join (select * from sde.xzydyh x where x.objectid in (select objid from t_fzss_hgxfx_jg_gis gis where gis.scxbsm = (select hgscx.bsm from t_fzss_hgxfx_hgscx hgscx left join t_fzss_hgxfx_scx scx on scx.bsm = hgscx.scxbsm where scx.kzxjb = 0
+        and hgscx.rwbsm = #{bsm}))
+        ) xz on xz.objectid = t.objid
+        group by xz.ydyhfldm,xz.ydyhflmc
+        order by xz.ydyhfldm
+    </select>
+
+    <select id="getScrwCount" resultType="java.lang.Integer">
+        select count(1) count from t_fzss_hgxfx t where 1 >= t.rwzt
+    </select>
+
+    <delete id="deleteResourceScx">
+        delete from t_fzss_hgxfx_scx where kzxjb > 2
+    </delete>
+
+    <insert id="unionResourceScx">
+        insert into t_fzss_hgxfx_scx (bsm,ysdm,ysmc,sjy,kzxjb,xssx,tjzd, status )
+--         select to_char(t.layername) bsm,
+--         '202400000000' ysdm,
+--         to_char(t.layeralias) ysmc,
+--         to_char(t.source) sjy,
+--         ( select (select * from (select to_number(bsm) from t_yzt_zyml
+--         start with bsm = o.bsm
+--         connect by prior pbsm = bsm order by pbsm desc) where 1 >= rownum)
+--         from t_yzt_zyml o where o.bsm = m.bsm) kzxjb,
+--         rownum xssx,
+--         ( select (select * from (select name from t_yzt_zyml
+--         start with bsm = o.bsm
+--         connect by prior pbsm = bsm order by pbsm desc) where 1 >= rownum)
+--         from t_yzt_zyml o where o.bsm = m.bsm) tjzd,
+--         '1' status
+--         from t_yzt_db_layer t
+--         left join t_yzt_zyml m
+--         on m.sde = t.id
+--         where t.id in (select distinct(sde) from t_yzt_zyml)
+--         union all
+        select to_char(substr(t.sde,INSTR(t.sde,'.') + 1)) bsm,
+        '202400000000' ysdm,
+        to_char(t.name) ysmc,
+        to_char(t.sde) sjy,
+        ( select (select * from (select to_number(bsm) from t_yzt_zyml
+        start with bsm = o.bsm
+        connect by prior pbsm = bsm order by pbsm desc) where 1 >= rownum)
+        from t_yzt_zyml o where o.bsm = t.bsm) kzxjb,
+        rownum xssx,
+        ( select (select * from (select name from t_yzt_zyml
+        start with bsm = o.bsm
+        connect by prior pbsm = bsm order by pbsm desc) where 1 >= rownum)
+        from t_yzt_zyml o where o.bsm = t.bsm) tjzd,
+        '1' status from t_yzt_zyml t where t.sde like '%.%' and t.parent = '0'
+    </insert>
+</mapper> 

+ 160 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/ghss/ZbmxJcyjMapper.xml

@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.ghss.ZbmxJcpgyjMapper">
+
+
+    <select id="Xzpgtx" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.JcpgZbtxViewDTO">
+        select t.bsm as "bsm", t.txmc as "txmc", t.sstx as "sstx"
+        from T_ZBMX_ZBTX t
+        where t.sstx = #{sstx}
+    </select>
+
+    <select id="GetZbjcz" parameterType="com.onemap.apply.domain.ghss.ZbmxJcpgyjPageDTO"
+            resultType="com.onemap.apply.domain.ghss.ZbmxJcpgyjListViewDTO">
+        select t.xzqdm as "xzqdm", t.xzqmc as "xzqmc", t.jcz as "xzz"
+        from t_zbmx_zbjcz t
+        where
+        <if test="xzqdm != null and xzqdm != ''">
+            t.xzqdm like '%'||#{xzqdm}||'%'
+        </if>
+        <if test="year != null and year != ''">
+            and t.jcn = to_number(#{year})
+        </if>
+        <if test="zbbh != null and zbbh != ''">
+            and t.zbbh = #{zbbh}
+        </if>
+    </select>
+
+    <select id="GetZbghz" parameterType="com.onemap.apply.domain.ghss.TestParams"
+            resultType="com.onemap.apply.domain.ghss.ZbmxZbghzDTO">
+        select t.xzqdm as "xzqdm", t.zbbh as "zbbh", t.ghmbtj as "ghmbtj",t.ghmbz as "ghmbz",t.jqmbz as "jqmbz",t.jqmbtj
+        as "jqmbtj"
+        from t_zbmx_zbghz t
+        where t.xzqdm in
+        <foreach collection="xzqdmlist" item="xzqdm" open="(" separator="," close=")">
+            #{xzqdm}
+        </foreach>
+        <if test="zbbh != null and zbbh != ''">
+            and t.zbbh = #{zbbh}
+        </if>
+
+    </select>
+
+    <select id="GetZbtx" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxZbtxDTO">
+        select t.bsm as "bsm", t.txmc as "txmc", t.sstx as "sstx"
+        from t_zbmx_zbtx t
+        <if test="bsm != null and bsm != ''">
+            where t.bsm = #{bsm}
+        </if>
+
+    </select>
+
+    <select id="SelectTXZB" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxJcpgyjViewDTO">
+        select b.bsm as "txbsm", a.zbmc as "zbmc", a.zbbh as "zbbh", a.zbdw as "zbdw"
+        from t_zbmx_zbx a left join t_zbmx_zbtxgl b on (a.zbbh=b.zbbh)
+        <if test="bsm != null and bsm != ''">
+            where b.zbtx = #{bsm}
+        </if>
+
+    </select>
+
+    <select id="SelectJQZ" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxJcpgyjDTO">
+        select b.zbdw as "dw", a.jqz as "value", a.jqn as "key", a.zbbh as "zbbh"
+        from t_zbmx_zbjqz a left join t_zbmx_zbx b on (a.zbbh=b.zbbh)
+        where a.zbbh in
+        <foreach collection="newidsList" item="zbbh" open="(" separator="," close=")">
+            #{zbbh}
+        </foreach>
+        <if test="xzqdm != null and xzqdm != ''">
+            and a.xzqdm = #{xzqdm}
+        </if>
+        <if test="jqn != null and jqn != ''">
+            and a.jqn = #{jqn}
+        </if>
+        ORDER BY a.jqn DESC
+    </select>
+
+    <select id="SelectJCZ" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxJcpgyjDTO">
+        select b.zbdw as "dw", a.jcz as "value", (cast(to_char(a.jcsj,'yyyy') as number )) as "key", a.zbbh as "zbbh"
+        from t_zbmx_zbjcz a left join t_zbmx_zbx b on (a.zbbh=b.zbbh)
+        where a.zbbh in
+        <foreach collection="newidsList" item="zbbh" open="(" separator="," close=")">
+            #{zbbh}
+        </foreach>
+        <if test="xzqdm != null and xzqdm != ''">
+            and a.xzqdm = #{xzqdm}
+        </if>
+        <if test="tjsj != null and tjsj != ''">
+            and (to_char(a.jcsj,'yyyy') = #{tjsj})
+        </if>
+        ORDER BY a.tjsj DESC
+    </select>
+
+    <select id="SelectGHZ" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxJcpgyjDTO">
+        select b.zbdw as "dw", a.ghmbz as "value",a.jqmbz as "key", a.zbbh as "zbbh"
+        from t_zbmx_zbghz a left join t_zbmx_zbx b on (a.zbbh=b.zbbh)
+        where a.zbbh in
+        <foreach collection="newidsList" item="zbbh" open="(" separator="," close=")">
+            #{zbbh}
+        </foreach>
+        <if test="xzqdm != null and xzqdm != ''">
+            and a.xzqdm = #{xzqdm}
+        </if>
+        ORDER BY a.ghmbz DESC
+    </select>
+
+    <select id="SeletQSFX" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxZbjczDTO">
+        select a.bsm,a.zbbh,a.xzqdm,a.xzqmc,a.jcz,a.jcn,a.jcy from (select
+        t.bsm,t.zbbh,t.xzqdm,t.xzqmc,t.jcsj,t.jcz,t.jcyh,t.tjsj,t.jcn,t.jcy,row_number() over(order
+        by t.jcsj desc) as rowindex
+        from t_zbmx_zbjcz t where 1 = 1
+        <if test="xzqdm != null and xzqdm != ''">
+            and t.xzqdm = #{xzqdm}
+        </if>
+        <if test="zbbh != null and zbbh != ''">
+            and t.zbbh = #{zbbh}
+        </if>
+        <if test="jcsj != null and jcsj != ''">
+            and (to_char(t.jcsj,'yyyy') = #{jcsj})
+        </if>
+        ) a where rowindex between 1 and 1
+    </select>
+
+    <select id="SelectHBFX" parameterType="java.lang.String"
+            resultType="com.onemap.apply.domain.ghss.ZbmxZbjczDTO">
+        select a.bsm,a.zbbh,a.xzqdm,a.xzqmc,a.jcz,a.jcn,a.jcy from ( select
+        t.bsm,t.zbbh,t.xzqdm,t.xzqmc,t.jcsj,t.jcz,t.jcyh,t.tjsj,t.jcn,t.jcy,row_number() over(order by t.jcsj
+        desc) as rowindex
+        from t_zbmx_zbjcz t
+        <if test="xzqdm != null and xzqdm != ''">
+            where t.xzqdm = #{xzqdm}
+        </if>
+        <if test="zbbh != null and zbbh != ''">
+            and t.zbbh = #{zbbh}
+        </if>
+
+        order by t.jcsj desc) a
+    </select>
+
+    <select id="SelectGHMBZ" parameterType="java.lang.String"
+            resultType="java.lang.Double">
+        select d.jqmbz as "jqmbz" from (select 2025 as "key",a.jqmbz ,row_number() over(order by sysdate) as rowindex
+        from t_zbmx_zbghz a
+        <if test="xzqdm != null and xzqdm != ''">
+            where a.xzqdm = #{xzqdm}
+        </if>
+        <if test="zbbh != null and zbbh != ''">
+            and a.zbbh = #{zbbh}
+        </if>
+        ) d where d.rowindex between 1 and 1
+    </select>
+</mapper>

+ 13 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesAnswerMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesAnswerMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesAnswerDo" id="AnswerMap">
+        <result property="id" column="ID"/>
+        <result property="pid" column="PID"/>
+    </resultMap>
+
+
+</mapper>

+ 92 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesListMapper.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesListMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesListDo" id="ListMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="describe" column="describe"/>
+        <result property="status" column="status"/>
+        <result property="questioncount" column="question_count"/>
+        <result property="collected" column="collected"/>
+        <result property="createdate" column="create_date"/>
+        <result property="startdate" column="start_date"/>
+        <result property="enddate" column="end_date"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.question.DTO.QuestionnaireDto" id="questionnaireDtoMap">
+        <result property="name" column="name"/>
+        <result property="describe" column="describe"/>
+        <result property="coverImage" column="cover_image"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.question.vo.QueryListVo" id="QueryListMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="image" column="image"/>
+    </resultMap>
+
+    <update id="postById">
+        update t_questionnaires_list
+        set status = 2
+        where id = #{id}
+    </update>
+
+    <update id="stopById">
+        update t_questionnaires_list
+        set status = 1
+        where id = #{id}
+    </update>
+
+    <update id="finishById">
+        update t_questionnaires_list
+        set status = 4
+        where id = #{id}
+    </update>
+
+    <update id="logicDeleteById">
+        update t_questionnaires_list
+        set status = 10
+        where id = #{id}
+    </update>
+
+    <update id="update">
+    </update>
+
+    <update id="updateQuestionCount">
+        update t_questionnaires_list
+        set question_count = #{count}
+        where id = #{id}
+    </update>
+
+    <select id="selectDataById" resultMap="questionnaireDtoMap">
+        <!--        select list.name name, list.describe describe, image.image cover_image-->
+        <!--        from t_questionnaires_list list,-->
+        <!--             t_questionnaires_image image-->
+        <!--        where #{id} = image.pid-->
+        select name, describe, cover_image
+        from t_questionnaires_list
+        where id = #{id}
+    </select>
+
+    <select id="queryList" resultMap="QueryListMap">
+        select t1.id id, t1.name name, t2.image image
+        from t_questionnaires_list t1,
+             t_questionnaires_image t2
+        where t1.id = t2.pid
+          and t1.status not in (2, 4)
+    </select>
+
+    <update id="updateViewCountById">
+        update t_questionnaires_list
+        set view_count = view_count + 1
+        where id = #{id}
+    </update>
+
+    <update id="updateCollected">
+        update t_questionnaires_list
+        set collected = collected + 1
+        where id = #{id}
+    </update>
+</mapper>

+ 13 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesOptionAnsMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesOptionAnsMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesOptionAnsDo" id="OptionAnsMapper">
+        <result property="id" column="ID"/>
+        <result property="pid" column="PID"/>
+        <result property="optionId" column="OPTION_ID"/>
+    </resultMap>
+
+</mapper>

+ 48 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesOptionMapper.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesOptionMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesOptionDo" id="OptionMap">
+        <result property="id" column="id"/>
+        <result property="pid" column="pid"/>
+        <result property="code" column="code"/>
+        <result property="deleted" column="deleted"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.question.DTO.OptionDto" id="OptionDtoMap">
+        <result property="code" column="code"/>
+        <result property="content" column="context"/>
+        <result property="image" column="image"/>
+    </resultMap>
+
+    <!-- 生成单选题, 多选题 的选项集合 -->
+    <select id="selectOptionContext" resultType="java.lang.String">
+        SELECT T3.CONTEXT
+        FROM T_QUESTIONNAIRES_QUESTION T1, -- 问题表
+             T_QUESTIONNAIRES_OPTION T2,   -- 选项表
+             T_QUESTIONNAIRES_CHOICE T3    -- 选择题表
+        WHERE T1.ID = #{id}
+          AND T1.ID = T2.PID
+          AND T2.ID = T3.PID
+    </select>
+
+    <!-- 生成 图片选择题 的选项集合 -->
+    <select id="selectOptionImage" resultType="java.lang.String">
+        SELECT T3.CONTEXT
+        FROM T_QUESTIONNAIRES_QUESTION T1, -- 问题表
+             T_QUESTIONNAIRES_OPTION T2,   -- 选项表
+             T_QUESTIONNAIRES_CHOICE T3    -- 选择题表
+        WHERE T1.ID = #{id}
+          AND T1.ID = T2.PID
+          AND T2.ID = T3.PID
+    </select>
+
+    <select id="selectOptionByQuestionId" resultMap="OptionDtoMap">
+        select code, context, image
+        from t_questionnaires_option t
+        where t.pid = #{pid}
+          and deleted = 0
+        order by code
+    </select>
+</mapper>

+ 96 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesQuestionMapper.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesQuestionMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesQuestionDo" id="QuestionMap">
+        <result property="id" column="id"/>
+        <result property="pid" column="pid"/>
+        <result property="sort" column="sort"/>
+        <result property="mustanswer" column="must_answer"/>
+        <result property="context" column="context"/>
+        <result property="type" column="type"/>
+        <result property="deleted" column="deleted"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.question.DTO.OptionsDto" id="OptionsMap">
+        <result property="id" column="id"/>
+        <result property="code" column="code"/>
+        <result property="context" column="context"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.question.DTO.OptionStatisticsDto" id="OptionStatisticsMap">
+        <result property="context" column="context"/>
+        <result property="count" column="count"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.question.DTO.QuestionsDto" id="QuestionDtoMap">
+        <result property="id" column="id"/>
+        <result property="context" column="context"/>
+        <result property="type" column="type"/>
+        <result property="mustAnswer" column="mustAnswer"/>
+    </resultMap>
+
+    <!--根据 id值 查询题目总数-->
+    <select id="selectCountById" resultType="int">
+        select count(*)
+        from t_questionnaires_question
+        where pid = #{id}
+    </select>
+
+    <!--根据 题目id 查询出全部选项-->
+    <select id="selectOptions" resultMap="OptionsMap">
+        select id, code, context
+        from t_questionnaires_option
+        where pid = #{questionId}
+        order by code
+    </select>
+
+    <!--根据 题目id 查询出全部图片选项-->
+    <select id="selectImages" resultType="com.onemap.apply.domain.question.DTO.ImagesDto">
+        select t2.pid id, t2.id option_id, t3.image
+        from t_questionnaires_option t2, -- 选项表
+             t_questionnaires_image t3   -- 选择题表
+        where t2.pid = #{id}
+          and t2.id = t3.pid
+    </select>
+
+    <!--根据 选项id 查询回答表, 获取每个选项的得票总数-->
+    <select id="selectAns" resultMap="OptionStatisticsMap">
+        select t3.context context, count(*) count
+        from t_questionnaires_question t1,  -- 问题表
+             t_questionnaires_option t2,    -- 选项表
+             t_questionnaires_choice t3,    -- 选择题(单选题,多选题)表
+             t_questionnaires_answer t4,    -- 用户回答表
+             t_questionnaires_option_ans t5 -- 选择题回答表
+        where t1.id = t2.pid
+          and t2.id = t3.pid
+          and t1.id = t4.pid
+          and t4.id = t5.pid
+          and t2.id = #{id}
+    </select>
+
+    <!--根据 题目id 查询出全部回答数-->
+    <select id="selectTotal" resultType="int">
+        select count(*)
+        from t_questionnaires_answer answer -- 用户回答表
+        where answer.pid = #{questionId}
+    </select>
+
+    <!--根据 题目id 统计评价-->
+    <select id="selectTextById" resultType="java.lang.String">
+        select t3.context context
+        from t_questionnaires_answer t2,
+             t_questionnaires_short_ans t3
+        where t2.pid = #{id}
+          and t2.id = t3.pid
+    </select>
+
+    <select id="selectQuestionsByPid" resultMap="QuestionDtoMap">
+        select id, must_answer mustAnswer, context, type
+        from t_questionnaires_question
+        where pid = #{pid}
+          and deleted = 0
+        order by sort
+    </select>
+</mapper>

+ 13 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesShortAnsMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesShortAnsMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesShortAnsDo" id="ShortAnsMap">
+        <result property="id" column="ID"/>
+        <result property="pid" column="PID"/>
+        <result property="context" column="CONTEXT"/>
+    </resultMap>
+
+</mapper>

+ 14 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/question/QuestionnairesSortAnsMapper.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.question.QuestionnairesSortAnsMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.question.QuestionnairesSortAnsDo" id="SortAnsMap">
+        <result property="id" column="id"/>
+        <result property="pid" column="pid"/>
+        <result property="sort" column="sort"/>
+        <result property="indexid" column="indexid"/>
+    </resultMap>
+
+</mapper>

+ 26 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/sbjk/XzxzghcgsbMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.sbjk.XzczghcgsbMapper">
+
+    <select id="getInstIds" parameterType="java.lang.String"
+            resultType="java.lang.String">
+       select distinct (to_char(t.instid))
+      from t_xzczghcgsb t
+     where t.instid is not null
+       and t.instid not like '%#'
+     union all
+     select distinct (to_char(a.instid))
+      from t_xxghcgsb a
+     where a.instid is not null
+       and a.instid not like '%#'
+       union all
+       select distinct (to_char(s.instid))
+      from t_cggl_escalation s
+     where s.instid is not null
+       and s.instid not like '%#'
+    </select>
+
+
+</mapper>

+ 36 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExamgctaskMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.scpz.ExamGCTaskMapper">
+
+
+    <select id="getjqscresult" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamGCTaskDo">
+        select * from (SELECT *
+        FROM (select t.id,t.pid,t.rulename,t.ruletype,decode(b.ruleid, null,'false', 'true') ischeck from TS_EXAMRULEDIC t
+        left join
+        (select RULEID,RULEVALUE from TS_EXAMMoDEL where PID='6') b on t.id=b.ruleid) ndm
+        where ndm.id &lt; 15
+        START WITH ndm.PID=0
+        CONNECT BY PRIOR ndm.ID = ndm.PID ) dg
+        left join (
+        select guid,taskid,  (case when taskzt='审查完成'  then result
+        else taskzt  end
+        ) as taskresult,bz,ruleid,gcid,sclevel  from TS_EXAMTASK t  where GCID=#{gcid} and sclevel=#{sclevel} ) sb on  dg.id=sb.ruleid
+    </select>
+
+
+    <select id="getrjscresult" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamGCTaskDo">
+        select * from (SELECT *
+                       FROM (select t.id,t.pid,t.rulename,t.ruletype,decode(b.ruleid, null,'false', 'true') ischeck from TS_EXAMRULEDIC t
+                        left join
+                        (select RULEID,RULEVALUE from TS_EXAMMoDEL where PID='6') b on t.id=b.ruleid) ndm
+                       where ndm.id &gt; 14 or ndm.pid=0
+                           START WITH ndm.PID=0
+                       CONNECT BY PRIOR ndm.ID = ndm.PID ) dg
+                          left join (
+            select guid,taskid,  (case when taskzt='审查完成'  then result
+                                       else taskzt  end
+                ) as taskresult,bz,ruleid,gcid,sclevel  from TS_EXAMTASK t  where GCID=#{gcid} and sclevel=#{sclevel} ) sb on  dg.id=sb.ruleid
+    </select>
+</mapper>

+ 10 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExammodelMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.scpz.ExammodelMapper">
+
+    <select id="getbypid" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExammodelDo">
+        SELECT *
+        FROM TS_EXAMMoDEL where pid=${pid}
+    </select>
+</mapper>

+ 39 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExammodeldicMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.scpz.ExammodeldicMapper">
+
+    <resultMap type="ExammodeldicDo" id="ExammodeldicResult">
+        <id property="id" column="id"/>
+        <result property="modelsname" column="modelsname"/>
+        <result property="pid" column="pid"/>
+        <result property="type" column="type"/>
+        <result property="xzqmc" column="xzqmc"/>
+        <result property="xzqdm" column="xzqdm"/>
+    </resultMap>
+
+    <select id="getTreeList" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExammodeldicDo">
+        SELECT *
+        FROM TS_EXAMMODELDIC t
+            START WITH t.PID=0
+        CONNECT BY PRIOR t.ID = t.PID
+    </select>
+
+    <insert id="insertmodel" parameterType="ExammodeldicDo">
+        insert into TS_EXAMMODELDIC (
+        id,
+        <if test="modelsname != null and modelsname != '' ">modelsname,</if>
+        <if test="pid != null and pid != '' ">pid,</if>
+        <if test="type != null and type != '' ">type,</if>
+        <if test="xzqmc != null and xzqmc != '' ">xzqmc,</if>
+        <if test="xzqdm != null and xzqdm != '' ">xzqdm</if>
+        )values(
+        (select CASE WHEN max(id) is null THEN 1 ELSE max(id) + 1 END from TS_EXAMMODELDIC),
+        <if test="modelsname != null and modelsname != ''">#{modelsname},</if>
+        <if test="pid != null and pid != ''">${pid},</if>
+        <if test="type != null and type != ''">#{type},</if>
+        <if test="xzqmc != null and xzqmc != ''">#{xzqmc},</if>
+        <if test="xzqdm != null and xzqdm != ''">#{xzqdm}</if>
+        )
+    </insert>
+</mapper>

+ 34 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExamruleMapper.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.scpz.ExamruleMapper">
+
+
+    <select id="getTreeList" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamruledicDO">
+        SELECT *
+        FROM TS_EXAMRULEDIC t
+            START WITH t.PID=-1
+        CONNECT BY PRIOR t.ID = t.PID
+    </select>
+
+    <select id="getRulebypid" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamruledicDO">
+        SELECT *
+        FROM (select t.*,decode(b.ruleid, null,'false', 'true') ischeck,b.RULEVALUE VALUE from TS_EXAMRULEDIC t
+            left join
+            (select RULEID,RULEVALUE from TS_EXAMMoDEL where PID=#{modelid}) b on t.id=b.ruleid) t
+            START WITH t.PID=-1
+        CONNECT BY PRIOR t.ID = t.PID
+    </select>
+
+    <select id="getRulebyid" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamruledicDO">
+        SELECT *
+        FROM TS_EXAMRULEDIC where id=${id}
+    </select>
+
+    <select id="getPRulebyjq" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamruledicDO">
+        SELECT *
+        FROM TS_EXAMRULEDIC  where PID=0 and id &lt; ${id}
+    </select>
+
+</mapper>

+ 26 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/scpz/ExamtaskMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.scpz.ExamtaskMapper">
+
+
+    <select id="gettaskbyid" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamTaskDo">
+        select guid,taskid,
+               (case when taskzt='审查完成'  then scresult
+                   else taskzt  end) as result,bz
+        from TS_EXAMTASK t  where GCID=#{gcid} and ruleid It; ${id}
+    </select>
+
+    <update id="updateyj">
+        update TS_EXAMTASK
+        set taskzt='审查完成',bz=#{yj},result=#{yj},endtime=sysdate
+        where ruleid=#{ruleid} and taskid=#{taskid} and sclevel=#{sclevel}
+    </update>
+
+    <select id="gettaskbyrulidtaskid" parameterType="java.lang.String" resultType="com.onemap.apply.domain.scpz.ExamTaskDo">
+        select *
+        from TS_EXAMTASK t  where taskid=#{taskid} and ruleid=#{ruleid}
+    </select>
+
+</mapper>

+ 15 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/PlanningAppendixMapper.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.PlanningAppendixMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.PlanningAppendixDo" id="planningAppendixMap">
+        <result property="id" column="ID"/>
+        <result property="pid" column="PID"/>
+        <result property="appendix" column="APPENDIX"/>
+        <result property="type" column="TYPE"/>
+    </resultMap>
+
+
+</mapper>

+ 18 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/PlanningListMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.PlanningListMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.PlanningListDo" id="planningListMap">
+        <result property="id" column="ID"/>
+        <result property="title" column="TITLE"/>
+        <result property="context" column="CONTEXT"/>
+        <result property="type" column="TYPE"/>
+        <result property="status" column="STATUS"/>
+        <result property="createDate" column="CREATE_DATE"/>
+        <result property="publishDate" column="PUBLISH_DATE"/>
+    </resultMap>
+
+
+</mapper>

+ 18 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TCfgSettingMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.TCfgSettingMapper">
+
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.TCfgSettingDo" id="tCfgSettingMap">
+        <result property="id" column="ID"/>
+        <result property="name" column="NAME"/>
+        <result property="value" column="VALUE"/>
+        <result property="state" column="STATE"/>
+        <result property="uuser" column="UUSER"/>
+        <result property="utime" column="UTIME"/>
+        <result property="note" column="NOTE"/>
+    </resultMap>
+
+
+</mapper>

+ 106 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwGkgsMapper.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.TShfwGkgsMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.TShfwGkgsDo" id="tShfwGkgsMap">
+        <result property="id" column="id"/>
+        <result property="userid" column="userid"/>
+        <result property="title" column="title"/>
+        <result property="content" column="content"/>
+        <result property="views" column="views"/>
+        <result property="likes" column="likes"/>
+        <result property="commentcount" column="commentcount"/>
+        <result property="createdate" column="createdate"/>
+        <result property="updateuser" column="updateuser"/>
+        <result property="updatedate" column="updatedate"/>
+        <result property="categoryid" column="categoryid"/>
+        <result property="visible" column="visible"/>
+        <result property="fj" column="fj"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shfw.vo.GkgsVo" id="GkgsVoMap">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="user" column="user"/>
+        <result property="views" column="views"/>
+        <result property="releasedate" column="releasedate"/>
+    </resultMap>
+
+    <update id="update">
+    </update>
+
+    <select id="selectPre" resultMap="tShfwGkgsMap">
+        select id,
+               userid,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               createdate,
+               updateuser,
+               updatedate,
+               categoryid,
+               visible,
+               fj
+        from t_shfw_gkgs
+        <where>
+            <if test="id != null and id != ''">
+                and categoryid = #{id}
+            </if>
+            <if test="date != null">
+                and createdate &gt; #{date}
+            </if>
+        </where>
+        order by createdate
+    </select>
+
+    <select id="selectNex" resultMap="tShfwGkgsMap">
+        select id,
+               userid,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               createdate,
+               updateuser,
+               updatedate,
+               categoryid,
+               visible,
+               fj
+        from t_shfw_gkgs
+        <where>
+            <if test="id != null and id != ''">
+                and categoryid = #{id}
+            </if>
+            <if test="date != null">
+                and createdate &lt; #{date}
+            </if>
+        </where>
+        order by createdate desc
+    </select>
+
+    <select id="selectVoList" resultMap="GkgsVoMap">
+        select id,
+               title,
+               userid as "user",
+               views,
+               releasedate
+        from t_shfw_gkgs
+        <where>
+            and status = 1
+            <if test="id != null and id != ''">
+                and categoryid = #{id}
+            </if>
+        </where>
+        order by releasedate desc
+    </select>
+
+    <update id="updateViews">
+        update t_shfw_gkgs
+        set views = views + 1
+        where id = #{id}
+    </update>
+</mapper>

+ 115 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwGzjdMapper.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.TShfwGzjdMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.ShfwGzjdDo" id="tShfwGzjdMap">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="content" column="content"/>
+        <result property="views" column="views"/>
+        <result property="likes" column="likes"/>
+        <result property="commentcount" column="commentcount"/>
+        <result property="visible" column="visible"/>
+        <result property="createdate" column="createdate"/>
+        <result property="sj" column="sj"/>
+        <result property="xm" column="xm"/>
+        <result property="dh" column="dh"/>
+        <result property="yx" column="yx"/>
+        <result property="fj" column="fj"/>
+        <result property="clzt" column="clzt"/>
+        <result property="hfjg" column="hfjg"/>
+        <result property="hfrq" column="hfrq"/>
+        <result property="hfnr" column="hfnr"/>
+        <result property="hffj" column="hffj"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shfw.vo.GzjdVo" id="GzjdVoMap">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="createdate" column="createdate"/>
+        <result property="hfnr" column="hfnr"/>
+    </resultMap>
+
+    <update id="update">
+    </update>
+
+    <select id="selectAll" resultMap="GzjdVoMap">
+        select id,
+               title,
+               createdate,
+               hfnr
+        from t_shfw_gzjd
+        order by createdate desc
+    </select>
+
+    <select id="selectPre" resultMap="tShfwGzjdMap">
+        select id,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               visible,
+               createdate,
+               sj,
+               xm,
+               dh,
+               yx,
+               fj,
+               clzt,
+               hfjg,
+               hfrq,
+               hfnr,
+               hffj
+        from t_shfw_gzjd
+        where createdate &gt; #{date}
+        order by createdate
+    </select>
+
+    <select id="selectNex" resultMap="tShfwGzjdMap">
+        select id,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               visible,
+               createdate,
+               sj,
+               xm,
+               dh,
+               yx,
+               fj,
+               clzt,
+               hfjg,
+               hfrq,
+               hfnr,
+               hffj
+        from t_shfw_gzjd
+        where createdate &lt; #{date}
+        order by createdate desc
+    </select>
+
+    <update id="updateSave">
+        update t_shfw_gzjd
+        <set>
+            <if test="clzt != null and clzt != ''">
+                clzt = #{clzt, jdbcType=DOUBLE},
+            </if>
+            <if test="hfnr != null and hfnr != ''">
+                hfnr = #{hfnr, jdbcType=CLOB},
+            </if>
+            hffj = #{hffj, jdbcType=VARCHAR},
+            hfjg = #{hfjg, jdbcType=VARCHAR},
+            hfrq = to_date(#{hfrq, jdbcType=VARCHAR}, 'yyyy-mm-dd'),
+        </set>
+        where id = #{id}
+    </update>
+
+    <update id="updateViews">
+        update t_shfw_gzjd
+        set views = views + 1
+        where id = #{id}
+    </update>
+</mapper>

+ 18 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwWzlbMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.TShfwWzlbMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.TShfwWzlbDo" id="tShfwWzlbMap">
+        <result property="categoryId" column="CATEGORYID"/>
+        <result property="categoryName" column="CATEGORYNAME"/>
+        <result property="description" column="DESCRIPTION"/>
+        <result property="parentId" column="PARENTID"/>
+        <result property="sortId" column="SORTID"/>
+        <result property="categoryType" column="CATEGORYTYPE"/>
+        <result property="visible" column="VISIBLE"/>
+    </resultMap>
+
+
+</mapper>

+ 131 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwXwzxMapper.xml

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.TShfwXwzxMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.TShfwXwzxDo" id="tShfwXwzxMap">
+        <result property="id" column="id"/>
+        <result property="userid" column="userid"/>
+        <result property="title" column="title"/>
+        <result property="content" column="content"/>
+        <result property="views" column="views"/>
+        <result property="likes" column="likes"/>
+        <result property="commentcount" column="commentcount"/>
+        <result property="createdate" column="createdate"/>
+        <result property="updateuser" column="updateuser"/>
+        <result property="updatedate" column="updatedate"/>
+        <result property="visible" column="visible"/>
+        <result property="fj" column="fj"/>
+        <result property="categoryid" column="categoryid"/>
+        <result property="fmt" column="fmt"/>
+        <result property="zz" column="zz"/>
+        <result property="ly" column="ly"/>
+        <result property="jg" column="jg"/>
+        <result property="hd" column="hd"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shfw.vo.XwzxVo" id="xwzxVoMap">
+        <result property="id" column="id"/>
+        <result property="user" column="user"/>
+        <result property="title" column="title"/>
+        <result property="views" column="views"/>
+        <result property="releasedate" column="releasedate"/>
+        <result property="zz" column="zz"/>
+        <result property="ly" column="ly"/>
+        <result property="jg" column="jg"/>
+        <result property="hd" column="hd"/>
+        <result property="hdstr" column="hdstr"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shfw.vo.XwzxBannerVo" id="xwzxBannerVoMap">
+        <result property="id" column="id"/>
+        <result property="fj" column="fj"/>
+    </resultMap>
+
+    <update id="update">
+    </update>
+
+    <select id="selectPre" resultMap="tShfwXwzxMap">
+        select id,
+               userid,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               createdate,
+               updateuser,
+               updatedate,
+               visible,
+               fj,
+               categoryid,
+               fmt,
+               zz,
+               ly,
+               jg,
+               hd
+        from t_shfw_xwzx
+        where categoryid = #{id}
+          and createdate &gt; #{date}
+          and rownum = 1
+        order by createdate
+    </select>
+
+    <select id="selectNex" resultMap="tShfwXwzxMap">
+        select id,
+               userid,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               createdate,
+               updateuser,
+               updatedate,
+               visible,
+               fj,
+               categoryid,
+               fmt,
+               zz,
+               ly,
+               jg,
+               hd
+        from t_shfw_xwzx
+        where categoryid = #{id}
+          and createdate &lt; #{date}
+        order by createdate desc
+    </select>
+
+    <select id="getBanner" resultMap="xwzxBannerVoMap">
+        select t.id, t.fj
+        from (select id, fj from t_shfw_xwzx where fj is not null order by createdate desc) t
+        where rownum &lt;= 4
+    </select>
+
+    <select id="selectVoList" resultMap="xwzxVoMap">
+        select id,
+               userid                    as "user",
+               title,
+               views,
+               releasedate,
+               zz,
+               ly,
+               jg,
+               hd,
+               decode(hd, '1', '是', '否') as "hdstr"
+        from t_shfw_xwzx
+        <where>
+            and status = 1
+            <if test="value != null and value != ''">
+                and categoryid = #{value}
+            </if>
+        </where>
+        order by releasedate desc
+    </select>
+
+    <update id="updateViews">
+        update t_shfw_xwzx
+        set views = views + 1
+        where id = #{id}
+    </update>
+</mapper>

+ 66 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shfw/TShfwYjzxMapper.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shfw.TShfwYjzxMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shfw.TShfwYjzxDo" id="tShfwYjzxMap">
+        <result property="id" column="ID"/>
+        <result property="userid" column="USERID"/>
+        <result property="title" column="TITLE"/>
+        <result property="content" column="CONTENT"/>
+        <result property="views" column="VIEWS"/>
+        <result property="likes" column="LIKES"/>
+        <result property="commentcount" column="COMMENTCOUNT"/>
+        <result property="createdate" column="CREATEDATE"/>
+        <result property="updateuser" column="UPDATEUSER"/>
+        <result property="updatedate" column="UPDATEDATE"/>
+        <result property="categoryid" column="CATEGORYID"/>
+        <result property="visible" column="VISIBLE"/>
+        <result property="fj" column="FJ"/>
+    </resultMap>
+
+    <update id="update">
+
+    </update>
+
+    <select id="selectListByCategoryId" resultMap="tShfwYjzxMap">
+        SELECT ID, USERID, TITLE, CONTENT, VIEWS, LIKES, COMMENTCOUNT, CREATEDATE, UPDATEUSER, UPDATEDATE, CATEGORYID, VISIBLE, FJ
+        FROM T_SHFW_YJZX
+        WHERE VISIBLE = '1'
+          AND CATEGORYID IN
+            <foreach collection="idList" item="id" separator=" , " open="(" close=")">
+                 #{id}
+            </foreach>
+        ORDER BY CREATEDATE DESC
+    </select>
+
+    <select id="selectPre1" resultMap="tShfwYjzxMap">
+        SELECT ID, USERID, TITLE, CONTENT, VIEWS, LIKES, COMMENTCOUNT, CREATEDATE, UPDATEUSER, UPDATEDATE, CATEGORYID, VISIBLE, FJ
+        FROM T_SHFW_YJZX
+        WHERE CATEGORYID = #{id} AND CREATEDATE &gt; TO_DATE(#{date}, 'yyyy-mm-dd hh24:mi:ss') -- AND ROWNUM = 1
+        ORDER BY CREATEDATE
+    </select>
+
+    <select id="selectPre" resultMap="tShfwYjzxMap">
+        SELECT ID, USERID, TITLE, CONTENT, VIEWS, LIKES, COMMENTCOUNT, CREATEDATE, UPDATEUSER, UPDATEDATE, CATEGORYID, VISIBLE, FJ
+        FROM T_SHFW_YJZX
+        WHERE CATEGORYID = #{id} AND CREATEDATE &gt; #{date} -- AND ROWNUM = 1
+        ORDER BY CREATEDATE
+    </select>
+
+    <select id="selectNex1" resultMap="tShfwYjzxMap">
+        SELECT ID, USERID, TITLE, CONTENT, VIEWS, LIKES, COMMENTCOUNT, CREATEDATE, UPDATEUSER, UPDATEDATE, CATEGORYID, VISIBLE, FJ
+        FROM T_SHFW_YJZX
+        WHERE CATEGORYID = #{id} AND CREATEDATE &lt; TO_DATE(#{date}, 'yyyy-mm-dd hh24:mi:ss') -- AND ROWNUM = 1
+        ORDER BY CREATEDATE DESC
+    </select>
+
+    <select id="selectNex" resultMap="tShfwYjzxMap">
+        SELECT ID, USERID, TITLE, CONTENT, VIEWS, LIKES, COMMENTCOUNT, CREATEDATE, UPDATEUSER, UPDATEDATE, CATEGORYID, VISIBLE, FJ
+        FROM T_SHFW_YJZX
+        WHERE CATEGORYID = #{id} AND CREATEDATE &lt; #{date} -- AND ROWNUM = 1
+        ORDER BY CREATEDATE
+    </select>
+
+</mapper>

+ 15 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGhcgAppendixMapper.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwGhcgAppendixMapper">
+
+	<!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwGhcgAppendixDo" id="ShfwGhcgAppendixMap">
+        <result property="uuid" column="uuid"/>
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="appendix" column="appendix"/>
+        <result property="type" column="type"/>
+    </resultMap>
+
+</mapper>

+ 89 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGhcgMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwGhcgMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwGhcgDo" id="ShfwGhcgMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="context" column="context"/>
+        <result property="createDate" column="create_date"/>
+        <result property="releaseDate" column="release_date"/>
+        <result property="type" column="type"/>
+        <result property="status" column="status"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shgzfw.vo.QueryListByTypeVo" id="QueryListByTypeVoMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="releaseDate" column="release_date"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shgzfw.vo.GhcgQueryListVo" id="queryListVoMap">
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="context" column="context"/>
+        <result property="createDate" column="create_date"/>
+        <result property="releaseDate" column="release_date"/>
+        <result property="type" column="type"/>
+        <result property="status" column="status"/>
+    </resultMap>
+
+    <select id="queryList" resultMap="queryListVoMap">
+        select id, name, context, create_date, release_date, type, status
+        from t_shfw_ghcg
+        <where>
+            status != 10
+            <if test="status != null">
+                and status = #{status}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+            <if test="name != null and name != ''">
+                and name like '%' || #{name} || '%'
+            </if>
+        </where>
+        order by release_date desc
+    </select>
+
+    <update id="publishById">
+        update t_shfw_ghcg
+        set status = 1
+        where id = #{id}
+    </update>
+
+    <update id="unPublishById">
+        update t_shfw_ghcg
+        set status = 2
+        where id = #{id}
+    </update>
+
+    <update id="logicDeleteById">
+        update t_shfw_ghcg
+        set status = 10
+        where id = #{id}
+    </update>
+
+    <select id="selectByType" resultMap="QueryListByTypeVoMap">
+        select id, name, release_date
+        from t_shfw_ghcg
+        <where>
+            and status = 1
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+        </where>
+        order by release_date desc
+    </select>
+
+    <select id="selectEntityById" resultMap="ShfwGhcgMap">
+        select id, name, context, create_date, release_date, type, status
+        from t_shfw_ghcg
+        <where>
+            <if test="id != null and id != ''">
+                id = #{id}
+            </if>
+        </where>
+    </select>
+</mapper>

+ 28 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGkgsMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwGkgsMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwGkgsDo" id="shfwGkgsMap">
+        <result property="id" column="id"/>
+        <result property="userid" column="userid"/>
+        <result property="title" column="title"/>
+        <result property="content" column="content"/>
+        <result property="views" column="views"/>
+        <result property="likes" column="likes"/>
+        <result property="commentcount" column="commentcount"/>
+        <result property="createdate" column="createdate"/>
+        <result property="updateuser" column="updateuser"/>
+        <result property="updatedate" column="updatedate"/>
+        <result property="categoryid" column="categoryid"/>
+        <result property="visible" column="visible"/>
+        <result property="fj" column="fj"/>
+        <result property="status" column="status"/>
+    </resultMap>
+
+    <update id="postById">
+        update t_shfw_gkgs
+        set status = 1
+        where id = #{id}
+    </update>
+</mapper>

+ 18 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGsxxAppendixDao.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwGsxxAppendixMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwGsxxAppendixDo" id="ShfwGsxxAppendixMap">
+        <result property="uuid" column="UUID"/>
+        <result property="id" column="ID"/>
+        <result property="name" column="NAME"/>
+        <result property="url" column="URL"/>
+    </resultMap>
+
+    <delete id="deleteAppendix">
+        delete
+        from t_shfw_gsxx_appendix
+        where id = #{id}
+    </delete>
+</mapper>

+ 45 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwGsxxDao.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwGsxxMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwGsxxDo" id="ShfwGsxxMap">
+        <result property="id" column="ID"/>
+        <result property="title" column="TITLE"/>
+        <result property="content" column="CONTENT"/>
+        <result property="views" column="VIEWS"/>
+        <result property="type" column="TYPE"/>
+        <result property="status" column="STATUS"/>
+        <result property="cjsj" column="CJSJ"/>
+        <result property="fbsj" column="FBSJ"/>
+    </resultMap>
+
+    <update id="postById">
+        update t_shfw_gsxx
+        set status = 1
+        where id = #{id}
+    </update>
+
+    <select id="getList" resultMap="ShfwGsxxMap">
+        select id,
+               title,
+               content,
+               views,
+               type,
+               status,
+               cjsj,
+               fbsj
+        from t_shfw_gsxx
+        <where>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+            <if test="status != null and status != ''">
+                and status = #{status}
+            </if>
+            <if test="title != null and title != ''">
+                and title like '%' || #{title} || '%'
+            </if>
+        </where>
+    </select>
+</mapper>

+ 70 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwXwzxMapper.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwXwzxMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwXwzxDo" id="ShfwXwzxMap">
+        <result property="id" column="id"/>
+        <result property="userid" column="userid"/>
+        <result property="title" column="title"/>
+        <result property="content" column="content"/>
+        <result property="views" column="views"/>
+        <result property="likes" column="likes"/>
+        <result property="commentcount" column="commentcount"/>
+        <result property="createdate" column="createdate"/>
+        <result property="updateuser" column="updateuser"/>
+        <result property="updatedate" column="updatedate"/>
+        <result property="visible" column="visible"/>
+        <result property="fj" column="fj"/>
+        <result property="categoryid" column="categoryid"/>
+        <result property="fmt" column="fmt"/>
+        <result property="zz" column="zz"/>
+        <result property="ly" column="ly"/>
+        <result property="jg" column="jg"/>
+        <result property="hd" column="hd"/>
+        <result property="status" column="status"/>
+        <result property="releaseDate" column="releasedate"/>
+    </resultMap>
+
+    <select id="queryList" resultMap="ShfwXwzxMap">
+        select id,
+               userid,
+               title,
+               content,
+               views,
+               likes,
+               commentcount,
+               createdate,
+               updateuser,
+               updatedate,
+               visible,
+               fj,
+               categoryid,
+               fmt,
+               zz,
+               ly,
+               jg,
+               hd,
+               status,
+               releasedate
+        from t_shfw_xwzx
+        <where>
+            <if test="title != null and title != ''">
+                and title like '%' || #{title} || '%'
+            </if>
+            <if test="status != null and status != ''">
+                and status = #{status}
+            </if>
+            <if test="categoryid != null and categoryid != ''">
+                and categoryid = #{categoryid}
+            </if>
+        </where>
+        order by updatedate desc
+    </select>
+
+    <update id="postsById">
+        update t_shfw_xwzx
+        set status = 1
+        where id = #{id}
+    </update>
+</mapper>

+ 13 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwYztAppendixMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwYztAppendixMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwYztAppendixDo" id="ShfwYztAppendixDo">
+        <result property="uuid" column="uuid"/>
+        <result property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="url" column="url"/>
+    </resultMap>
+
+</mapper>

+ 43 - 0
onemap-modules/onemap-spotoverlap/src/main/resources/mapper/oracle/shgzfw/ShfwYztMapper.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.onemap.apply.mapper.shgzfw.ShfwYztMapper">
+    <!-- 可根据自己的需求,是否要使用 -->
+    <resultMap type="com.onemap.apply.domain.shgzfw.ShfwYztDo" id="ShfwYztDo">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="location" column="location"/>
+        <result property="district" column="district"/>
+        <result property="describe" column="describe"/>
+        <result property="cjsj" column="cjsj"/>
+    </resultMap>
+
+    <resultMap type="com.onemap.apply.domain.shgzfw.vo.ShfwYztGetListVo" id="GetListVoMap">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="location" column="location"/>
+        <result property="district" column="district"/>
+        <result property="describe" column="describe"/>
+        <result property="cjsj" column="cjsj"/>
+    </resultMap>
+
+    <select id="getList" resultType="com.onemap.apply.domain.shgzfw.vo.ShfwYztGetListVo">
+        select id, title, location, describe, cjsj, district
+        from t_shfw_yzt
+        <where>
+            <if test="startdate != null and startdate != ''">
+                and cjsj &gt;= to_date(#{startdate}, 'yyyy-mm-dd hh24:mi:ss')
+            </if>
+            <if test="enddate != null and enddate != ''">
+                and cjsj &lt;= to_date(#{enddate}, 'yyyy-mm-dd hh24:mi:ss')
+            </if>
+            <if test="location != null and location != ''">
+                and location like '%' || #{location} || '%'
+            </if>
+            <if test="district != null and district != ''">
+                and district like '%' || #{district} || '%'
+            </if>
+        </where>
+        order by cjsj desc
+    </select>
+</mapper>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels