소스 검색

添加分析模块

董珍珍 1 년 전
부모
커밋
79ea71e947
100개의 변경된 파일8900개의 추가작업 그리고 0개의 파일을 삭제
  1. BIN
      onemap-modules/onemap-analyse/lib/aspose-words-18.6-jdk16-crack.jar
  2. BIN
      onemap-modules/onemap-analyse/lib/jts-1.13.jar
  3. 191 0
      onemap-modules/onemap-analyse/pom.xml
  4. 36 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/OneMapAnalyseApplication.java
  5. 32 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/config/AsyConfig.java
  6. 103 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/ChscController.java
  7. 69 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/FzssController.java
  8. 32 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/ToolController.java
  9. 28 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriFeature.java
  10. 28 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriFeaturePoint.java
  11. 28 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriFeaturePolyline.java
  12. 42 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriField.java
  13. 19 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriGeometry.java
  14. 28 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriGeometryPoint.java
  15. 19 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriGeometryPolyline.java
  16. 65 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriJsonModel.java
  17. 65 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriJsonModelPoint.java
  18. 65 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriJsonModelPolyline.java
  19. 26 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriSpatialReference.java
  20. 41 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/Field.java
  21. 40 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FxReport.java
  22. 23 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FxfwDictDTO.java
  23. 75 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FxrwrzDTO.java
  24. 34 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzssChscFileDTO.java
  25. 67 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzssChscXmgxDTO.java
  26. 72 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzssSystemDTO.java
  27. 376 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzChscDTO.java
  28. 45 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzChscProgressDTO.java
  29. 180 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzDTO.java
  30. 131 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzEntityDTO.java
  31. 130 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzJgGisDTO.java
  32. 70 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzJgyzDTO.java
  33. 97 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzReport.java
  34. 55 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzResultDTO.java
  35. 67 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzTbEntityDTO.java
  36. 61 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzXzyzDTO.java
  37. 31 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/GeoJSON/Feature.java
  38. 9 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/GeoJSON/GeoJsonModel.java
  39. 25 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/GeoJSON/Geometry.java
  40. 129 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxDTO.java
  41. 182 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxEntityDTO.java
  42. 77 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxFxtbDTO.java
  43. 100 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxGisDTO.java
  44. 62 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxHgscxDTO.java
  45. 115 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxHgscxExportDTO.java
  46. 81 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxJcxsDTO.java
  47. 80 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxScxDTO.java
  48. 43 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxTemplateDTO.java
  49. 37 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/RwztDTO.java
  50. 179 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/TCtfxMainDTO.java
  51. 49 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/TCtfxTdkfqdDTO.java
  52. 22 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/XzlbDTO.java
  53. 154 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ZttDTO.java
  54. 61 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ZttMbDTO.java
  55. 69 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/zbmx/ZbmxMxjsDTO.java
  56. 220 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/zbmx/ZbmxMxjsrwDO.java
  57. 126 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/zbmx/ZbmxMxjsrwrzDO.java
  58. 18 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/CtfxMapper.java
  59. 14 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FxrwrzMapper.java
  60. 14 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzssChscFileMapper.java
  61. 14 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzssChscMapper.java
  62. 14 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzssSystemMapper.java
  63. 14 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzJgGISMapper.java
  64. 13 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzJgyzMapper.java
  65. 18 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzMapper.java
  66. 17 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzTbMapper.java
  67. 13 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzXzyzMapper.java
  68. 18 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxHgscxMapper.java
  69. 22 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxMapper.java
  70. 13 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxScxMapper.java
  71. 13 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxTemplateMapper.java
  72. 13 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/ZttMapper.java
  73. 14 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/ZttMbMapper.java
  74. 20 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/zbmx/ZbmxMxjsrwMapper.java
  75. 7 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/zbmx/ZbmxMxjsrwrzMapper.java
  76. 25 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IChscService.java
  77. 18 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IFzssService.java
  78. 8 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IToolService.java
  79. 236 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ChscServiceImpl.java
  80. 170 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/FzssServiceImpl.java
  81. 56 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ToolServiceImpl.java
  82. 172 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ChscSchedule.java
  83. 103 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/CtfxSchedule.java
  84. 126 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/FtpSchedule.java
  85. 860 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/FzxzSchedule.java
  86. 492 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/HgxfxSchedule.java
  87. 251 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/PythonExecute.java
  88. 134 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ZbmxMxjsSchedule.java
  89. 120 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ZttSchedule.java
  90. 136 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/CalculateShpArea.java
  91. 37 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/DownloadUtils.java
  92. 72 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/DozerUtils.java
  93. 86 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/EsriJsonUtils.java
  94. 28 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/FileUtils.java
  95. 43 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/FixedThreadUtil.java
  96. 243 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/Fxfw2SdeUtils.java
  97. 84 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/HttpUtil.java
  98. 514 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/NpoiHelper.java
  99. 102 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/NumberUtil.java
  100. 224 0
      onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/PointXml2ShpUtils.java

BIN
onemap-modules/onemap-analyse/lib/aspose-words-18.6-jdk16-crack.jar


BIN
onemap-modules/onemap-analyse/lib/jts-1.13.jar


+ 191 - 0
onemap-modules/onemap-analyse/pom.xml

@@ -0,0 +1,191 @@
+<?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-analyse</artifactId>
+    <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>
+
+        <!-- Python -->
+        <!--        <dependency>-->
+        <!--            <groupId>org.python</groupId>-->
+        <!--            <artifactId>jython</artifactId>-->
+        <!--            <version>${org.python.version}</version>-->
+        <!--        </dependency>-->
+        <dependency>
+            <groupId>org.python</groupId>
+            <artifactId>jython-standalone</artifactId>
+            <version>${org.python.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>aspose-words-18.6-jdk16-crack</groupId>
+            <artifactId>aspose-words-18.6-jdk16-crack</artifactId>
+            <version>15.8.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/lib/aspose-words-18.6-jdk16-crack.jar</systemPath>
+        </dependency>
+        <!--zip4j依赖,解压zip压缩-->
+        <dependency>
+            <groupId>net.lingala.zip4j</groupId>
+            <artifactId>zip4j</artifactId>
+            <version>1.3.2</version>
+        </dependency>
+        <!--   geotools     -->
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-shapefile</artifactId>
+            <version>28-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-swing</artifactId>
+            <version>28-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-epsg-hsql</artifactId>
+            <version>28-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools.jdbc</groupId>
+            <artifactId>gt-jdbc-mysql</artifactId>
+            <version>28-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-geojson</artifactId>
+            <version>28-SNAPSHOT</version>
+        </dependency>
+        <!-- 解析几何geometry对象用的-->
+        <dependency>
+            <groupId>org.locationtech.jts</groupId>
+            <artifactId>jts-core</artifactId>
+            <version>1.19.0</version>
+        </dependency>
+        <dependency>
+            <groupId>gt-jts</groupId>
+            <artifactId>gt-jts</artifactId>
+            <scope>system</scope>
+            <version>1.13</version>
+            <systemPath>${project.basedir}/lib/jts-1.13.jar</systemPath>
+        </dependency>
+        <!--    简繁体转换    -->
+        <dependency>
+            <groupId>com.ibm.icu</groupId>
+            <artifactId>icu4j</artifactId>
+            <version>69.1</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>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 36 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/OneMapAnalyseApplication.java

@@ -0,0 +1,36 @@
+package com.onemap.analyse;
+
+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 OneMapAnalyseApplication
+{
+    public static void main(String[] args)
+    {
+        SpringApplication.run(OneMapAnalyseApplication.class, args);
+        System.out.println("(♥◠‿◠)ノ゙  一张图分析模块启动成功   ლ(´ڡ`ლ)゙  \n" +
+                " .-------.       ____     __        \n" +
+                " |  _ _   \\      \\   \\   /  /    \n" +
+                " | ( ' )  |       \\  _. /  '       \n" +
+                " |(_ o _) /        _( )_ .'         \n" +
+                " | (_,_).' __  ___(_ o _)'          \n" +
+                " |  |\\ \\  |  ||   |(_,_)'         \n" +
+                " |  | \\ `'   /|   `-'  /           \n" +
+                " |  |  \\    /  \\      /           \n" +
+                " ''-'   `'-'    `-..-'              ");
+    }
+}

+ 32 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/config/AsyConfig.java

@@ -0,0 +1,32 @@
+package com.onemap.analyse.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.Executor;
+
+/**
+ * 开启多线程配置
+ */
+@Configuration
+@EnableAsync
+public class AsyConfig {
+    //TODO 此处成员变量应该使用@Value从配置中读取
+    private int corePoolSize = 10;
+    private int maxPoolSize = 200;
+    private int queueCapacity = 10;
+
+    private Integer time = 0;
+
+    @Bean("taskExecutor")
+    public Executor taskExecutor() {
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(corePoolSize);
+        executor.setMaxPoolSize(maxPoolSize);
+        executor.setQueueCapacity(queueCapacity);
+        executor.initialize();
+        return executor;
+    }
+}

+ 103 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/ChscController.java

@@ -0,0 +1,103 @@
+package com.onemap.analyse.controller;
+
+import com.onemap.analyse.domain.FzssChscXmgxDTO;
+import com.onemap.analyse.domain.FzxzChscDTO;
+import com.onemap.analyse.domain.HgxfxEntityDTO;
+import com.onemap.analyse.service.IChscService;
+import com.onemap.common.core.domain.R;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.common.core.web.domain.WebResult;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/chsc")
+public class ChscController extends BaseController {
+
+    @Autowired
+    private IChscService chscService;
+
+    /**
+     * 安全认证:根据授权码登录获取身份安全认证Token
+     *
+     * @param appid
+     * @return
+     */
+    @PostMapping("/authorize")
+    public R<?> authorize(String appid, HttpServletRequest request, HttpServletResponse response) {
+        R<?> res = chscService.authorize(appid, request, response);
+        return res;
+    }
+
+    /**
+     * 下载选址报告
+     *
+     * @param bsm
+     * @return
+     */
+    @GetMapping("/download")
+    public WebResult download(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        WebResult res = chscService.download(bsm, request, response);
+        return res;
+    }
+
+    /**
+     * 查询项目选址进度
+     *
+     * @param bsm
+     * @return
+     */
+    @GetMapping("/getProgress")
+    public WebResult getProgress(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        WebResult res = chscService.getProgress(bsm, request, response);
+        return res;
+    }
+
+    /**
+     * 更新项目选址结果:项目策划完成,更新选址审批结果
+     *
+     * @param fzssChscXmgxDTO
+     * @return
+     */
+    @PostMapping("/xmjg")
+    public WebResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO) {
+        WebResult res = chscService.xmjg(fzssChscXmgxDTO);
+        return res;
+    }
+
+    /**
+     * 创建项目选址:根据项目信息,创建选址项目
+     *
+     * @param fzxzChscDTO
+     * @return
+     */
+    @PostMapping("/create")
+    public WebResult create(FzxzChscDTO fzxzChscDTO) {
+        WebResult res = chscService.create(fzxzChscDTO);
+        return res;
+    }
+
+    /**
+     * 文本转SHP文件
+     *
+     * @param file
+     * @param request
+     * @param response
+     * @return
+     */
+    @PostMapping("/txt2shp")
+    public WebResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
+        WebResult res = chscService.txt2shp(file, request, response);
+        return res;
+    }
+
+}

+ 69 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/FzssController.java

@@ -0,0 +1,69 @@
+package com.onemap.analyse.controller;
+
+import com.onemap.analyse.service.IFzssService;
+import com.onemap.analyse.domain.HgxfxEntityDTO;
+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.web.bind.annotation.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/fzss")
+public class FzssController extends BaseController {
+
+    @Autowired
+    private IFzssService fzssService;
+
+    /**
+     * 新建合规性分析
+     *
+     * @param hgxfxEntityDTO
+     * @return
+     */
+    @PostMapping("/AddHgxfx")
+    public RequestResult AddHgxfx(@RequestBody HgxfxEntityDTO hgxfxEntityDTO) throws IOException {
+        RequestResult res = fzssService.AddHgxfx(hgxfxEntityDTO);
+        return res;
+    }
+
+    /**
+     * 新建辅助选址
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("/AddFzxz")
+    public RequestResult AddFzxz(@RequestBody Map params) {
+        RequestResult res = fzssService.AddFzxz(params);
+        return res;
+    }
+
+    /**
+     * 获取选址结果
+     *
+     * @param bsm
+     * @return
+     */
+    @GetMapping("/GetXzjg")
+    public RequestResult GetXzjg(String bsm) {
+        RequestResult res = fzssService.GetXzjg(bsm);
+        return res;
+    }
+
+    /**
+     * 通过选择的方案生成报告
+     *
+     * @return
+     */
+    @PostMapping("/SaveWordFile")
+    public RequestResult SaveWordFile(@RequestBody Map params) {
+        String bsm = (String) params.get("bsm");
+        ArrayList xzbsm = (ArrayList) params.get("xzbsm");
+        RequestResult res = fzssService.saveWordFile(bsm, xzbsm);
+        return res;
+    }
+}

+ 32 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/ToolController.java

@@ -0,0 +1,32 @@
+package com.onemap.analyse.controller;
+
+import com.onemap.analyse.service.IToolService;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.WebResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@RestController
+@RequestMapping("/tool")
+public class ToolController extends BaseController {
+
+    @Autowired
+    private IToolService toolService;
+
+
+    /**
+     * esrijson转shp
+     *
+     * @param esrijson
+     * @return
+     */
+    @PostMapping("/jsonToShp")
+    public WebResult jsonToShp(String esrijson) {
+        WebResult res = toolService.jsonToShp(esrijson);
+        return res;
+    }
+
+}

+ 28 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriFeature.java

@@ -0,0 +1,28 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.Map;
+
+/**
+ * esri要素
+ */
+public class EsriFeature {
+    /// 和fieldAliases一样,用同一个类
+    private Map<String, Object> attributes;
+    private EsriGeometry geometry;
+
+    public Map<String, Object> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(Map<String, Object> attributes) {
+        this.attributes = attributes;
+    }
+
+    public EsriGeometry getGeometry() {
+        return geometry;
+    }
+
+    public void setGeometry(EsriGeometry geometry) {
+        this.geometry = geometry;
+    }
+}

+ 28 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriFeaturePoint.java

@@ -0,0 +1,28 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.Map;
+
+/**
+ * esri要素
+ */
+public class EsriFeaturePoint {
+    /// 和fieldAliases一样,用同一个类
+    private Map<String, Object> attributes;
+    private EsriGeometryPoint geometry;
+
+    public Map<String, Object> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(Map<String, Object> attributes) {
+        this.attributes = attributes;
+    }
+
+    public EsriGeometryPoint getGeometry() {
+        return geometry;
+    }
+
+    public void setGeometry(EsriGeometryPoint geometry) {
+        this.geometry = geometry;
+    }
+}

+ 28 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriFeaturePolyline.java

@@ -0,0 +1,28 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.Map;
+
+/**
+ * esri要素
+ */
+public class EsriFeaturePolyline {
+    /// 和fieldAliases一样,用同一个类
+    private Map<String, Object> attributes;
+    private EsriGeometryPolyline geometry;
+
+    public Map<String, Object> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(Map<String, Object> attributes) {
+        this.attributes = attributes;
+    }
+
+    public EsriGeometryPolyline getGeometry() {
+        return geometry;
+    }
+
+    public void setGeometry(EsriGeometryPolyline geometry) {
+        this.geometry = geometry;
+    }
+}

+ 42 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriField.java

@@ -0,0 +1,42 @@
+package com.onemap.analyse.domain.ESRI;
+
+/**
+ * esri字段
+ */
+public class EsriField {
+    private String name;
+    /// esriFieldTypeString \ esriFieldTypeInteger
+    private String type = "esriFieldTypeString";
+    private String alias;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public EsriField init(String name,String alias){
+        EsriField field = new EsriField();
+        field.setAlias(alias);
+        field.setName(name);
+        return field;
+    }
+}

+ 19 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriGeometry.java

@@ -0,0 +1,19 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * esri范围
+ */
+public class EsriGeometry {
+    private List<List<List<Double>>> rings = new ArrayList<List<List<Double>>>();
+
+    public List<List<List<Double>>> getRings() {
+        return rings;
+    }
+
+    public void setRings(List<List<List<Double>>> rings) {
+        this.rings = rings;
+    }
+}

+ 28 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriGeometryPoint.java

@@ -0,0 +1,28 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * esri范围
+ */
+public class EsriGeometryPoint {
+    private Double x;
+    private Double y;
+
+    public Double getX() {
+        return x;
+    }
+
+    public void setX(Double x) {
+        this.x = x;
+    }
+
+    public Double getY() {
+        return y;
+    }
+
+    public void setY(Double y) {
+        this.y = y;
+    }
+}

+ 19 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriGeometryPolyline.java

@@ -0,0 +1,19 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * esri范围
+ */
+public class EsriGeometryPolyline {
+    private List<List<List<Double>>> paths = new ArrayList<List<List<Double>>>();
+
+    public List<List<List<Double>>> getPaths() {
+        return paths;
+    }
+
+    public void setPaths(List<List<List<Double>>> paths) {
+        this.paths = paths;
+    }
+}

+ 65 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriJsonModel.java

@@ -0,0 +1,65 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * esri实体
+ */
+public class EsriJsonModel {
+    private String displayFieldName = "";
+    private Map fieldAliases;
+    private String geometryType = "esriGeometryPolygon";
+    private EsriSpatialReference spatialReference = new EsriSpatialReference();
+    private List<EsriField> fields = new ArrayList<EsriField>();
+    private List<EsriFeature> features = new ArrayList<EsriFeature>();
+
+    public String getDisplayFieldName() {
+        return displayFieldName;
+    }
+
+    public void setDisplayFieldName(String displayFieldName) {
+        this.displayFieldName = displayFieldName;
+    }
+
+    public Map getFieldAliases() {
+        return fieldAliases;
+    }
+
+    public void setFieldAliases(Map fieldAliases) {
+        this.fieldAliases = fieldAliases;
+    }
+
+    public String getGeometryType() {
+        return geometryType;
+    }
+
+    public void setGeometryType(String geometryType) {
+        this.geometryType = geometryType;
+    }
+
+    public EsriSpatialReference getSpatialReference() {
+        return spatialReference;
+    }
+
+    public void setSpatialReference(EsriSpatialReference spatialReference) {
+        this.spatialReference = spatialReference;
+    }
+
+    public List<EsriField> getFields() {
+        return fields;
+    }
+
+    public void setFields(List<EsriField> fields) {
+        this.fields = fields;
+    }
+
+    public List<EsriFeature> getFeatures() {
+        return features;
+    }
+
+    public void setFeatures(List<EsriFeature> features) {
+        this.features = features;
+    }
+}

+ 65 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriJsonModelPoint.java

@@ -0,0 +1,65 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * esri实体
+ */
+public class EsriJsonModelPoint {
+    private String displayFieldName = "";
+    private Map fieldAliases;
+    private String geometryType = "esriGeometryPoint";
+    private EsriSpatialReference spatialReference = new EsriSpatialReference();
+    private List<EsriField> fields = new ArrayList<EsriField>();
+    private List<EsriFeaturePoint> features = new ArrayList<EsriFeaturePoint>();
+
+    public String getDisplayFieldName() {
+        return displayFieldName;
+    }
+
+    public void setDisplayFieldName(String displayFieldName) {
+        this.displayFieldName = displayFieldName;
+    }
+
+    public Map getFieldAliases() {
+        return fieldAliases;
+    }
+
+    public void setFieldAliases(Map fieldAliases) {
+        this.fieldAliases = fieldAliases;
+    }
+
+    public String getGeometryType() {
+        return geometryType;
+    }
+
+    public void setGeometryType(String geometryType) {
+        this.geometryType = geometryType;
+    }
+
+    public EsriSpatialReference getSpatialReference() {
+        return spatialReference;
+    }
+
+    public void setSpatialReference(EsriSpatialReference spatialReference) {
+        this.spatialReference = spatialReference;
+    }
+
+    public List<EsriField> getFields() {
+        return fields;
+    }
+
+    public void setFields(List<EsriField> fields) {
+        this.fields = fields;
+    }
+
+    public List<EsriFeaturePoint> getFeatures() {
+        return features;
+    }
+
+    public void setFeatures(List<EsriFeaturePoint> features) {
+        this.features = features;
+    }
+}

+ 65 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriJsonModelPolyline.java

@@ -0,0 +1,65 @@
+package com.onemap.analyse.domain.ESRI;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * esri实体
+ */
+public class EsriJsonModelPolyline {
+    private String displayFieldName = "";
+    private Map fieldAliases;
+    private String geometryType = "esriGeometryPolyline";
+    private EsriSpatialReference spatialReference = new EsriSpatialReference();
+    private List<EsriField> fields = new ArrayList<EsriField>();
+    private List<EsriFeaturePolyline> features = new ArrayList<EsriFeaturePolyline>();
+
+    public String getDisplayFieldName() {
+        return displayFieldName;
+    }
+
+    public void setDisplayFieldName(String displayFieldName) {
+        this.displayFieldName = displayFieldName;
+    }
+
+    public Map getFieldAliases() {
+        return fieldAliases;
+    }
+
+    public void setFieldAliases(Map fieldAliases) {
+        this.fieldAliases = fieldAliases;
+    }
+
+    public String getGeometryType() {
+        return geometryType;
+    }
+
+    public void setGeometryType(String geometryType) {
+        this.geometryType = geometryType;
+    }
+
+    public EsriSpatialReference getSpatialReference() {
+        return spatialReference;
+    }
+
+    public void setSpatialReference(EsriSpatialReference spatialReference) {
+        this.spatialReference = spatialReference;
+    }
+
+    public List<EsriField> getFields() {
+        return fields;
+    }
+
+    public void setFields(List<EsriField> fields) {
+        this.fields = fields;
+    }
+
+    public List<EsriFeaturePolyline> getFeatures() {
+        return features;
+    }
+
+    public void setFeatures(List<EsriFeaturePolyline> features) {
+        this.features = features;
+    }
+}

+ 26 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ESRI/EsriSpatialReference.java

@@ -0,0 +1,26 @@
+package com.onemap.analyse.domain.ESRI;
+
+/**
+ * esri坐标
+ */
+public class EsriSpatialReference {
+    //public string wkt { set; get; } = "GEOGCS[\"GCS_CGCS_2000\",DATUM[\"D_CGCS_2000\",SPHEROID[\"CGCS_2000\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]";
+    private Integer wkid = 4490;
+    private Integer latestWkid = 4490;
+
+    public Integer getWkid() {
+        return wkid;
+    }
+
+    public void setWkid(Integer wkid) {
+        this.wkid = wkid;
+    }
+
+    public Integer getLatestWkid() {
+        return latestWkid;
+    }
+
+    public void setLatestWkid(Integer latestWkid) {
+        this.latestWkid = latestWkid;
+    }
+}

+ 41 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/Field.java

@@ -0,0 +1,41 @@
+package com.onemap.analyse.domain;
+
+public class Field {
+    /// 名称
+    private String name;
+    /// 类型
+    private String type = "TEXT";
+    /// 值
+    private Object value;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
+
+    public Field init(String name, String value) {
+        Field a = new Field();
+        a.setName(name);
+        a.setValue(value);
+        return a;
+    }
+}

+ 40 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FxReport.java

@@ -0,0 +1,40 @@
+package com.onemap.analyse.domain;
+
+public class FxReport {
+    private String message = "检查完成";/// 消息内容
+    private String reportfile;/// 文件
+    private Double mj;/// 面积
+    private String pdffile;/// 面积
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getReportfile() {
+        return reportfile;
+    }
+
+    public void setReportfile(String reportfile) {
+        this.reportfile = reportfile;
+    }
+
+    public Double getMj() {
+        return mj;
+    }
+
+    public void setMj(Double mj) {
+        this.mj = mj;
+    }
+
+    public String getPdffile() {
+        return pdffile;
+    }
+
+    public void setPdffile(String pdffile) {
+        this.pdffile = pdffile;
+    }
+}

+ 23 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FxfwDictDTO.java

@@ -0,0 +1,23 @@
+package com.onemap.analyse.domain;
+
+/**
+ * 分析范围字典配置
+ */
+public class FxfwDictDTO
+{
+    private Integer region = 0;/// 行政区
+    private Integer draw = 1;/// 绘制
+    private Integer shp = 2;/// Shp文件
+
+    public Integer getRegion() {
+        return region;
+    }
+
+    public Integer getDraw() {
+        return draw;
+    }
+
+    public Integer getShp() {
+        return shp;
+    }
+}

+ 75 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FxrwrzDTO.java

@@ -0,0 +1,75 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+/**
+ * 分析任务日志
+ */
+@TableName("t_fzss_fxrwrz")
+public class FxrwrzDTO {
+    private String bsm;
+    private String rwlx;
+    private String rwbsm;
+    private String rzlx;
+    private Date rzsj;
+    private String fxjg;
+    private String rzlr;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwlx() {
+        return rwlx;
+    }
+
+    public void setRwlx(String rwlx) {
+        this.rwlx = rwlx;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getRzlx() {
+        return rzlx;
+    }
+
+    public void setRzlx(String rzlx) {
+        this.rzlx = rzlx;
+    }
+
+    public Date getRzsj() {
+        return rzsj;
+    }
+
+    public void setRzsj(Date rzsj) {
+        this.rzsj = rzsj;
+    }
+
+    public String getFxjg() {
+        return fxjg;
+    }
+
+    public void setFxjg(String fxjg) {
+        this.fxjg = fxjg;
+    }
+
+    public String getRzlr() {
+        return rzlr;
+    }
+
+    public void setRzlr(String rzlr) {
+        this.rzlr = rzlr;
+    }
+}

+ 34 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzssChscFileDTO.java

@@ -0,0 +1,34 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_fzss_zhxz_file")
+public class FzssChscFileDTO {
+    private String bsm ;
+    private String wj ;
+    private String yswj ;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getWj() {
+        return wj;
+    }
+
+    public void setWj(String wj) {
+        this.wj = wj;
+    }
+
+    public String getYswj() {
+        return yswj;
+    }
+
+    public void setYswj(String yswj) {
+        this.yswj = yswj;
+    }
+}

+ 67 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzssChscXmgxDTO.java

@@ -0,0 +1,67 @@
+package com.onemap.analyse.domain;
+
+public class FzssChscXmgxDTO {
+    private String bsm;//标识码
+    private Integer chzt;//策划状态(1通过 2未通过 3删除)*只有策划状态为1时,才会将项目由储备库转至实施库
+    private String chjg;//策划结果(原因)
+    private String bgfw;//如果范围调整,需要上传最终的shp范围(接口2)
+    private Double bgmj;//变更面积,平方米,两位小数  条件必填 ,变更原因不能为空
+    private String bgyy;//变更原因,如果项目范围变更,变更原因不能为空
+    private String bz;//备注
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public Integer getChzt() {
+        return chzt;
+    }
+
+    public void setChzt(Integer chzt) {
+        this.chzt = chzt;
+    }
+
+    public String getChjg() {
+        return chjg;
+    }
+
+    public void setChjg(String chjg) {
+        this.chjg = chjg;
+    }
+
+    public String getBgfw() {
+        return bgfw;
+    }
+
+    public void setBgfw(String bgfw) {
+        this.bgfw = bgfw;
+    }
+
+    public Double getBgmj() {
+        return bgmj;
+    }
+
+    public void setBgmj(Double bgmj) {
+        this.bgmj = bgmj;
+    }
+
+    public String getBgyy() {
+        return bgyy;
+    }
+
+    public void setBgyy(String bgyy) {
+        this.bgyy = bgyy;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+}

+ 72 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzssSystemDTO.java

@@ -0,0 +1,72 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("t_fzss_system_config")
+public class FzssSystemDTO {
+    private String id;
+    private String name;
+    private String applicant;
+    private String ip;
+    private String remark;
+    private String username;
+    private Date jssj;
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    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 getApplicant() {
+        return applicant;
+    }
+
+    public void setApplicant(String applicant) {
+        this.applicant = applicant;
+    }
+
+    public String getIp() {
+        return ip;
+    }
+
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Date getJssj() {
+        return jssj;
+    }
+
+    public void setJssj(Date jssj) {
+        this.jssj = jssj;
+    }
+}

+ 376 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzChscDTO.java

@@ -0,0 +1,376 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@TableName("t_fzss_zhxz_chsc")
+public class FzxzChscDTO {
+    private String bsm;
+    private Integer xzlb;
+    private String xmbm;
+    private String xmmc;
+    private String xmdm;
+    private Integer fwlx;
+    private String xzfw;
+    private String ydmjks;
+    private String ydmjjs;
+    private Integer jzgd;
+    private String ywlx;
+    private String ntzlx;
+    private String ntznx;
+    private String jsxz;
+    private Integer ztze;
+    private Integer sfylrndys;
+    private String xmjsyj;
+    private String njsdz;
+    private String xzqbm;
+    private String xzqmc;
+    private String jsgmjnr;
+    private Double nydmj;
+    private String ydbpzbwj;
+    private String xmlxrmc;
+    private String sbdw;
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date sbsj;
+    private String lxdh;
+    private String bz;
+    private Integer rwzt;
+    private Integer rwjd;
+    private String rwjg;
+    private String chzt;
+    private String chjg;
+    private String bgfw;
+    private Double bgmj;
+    private String bgyy;
+    private String chbz;
+    private String yxyz;
+    private Date cjsj;
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public boolean paramsChecked() {
+        if (StringUtils.isEmpty(xmbm)
+                || StringUtils.isEmpty(xmmc)
+                || StringUtils.isEmpty(xzfw)
+                || StringUtils.isEmpty(ydbpzbwj)
+                || StringUtils.isEmpty(sbdw)
+                || StringUtils.isEmpty(lxdh)
+        ) {
+            return false;
+        }
+        return true;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public Integer getXzlb() {
+        return xzlb;
+    }
+
+    public void setXzlb(Integer xzlb) {
+        this.xzlb = xzlb;
+    }
+
+    public String getXmbm() {
+        return xmbm;
+    }
+
+    public void setXmbm(String xmbm) {
+        this.xmbm = xmbm;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmdm() {
+        return xmdm;
+    }
+
+    public void setXmdm(String xmdm) {
+        this.xmdm = xmdm;
+    }
+
+    public Integer getFwlx() {
+        return fwlx;
+    }
+
+    public void setFwlx(Integer fwlx) {
+        this.fwlx = fwlx;
+    }
+
+    public String getXzfw() {
+        return xzfw;
+    }
+
+    public void setXzfw(String xzfw) {
+        this.xzfw = xzfw;
+    }
+
+    public String getYdmjks() {
+        return ydmjks;
+    }
+
+    public void setYdmjks(String ydmjks) {
+        this.ydmjks = ydmjks;
+    }
+
+    public String getYdmjjs() {
+        return ydmjjs;
+    }
+
+    public void setYdmjjs(String ydmjjs) {
+        this.ydmjjs = ydmjjs;
+    }
+
+    public Integer getJzgd() {
+        return jzgd;
+    }
+
+    public void setJzgd(Integer jzgd) {
+        this.jzgd = jzgd;
+    }
+
+    public String getYwlx() {
+        return ywlx;
+    }
+
+    public void setYwlx(String ywlx) {
+        this.ywlx = ywlx;
+    }
+
+    public String getNtzlx() {
+        return ntzlx;
+    }
+
+    public void setNtzlx(String ntzlx) {
+        this.ntzlx = ntzlx;
+    }
+
+    public String getNtznx() {
+        return ntznx;
+    }
+
+    public void setNtznx(String ntznx) {
+        this.ntznx = ntznx;
+    }
+
+    public String getJsxz() {
+        return jsxz;
+    }
+
+    public void setJsxz(String jsxz) {
+        this.jsxz = jsxz;
+    }
+
+    public Integer getZtze() {
+        return ztze;
+    }
+
+    public void setZtze(Integer ztze) {
+        this.ztze = ztze;
+    }
+
+    public Integer getSfylrndys() {
+        return sfylrndys;
+    }
+
+    public void setSfylrndys(Integer sfylrndys) {
+        this.sfylrndys = sfylrndys;
+    }
+
+    public String getXmjsyj() {
+        return xmjsyj;
+    }
+
+    public void setXmjsyj(String xmjsyj) {
+        this.xmjsyj = xmjsyj;
+    }
+
+    public String getNjsdz() {
+        return njsdz;
+    }
+
+    public void setNjsdz(String njsdz) {
+        this.njsdz = njsdz;
+    }
+
+    public String getXzqbm() {
+        return xzqbm;
+    }
+
+    public void setXzqbm(String xzqbm) {
+        this.xzqbm = xzqbm;
+    }
+
+    public String getXzqmc() {
+        return xzqmc;
+    }
+
+    public void setXzqmc(String xzqmc) {
+        this.xzqmc = xzqmc;
+    }
+
+    public String getJsgmjnr() {
+        return jsgmjnr;
+    }
+
+    public void setJsgmjnr(String jsgmjnr) {
+        this.jsgmjnr = jsgmjnr;
+    }
+
+    public Double getNydmj() {
+        return nydmj;
+    }
+
+    public void setNydmj(Double nydmj) {
+        this.nydmj = nydmj;
+    }
+
+    public String getYdbpzbwj() {
+        return ydbpzbwj;
+    }
+
+    public void setYdbpzbwj(String ydbpzbwj) {
+        this.ydbpzbwj = ydbpzbwj;
+    }
+
+    public String getXmlxrmc() {
+        return xmlxrmc;
+    }
+
+    public void setXmlxrmc(String xmlxrmc) {
+        this.xmlxrmc = xmlxrmc;
+    }
+
+    public String getSbdw() {
+        return sbdw;
+    }
+
+    public void setSbdw(String sbdw) {
+        this.sbdw = sbdw;
+    }
+
+    public Date getSbsj() {
+        return sbsj;
+    }
+
+    public void setSbsj(Date sbsj) {
+        this.sbsj = sbsj;
+    }
+
+    public String getLxdh() {
+        return lxdh;
+    }
+
+    public void setLxdh(String lxdh) {
+        this.lxdh = lxdh;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+
+    public Integer getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(Integer rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public Integer getRwjd() {
+        return rwjd;
+    }
+
+    public void setRwjd(Integer rwjd) {
+        this.rwjd = rwjd;
+    }
+
+    public String getRwjg() {
+        return rwjg;
+    }
+
+    public void setRwjg(String rwjg) {
+        this.rwjg = rwjg;
+    }
+
+    public String getChzt() {
+        return chzt;
+    }
+
+    public void setChzt(String chzt) {
+        this.chzt = chzt;
+    }
+
+    public String getChjg() {
+        return chjg;
+    }
+
+    public void setChjg(String chjg) {
+        this.chjg = chjg;
+    }
+
+    public String getBgfw() {
+        return bgfw;
+    }
+
+    public void setBgfw(String bgfw) {
+        this.bgfw = bgfw;
+    }
+
+    public Double getBgmj() {
+        return bgmj;
+    }
+
+    public void setBgmj(Double bgmj) {
+        this.bgmj = bgmj;
+    }
+
+    public String getBgyy() {
+        return bgyy;
+    }
+
+    public void setBgyy(String bgyy) {
+        this.bgyy = bgyy;
+    }
+
+    public String getChbz() {
+        return chbz;
+    }
+
+    public void setChbz(String chbz) {
+        this.chbz = chbz;
+    }
+
+    public String getYxyz() {
+        return yxyz;
+    }
+
+    public void setYxyz(String yxyz) {
+        this.yxyz = yxyz;
+    }
+}

+ 45 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzChscProgressDTO.java

@@ -0,0 +1,45 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+public class FzxzChscProgressDTO {
+    private String bsm ;
+    private String msg ;
+    private Integer state ;
+    private Integer jd ;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Integer getJd() {
+        return jd;
+    }
+
+    public void setJd(Integer jd) {
+        this.jd = jd;
+    }
+}

+ 180 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzDTO.java

@@ -0,0 +1,180 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("t_fzss_fzxz")
+public class FzxzDTO {
+    private String bsm;
+    private Integer rwzt;
+    private Date cjsj;
+    private String cjyh;
+    private Date rwkssj;
+    private Date rwjssj;
+    private String fxbg;
+    private String zip;
+    private String ydxz_bsm;
+    private String ydmjbegin;
+    private String ydmjend;
+    private String kddk;
+    private String zdpd;
+    private Double xzmj;
+    private String sjy;
+    private String xzfw;
+    private String xmmc;
+    private String jsdw;
+    private Integer fwlx;
+
+    public String getCjyh() {
+        return cjyh;
+    }
+
+    public void setCjyh(String cjyh) {
+        this.cjyh = cjyh;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public Integer getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(Integer rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public Date getRwkssj() {
+        return rwkssj;
+    }
+
+    public void setRwkssj(Date rwkssj) {
+        this.rwkssj = rwkssj;
+    }
+
+    public Date getRwjssj() {
+        return rwjssj;
+    }
+
+    public void setRwjssj(Date rwjssj) {
+        this.rwjssj = rwjssj;
+    }
+
+    public String getFxbg() {
+        return fxbg;
+    }
+
+    public void setFxbg(String fxbg) {
+        this.fxbg = fxbg;
+    }
+
+    public String getZip() {
+        return zip;
+    }
+
+    public void setZip(String zip) {
+        this.zip = zip;
+    }
+
+    public String getYdxz_bsm() {
+        return ydxz_bsm;
+    }
+
+    public void setYdxz_bsm(String ydxz_bsm) {
+        this.ydxz_bsm = ydxz_bsm;
+    }
+
+    public String getYdmjbegin() {
+        return ydmjbegin;
+    }
+
+    public void setYdmjbegin(String ydmjbegin) {
+        this.ydmjbegin = ydmjbegin;
+    }
+
+    public String getYdmjend() {
+        return ydmjend;
+    }
+
+    public void setYdmjend(String ydmjend) {
+        this.ydmjend = ydmjend;
+    }
+
+    public String getKddk() {
+        return kddk;
+    }
+
+    public void setKddk(String kddk) {
+        this.kddk = kddk;
+    }
+
+    public String getZdpd() {
+        return zdpd;
+    }
+
+    public void setZdpd(String zdpd) {
+        this.zdpd = zdpd;
+    }
+
+    public Double getXzmj() {
+        return xzmj;
+    }
+
+    public void setXzmj(Double xzmj) {
+        this.xzmj = xzmj;
+    }
+
+    public String getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public String getXzfw() {
+        return xzfw;
+    }
+
+    public void setXzfw(String xzfw) {
+        this.xzfw = xzfw;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+
+    public Integer getFwlx() {
+        return fwlx;
+    }
+
+    public void setFwlx(Integer fwlx) {
+        this.fwlx = fwlx;
+    }
+}

+ 131 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzEntityDTO.java

@@ -0,0 +1,131 @@
+package com.onemap.analyse.domain;
+
+//辅助选址分析列表
+public class FzxzEntityDTO {
+    private String bsm;
+    private String sjy;
+    private String sjymc;
+    private String ydbsm;
+    private String ydmc;
+    private String ydmjbegin;
+    private String ydmjend;
+    private String xmmc = "";
+    private String jsdw = "";
+    private String fxbg = "";
+    private Integer rwzt;
+    private Integer fwlx;
+    private String xzfw;
+    private String zip;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public String getSjymc() {
+        return sjymc;
+    }
+
+    public void setSjymc(String sjymc) {
+        this.sjymc = sjymc;
+    }
+
+    public String getYdbsm() {
+        return ydbsm;
+    }
+
+    public void setYdbsm(String ydbsm) {
+        this.ydbsm = ydbsm;
+    }
+
+    public String getYdmc() {
+        return ydmc;
+    }
+
+    public void setYdmc(String ydmc) {
+        this.ydmc = ydmc;
+    }
+
+    public String getYdmjbegin() {
+        return ydmjbegin;
+    }
+
+    public void setYdmjbegin(String ydmjbegin) {
+        this.ydmjbegin = ydmjbegin;
+    }
+
+    public String getYdmjend() {
+        return ydmjend;
+    }
+
+    public void setYdmjend(String ydmjend) {
+        this.ydmjend = ydmjend;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+
+    public String getFxbg() {
+        return fxbg;
+    }
+
+    public void setFxbg(String fxbg) {
+        this.fxbg = fxbg;
+    }
+
+    public Integer getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(Integer rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public Integer getFwlx() {
+        return fwlx;
+    }
+
+    public void setFwlx(Integer fwlx) {
+        this.fwlx = fwlx;
+    }
+
+    public String getXzfw() {
+        return xzfw;
+    }
+
+    public void setXzfw(String xzfw) {
+        this.xzfw = xzfw;
+    }
+
+    public String getZip() {
+        return zip;
+    }
+
+    public void setZip(String zip) {
+        this.zip = zip;
+    }
+}

+ 130 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzJgGisDTO.java

@@ -0,0 +1,130 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@TableName("t_fzss_fzxz_jg_gis")
+public class FzxzJgGisDTO {
+    private Integer objectid;
+    private String bsm;
+    private String rwbsm;
+    private String dlb;
+    private String dlbm;
+    private String dlmc;
+    private Date cjsj;
+    private String yxfa;
+    private String bz;
+    private Double tbmj;
+    private String xzqdm;
+    private String xzqmc;
+    @TableField(exist = false)
+    private List<FzxzJgyzDTO> fxyzjg = new ArrayList<FzxzJgyzDTO>();
+
+    public Integer getObjectid() {
+        return objectid;
+    }
+
+    public void setObjectid(Integer objectid) {
+        this.objectid = objectid;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getDlb() {
+        return dlb;
+    }
+
+    public void setDlb(String dlb) {
+        this.dlb = dlb;
+    }
+
+    public String getDlbm() {
+        return dlbm;
+    }
+
+    public void setDlbm(String dlbm) {
+        this.dlbm = dlbm;
+    }
+
+    public String getDlmc() {
+        return dlmc;
+    }
+
+    public void setDlmc(String dlmc) {
+        this.dlmc = dlmc;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public String getYxfa() {
+        return yxfa;
+    }
+
+    public void setYxfa(String yxfa) {
+        this.yxfa = yxfa;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+
+    public Double getTbmj() {
+        return tbmj;
+    }
+
+    public void setTbmj(Double tbmj) {
+        this.tbmj = tbmj;
+    }
+
+    public String getXzqdm() {
+        return xzqdm;
+    }
+
+    public void setXzqdm(String xzqdm) {
+        this.xzqdm = xzqdm;
+    }
+
+    public String getXzqmc() {
+        return xzqmc;
+    }
+
+    public void setXzqmc(String xzqmc) {
+        this.xzqmc = xzqmc;
+    }
+
+    public List<FzxzJgyzDTO> getFxyzjg() {
+        return fxyzjg;
+    }
+
+    public void setFxyzjg(List<FzxzJgyzDTO> fxyzjg) {
+        this.fxyzjg = fxyzjg;
+    }
+}

+ 70 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzJgyzDTO.java

@@ -0,0 +1,70 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_fzss_fzxz_jgyz")
+public class FzxzJgyzDTO {
+    private String bsm;
+    private String jbbsm;
+    private String yzbsm;
+    private String yxyzmc;
+    private String yztj;
+    private String yxz;
+    private String fxjg;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getJbbsm() {
+        return jbbsm;
+    }
+
+    public void setJbbsm(String jbbsm) {
+        this.jbbsm = jbbsm;
+    }
+
+    public String getYzbsm() {
+        return yzbsm;
+    }
+
+    public void setYzbsm(String yzbsm) {
+        this.yzbsm = yzbsm;
+    }
+
+    public String getYxyzmc() {
+        return yxyzmc;
+    }
+
+    public void setYxyzmc(String yxyzmc) {
+        this.yxyzmc = yxyzmc;
+    }
+
+    public String getYztj() {
+        return yztj;
+    }
+
+    public void setYztj(String yztj) {
+        this.yztj = yztj;
+    }
+
+    public String getYxz() {
+        return yxz;
+    }
+
+    public void setYxz(String yxz) {
+        this.yxz = yxz;
+    }
+
+    public String getFxjg() {
+        return fxjg;
+    }
+
+    public void setFxjg(String fxjg) {
+        this.fxjg = fxjg;
+    }
+}

+ 97 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzReport.java

@@ -0,0 +1,97 @@
+package com.onemap.analyse.domain;
+
+import java.util.List;
+
+public class FzxzReport {
+    private String message = "检查完成";/// 消息内容
+    private String reportfile;/// 选址报告文件
+    private String simplefile;/// 选址简报文件
+    private String zipfile;/// 文件
+    private String rootPath;/// 根目录
+
+    private String bsm;
+    private String fxbg;
+    private String jsdw;
+    private String xmmc;
+    private List<FzxzJgGisDTO> items;
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getReportfile() {
+        return reportfile;
+    }
+
+    public void setReportfile(String reportfile) {
+        this.reportfile = reportfile;
+    }
+
+    public String getSimplefile() {
+        return simplefile;
+    }
+
+    public void setSimplefile(String simplefile) {
+        this.simplefile = simplefile;
+    }
+
+    public String getZipfile() {
+        return zipfile;
+    }
+
+    public void setZipfile(String zipfile) {
+        this.zipfile = zipfile;
+    }
+
+    public String getRootPath() {
+        return rootPath;
+    }
+
+    public void setRootPath(String rootPath) {
+        this.rootPath = rootPath;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getFxbg() {
+        return fxbg;
+    }
+
+    public void setFxbg(String fxbg) {
+        this.fxbg = fxbg;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public List<FzxzJgGisDTO> getItems() {
+        return items;
+    }
+
+    public void setItems(List<FzxzJgGisDTO> items) {
+        this.items = items;
+    }
+}

+ 55 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzResultDTO.java

@@ -0,0 +1,55 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@TableName("t_fzss_fzxz")
+public class FzxzResultDTO {
+    private String bsm;
+    private String xmmc;
+    private String jsdw;
+    private String fxbg;
+    private List<FzxzJgGisDTO> items = new ArrayList<FzxzJgGisDTO>();
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+
+    public String getFxbg() {
+        return fxbg;
+    }
+
+    public void setFxbg(String fxbg) {
+        this.fxbg = fxbg;
+    }
+
+    public List<FzxzJgGisDTO> getItems() {
+        return items;
+    }
+
+    public void setItems(List<FzxzJgGisDTO> items) {
+        this.items = items;
+    }
+}

+ 67 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzTbEntityDTO.java

@@ -0,0 +1,67 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+//辅助选址分析列表
+@TableName("T_FZSS_FZXZ_TB")
+public class FzxzTbEntityDTO {
+    private int objectid;
+    //选址标识码
+    private String rwbsm;
+    //地类编码
+    private String ydyhfldm;
+    //地类名称
+    private String ydyhflmc;
+    //图斑数量
+    private double frequency;
+    //汇总面积
+    private double sumMj;
+
+    public int getObjectid() {
+        return objectid;
+    }
+
+    public void setObjectid(int objectid) {
+        this.objectid = objectid;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getYdyhfldm() {
+        return ydyhfldm;
+    }
+
+    public void setYdyhfldm(String ydyhfldm) {
+        this.ydyhfldm = ydyhfldm;
+    }
+
+    public String getYdyhflmc() {
+        return ydyhflmc;
+    }
+
+    public void setYdyhflmc(String ydyhflmc) {
+        this.ydyhflmc = ydyhflmc;
+    }
+
+    public double getFrequency() {
+        return frequency;
+    }
+
+    public void setFrequency(double frequency) {
+        this.frequency = frequency;
+    }
+
+    public double getSumMj() {
+        return sumMj;
+    }
+
+    public void setSumMj(double sumMj) {
+        this.sumMj = sumMj;
+    }
+}

+ 61 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/FzxzXzyzDTO.java

@@ -0,0 +1,61 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_fzss_fzxz_xzyz")
+public class FzxzXzyzDTO {
+    private String bsm;
+    private String rwbsm;
+    private String yzbsm;
+    private String yxyzmc;
+    private String yztj;
+    private String yxz;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getYzbsm() {
+        return yzbsm;
+    }
+
+    public void setYzbsm(String yzbsm) {
+        this.yzbsm = yzbsm;
+    }
+
+    public String getYxyzmc() {
+        return yxyzmc;
+    }
+
+    public void setYxyzmc(String yxyzmc) {
+        this.yxyzmc = yxyzmc;
+    }
+
+    public String getYztj() {
+        return yztj;
+    }
+
+    public void setYztj(String yztj) {
+        this.yztj = yztj;
+    }
+
+    public String getYxz() {
+        return yxz;
+    }
+
+    public void setYxz(String yxz) {
+        this.yxz = yxz;
+    }
+}

+ 31 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/GeoJSON/Feature.java

@@ -0,0 +1,31 @@
+package com.onemap.analyse.domain.GeoJSON;
+
+public class Feature {
+    private String type = "Feature";
+    private Geometry geometry  = new Geometry();
+    private Object properties  = new Object();
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Geometry getGeometry() {
+        return geometry;
+    }
+
+    public void setGeometry(Geometry geometry) {
+        this.geometry = geometry;
+    }
+
+    public Object getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Object properties) {
+        this.properties = properties;
+    }
+}

+ 9 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/GeoJSON/GeoJsonModel.java

@@ -0,0 +1,9 @@
+package com.onemap.analyse.domain.GeoJSON;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GeoJsonModel {
+    private String type = "FeatureCollection";
+    private List<Feature> features = new ArrayList<Feature>();
+}

+ 25 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/GeoJSON/Geometry.java

@@ -0,0 +1,25 @@
+package com.onemap.analyse.domain.GeoJSON;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Geometry {
+    private String type = "Polygon";
+    private List<List<List<Double>>> coordinates = new ArrayList<List<List<Double>>>();
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public List<List<List<Double>>> getCoordinates() {
+        return coordinates;
+    }
+
+    public void setCoordinates(List<List<List<Double>>> coordinates) {
+        this.coordinates = coordinates;
+    }
+}

+ 129 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxDTO.java

@@ -0,0 +1,129 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+/**
+ * 合规性分析
+ */
+@TableName("t_fzss_hgxfx")
+public class HgxfxDTO {
+    private String bsm;
+    private Double fxmj;
+    private String xmmc;
+    private String xmlx;
+    private String jsdw;
+    private String ydxz_bsm;
+    private String fxbg;
+    private Integer rwzt;
+    private Date rwkssj;
+    private Date rwjssj;
+    private String cjyh;
+    private String rwly;
+    private Date cjsj;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public Double getFxmj() {
+        return fxmj;
+    }
+
+    public void setFxmj(Double fxmj) {
+        this.fxmj = fxmj;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmlx() {
+        return xmlx;
+    }
+
+    public void setXmlx(String xmlx) {
+        this.xmlx = xmlx;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+
+    public String getYdxz_bsm() {
+        return ydxz_bsm;
+    }
+
+    public void setYdxz_bsm(String ydxz_bsm) {
+        this.ydxz_bsm = ydxz_bsm;
+    }
+
+    public String getFxbg() {
+        return fxbg;
+    }
+
+    public void setFxbg(String fxbg) {
+        this.fxbg = fxbg;
+    }
+
+    public Integer getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(Integer rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public Date getRwkssj() {
+        return rwkssj;
+    }
+
+    public void setRwkssj(Date rwkssj) {
+        this.rwkssj = rwkssj;
+    }
+
+    public Date getRwjssj() {
+        return rwjssj;
+    }
+
+    public void setRwjssj(Date rwjssj) {
+        this.rwjssj = rwjssj;
+    }
+
+    public String getCjyh() {
+        return cjyh;
+    }
+
+    public void setCjyh(String cjyh) {
+        this.cjyh = cjyh;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public String getRwly() {
+        return rwly;
+    }
+
+    public void setRwly(String rwly) {
+        this.rwly = rwly;
+    }
+}

+ 182 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxEntityDTO.java

@@ -0,0 +1,182 @@
+package com.onemap.analyse.domain;
+
+import java.util.Date;
+import java.util.List;
+
+public class HgxfxEntityDTO {
+    /// 项目名称
+    public String xmmc;
+
+    /// 项目类型
+    public String xmlx;
+
+    /// 建设单位
+    public String jsdw;
+
+    /// 用地性质标识码
+    public String ydxz_bsm;
+
+    /// 建筑高度,单位米,两位小数
+    public Double jzgd;
+
+    /// 项目联系人名称
+    public String xmlxrmc;
+
+    /// 申报单位
+    public String sbdw;
+
+    /// 申报日期
+    public Date sbsj;
+
+    /// 联系电话
+    public String lxdh;
+
+    /// 划拨类/出让类/一般经营性类/工业类
+    public String ywlx;
+
+    /// 审查模板(划拨类/出让类/一般经营性类/工业类)
+    /// 审查模板有就使用审查模板,否则使用审查项(用户自定)
+    public String scmb;
+
+    /// 审查项(自定义)
+    public String scxs;
+
+    /// 范围类型(1绘制  2SHP文件)
+    public Integer fwlx;
+
+    /// 范围(存面BSM)
+    public String xzfw;
+    /// 分析面积
+    public Double xzmj;
+
+    //任务来源
+    private String rwly = "Web";
+
+    public Double getXzmj() {
+        return xzmj;
+    }
+
+    public void setXzmj(Double xzmj) {
+        this.xzmj = xzmj;
+    }
+
+    public String getRwly() {
+        return rwly;
+    }
+
+    public void setRwly(String rwly) {
+        this.rwly = rwly;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmlx() {
+        return xmlx;
+    }
+
+    public void setXmlx(String xmlx) {
+        this.xmlx = xmlx;
+    }
+
+    public String getJsdw() {
+        return jsdw;
+    }
+
+    public void setJsdw(String jsdw) {
+        this.jsdw = jsdw;
+    }
+
+    public String getYdxz_bsm() {
+        return ydxz_bsm;
+    }
+
+    public void setYdxz_bsm(String ydxz_bsm) {
+        this.ydxz_bsm = ydxz_bsm;
+    }
+
+    public Double getJzgd() {
+        return jzgd;
+    }
+
+    public void setJzgd(Double jzgd) {
+        this.jzgd = jzgd;
+    }
+
+    public String getXmlxrmc() {
+        return xmlxrmc;
+    }
+
+    public void setXmlxrmc(String xmlxrmc) {
+        this.xmlxrmc = xmlxrmc;
+    }
+
+    public String getSbdw() {
+        return sbdw;
+    }
+
+    public void setSbdw(String sbdw) {
+        this.sbdw = sbdw;
+    }
+
+    public Date getSbsj() {
+        return sbsj;
+    }
+
+    public void setSbsj(Date sbsj) {
+        this.sbsj = sbsj;
+    }
+
+    public String getLxdh() {
+        return lxdh;
+    }
+
+    public void setLxdh(String lxdh) {
+        this.lxdh = lxdh;
+    }
+
+    public String getYwlx() {
+        return ywlx;
+    }
+
+    public void setYwlx(String ywlx) {
+        this.ywlx = ywlx;
+    }
+
+    public String getScmb() {
+        return scmb;
+    }
+
+    public void setScmb(String scmb) {
+        this.scmb = scmb;
+    }
+
+    public String getScxs() {
+        return scxs;
+    }
+
+    public void setScxs(String scxs) {
+        this.scxs = scxs;
+    }
+
+    public Integer getFwlx() {
+        return fwlx;
+    }
+
+    public void setFwlx(Integer fwlx) {
+        this.fwlx = fwlx;
+    }
+
+    public String getXzfw() {
+        return xzfw;
+    }
+
+    public void setXzfw(String xzfw) {
+        this.xzfw = xzfw;
+    }
+}

+ 77 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxFxtbDTO.java

@@ -0,0 +1,77 @@
+package com.onemap.analyse.domain;
+
+//合规性分析结果 现状图斑信息
+public class HgxfxFxtbDTO {
+    private String dldm1 = "";
+    private String dlmc1 = "";
+    private String dldm2 = "";
+    private String dlmc2 = "";
+    private String dldm3 = "";
+    private String dlmc3 = "";
+    private Double mj;
+    private Double yzmj;
+
+    public String getDldm1() {
+        return dldm1;
+    }
+
+    public void setDldm1(String dldm1) {
+        this.dldm1 = dldm1;
+    }
+
+    public String getDlmc1() {
+        return dlmc1;
+    }
+
+    public void setDlmc1(String dlmc1) {
+        this.dlmc1 = dlmc1;
+    }
+
+    public String getDldm2() {
+        return dldm2;
+    }
+
+    public void setDldm2(String dldm2) {
+        this.dldm2 = dldm2;
+    }
+
+    public String getDlmc2() {
+        return dlmc2;
+    }
+
+    public void setDlmc2(String dlmc2) {
+        this.dlmc2 = dlmc2;
+    }
+
+    public String getDldm3() {
+        return dldm3;
+    }
+
+    public void setDldm3(String dldm3) {
+        this.dldm3 = dldm3;
+    }
+
+    public String getDlmc3() {
+        return dlmc3;
+    }
+
+    public void setDlmc3(String dlmc3) {
+        this.dlmc3 = dlmc3;
+    }
+
+    public Double getMj() {
+        return mj;
+    }
+
+    public void setMj(Double mj) {
+        this.mj = mj;
+    }
+
+    public Double getYzmj() {
+        return yzmj;
+    }
+
+    public void setYzmj(Double yzmj) {
+        this.yzmj = yzmj;
+    }
+}

+ 100 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxGisDTO.java

@@ -0,0 +1,100 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+//分析结果图斑表
+@TableName("t_fzss_hgxfx_jg_gis")
+public class HgxfxGisDTO {
+    private Integer objectid;
+    private String bsm;
+    private String rwbsm;
+    private String scxbsm;
+    private String ysmc;
+    private Double yzmj;
+    private Integer objid;
+    private Date cjsj;
+    private String bz;
+    private String ysdm;
+
+    public Integer getObjectid() {
+        return objectid;
+    }
+
+    public void setObjectid(Integer objectid) {
+        this.objectid = objectid;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getScxbsm() {
+        return scxbsm;
+    }
+
+    public void setScxbsm(String scxbsm) {
+        this.scxbsm = scxbsm;
+    }
+
+    public String getYsmc() {
+        return ysmc;
+    }
+
+    public void setYsmc(String ysmc) {
+        this.ysmc = ysmc;
+    }
+
+    public Double getYzmj() {
+        return yzmj;
+    }
+
+    public void setYzmj(Double yzmj) {
+        this.yzmj = yzmj;
+    }
+
+    public Integer getObjid() {
+        return objid;
+    }
+
+    public void setObjid(Integer objid) {
+        this.objid = objid;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+
+    public String getYsdm() {
+        return ysdm;
+    }
+
+    public void setYsdm(String ysdm) {
+        this.ysdm = ysdm;
+    }
+}

+ 62 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxHgscxDTO.java

@@ -0,0 +1,62 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+//合规性任务审查项
+@TableName("t_fzss_hgxfx_hgscx")
+public class HgxfxHgscxDTO {
+    private String bsm;
+    private String rwbsm;
+    private String scxbsm;
+    private String ysmc;
+    private Double zdmj;
+    private String jcjg;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getScxbsm() {
+        return scxbsm;
+    }
+
+    public void setScxbsm(String scxbsm) {
+        this.scxbsm = scxbsm;
+    }
+
+    public String getYsmc() {
+        return ysmc;
+    }
+
+    public void setYsmc(String ysmc) {
+        this.ysmc = ysmc;
+    }
+
+    public Double getZdmj() {
+        return zdmj;
+    }
+
+    public void setZdmj(Double zdmj) {
+        this.zdmj = zdmj;
+    }
+
+    public String getJcjg() {
+        return jcjg;
+    }
+
+    public void setJcjg(String jcjg) {
+        this.jcjg = jcjg;
+    }
+}

+ 115 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxHgscxExportDTO.java

@@ -0,0 +1,115 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+//合规性任务审查项
+public class HgxfxHgscxExportDTO {
+    private String bsm;
+    private String rwbsm;
+    private String scxbsm;
+    private String ysmc;
+    private Double zdmj;
+    private String jcjg;
+    private String ysdm;
+    private String sjy;
+    private Integer kzxjb;
+    private Integer xssx;
+    private String tjzd;
+    private Integer status;
+
+    public String getYsdm() {
+        return ysdm;
+    }
+
+    public void setYsdm(String ysdm) {
+        this.ysdm = ysdm;
+    }
+
+    public String getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public Integer getKzxjb() {
+        return kzxjb;
+    }
+
+    public void setKzxjb(Integer kzxjb) {
+        this.kzxjb = kzxjb;
+    }
+
+    public Integer getXssx() {
+        return xssx;
+    }
+
+    public void setXssx(Integer xssx) {
+        this.xssx = xssx;
+    }
+
+    public String getTjzd() {
+        return tjzd;
+    }
+
+    public void setTjzd(String tjzd) {
+        this.tjzd = tjzd;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getScxbsm() {
+        return scxbsm;
+    }
+
+    public void setScxbsm(String scxbsm) {
+        this.scxbsm = scxbsm;
+    }
+
+    public String getYsmc() {
+        return ysmc;
+    }
+
+    public void setYsmc(String ysmc) {
+        this.ysmc = ysmc;
+    }
+
+    public Double getZdmj() {
+        return zdmj;
+    }
+
+    public void setZdmj(Double zdmj) {
+        this.zdmj = zdmj;
+    }
+
+    public String getJcjg() {
+        return jcjg;
+    }
+
+    public void setJcjg(String jcjg) {
+        this.jcjg = jcjg;
+    }
+}

+ 81 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxJcxsDTO.java

@@ -0,0 +1,81 @@
+package com.onemap.analyse.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+//合规性分析 检查项实体
+public class HgxfxJcxsDTO {
+    private Integer kzxjb;
+    //结果图斑数据
+    private List<HgxfxGisDTO> jgs = new ArrayList<HgxfxGisDTO>();
+    private String  bsm;
+    private String rwbsm;
+    private String scxbsm;
+    private String ysmc;
+    private Double zdmj;
+    private String jcjg;
+
+    public Integer getKzxjb() {
+        return kzxjb;
+    }
+
+    public void setKzxjb(Integer kzxjb) {
+        this.kzxjb = kzxjb;
+    }
+
+    public List<HgxfxGisDTO> getJgs() {
+        return jgs;
+    }
+
+    public void setJgs(List<HgxfxGisDTO> jgs) {
+        this.jgs = jgs;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getScxbsm() {
+        return scxbsm;
+    }
+
+    public void setScxbsm(String scxbsm) {
+        this.scxbsm = scxbsm;
+    }
+
+    public String getYsmc() {
+        return ysmc;
+    }
+
+    public void setYsmc(String ysmc) {
+        this.ysmc = ysmc;
+    }
+
+    public Double getZdmj() {
+        return zdmj;
+    }
+
+    public void setZdmj(Double zdmj) {
+        this.zdmj = zdmj;
+    }
+
+    public String getJcjg() {
+        return jcjg;
+    }
+
+    public void setJcjg(String jcjg) {
+        this.jcjg = jcjg;
+    }
+}

+ 80 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxScxDTO.java

@@ -0,0 +1,80 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+//合规性分析审查配置项表
+@TableName("t_fzss_hgxfx_scx")
+public class HgxfxScxDTO {
+    private String bsm;
+    private String ysdm;
+    private String ysmc;
+    private String sjy;
+    private Integer kzxjb;
+    private Integer xssx;
+    private String tjzd;
+    private Integer status;
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getYsdm() {
+        return ysdm;
+    }
+
+    public void setYsdm(String ysdm) {
+        this.ysdm = ysdm;
+    }
+
+    public String getYsmc() {
+        return ysmc;
+    }
+
+    public void setYsmc(String ysmc) {
+        this.ysmc = ysmc;
+    }
+
+    public String getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public Integer getKzxjb() {
+        return kzxjb;
+    }
+
+    public void setKzxjb(Integer kzxjb) {
+        this.kzxjb = kzxjb;
+    }
+
+    public Integer getXssx() {
+        return xssx;
+    }
+
+    public void setXssx(Integer xssx) {
+        this.xssx = xssx;
+    }
+
+    public String getTjzd() {
+        return tjzd;
+    }
+
+    public void setTjzd(String tjzd) {
+        this.tjzd = tjzd;
+    }
+}

+ 43 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/HgxfxTemplateDTO.java

@@ -0,0 +1,43 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_fzss_hgxfx_template")
+public class HgxfxTemplateDTO {
+    private String bsm;
+    private String mbmc;
+    private String fxyz;
+    private String bz;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getMbmc() {
+        return mbmc;
+    }
+
+    public void setMbmc(String mbmc) {
+        this.mbmc = mbmc;
+    }
+
+    public String getFxyz() {
+        return fxyz;
+    }
+
+    public void setFxyz(String fxyz) {
+        this.fxyz = fxyz;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+}

+ 37 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/RwztDTO.java

@@ -0,0 +1,37 @@
+package com.onemap.analyse.domain;
+
+/**
+ * 分析任务状态码
+ */
+public class RwztDTO {
+    private Integer None = -1;
+    private Integer Create = 0;
+    private Integer Run = 1;
+    private Integer Complete = 2;
+    private Integer Error = 3;
+    private Integer NoJX = 99;
+
+    public Integer getNone() {
+        return None;
+    }
+
+    public Integer getCreate() {
+        return Create;
+    }
+
+    public Integer getRun() {
+        return Run;
+    }
+
+    public Integer getComplete() {
+        return Complete;
+    }
+
+    public Integer getError() {
+        return Error;
+    }
+
+    public Integer getNoJX() {
+        return NoJX;
+    }
+}

+ 179 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/TCtfxMainDTO.java

@@ -0,0 +1,179 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@TableName("t_fxpj_ctfx_main")
+public class TCtfxMainDTO {
+    private String id;
+    private String name;
+    private String sjy;
+    private String fxyz;
+    private String username;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date cjsj;
+    private String rwzt;
+    private String ssmk;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date rwkssj;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date rwjssj;
+    private String remark;
+    private String fxjg;
+    private String fxtable;
+    private String fxjgtable;
+    private String fxyear;
+    private String workspace;
+    private String xzqdm;
+    private String statist;
+
+    public String getStatist() {
+        return statist;
+    }
+
+    public void setStatist(String statist) {
+        this.statist = statist;
+    }
+
+    public String getXzqdm() {
+        return xzqdm;
+    }
+
+    public void setXzqdm(String xzqdm) {
+        this.xzqdm = xzqdm;
+    }
+
+    public String getWorkspace() {
+        return workspace;
+    }
+
+    public void setWorkspace(String workspace) {
+        this.workspace = workspace;
+    }
+
+    public String getFxtable() {
+        return fxtable;
+    }
+
+    public void setFxtable(String fxtable) {
+        this.fxtable = fxtable;
+    }
+
+    public String getFxjgtable() {
+        return fxjgtable;
+    }
+
+    public void setFxjgtable(String fxjgtable) {
+        this.fxjgtable = fxjgtable;
+    }
+
+    public String getFxyear() {
+        return fxyear;
+    }
+
+    public void setFxyear(String fxyear) {
+        this.fxyear = fxyear;
+    }
+
+    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 getSjy() {
+        return sjy;
+    }
+
+    public void setSjy(String sjy) {
+        this.sjy = sjy;
+    }
+
+    public String getFxyz() {
+        return fxyz;
+    }
+
+    public void setFxyz(String fxyz) {
+        this.fxyz = fxyz;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public String getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(String rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public String getSsmk() {
+        return ssmk;
+    }
+
+    public void setSsmk(String ssmk) {
+        this.ssmk = ssmk;
+    }
+
+    public Date getRwkssj() {
+        return rwkssj;
+    }
+
+    public void setRwkssj(Date rwkssj) {
+        this.rwkssj = rwkssj;
+    }
+
+    public Date getRwjssj() {
+        return rwjssj;
+    }
+
+    public void setRwjssj(Date rwjssj) {
+        this.rwjssj = rwjssj;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getFxjg() {
+        return fxjg;
+    }
+
+    public void setFxjg(String fxjg) {
+        this.fxjg = fxjg;
+    }
+}

+ 49 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/TCtfxTdkfqdDTO.java

@@ -0,0 +1,49 @@
+package com.onemap.analyse.domain;
+
+public class TCtfxTdkfqdDTO {
+    private String xzqdm;
+    private String xzqmc;
+    private Double tbmj ;
+    private Double xzqmj ;
+    private Double proportion ;
+
+    public String getXzqdm() {
+        return xzqdm;
+    }
+
+    public void setXzqdm(String xzqdm) {
+        this.xzqdm = xzqdm;
+    }
+
+    public String getXzqmc() {
+        return xzqmc;
+    }
+
+    public void setXzqmc(String xzqmc) {
+        this.xzqmc = xzqmc;
+    }
+
+    public Double getTbmj() {
+        return tbmj;
+    }
+
+    public void setTbmj(Double tbmj) {
+        this.tbmj = tbmj;
+    }
+
+    public Double getXzqmj() {
+        return xzqmj;
+    }
+
+    public void setXzqmj(Double xzqmj) {
+        this.xzqmj = xzqmj;
+    }
+
+    public Double getProportion() {
+        return proportion;
+    }
+
+    public void setProportion(Double proportion) {
+        this.proportion = proportion;
+    }
+}

+ 22 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/XzlbDTO.java

@@ -0,0 +1,22 @@
+package com.onemap.analyse.domain;
+
+public class XzlbDTO {
+    private Integer xmxz =0;
+    private Integer hgxfx = 1;
+
+    public Integer getXmxz() {
+        return xmxz;
+    }
+
+    public void setXmxz(Integer xmxz) {
+        this.xmxz = xmxz;
+    }
+
+    public Integer getHgxfx() {
+        return hgxfx;
+    }
+
+    public void setHgxfx(Integer hgxfx) {
+        this.hgxfx = hgxfx;
+    }
+}

+ 154 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ZttDTO.java

@@ -0,0 +1,154 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("t_yzt_ztt")
+public class ZttDTO {
+    private String bsm;
+    private String mbbsm;
+    private String zbt;
+    private String fbt;
+    private String bzdw;
+    private String bzsj;
+    private String ztsj;
+    private String ztdw;
+    private Integer ztzt;
+    private String zttwj;
+    private Date kssj;
+    private Date jssj;
+    private String cjyh;
+    private Date cjsj;
+    private String bz;
+    private String xzqdm;
+
+
+    public String getXzqdm() {
+        return xzqdm;
+    }
+
+    public void setXzqdm(String xzqdm) {
+        this.xzqdm = xzqdm;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getMbbsm() {
+        return mbbsm;
+    }
+
+    public void setMbbsm(String mbbsm) {
+        this.mbbsm = mbbsm;
+    }
+
+    public String getZbt() {
+        return zbt;
+    }
+
+    public void setZbt(String zbt) {
+        this.zbt = zbt;
+    }
+
+    public String getFbt() {
+        return fbt;
+    }
+
+    public void setFbt(String fbt) {
+        this.fbt = fbt;
+    }
+
+    public String getBzdw() {
+        return bzdw;
+    }
+
+    public void setBzdw(String bzdw) {
+        this.bzdw = bzdw;
+    }
+
+    public String getBzsj() {
+        return bzsj;
+    }
+
+    public void setBzsj(String bzsj) {
+        this.bzsj = bzsj;
+    }
+
+    public String getZtsj() {
+        return ztsj;
+    }
+
+    public void setZtsj(String ztsj) {
+        this.ztsj = ztsj;
+    }
+
+    public String getZtdw() {
+        return ztdw;
+    }
+
+    public void setZtdw(String ztdw) {
+        this.ztdw = ztdw;
+    }
+
+    public Integer getZtzt() {
+        return ztzt;
+    }
+
+    public void setZtzt(Integer ztzt) {
+        this.ztzt = ztzt;
+    }
+
+    public String getZttwj() {
+        return zttwj;
+    }
+
+    public void setZttwj(String zttwj) {
+        this.zttwj = zttwj;
+    }
+
+    public Date getKssj() {
+        return kssj;
+    }
+
+    public void setKssj(Date kssj) {
+        this.kssj = kssj;
+    }
+
+    public Date getJssj() {
+        return jssj;
+    }
+
+    public void setJssj(Date jssj) {
+        this.jssj = jssj;
+    }
+
+    public String getCjyh() {
+        return cjyh;
+    }
+
+    public void setCjyh(String cjyh) {
+        this.cjyh = cjyh;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+}

+ 61 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/ZttMbDTO.java

@@ -0,0 +1,61 @@
+package com.onemap.analyse.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+@TableName("t_yzt_zttmb")
+public class ZttMbDTO {
+    private String bsm;
+    private String fzbsm;
+    private String mbmc;
+    private String mbwj;
+    private String mbms;
+    private Integer zt;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getFzbsm() {
+        return fzbsm;
+    }
+
+    public void setFzbsm(String fzbsm) {
+        this.fzbsm = fzbsm;
+    }
+
+    public String getMbmc() {
+        return mbmc;
+    }
+
+    public void setMbmc(String mbmc) {
+        this.mbmc = mbmc;
+    }
+
+    public String getMbwj() {
+        return mbwj;
+    }
+
+    public void setMbwj(String mbwj) {
+        this.mbwj = mbwj;
+    }
+
+    public String getMbms() {
+        return mbms;
+    }
+
+    public void setMbms(String mbms) {
+        this.mbms = mbms;
+    }
+
+    public Integer getZt() {
+        return zt;
+    }
+
+    public void setZt(Integer zt) {
+        this.zt = zt;
+    }
+}

+ 69 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/zbmx/ZbmxMxjsDTO.java

@@ -0,0 +1,69 @@
+package com.onemap.analyse.domain.zbmx;
+
+public class ZbmxMxjsDTO {
+
+    /**
+     * 标识码
+     */
+    private String bsm;
+
+    /**
+     * 模型标识
+     */
+    private String mxbsm;
+
+    /**
+     * 模型名称
+     */
+    private String mxmc;
+
+    /**
+     * 模型参数
+     */
+    private String mxcs;
+
+    /**
+     * 指标编号
+     */
+    private String zbbh;
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getMxbsm() {
+        return mxbsm;
+    }
+
+    public void setMxbsm(String mxbsm) {
+        this.mxbsm = mxbsm;
+    }
+
+    public String getMxmc() {
+        return mxmc;
+    }
+
+    public void setMxmc(String mxmc) {
+        this.mxmc = mxmc;
+    }
+
+    public String getMxcs() {
+        return mxcs;
+    }
+
+    public void setMxcs(String mxcs) {
+        this.mxcs = mxcs;
+    }
+
+    public String getZbbh() {
+        return zbbh;
+    }
+
+    public void setZbbh(String zbbh) {
+        this.zbbh = zbbh;
+    }
+}

+ 220 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/zbmx/ZbmxMxjsrwDO.java

@@ -0,0 +1,220 @@
+package com.onemap.analyse.domain.zbmx;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@TableName("T_ZBMX_MXJSRW")
+public class ZbmxMxjsrwDO {
+
+    /**
+     * 标识码
+     */
+
+    private String bsm;
+
+    /**
+     * 模型标识
+     */
+    private String mxbsm;
+
+    /**
+     * 模型名称
+     */
+    private String mxmc;
+
+    /**
+     * 模型作业标识
+     */
+    private String mxzybsm;
+
+    /**
+     * 任务状态(0创建 1执行中 2完成 3错误)
+     */
+    private Integer rwzt;
+
+    /**
+     * 任务开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date rwkssj;
+
+    /**
+     * 任务结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date rwjssj;
+
+    /**
+     * 创建方式(0自动 1手动)
+     */
+    private Integer cjfs;
+
+    /**
+     * 创建用户
+     */
+    private String cjyh;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date cjsj;
+
+    /**
+     * 结果值
+     */
+    private Double jgz;
+
+    /**
+     * 结果数据
+     */
+    private String jgsj;
+
+    public ZbmxMxjsrwDO() {
+    }
+
+    public ZbmxMxjsrwDO(String bsm, String cjyh, Integer cjfs, String mxbsm, String mxmc) {
+        this.bsm = bsm;
+        this.mxbsm = mxbsm;
+        this.mxmc = mxmc;
+        this.cjfs = cjfs;
+        this.cjyh = cjyh;
+    }
+
+    public ZbmxMxjsrwDO(String bsm, String mxbsm, String mxmc, String mxzybsm, Integer rwzt,
+                        Date rwkssj, Date rwjssj, Integer cjfs, String cjyh, Date cjsj,
+                        Double jgz, String jgsj) {
+        this.bsm = bsm;
+        this.mxbsm = mxbsm;
+        this.mxmc = mxmc;
+        this.mxzybsm = mxzybsm;
+        this.rwzt = rwzt;
+        this.rwkssj = rwkssj;
+        this.rwjssj = rwjssj;
+        this.cjfs = cjfs;
+        this.cjyh = cjyh;
+        this.cjsj = cjsj;
+        this.jgz = jgz;
+        this.jgsj = jgsj;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getMxbsm() {
+        return mxbsm;
+    }
+
+    public void setMxbsm(String mxbsm) {
+        this.mxbsm = mxbsm;
+    }
+
+    public String getMxmc() {
+        return mxmc;
+    }
+
+    public void setMxmc(String mxmc) {
+        this.mxmc = mxmc;
+    }
+
+    public String getMxzybsm() {
+        return mxzybsm;
+    }
+
+    public void setMxzybsm(String mxzybsm) {
+        this.mxzybsm = mxzybsm;
+    }
+
+    public Integer getRwzt() {
+        return rwzt;
+    }
+
+    public void setRwzt(Integer rwzt) {
+        this.rwzt = rwzt;
+    }
+
+    public Date getRwkssj() {
+        return rwkssj;
+    }
+
+    public void setRwkssj(Date rwkssj) {
+        this.rwkssj = rwkssj;
+    }
+
+    public Date getRwjssj() {
+        return rwjssj;
+    }
+
+    public void setRwjssj(Date rwjssj) {
+        this.rwjssj = rwjssj;
+    }
+
+    public Integer getCjfs() {
+        return cjfs;
+    }
+
+    public void setCjfs(Integer cjfs) {
+        this.cjfs = cjfs;
+    }
+
+    public String getCjyh() {
+        return cjyh;
+    }
+
+    public void setCjyh(String cjyh) {
+        this.cjyh = cjyh;
+    }
+
+    public Date getCjsj() {
+        return cjsj;
+    }
+
+    public void setCjsj(Date cjsj) {
+        this.cjsj = cjsj;
+    }
+
+    public Double getJgz() {
+        return jgz;
+    }
+
+    public void setJgz(Double jgz) {
+        this.jgz = jgz;
+    }
+
+    public String getJgsj() {
+        return jgsj;
+    }
+
+    public void setJgsj(String jgsj) {
+        this.jgsj = jgsj;
+    }
+
+    @Override
+    public String toString() {
+        return "ZbmxMxjsrwDO{" +
+            "bsm='" + bsm + '\'' +
+            ", mxbsm='" + mxbsm + '\'' +
+            ", mxmc='" + mxmc + '\'' +
+            ", mxzybsm='" + mxzybsm + '\'' +
+            ", rwzt=" + rwzt +
+            ", rwkssj=" + rwkssj +
+            ", rwjssj=" + rwjssj +
+            ", cjfs=" + cjfs +
+            ", cjyh='" + cjyh + '\'' +
+            ", cjsj=" + cjsj +
+            ", jgz=" + jgz +
+            ", jgsj='" + jgsj + '\'' +
+            '}';
+    }
+}

+ 126 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/domain/zbmx/ZbmxMxjsrwrzDO.java

@@ -0,0 +1,126 @@
+package com.onemap.analyse.domain.zbmx;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("T_ZBMX_MXJSRWRZ")
+public class ZbmxMxjsrwrzDO {
+
+    /**
+     * 模型标识
+     */
+    private String bsm;
+
+    /**
+     * 模型标识
+     */
+    private String mxbsm;
+
+    /**
+     * 模型名称
+     */
+    private String mxmc;
+
+    /**
+     * 任务标识码
+     */
+    private String rwbsm;
+
+    /**
+     * 日志类型(Info,warning,error)
+     */
+    private String rzlx;
+
+    /**
+     * 日志时间
+     */
+    private Date rzsj;
+
+    /**
+     * 日志内容
+     */
+    private String rzlr;
+
+    public ZbmxMxjsrwrzDO() {
+    }
+
+    public ZbmxMxjsrwrzDO(String bsm, String mxbsm, String mxmc, String rwbsm, String rzlx, Date rzsj, String rzlr) {
+        this.bsm = bsm;
+        this.mxbsm = mxbsm;
+        this.mxmc = mxmc;
+        this.rwbsm = rwbsm;
+        this.rzlx = rzlx;
+        this.rzsj = rzsj;
+        this.rzlr = rzlr;
+    }
+
+    public String getBsm() {
+        return bsm;
+    }
+
+    public void setBsm(String bsm) {
+        this.bsm = bsm;
+    }
+
+    public String getMxbsm() {
+        return mxbsm;
+    }
+
+    public void setMxbsm(String mxbsm) {
+        this.mxbsm = mxbsm;
+    }
+
+    public String getMxmc() {
+        return mxmc;
+    }
+
+    public void setMxmc(String mxmc) {
+        this.mxmc = mxmc;
+    }
+
+    public String getRwbsm() {
+        return rwbsm;
+    }
+
+    public void setRwbsm(String rwbsm) {
+        this.rwbsm = rwbsm;
+    }
+
+    public String getRzlx() {
+        return rzlx;
+    }
+
+    public void setRzlx(String rzlx) {
+        this.rzlx = rzlx;
+    }
+
+    public Date getRzsj() {
+        return rzsj;
+    }
+
+    public void setRzsj(Date rzsj) {
+        this.rzsj = rzsj;
+    }
+
+    public String getRzlr() {
+        return rzlr;
+    }
+
+    public void setRzlr(String rzlr) {
+        this.rzlr = rzlr;
+    }
+
+    @Override
+    public String toString() {
+        return "ZbmxMxjsrwrzDO{" +
+            "bsm='" + bsm + '\'' +
+            ", mxbsm='" + mxbsm + '\'' +
+            ", mxmc='" + mxmc + '\'' +
+            ", rwbsm='" + rwbsm + '\'' +
+            ", rzlx='" + rzlx + '\'' +
+            ", rzsj=" + rzsj +
+            ", rzlr='" + rzlr + '\'' +
+            '}';
+    }
+}

+ 18 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/CtfxMapper.java

@@ -0,0 +1,18 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.TCtfxMainDTO;
+import com.onemap.analyse.domain.TCtfxTdkfqdDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 冲突分析 数据层
+ *
+ * @author onemap
+ */
+public interface CtfxMapper extends BaseMapper<TCtfxMainDTO> {
+
+    List<TCtfxTdkfqdDTO> Tdkfqd(@Param("tablename") String tablename, @Param("xzqdm") String xzqdm, @Param("curlevel") int curlevel, @Param("sublevel") int sublevel);
+}

+ 14 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FxrwrzMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FxrwrzDTO;
+import com.onemap.analyse.domain.ZttDTO;
+
+/**
+ * 专题图 数据层
+ *
+ * @author onemap
+ */
+public interface FxrwrzMapper extends BaseMapper<FxrwrzDTO> {
+
+}

+ 14 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzssChscFileMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzssChscFileDTO;
+
+
+/**
+ * 辅助实施  数据层
+ *
+ * @author onemap
+ */
+public interface FzssChscFileMapper extends BaseMapper<FzssChscFileDTO> {
+
+}

+ 14 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzssChscMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzxzChscDTO;
+
+
+/**
+ * 辅助实施  数据层
+ *
+ * @author onemap
+ */
+public interface FzssChscMapper extends BaseMapper<FzxzChscDTO> {
+
+}

+ 14 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzssSystemMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzssSystemDTO;
+
+
+/**
+ * 辅助实施  系统对接 数据层
+ *
+ * @author onemap
+ */
+public interface FzssSystemMapper extends BaseMapper<FzssSystemDTO> {
+
+}

+ 14 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzJgGISMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzxzDTO;
+import com.onemap.analyse.domain.FzxzJgGisDTO;
+
+/**
+ * 辅助选址 数据层
+ *
+ * @author onemap
+ */
+public interface FzxzJgGISMapper extends BaseMapper<FzxzJgGisDTO> {
+
+}

+ 13 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzJgyzMapper.java

@@ -0,0 +1,13 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzxzJgyzDTO;
+
+/**
+ * 辅助选址 数据层
+ *
+ * @author onemap
+ */
+public interface FzxzJgyzMapper extends BaseMapper<FzxzJgyzDTO> {
+
+}

+ 18 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzMapper.java

@@ -0,0 +1,18 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzxzDTO;
+import com.onemap.analyse.domain.FzxzEntityDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 辅助选址 数据层
+ *
+ * @author onemap
+ */
+public interface FzxzMapper extends BaseMapper<FzxzDTO> {
+    List<FzxzEntityDTO> GetFzxzList(@Param("xmmc") String xmmc, @Param("kssj") String kssj, @Param("jssj") String jssj);
+    FzxzEntityDTO GetFzxzByBsm(@Param("bsm") String bsm);
+}

+ 17 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzTbMapper.java

@@ -0,0 +1,17 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzxzDTO;
+import com.onemap.analyse.domain.FzxzEntityDTO;
+import com.onemap.analyse.domain.FzxzTbEntityDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 辅助选址图斑
+ *
+ * @author onemap
+ */
+public interface FzxzTbMapper extends BaseMapper<FzxzTbEntityDTO> {
+}

+ 13 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/FzxzXzyzMapper.java

@@ -0,0 +1,13 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.FzxzXzyzDTO;
+
+/**
+ * 辅助选址 数据层
+ *
+ * @author onemap
+ */
+public interface FzxzXzyzMapper extends BaseMapper<FzxzXzyzDTO> {
+
+}

+ 18 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxHgscxMapper.java

@@ -0,0 +1,18 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.HgxfxHgscxDTO;
+import com.onemap.analyse.domain.HgxfxHgscxExportDTO;
+import com.onemap.analyse.domain.HgxfxScxDTO;
+
+import java.util.List;
+
+/**
+ * 合规性分析数据层
+ *
+ * @author onemap
+ */
+public interface HgxfxHgscxMapper extends BaseMapper<HgxfxHgscxDTO> {
+
+    List<HgxfxHgscxExportDTO> queryScxList(String rwbsm);
+}

+ 22 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxMapper.java

@@ -0,0 +1,22 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.HgxfxDTO;
+import com.onemap.analyse.domain.HgxfxFxtbDTO;
+import com.onemap.analyse.domain.HgxfxJcxsDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 合规性分析 数据层
+ *
+ * @author onemap
+ */
+public interface HgxfxMapper extends BaseMapper<HgxfxDTO> {
+    List<HgxfxDTO> GetPage(@Param("kssj") String kssj, @Param("jssj") String jssj, @Param("xmmc") String xmmc);
+
+    List<HgxfxJcxsDTO> getJcxs(String bsm);
+
+    List<HgxfxFxtbDTO> getFxtb(String bsm);
+}

+ 13 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxScxMapper.java

@@ -0,0 +1,13 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.HgxfxScxDTO;
+
+/**
+ * 合规性分析数据层
+ *
+ * @author onemap
+ */
+public interface HgxfxScxMapper extends BaseMapper<HgxfxScxDTO> {
+
+}

+ 13 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/HgxfxTemplateMapper.java

@@ -0,0 +1,13 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.HgxfxTemplateDTO;
+
+/**
+ * 合规性分析  模板 数据层
+ *
+ * @author onemap
+ */
+public interface HgxfxTemplateMapper extends BaseMapper<HgxfxTemplateDTO> {
+
+}

+ 13 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/ZttMapper.java

@@ -0,0 +1,13 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.ZttDTO;
+
+/**
+ * 专题图 数据层
+ *
+ * @author onemap
+ */
+public interface ZttMapper extends BaseMapper<ZttDTO> {
+
+}

+ 14 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/ZttMbMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.analyse.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.ZttMbDTO;
+
+/**
+ * 专题图 数据层
+ *
+ * @author onemap
+ */
+public interface ZttMbMapper extends BaseMapper<ZttMbDTO>
+{
+
+}

+ 20 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/zbmx/ZbmxMxjsrwMapper.java

@@ -0,0 +1,20 @@
+package com.onemap.analyse.mapper.zbmx;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.zbmx.ZbmxMxjsDTO;
+import com.onemap.analyse.domain.zbmx.ZbmxMxjsrwDO;
+import com.onemap.system.api.domain.SysUser;
+
+import java.util.List;
+
+public interface ZbmxMxjsrwMapper extends BaseMapper<ZbmxMxjsrwDO> {
+
+    /**
+     * 查询待计算的任务
+     */
+    List<ZbmxMxjsDTO> selectNewTask();
+    /**
+     * 修改任务信息
+     */
+    public int updateZbmxMxjsrwById(ZbmxMxjsrwDO zbmxMxjsrwDO);
+}

+ 7 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/zbmx/ZbmxMxjsrwrzMapper.java

@@ -0,0 +1,7 @@
+package com.onemap.analyse.mapper.zbmx;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.analyse.domain.zbmx.ZbmxMxjsrwrzDO;
+
+public interface ZbmxMxjsrwrzMapper extends BaseMapper<ZbmxMxjsrwrzDO> {
+}

+ 25 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IChscService.java

@@ -0,0 +1,25 @@
+package com.onemap.analyse.service;
+
+import com.onemap.analyse.domain.FzssChscXmgxDTO;
+import com.onemap.analyse.domain.FzxzChscDTO;
+import com.onemap.common.core.domain.R;
+import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.common.core.web.domain.WebResult;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public interface IChscService {
+    R<?> authorize(String appid, HttpServletRequest request, HttpServletResponse response);
+
+    WebResult download(String bsm, HttpServletRequest request, HttpServletResponse response);
+
+    WebResult getProgress(String bsm, HttpServletRequest request, HttpServletResponse response);
+
+    WebResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO);
+
+    WebResult create(FzxzChscDTO fzxzChscDTO);
+
+    WebResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response);
+}

+ 18 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IFzssService.java

@@ -0,0 +1,18 @@
+package com.onemap.analyse.service;
+
+import com.onemap.analyse.domain.HgxfxEntityDTO;
+import com.onemap.common.core.web.domain.RequestResult;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Map;
+
+public interface IFzssService {
+    RequestResult AddHgxfx(HgxfxEntityDTO hgxfxEntityDTO) throws IOException;
+
+    RequestResult AddFzxz(Map params);
+
+    RequestResult GetXzjg(String bsm);
+
+    RequestResult saveWordFile(String bsm, ArrayList xzbsm);
+}

+ 8 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/IToolService.java

@@ -0,0 +1,8 @@
+package com.onemap.analyse.service;
+
+import com.onemap.common.core.web.domain.WebResult;
+
+public interface IToolService {
+
+    WebResult jsonToShp(String esrijson);
+}

+ 236 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ChscServiceImpl.java

@@ -0,0 +1,236 @@
+package com.onemap.analyse.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.task.PythonExecute;
+import com.onemap.analyse.utils.DownloadUtils;
+import com.onemap.analyse.utils.EsriJsonUtils;
+import com.onemap.analyse.utils.FileUtils;
+import com.onemap.analyse.utils.HttpUtil;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.service.IChscService;
+import com.onemap.common.core.domain.R;
+import com.onemap.common.core.utils.FileStreamUtils;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.utils.ZipUtils;
+import com.onemap.common.core.web.domain.WebResult;
+import com.onemap.system.api.RemoteAuthService;
+import org.python.modules._marshal;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.nio.file.Paths;
+import java.util.*;
+
+@Service
+public class ChscServiceImpl implements IChscService {
+
+    @Autowired
+    private RemoteAuthService remoteAuthService;
+    @Autowired
+    private FzssSystemMapper fzssSystemMapper;
+    @Resource
+    private FzssChscMapper fzssChscMapper;
+    @Resource
+    private HgxfxMapper hgxfxMapper;
+    @Resource
+    private FzxzMapper fzxzMapper;
+    @Resource
+    private FzssChscFileMapper fzssChscFileMapper;
+    private RwztDTO rwztDTO = new RwztDTO();
+    private XzlbDTO xzlbDTO = new XzlbDTO();
+    private FxfwDictDTO fxfwDictDTO = new FxfwDictDTO();
+    @Value("${Hgxfx.temp}")
+    private String temp;
+
+    @Override
+    public R<?> authorize(String appid, HttpServletRequest request, HttpServletResponse response) {
+        QueryWrapper<FzssSystemDTO> wrapper = new QueryWrapper<>();
+        wrapper.eq("id", appid);
+        FzssSystemDTO system = fzssSystemMapper.selectOne(wrapper);
+        if (system != null) {
+            String requestIp = HttpUtil.getRequestIp(request);
+            if (!system.getIp().contains(requestIp)) {
+                return R.fail(500, "访问ip与申请ip不一致");
+            }
+            R<?> r = remoteAuthService.empoweruser(system.getUsername());
+            return r;
+        }
+        return R.fail(500, "未检索到appid相关信息");
+    }
+
+    @Override
+    public WebResult download(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        QueryWrapper<FzxzChscDTO> wrapper = new QueryWrapper<>();
+        wrapper.eq("bsm", bsm);
+        FzxzChscDTO chsc = fzssChscMapper.selectOne(wrapper);
+        if (chsc != null && rwztDTO.getComplete().equals(chsc.getRwzt())) {
+            //选址类别(0意向范围筛选,1指定空间位置)
+            if (xzlbDTO.getHgxfx() == chsc.getXzlb()) {
+                HgxfxDTO hgxfx = hgxfxMapper.selectOne(new QueryWrapper<HgxfxDTO>().eq("bsm", bsm));
+                if (hgxfx != null) {
+                    DownloadUtils.download(response, hgxfx.getFxbg().replace(".docx", ".pdf"), "选址报告");
+                    return null;
+                } else {
+                    return WebResult.error("查询报告为空");
+                }
+            } else if (xzlbDTO.getXmxz() == chsc.getXzlb()) {
+                FzxzDTO fzxz = fzxzMapper.selectOne(new QueryWrapper<FzxzDTO>().eq("bsm", bsm));
+                if (fzxz != null) {
+                    DownloadUtils.download(response, fzxz.getFxbg(), "选址报告");
+                    return null;
+                } else {
+                    return WebResult.error("查询报告为空");
+                }
+            }
+            return WebResult.error("查询报告为空");
+        }
+        return WebResult.error("项目不存在或分析未完成");
+    }
+
+    @Override
+    public WebResult getProgress(String bsm, HttpServletRequest request, HttpServletResponse response) {
+        QueryWrapper<FzxzChscDTO> wrapper = new QueryWrapper<>();
+        wrapper.eq("bsm", bsm);
+        FzxzChscDTO chsc = fzssChscMapper.selectOne(wrapper);
+        if (chsc != null) {
+            FzxzChscProgressDTO res = new FzxzChscProgressDTO();
+            res.setBsm(chsc.getBsm());
+            res.setJd(chsc.getRwjd());
+            res.setMsg(chsc.getRwzt() == rwztDTO.getNoJX() ? "未解析" : chsc.getRwjg());
+            res.setState(chsc.getRwzt());
+            return WebResult.success("操作成功", res);
+        } else {
+            return WebResult.error("项目不存在");
+        }
+    }
+
+    @Override
+    public WebResult xmjg(FzssChscXmgxDTO fzssChscXmgxDTO) {
+        QueryWrapper<FzxzChscDTO> wrapper = new QueryWrapper<>();
+        wrapper.eq("bsm", fzssChscXmgxDTO.getBsm());
+        FzxzChscDTO chsc = fzssChscMapper.selectOne(wrapper);
+        if (chsc != null) {
+            chsc.setChzt(String.valueOf(fzssChscXmgxDTO.getChzt()));
+            chsc.setChjg(fzssChscXmgxDTO.getChjg());
+            chsc.setChbz(fzssChscXmgxDTO.getChjg());
+            try {
+                fzssChscMapper.update(chsc, wrapper);
+                return WebResult.success("操作成功", true);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return WebResult.error("数据更新失败");
+        }
+        return WebResult.error("项目编码错误");
+    }
+
+    @Override
+    public WebResult create(FzxzChscDTO fzxzChscDTO) {
+        if (!fzxzChscDTO.paramsChecked()) {
+            return WebResult.error("必输入参数不能为空");
+        }
+        if (fzxzChscDTO.getFwlx() == fxfwDictDTO.getShp()) {
+            FzssChscFileDTO fileDTO = fzssChscFileMapper.selectOne(new QueryWrapper<FzssChscFileDTO>().eq("bsm", fzxzChscDTO.getXzfw()));
+            if (fileDTO == null) {
+                return WebResult.error("选址范围错误,请检查参数是否正确");
+            }
+            if (!FileUtils.check(fileDTO.getWj())) {
+                return WebResult.error("选址范围未找到,请重新上传范围文件");
+            }
+        } else {
+            return WebResult.error("FWLX暂不支持" + fzxzChscDTO.getFwlx());
+        }
+        //插入策划生成数据库表
+        String uuid = StringUtils.getUUID();
+        fzxzChscDTO.setBsm(uuid);
+        fzxzChscDTO.setRwzt(rwztDTO.getNoJX());
+        fzxzChscDTO.setCjsj(new Date());
+        fzssChscMapper.insert(fzxzChscDTO);
+        return WebResult.success("操作成功", uuid);
+    }
+
+    @Override
+    public WebResult txt2shp(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
+        //将txt文件保存到本地
+        long timeMillis = System.currentTimeMillis();
+        String targetfolder = temp + "\\" + timeMillis + "\\";
+        String targetfile = targetfolder + file.getOriginalFilename();
+        String jsonpath = targetfolder + "esrijson.json";
+        String shppath = targetfolder + "shape.shp";
+        try {
+            FileUtils.makedir(targetfolder);
+            file.transferTo(Paths.get(targetfile));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        List<String> strlist = new ArrayList<>();
+        BufferedReader br = null;
+        try {
+            br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(targetfile)), "UTF-8"));//GBK
+            String str = null;
+            int i = 0;
+            while ((str = br.readLine()) != null) {
+                if (!StringUtils.isEmpty(str) && !str.startsWith("#")) {
+                    strlist.add(str);
+                }
+                i++;
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                br.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        //将文本字符串进行转换,生成esrijson并保存到本地
+        String esrijson = EsriJsonUtils.arrayToJson(strlist);
+        //写入文件
+        FileOutputStream fos = null;
+        try {
+            fos = new FileOutputStream(jsonpath, true);
+            //true表示在文件末尾追加
+            fos.write(esrijson.toString().getBytes());
+            fos.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        try {
+            //调用Python执行esrijson转shp
+            String msg = PythonExecute.EsriJson2shp(jsonpath, shppath);
+            if (!StringUtils.isEmpty(msg) && msg.contains("OK")) {
+                //将shp相关文件进行压缩并输入
+                List<Map> fileList = new ArrayList<>();
+                Map map = new HashMap();
+                map.put("fileName", FileStreamUtils.getFileName(shppath));
+                map.put("outByte", FileStreamUtils.getByteArrayOutputStream(shppath).toByteArray());
+                fileList.add(map);
+                String[] kzm = {".sbn",".shx", ".dbf", ".cpg", ".prj"};
+                String curkzm = ".shp";
+                for (int i = 0; i < kzm.length; i++) {
+                    String curpath = shppath.replaceAll(curkzm, kzm[i]);
+                    Map cur = new HashMap();
+                    cur.put("fileName", FileStreamUtils.getFileName(curpath));
+                    cur.put("outByte", FileStreamUtils.getByteArrayOutputStream(curpath).toByteArray());
+                    fileList.add(cur);
+                }
+                ZipUtils.zipFiles(fileList,response);
+            } else {
+                WebResult.error("json转shape失败", false);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        //当初当前临时文件夹
+        FileUtils.deldir(targetfolder);
+        return null;
+    }
+}

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

@@ -0,0 +1,170 @@
+package com.onemap.analyse.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.domain.ESRI.EsriFeature;
+import com.onemap.analyse.domain.ESRI.EsriField;
+import com.onemap.analyse.domain.ESRI.EsriGeometry;
+import com.onemap.analyse.domain.ESRI.EsriJsonModel;
+import com.onemap.analyse.domain.GeoJSON.Geometry;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.service.IFzssService;
+import com.onemap.analyse.task.FzxzSchedule;
+import com.onemap.analyse.task.PythonExecute;
+import com.onemap.analyse.utils.DozerUtils;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.common.security.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.util.*;
+
+import static com.onemap.analyse.utils.Fxfw2SdeUtils.fzxzvector2Sde;
+import static com.onemap.analyse.utils.Fxfw2SdeUtils.vector2Sde;
+
+@Service
+public class FzssServiceImpl implements IFzssService {
+    private FxfwDictDTO fxfwDictDTO = new FxfwDictDTO();
+    @Value("${Hgxfx.temp}")
+    private String temp;
+    //任务状态标识码
+    private RwztDTO Rwzt = new RwztDTO();
+    //shp入库的方法标识码
+    private String shpPyFun = "shp2sde";
+    //esrijson入库的方法标识码
+    private String esrijsonPyFun = "esriJson2sde";
+    @Autowired
+    private HgxfxScxMapper hgxfxScxMapper;
+    @Autowired
+    private HgxfxHgscxMapper hgxfxHgscxMapper;
+    @Autowired
+    private HgxfxMapper hgxfxMapper;
+    @Autowired
+    private FzxzMapper fzxzMapper;
+    @Autowired
+    private FzxzXzyzMapper fzxzXzyzMapper;
+    @Autowired
+    private FzxzJgGISMapper fzxzJgGISMapper;
+    @Autowired
+    private FzxzJgyzMapper fzxzJgyzMapper;
+    @Autowired
+    FzxzSchedule fzxzSchedule;
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public RequestResult AddHgxfx(HgxfxEntityDTO hgxfxEntityDTO) throws IOException {
+        HgxfxDTO requestHgxfxDTO = DozerUtils.map(hgxfxEntityDTO, HgxfxDTO.class);
+        requestHgxfxDTO.setFxmj(hgxfxEntityDTO.getXzmj());
+        requestHgxfxDTO.setRwly("Web");
+        requestHgxfxDTO.setRwzt(0);
+        requestHgxfxDTO.setCjsj(new Date());
+        requestHgxfxDTO.setBsm(StringUtils.getUUID());
+        requestHgxfxDTO.setCjyh(SecurityUtils.getUsername());
+        //将分析范围矢量数据插入到KJGH.T_FZSS_FXRW_GIS
+        RequestResult info = vector2Sde(hgxfxEntityDTO, requestHgxfxDTO);
+        if (info != null) {
+            return info;
+        }
+        //查询审查项 默认把控制线级别等于0的也添加进去
+        QueryWrapper<HgxfxScxDTO> wrapper = new QueryWrapper<HgxfxScxDTO>();
+        wrapper.eq("kzxjb", 0).or().in("bsm", hgxfxEntityDTO.getScxs().split(",")).orderByAsc("xssx");
+        List<HgxfxScxDTO> res = hgxfxScxMapper.selectList(wrapper);
+        if (res.size() > 0) {
+            //插入审查项列表
+            for (HgxfxScxDTO cur : res) {
+                HgxfxHgscxDTO scx = new HgxfxHgscxDTO();
+                scx.setBsm(StringUtils.getUUID());
+                scx.setRwbsm(requestHgxfxDTO.getBsm());
+                scx.setScxbsm(cur.getBsm());
+                scx.setYsmc(cur.getYsmc());
+                hgxfxHgscxMapper.insert(scx);
+            }
+        }
+        //插入合规性检查表 并返回任务标识码
+        hgxfxMapper.insert(requestHgxfxDTO);
+        return RequestResult.success("保存成功!", requestHgxfxDTO.getBsm());
+    }
+
+    /**
+     * 新建辅助选址任务
+     *
+     * @param params
+     * @return
+     * @throws IOException
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public RequestResult AddFzxz(Map params) {
+        try {
+            //辅助选址
+            FzxzDTO fzxzDTO = DozerUtils.map(params, FzxzDTO.class);
+            fzxzDTO.setBsm(StringUtils.getUUID());
+            fzxzDTO.setCjsj(new Date());
+            fzxzDTO.setYdxz_bsm(fzxzDTO.getYdxz_bsm().replaceAll("\\[","").replaceAll("\\]",""));
+            //将分析范围矢量数据插入到KJGH.T_FZSS_FXRW_GIS
+            RequestResult info = fzxzvector2Sde(fzxzDTO, null);
+            if (info != null) {
+                return info;
+            }
+            //选址因子
+            ArrayList xzyx = (ArrayList) params.get("yxyz");
+            for (int i = 0; i < xzyx.size(); i++) {
+                FzxzXzyzDTO dto = DozerUtils.map(xzyx.get(i), FzxzXzyzDTO.class);
+                dto.setBsm(StringUtils.getUUID());
+                dto.setRwbsm(fzxzDTO.getBsm());
+                fzxzXzyzMapper.insert(dto);
+            }
+            fzxzDTO.setRwzt(Rwzt.getCreate());
+            fzxzDTO.setCjyh(SecurityUtils.getUsername());
+            fzxzMapper.insert(fzxzDTO);
+            return RequestResult.success("保存成功!", fzxzDTO.getBsm());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return RequestResult.success("保存失败!", 0);
+        }
+    }
+
+    @Override
+    public RequestResult GetXzjg(String bsm) {
+        if (StringUtils.isEmpty(bsm)) {
+            return RequestResult.error("标识码参数未传递!", null);
+        }
+        //查询辅助选址基本信息
+        QueryWrapper<FzxzDTO> fzxzwrapper = new QueryWrapper<FzxzDTO>();
+        fzxzwrapper.eq("bsm", bsm);
+        FzxzDTO fzxzinfo = fzxzMapper.selectOne(fzxzwrapper);
+        if (fzxzinfo == null) {
+            return RequestResult.error("辅助选址记录查为未空!", null);
+        }
+        FzxzResultDTO result = DozerUtils.map(fzxzinfo, FzxzResultDTO.class);
+        //查询分析结果图斑信息
+        QueryWrapper<FzxzJgGisDTO> giswrapper = new QueryWrapper<FzxzJgGisDTO>();
+        giswrapper.eq("rwbsm", result.getBsm());
+        List<FzxzJgGisDTO> gisinfo = fzxzJgGISMapper.selectList(giswrapper);
+        if (gisinfo.size() > 0) {
+            for (FzxzJgGisDTO gisDto : gisinfo) {
+                //查询分析因子结果信息
+                QueryWrapper<FzxzJgyzDTO> jgyzwrapper = new QueryWrapper<FzxzJgyzDTO>();
+                jgyzwrapper.eq("jbbsm", gisDto.getBsm()).eq("yztj", "F");
+                List<FzxzJgyzDTO> jgyzinfo = fzxzJgyzMapper.selectList(jgyzwrapper);
+                gisDto.setFxyzjg(jgyzinfo);
+            }
+        }
+        result.setItems(gisinfo);
+        return RequestResult.success("查询成功!", result);
+    }
+
+    @Override
+    public RequestResult saveWordFile(String bsm, ArrayList xzbsm) {
+        FzxzReport fzxzReport = fzxzSchedule.createReport(bsm, xzbsm);
+        return RequestResult.success(fzxzReport);
+    }
+}

+ 56 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/ToolServiceImpl.java

@@ -0,0 +1,56 @@
+package com.onemap.analyse.service.impl;
+
+import com.onemap.analyse.service.IToolService;
+import com.onemap.analyse.task.PythonExecute;
+import com.onemap.analyse.utils.FileUtils;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.WebResult;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Paths;
+
+
+@Service
+public class ToolServiceImpl implements IToolService {
+
+    @Value("${Hgxfx.temp}")
+    private String temp;
+
+
+    @Override
+    public WebResult jsonToShp(String esrijson) {
+        if(StringUtils.isEmpty(esrijson)){
+            return WebResult.error("esrijson参数未传递!");
+        }
+        //将esrijson文件保存到本地
+        long timeMillis = System.currentTimeMillis();
+        String targetfolder = temp + "\\" + timeMillis + "\\";
+        String jsonpath = targetfolder + "esrijson.json";
+        String shppath = targetfolder + "shape.shp";
+        try {
+            FileUtils.makedir(targetfolder);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        //写入文件
+        FileOutputStream fos = null;
+        try {
+            fos = new FileOutputStream(jsonpath, true);
+            //true表示在文件末尾追加
+            fos.write(esrijson.toString().getBytes());
+            fos.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        //调用Python执行esrijson转shp
+        String msg = PythonExecute.EsriJson2shp(jsonpath, shppath);
+        if (!StringUtils.isEmpty(msg) && msg.contains("OK")) {
+            return WebResult.success("转换成功!", shppath);
+        } else {
+            return WebResult.error("转换失败!");
+        }
+    }
+}

+ 172 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ChscSchedule.java

@@ -0,0 +1,172 @@
+package com.onemap.analyse.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.utils.DozerUtils;
+import com.onemap.analyse.utils.NpoiHelper;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.RequestResult;
+import com.onemap.common.security.utils.SecurityUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.poi.xwpf.usermodel.*;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.math.BigInteger;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import static com.onemap.analyse.utils.Fxfw2SdeUtils.fzxzvector2Sde;
+
+/**
+ * 策划生成模块定时刷新任务
+ */
+@Component
+public class ChscSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //任务状态标识码
+    private RwztDTO Rwzt = new RwztDTO();
+    private XzlbDTO xzlbDTO = new XzlbDTO();
+    private FxfwDictDTO fxfwDictDTO = new FxfwDictDTO();
+    @Resource
+    private HgxfxMapper hgxfxMapper;
+    @Resource
+    HgxfxHgscxMapper hgxfxHgscxMapper;
+    @Resource
+    HgxfxScxMapper hgxfxScxMapper;
+    @Resource
+    private FxrwrzMapper fxrwrzMapper;
+    @Resource
+    private FzssChscMapper fzssChscMapper;
+    @Resource
+    private FzssChscFileMapper fzssChscFileMapper;
+    @Resource
+    private HgxfxTemplateMapper hgxfxTemplateMapper;
+    //合规性分析python方法名标识
+    @Value("${Hgxfx.functionId}")
+    private String functionId;
+    @Value("${Hgxfx.temp}")
+    private String temp;
+    private static final Logger log = LoggerFactory.getLogger(ChscSchedule.class);
+
+    @Async("taskExecutor")
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void ChscStatus() {
+        try {
+            QueryWrapper<FzxzChscDTO> wrapper = new QueryWrapper<FzxzChscDTO>();
+            wrapper.eq("rwzt", Rwzt.getNoJX());
+            //以创建时间正序排列
+            wrapper.orderByAsc("cjsj");
+            //每次只操作一条记录
+            List<FzxzChscDTO> ress = fzssChscMapper.selectList(wrapper);
+            if (ress.size() > 0) {
+                FzxzChscDTO zhxzChsc = ress.get(0);
+                //更新策划生成任务状态
+                QueryWrapper<FzxzChscDTO> chscwrapper = new QueryWrapper<FzxzChscDTO>();
+                chscwrapper.eq("bsm", zhxzChsc.getBsm());
+                zhxzChsc.setRwjd(1);
+                zhxzChsc.setRwzt(Rwzt.getCreate());
+                fzssChscMapper.update(zhxzChsc, chscwrapper);
+                //获取分析范围
+                String curfxfw = "";
+                if (zhxzChsc.getFwlx() == fxfwDictDTO.getShp()) {
+                    FzssChscFileDTO fileDto = fzssChscFileMapper.selectOne(new QueryWrapper<FzssChscFileDTO>().eq("bsm", zhxzChsc.getXzfw()));
+                    curfxfw = fileDto.getWj();
+                }
+                //插入任务日志
+                FxrwrzDTO rzDto = new FxrwrzDTO();
+                rzDto.setRwbsm(zhxzChsc.getBsm());
+                rzDto.setRwlx("策划生成");
+                rzDto.setRzlr("项目策划生成解析");
+                rzDto.setRzlx("info");
+                rzDto.setRzsj(new Date());
+                fxrwrzMapper.insert(rzDto);
+                //根据选址类别区分进行任务分配执行
+                String rwlx = "辅助选址";
+                if (zhxzChsc.getXzlb() == xzlbDTO.getXmxz()) {//项目选址
+                    //TODO 后续对接智慧选址
+                    System.out.println("XZLB暂不支持" + zhxzChsc.getXzlb());
+                    return;
+                } else if (zhxzChsc.getXzlb() == xzlbDTO.getHgxfx()) {
+                    rwlx = "合规性分析";
+                    //插入合规性分析主表
+                    HgxfxDTO fzssHgxfx = DozerUtils.map(zhxzChsc, HgxfxDTO.class);
+                    fzssHgxfx.setCjyh(SecurityUtils.getUsername());
+                    fzssHgxfx.setFxmj(zhxzChsc.getNydmj());
+                    fzssHgxfx.setJsdw(zhxzChsc.getSbdw());
+                    fzssHgxfx.setRwly("OpenAPI");
+                    fzssHgxfx.setBsm(zhxzChsc.getBsm());
+                    fzssHgxfx.setRwzt(Rwzt.getCreate());
+                    //TODO 确认下是否需要任务进度字段
+                    //fzssHgxfx.setRwjd(0);
+                    hgxfxMapper.insert(fzssHgxfx);
+                    //插入合规性分析分析因子表
+                    //默认把基础分析写入到分析因子里面
+                    QueryWrapper<HgxfxScxDTO> basefxyzwrapper = new QueryWrapper<HgxfxScxDTO>();
+                    basefxyzwrapper.eq("kzxjb", 0);
+                    List<HgxfxScxDTO> basefxyz = hgxfxScxMapper.selectList(basefxyzwrapper);
+                    //查询看是否已配置分析因子模板,如果没有全部查询插入分析因子表
+                    HgxfxTemplateDTO template = hgxfxTemplateMapper.selectOne(new QueryWrapper<HgxfxTemplateDTO>().eq("mbmc", zhxzChsc.getYwlx()));
+                    if (template != null) {
+                        QueryWrapper<HgxfxScxDTO> fxyzwrapper = new QueryWrapper<HgxfxScxDTO>();
+                        fxyzwrapper.in("bsm", template.getFxyz().split(",")).orderByAsc("xssx");
+                        List<HgxfxScxDTO> res = hgxfxScxMapper.selectList(fxyzwrapper);
+                        if (res.size() > 0) {
+                            basefxyz.addAll(res);
+                        }
+                    } else {
+                        //查询审查项 默认把控制线级别等于0的也添加进去
+//                        QueryWrapper<HgxfxScxDTO> fxyzwrapper = new QueryWrapper<HgxfxScxDTO>();
+//                        fxyzwrapper.gt("kzxjb", 0).eq("status",1);
+//                        List<HgxfxScxDTO> res = hgxfxScxMapper.selectList(fxyzwrapper);
+//                        if (res.size() > 0) {
+//                            basefxyz.addAll(res);
+//                        }
+                    }
+                    for (HgxfxScxDTO cur : basefxyz) {
+                        HgxfxHgscxDTO scx = new HgxfxHgscxDTO();
+                        scx.setBsm(StringUtils.getUUID());
+                        scx.setRwbsm(zhxzChsc.getBsm());
+                        scx.setScxbsm(cur.getBsm());
+                        scx.setYsmc(cur.getYsmc());
+                        hgxfxHgscxMapper.insert(scx);
+                    }
+                    //TODO 入储备库
+//                    FzssZhxzCbk cbk = zhxzChsc.MapTo<FzssZhxzCbk>();
+//                    cbk.BSM = zhxzChsc.BSM;
+//                    var listFields = EsriClassField.ToFields<FzssZhxzCbk>(cbk);
+//                    PyUtils.Shp2Sde(shpfile, "KJGH.T_FZSS_ZHXZ_CBK", listFields);
+                }
+                FzxzDTO fzxzDTO = new FzxzDTO();
+                fzxzDTO.setBsm(zhxzChsc.getBsm());
+                fzxzDTO.setFwlx(zhxzChsc.getFwlx());
+                fzxzDTO.setXzfw(curfxfw);
+                RequestResult info = fzxzvector2Sde(fzxzDTO, rwlx);
+                if (info != null) {
+                    System.out.println("策划生成分析范围数据入库失败");
+                } else {
+                    System.out.println("策划生成分析模块:" + zhxzChsc.getBsm() + "完成!!!!!!!! " + new Date().toString());
+                }
+                //进度更新
+                zhxzChsc.setRwzt(Rwzt.getCreate());
+                zhxzChsc.setRwjd(3);
+                fzssChscMapper.update(zhxzChsc, chscwrapper);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 103 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/CtfxSchedule.java

@@ -0,0 +1,103 @@
+package com.onemap.analyse.task;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.utils.FixedThreadUtil;
+import com.onemap.common.core.utils.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+
+/**
+ * 冲突分析模块定时刷新任务
+ */
+@Component
+public class CtfxSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //任务状态标识码
+    private RwztDTO Rwzt = new RwztDTO();
+    @Resource
+    private CtfxMapper ctfxMapper;
+    //冲突分析python方法名标识
+    @Value("${Fxpj.Ctfx.functionId}")
+    private String functionId;
+    //冲突分析python方法名标识
+    @Value("${Fxpj.Xmydsyx.functionId}")
+    private String xmydsyxFunctionId;
+    private static final Logger log = LoggerFactory.getLogger(CtfxSchedule.class);
+
+    @Async("taskExecutor")
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void CtfxStatus() {
+        try {
+            QueryWrapper<TCtfxMainDTO> wrapper = new QueryWrapper<>();
+            wrapper.eq("rwzt", Rwzt.getCreate());
+            //以创建时间正序排列
+            wrapper.orderByAsc("cjsj");
+            //每次只操作一条记录
+            List<TCtfxMainDTO> ress = ctfxMapper.selectList(wrapper);
+            if (ress.size() > 0) {
+                TCtfxMainDTO ctfxMainDTO = ress.get(0);
+                String id = ctfxMainDTO.getId();
+                ctfxMainDTO.setRwzt("1");
+                ctfxMainDTO.setRwkssj(new Date());
+                QueryWrapper<TCtfxMainDTO> update = new QueryWrapper<>();
+                update.eq("id", id);
+                ctfxMapper.update(ctfxMainDTO, update);
+                FixedThreadUtil.FIXED_THREAD_POOL.execute(() -> {
+                    String result = "";
+                    if ("5".equals(ctfxMainDTO.getSsmk())) {//土地开发利用强度分析
+                        try {
+                            String xzqdm = ctfxMainDTO.getXzqdm();
+                            List<TCtfxTdkfqdDTO> data = ctfxMapper.Tdkfqd("SDE." + ctfxMainDTO.getFxtable(), xzqdm, xzqdm.length(), StringUtils.subxzqdmlevel(xzqdm));
+                            List<TCtfxTdkfqdDTO> results = new ArrayList<>();
+                            String msg = "";
+                            for (TCtfxTdkfqdDTO u : data) {
+                                String curxzqdm = u.getXzqdm();
+                                if (curxzqdm.equals(xzqdm)) {
+                                    msg = u.getXzqmc() + "建设用地约有" + u.getTbmj() + "平方千米,土地开发利用强度为" + u.getProportion() + "%," + (u.getProportion() > 30 ? "已达到" : "尚未达到") + "警戒线。";
+                                } else {
+                                    results.add(u);
+                                }
+                            }
+                            ctfxMainDTO.setFxjg(msg);
+                            ctfxMainDTO.setStatist(JSON.toJSONString(results));
+                            ctfxMainDTO.setRwzt("2");
+                            ctfxMainDTO.setRwjssj(new Date());
+                            ctfxMapper.update(ctfxMainDTO, update);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            ctfxMainDTO.setFxjg(e.getMessage());
+                            ctfxMainDTO.setRwzt("3");
+                            ctfxMainDTO.setRwjssj(new Date());
+                            ctfxMapper.update(ctfxMainDTO, update);
+                        }
+                    } else if ("6".equals(ctfxMainDTO.getSsmk())) {//项目用地适宜性分析
+                        //执行python
+                        Map<String, String> params = new HashMap<>();
+                        params.put("bsm", id);
+                        result = PythonExecute.Run(xmydsyxFunctionId, params);
+                    } else {
+                        //执行python
+                        Map<String, String> params = new HashMap<>();
+                        params.put("bsm", id);
+                        result = PythonExecute.Run(functionId, params);
+                    }
+                    System.out.println("冲突分析:BSM:" + ctfxMainDTO.getId() + ",结果:" + result);
+                });
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 126 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/FtpSchedule.java

@@ -0,0 +1,126 @@
+package com.onemap.analyse.task;
+
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.utils.CalculateShpArea;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.utils.UnPackageUtils;
+import com.onemap.common.core.web.domain.RequestResult;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.util.Date;
+
+/**
+ * 策划生成模块ftp文件夹定时刷新任务
+ */
+@Component
+public class FtpSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //任务状态标识码
+
+    private RwztDTO rwztDTO = new RwztDTO();
+    private XzlbDTO xzlbDTO = new XzlbDTO();
+    private FxfwDictDTO fxfwDictDTO = new FxfwDictDTO();
+    @Resource
+    private HgxfxMapper hgxfxMapper;
+    @Resource
+    HgxfxHgscxMapper hgxfxHgscxMapper;
+    @Resource
+    HgxfxScxMapper hgxfxScxMapper;
+    @Resource
+    private FxrwrzMapper fxrwrzMapper;
+    @Resource
+    private FzssChscMapper fzssChscMapper;
+    @Resource
+    private FzssChscFileMapper fzssChscFileMapper;
+    @Resource
+    private HgxfxTemplateMapper hgxfxTemplateMapper;
+    @Value("${Hgxfx.ftpIn}")
+    private String ftpIn;
+    @Value("${Hgxfx.ftpOut}")
+    private String ftpOut;
+
+    @Async("taskExecutor")
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void FtpStatus() {
+        try {
+            //TODO 扫描未解压文件,进行数据加压
+            File ftpdirectory = new File(ftpIn);
+            if (!ftpdirectory.isDirectory()) {
+                System.out.println("ftp文件夹配置怎么不是文件夹啊!!!!");
+                return;
+            }
+            File[] filelist = ftpdirectory.listFiles();
+            String unzippath = "";
+            for (int i = 0; i < filelist.length; i++) {
+                File cur = filelist[i];
+                if(cur.isDirectory()){
+                    continue;
+                }
+                //获得文件名称
+                String fileName = cur.getName();
+                String fileRelName = fileName.substring(0, fileName.lastIndexOf("."));
+                String type = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+                if (type.contains("zip") || type.contains("rar")) {
+                    unzippath = ftpIn + "/" + fileRelName;
+                    File dest = new File(unzippath);
+                    //判断文件夹是否存在,存在则跳过,说明已经
+                    if (dest.exists()) {
+                        continue;
+                    }
+                    //解压zip格式
+                    if (type.equals("zip")) {
+                        new UnPackageUtils().unPackZip(cur, unzippath);
+                    } else {
+                        //解压rar格式
+                        new UnPackageUtils().unPackRar(cur, unzippath);
+                    }
+                    String shpPath = "";
+                    File[] files = new File(unzippath).listFiles();
+                    for (File file1 : files) {
+                        if (file1.getAbsolutePath().substring(file1.getAbsolutePath().lastIndexOf(".") + 1).equals("shp")) {
+                            shpPath = file1.getAbsolutePath();
+                            break;
+                        }
+                    }
+                    if (!"".equals(shpPath)) {
+                        //计算shape面积
+                        double mj = CalculateShpArea.getShpArea(shpPath);
+                        String fileid = StringUtils.getUUID();
+                        //TODO 插入到T_FZSS_ZHXZ_FILE数据库表
+                        FzssChscFileDTO fileDTO = new FzssChscFileDTO();
+                        fileDTO.setBsm(fileid);
+                        fileDTO.setWj(shpPath);
+                        fileDTO.setYswj(cur.getAbsolutePath());
+                        fzssChscFileMapper.insert(fileDTO);
+                        //TODO 插入到T_FZSS_ZHXZ_CHSC数据库表
+                        FzxzChscDTO chscDto = new FzxzChscDTO();
+                        chscDto.setXzlb(1);//选址类别(0意向范围筛选,1指定空间位置)
+                        chscDto.setXzfw(fileid);//范围
+                        chscDto.setFwlx(2);//范围类型(0行政区 1绘制  2SHP文件)*当选址类别为1时,范围类型只能是2
+                        chscDto.setXmbm(fileRelName);//项目编码(工改系统)
+                        chscDto.setXmmc(fileRelName);//项目名称
+                        chscDto.setXmdm(fileRelName); //项目代码(建设项目审批管理系统)
+                        chscDto.setYwlx("划拨类");//划拨类/出让类
+                        String uuid = StringUtils.getUUID();
+                        chscDto.setBsm(uuid);
+                        chscDto.setNydmj(mj);
+                        chscDto.setRwzt(rwztDTO.getNoJX());
+                        chscDto.setCjsj(new Date());
+                        fzssChscMapper.insert(chscDto);
+                    } else {
+                        System.out.println("未检索到shp文件, 文件夹名称:" + unzippath);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 860 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/FzxzSchedule.java

@@ -0,0 +1,860 @@
+package com.onemap.analyse.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.google.common.base.Joiner;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.utils.NpoiHelper;
+import com.onemap.analyse.utils.NumberUtil;
+import com.onemap.common.core.utils.StringUtils;
+import net.lingala.zip4j.core.ZipFile;
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.model.ZipParameters;
+import net.lingala.zip4j.util.Zip4jConstants;
+import org.apache.commons.io.FileUtils;
+import org.apache.poi.xwpf.usermodel.*;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.io.*;
+import java.math.BigInteger;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 辅助选址模块定时刷新任务
+ */
+@Component
+public class FzxzSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //任务状态标识码
+    private RwztDTO Rwzt = new RwztDTO();
+    @Resource
+    private FzxzMapper fzxzMapper;
+    @Resource
+    private FxrwrzMapper fxrwrzMapper;
+    @Resource
+    private FzxzJgGISMapper fzxzJgGISMapper;
+    @Resource
+    private FzxzXzyzMapper fzxzXzyzMapper;
+    @Resource
+    private FzxzTbMapper fzxzTbMapper;
+    @Resource
+    private FzxzJgyzMapper fzxzJgyzMapper;
+    //辅助选址python方法名标识
+    @Value("${Fzxz.functionId}")
+    private String functionId;
+    @Value("${Fzxz.mapFunctionId}")
+    private String mapFunctionId;
+    @Value("${Fzxz.fzxzShp}")
+    private String fzxzShp;
+    @Value("${Hgxfx.temp}")
+    private String temp;
+    /**
+     * Scheduled 定时器参数
+     * cron表达式:指定任务在特定时间执行
+     * fixedDelay:表示上一次任务执行完成后多久再执行,参数类型long,单位:ms
+     * fixedDelayString:与fixedDelay一样,只是参数类型是String
+     * fixedRate:表示按一定的频率执行任务,参数类型long,单位:ms 如: fixedRate(5000),表示这个定时器任务每5秒执行一次
+     * fixedRateString:与fixedRate一样,只是参数类型变为String
+     * initialDelay:表示延迟多久再第一次执行任务,参数类型为long ,单位:ms
+     * initialDelayString:与initialDelay一样,只是参数类型String
+     */
+    /**
+     * @Async("name") 开启多线程
+     */
+    /**
+     * 辅助选址执行入口
+     */
+    @Async("taskExecutor")
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void FzxzStatus() {
+        try {
+            QueryWrapper<FzxzDTO> wrapper = new QueryWrapper<FzxzDTO>();
+            wrapper.eq("rwzt", Rwzt.getCreate());
+            //以创建时间正序排列
+            wrapper.orderByAsc("cjsj");
+            //每次只操作一条记录
+            List<FzxzDTO> ress = fzxzMapper.selectList(wrapper);
+            if (ress.size() > 0) {
+                FzxzDTO res = ress.get(0);
+                //插入执行状态
+                res.setRwzt(Rwzt.getRun());
+                res.setRwkssj(new Date());
+                QueryWrapper<FzxzDTO> query = new QueryWrapper<FzxzDTO>();
+                query.eq("bsm", res.getBsm());
+                fzxzMapper.update(res, query);
+                //插入任务日志
+                FxrwrzDTO rzDto = new FxrwrzDTO();
+                rzDto.setRwbsm(res.getBsm());
+                rzDto.setRwlx("辅助选址");
+                rzDto.setRzlr("开始分析");
+                rzDto.setRzlx("info");
+                rzDto.setRzsj(new Date());
+                fxrwrzMapper.insert(rzDto);
+                //执行python
+                Map<String, String> params = new HashMap<>();
+                params.put("bsm", res.getBsm());
+                String result = PythonExecute.Run(functionId, params);
+                if (!StringUtils.isEmpty(result) && result.contains("OK")) {//成功
+                    res.setRwjssj(new Date());
+                    res.setRwzt(Rwzt.getComplete());
+                    //TODO 生成辅助选址结果报告 返回 FxReport实体
+                    FzxzReport report = createReport(res.getBsm(), null);
+                    if (report != null) {
+                        res.setFxbg(report.getReportfile().replace(".docx", ".pdf"));
+                        res.setZip(report.getZipfile());
+                    }
+                    fzxzMapper.update(res, query);
+                    //插入成功日志
+                    FxrwrzDTO successDto = new FxrwrzDTO();
+                    successDto.setRwbsm(res.getBsm());
+                    successDto.setRwlx("辅助选址");
+                    successDto.setRzlr("计算完成");
+                    successDto.setRzlx("info");
+                    successDto.setRzsj(new Date());
+                    fxrwrzMapper.insert(successDto);
+                } else {//失败
+                    res.setRwjssj(new Date());
+                    res.setRwzt(Rwzt.getError());
+                    fzxzMapper.update(res, query);
+                    //插入任务日志
+                    FxrwrzDTO errorDto = new FxrwrzDTO();
+                    errorDto.setRwbsm(res.getBsm());
+                    errorDto.setRwlx("辅助选址");
+                    errorDto.setRzlr("计算错误");
+                    errorDto.setRzsj(new Date());
+                    errorDto.setRzlx("error");
+                    errorDto.setFxjg(result);
+                    fxrwrzMapper.insert(errorDto);
+                }
+                System.out.println("辅助选址模块:" + res.getBsm() + "完成!!!!!!!! " + new Date().toString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    //根据选址任务生成报告
+    public FzxzReport createReport(String bsm, List<String> xzbsmList) {
+        //插入开始生成报告日志
+        FxrwrzDTO successDto = new FxrwrzDTO();
+        successDto.setRwbsm(bsm);
+        successDto.setRwlx("辅助选址");
+        successDto.setRzlr("开始生成选址报告");
+        successDto.setRzlx("info");
+        successDto.setRzsj(new Date());
+        fxrwrzMapper.insert(successDto);
+        FzxzEntityDTO res = fzxzMapper.GetFzxzByBsm(bsm);
+        FzxzReport fzxzReport = new FzxzReport();
+        if (res != null) {
+            //文件硬盘真实路径
+            String timeStamp = new Date().getTime() + "";
+            String rootPath = temp + File.separator + "辅助选址报告" + File.separator + res.getBsm();
+            File f = new File(rootPath);
+            if (!f.exists()) {
+                f.mkdirs();
+            }
+            String reportPath = res.getXmmc() + "(选址报告)_" + timeStamp + ".docx";
+            String simplePath = res.getXmmc() + "(选址简报)_" + timeStamp + ".docx";
+            String zipPath = res.getXmmc() + "_" + timeStamp + ".zip";
+            //选址报告
+            createReport(res, rootPath + File.separator + reportPath, xzbsmList);
+            //选址简报
+            createSimpleReport(res, rootPath + File.separator + simplePath, xzbsmList);
+            //zip打包
+            createZipReport(res, rootPath + File.separator + zipPath
+                    , rootPath + File.separator + reportPath
+                    , rootPath + File.separator + simplePath);
+            //生成返回结果
+            fzxzReport.setRootPath(StringUtils.getFileStaticPath(rootPath));
+            fzxzReport.setReportfile(StringUtils.getFileStaticPath(rootPath + File.separator + reportPath));
+            fzxzReport.setSimplefile(StringUtils.getFileStaticPath(rootPath + File.separator + simplePath));
+            fzxzReport.setZipfile(StringUtils.getFileStaticPath(rootPath + File.separator + zipPath));
+            fzxzReport.setBsm(bsm);
+            fzxzReport.setFxbg(fzxzReport.getReportfile());
+            fzxzReport.setJsdw(res.getJsdw());
+            fzxzReport.setXmmc(res.getXmmc());
+            //查询分析结果图斑信息
+            QueryWrapper<FzxzJgGisDTO> giswrapper = new QueryWrapper<FzxzJgGisDTO>();
+            giswrapper.eq("rwbsm", res.getBsm());
+            List<FzxzJgGisDTO> gisinfo = fzxzJgGISMapper.selectList(giswrapper);
+            fzxzReport.setItems(gisinfo);
+        }
+        //插入开始生成报告日志
+        FxrwrzDTO successDto2 = new FxrwrzDTO();
+        successDto2.setRwbsm(bsm);
+        successDto2.setRwlx("辅助选址");
+        successDto2.setRzlr("选址报告生成结束");
+        successDto2.setRzlx("info");
+        successDto2.setRzsj(new Date());
+        fxrwrzMapper.insert(successDto2);
+        return fzxzReport;
+    }
+
+
+    /**
+     * 选址报告
+     */
+
+    private void createReport(FzxzEntityDTO res, String reportPath, List<String> xzbsmList) {
+        List<String> imgList = ReportImg(res, xzbsmList);
+        //创建document文档对象对象实例
+        XWPFDocument document = null;
+        OutputStream outputStream = null;//把doc输出到输出流
+        try {
+            document = new XWPFDocument();
+            int pos = 0;
+            //文本标题
+            NpoiHelper.title(document, res.getXmmc() + "选址报告", pos++);
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+            NpoiHelper.Option optionCENTER = new NpoiHelper.Option();
+            optionCENTER.setAlign(ParagraphAlignment.CENTER);
+            document.setParagraph(NpoiHelper.newParagraph(document, sdf.format(new Date()), optionCENTER), pos++);
+            NpoiHelper.catalog(document, "一、项目选址信息", pos++);
+            String ydmj = res.getYdmjbegin() + " - " + res.getYdmjend();
+            if (StringUtils.isEmpty(res.getYdmjbegin()) || Double.parseDouble(res.getYdmjbegin()) == 0)
+                ydmj = "≤" + res.getYdmjend();
+            else if (StringUtils.isEmpty(res.getYdmjend()) || Double.parseDouble(res.getYdmjend()) == 0)
+                ydmj = "≥" + res.getYdmjbegin();
+            List<String> listTemp = new ArrayList<String>();
+            listTemp.add("\t项目名称:" + res.getXmmc());
+            listTemp.add("\t建设单位:" + res.getJsdw());
+            listTemp.add("\t用地面积:" + ydmj + "平方米");
+            listTemp.add("\t用地性质:" + res.getYdmc());
+            listTemp.add("\t影响因子:");
+            NpoiHelper.content(document, listTemp, pos++);
+            List tabYzTitles = new ArrayList<NpoiHelper.TableTitle>();
+            NpoiHelper.TableTitle tableTitle = new NpoiHelper.TableTitle();
+            tableTitle.setKey("YXYZMC");
+            tableTitle.setName("因子名称");
+            tableTitle.setWidth(2880);
+            tabYzTitles.add(tableTitle);
+            tableTitle = new NpoiHelper.TableTitle();
+            tableTitle.setKey("YZTJ_TEXT");
+            tableTitle.setName("影响条件");
+            tableTitle.setAlign(ParagraphAlignment.CENTER);
+            tableTitle.setWidth(2880);
+            tabYzTitles.add(tableTitle);
+            tableTitle = new NpoiHelper.TableTitle();
+            tableTitle.setKey("YXZ");
+            tableTitle.setName("约束范围值(M)");
+            tableTitle.setAlign(ParagraphAlignment.CENTER);
+            tableTitle.setWidth(2880);
+            tabYzTitles.add(tableTitle);
+            //查询选址因子,并且转换为List<Map> 因子条件(包含:C、不包含:N、分析:A)
+            QueryWrapper<FzxzXzyzDTO> wrapper = new QueryWrapper<FzxzXzyzDTO>();
+            wrapper.eq("rwbsm", res.getBsm());
+            List<FzxzXzyzDTO> fzxzXzyzDTOList = fzxzXzyzMapper.selectList(wrapper);
+            List<Map<String, Object>> dataTablelist = new ArrayList<>();
+            for (int i = 0; i < fzxzXzyzDTOList.size(); i++) {
+                Map<String, Object> map = new HashMap<>();
+                FzxzXzyzDTO fzxzXzyzDTO = fzxzXzyzDTOList.get(i);
+                map.put("YXYZMC", fzxzXzyzDTO.getYxyzmc());
+                String yztj = "";
+                if (fzxzXzyzDTO.getYztj() != null) {
+                    if ("C".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
+                        yztj = "包含";
+                    }
+                    if ("N".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
+                        yztj = "不包含";
+                    }
+                    if ("A".equals(fzxzXzyzDTO.getYztj().toUpperCase()) || "F".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
+                        yztj = "分析";
+                    }
+                }
+
+                map.put("YZTJ_TEXT", yztj);
+                String yxz = "";
+                if (StringUtils.isNotEmpty(fzxzXzyzDTO.getYxz())) {
+                    yxz = fzxzXzyzDTO.getYxz();
+                }
+                map.put("YXZ", yxz);
+                dataTablelist.add(map);
+            }
+            XWPFTable tableYz = NpoiHelper.setComTable(document, tabYzTitles, dataTablelist, "表1:选址影响因子", pos++);
+            NpoiHelper.catalog(document, "二、选址范围分析", pos++);
+            //查询辅助选址分析图斑
+            QueryWrapper<FzxzTbEntityDTO> wrapperTb = new QueryWrapper<FzxzTbEntityDTO>();
+            wrapperTb.eq("rwbsm", res.getBsm());
+            wrapperTb.groupBy("objectid", "rwbsm", "ydyhfldm", "ydyhflmc", "frequency", "sum_mj");
+            List<FzxzTbEntityDTO> fzxzTbEntityDTOList = fzxzTbMapper.selectList(wrapperTb);
+            //计算面积总和
+            double sumcount = 0;
+            for (int i = 0; i < fzxzTbEntityDTOList.size(); i++) {
+                sumcount = sumcount + fzxzTbEntityDTOList.get(i).getSumMj();
+            }
+
+            List<FzxzTbEntityDTO> list = fzxzTbEntityDTOList.stream().sorted(
+                    Comparator.comparing(FzxzTbEntityDTO::getSumMj).reversed()
+            ).collect(Collectors.toList());
+            String fwfx = "\t根据指定选址分析得出,所选范围共" + Math.round(sumcount) + "平方米,其中";
+            List<Map<String, Object>> fztable = new ArrayList<>();
+            //生成地类分析统计表
+            for (int i = 0; i < list.size(); i++) {
+                FzxzTbEntityDTO item = list.get(i);
+                String zb = String.format("%.1f", item.getSumMj() / sumcount * 100);
+                if (i < 5) {
+                    //面积前五的占比地类计算
+                    fwfx += item.getYdyhflmc()
+                            + Math.round(item.getSumMj()) + "平方米,占比" + zb + "%;";
+                }
+                //List<FzxzTbEntityDTO>转List<Map<String, Object>> 地类编码	地类名称	面积(平方千米)	占比(%)
+                Map map = new HashMap();
+                map.put("ZB", zb);
+                map.put("YDYHFLDM", item.getYdyhfldm());
+                map.put("YDYHFLMC", item.getYdyhflmc());
+                map.put("SUM_MJ", Math.round(item.getSumMj()));
+                fztable.add(map);
+            }
+            fwfx = fwfx.substring(0, fwfx.length() - 1) + "。详情如下:";
+            NpoiHelper.content(document, fwfx, pos++);
+            //地类编码	地类名称	面积(平方千米)	占比(%)
+            List<NpoiHelper.TableTitle> tabYztbTitles = new ArrayList();
+            NpoiHelper.TableTitle tableTitleTb = new NpoiHelper.TableTitle();
+            tableTitleTb.setKey("YDYHFLDM");
+            tableTitleTb.setName("地类编码");
+            tableTitleTb.setAlign(ParagraphAlignment.CENTER);
+            tableTitleTb.setWidth(2010);
+            tabYztbTitles.add(tableTitleTb);
+            tableTitleTb = new NpoiHelper.TableTitle();
+            tableTitleTb.setKey("YDYHFLMC");
+            tableTitleTb.setName("地类名称");
+            tableTitleTb.setWidth(2910);
+            tabYztbTitles.add(tableTitleTb);
+            tableTitleTb = new NpoiHelper.TableTitle();
+            tableTitleTb.setKey("SUM_MJ");
+            tableTitleTb.setName("面积(平方千米)");
+            tableTitleTb.setAlign(ParagraphAlignment.CENTER);
+            tableTitleTb.setWidth(1870);
+            tabYztbTitles.add(tableTitleTb);
+            tableTitleTb = new NpoiHelper.TableTitle();
+            tableTitleTb.setKey("ZB");
+            tableTitleTb.setName("占比(%)");
+            tableTitleTb.setAlign(ParagraphAlignment.CENTER);
+            tableTitleTb.setWidth(1700);
+            tabYztbTitles.add(tableTitleTb);
+            XWPFTable tableYztb = NpoiHelper.setComTable(document, tabYztbTitles, fztable, "表2:地类分析统计表", pos++);
+            //查询结果GIS FzxzJgGisDTO
+            QueryWrapper<FzxzJgGisDTO> giswrapper = new QueryWrapper<FzxzJgGisDTO>();
+            giswrapper.eq("rwbsm", res.getBsm());
+            //筛选方案,根据传参或者预选方案
+//            giswrapper.ne("yxfa", "0");
+            if (xzbsmList != null) {
+                giswrapper.in("bsm", xzbsmList);
+            }
+            List<FzxzJgGisDTO> fzxzJgGisDTOList = fzxzJgGISMapper.selectList(giswrapper);
+            NpoiHelper.catalog(document, "三、选址分析", pos++);
+            String ydmc = res.getYdmc();
+            if(!StringUtils.isEmpty(ydmc)){
+                if (ydmc.lastIndexOf("用地") == ydmc.length() - 2) {
+                    ydmc = res.getYdmc().substring(0, ydmc.length() - 2);
+                }
+                NpoiHelper.content(document, "\t按照项目选址要求和影响因子,经对所选范围内的所有"
+                        + ydmc + "用地进行分析,筛选出符合要求的方案共" + fzxzJgGisDTOList.size() + "个。", pos++);
+            }else{
+                NpoiHelper.content(document, "\t按照项目选址要求和影响因子,经对所选范围内的所有用地进行分析,筛选出符合要求的方案共" + fzxzJgGisDTOList.size() + "个。", pos++);
+            }
+
+            int index = 1;
+            NpoiHelper.Option optionIsBold = new NpoiHelper.Option();
+            optionIsBold.setBold(true);
+            for (int i = 0; i < fzxzJgGisDTOList.size(); i++) {
+                FzxzJgGisDTO item = fzxzJgGisDTOList.get(i);
+                document.setParagraph(NpoiHelper.newParagraph(document, index + "、方案" + NumberUtil.int2chineseNum(index)
+                        , optionIsBold), pos++);
+                XWPFTable table = document.createTable(7, 4);
+                table.setWidth(9000);//总宽度
+                for (int k = 0; k < 4; k++) {
+                    XWPFTableCell cell = table.getRow(0).getCell(k);
+                    CTTcPr ctTcPr = cell.getCTTc().isSetTcPr() ? cell.getCTTc().getTcPr() : cell.getCTTc().addNewTcPr();
+                    CTTblWidth ctTblWidth = ctTcPr.addNewTcW();
+                    ctTblWidth.setW(BigInteger.valueOf(2250));
+                    ctTblWidth.setType(STTblWidth.DXA);
+                }
+                //Table 表格第一行
+                table.getRow(0).getCell(0).setColor("DBE5F1");
+                NpoiHelper.mergeHorizontal(table, 0, 0, 3);
+                table.getRow(0).getCell(0).setParagraph(NpoiHelper.setCellText(table, "符合用地情况", optionIsBold));
+                //Table 表格第二行
+                table.getRow(1).getCell(0).setParagraph(NpoiHelper.setCellText(table, "地类编码", optionIsBold));
+                table.getRow(1).getCell(1).setParagraph(NpoiHelper.setCellText(table, item.getDlbm(), null));
+                table.getRow(1).getCell(2).setParagraph(NpoiHelper.setCellText(table, "地类名称", optionIsBold));
+                table.getRow(1).getCell(3).setParagraph(NpoiHelper.setCellText(table, item.getDlmc(), null));
+                //Table 表格第三行
+                table.getRow(2).getCell(0).setParagraph(NpoiHelper.setCellText(table, "地块面积", optionIsBold));
+                table.getRow(2).getCell(1).setParagraph(NpoiHelper.setCellText(table, Math.round(item.getTbmj()) + "平方米", null));
+                table.getRow(2).getCell(2).setParagraph(NpoiHelper.setCellText(table, "土地位置", optionIsBold));
+                table.getRow(2).getCell(3).setParagraph(NpoiHelper.setCellText(table, item.getXzqmc(), null));
+                //Table 表格第四行
+                table.getRow(3).getCell(0).setColor("DBE5F1");
+                NpoiHelper.mergeHorizontal(table, 3, 0, 3);
+                table.getRow(3).getCell(0).setParagraph(NpoiHelper.setCellText(table, "地块位置信息", optionIsBold));
+                //Table 表格第五行 -专题图
+                NpoiHelper.mergeHorizontal(table, 4, 0, 1);
+                NpoiHelper.mergeHorizontal(table, 4, 2, 3);
+                String mapF = "";
+                String mapM = "";
+                if (imgList != null && imgList.size() > 0) {
+                    for (int j = 0; j < imgList.size(); j++) {
+                        String s = imgList.get(j);
+                        if (s.indexOf(item.getBsm() + "_F") >= 0) {
+                            mapF = s;//全局
+                        }
+                        if (s.indexOf(item.getBsm() + "_M") >= 0) {
+                            mapM = s;//局部
+                        }
+                    }
+                }
+                if (StringUtils.isNotEmpty(mapF)) {
+                    FileInputStream fis = null;
+                    try {
+                        fis = new FileInputStream(new File(mapF));
+                        XWPFParagraph paragraph = table.getRow(4).getCell(0).addParagraph();
+                        paragraph.setAlignment(ParagraphAlignment.CENTER);
+                        XWPFRun run = paragraph.createRun();
+                        run.addPicture(
+                                fis,    // 条形码图片的位置
+                                Document.PICTURE_TYPE_JPEG, // 图片类型
+                                item.getBsm() + "_F.jpeg", // 图片名称
+                                2200000, // 图片的长
+                                1700000 // 图片的宽
+                        );
+                        run.addBreak(BreakType.TEXT_WRAPPING);
+                        run.setText("(宏观位置)");
+                    } catch (Exception e) {
+                        System.out.println(e.toString());
+                    } finally {
+                        if (fis != null) {
+                            try {
+                                fis.close();
+                            } catch (IOException e) {
+                                throw e;
+                            }
+                        }
+                    }
+                }
+                if (StringUtils.isNotEmpty(mapM)) {
+                    FileInputStream fis = null;
+                    try {
+                        fis = new FileInputStream(new File(mapM));
+                        XWPFParagraph paragraph = table.getRow(4).getCell(2).addParagraph();
+                        paragraph.setAlignment(ParagraphAlignment.CENTER);
+                        XWPFRun run = paragraph.createRun();
+                        run.addPicture(
+                                fis,    // 条形码图片的位置
+                                Document.PICTURE_TYPE_JPEG, // 图片类型
+                                item.getBsm() + "_M.jpeg", // 图片名称
+                                2200000, // 图片的长
+                                1700000 // 图片的宽
+                        );
+                        run.addBreak(BreakType.TEXT_WRAPPING);
+                        run.setText("(具体位置)");
+                    } catch (Exception e) {
+                        System.out.println(e.toString());
+                        throw e;
+                    } finally {
+                        if (fis != null) {
+                            try {
+                                fis.close();
+                            } catch (IOException e) {
+                                throw e;
+                            }
+                        }
+                    }
+                }
+                //Table 表格第六行
+                table.getRow(5).getCell(0).setColor("DBE5F1");
+                NpoiHelper.mergeHorizontal(table, 5, 0, 3);
+                table.getRow(5).getCell(0).setParagraph(NpoiHelper.setCellText(table, "分析结论", optionIsBold));
+                //Table 表格第七行
+                NpoiHelper.mergeHorizontal(table, 6, 0, 3);
+                XWPFParagraph para6 = table.getRow(6).getCell(0).addParagraph();
+                para6.setAlignment(ParagraphAlignment.LEFT);
+
+                //查询辅助选址因子
+                QueryWrapper<FzxzJgyzDTO> jgyzWrapper = new QueryWrapper<FzxzJgyzDTO>();
+                jgyzWrapper.eq("jbbsm", item.getBsm());
+                jgyzWrapper.ne("yztj", "F");
+                List<FzxzJgyzDTO> jgyzList = fzxzJgyzMapper.selectList(jgyzWrapper);
+                int jgyzid = 1;
+                for (int j = 0; j < jgyzList.size(); j++) {
+                    FzxzJgyzDTO fzxzJgyzDTO = jgyzList.get(j);
+                    XWPFRun run = para6.createRun();
+                    run.setText(jgyzid + "、" + fzxzJgyzDTO.getFxjg());
+                    run.addBreak(BreakType.TEXT_WRAPPING);
+                    jgyzid++;
+                }
+                //查询辅助选址因子
+                jgyzWrapper = new QueryWrapper<FzxzJgyzDTO>();
+                jgyzWrapper.eq("jbbsm", item.getBsm());
+                jgyzWrapper.eq("yztj", "F");
+                jgyzList = fzxzJgyzMapper.selectList(jgyzWrapper);
+
+                for (int j = 0; j < jgyzList.size(); j++) {
+                    FzxzJgyzDTO jgyz = jgyzList.get(j);
+                    XWPFRun run = para6.createRun();
+                    String jg = jgyz.getFxjg();
+                    Double jgDouble = 0.0;
+                    try {
+                        jgDouble = Double.parseDouble(jg);
+                        run.setText(jgyzid + "、压占" + jgyz.getYxyzmc() + "面积" + jg + "平方米");
+                    } catch (Exception e) {
+                        run.setText(jg);
+                    }
+                    run.addBreak(BreakType.TEXT_WRAPPING);
+                    jgyzid++;
+                }
+                index++;
+            }
+            File fileDoc = new File(reportPath);
+            if (fileDoc.exists()) {
+                FileUtils.forceDelete(fileDoc);
+            }
+            //word文件输出流
+            outputStream = new FileOutputStream(reportPath);
+            document.write(outputStream);
+        } catch (Exception e) {
+            e.printStackTrace();
+            //插入任务日志
+            FxrwrzDTO errorDto = new FxrwrzDTO();
+            errorDto.setRwbsm(res.getBsm());
+            errorDto.setRwlx("辅助选址");
+            errorDto.setRzlr("生成选址报告错误:" + e.getMessage());
+            errorDto.setRzsj(new Date());
+            errorDto.setRzlx("error");
+            fxrwrzMapper.insert(errorDto);
+        } finally {
+            if (document != null) {
+                try {
+                    document.close();
+                } catch (Exception ex) {
+                    System.out.println(ex.toString());
+                }
+            }
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        //转PDF
+        String outfilepath = reportPath.replace(".docx", ".pdf");
+        NpoiHelper.doc2pdf(reportPath, outfilepath);
+        System.out.println(outfilepath);
+    }
+
+    /**
+     * 选址简报
+     */
+
+    private void createSimpleReport(FzxzEntityDTO res, String reportPath, List<String> xzbsmList) {
+        //创建document文档对象对象实例
+        XWPFDocument document = null;
+        OutputStream outputStream = null;//把doc输出到输出流
+        try {
+            //创建document文档对象对象实例
+            document = new XWPFDocument();
+            int pos = 0;
+            NpoiHelper.Option optionCENTER = new NpoiHelper.Option();
+            optionCENTER.setAlign(ParagraphAlignment.CENTER);
+            //文本标题
+            NpoiHelper.title(document, res.getXmmc() + "选址简报", pos++);
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+            document.setParagraph(NpoiHelper.newParagraph(document, sdf.format(new Date()), optionCENTER), pos++);
+
+            NpoiHelper.catalog(document, "一、项目选址信息", pos++);
+            XWPFTable table = document.createTable(4, 4);
+            table.setWidth(8500);//总宽度
+            for (int k = 0; k < 4; k++) {
+                XWPFTableCell cell = table.getRow(0).getCell(k);
+                CTTcPr ctTcPr = cell.getCTTc().isSetTcPr() ? cell.getCTTc().getTcPr() : cell.getCTTc().addNewTcPr();
+                CTTblWidth ctTblWidth = ctTcPr.addNewTcW();
+                ctTblWidth.setW(BigInteger.valueOf(2125));
+                ctTblWidth.setType(STTblWidth.DXA);
+            }
+            //Table 表格第一行
+            NpoiHelper.Option optionIsBoldCENTER = new NpoiHelper.Option();
+            optionIsBoldCENTER.setAlign(ParagraphAlignment.CENTER);
+            optionIsBoldCENTER.setBold(true);
+            table.getRow(0).getCell(0).setColor("DBE5F1");
+            table.getRow(0).getCell(0).setParagraph(NpoiHelper.setCellText(table, "项目名称", optionIsBoldCENTER));
+            NpoiHelper.mergeHorizontal(table, 0, 1, 3);
+            table.getRow(0).getCell(1).setParagraph(NpoiHelper.setCellText(table, res.getXmmc(), null));
+            //Table 表格第二行
+            table.getRow(1).getCell(0).setColor("DBE5F1");
+            table.getRow(1).getCell(0).setParagraph(NpoiHelper.setCellText(table, "建设单位", optionIsBoldCENTER));
+            NpoiHelper.mergeHorizontal(table, 1, 1, 3);
+            table.getRow(1).getCell(1).setParagraph(NpoiHelper.setCellText(table, res.getJsdw(), null));
+            //Table 表格第三行
+            String ydmj = res.getYdmjbegin() + " - " + res.getYdmjend();
+            if (StringUtils.isEmpty(res.getYdmjbegin()) || Double.parseDouble(res.getYdmjbegin()) == 0)
+                ydmj = "≤" + res.getYdmjend();
+            else if (StringUtils.isEmpty(res.getYdmjend()) || Double.parseDouble(res.getYdmjend()) == 0)
+                ydmj = "≥" + res.getYdmjbegin();
+            table.getRow(2).getCell(0).setColor("DBE5F1");
+            table.getRow(2).getCell(0).setParagraph(NpoiHelper.setCellText(table, "用地面积", optionIsBoldCENTER));
+            table.getRow(2).getCell(1).setParagraph(NpoiHelper.setCellText(table, ydmj + "平方米", null));
+            table.getRow(2).getCell(2).setColor("DBE5F1");
+            table.getRow(2).getCell(2).setParagraph(NpoiHelper.setCellText(table, "用地性质", optionIsBoldCENTER));
+            table.getRow(2).getCell(3).setParagraph(NpoiHelper.setCellText(table, res.getYdmc(), null));
+            //Table 表格第四行
+            table.getRow(3).getCell(1).setColor("DBE5F1");
+            table.getRow(3).getCell(2).setColor("DBE5F1");
+            table.getRow(3).getCell(3).setColor("DBE5F1");
+            table.getRow(3).getCell(0).setParagraph(NpoiHelper.setCellText(table, "选址因子", optionIsBoldCENTER));
+            table.getRow(3).getCell(1).setParagraph(NpoiHelper.setCellText(table, "因子名称", optionIsBoldCENTER));
+            table.getRow(3).getCell(2).setParagraph(NpoiHelper.setCellText(table, "影响条件", optionIsBoldCENTER));
+            table.getRow(3).getCell(3).setParagraph(NpoiHelper.setCellText(table, "约束范围值(M)", optionIsBoldCENTER));
+            //查询选址因子,并且转换为List<Map> 因子条件(包含:C、不包含:N、分析:A)
+            QueryWrapper<FzxzXzyzDTO> wrapper = new QueryWrapper<FzxzXzyzDTO>();
+            wrapper.eq("rwbsm", res.getBsm());
+            List<FzxzXzyzDTO> fzxzXzyzDTOList = fzxzXzyzMapper.selectList(wrapper);
+            for (int i = 0; i < fzxzXzyzDTOList.size(); i++) {
+                FzxzXzyzDTO fzxzXzyzDTO = fzxzXzyzDTOList.get(i);
+                String yztj = "";
+                if (fzxzXzyzDTO.getYztj() != null) {
+                    if ("C".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
+                        yztj = "包含";
+                    }
+                    if ("N".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
+                        yztj = "不包含";
+                    }
+                    if ("A".equals(fzxzXzyzDTO.getYztj().toUpperCase()) || "F".equals(fzxzXzyzDTO.getYztj().toUpperCase())) {
+                        yztj = "分析";
+                    }
+                }
+                String yxz = "";
+                if (StringUtils.isNotEmpty(fzxzXzyzDTO.getYxz())) {
+                    yxz = fzxzXzyzDTO.getYxz();
+                }
+                XWPFTableRow mr = table.createRow();
+
+                mr.getCell(1).setParagraph(NpoiHelper.setCellText(table, fzxzXzyzDTO.getYxyzmc(), optionCENTER));
+                mr.getCell(2).setParagraph(NpoiHelper.setCellText(table, yztj, optionCENTER));
+                mr.getCell(3).setParagraph(NpoiHelper.setCellText(table, yxz, optionCENTER));
+            }
+            NpoiHelper.mergeCellsVertically(table, 0, 3, 3 + fzxzXzyzDTOList.size());
+            table.getRow(3).getCell(0).setColor("DBE5F1");
+            //选址分析
+            NpoiHelper.catalog(document, "二、选址分析", pos++);
+            XWPFTable tableFx = document.createTable(1, 4);
+            tableFx.setWidth(8500);//总宽度
+            for (int k = 0; k < 4; k++) {
+                XWPFTableCell cell = tableFx.getRow(0).getCell(k);
+                CTTcPr ctTcPr = cell.getCTTc().isSetTcPr() ? cell.getCTTc().getTcPr() : cell.getCTTc().addNewTcPr();
+                CTTblWidth ctTblWidth = ctTcPr.addNewTcW();
+                ctTblWidth.setW(BigInteger.valueOf(2125));
+                ctTblWidth.setType(STTblWidth.DXA);
+            }
+            //查询结果GIS FzxzJgGisDTO
+            QueryWrapper<FzxzJgGisDTO> giswrapper = new QueryWrapper<FzxzJgGisDTO>();
+            giswrapper.eq("rwbsm", res.getBsm());
+            //筛选方案,根据传参或者预选方案
+//            giswrapper.ne("yxfa", "0");
+            if (xzbsmList != null) {
+                giswrapper.in("bsm", xzbsmList);
+            }
+            List<FzxzJgGisDTO> fzxzJgGisDTOList = fzxzJgGISMapper.selectList(giswrapper);
+            int index = 1;
+            NpoiHelper.Option optionIsBold = new NpoiHelper.Option();
+            optionIsBold.setBold(true);
+            int rowIndex = 0;
+            for (int i = 0; i < fzxzJgGisDTOList.size(); i++) {
+                FzxzJgGisDTO item = fzxzJgGisDTOList.get(i);
+                XWPFTableRow mr = tableFx.createRow();
+                rowIndex++;
+                mr.getCell(0).setColor("DBE5F1");
+                NpoiHelper.mergeHorizontal(tableFx, rowIndex, 0, 1);
+                mr.getCell(0).setParagraph(NpoiHelper.setCellText(tableFx, "方案" + NumberUtil.int2chineseNum(index), optionIsBold));
+                //tableFx 表格第二行
+                mr = tableFx.createRow();
+                rowIndex++;
+                mr.getCell(0).setParagraph(NpoiHelper.setCellText(tableFx, "地类编码", optionIsBoldCENTER));
+                mr.getCell(1).setParagraph(NpoiHelper.setCellText(tableFx, item.getDlbm(), null));
+                mr.getCell(2).setParagraph(NpoiHelper.setCellText(tableFx, "地类名称", optionIsBoldCENTER));
+                mr.getCell(3).setParagraph(NpoiHelper.setCellText(tableFx, item.getDlmc(), null));
+                //tableFx 表格第三行
+                mr = tableFx.createRow();
+                rowIndex++;
+                mr.getCell(0).setParagraph(NpoiHelper.setCellText(tableFx, "地块面积", optionIsBoldCENTER));
+                mr.getCell(1).setParagraph(NpoiHelper.setCellText(tableFx, Math.round(item.getTbmj()) + "平方米", null));
+                mr.getCell(2).setParagraph(NpoiHelper.setCellText(tableFx, "土地位置", optionIsBoldCENTER));
+                mr.getCell(3).setParagraph(NpoiHelper.setCellText(tableFx, item.getXzqmc(), null));
+                //tableFx 表格第四行
+                mr = tableFx.createRow();
+                rowIndex++;
+                mr.getCell(0).setParagraph(NpoiHelper.setCellText(tableFx, "压占分析", optionIsBoldCENTER));
+                NpoiHelper.mergeHorizontal(tableFx, rowIndex, 1, 3);
+
+                XWPFParagraph para6 = mr.getCell(1).addParagraph();
+                para6.setAlignment(ParagraphAlignment.LEFT);
+                //查询选址因子 因子条件(包含:C、不包含:N、分析:A)
+                QueryWrapper<FzxzJgyzDTO> fzxzJgyzDTOQueryWrapper = new QueryWrapper<FzxzJgyzDTO>();
+                fzxzJgyzDTOQueryWrapper.eq("jbbsm", item.getBsm());
+                fzxzJgyzDTOQueryWrapper.eq("yztj", "F");
+                List<FzxzJgyzDTO> fzxzJgyzDTOList = fzxzJgyzMapper.selectList(fzxzJgyzDTOQueryWrapper);
+                int jgyzid = 1;
+                for (int j = 0; j < fzxzJgyzDTOList.size(); j++) {
+                    FzxzJgyzDTO jgyz = fzxzJgyzDTOList.get(j);
+                    XWPFRun run = para6.createRun();
+                    String jg = jgyz.getFxjg();
+                    Double jgDouble = 0.0;
+                    try {
+                        jgDouble = Double.parseDouble(jg);
+                        run.setText(jgyzid + "、压占" + jgyz.getYxyzmc() + "面积" + jg + "平方米");
+                    } catch (Exception e) {
+                        run.setText(jgyzid + "、" + jg);
+                    }
+
+                    if (jgyzid < fzxzJgyzDTOList.size())
+                        run.addBreak(BreakType.TEXT_WRAPPING);
+                    jgyzid++;
+                }
+                index++;
+            }
+            tableFx.removeRow(0);
+            File fileDoc = new File(reportPath);
+            if (fileDoc.exists()) {
+                FileUtils.forceDelete(fileDoc);
+            }
+            //word文件输出流
+            outputStream = new FileOutputStream(reportPath);
+            document.write(outputStream);
+        } catch (
+                Exception e) {
+            e.printStackTrace();
+            System.out.println(e.toString());
+            //插入任务日志
+            FxrwrzDTO errorDto = new FxrwrzDTO();
+            errorDto.setRwbsm(res.getBsm());
+            errorDto.setRwlx("辅助选址");
+            errorDto.setRzlr("生成选址简报错误:" + e.getMessage());
+            errorDto.setRzsj(new Date());
+            errorDto.setRzlx("error");
+            fxrwrzMapper.insert(errorDto);
+        } finally {
+            if (document != null) {
+                try {
+                    document.close();
+                } catch (Exception ex) {
+                    System.out.println(ex.toString());
+                }
+            }
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        //转PDF
+        String outfilepath = reportPath.replace(".docx", ".pdf");
+        NpoiHelper.doc2pdf(reportPath, outfilepath);
+        System.out.println(outfilepath);
+    }
+
+    /**
+     * zip打包
+     */
+    private void createZipReport(FzxzEntityDTO res, String reportZip, String reportPath, String simplePath) {
+        File f = new File(fzxzShp);
+        System.out.println("选址分析报告打包zip:" + reportPath);
+        System.out.println("选址分析报告打包shp:" + fzxzShp);
+        if (StringUtils.isNotEmpty(fzxzShp)) {
+            String filePath = fzxzShp.substring(0, fzxzShp.lastIndexOf("."));
+            String docReportPath = reportPath.substring(0, reportPath.lastIndexOf("."));
+            String docSimplePath = reportPath.substring(0, reportPath.lastIndexOf("."));
+            // 生成的压缩文件
+            ZipFile zipFile = null;
+            try {
+                zipFile = new ZipFile(reportZip);
+                ZipParameters parameters = new ZipParameters();
+                // 压缩方式
+                parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
+                // 压缩级别
+                parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
+                zipFile.addFile(new File(simplePath), parameters);
+                zipFile.addFile(new File(reportPath), parameters);
+                zipFile.addFile(new File(filePath + ".shp"), parameters);
+                zipFile.addFile(new File(filePath + ".shx"), parameters);
+                zipFile.addFile(new File(filePath + ".dbf"), parameters);
+                zipFile.addFile(new File(filePath + ".cpg"), parameters);
+                zipFile.addFile(new File(filePath + ".prj"), parameters);
+            } catch (ZipException e) {
+                System.out.println(e.toString());
+                //插入任务日志
+                FxrwrzDTO errorDto = new FxrwrzDTO();
+                errorDto.setRwbsm(res.getBsm());
+                errorDto.setRwlx("辅助选址");
+                errorDto.setRzlr("生成选址报告zip打包错误:" + e.getMessage());
+                errorDto.setRzsj(new Date());
+                errorDto.setRzlx("error");
+                fxrwrzMapper.insert(errorDto);
+            }
+        }
+    }
+
+    /**
+     * 导出报告图片
+     *
+     * @return
+     */
+    private List<String> ReportImg(FzxzEntityDTO res, List<String> xzbsmList) {
+        //查询分析结果图斑信息
+        QueryWrapper<FzxzJgGisDTO> giswrapper = new QueryWrapper<FzxzJgGisDTO>();
+        giswrapper.eq("rwbsm", res.getBsm());
+        //筛选方案,根据传参或者预选方案
+//            giswrapper.ne("yxfa", "0");
+        if (xzbsmList != null) {
+            giswrapper.in("bsm", xzbsmList);
+        }
+        List<FzxzJgGisDTO> fzxzJgGisDTOList = fzxzJgGISMapper.selectList(giswrapper);
+        //SDE转SHP
+        String inShp = fzxzShp;
+        List objidlist = new ArrayList<>();
+        for (FzxzJgGisDTO cur : fzxzJgGisDTOList) {
+            objidlist.add(cur.getObjectid());
+        }
+        String objids = Joiner.on(",").join(objidlist);
+        sde2Shp("KJGH.T_FZSS_FZXZ_JG_GIS", inShp, "\"OBJECTID\" IN (" + objids + ")");
+        //执行python
+        Map<String, String> params = new HashMap<>();
+        List<String> result = PythonExecute.RunFzxzMap(mapFunctionId, params);
+        return result;
+    }
+
+    /**
+     * SDE转SHP
+     *
+     * @param table   SDE表
+     * @param shpfile shp文件
+     * @param where   追加字段
+     * @return
+     */
+    public static String sde2Shp(String table, String shpfile, String where) {
+        if (StringUtils.isNotEmpty(where)) {
+            Map<String, String> params = new HashMap<>();
+            params.put("table", table);
+            params.put("shpfile", shpfile);
+            params.put("where", where);
+            return PythonExecute.RunGisHelper("sde2shp", params);
+        } else {
+            Map<String, String> params = new HashMap<>();
+            params.put("table", table);
+            params.put("shpfile", shpfile);
+            return PythonExecute.RunGisHelper("sde2shp", params);
+        }
+    }
+}

+ 492 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/HgxfxSchedule.java

@@ -0,0 +1,492 @@
+package com.onemap.analyse.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.mapper.*;
+import com.onemap.analyse.utils.NpoiHelper;
+import com.onemap.common.core.utils.StringUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.poi.xwpf.usermodel.*;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.math.BigInteger;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 合规性分析模块定时刷新任务
+ */
+@Component
+public class HgxfxSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //任务状态标识码
+    private RwztDTO Rwzt = new RwztDTO();
+    @Resource
+    private HgxfxMapper hgxfxMapper;
+    @Resource
+    HgxfxHgscxMapper hgxfxHgscxMapper;
+    @Resource
+    HgxfxScxMapper hgxfxScxMapper;
+    @Resource
+    private FxrwrzMapper fxrwrzMapper;
+    @Resource
+    private FzssChscMapper fzssChscMapper;
+    //合规性分析python方法名标识
+    @Value("${Hgxfx.functionId}")
+    private String functionId;
+    @Value("${Hgxfx.temp}")
+    private String temp;
+    @Value("${Hgxfx.ftpOut}")
+    private String ftpOut;
+    private static final Logger log = LoggerFactory.getLogger(HgxfxSchedule.class);
+    /**
+     * Scheduled 定时器参数
+     * cron表达式:指定任务在特定时间执行
+     * fixedDelay:表示上一次任务执行完成后多久再执行,参数类型long,单位:ms
+     * fixedDelayString:与fixedDelay一样,只是参数类型是String
+     * fixedRate:表示按一定的频率执行任务,参数类型long,单位:ms 如: fixedRate(5000),表示这个定时器任务每5秒执行一次
+     * fixedRateString:与fixedRate一样,只是参数类型变为String
+     * initialDelay:表示延迟多久再第一次执行任务,参数类型为long ,单位:ms
+     * initialDelayString:与initialDelay一样,只是参数类型String
+     */
+    /**
+     * @Async("name") 开启多线程
+     */
+    /**
+     * 合规性分析执行入口
+     */
+    @Async("taskExecutor")
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void HgxfxStatus() {
+        try {
+            QueryWrapper<HgxfxDTO> wrapper = new QueryWrapper<HgxfxDTO>();
+            wrapper.eq("rwzt", Rwzt.getCreate());
+            //以创建时间正序排列
+            wrapper.orderByAsc("cjsj");
+            //每次只操作一条记录
+            List<HgxfxDTO> ress = hgxfxMapper.selectList(wrapper);
+            if (ress.size() > 0) {
+                HgxfxDTO res = ress.get(0);
+                //插入执行状态
+                res.setRwzt(Rwzt.getRun());
+                res.setRwkssj(new Date());
+                QueryWrapper<HgxfxDTO> query = new QueryWrapper<HgxfxDTO>();
+                query.eq("bsm", res.getBsm());
+                hgxfxMapper.update(res, query);
+                //插入任务日志
+                FxrwrzDTO rzDto = new FxrwrzDTO();
+                rzDto.setRwbsm(res.getBsm());
+                rzDto.setRwlx("合规性检查");
+                rzDto.setRzlr("开始分析");
+                rzDto.setRzlx("info");
+                rzDto.setRzsj(new Date());
+                fxrwrzMapper.insert(rzDto);
+                //执行python
+                Map<String, String> params = new HashMap<>();
+                params.put("bsm", res.getBsm());
+                String result = PythonExecute.Run(functionId, params);
+                if (!StringUtils.isEmpty(result) && result.contains("OK")) {//成功
+                    res.setRwjssj(new Date());
+                    res.setRwzt(Rwzt.getComplete());
+                    //捕获报告生成异常
+                    try {
+                        //TODO 生成合规性分析结果报告 返回 FxReport实体
+                        FxReport report = createReport(res.getBsm());
+                        res.setFxbg(report.getReportfile());
+                        hgxfxMapper.update(res, query);
+                        //TODO 策划生成 项目
+                        if ("OpenAPI".equals(res.getRwly())) {
+                            QueryWrapper<FzxzChscDTO> chscwrapper = new QueryWrapper<FzxzChscDTO>();
+                            chscwrapper.eq("bsm", res.getBsm());
+                            FzxzChscDTO chscDto = fzssChscMapper.selectOne(chscwrapper);
+                            chscDto.setRwzt(Rwzt.getComplete());
+                            chscDto.setRwjg("分析完成");
+                            chscDto.setRwjd(100);
+                            fzssChscMapper.update(chscDto, chscwrapper);
+                            //拷贝合规性分析报告
+                            com.onemap.common.core.utils.file.FileUtils.copyNewFileAndRename(ftpOut, report.getPdffile(), chscDto.getXmmc() + ".pdf");
+                        }
+                        //插入任务日志
+                        FxrwrzDTO rzDto2 = new FxrwrzDTO();
+                        rzDto2.setRwbsm(res.getBsm());
+                        rzDto2.setRwlx("合规性检查");
+                        rzDto2.setRzlr("生成分析报告完成");
+                        rzDto2.setRzlx("info");
+                        rzDto2.setRzsj(new Date());
+                        fxrwrzMapper.insert(rzDto2);
+                        //休眠1S,避免日志插入时间相同
+                        Thread.sleep(1000 * 1);
+                        //插入成功日志
+                        FxrwrzDTO successDto = new FxrwrzDTO();
+                        successDto.setRwbsm(res.getBsm());
+                        successDto.setRwlx("合规性检查");
+                        successDto.setRzlr("分析完成");
+                        successDto.setRzlx("info");
+                        successDto.setRzsj(new Date());
+                        fxrwrzMapper.insert(successDto);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        res.setRwzt(Rwzt.getError());
+                        hgxfxMapper.update(res, query);
+                        if ("OpenAPI".equals(res.getRwly())) {
+                            QueryWrapper<FzxzChscDTO> chscwrapper = new QueryWrapper<FzxzChscDTO>();
+                            chscwrapper.eq("bsm", res.getBsm());
+                            FzxzChscDTO chscDto = fzssChscMapper.selectOne(chscwrapper);
+                            chscDto.setRwzt(Rwzt.getError());
+                            chscDto.setRwjg("报告生成异常");
+                            fzssChscMapper.update(chscDto, chscwrapper);
+                        }
+                        //插入任务日志
+                        FxrwrzDTO errorDto = new FxrwrzDTO();
+                        errorDto.setRwbsm(res.getBsm());
+                        errorDto.setRwlx("合规性检查");
+                        errorDto.setRzlr("报告生成异常");
+                        errorDto.setRzlx("error");
+                        errorDto.setRzsj(new Date());
+                        fxrwrzMapper.insert(errorDto);
+                    }
+                } else {//失败
+                    res.setRwjssj(new Date());
+                    res.setRwzt(Rwzt.getError());
+                    hgxfxMapper.update(res, query);
+                    if ("OpenAPI".equals(res.getRwly())) {
+                        QueryWrapper<FzxzChscDTO> chscwrapper = new QueryWrapper<FzxzChscDTO>();
+                        chscwrapper.eq("bsm", res.getBsm());
+                        FzxzChscDTO chscDto = fzssChscMapper.selectOne(chscwrapper);
+                        chscDto.setRwzt(Rwzt.getError());
+                        chscDto.setRwjg("分析错误");
+                        fzssChscMapper.update(chscDto, chscwrapper);
+                    }
+                    //插入任务日志
+                    FxrwrzDTO errorDto = new FxrwrzDTO();
+                    errorDto.setRwbsm(res.getBsm());
+                    errorDto.setRwlx("合规性检查");
+                    errorDto.setRzlr("分析范围内无基础数据");
+                    errorDto.setRzlx("error");
+                    errorDto.setFxjg(result);
+                    errorDto.setRzsj(new Date());
+                    fxrwrzMapper.insert(errorDto);
+                }
+                System.out.println("合规性分析模块:" + res.getBsm() + "完成!!!!!!!! " + new Date().toString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 根据任务标识码生成报告
+     *
+     * @return
+     */
+    public FxReport createReport(String bsm) {
+        //插入任务日志
+//        FxrwrzDTO rzDto = new FxrwrzDTO();
+//        rzDto.setRwbsm(bsm);
+//        rzDto.setRwlx("合规性检查");
+//        rzDto.setRzlr("开始生成分析报告");
+//        rzDto.setRzlx("info");
+//        rzDto.setRzsj(new Date());
+//        fxrwrzMapper.insert(rzDto);
+        FxReport fxReport = new FxReport();
+        QueryWrapper<HgxfxDTO> wrapper = new QueryWrapper<HgxfxDTO>();
+        wrapper.eq("bsm", bsm);
+        HgxfxDTO res = hgxfxMapper.selectOne(wrapper);
+        //文件硬盘真实路径
+        String timeStamp = new Date().getTime() + "";
+        String rootPath = temp + File.separator + "合规性检查报告"
+                + File.separator + res.getBsm();
+        File rootFile = new File(rootPath);
+        if (!rootFile.exists()) {
+            rootFile.mkdirs();
+        }
+        String reportPath = rootPath
+                + File.separator + res.getXmmc() + "(合规性检查报告)_" + timeStamp + ".docx";
+        //解析文件路径为web路径
+        String webFilePath = StringUtils.getFileStaticPath(reportPath);
+        double mj = 0;
+        if (res != null) {
+            XWPFDocument document = null;
+            OutputStream outputStream = null;//把doc输出到输出流
+            try {
+                //前端映射路径
+                System.out.println(reportPath);
+                //创建poi XWPFDocument doc文件
+                document = new XWPFDocument();
+                int pos = 0;
+                //文本标题
+                String title = res.getXmmc() + "合规性检查报告";
+                NpoiHelper.title(document, title, pos++);
+                NpoiHelper.Option option = new NpoiHelper.Option();
+                option.setFontSize(19);
+                option.setAlign(ParagraphAlignment.CENTER);
+                option.setBold(true);
+                List<String> list = new ArrayList<>();
+                list.add("");
+                document.setParagraph(NpoiHelper.newParagraph(document, list, option), pos++);
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+                option = new NpoiHelper.Option();
+                option.setAlign(ParagraphAlignment.CENTER);
+                document.setParagraph(NpoiHelper.newParagraph(document, sdf.format(new Date())
+                        , option), pos++);
+                NpoiHelper.catalog(document, "一、项目合规性审查", pos++);
+                XWPFTable table = document.createTable(1, 4);
+                int tableIndex = 0;
+                table.setWidth(9000);//总宽度
+                table.setCellMargins(100, 0, 200, 0);
+                for (int i = 0; i < 4; i++) {
+                    XWPFTableCell cell = table.getRow(0).getCell(i);
+                    CTTcPr ctTcPr = cell.getCTTc().isSetTcPr() ? cell.getCTTc().getTcPr() : cell.getCTTc().addNewTcPr();
+                    CTTblWidth ctTblWidth = ctTcPr.addNewTcW();
+                    ctTblWidth.setW(BigInteger.valueOf(2250));
+                    ctTblWidth.setType(STTblWidth.DXA);
+                }
+                //Table 表格第1行
+                NpoiHelper.Option optionCenterAndBold = new NpoiHelper.Option();
+                optionCenterAndBold.setBold(true);
+                optionCenterAndBold.setAlign(ParagraphAlignment.CENTER);
+                NpoiHelper.Option optionCenter = new NpoiHelper.Option();
+                optionCenter.setAlign(ParagraphAlignment.CENTER);
+                table.getRow(0).getCell(0).setParagraph(NpoiHelper.setCellText(table, "项目名称", optionCenterAndBold));
+                table.getRow(0).getCell(1).setParagraph(NpoiHelper.setCellText(table, res.getXmmc(), null));
+                table.getRow(0).getCell(2).setParagraph(NpoiHelper.setCellText(table, "项目类型", optionCenterAndBold));
+                table.getRow(0).getCell(3).setParagraph(NpoiHelper.setCellText(table, res.getXmlx(), null));
+                XWPFTableRow row = table.createRow();
+                tableIndex++;
+                row.getCell(0).setParagraph(NpoiHelper.setCellText(table, "用地面积", optionCenterAndBold));
+                row.getCell(1).setParagraph(NpoiHelper.setCellText(table, res.getFxmj() + "㎡", null));
+                row.getCell(2).setParagraph(NpoiHelper.setCellText(table, "建设单位", optionCenterAndBold));
+                row.getCell(3).setParagraph(NpoiHelper.setCellText(table, res.getJsdw(), null));
+                row = table.createRow();
+                tableIndex++;
+                row.getCell(0).setParagraph(NpoiHelper.setCellText(table, "管控要素分类", optionCenterAndBold));
+                row.getCell(1).setParagraph(NpoiHelper.setCellText(table, "检查要素", optionCenterAndBold));
+                row.getCell(2).setParagraph(NpoiHelper.setCellText(table, "涉及面积", optionCenterAndBold));
+                row.getCell(3).setParagraph(NpoiHelper.setCellText(table, "结论", optionCenterAndBold));
+                //先查询FzssHgxfxHgscx,再查询FzssHgxfxScx
+                QueryWrapper<HgxfxHgscxDTO> wrapperHgxfxHgscxDTO = new QueryWrapper<HgxfxHgscxDTO>();
+                wrapperHgxfxHgscxDTO.eq("rwbsm", res.getBsm());
+                List<HgxfxHgscxExportDTO> hgxfxHgscxDTOList = hgxfxHgscxMapper.queryScxList(res.getBsm());
+
+                //一级控制线
+                Map[] mapArray = new Map[hgxfxHgscxDTOList.size()];
+                //审查项数组排序序号
+                int index = 0;
+                for (int i = 0; i < hgxfxHgscxDTOList.size(); i++) {
+                    HgxfxHgscxExportDTO hgxfxHgscxDTO = hgxfxHgscxDTOList.get(i);
+                    if (hgxfxHgscxDTO.getKzxjb() == 1) {
+                        Map<String, Object> map = new HashMap<>();
+                        map.put("scx", hgxfxHgscxDTO);
+                        map.put("hgscx", hgxfxHgscxDTO);
+                        mapArray[index] = map;
+                        index++;
+                    }
+                }
+                int startRowIndex = tableIndex;
+                for (int i = 0; i < mapArray.length; i++) {
+                    if (mapArray[i] != null) {
+                        HgxfxHgscxExportDTO hgxfxHgscxDTO = (HgxfxHgscxExportDTO) mapArray[i].get("hgscx");
+                        if (hgxfxHgscxDTO != null) {
+                            hgxfxHgscxDTO.setZdmj(hgxfxHgscxDTO.getZdmj() == null ? 0 : hgxfxHgscxDTO.getZdmj());
+                            row = table.createRow();
+                            tableIndex++;
+                            row.getCell(0).setParagraph(NpoiHelper.setCellText(table, "一级控制线", optionCenterAndBold));
+                            row.getCell(1).setParagraph(NpoiHelper.setCellText(table, hgxfxHgscxDTO.getYsmc(), null));
+                            row.getCell(2).setParagraph(NpoiHelper.setCellText(table, Math.round(hgxfxHgscxDTO.getZdmj()) + "m²", optionCenter));
+                            row.getCell(3).setParagraph(NpoiHelper.setCellText(table, hgxfxHgscxDTO.getJcjg(), null));
+                            mj = mj + hgxfxHgscxDTO.getZdmj();
+                        }
+                    }
+                }
+                //合并列
+                NpoiHelper.mergeCellsVertically(table, 0, startRowIndex + 1, tableIndex);
+
+                //二级控制线
+                mapArray = new Map[hgxfxHgscxDTOList.size()];
+                //审查项数组排序序号
+                index = 0;
+                for (int i = 0; i < hgxfxHgscxDTOList.size(); i++) {
+                    //二级控制线
+                    HgxfxHgscxExportDTO hgxfxHgscxDTO = hgxfxHgscxDTOList.get(i);
+                    if (hgxfxHgscxDTO != null) {
+                        if (hgxfxHgscxDTO.getKzxjb() == 2) {
+                            Map<String, Object> map = new HashMap<>();
+                            map.put("scx", hgxfxHgscxDTO);
+                            map.put("hgscx", hgxfxHgscxDTO);
+                            mapArray[index] = map;
+                            index++;
+                        }
+                    }
+                }
+                startRowIndex = tableIndex;
+                for (int i = 0; i < mapArray.length; i++) {
+                    if (mapArray[i] != null) {
+                        HgxfxHgscxExportDTO hgxfxHgscxDTO = (HgxfxHgscxExportDTO) mapArray[i].get("hgscx");
+                        if (hgxfxHgscxDTO != null) {
+                            row = table.createRow();
+                            tableIndex++;
+                            row.getCell(0).setParagraph(NpoiHelper.setCellText(table, "二级控制线", optionCenterAndBold));
+                            row.getCell(1).setParagraph(NpoiHelper.setCellText(table, hgxfxHgscxDTO.getYsmc(), null));
+                            row.getCell(2).setParagraph(NpoiHelper.setCellText(table, Math.round(hgxfxHgscxDTO.getZdmj()) + "m²", optionCenter));
+                            row.getCell(3).setParagraph(NpoiHelper.setCellText(table, hgxfxHgscxDTO.getJcjg(), null));
+                            mj = mj + hgxfxHgscxDTO.getZdmj();
+                        }
+                    }
+                }
+                //设置用地面积
+                table.getRow(1).getCell(1).setParagraph(NpoiHelper.setCellText(table, res.getFxmj() + "㎡", null));
+                NpoiHelper.mergeCellsVertically(table, 0, startRowIndex + 1, tableIndex);
+                //TODO wanger 将其他审查项插入到表
+                Map<String, List<HgxfxHgscxExportDTO>> scxMap = new HashMap<>();
+                //组织数据
+                for (int i = 0; i < hgxfxHgscxDTOList.size(); i++) {
+                    HgxfxHgscxExportDTO hgxfxHgscxDTO = hgxfxHgscxDTOList.get(i);
+                    if (hgxfxHgscxDTO.getKzxjb() > 2) {
+                        String classify = hgxfxHgscxDTO.getTjzd();
+                        if (scxMap.get(classify) == null) {
+                            scxMap.put(classify, new ArrayList<>());
+                        }
+                        scxMap.get(classify).add(hgxfxHgscxDTO);
+                    }
+                }
+                //循环添加
+                Iterator<Map.Entry<String, List<HgxfxHgscxExportDTO>>> iterator = scxMap.entrySet().iterator();
+                while (iterator.hasNext()) {
+                    Map.Entry<String, List<HgxfxHgscxExportDTO>> entry = iterator.next();
+                    String key = entry.getKey();
+                    List<HgxfxHgscxExportDTO> value = entry.getValue();
+
+                    mapArray = new Map[value.size()];
+                    //审查项数组排序序号
+                    index = 0;
+                    for (int i = 0; i < value.size(); i++) {
+                        //二级控制线
+                        HgxfxHgscxExportDTO hgxfxHgscxDTO = value.get(i);
+                        Map<String, HgxfxHgscxExportDTO> map = new HashMap<>();
+                        map.put("scx", hgxfxHgscxDTO);
+                        map.put("hgscx", hgxfxHgscxDTO);
+                        mapArray[index] = map;
+                        index++;
+                    }
+                    startRowIndex = tableIndex;
+                    for (int i = 0; i < mapArray.length; i++) {
+                        if (mapArray[i] != null) {
+                            HgxfxHgscxExportDTO hgxfxHgscxDTO = (HgxfxHgscxExportDTO) mapArray[i].get("hgscx");
+                            if (hgxfxHgscxDTO != null) {
+                                row = table.createRow();
+                                tableIndex++;
+                                row.getCell(0).setParagraph(NpoiHelper.setCellText(table, key, optionCenterAndBold));
+                                row.getCell(1).setParagraph(NpoiHelper.setCellText(table, hgxfxHgscxDTO.getYsmc(), null));
+                                row.getCell(2).setParagraph(NpoiHelper.setCellText(table, Math.round(hgxfxHgscxDTO.getZdmj()) + "m²", optionCenter));
+                                row.getCell(3).setParagraph(NpoiHelper.setCellText(table, hgxfxHgscxDTO.getJcjg(), null));
+                                mj = mj + hgxfxHgscxDTO.getZdmj();
+                            }
+                        }
+                    }
+                    //设置用地面积
+                    table.getRow(1).getCell(1).setParagraph(NpoiHelper.setCellText(table, res.getFxmj() + "㎡", null));
+                    NpoiHelper.mergeCellsVertically(table, 0, startRowIndex + 1, tableIndex);
+                }
+
+
+                //第二章节
+                NpoiHelper.catalog(document, "二、项目用地明细", pos++);
+                XWPFTable tableSecond = document.createTable(1, 5);
+                tableSecond.setCellMargins(100, 0, 200, 0);
+                tableSecond.setWidth(9000);//总宽度
+                //Table 表格第0行
+                tableSecond.getRow(0).getCell(0).setParagraph(NpoiHelper.setCellText(tableSecond, "一级地类", optionCenterAndBold));
+                tableSecond.getRow(0).getCell(2).setParagraph(NpoiHelper.setCellText(tableSecond, "二级地类", optionCenterAndBold));
+                tableSecond.getRow(0).getCell(4).setParagraph(NpoiHelper.setCellText(tableSecond, "占地面积", optionCenterAndBold));
+                //合并列
+                NpoiHelper.mergeHorizontal(tableSecond, 0, 0, 1);
+                NpoiHelper.mergeHorizontal(tableSecond, 0, 2, 3);
+                //查询HgxfxFxtbDTO
+                List<HgxfxFxtbDTO> hgxfxFxtbDTOList = hgxfxMapper.getFxtb(res.getBsm());
+                NpoiHelper.Option optionFontSizeAlign = new NpoiHelper.Option();
+                optionFontSizeAlign.setAlign(ParagraphAlignment.CENTER);
+                optionFontSizeAlign.setFontSize(10);
+                NpoiHelper.Option optionFontSize = new NpoiHelper.Option();
+                optionFontSize.setFontSize(10);
+                for (int i = 0; i < hgxfxFxtbDTOList.size(); i++) {
+                    HgxfxFxtbDTO hgxfxFxtbDTO = hgxfxFxtbDTOList.get(i);
+                    XWPFTableRow row1 = tableSecond.createRow();
+                    tableIndex++;
+                    row1.getCell(0).setParagraph(NpoiHelper.setCellText(tableSecond, hgxfxFxtbDTO.getDldm1(), optionFontSizeAlign));
+                    row1.getCell(1).setParagraph(NpoiHelper.setCellText(tableSecond, hgxfxFxtbDTO.getDlmc1(), optionFontSize));
+                    row1.getCell(2).setParagraph(NpoiHelper.setCellText(tableSecond, hgxfxFxtbDTO.getDldm2(), optionFontSizeAlign));
+                    row1.getCell(3).setParagraph(NpoiHelper.setCellText(tableSecond, hgxfxFxtbDTO.getDlmc2(), optionFontSize));
+                    if (hgxfxFxtbDTO.getMj() == null) {
+                        hgxfxFxtbDTO.setMj(0.0);
+                    }
+                    row1.getCell(4).setParagraph(NpoiHelper.setCellText(tableSecond, Math.round(hgxfxFxtbDTO.getMj()) + "㎡", optionFontSizeAlign));
+                }
+                if (tableSecond.getRow(1) != null) {
+                    for (int i = 0; i < 5; i++) {
+                        XWPFTableCell cell = tableSecond.getRow(1).getCell(i);
+                        CTTcPr ctTcPr = cell.getCTTc().isSetTcPr() ? cell.getCTTc().getTcPr() : cell.getCTTc().addNewTcPr();
+                        CTTblWidth ctTblWidth = ctTcPr.addNewTcW();
+                        ctTblWidth.setW(BigInteger.valueOf(1800));
+                        ctTblWidth.setType(STTblWidth.DXA);
+                    }
+                }
+                File fileDoc = new File(reportPath);
+                if (fileDoc.exists()) {
+                    FileUtils.delete(fileDoc);
+                }
+                //word文件输出流
+                outputStream = new FileOutputStream(reportPath);
+                document.write(outputStream);
+            } catch (Exception e) {
+                log.error(e.toString());
+                //插入任务日志
+                FxrwrzDTO errorDto = new FxrwrzDTO();
+                errorDto.setRwbsm(res.getBsm());
+                errorDto.setRwlx("合规性检查");
+                errorDto.setRzlr("报告生成异常:" + e.getMessage());
+                errorDto.setRzlx("error");
+                errorDto.setRzsj(new Date());
+                fxrwrzMapper.insert(errorDto);
+//                e.printStackTrace();
+            } finally {
+                if (outputStream != null) {
+                    try {
+                        outputStream.close();
+                    } catch (Exception ex) {
+                        log.error(ex.toString());
+                    }
+                }
+                if (document != null) {
+                    try {
+                        document.close();
+                    } catch (Exception ex) {
+                        log.error(ex.toString());
+                    }
+                }
+            }
+            //转PDF
+            String outfilepath = reportPath.replace(".docx", ".pdf");
+            if (new File(reportPath).exists()) {
+                NpoiHelper.doc2pdf(reportPath, outfilepath);
+                //更新报告对象
+                fxReport.setReportfile(webFilePath);
+                fxReport.setMj(mj);
+                fxReport.setPdffile(outfilepath);
+            }
+        }
+        return fxReport;
+    }
+}

+ 251 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/PythonExecute.java

@@ -0,0 +1,251 @@
+package com.onemap.analyse.task;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.onemap.common.core.utils.Base64Utils;
+import com.onemap.common.core.utils.StringUtils;
+import org.python.core.PyFunction;
+import org.python.core.PyObject;
+import org.python.core.PyString;
+import org.python.core.PyType;
+import org.python.util.PythonInterpreter;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class PythonExecute {
+
+    /**
+     * python.exe位置
+     */
+    private static String pythonexe;
+    /**
+     * main.py位置
+     */
+    private static String pythonfile;
+    /**
+     * gishelper.py位置
+     */
+    private static String gisfile;
+
+    @Value("${Python.exeLocation}")
+    public void setPythonexe(String pythonexe) {
+        PythonExecute.pythonexe = pythonexe;
+    }
+
+    @Value("${Python.fileLocation}")
+    public void setPythonfile(String pythonfile) {
+        PythonExecute.pythonfile = pythonfile;
+    }
+
+    @Value("${Python.gisLocation}")
+    public void setGisfile(String gisfile) {
+        PythonExecute.gisfile = gisfile;
+    }
+
+    /**
+     * 执行python方法 公共类
+     *
+     * @param functionName 方法名标识
+     * @param params       参数
+     * @return 执行结果 ####OK####<->####ERROR####
+     */
+    public static String Run(String functionName, Map params) {
+        String msg = "";//返回数据
+        //PythonInterpreter方式
+//        PythonInterpreter interpreter = new PythonInterpreter();
+//        interpreter.execfile(pythonfile);
+//        PyFunction function = interpreter.get(functionName, PyFunction.class);
+//        params.toString();
+//        try {
+//            PyObject obj = function.__call__(new PyObject((PyType) params));
+////            return obj;
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+        //Runtime方式
+        JSONObject json = new JSONObject(params);
+        String[] arguments = new String[]{pythonexe, pythonfile, functionName, Base64Utils.base64Encode(json.toJSONString())};
+        try {
+            Process process = Runtime.getRuntime().exec(arguments);
+            BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                msg = line;
+            }
+            in.close();
+            process.destroy();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return msg;
+    }
+
+    /**
+     * 执行python方法 公共类 生成辅助选址图片
+     *
+     * @param functionName 方法名标识
+     * @param params       参数
+     * @return 执行结果 ####OK####<->####ERROR####
+     */
+    public static List<String> RunFzxzMap(String functionName, Map params) {
+        List<String> res = new ArrayList<>();
+        JSONObject json = new JSONObject(params);
+        String[] arguments = new String[]{pythonexe, pythonfile, functionName, Base64Utils.base64Encode(json.toJSONString())};
+        try {
+            Process process = Runtime.getRuntime().exec(arguments);
+            BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                if(line.contains(".jpg")){
+                    res.add(line);
+                }
+            }
+            in.close();
+            process.destroy();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return res;
+    }
+
+    /**
+     * 执行gishelper python方法 公共类
+     *
+     * @param functionName 方法名标识
+     * @param params       参数
+     * @return 执行结果 ####OK####<->####ERROR####
+     */
+    public static String RunGisHelper(String functionName, Map params) {
+        String msg = "";//返回数据
+        JSONObject json = new JSONObject(params);
+        String[] arguments = new String[]{pythonexe, gisfile, functionName, Base64Utils.base64Encode(json.toJSONString())};
+        try {
+            Process process = Runtime.getRuntime().exec(arguments);
+            BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                msg = line;
+            }
+            in.close();
+            process.destroy();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return msg;
+    }
+
+    /**
+     * EsriJson转SHP文件
+     *
+     * @param json    EsriJson
+     * @param shpfile SHP文件
+     * @return
+     */
+    public static String EsriJson2shp(String json, String shpfile) {
+        Map<String, String> map = new HashMap<>();
+        map.put("json", json);
+        map.put("shpfile", shpfile);
+        return RunGisHelper("esriJson2shp", map);
+    }
+
+    /**
+     * SHP文件转GeoJson
+     *
+     * @param shpfile SHP文件
+     * @param geojson GeoJson文件
+     * @return
+     */
+    public static String Shp2GeoJson(String shpfile, String geojson) {
+        Map<String, String> map = new HashMap<>();
+        map.put("shpfile", shpfile);
+        map.put("geojson", geojson);
+        return RunGisHelper("shp2geojson", map);
+    }
+
+    /**
+     * EsriJson转SDE
+     *
+     * @param json  SHP文件
+     * @param table SDE表
+     * @return
+     */
+    public static String EsriJson2sde(String json, String table) {
+        Map<String, String> map = new HashMap<>();
+        map.put("json", json);
+        map.put("table", table);
+        return RunGisHelper("esriJson2sde", map);
+    }
+
+    /**
+     * SHP文件转SDE
+     *
+     * @param shpfile SHP文件
+     * @param table   SDE表
+     * @param list    追加字段
+     * @return
+     */
+    public static String Shp2Sde(String shpfile, String table, List<Field> list) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("shpfile", shpfile);
+        map.put("table", table);
+        if (list != null && list.size() > 0) {
+            map.put("fields", list);
+        }
+        return RunGisHelper("shp2sde", map);
+    }
+
+    /**
+     * SDE转SHP
+     *
+     * @param table   SDE表
+     * @param shpfile shp文件
+     * @param where   追加字段
+     * @return
+     */
+    public static String Sde2Shp(String table, String shpfile, String where) {
+        Map<String, String> map = new HashMap<>();
+        map.put("shpfile", shpfile);
+        map.put("table", table);
+        if (!StringUtils.isEmpty(where)) {
+            map.put("where", where);
+        }
+        return RunGisHelper("sde2shp", map);
+    }
+
+    public class Field {
+        private String name;/// 名称
+        private String type = "TEXT";/// 类型
+        private Object value;/// 值
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getType() {
+            return type;
+        }
+
+        public void setType(String type) {
+            this.type = type;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public void setValue(Object value) {
+            this.value = value;
+        }
+    }
+}

+ 134 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ZbmxMxjsSchedule.java

@@ -0,0 +1,134 @@
+package com.onemap.analyse.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.domain.zbmx.ZbmxMxjsDTO;
+import com.onemap.analyse.domain.zbmx.ZbmxMxjsrwDO;
+import com.onemap.analyse.domain.zbmx.ZbmxMxjsrwrzDO;
+import com.onemap.analyse.mapper.zbmx.ZbmxMxjsrwMapper;
+import com.onemap.analyse.mapper.zbmx.ZbmxMxjsrwrzMapper;
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * 模型计算定时刷新任务
+ */
+@Component
+public class ZbmxMxjsSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //模型计算python方法名标识
+    @Value("${ZbmxMxjs.functionId}")
+    private String functionId;
+    @Resource
+    ZbmxMxjsrwMapper zbmxMxjsrwMapper;
+    @Resource
+    ZbmxMxjsrwrzMapper zbmxMxjsrwrzMapper;
+    /**
+     * Scheduled 定时器参数
+     * cron表达式:指定任务在特定时间执行
+     * fixedDelay:表示上一次任务执行完成后多久再执行,参数类型long,单位:ms
+     * fixedDelayString:与fixedDelay一样,只是参数类型是String
+     * fixedRate:表示按一定的频率执行任务,参数类型long,单位:ms 如: fixedRate(5000),表示这个定时器任务每5秒执行一次
+     * fixedRateString:与fixedRate一样,只是参数类型变为String
+     * initialDelay:表示延迟多久再第一次执行任务,参数类型为long ,单位:ms
+     * initialDelayString:与initialDelay一样,只是参数类型String
+     */
+    /**
+     * @Async("name") 开启多线程
+     */
+    /**
+     * 辅助选址执行入口
+     */
+//    @Async("taskExecutor")
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void zbmxMxjsStatus() {
+        try {
+            //获取状态为0的计算任务
+            List<ZbmxMxjsDTO> zbmxMxjsDTOList = zbmxMxjsrwMapper.selectNewTask();
+            for (int i = 0; i < zbmxMxjsDTOList.size(); i++) {
+                ZbmxMxjsDTO task = zbmxMxjsDTOList.get(i);
+                if (task != null) {
+                    //查询任务实体
+                    QueryWrapper<ZbmxMxjsrwDO> zbmxMxjsrwDOQueryWrapper = new QueryWrapper<ZbmxMxjsrwDO>();
+                    zbmxMxjsrwDOQueryWrapper.eq("bsm", task.getBsm());
+                    ZbmxMxjsrwDO zbmxMxjsrwDO = zbmxMxjsrwMapper.selectOne(zbmxMxjsrwDOQueryWrapper);
+                    try {
+                        //更新任务状态和任务开始时间
+                        zbmxMxjsrwDO.setRwkssj(new Date());
+                        zbmxMxjsrwDO.setRwzt(1);
+                        if (zbmxMxjsrwDO.getJgz() == null) {
+                            zbmxMxjsrwDO.setJgz(0.0);
+                        }
+                        zbmxMxjsrwMapper.updateZbmxMxjsrwById(zbmxMxjsrwDO);
+                        ZbmxMxjsrwrzDO zbmxMxjsrwrzDO = new ZbmxMxjsrwrzDO();
+                        zbmxMxjsrwrzDO.setMxbsm(task.getMxbsm());
+                        zbmxMxjsrwrzDO.setMxmc(task.getMxmc());
+                        zbmxMxjsrwrzDO.setRwbsm(task.getBsm());
+                        zbmxMxjsrwrzDO.setRzsj(new Date());
+                        zbmxMxjsrwrzDO.setRzlx("info");
+                        zbmxMxjsrwrzDO.setRzlr("开始计算");
+                        zbmxMxjsrwrzMapper.insert(zbmxMxjsrwrzDO);
+                        Map<String, String> params = new HashMap<>();
+                        params.put("bsm", task.getBsm());
+                        params.put("MXBSM", task.getMxbsm());
+                        params.put("MXMC", task.getMxmc());
+                        params.put("mxcs", task.getMxcs());
+                        params.put("ZBBH", task.getZbbh());
+                        String result = PythonExecute.Run(functionId, params);
+                        System.out.println("执行结果:" + result);
+                        if (StringUtils.isNotEmpty(result)) {
+                            result = result.replace("\r\n", "");
+                            if (!StringUtils.isEmpty(result) && result.contains("OK")) {
+                                //成功
+
+                            } else {
+                                throw new Exception(result.replace("####ERROR####", ""));
+                            }
+                            String file = result.replace("####OK####", "");
+                            zbmxMxjsrwDO.setRwzt(2);
+                            zbmxMxjsrwDO.setRwjssj(new Date());
+                            zbmxMxjsrwDO.setJgz(0.0);
+                            zbmxMxjsrwDO.setJgsj(file);
+                            zbmxMxjsrwMapper.updateZbmxMxjsrwById(zbmxMxjsrwDO);
+                            //写入任务日志
+                            zbmxMxjsrwrzDO = new ZbmxMxjsrwrzDO();
+                            zbmxMxjsrwrzDO.setMxbsm(task.getMxbsm());
+                            zbmxMxjsrwrzDO.setMxmc(task.getMxmc());
+                            zbmxMxjsrwrzDO.setRwbsm(task.getBsm());
+                            zbmxMxjsrwrzDO.setRzsj(new Date());
+                            zbmxMxjsrwrzDO.setRzlx("info");
+                            zbmxMxjsrwrzDO.setRzlr("计算完成");
+                            zbmxMxjsrwrzMapper.insert(zbmxMxjsrwrzDO);
+                        } else {
+                            throw new Exception("Python返回值为空!");
+                        }
+                    } catch (Exception ex) {
+                        //更新计算任务
+                        zbmxMxjsrwDO.setRwzt(3);
+                        zbmxMxjsrwDO.setRwjssj(new Date());
+                        zbmxMxjsrwDO.setJgsj(ex.getMessage());
+                        zbmxMxjsrwMapper.updateZbmxMxjsrwById(zbmxMxjsrwDO);
+                        //写入计算日志
+                        ZbmxMxjsrwrzDO zbmxMxjsrwrzDO = new ZbmxMxjsrwrzDO();
+                        zbmxMxjsrwrzDO.setMxbsm(task.getMxbsm());
+                        zbmxMxjsrwrzDO.setMxmc(task.getMxmc());
+                        zbmxMxjsrwrzDO.setRwbsm(task.getBsm());
+                        zbmxMxjsrwrzDO.setRzsj(new Date());
+                        zbmxMxjsrwrzDO.setRzlx("error");
+                        zbmxMxjsrwrzDO.setRzlr("计算异常:" + ex.getMessage());
+                        zbmxMxjsrwrzMapper.insert(zbmxMxjsrwrzDO);
+                    }
+                }
+                System.out.println("指标模型计算:" + task.getBsm() + "完成!!!!!!!! " + new Date().toString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 120 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/task/ZttSchedule.java

@@ -0,0 +1,120 @@
+package com.onemap.analyse.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.analyse.domain.RwztDTO;
+import com.onemap.analyse.domain.ZttDTO;
+import com.onemap.analyse.domain.ZttMbDTO;
+import com.onemap.analyse.mapper.ZttMbMapper;
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+import com.onemap.analyse.mapper.ZttMapper;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 专题图制图模块定时刷新任务
+ */
+@Component
+public class ZttSchedule {
+    //间隔时间 单位ms
+    public static final long TIME_INTERVAL = 1 * 15000;
+    //制图图片拼接时间戳格式
+    private SimpleDateFormat timeFormat = new SimpleDateFormat("yyyyMMddHHmmss");
+    //专题图出图文件夹 需要已创建好的 后面会拼接编制时间文件夹加主标题文件名
+    @Value("${Ztt.exportLocation}")
+    private String exportLocation;
+    //专题图制图python方法名标识
+    @Value("${Ztt.functionId}")
+    private String functionId;
+    @Resource
+    private ZttMapper zttMapper;
+    @Resource
+    private ZttMbMapper zttmbMapper;
+    //任务状态标识码
+    private RwztDTO Rwzt = new RwztDTO();
+    /**
+     * Scheduled 定时器参数
+     * cron表达式:指定任务在特定时间执行
+     * fixedDelay:表示上一次任务执行完成后多久再执行,参数类型long,单位:ms
+     * fixedDelayString:与fixedDelay一样,只是参数类型是String
+     * fixedRate:表示按一定的频率执行任务,参数类型long,单位:ms 如: fixedRate(5000),表示这个定时器任务每5秒执行一次
+     * fixedRateString:与fixedRate一样,只是参数类型变为String
+     * initialDelay:表示延迟多久再第一次执行任务,参数类型为long ,单位:ms
+     * initialDelayString:与initialDelay一样,只是参数类型String
+     */
+    /**
+     * @Async("name") 开启多线程
+     */
+    @Async("taskExecutor")
+//    @Transactional(rollbackFor = Exception.class)
+    @Scheduled(fixedDelay = TIME_INTERVAL)
+    public void ZttStatus() {
+        try {
+            QueryWrapper<ZttDTO> wrapper = new QueryWrapper<ZttDTO>();
+            wrapper.eq("ztzt", Rwzt.getCreate());
+            //以创建时间正序排列
+            wrapper.orderByAsc("cjsj");
+            //每次只操作一条记录
+            List<ZttDTO> ress = zttMapper.selectList(wrapper);
+            if (ress.size() > 0)
+            {
+                ZttDTO res = ress.get(0);
+                //更新数据库信息 开始时间 制图状态
+                res.setKssj(new Date());
+                res.setZtzt(Rwzt.getRun());
+                QueryWrapper<ZttDTO> update = new QueryWrapper<ZttDTO>();
+                update.eq("bsm", res.getBsm());
+                zttMapper.update(res, update);
+                //查询模板位置
+                QueryWrapper<ZttMbDTO> mb = new QueryWrapper<ZttMbDTO>();
+                mb.eq("bsm", res.getMbbsm());
+                ZttMbDTO mbDto = zttmbMapper.selectOne(mb);
+                String mbposition = mbDto.getMbwj();
+                //执行python脚本
+                String curTime = timeFormat.format(new Date());
+                Map<String, String> params = new HashMap<>();
+                params.put("bsm", res.getBsm());
+                params.put("mxd", mbposition);
+                //判断目标文件夹是否存在,不存在则创建
+                String newfile = res.getBzsj() + "\\" + res.getZbt() + curTime + ".jpg";
+                String jpgpath = exportLocation + "\\" + newfile;
+                File file = new File(jpgpath);
+                if (!file.getParentFile().exists()) {
+                    file.getParentFile().mkdirs();
+                }
+                params.put("jpg", jpgpath.replaceAll("\\\\", "/"));
+//                params.put("xzqdm", res.getXzqdm()); //市級四位 dzz
+                String result = PythonExecute.Run(functionId, params);
+                if (!StringUtils.isEmpty(result) && result.contains("OK")) {//成功
+                    //更新数据库信息 结束时间 制图状态 专题图位置
+                    res.setJssj(new Date());
+                    res.setZtzt(Rwzt.getComplete());
+                    res.setZttwj("/file/statics/专题图/产品/" + newfile.replaceAll("\\\\", "/"));
+                    QueryWrapper<ZttDTO> ztzt = new QueryWrapper<ZttDTO>();
+                    ztzt.eq("bsm", res.getBsm());
+                    zttMapper.update(res, ztzt);
+                } else {//失败
+                    //更新数据库信息 结束时间 制图状态
+                    res.setJssj(new Date());
+                    res.setZtzt(Rwzt.getError());
+                    QueryWrapper<ZttDTO> ztzt = new QueryWrapper<ZttDTO>();
+                    ztzt.eq("bsm", res.getBsm());
+                    zttMapper.update(res, ztzt);
+                }
+                System.out.println("专题图制图模块:" + res.getBsm() + "制图完成!!!!!!!! " + new Date().toString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 136 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/CalculateShpArea.java

@@ -0,0 +1,136 @@
+package com.onemap.analyse.utils;
+
+import org.geotools.data.Query;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.geotools.data.shapefile.ShapefileDataStoreFactory;
+import org.geotools.data.simple.SimpleFeatureSource;
+import org.geotools.feature.FeatureCollection;
+import org.geotools.feature.FeatureIterator;
+import org.geotools.geometry.jts.JTS;
+import org.geotools.referencing.CRS;
+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.net.MalformedURLException;
+import java.nio.charset.Charset;
+import java.text.DecimalFormat;
+
+/**
+ * @Author: siwei
+ * @Version 1.0
+ * @Date: 2023年07月19日
+ * @Description: 利用geoTools计算shp面积
+ */
+public class CalculateShpArea {
+
+    static DecimalFormat df = new DecimalFormat("#.00");
+    private final static String EPSG_CODE = "EPSG:3857";
+
+    /**
+     * 利用geoTools计算shp面积
+     *
+     * @param shpFilePath
+     * @return
+     */
+    public static double getShpArea(String shpFilePath) {
+        //此时计算出的面积单位是平方米
+        double shpArea = getArea(shpFilePath);
+        //换算成亩
+        shpArea = shpArea / 666.7;
+        return Double.valueOf(df.format(shpArea));
+    }
+
+    /**
+     * 计算shp面积
+     *
+     * @param shpFilePath
+     * @return
+     */
+    public static double getArea(String shpFilePath) {
+        //定义面积
+        double shpTotalArea = 0;
+        //读取shp文件
+        ShapefileDataStore shpStore = buildDataStore(shpFilePath);
+        try {
+            //获取shp文件坐标系
+            CoordinateReferenceSystem srcCRS = CRS.parseWKT(getCRSWkt(shpFilePath));
+            SimpleFeatureSource source = shpStore.getFeatureSource();
+            SimpleFeatureType schema = source.getSchema();
+            Query query = new Query(schema.getTypeName());
+            FeatureCollection<SimpleFeatureType, SimpleFeature> collection = source.getFeatures(query);
+            try (FeatureIterator<SimpleFeature> features = collection.features()) {
+                while (features.hasNext()) {
+                    SimpleFeature feature = features.next();
+                    Geometry geometry = (Geometry) feature.getDefaultGeometry();
+                    geometry.setSRID(4326);
+                    CoordinateReferenceSystem crsTarget = CRS.decode(EPSG_CODE);
+                    // 投影转换
+                    MathTransform transform = CRS.findMathTransform(srcCRS, crsTarget);
+                    Geometry res = JTS.transform(geometry, transform);
+                    //累加每一个面的面积
+                    shpTotalArea = shpTotalArea + res.getArea();
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (FactoryException e) {
+            e.printStackTrace();
+        } catch (TransformException e) {
+            e.printStackTrace();
+        }
+        return shpTotalArea;
+    }
+
+    /**
+     * 构建ShapeDataStore对象。
+     *
+     * @param shpFilePath shape文件路径。
+     * @return
+     */
+    public static ShapefileDataStore buildDataStore(String shpFilePath) {
+        ShapefileDataStoreFactory factory = new ShapefileDataStoreFactory();
+        try {
+            ShapefileDataStore dataStore = (ShapefileDataStore) factory
+                    .createDataStore(new File(shpFilePath).toURI().toURL());
+            if (dataStore != null) {
+                //这儿根据shp数据实际编码来自己确定
+                dataStore.setCharset(Charset.forName("UTF-8"));
+//                dataStore.setCharset(Charset.forName("GBK"));
+            }
+            return dataStore;
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 读取WKT格式的坐标系信息
+     * <p>
+     * shape文件并不是一个文件而是一堆文件,坐标系信息存储在*.prj文件,*.prj文件中存储的直接就是WKT格式的坐标系信息。
+     * <p>
+     * 也可以直接读取*.prj来获取对应的WKT格式数据
+     *
+     * @param shpFilePath
+     * @return
+     */
+    public static String getCRSWkt(String shpFilePath) {
+        ShapefileDataStore dataStore = buildDataStore(shpFilePath);
+        String wkt = null;
+        try {
+            wkt = dataStore.getSchema().getCoordinateReferenceSystem().toWKT();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return wkt;
+    }
+}

+ 37 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/DownloadUtils.java

@@ -0,0 +1,37 @@
+package com.onemap.analyse.utils;
+
+import com.onemap.common.core.utils.StringUtils;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.nio.file.Files;
+
+public class DownloadUtils {
+    public static void download(HttpServletResponse response, String filepath, String name){
+        try{
+            filepath = StringUtils.getFileAbsolutePath(filepath);
+            File file = new File(filepath);
+            // 取得文件名。
+            String filename = file.getName();
+            // 取得文件的后缀名。
+            String ext = filename.substring(filename.lastIndexOf(".") + 1).toUpperCase();
+            // 以流的形式下载文件。
+            InputStream fis = new BufferedInputStream(new FileInputStream(filepath));
+            byte[] buffer = new byte[fis.available()];
+            fis.read(buffer);
+            fis.close();
+            // 清空response
+            response.reset();
+            // 设置response的Header
+            response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes()));
+            response.addHeader("Content-Length", "" + file.length());
+            OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
+            response.setContentType("application/octet-stream");
+            toClient.write(buffer);
+            toClient.flush();
+            toClient.close();
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+}

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

@@ -0,0 +1,72 @@
+package com.onemap.analyse.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;
+    }
+}

+ 86 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/EsriJsonUtils.java

@@ -0,0 +1,86 @@
+package com.onemap.analyse.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.onemap.analyse.domain.ESRI.EsriFeature;
+import com.onemap.analyse.domain.ESRI.EsriGeometry;
+import com.onemap.analyse.domain.ESRI.EsriJsonModel;
+import com.onemap.analyse.domain.ESRI.EsriSpatialReference;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class EsriJsonUtils {
+    /**
+     * txt转esrijson
+     *
+     * @param strlist [坐标参数]
+     *                坐标系=4490
+     *                坐标点转换=x,y
+     *                [Attributes]
+     *                ID,编码,Integer,,1
+     *                NAME,名称,String,50,地块
+     *                MJ,面积,Double,,12.5689
+     *                BZ,备注,String,255,
+     *                [Polygon]
+     *                122.07107409700001,43.658004028999969
+     *                122.07261133099992,43.653016499000017
+     *                122.06875335100008,43.649923323999978
+     *                122.06261982500004,43.65171903000001
+     *                122.06533448800005,43.657816022000091
+     *                122.07107409700001,43.658004028999969
+     * @return
+     */
+    public static String arrayToJson(List<String> strlist) {
+        Integer wkid = 4490;
+        EsriJsonModel model = new EsriJsonModel();
+        EsriSpatialReference reference = new EsriSpatialReference();
+        List<EsriFeature> features = new ArrayList<>();
+        EsriFeature feature = new EsriFeature();
+        EsriGeometry geometry = new EsriGeometry();
+        Map<String, Object> attributes = new HashMap<>();
+        List<List<List<Double>>> rings = new ArrayList<>();
+        List<List<Double>> ring = new ArrayList<>();
+        String str = "";
+        String curmodel = "";
+        for (int i = 0; i < strlist.size(); i++) {
+            str = strlist.get(i);
+            if ("[坐标参数]".equals(str)) {
+                wkid = Integer.valueOf(strlist.get(i + 1).split("=")[1]);
+                i = i + 2;
+                continue;
+            } else if ("[Attributes]".equals(str)) {
+                curmodel = "attr";
+                continue;
+            } else if ("[Polygon]".equals(str)) {
+                curmodel = "area";
+                if(ring.size() > 0){
+                    rings.add(ring);
+                    ring = new ArrayList<>();
+                }
+                continue;
+            }
+            if("attr".equals(curmodel)){
+                String[] arr = str.split(",");
+                attributes.put(arr[0],arr[arr.length - 1]);
+            }else if("area".equals(curmodel)){
+                String[] arr = str.split(",");
+                List<Double> r = new ArrayList<>();
+                r.add(Double.valueOf(arr[0]));
+                r.add(Double.valueOf(arr[1]));
+                ring.add(r);
+            }
+        }
+        rings.add(ring);
+        feature.setAttributes(attributes);
+        geometry.setRings(rings);
+        feature.setGeometry(geometry);
+        reference.setLatestWkid(wkid);
+        reference.setWkid(wkid);
+        features.add(feature);
+        model.setFeatures(features);
+        model.setSpatialReference(reference);
+        return JSON.toJSONString(model);
+    }
+}

+ 28 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/FileUtils.java

@@ -0,0 +1,28 @@
+package com.onemap.analyse.utils;
+
+import java.io.File;
+
+public class FileUtils {
+    public static boolean check(String filepath) {
+        File file = new File(filepath);
+        if (file.exists()) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public static void makedir(String filepath) {
+        File tempFile = new File(filepath);
+        if (!tempFile.exists()) {
+            tempFile.mkdirs();
+        }
+    }
+
+    public static void deldir(String filepath) {
+        File tempFile = new File(filepath);
+        if (tempFile.exists()) {
+            tempFile.delete();
+        }
+    }
+}

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

@@ -0,0 +1,43 @@
+package com.onemap.analyse.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());
+
+
+}

+ 243 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/Fxfw2SdeUtils.java

@@ -0,0 +1,243 @@
+package com.onemap.analyse.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.onemap.analyse.domain.*;
+import com.onemap.analyse.domain.ESRI.EsriFeature;
+import com.onemap.analyse.domain.ESRI.EsriField;
+import com.onemap.analyse.domain.ESRI.EsriGeometry;
+import com.onemap.analyse.domain.ESRI.EsriJsonModel;
+import com.onemap.analyse.domain.GeoJSON.Geometry;
+import com.onemap.analyse.task.PythonExecute;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.domain.RequestResult;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class Fxfw2SdeUtils {
+    public static String temp;
+
+    public String getTemp() {
+        return temp;
+    }
+
+    @Value("${Hgxfx.temp}")
+    public void setTemp(String temp) {
+        Fxfw2SdeUtils.temp = temp;
+    }
+
+    static FxfwDictDTO fxfwDictDTO = new FxfwDictDTO();
+    //shp入库的方法标识码
+    static String shpPyFun = "shp2sde";
+    //esrijson入库的方法标识码
+    static String esrijsonPyFun = "esriJson2sde";
+
+    /**
+     * 合规性分析范围数据入库
+     *
+     * @param hgxfxEntityDTO
+     * @param requestHgxfxDTO
+     * @return
+     * @throws IOException
+     */
+    public static RequestResult vector2Sde(HgxfxEntityDTO hgxfxEntityDTO, HgxfxDTO requestHgxfxDTO) throws IOException {
+        Integer fwlx = hgxfxEntityDTO.getFwlx();
+        String vectorFilePath = "";
+        String pyResult = "";
+        if (fxfwDictDTO.getDraw().equals(fwlx)) {//自定义绘制范围
+            EsriJsonModel esriModel = new EsriJsonModel();
+            //字段汉化
+            Map<String, String> fieldAliases = new HashMap<>();
+            fieldAliases.put("RWBSM", "RWBSM");
+            fieldAliases.put("RWLX", "RWLX");
+            esriModel.setFieldAliases(fieldAliases);
+            //geojson绘制范围转换
+            String xzfw = hgxfxEntityDTO.getXzfw();
+            if (xzfw.contains(";")) {//多个分析范围
+                String[] xzfws = xzfw.split(";");
+                //要素
+                List<EsriFeature> features = new ArrayList<>();
+                for (int i = 0; i < xzfws.length; i++) {
+                    if (StringUtils.isEmpty(xzfws[i])) {
+                        continue;
+                    }
+                    JSONObject geojson = new JSONObject(JSON.parseObject(xzfws[i]));
+                    Geometry geom = (Geometry) JSONObject.toJavaObject(geojson, Geometry.class);
+                    //字段信息
+                    List<EsriField> fields = new ArrayList<EsriField>();
+                    fields.add(new EsriField().init("RWBSM", "RWBSM"));
+                    fields.add(new EsriField().init("RWLX", "RWLX"));
+                    esriModel.setFields(fields);
+                    EsriFeature feature = new EsriFeature();
+                    Map<String, Object> attributes = new HashMap<>();
+                    attributes.put("RWBSM", requestHgxfxDTO.getBsm());
+                    attributes.put("RWLX", "合规性分析");
+                    feature.setAttributes(attributes);
+                    EsriGeometry geometry = new EsriGeometry();
+                    geometry.setRings(geom.getCoordinates());
+                    feature.setGeometry(geometry);
+                    features.add(feature);
+                }
+                esriModel.setFeatures(features);
+            } else {//单个分析范围
+                JSONObject geojson = new JSONObject(JSON.parseObject(hgxfxEntityDTO.getXzfw()));
+                Geometry geom = (Geometry) JSONObject.toJavaObject(geojson, Geometry.class);
+                //字段信息
+                List<EsriField> fields = new ArrayList<EsriField>();
+                fields.add(new EsriField().init("RWBSM", "RWBSM"));
+                fields.add(new EsriField().init("RWLX", "RWLX"));
+                esriModel.setFields(fields);
+                //要素
+                List<EsriFeature> features = new ArrayList<>();
+                EsriFeature feature = new EsriFeature();
+                Map<String, Object> attributes = new HashMap<>();
+                attributes.put("RWBSM", requestHgxfxDTO.getBsm());
+                attributes.put("RWLX", "合规性分析");
+                feature.setAttributes(attributes);
+                EsriGeometry geometry = new EsriGeometry();
+                geometry.setRings(geom.getCoordinates());
+                feature.setGeometry(geometry);
+                features.add(feature);
+                esriModel.setFeatures(features);
+            }
+            vectorFilePath = temp + "\\" + System.currentTimeMillis() + ".json";
+
+            //写入文件
+            FileOutputStream fos = null;
+            String fileinput = JSON.toJSONString(esriModel);
+            Boolean writeStatus = true;
+            try {
+                fos = new FileOutputStream(vectorFilePath, false);
+                //true表示在文件末尾追加
+                fos.write(fileinput.toString().getBytes());
+                fos.close();
+            } catch (FileNotFoundException e) {
+                fos.close();
+                e.printStackTrace();
+                writeStatus = false;
+            }
+            if (!writeStatus) {
+                return RequestResult.error("自定义范围数据转换失败", null);
+            }
+            Map<String, String> params = new HashMap<>();
+            params.put("json", vectorFilePath);
+            params.put("table", "KJGH.T_FZSS_FXRW_GIS");
+            pyResult = PythonExecute.RunGisHelper(esrijsonPyFun, params);
+        } else if (fxfwDictDTO.getShp().equals(fwlx)) {//shp文件
+            vectorFilePath = hgxfxEntityDTO.getXzfw();
+            List<Field> listField = new ArrayList<Field>();
+            listField.add(new Field().init("RWBSM", requestHgxfxDTO.getBsm()));
+            listField.add(new Field().init("RWLX", "合规性分析"));
+            Map<String, Object> params = new HashMap<>();
+            params.put("shpfile", vectorFilePath);
+            params.put("table", "KJGH.T_FZSS_FXRW_GIS");
+            params.put("fields", listField);
+            pyResult = PythonExecute.RunGisHelper(shpPyFun, params);
+        } else {
+            return RequestResult.error("分析类型未定义", null);
+        }
+        if (pyResult.contains("####OK####")) {
+            //return RequestResult.success("分析范围数据入库成功",1);
+        } else if (pyResult.contains("####ERROR####")) {
+            return RequestResult.error("分析范围数据入库失败", 0);
+        }
+        System.out.println("合规性分析范围要素插入成功!! RWBSM = " + requestHgxfxDTO.getBsm());
+        return null;
+    }
+
+    /**
+     * 辅助选址分析范围数据入库
+     *
+     * @param fzxzDTO
+     * @return
+     * @throws IOException
+     */
+    public static RequestResult fzxzvector2Sde(FzxzDTO fzxzDTO, String rwlx) throws IOException {
+        Integer fwlx = fzxzDTO.getFwlx();
+        rwlx = StringUtils.isEmpty(rwlx) ? "辅助选址" : rwlx;
+        String vectorFilePath = "";
+        String pyResult = "";
+        if (fxfwDictDTO.getRegion().equals(fwlx)) {
+
+        } else if (fxfwDictDTO.getDraw().equals(fwlx)) {//自定义绘制范围
+            EsriJsonModel esriModel = new EsriJsonModel();
+            //字段汉化
+            Map<String, String> fieldAliases = new HashMap<>();
+            fieldAliases.put("RWBSM", "RWBSM");
+            fieldAliases.put("RWLX", "RWLX");
+            esriModel.setFieldAliases(fieldAliases);
+            //geojson绘制范围转换
+            JSONObject geojson = new JSONObject(JSON.parseObject(fzxzDTO.getXzfw()));
+            Geometry geom = (Geometry) JSONObject.toJavaObject(geojson, Geometry.class);
+            //字段信息
+            List<EsriField> fields = new ArrayList<EsriField>();
+            fields.add(new EsriField().init("RWBSM", "RWBSM"));
+            fields.add(new EsriField().init("RWLX", "RWLX"));
+            esriModel.setFields(fields);
+            //要素
+            List<EsriFeature> features = new ArrayList<>();
+            EsriFeature feature = new EsriFeature();
+            Map<String, Object> attributes = new HashMap<>();
+            attributes.put("RWBSM", fzxzDTO.getBsm());
+            attributes.put("RWLX", rwlx);
+            feature.setAttributes(attributes);
+            EsriGeometry geometry = new EsriGeometry();
+            geometry.setRings(geom.getCoordinates());
+            feature.setGeometry(geometry);
+            features.add(feature);
+            esriModel.setFeatures(features);
+            vectorFilePath = temp + "\\" + System.currentTimeMillis() + ".json";
+            //写入文件
+            FileOutputStream fos = null;
+            String fileinput = JSON.toJSONString(esriModel);
+            Boolean writeStatus = true;
+            try {
+                fos = new FileOutputStream(vectorFilePath, false);
+                //true表示在文件末尾追加
+                fos.write(fileinput.toString().getBytes());
+                fos.close();
+            } catch (FileNotFoundException e) {
+                fos.close();
+                e.printStackTrace();
+                writeStatus = false;
+            }
+            if (!writeStatus) {
+                return RequestResult.error("自定义范围数据转换失败", null);
+            }
+            Map<String, String> params = new HashMap<>();
+            params.put("json", vectorFilePath);
+            params.put("table", "KJGH.T_FZSS_FXRW_GIS");
+            pyResult = PythonExecute.RunGisHelper(esrijsonPyFun, params);
+            fzxzDTO.setXzfw("");
+        } else if (fxfwDictDTO.getShp().equals(fwlx)) {//shp文件
+            vectorFilePath = fzxzDTO.getXzfw();
+            List<Field> listField = new ArrayList<Field>();
+            listField.add(new Field().init("RWBSM", fzxzDTO.getBsm()));
+            listField.add(new Field().init("RWLX", rwlx));
+            Map<String, Object> params = new HashMap<>();
+            params.put("shpfile", vectorFilePath);
+            params.put("table", "KJGH.T_FZSS_FXRW_GIS");
+            params.put("fields", listField);
+            pyResult = PythonExecute.RunGisHelper(shpPyFun, params);
+            fzxzDTO.setXzfw("");
+        } else {
+            return RequestResult.error("分析类型未定义", null);
+        }
+        if (pyResult.contains("####OK####")) {
+
+        } else if (pyResult.contains("####ERROR####")) {
+            return RequestResult.error("分析范围数据入库失败", 0);
+        }
+        System.out.println("辅助选址分析范围要素插入成功!! RWBSM = " + fzxzDTO.getBsm());
+        return null;
+    }
+}

+ 84 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/HttpUtil.java

@@ -0,0 +1,84 @@
+package com.onemap.analyse.utils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.net.URLDecoder;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+public class HttpUtil {
+    /**
+     * 获取请求的ip
+     *
+     * @param request
+     * @return
+     */
+    public static String getRequestIp(HttpServletRequest request) {
+        String ip = request.getHeader("x-forwarded-for");
+        Map<String, String> headers = getHeadersInfo(request);
+        //判断程序应用访问,以系统集成优先
+        String Origin = headers.get("origin") != null ? headers.get("origin") : headers.get("referer");
+        if (Origin != null) {
+            ip = Origin.split("//")[1].split(":")[0];
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("Proxy-Client-IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("WL-Proxy-Client-IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("HTTP_CLIENT_IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getRemoteAddr();
+        }
+        return ip;
+    }
+
+    /**
+     * 获取请求头信息
+     *
+     * @param request
+     * @return
+     */
+    public static Map<String, String> getHeadersInfo(HttpServletRequest request) {
+        Map<String, String> map = new HashMap<String, String>();
+        Enumeration headerNames = request.getHeaderNames();
+        while (headerNames.hasMoreElements()) {
+            String key = (String) headerNames.nextElement();
+            String value = request.getHeader(key);
+            map.put(key, value);
+        }
+        return map;
+    }
+
+    /**
+     * 获取地址栏参数
+     *
+     * @param url
+     * @return
+     */
+    public static Map<String, Object> getParameter(String url) {
+        Map<String, Object> map = new HashMap<String, Object>();
+        try {
+            final String charset = "utf-8";
+            url = URLDecoder.decode(url, charset);
+            if (url.indexOf('?') != -1) {
+                final String contents = url.substring(url.indexOf('?') + 1);
+                String[] keyValues = contents.split("&");
+                for (int i = 0; i < keyValues.length; i++) {
+                    String key = keyValues[i].substring(0, keyValues[i].indexOf("="));
+                    String value = keyValues[i].substring(keyValues[i].indexOf("=") + 1);
+                    map.put(key, value);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return map;
+    }
+}

+ 514 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/NpoiHelper.java

@@ -0,0 +1,514 @@
+package com.onemap.analyse.utils;
+
+import com.aspose.words.*;
+import com.onemap.common.core.utils.StringUtils;
+import org.apache.poi.xwpf.usermodel.*;
+import org.apache.poi.xwpf.usermodel.LineSpacingRule;
+import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
+import org.aspectj.weaver.ast.Test;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
+
+import java.io.*;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public class NpoiHelper {
+    /**
+     * 添加段落
+     *
+     * @param document
+     * @param text
+     * @param option
+     * @return
+     */
+    public static XWPFParagraph newParagraph(XWPFDocument document, String text, Option option) {
+        if (option == null)
+            option = new Option();
+        List<String> list = new ArrayList<String>() {
+            {
+                add(text);
+            }
+        };
+        return newParagraph(document, list, option);
+    }
+
+    /// <summary>
+    /// 添加段落
+    /// </summary>
+    /// <param name="document"></param>
+    /// <param name="texts">多行文本</param>
+    /// <param name="option">参数</param>
+    /// <returns></returns>
+    public static XWPFParagraph newParagraph(XWPFDocument document, List<String> texts, Option option) {
+        if (option == null)
+            option = new Option();
+
+        XWPFParagraph paragraph = document.createParagraph();//创建段落对象
+        paragraph.setAlignment(option.getAlign());//文字显示位置,段落排列(左对齐,居中,右对齐)
+        paragraph.setSpacingBetween(option.getRowSpacing(), LineSpacingRule.AUTO);
+        //if (texts[0].StartsWith("\t"))
+        //{
+        //    paragraph.IndentationFirstLine = 400;
+        //}
+
+        for (int i = 0; i < texts.size(); i++) {
+            XWPFRun xwpfRun = paragraph.createRun();//创建段落文本对象
+            xwpfRun.setBold(option.isBold);//文字加粗
+            xwpfRun.setText(texts.get(i));//填充内容
+            xwpfRun.setFontSize(option.getFontSize());//设置文字大小
+            xwpfRun.setItalic(option.isItalic());//是否设置斜体(字体倾斜)
+            xwpfRun.setColor(option.getFontColor());//设置字体颜色--十六进制
+            xwpfRun.setFontFamily(option.getFontFamily(), XWPFRun.FontCharRange.eastAsia); //设置标题样式如:(微软雅黑,隶书,楷体)根据自己的需求而定
+            if (i < texts.size() - 1)
+                xwpfRun.addCarriageReturn();
+        }
+        return paragraph;
+    }
+
+    /**
+     * 设置表格字体样式
+     *
+     * @param table
+     * @param text
+     * @param option
+     * @return
+     */
+    public static XWPFParagraph setCellText(XWPFTable table, String text, Option option) {
+        if (option == null)
+            option = new Option();
+
+        //table中的文字格式设置
+        XWPFParagraph pCell = new XWPFParagraph(CTP.Factory.newInstance(), table.getBody());
+        pCell.setWordWrapped(true);
+        pCell.setAlignment(option.getAlign()); //字体居中
+        pCell.setVerticalAlignment(TextAlignment.CENTER);//字体居中
+        //pCell.setSpacingBetween(option.RowSpacing, LineSpacingRule.AUTO);
+
+        XWPFRun xwpfRun = pCell.createRun();//创建段落文本对象
+        xwpfRun.setBold(option.isBold());//文字加粗
+        xwpfRun.setText(text);//填充内容
+        xwpfRun.setFontSize(option.getFontSize());//设置文字大小
+        xwpfRun.setItalic(option.isItalic());//是否设置斜体(字体倾斜)
+        xwpfRun.setColor(option.getFontColor());//设置字体颜色--十六进制
+        xwpfRun.setFontFamily(option.getFontFamily(), XWPFRun.FontCharRange.ascii); //设置标题样式如:(微软雅黑,隶书,楷体)根据自己的需求而定
+
+
+        return pCell;
+    }
+
+    /**
+     * 通用表格
+     *
+     * @param document
+     * @param tableTitle
+     * @param datas
+     * @param title
+     * @param pos
+     * @return
+     */
+    public static XWPFTable setComTable(XWPFDocument document, List<TableTitle> tableTitle
+            , List<Map<String, Object>> datas, String title, int pos) {
+        //标题
+        if (!StringUtils.isEmpty(title) && pos > -1) {
+            Option option = new Option();
+            option.setAlign(ParagraphAlignment.CENTER);
+            option.setRowSpacing(1);
+            document.setParagraph(newParagraph(document, title, option), pos);
+        }
+        //表格
+        XWPFTable table = document.createTable(1, tableTitle.size());
+        table.setWidth(tableTitle.stream().mapToInt(TableTitle::getWidth).sum());
+        //表头
+        for (int i = 0; i < tableTitle.size(); i++) {
+
+            XWPFTableCell cell = table.getRow(0).getCell(i);
+
+            CTTcPr ctTcPr = cell.getCTTc().isSetTcPr() ? cell.getCTTc().getTcPr() : cell.getCTTc().addNewTcPr();
+            CTTblWidth ctTblWidth = ctTcPr.addNewTcW();
+            int width = tableTitle.get(i).getWidth();
+            ctTblWidth.setW(BigInteger.valueOf(width));
+            ctTblWidth.setType(STTblWidth.DXA);
+
+            cell.setColor("DBE5F1");
+            Option option = new Option();
+            option.setBold(true);
+            option.setAlign(ParagraphAlignment.CENTER);
+            XWPFParagraph paragraph = setCellText(table, tableTitle.get(i).getName(), option);
+            cell.setParagraph(paragraph);
+        }
+
+        //内容
+        for (int row = 0; row < datas.size(); row++) {
+            XWPFTableRow mr = table.createRow();
+            for (int col = 0; col < tableTitle.size(); col++) {
+                TableTitle cobj = tableTitle.get(col);
+                XWPFTableCell cell = mr.getCell(col);
+                Object o = datas.get(row).get(cobj.key);
+                String text = o == null ? "" : o.toString();
+                if (cobj.xsw > -1) {
+                    BigDecimal bd = new BigDecimal(Double.parseDouble(text));
+                    Double f1 = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                    text = f1.toString();
+                }
+                Option option = new Option();
+                option.setAlign(cobj.align);
+                XWPFParagraph paragraph = setCellText(table, text, option);
+                cell.setParagraph(paragraph);
+            }
+        }
+        return table;
+    }
+
+    /**
+     * 跨列合并
+     *
+     * @param table
+     * @param row
+     * @param fromCell
+     * @param toCell
+     */
+    public static void mergeHorizontal(XWPFTable table, int row, int fromCell, int toCell) {
+        for (int cellIndex = fromCell; cellIndex <= toCell; cellIndex++) {
+            XWPFTableCell cell = table.getRow(row).getCell(cellIndex);
+            if (cellIndex == fromCell) {
+                cell.getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.RESTART);
+            } else {
+                cell.getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.CONTINUE);
+            }
+        }
+    }
+
+    /**
+     * 跨行合并
+     *
+     * @param table
+     * @param col
+     * @param fromRow
+     * @param toRow
+     */
+    public void mergeVertically(XWPFTable table, int col, int fromRow, int toRow) {
+        for (int rowIndex = fromRow; rowIndex <= toRow; rowIndex++) {
+            XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
+            if (rowIndex == fromRow) {
+                cell.getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.RESTART);
+            } else {
+                cell.getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.CONTINUE);
+            }
+        }
+        //合并后垂直居中
+        table.getRow(fromRow).getCell(col).setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
+    }
+
+    /**
+     * 跨行合并
+     *
+     * @param table
+     * @param col
+     * @param fromRow
+     * @param toRow
+     */
+    public static void mergeCellsVertically(XWPFTable table, int col, int fromRow, int toRow) {
+        for (int rowIndex = fromRow; rowIndex <= toRow; rowIndex++) {
+            XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
+            CTTc cttc = cell.getCTTc();
+            if (cttc.getTcPr() == null) {
+                cttc.addNewTcPr();
+            }
+            //第一个合并单元格用重启合并值设置
+            if (rowIndex == fromRow) {
+                cell.getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.RESTART);
+            } else {
+                //合并第一个单元格的单元被设置为“继续”
+                cell.getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.CONTINUE);
+            }
+        }
+    }
+
+    /**
+     * 标题
+     *
+     * @param document
+     * @param title
+     * @param pos
+     */
+
+    public static void title(XWPFDocument document, String title, int pos) {
+        List list = new ArrayList<String>() {
+            {
+                add("");
+                add(title);
+            }
+        };
+        Option option = new Option();
+        option.setFontSize(19);
+        option.setAlign(ParagraphAlignment.CENTER);
+        option.setBold(true);
+        document.setParagraph(newParagraph(document, list, option), pos);
+    }
+
+    /**
+     * 目录
+     *
+     * @param document
+     * @param text
+     * @param pos
+     */
+    public static void catalog(XWPFDocument document, String text, int pos) {
+        Option option = new Option();
+        option.setFontSize(14);
+        option.setBold(true);
+        document.setParagraph(newParagraph(document, text, option), pos);
+    }
+
+    /**
+     * 内容
+     *
+     * @param document
+     * @param count
+     * @param pos
+     */
+    public static void content(XWPFDocument document, String count, int pos) {
+        document.setParagraph(newParagraph(document, count, null), pos);
+    }
+
+    /**
+     * 内容
+     *
+     * @param document
+     * @param contents
+     * @param pos
+     */
+    public static void content(XWPFDocument document, List<String> contents, int pos) {
+        document.setParagraph(newParagraph(document, contents, null), pos);
+    }
+
+    // 选项类
+    public static class Option {
+        public Option() {
+            setAlign(ParagraphAlignment.LEFT);
+            setBold(false);
+            setFontColor("000000");
+            setFontFamily("宋体");
+            setRowSpacing(1.5);
+            setFontSize(12);
+        }
+
+        // 水平对齐
+        private ParagraphAlignment align;
+        // 文字加粗
+        private boolean isBold;
+        // 文字斜体
+        private boolean isItalic;
+        // 字体大小(默认小四 12)
+        private int fontSize;
+        // 字体(宋体,微软雅黑,隶书,楷体)
+        private String fontFamily;
+        // 字体颜色(十六进制)
+        private String fontColor;
+        // 行间距(默认1.5)
+        private double rowSpacing;
+
+        public ParagraphAlignment getAlign() {
+            return align;
+        }
+
+        public void setAlign(ParagraphAlignment align) {
+            this.align = align;
+        }
+
+        public boolean isBold() {
+            return isBold;
+        }
+
+        public void setBold(boolean bold) {
+            isBold = bold;
+        }
+
+        public boolean isItalic() {
+            return isItalic;
+        }
+
+        public void setItalic(boolean italic) {
+            isItalic = italic;
+        }
+
+        public int getFontSize() {
+            return fontSize;
+        }
+
+        public void setFontSize(int fontSize) {
+            this.fontSize = fontSize;
+        }
+
+        public String getFontFamily() {
+            return fontFamily;
+        }
+
+        public void setFontFamily(String fontFamily) {
+            this.fontFamily = fontFamily;
+        }
+
+        public String getFontColor() {
+            return fontColor;
+        }
+
+        public void setFontColor(String fontColor) {
+            this.fontColor = fontColor;
+        }
+
+        public double getRowSpacing() {
+            return rowSpacing;
+        }
+
+        public void setRowSpacing(double rowSpacing) {
+            this.rowSpacing = rowSpacing;
+        }
+    }
+
+    // 表格头
+    public static class TableTitle {
+        public TableTitle() {
+            setAlign(ParagraphAlignment.LEFT);
+            setWidth(1000);
+            setXsw(-1);
+        }
+
+        ;
+        // 主键
+        private String key;
+        // 名称
+        private String name;
+        /// 水平对齐
+        private ParagraphAlignment align;
+        /// 宽
+        private int width;
+        /// 小数位(-1表示不计算,通常为汉字)
+        private int xsw;
+
+        public String getKey() {
+            return key;
+        }
+
+        public void setKey(String key) {
+            this.key = key;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public ParagraphAlignment getAlign() {
+            return align;
+        }
+
+        public void setAlign(ParagraphAlignment align) {
+            this.align = align;
+        }
+
+        public int getWidth() {
+            return width;
+        }
+
+        public void setWidth(int width) {
+            this.width = width;
+        }
+
+        public int getXsw() {
+            return xsw;
+        }
+
+        public void setXsw(int xsw) {
+            this.xsw = xsw;
+        }
+    }
+
+    public static boolean getLicense() {
+        boolean result = false;
+        InputStream is = null;
+        try {
+            String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
+                    "<License>\n" +
+                    "    <Data>\n" +
+                    "        <Products>\n" +
+                    "            <Product>Aspose.Total for Java</Product>\n" +
+                    "            <Product>Aspose.Words for Java</Product>\n" +
+                    "        </Products>\n" +
+                    "        <EditionType>Enterprise</EditionType>\n" +
+                    "        <SubscriptionExpiry>20991231</SubscriptionExpiry>\n" +
+                    "        <LicenseExpiry>20991231</LicenseExpiry>\n" +
+                    "        <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>\n" +
+                    "    </Data>\n" +
+                    "    <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>\n" +
+                    "</License>\n";
+            is = new ByteArrayInputStream(xml.getBytes());
+            License aposeLic = new License();
+            aposeLic.setLicense(is);
+            result = true;
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (is != null) {
+                try {
+                    is.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return result;
+    }
+
+    public static boolean doc2pdf(String inPath, String outPath) {
+        if (!getLicense()) { // 验证License 若不验证则转化出的pdf文档会有水印产生
+            return false;
+        }
+        FileOutputStream os = null;
+        try {
+            //取用户字体目录
+            String userfontsfoloder = System.getProperty("user.home") + "\\Microsoft\\Windows\\Fonts\\";
+            System.out.println("userfontsfoloder:" + userfontsfoloder);
+            FontSourceBase[] fontSourceBases = FontSettings.getDefaultInstance().getFontsSources();
+            FontSourceBase[] updatedFontSources = new FontSourceBase[FontSettings.getDefaultInstance().getFontsSources().length + 1];
+
+            //将用户目录字体添加到字体源中
+            FolderFontSource folderFontSource = new FolderFontSource(userfontsfoloder, true);
+
+            for (int i = 0; i < fontSourceBases.length; i++) {
+                updatedFontSources[i] = fontSourceBases[i];
+            }
+            updatedFontSources[fontSourceBases.length] = folderFontSource;
+
+            FontSettings.getDefaultInstance().setFontsSources(updatedFontSources);
+
+            long old = System.currentTimeMillis();
+            File file = new File(outPath); // 新建一个空白pdf文档
+            os = new FileOutputStream(file);
+            com.aspose.words.Document doc = new com.aspose.words.Document(inPath); // Address是将要被转化的word文档
+            doc.save(os, SaveFormat.PDF);// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,
+            // EPUB, XPS, SWF 相互转换
+            long now = System.currentTimeMillis();
+            System.out.println("pdf转换成功,共耗时:" + ((now - old) / 1000.0) + "秒"); // 转化用时
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        } finally {
+            if (os != null) {
+                try {
+                    os.flush();
+                    os.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return true;
+    }
+}

+ 102 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/NumberUtil.java

@@ -0,0 +1,102 @@
+package com.onemap.analyse.utils;
+
+import java.math.BigDecimal;
+
+public class NumberUtil {
+    private NumberUtil() { }
+
+    /**
+     * 中文数字
+     */
+    private static final String[] CN_NUM = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
+
+    /**
+     * 中文数字单位
+     */
+    private static final String[] CN_UNIT = {"", "十", "百", "千", "万", "十", "百", "千", "亿", "十", "百", "千"};
+
+    /**
+     * 特殊字符:负
+     */
+    private static final String CN_NEGATIVE = "负";
+
+    /**
+     * 特殊字符:点
+     */
+    private static final String CN_POINT = "点";
+
+
+    /**
+     * int 转 中文数字
+     * 支持到int最大值
+     *
+     * @param intNum 要转换的整型数
+     * @return 中文数字
+     */
+    public static String int2chineseNum(int intNum) {
+        StringBuffer sb = new StringBuffer();
+        StringBuffer sb2 = new StringBuffer();
+        int intNum2 = intNum;
+        boolean isNegative = false;
+        if (intNum < 0) {
+            isNegative = true;
+            intNum *= -1;
+        }
+        int count = 0;
+        while(intNum > 0) {
+            sb.insert(0, CN_NUM[intNum % 10] + CN_UNIT[count]);
+            intNum = intNum / 10;
+            count++;
+        }
+
+        if (isNegative)
+            sb.insert(0, CN_NEGATIVE);
+        // 10-19时,得到十~十九而不是一十~一十九
+        sb = "一".equals(sb.substring(0,1)) && intNum2 < 100 && intNum2 > 1 ? sb2.append(sb.substring(1, sb.length())) : sb;
+        return sb.toString().replaceAll("零[千百十]", "零").replaceAll("零+万", "万")
+                .replaceAll("零+亿", "亿").replaceAll("亿万", "亿零")
+                .replaceAll("零+", "零").replaceAll("零$", "");
+    }
+
+    /**
+     * bigDecimal 转 中文数字
+     * 整数部分只支持到int的最大值
+     *
+     * @param bigDecimalNum 要转换的BigDecimal数
+     * @return 中文数字
+     */
+    public static String bigDecimal2chineseNum(BigDecimal bigDecimalNum) {
+        if (bigDecimalNum == null)
+            return CN_NUM[0];
+
+        StringBuffer sb = new StringBuffer();
+
+        //将小数点后面的零给去除
+        String numStr = bigDecimalNum.abs().stripTrailingZeros().toPlainString();
+
+        String[] split = numStr.split("\\.");
+        String integerStr = int2chineseNum( Integer.parseInt(split[0]));
+
+        sb.append(integerStr);
+
+        //如果传入的数有小数,则进行切割,将整数与小数部分分离
+        if (split.length == 2) {
+            //有小数部分
+            sb.append(CN_POINT);
+            String decimalStr = split[1];
+            char[] chars = decimalStr.toCharArray();
+            for (int i = 0; i < chars.length; i++) {
+                int index = Integer.parseInt( String.valueOf(chars[i]));
+                sb.append(CN_NUM[index]);
+            }
+        }
+
+        //判断传入数字为正数还是负数
+        int signum = bigDecimalNum.signum();
+        if (signum == -1) {
+            sb.insert(0, CN_NEGATIVE);
+        }
+
+        return sb.toString();
+    }
+}

+ 224 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/utils/PointXml2ShpUtils.java

@@ -0,0 +1,224 @@
+package com.onemap.analyse.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import com.onemap.analyse.domain.ESRI.*;
+import com.onemap.common.core.utils.Base64Utils;
+import com.onemap.common.core.utils.StringUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.ibm.icu.text.Transliterator;
+
+/**
+ * 将xml文件中gml:featureMember-->UTL_管道-->geometry解析以及字段信息组织成esrijson格式提供转换shp文件的基础能力
+ * directoryPath参数为文件夹路径,遍历文件夹内的xml文件列表,将每个xml文件转换生成一个同名的.json文件
+ * 将json文件直接转换成shp文件
+ */
+public class PointXml2ShpUtils {
+
+    public static Transliterator converter = Transliterator.getInstance("Traditional-Simplified");
+
+    public static void main(String[] args) {
+        try {
+            //中文字段转英文配置项,输出shp字段不能超过3个中文字符,增强可读性
+            Map<String, String> fielsAliasMap = new HashMap<>();
+            fielsAliasMap.put("类别码", "LBM");
+            fielsAliasMap.put("标识符", "BSF");
+            fielsAliasMap.put("管理单位", "GLDW");
+            fielsAliasMap.put("作业区分", "ZYFQ");
+            fielsAliasMap.put("设置日期", "SZRQ");
+            fielsAliasMap.put("人手孔编号", "RSKBH");
+            fielsAliasMap.put("孔盖种类", "KGZL");
+            fielsAliasMap.put("尺寸单位", "CCDW");
+            fielsAliasMap.put("盖部宽度", "GBKD");
+            fielsAliasMap.put("盖部长度", "GBCD");
+            fielsAliasMap.put("闸门名称", "ZMMC");
+            fielsAliasMap.put("地盘高", "DPG");
+            fielsAliasMap.put("孔深", "KS");
+            fielsAliasMap.put("孔盖型态", "KGXT");
+            fielsAliasMap.put("使用状态", "SYZT");
+            fielsAliasMap.put("数据状态", "SJZT");
+            fielsAliasMap.put("内容物", "NRW");
+            fielsAliasMap.put("备注", "BZ");
+//            Map<String, String> fielsAliasMap2 = new HashMap<>();
+//            fielsAliasMap2.put("類別碼", "类别码");
+//            fielsAliasMap2.put("識別字", "标识符");
+//            fielsAliasMap2.put("管理單位", "管理单位");
+//            fielsAliasMap2.put("作業區分", "作业区分");
+//            fielsAliasMap2.put("設置日期", "设置日期");
+//            fielsAliasMap2.put("人手孔編號", "人手孔编号");
+//            fielsAliasMap2.put("孔蓋種類", "孔盖种类");
+//            fielsAliasMap2.put("尺寸單位", "尺寸单位");
+//            fielsAliasMap2.put("蓋部寬度", "盖部宽度");
+//            fielsAliasMap2.put("蓋部長度", "盖部长度");
+//            fielsAliasMap2.put("閘門名稱", "闸门名称");
+//            fielsAliasMap2.put("地盤高", "地盘高");
+//            fielsAliasMap2.put("孔深", "孔深");
+//            fielsAliasMap2.put("孔蓋型態", "孔盖型态");
+//            fielsAliasMap2.put("使用狀態", "使用状态");
+//            fielsAliasMap2.put("數據狀態", "数据状态");
+//            fielsAliasMap2.put("內容物", "内容物");
+//            fielsAliasMap2.put("備註", "备注");
+            String directoryPath = "C:\\temp\\xml\\point";
+            File directory = new File(directoryPath);
+            for (File child : directory.listFiles()) {
+                if (child.getName().contains(".xml") && !child.getName().contains(".shp.xml")) {
+                    long old = System.currentTimeMillis();
+                    // 创建DOM解析器对象
+                    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+                    DocumentBuilder builder = factory.newDocumentBuilder();
+                    Document document = builder.parse("file:///" + child.getAbsolutePath());
+                    // 获取所有gml:featureMembe节点的集合
+                    NodeList featureMemberList = document.getElementsByTagName("gml:featureMember");
+                    //创建ESRIJSON
+                    EsriJsonModelPoint esriModel = new EsriJsonModelPoint();
+                    List<EsriField> fields = new ArrayList<>();
+                    List<EsriFeaturePoint> features = new ArrayList<>();
+                    String srsName = "";
+                    System.out.println(child.getName() + "文件一共有" + featureMemberList.getLength() + "个要素图斑");
+                    for (int i = 0; i < featureMemberList.getLength(); i++) {
+                        EsriFeaturePoint feature = new EsriFeaturePoint();
+                        Map<String, Object> attributes = new HashMap<>();
+                        Node featureMember = featureMemberList.item(i);
+                        //获取UTL_管道节点
+                        NodeList childNodes = featureMember.getChildNodes().item(1).getChildNodes();
+                        boolean iswritefield = false;
+                        if (fields.size() == 0) {
+                            iswritefield = true;
+                        }
+                        for (int k = 0; k < childNodes.getLength(); k++) {
+                            // 区分出text类型的node以及element类型的node
+                            if (childNodes.item(k).getNodeType() == Node.ELEMENT_NODE) {
+                                String nodename2 = childNodes.item(k).getNodeName();
+                                String nodename = nodename2;
+//                                if (fielsAliasMap2.get(nodename2) != null) {
+//                                    nodename = fielsAliasMap2.get(nodename2);
+//                                }
+//                                String s = nodename.toString();
+                                nodename = ConverterTool(nodename);
+//                                nodename = ConverterTool(nodename);
+                                if (fielsAliasMap.get(nodename) != null) {
+                                    nodename = fielsAliasMap.get(nodename);
+                                }
+                                if ("geometry".equals(nodename)) {//获取posList
+                                    String posList = childNodes.item(k).getChildNodes().item(1).getChildNodes().item(1).getFirstChild().getNodeValue();
+                                    srsName = childNodes.item(k).getChildNodes().item(1).getAttributes().getNamedItem("srsName").getNodeValue();
+                                    EsriGeometryPoint geometry = new EsriGeometryPoint();
+                                    String[] pList = posList.split(" ");
+                                    for (int u = 0; u < pList.length; u++) {
+                                        geometry.setX(Double.valueOf(pList[u]));
+                                        u++;
+                                        geometry.setY(Double.valueOf(pList[u]));
+                                        u++;
+                                    }
+                                    feature.setGeometry(geometry);
+                                } else if (childNodes.item(k).getFirstChild() != null) {
+                                    if (nodename.endsWith("RQ")) {
+                                        attributes.put(nodename, childNodes.item(k).getChildNodes().item(1).getChildNodes().item(1).getFirstChild().getNodeValue());
+                                    } else {
+                                        attributes.put(nodename, childNodes.item(k).getFirstChild().getNodeValue());
+                                    }
+                                    if (iswritefield) {
+                                        EsriField f = new EsriField();
+                                        f.setName(nodename);
+                                        for (String key : fielsAliasMap.keySet()) {
+                                            if (nodename.equals(fielsAliasMap.get(key))) {
+                                                f.setAlias(key);
+                                                break;
+                                            }
+                                        }
+                                        if (StringUtils.isNull(f.getAlias())) {
+                                            f.setAlias(nodename);
+                                        }
+                                        fields.add(f);
+                                    }
+                                }
+                            }
+                        }
+                        feature.setAttributes(attributes);
+                        features.add(feature);
+                    }
+                    EsriSpatialReference ref = new EsriSpatialReference();
+                    Integer src = Integer.valueOf(srsName.replace("EPSG:", ""));
+                    if (3826 == src) {
+                        ref.setWkid(102443);
+                    }
+                    ref.setLatestWkid(src);
+                    esriModel.setSpatialReference(ref);
+                    esriModel.setFields(fields);
+                    esriModel.setFeatures(features);
+                    //字段别名
+                    Map<String, String> fieldAliases = new HashMap<>();
+                    for (String key : fielsAliasMap.keySet()) {
+                        fieldAliases.put(fielsAliasMap.get(key), key);
+                    }
+                    esriModel.setFieldAliases(fieldAliases);
+                    String temp = directoryPath + "\\" + child.getName().replace(".xml", ".json");
+                    //写入文件
+                    FileOutputStream fos = null;
+                    String fileinput = JSON.toJSONString(esriModel);
+                    try {
+                        fos = new FileOutputStream(temp, false);
+                        fos.write(fileinput.getBytes());
+                        fos.close();
+                    } catch (FileNotFoundException e) {
+                        fos.close();
+                        e.printStackTrace();
+                    }
+                    Map<String, String> params = new HashMap<>();
+                    params.put("json", temp);
+                    params.put("shpfile", "C:\\TEMP\\xml\\point\\point.gdb\\" + child.getName().replace(".xml", ""));
+                    String msg = RunGisHelper("esriJson2shp", params);
+                    long now = System.currentTimeMillis();
+                    System.out.println(child.getName() + "转换成功,共耗时:" + ((now - old) / 1000.0) + "秒"); // 转化用时
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+//    public static void main(String[] args) {
+//        ConverterTool("類別碼");
+//    }
+
+    public static String ConverterTool(String str) {
+        // 将繁体中文转换为简体中文
+        String simplified2 = converter.transliterate(str);
+        return simplified2;
+    }
+
+    public static String RunGisHelper(String functionName, Map params) {
+        String msg = "";//返回数据
+        JSONObject json = new JSONObject(params);
+        String[] arguments = new String[]{
+                "C:\\Python27\\ArcGISx6410.7\\python.exe",
+                "D:\\Python\\gishelper.py",
+                functionName,
+                Base64Utils.base64Encode(json.toJSONString())
+        };
+        try {
+            Process process = Runtime.getRuntime().exec(arguments);
+            BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                msg = line;
+            }
+            in.close();
+            process.destroy();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return msg;
+    }
+}

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.