浏览代码

cql通用查询初始提交代码

liwh 1 年之前
当前提交
8060aa9be1
共有 30 个文件被更改,包括 1553 次插入0 次删除
  1. 47 0
      .idea/$CACHE_FILE$
  2. 2 0
      .idea/.gitignore
  3. 16 0
      .idea/checkstyle-idea.xml
  4. 5 0
      .idea/codeStyles/codeStyleConfig.xml
  5. 13 0
      .idea/compiler.xml
  6. 14 0
      .idea/misc.xml
  7. 124 0
      .idea/uiDesigner.xml
  8. 6 0
      .idea/vcs.xml
  9. 0 0
      README.md
  10. 8 0
      cql-service/cql-service.iml
  11. 168 0
      cql-service/pom.xml
  12. 13 0
      cql-service/src/main/java/cn/com/taiji/cql/CqlServiceApplication.java
  13. 29 0
      cql-service/src/main/java/cn/com/taiji/cql/config/GeoConfig.java
  14. 100 0
      cql-service/src/main/java/cn/com/taiji/cql/controller/TileEcqlController.java
  15. 100 0
      cql-service/src/main/java/cn/com/taiji/cql/model/GeoDataSource.java
  16. 38 0
      cql-service/src/main/java/cn/com/taiji/cql/model/GeoRequestParam.java
  17. 98 0
      cql-service/src/main/java/cn/com/taiji/cql/model/MergeDynamicShip.java
  18. 11 0
      cql-service/src/main/java/cn/com/taiji/cql/service/IECqlService.java
  19. 15 0
      cql-service/src/main/java/cn/com/taiji/cql/service/IGeoDataSourceService.java
  20. 9 0
      cql-service/src/main/java/cn/com/taiji/cql/service/ITileService.java
  21. 113 0
      cql-service/src/main/java/cn/com/taiji/cql/service/impl/ECqlServiceImpl.java
  22. 37 0
      cql-service/src/main/java/cn/com/taiji/cql/service/impl/GeoDataSourceServiceImpl.java
  23. 94 0
      cql-service/src/main/java/cn/com/taiji/cql/service/impl/TileServiceImpl.java
  24. 214 0
      cql-service/src/main/java/cn/com/taiji/cql/test/EcqlTest.java
  25. 96 0
      cql-service/src/main/java/cn/com/taiji/cql/test/EcqlTest2.java
  26. 8 0
      cql-service/src/main/resources/application-test.properties
  27. 9 0
      cql-service/src/main/resources/application.yml
  28. 100 0
      cql-service/src/main/resources/logback.xml
  29. 8 0
      ecql-service.iml
  30. 58 0
      pom.xml

+ 47 - 0
.idea/$CACHE_FILE$

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectInspectionProfilesVisibleTreeState">
+    <entry key="Project Default">
+      <profile-state>
+        <expanded-state>
+          <State />
+          <State>
+            <id>Android</id>
+          </State>
+          <State>
+            <id>CorrectnessLintAndroid</id>
+          </State>
+          <State>
+            <id>Gradle</id>
+          </State>
+          <State>
+            <id>Kotlin</id>
+          </State>
+          <State>
+            <id>LintAndroid</id>
+          </State>
+          <State>
+            <id>Maven</id>
+          </State>
+          <State>
+            <id>MavenMigrationKotlin</id>
+          </State>
+          <State>
+            <id>MigrationKotlin</id>
+          </State>
+          <State>
+            <id>OSGi</id>
+          </State>
+          <State>
+            <id>Probable bugsGradle</id>
+          </State>
+        </expanded-state>
+        <selected-state>
+          <State>
+            <id>Android</id>
+          </State>
+        </selected-state>
+      </profile-state>
+    </entry>
+  </component>
+</project>

+ 2 - 0
.idea/.gitignore

@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml

+ 16 - 0
.idea/checkstyle-idea.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CheckStyle-IDEA">
+    <option name="configuration">
+      <map>
+        <entry key="checkstyle-version" value="8.30" />
+        <entry key="copy-libs" value="false" />
+        <entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
+        <entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
+        <entry key="scan-before-checkin" value="false" />
+        <entry key="scanscope" value="JavaOnly" />
+        <entry key="suppress-errors" value="false" />
+      </map>
+    </option>
+  </component>
+</project>

+ 5 - 0
.idea/codeStyles/codeStyleConfig.xml

@@ -0,0 +1,5 @@
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
+  </state>
+</component>

+ 13 - 0
.idea/compiler.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="cql-service" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>

+ 14 - 0
.idea/misc.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 0 - 0
README.md


+ 8 - 0
cql-service/cql-service.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4">
+  <component name="CheckStyle-IDEA-Module">
+    <option name="configuration">
+      <map />
+    </option>
+  </component>
+</module>

+ 168 - 0
cql-service/pom.xml

@@ -0,0 +1,168 @@
+<?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>ecql-service</artifactId>
+        <groupId>cn.com.taiji</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cql-service</artifactId>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.60</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.20</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.7.19</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-main</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-cql</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-elasticsearch</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-xml</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-coverage</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-process</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-process-feature</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-jdbc</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools.jdbc</groupId>
+            <artifactId>gt-jdbc-mysql</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-sample-data</artifactId>
+            <version>${geotools.version}</version>
+        </dependency>
+
+
+
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <!--将scope 为 system的本地jar包也加入到打包jar中-->
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>locationtech-releases</id>
+            <url>https://repo.eclipse.org/content/groups/releases</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>locationtech-snapshots</id>
+            <url>https://repo.eclipse.org/content/groups/snapshots</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        <!-- geotools -->
+        <repository>
+            <id>osgeo</id>
+            <url>https://repo.osgeo.org/repository/release</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>osgeo-snapshots</id>
+            <url>https://repo.osgeo.org/repository/snapshot</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>conjars.org</id>
+            <url>http://conjars.org/repo</url>
+        </repository>
+    </repositories>
+
+
+</project>

+ 13 - 0
cql-service/src/main/java/cn/com/taiji/cql/CqlServiceApplication.java

@@ -0,0 +1,13 @@
+package cn.com.taiji.cql;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class CqlServiceApplication {
+
+    public static void main(String[] args) {
+
+        SpringApplication.run(CqlServiceApplication.class, args);
+    }
+}

+ 29 - 0
cql-service/src/main/java/cn/com/taiji/cql/config/GeoConfig.java

@@ -0,0 +1,29 @@
+package cn.com.taiji.cql.config;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@Data
+public class GeoConfig {
+
+    @Value("${geo.ds.ip}")
+    private String dsIp;
+
+    @Value("${geo.ds.port}")
+    private String dsPort;
+
+    @Value("${geo.ds.username}")
+    private String dsUsername;
+
+    @Value("${geo.ds.password}")
+    private String dsPassword;
+
+    @Value("${geo.ds.base}")
+    private String dsBase;
+
+    @Value("${geo.ds.dbtype}")
+    private String dbType;
+
+}

+ 100 - 0
cql-service/src/main/java/cn/com/taiji/cql/controller/TileEcqlController.java

@@ -0,0 +1,100 @@
+package cn.com.taiji.cql.controller;
+
+
+import cn.com.taiji.cql.model.GeoRequestParam;
+import cn.com.taiji.cql.service.ITileService;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 图层通用查询控制器
+ *
+ * @author makejava
+ * @since 2021-04-22 16:53:35
+ */
+@Slf4j
+@RestController
+public class TileEcqlController {
+
+    @Autowired
+    private ITileService tileService;
+
+
+    @RequestMapping(value = {"/queryTile"}, method = {RequestMethod.GET, RequestMethod.POST})
+    public void queryTile(HttpServletRequest request, HttpServletResponse response) {
+
+
+        GeoRequestParam geoRequestParam = JSONObject.parseObject(JSONObject.toJSONString(getParameterMap(request)), GeoRequestParam.class);
+
+        byte[] ret = tileService.tileData(geoRequestParam);
+
+        responseWrite(response, "image/png", ret);
+    }
+
+    private void responseWrite(HttpServletResponse response, String contentType, byte[] data) {
+
+        response.setStatus(200);
+        response.setContentType(contentType);
+
+        if (data != null) {
+
+            response.setContentLength(data.length);
+            ServletOutputStream out = null;
+
+            try {
+
+                out = response.getOutputStream();
+                out.write(data);
+                out.flush();
+
+            } catch (Exception e) {
+
+                e.printStackTrace();
+
+            } finally {
+
+                if (out != null)
+                    try {
+                        out.close();
+                    } catch (Exception e2) {
+
+                        e2.printStackTrace();
+
+                    }
+            }
+        }
+    }
+
+    /**
+     * 将请求参数转化为Map
+     *
+     * @param request
+     * @return
+     */
+    public static Map<String, Object> getParameterMap(HttpServletRequest request) {
+
+        Map<String, Object> param = new HashMap<>();
+        try {
+            Enumeration<String> em = request.getParameterNames();
+            while (em.hasMoreElements()) {
+                String key = em.nextElement();
+                param.put(key.toLowerCase(), request.getParameter(key));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return param;
+    }
+
+
+
+}

+ 100 - 0
cql-service/src/main/java/cn/com/taiji/cql/model/GeoDataSource.java

@@ -0,0 +1,100 @@
+package cn.com.taiji.cql.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class GeoDataSource implements Serializable {
+
+    /**
+     * 主键
+     */
+    private int id;
+
+    /**
+     * 图层代码
+     */
+    private String layerCode;
+
+    /**
+     * 图层名称
+     */
+    private String layerName;
+
+    /**
+     * 数据库地址
+     */
+    private String host;
+
+    /**
+     * 数据库类型
+     */
+    private String dbType;
+
+    /**
+     * bbox字段
+     */
+    private String bboxColumn;
+
+    /**
+     * 端口号
+     */
+    private int port;
+
+
+    /**
+     * 数据库名
+     */
+    private String dataBase;
+
+    /**
+     * 表名
+     */
+    private String tableName;
+
+
+    /**
+     * 用户名
+     */
+    private String userName;
+
+    /**
+     * 密码
+     */
+    private String userPassword;
+
+    /**
+     * 状态
+     */
+    private String status;
+
+
+    /**
+     * 创建人
+     */
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 修改人
+     */
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+
+    /**
+     * 排序
+     */
+    private int sort;
+
+}

+ 38 - 0
cql-service/src/main/java/cn/com/taiji/cql/model/GeoRequestParam.java

@@ -0,0 +1,38 @@
+package cn.com.taiji.cql.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class GeoRequestParam implements Serializable {
+
+
+    private String service = "WMS";
+
+    private String version = "1.1.1";
+
+    private String request;
+
+    private String format = "image/png8";
+
+    private boolean transparent =true;
+
+    private String layers;
+
+    private String exceptions = "application/vnd.ogc.se_inimage";
+
+    private String cqlFilter;
+
+    private long time;
+
+    private int width=256;
+
+    private int  height=256;
+
+    private String srs= "EPSG:4326";
+
+    private String styles;
+
+    private String bbox;
+}

+ 98 - 0
cql-service/src/main/java/cn/com/taiji/cql/model/MergeDynamicShip.java

@@ -0,0 +1,98 @@
+package cn.com.taiji.cql.model;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.io.Serializable;
+
+/**
+ * 船舶动态融合数据
+ * @author lxg
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class MergeDynamicShip implements Serializable {
+    private static final long serialVersionUID = -7661996382540318133L;
+
+    /**
+     * 融合数据ID
+     */
+    private String mergeId;
+
+    /**
+     * 融合时间
+     */
+    private String mergeTime;
+
+    /**
+     * 船舶唯一标识
+     */
+    private String mergeTarget;
+
+    /**
+     * 地理空间数据
+     */
+    private String location;
+
+    /**
+     * 加冰加水状态
+     */
+    private Integer supplyIceWaterState;
+
+    /**
+     * 加油状态
+     */
+    private Integer refueledState;
+
+    /**
+     * 在航状态
+     */
+    private Integer motionState;
+
+    /**
+     * 目标(航迹)可信度
+     */
+    private Integer targetTypeReliability;
+
+    /**
+     * 港口状态
+     */
+    private Integer portState;
+
+    /**
+     * 目标分类
+     */
+    private Integer targetType;
+
+
+    /**
+     * 目标长度
+     */
+    private Double targetLength;
+
+    /**
+     * 目标航速
+     */
+    private Double targetSpeed;
+
+
+    /**
+     * (GIS)地图筛选专用字段
+     */
+    private Integer gisNationality;
+
+    /**
+     * (GIS)地图筛选专用字段
+     */
+    private Integer gisShipType;
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
+    }
+}

+ 11 - 0
cql-service/src/main/java/cn/com/taiji/cql/service/IECqlService.java

@@ -0,0 +1,11 @@
+package cn.com.taiji.cql.service;
+
+
+import java.util.List;
+import java.util.Map;
+
+public interface IECqlService {
+
+
+    List<Map<String,Object>> cqlQuery(Map<String, Object> mapParams,String cql);
+}

+ 15 - 0
cql-service/src/main/java/cn/com/taiji/cql/service/IGeoDataSourceService.java

@@ -0,0 +1,15 @@
+package cn.com.taiji.cql.service;
+
+import cn.com.taiji.cql.model.GeoDataSource;
+import org.geotools.api.data.DataStore;
+
+import javax.sql.DataSource;
+
+public interface IGeoDataSourceService {
+
+    /**
+     * 基于geotools创建mysql数据源
+     * @return
+     */
+    DataSource createGeoDataSource() throws Exception;
+}

+ 9 - 0
cql-service/src/main/java/cn/com/taiji/cql/service/ITileService.java

@@ -0,0 +1,9 @@
+package cn.com.taiji.cql.service;
+
+import cn.com.taiji.cql.model.GeoRequestParam;
+
+public interface ITileService {
+
+
+    byte[] tileData(GeoRequestParam requestParam);
+}

+ 113 - 0
cql-service/src/main/java/cn/com/taiji/cql/service/impl/ECqlServiceImpl.java

@@ -0,0 +1,113 @@
+package cn.com.taiji.cql.service.impl;
+import cn.com.taiji.cql.service.IECqlService;
+import lombok.extern.slf4j.Slf4j;
+import org.geotools.api.data.DataStore;
+import org.geotools.api.data.DataStoreFinder;
+import org.geotools.api.data.SimpleFeatureSource;
+import org.geotools.api.feature.simple.SimpleFeature;
+import org.geotools.api.feature.simple.SimpleFeatureType;
+import org.geotools.api.feature.type.AttributeDescriptor;
+import org.geotools.api.filter.Filter;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.data.simple.SimpleFeatureIterator;
+import org.geotools.filter.text.ecql.ECQL;
+import org.geotools.jdbc.JDBCDataStoreFactory;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class ECqlServiceImpl implements IECqlService{
+
+    /**
+     * cql 通用查询接口
+     * @param mapParams
+     * @param cql
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> cqlQuery(Map<String, Object> mapParams, String cql) {
+
+        List<Map<String, Object>> dataList = new ArrayList<Map<String, Object>>();
+
+        DataStore dataStore = null;
+
+        String host = mapParams.get(JDBCDataStoreFactory.HOST.key).toString();
+
+        String database = mapParams.get(JDBCDataStoreFactory.DATABASE.key).toString();
+
+
+        try {
+
+            dataStore = DataStoreFinder.getDataStore(mapParams);
+
+            if (dataStore != null) {
+
+                log.info("系统连接到位于:" + host + "的空间数据库" + database + "成功!");
+
+                //根据表名获取source
+                SimpleFeatureSource fSource=dataStore.getFeatureSource(mapParams.get("tableName").toString());
+
+                Filter filter = ECQL.toFilter(cql);
+
+                SimpleFeatureCollection fCollection =fSource.getFeatures(filter);
+
+                if(fCollection !=null){
+
+
+                    SimpleFeatureIterator itertor = fCollection.features();
+
+                    while (itertor.hasNext()){
+                        //获取每一个要素
+                        SimpleFeature feature = itertor.next();
+
+                        Map<String, Object> dataMap = new HashMap<String, Object>();
+
+                        SimpleFeatureType simpleFeatureType = feature.getFeatureType();
+
+                        List<AttributeDescriptor> attributeList = simpleFeatureType.getAttributeDescriptors();
+                        for(AttributeDescriptor ad:attributeList){
+
+                            String key_ = ad.getName().toString();
+                            Object value_ = feature.getAttribute(key_);
+
+                            dataMap.put(key_,value_);
+
+                        }
+
+                        dataList.add(dataMap);
+
+
+                    }
+
+
+                }
+
+            } else {
+
+                log.info("系统连接到位于:" + host + "的空间数据库" + database + "失败!请检查相关参数");
+
+            }
+
+        }catch (Exception e) {
+
+            e.printStackTrace();
+            log.error("系统连接到位于:" + mapParams.get(JDBCDataStoreFactory.HOST.key) + "的空间数据库" + mapParams.get(JDBCDataStoreFactory.DATABASE.key) + "失败!请检查相关参数");
+
+        }finally {
+
+            if(dataStore !=null){
+
+                dataStore.dispose();
+
+            }
+        }
+
+
+        return dataList;
+    }
+}

+ 37 - 0
cql-service/src/main/java/cn/com/taiji/cql/service/impl/GeoDataSourceServiceImpl.java

@@ -0,0 +1,37 @@
+package cn.com.taiji.cql.service.impl;
+
+import cn.com.taiji.cql.config.GeoConfig;
+import cn.com.taiji.cql.service.IGeoDataSourceService;
+import lombok.extern.slf4j.Slf4j;
+import org.geotools.data.jdbc.datasource.DBCPDataSourceFactory;
+import org.geotools.data.jdbc.datasource.DataSourceFinder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import javax.sql.DataSource;
+import java.util.HashMap;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class GeoDataSourceServiceImpl implements IGeoDataSourceService {
+
+    @Autowired
+    private GeoConfig geoConfig;
+
+    @Override
+    public DataSource createGeoDataSource() throws Exception{
+
+
+        //构建mysql数据库连接数据源--DataSource
+        Map<String, Object> mapParams = new HashMap<String, Object>();
+        mapParams.put(DBCPDataSourceFactory.DSTYPE.key, "DBCP");
+        mapParams.put(DBCPDataSourceFactory.DRIVERCLASS.key, "com.mysql.cj.jdbc.Driver");
+        mapParams.put(DBCPDataSourceFactory.JDBC_URL.key, "jdbc:mysql://"+geoConfig.getDsIp()+":"+geoConfig.getDsPort()+"/"+geoConfig.getDsBase()+"?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai");
+        mapParams.put(DBCPDataSourceFactory.USERNAME.key, geoConfig.getDsUsername());
+        mapParams.put(DBCPDataSourceFactory.PASSWORD.key, geoConfig.getDsPassword());
+        mapParams.put(DBCPDataSourceFactory.MAXACTIVE.key, Integer.valueOf(10));
+        mapParams.put(DBCPDataSourceFactory.MAXIDLE.key, Integer.valueOf(0));
+
+        return DataSourceFinder.getDataSource(mapParams);
+    }
+}

+ 94 - 0
cql-service/src/main/java/cn/com/taiji/cql/service/impl/TileServiceImpl.java

@@ -0,0 +1,94 @@
+package cn.com.taiji.cql.service.impl;
+import cn.com.taiji.cql.config.GeoConfig;
+import cn.com.taiji.cql.model.GeoDataSource;
+import cn.com.taiji.cql.model.GeoRequestParam;
+import cn.com.taiji.cql.service.IECqlService;
+import cn.com.taiji.cql.service.ITileService;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import org.geotools.jdbc.JDBCDataStoreFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class TileServiceImpl implements ITileService {
+
+    @Autowired
+    private IECqlService ecqlService;
+
+    @Autowired
+    private GeoConfig geoConfig;
+
+
+    @Override
+    public byte[] tileData(GeoRequestParam requestParam) {
+
+        //1先根据图层代码获取对应的数据源
+        Map<String, Object> mapParams = new HashMap<String, Object>();
+        mapParams.put(JDBCDataStoreFactory.DATABASE.key, geoConfig.getDsBase());
+        mapParams.put(JDBCDataStoreFactory.DBTYPE.key, geoConfig.getDbType());
+
+        mapParams.put(JDBCDataStoreFactory.HOST.key, geoConfig.getDsIp());
+        mapParams.put(JDBCDataStoreFactory.PORT.key, geoConfig.getDsPort());
+        mapParams.put(JDBCDataStoreFactory.USER.key, geoConfig.getDsUsername());
+        mapParams.put(JDBCDataStoreFactory.PASSWD.key, geoConfig.getDsPassword());
+        mapParams.put("tableName", "geo_data_source");
+
+        String layerCodeCql = "layer_code='"+requestParam.getLayers()+"'";
+        List<Map<String, Object>> dataSourceList = ecqlService.cqlQuery(mapParams,layerCodeCql);
+
+        if(dataSourceList.size() >0){
+
+
+            //2根据cql规则获取图层对应的空间地理数据
+
+            GeoDataSource gds = JSONObject.parseObject(JSONObject.toJSONString(dataSourceList.get(0)), GeoDataSource.class);
+
+
+            StringBuffer sbBbox = new StringBuffer();
+            sbBbox.append("(bbox (");
+            sbBbox.append(gds.getBboxColumn()+",");
+            sbBbox.append(requestParam.getBbox()+"))");
+
+
+            String filterCql = requestParam.getCqlFilter()+" and "+sbBbox.toString();
+
+            Map<String, Object> cqlDsParams = new HashMap<String, Object>();
+            cqlDsParams.put(JDBCDataStoreFactory.DATABASE.key, gds.getDataBase());
+            cqlDsParams.put(JDBCDataStoreFactory.DBTYPE.key, gds.getDbType());
+
+            cqlDsParams.put(JDBCDataStoreFactory.HOST.key, gds.getHost());
+            cqlDsParams.put(JDBCDataStoreFactory.PORT.key, gds.getPort());
+            cqlDsParams.put(JDBCDataStoreFactory.USER.key, gds.getUserName());
+            cqlDsParams.put(JDBCDataStoreFactory.PASSWD.key, gds.getUserPassword());
+            cqlDsParams.put("tableName", gds.getTableName());
+
+            List<Map<String, Object>> cqlDataList = ecqlService.cqlQuery(cqlDsParams,filterCql);
+
+            if(cqlDataList.size() >0){
+
+                //3根据空间地理数据生成图层二进制数据
+
+                System.out.println("返回的数据:"+cqlDataList.toString());
+
+            }else{
+
+                log.info("根据cql规则:"+sbBbox.toString()+"和图层代码:" + requestParam.getLayers() + " 没有找到图层对应的数据源的空间地理数据");
+            }
+
+
+        }else{
+
+            log.info("根据图层代码:" + requestParam.getLayers() + "获取图层对应的数据源为空或者为null");
+        }
+
+        return new byte[0];
+    }
+
+
+}

文件差异内容过多而无法显示
+ 214 - 0
cql-service/src/main/java/cn/com/taiji/cql/test/EcqlTest.java


+ 96 - 0
cql-service/src/main/java/cn/com/taiji/cql/test/EcqlTest2.java

@@ -0,0 +1,96 @@
+package cn.com.taiji.cql.test;
+
+import org.geotools.api.data.*;
+import org.geotools.api.feature.simple.SimpleFeature;
+import org.geotools.api.feature.simple.SimpleFeatureType;
+import org.geotools.api.filter.Filter;
+import org.geotools.data.jdbc.datasource.DBCPDataSourceFactory;
+import org.geotools.data.jdbc.datasource.DataSourceFinder;
+import org.geotools.data.mysql.MySQLDialectBasic;
+import org.geotools.data.mysql.MySQLFilterToSQL;
+import org.geotools.filter.text.cql2.CQL;
+import org.geotools.filter.text.ecql.ECQL;
+import org.geotools.jdbc.JDBCDataStore;
+import org.geotools.jdbc.JDBCDataStoreFactory;
+
+import javax.sql.DataSource;
+import java.util.HashMap;
+import java.util.Map;
+
+public class EcqlTest2 {
+
+    public static void main(String[] args) throws Exception{
+
+        Map<String, Object> mapParams = new HashMap<String, Object>();
+
+        mapParams.put(JDBCDataStoreFactory.DATABASE.key, "geo");
+        mapParams.put(JDBCDataStoreFactory.DBTYPE.key, "mysql");
+
+        mapParams.put(JDBCDataStoreFactory.HOST.key, "172.16.67.23");
+        mapParams.put(JDBCDataStoreFactory.PORT.key, "7306");
+        mapParams.put(JDBCDataStoreFactory.USER.key, "root");
+        mapParams.put(JDBCDataStoreFactory.PASSWD.key, "Ucsp123#");
+
+        DataStore dataStore = DataStoreFinder.getDataStore(mapParams);
+
+        String strData = "name = 1";
+
+        MySQLFilterToSQL filterToSql = (MySQLFilterToSQL) new MySQLDialectBasic((JDBCDataStore) dataStore).createFilterToSQL();
+
+        filterToSql.setDatabaseSchema("geo_test");
+
+        //声明Query查询对象
+        Query query = new Query("geo_test", CQL.toFilter(strData));
+
+        FeatureReader<SimpleFeatureType, SimpleFeature> reader = dataStore.getFeatureReader(query, Transaction.AUTO_COMMIT);
+
+        if(reader.hasNext()){
+            SimpleFeature feature = reader.next();
+            String locationWKT = feature.getAttribute("geometry_1").toString();
+            System.out.println(locationWKT);
+        } else{
+            System.out.println("No data");
+        }
+
+
+
+        System.out.println("111111111111");
+
+
+
+
+    }
+
+
+    private void test1() throws Exception{
+
+        //先定义cql查询语句
+        String bbox = "bbox (geom, 115.31412 ,10.89577, 125.31412, 80.89577)";
+
+        //声明Query查询对象
+        Query query = new Query("string-data", ECQL.toFilter(bbox));
+
+        Filter filter = ECQL.toFilter(bbox);
+
+        //构建mysql数据库连接数据源--DataSource
+        Map<String, Object> mapParams = new HashMap<String, Object>();
+        mapParams.put(DBCPDataSourceFactory.DSTYPE.key, "DBCP");
+        mapParams.put(DBCPDataSourceFactory.DRIVERCLASS.key, "com.mysql.cj.jdbc.Driver");
+        mapParams.put(DBCPDataSourceFactory.JDBC_URL.key, "jdbc:mysql://172.16.67.23:7306/geo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai");
+        mapParams.put(DBCPDataSourceFactory.USERNAME.key, "root");
+        mapParams.put(DBCPDataSourceFactory.PASSWORD.key, "Ucsp123#");
+        mapParams.put(DBCPDataSourceFactory.MAXACTIVE.key, Integer.valueOf(10));
+        mapParams.put(DBCPDataSourceFactory.MAXIDLE.key, Integer.valueOf(0));
+
+        DataSource source = DataSourceFinder.getDataSource(mapParams);
+
+        DataStore dataStore = DataStoreFinder.getDataStore(mapParams);
+
+
+        System.out.println("111111111111");
+
+    }
+}
+
+
+

+ 8 - 0
cql-service/src/main/resources/application-test.properties

@@ -0,0 +1,8 @@
+##### 数据库配置
+geo.ds.ip=172.16.67.23
+geo.ds.port=7306
+geo.ds.username=root
+geo.ds.password=Ucsp123#
+geo.ds.base=geo
+geo.ds.dbtype = mysql
+

+ 9 - 0
cql-service/src/main/resources/application.yml

@@ -0,0 +1,9 @@
+server:
+  port: 7074
+  servlet:
+    encoding:
+      force: true
+      charset: UTF-8
+spring:
+  profiles:
+    active: test

+ 100 - 0
cql-service/src/main/resources/logback.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
+<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
+<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
+<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+    <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
+    <!-- <springProperty scope="context" name="log.path" source="spring.application.name"/> -->
+    <property name="log.path" value="log" />
+
+    <!-- 彩色日志(IDE下载插件才可以生效) -->
+    <!-- 彩色日志依赖的渲染类 -->
+    <conversionRule conversionWord="clr"
+                    converterClass="org.springframework.boot.logging.logback.ColorConverter" />
+    <conversionRule conversionWord="wex"
+                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
+    <conversionRule conversionWord="wEx"
+                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
+    <!-- 彩色日志格式 -->
+    <property name="CONSOLE_LOG_PATTERN"
+              value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
+
+    <!--输出到控制台 -->
+    <appender name="CONSOLE"
+              class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
+            <!-- 设置字符集 -->
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+
+    <!--输出到文件 -->
+
+    <!-- 时间滚动输出 level为 ERROR 日志 -->
+    <appender name="ERROR_FILE"
+              class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${log.path}/ecql-error.log</file>
+        <!--日志文件输出格式 -->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} -
+                %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 此处设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy
+                class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/error/ecql-%d{yyyy-MM-dd}.%i.log
+            </fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy
+                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文件保留天数 -->
+            <maxHistory>5</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文件只记录ERROR级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>ERROR</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <appender name="TAIJI_FILE"
+              class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${log.path}/ecql.log</file>
+        <!--日志文件输出格式 -->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} -
+                %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 此处设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy
+                class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/taiji/log-ecql-%d{yyyy-MM-dd}.%i.log
+            </fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy
+                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文件保留天数 -->
+            <maxHistory>2</maxHistory>
+        </rollingPolicy>
+    </appender>
+
+    <root level="info">
+        <appender-ref ref="CONSOLE" />
+        <appender-ref ref="ERROR_FILE" />
+    </root>
+
+    <logger name="cn.com.taiji" level="DEBUG">
+        <appender-ref ref="TAIJI_FILE"/>
+    </logger>
+</configuration>

+ 8 - 0
ecql-service.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="CheckStyle-IDEA-Module">
+    <option name="configuration">
+      <map />
+    </option>
+  </component>
+</module>

+ 58 - 0
pom.xml

@@ -0,0 +1,58 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>cn.com.taiji</groupId>
+    <artifactId>ecql-service</artifactId>
+    <version>1.0</version>
+    <modules>
+        <module>cql-service</module>
+    </modules>
+    <packaging>pom</packaging>
+
+    <properties>
+        <spring-boot-dependencies.version>2.5.5</spring-boot-dependencies.version>
+        <geotools.version>30.0</geotools.version>
+    </properties>
+
+    <dependencyManagement>
+
+        <dependencies>
+
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-actuator</artifactId>
+                <version>${spring-boot-dependencies.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-web</artifactId>
+                <version>${spring-boot-dependencies.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.geotools</groupId>
+                <artifactId>gt-main</artifactId>
+                <version>${geotools.version}</version>
+            </dependency>
+        </dependencies>
+
+    </dependencyManagement>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-maven-plugin</artifactId>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+
+
+
+</project>