diff --git a/pom.xml b/pom.xml
index 75550ae..02b13bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,19 +21,24 @@
com.github.xiaoymin
- knife4j-aggregation-spring-boot-starter
+ knife4j-spring-boot-starter
2.0.9
-
- io.springfox
- springfox-swagger2
- 2.10.5
-
-
- io.swagger
- swagger-models
- 1.6.2
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.baomidou
@@ -55,6 +60,12 @@
mybatis-plus-generator
${mybatis.plus.generator.version}
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.1
+
+
@@ -138,6 +149,18 @@
+ ${project.name}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
org.springframework.boot
diff --git a/pom.xml b/pom.xml
index 75550ae..02b13bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,19 +21,24 @@
com.github.xiaoymin
- knife4j-aggregation-spring-boot-starter
+ knife4j-spring-boot-starter
2.0.9
-
- io.springfox
- springfox-swagger2
- 2.10.5
-
-
- io.swagger
- swagger-models
- 1.6.2
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.baomidou
@@ -55,6 +60,12 @@
mybatis-plus-generator
${mybatis.plus.generator.version}
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.1
+
+
@@ -138,6 +149,18 @@
+ ${project.name}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
org.springframework.boot
diff --git a/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
new file mode 100644
index 0000000..652636e
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
@@ -0,0 +1,46 @@
+package org.springnewfiber.dataadapter.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 15:50
+ **/
+@Configuration
+@EnableSwagger2WebMvc
+//@EnableKnife4j
+//@Import(BeanValidatorPluginsConfiguration.class)
+public class SwaggerConfig {
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.springnewfiber.dataadapter"))
+ .paths(PathSelectors.any())
+ .build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("adapter- 接口文档")
+ .description("前端适配器")
+ .contact(new Contact("Leif Liu", null, "XXXXXX.com"))
+ .version("v1.0.0")
+ .build();
+ }
+}
diff --git a/pom.xml b/pom.xml
index 75550ae..02b13bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,19 +21,24 @@
com.github.xiaoymin
- knife4j-aggregation-spring-boot-starter
+ knife4j-spring-boot-starter
2.0.9
-
- io.springfox
- springfox-swagger2
- 2.10.5
-
-
- io.swagger
- swagger-models
- 1.6.2
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.baomidou
@@ -55,6 +60,12 @@
mybatis-plus-generator
${mybatis.plus.generator.version}
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.1
+
+
@@ -138,6 +149,18 @@
+ ${project.name}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
org.springframework.boot
diff --git a/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
new file mode 100644
index 0000000..652636e
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
@@ -0,0 +1,46 @@
+package org.springnewfiber.dataadapter.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 15:50
+ **/
+@Configuration
+@EnableSwagger2WebMvc
+//@EnableKnife4j
+//@Import(BeanValidatorPluginsConfiguration.class)
+public class SwaggerConfig {
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.springnewfiber.dataadapter"))
+ .paths(PathSelectors.any())
+ .build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("adapter- 接口文档")
+ .description("前端适配器")
+ .contact(new Contact("Leif Liu", null, "XXXXXX.com"))
+ .version("v1.0.0")
+ .build();
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
new file mode 100644
index 0000000..070160a
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
@@ -0,0 +1,38 @@
+package org.springnewfiber.dataadapter.sswj.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springnewfiber.dataadapter.sswj.service.impl.ExcelPlusServiceImpl;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 13:59
+ **/
+@RestController
+@AllArgsConstructor
+@RequestMapping("/ExcelPlus")
+@Api(value = "导出数据", tags = "导出数据")
+public class ExcelPlusController {
+ private final ExcelPlusServiceImpl excelPlusService;
+
+ @RequestMapping("/excelDownload")
+ @ApiOperation(value = "下载excel",produces = "application/octet-stream")
+ public void excelDownload(@ApiParam(value = "库名称")@RequestParam(defaultValue = "swj") String dataBase,@ApiParam(value = "表名", required = true) @RequestParam String tableName, HttpServletResponse response,@ApiParam(value = "sql拼接") @RequestParam(required = false) String lastSql) {
+ try {
+ excelPlusService.exportExcel(dataBase, tableName, response,lastSql);
+ } catch (IOException e) {
+ throw new RuntimeException("文件写入失败");
+ }
+ }
+}
diff --git a/pom.xml b/pom.xml
index 75550ae..02b13bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,19 +21,24 @@
com.github.xiaoymin
- knife4j-aggregation-spring-boot-starter
+ knife4j-spring-boot-starter
2.0.9
-
- io.springfox
- springfox-swagger2
- 2.10.5
-
-
- io.swagger
- swagger-models
- 1.6.2
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.baomidou
@@ -55,6 +60,12 @@
mybatis-plus-generator
${mybatis.plus.generator.version}
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.1
+
+
@@ -138,6 +149,18 @@
+ ${project.name}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
org.springframework.boot
diff --git a/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
new file mode 100644
index 0000000..652636e
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
@@ -0,0 +1,46 @@
+package org.springnewfiber.dataadapter.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 15:50
+ **/
+@Configuration
+@EnableSwagger2WebMvc
+//@EnableKnife4j
+//@Import(BeanValidatorPluginsConfiguration.class)
+public class SwaggerConfig {
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.springnewfiber.dataadapter"))
+ .paths(PathSelectors.any())
+ .build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("adapter- 接口文档")
+ .description("前端适配器")
+ .contact(new Contact("Leif Liu", null, "XXXXXX.com"))
+ .version("v1.0.0")
+ .build();
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
new file mode 100644
index 0000000..070160a
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
@@ -0,0 +1,38 @@
+package org.springnewfiber.dataadapter.sswj.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springnewfiber.dataadapter.sswj.service.impl.ExcelPlusServiceImpl;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 13:59
+ **/
+@RestController
+@AllArgsConstructor
+@RequestMapping("/ExcelPlus")
+@Api(value = "导出数据", tags = "导出数据")
+public class ExcelPlusController {
+ private final ExcelPlusServiceImpl excelPlusService;
+
+ @RequestMapping("/excelDownload")
+ @ApiOperation(value = "下载excel",produces = "application/octet-stream")
+ public void excelDownload(@ApiParam(value = "库名称")@RequestParam(defaultValue = "swj") String dataBase,@ApiParam(value = "表名", required = true) @RequestParam String tableName, HttpServletResponse response,@ApiParam(value = "sql拼接") @RequestParam(required = false) String lastSql) {
+ try {
+ excelPlusService.exportExcel(dataBase, tableName, response,lastSql);
+ } catch (IOException e) {
+ throw new RuntimeException("文件写入失败");
+ }
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java b/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
index 4b88007..d0a98f9 100644
--- a/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
@@ -44,7 +44,7 @@
private final TrsqTjhsRServiceImpl trsqTjhsRService;
private final ZgRainDataMapper zgRainDataMapper;
- @Scheduled(cron = "0 0/1 * * * ?")
+// @Scheduled(cron = "0 0/1 * * * ?")
public void selectSwj() {
checkHasRealDate(new BzLive(), bzLiveService);
checkHasRealDate(new SqGqR(), sqGqRService);
diff --git a/pom.xml b/pom.xml
index 75550ae..02b13bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,19 +21,24 @@
com.github.xiaoymin
- knife4j-aggregation-spring-boot-starter
+ knife4j-spring-boot-starter
2.0.9
-
- io.springfox
- springfox-swagger2
- 2.10.5
-
-
- io.swagger
- swagger-models
- 1.6.2
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.baomidou
@@ -55,6 +60,12 @@
mybatis-plus-generator
${mybatis.plus.generator.version}
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.1
+
+
@@ -138,6 +149,18 @@
+ ${project.name}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
org.springframework.boot
diff --git a/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
new file mode 100644
index 0000000..652636e
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
@@ -0,0 +1,46 @@
+package org.springnewfiber.dataadapter.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 15:50
+ **/
+@Configuration
+@EnableSwagger2WebMvc
+//@EnableKnife4j
+//@Import(BeanValidatorPluginsConfiguration.class)
+public class SwaggerConfig {
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.springnewfiber.dataadapter"))
+ .paths(PathSelectors.any())
+ .build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("adapter- 接口文档")
+ .description("前端适配器")
+ .contact(new Contact("Leif Liu", null, "XXXXXX.com"))
+ .version("v1.0.0")
+ .build();
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
new file mode 100644
index 0000000..070160a
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
@@ -0,0 +1,38 @@
+package org.springnewfiber.dataadapter.sswj.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springnewfiber.dataadapter.sswj.service.impl.ExcelPlusServiceImpl;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 13:59
+ **/
+@RestController
+@AllArgsConstructor
+@RequestMapping("/ExcelPlus")
+@Api(value = "导出数据", tags = "导出数据")
+public class ExcelPlusController {
+ private final ExcelPlusServiceImpl excelPlusService;
+
+ @RequestMapping("/excelDownload")
+ @ApiOperation(value = "下载excel",produces = "application/octet-stream")
+ public void excelDownload(@ApiParam(value = "库名称")@RequestParam(defaultValue = "swj") String dataBase,@ApiParam(value = "表名", required = true) @RequestParam String tableName, HttpServletResponse response,@ApiParam(value = "sql拼接") @RequestParam(required = false) String lastSql) {
+ try {
+ excelPlusService.exportExcel(dataBase, tableName, response,lastSql);
+ } catch (IOException e) {
+ throw new RuntimeException("文件写入失败");
+ }
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java b/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
index 4b88007..d0a98f9 100644
--- a/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
@@ -44,7 +44,7 @@
private final TrsqTjhsRServiceImpl trsqTjhsRService;
private final ZgRainDataMapper zgRainDataMapper;
- @Scheduled(cron = "0 0/1 * * * ?")
+// @Scheduled(cron = "0 0/1 * * * ?")
public void selectSwj() {
checkHasRealDate(new BzLive(), bzLiveService);
checkHasRealDate(new SqGqR(), sqGqRService);
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/entity/TableColumnInfo.java b/src/main/java/org/springnewfiber/dataadapter/sswj/entity/TableColumnInfo.java
new file mode 100644
index 0000000..eb05b8c
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/entity/TableColumnInfo.java
@@ -0,0 +1,20 @@
+package org.springnewfiber.dataadapter.sswj.entity;
+
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import lombok.Data;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 11:17
+ **/
+@Data
+public class TableColumnInfo {
+ private String columnName;
+ private String columnComment;
+
+ public String getCloumnTitle() {
+ return columnComment.concat(StringPool.LEFT_BRACKET).concat(columnName).concat(StringPool.RIGHT_BRACKET);
+ }
+}
diff --git a/pom.xml b/pom.xml
index 75550ae..02b13bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,19 +21,24 @@
com.github.xiaoymin
- knife4j-aggregation-spring-boot-starter
+ knife4j-spring-boot-starter
2.0.9
-
- io.springfox
- springfox-swagger2
- 2.10.5
-
-
- io.swagger
- swagger-models
- 1.6.2
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.baomidou
@@ -55,6 +60,12 @@
mybatis-plus-generator
${mybatis.plus.generator.version}
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.1
+
+
@@ -138,6 +149,18 @@
+ ${project.name}
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
org.springframework.boot
diff --git a/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
new file mode 100644
index 0000000..652636e
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/config/SwaggerConfig.java
@@ -0,0 +1,46 @@
+package org.springnewfiber.dataadapter.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 15:50
+ **/
+@Configuration
+@EnableSwagger2WebMvc
+//@EnableKnife4j
+//@Import(BeanValidatorPluginsConfiguration.class)
+public class SwaggerConfig {
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.springnewfiber.dataadapter"))
+ .paths(PathSelectors.any())
+ .build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("adapter- 接口文档")
+ .description("前端适配器")
+ .contact(new Contact("Leif Liu", null, "XXXXXX.com"))
+ .version("v1.0.0")
+ .build();
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
new file mode 100644
index 0000000..070160a
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/controller/ExcelPlusController.java
@@ -0,0 +1,38 @@
+package org.springnewfiber.dataadapter.sswj.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springnewfiber.dataadapter.sswj.service.impl.ExcelPlusServiceImpl;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 13:59
+ **/
+@RestController
+@AllArgsConstructor
+@RequestMapping("/ExcelPlus")
+@Api(value = "导出数据", tags = "导出数据")
+public class ExcelPlusController {
+ private final ExcelPlusServiceImpl excelPlusService;
+
+ @RequestMapping("/excelDownload")
+ @ApiOperation(value = "下载excel",produces = "application/octet-stream")
+ public void excelDownload(@ApiParam(value = "库名称")@RequestParam(defaultValue = "swj") String dataBase,@ApiParam(value = "表名", required = true) @RequestParam String tableName, HttpServletResponse response,@ApiParam(value = "sql拼接") @RequestParam(required = false) String lastSql) {
+ try {
+ excelPlusService.exportExcel(dataBase, tableName, response,lastSql);
+ } catch (IOException e) {
+ throw new RuntimeException("文件写入失败");
+ }
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java b/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
index 4b88007..d0a98f9 100644
--- a/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/core/SswjCoreJob.java
@@ -44,7 +44,7 @@
private final TrsqTjhsRServiceImpl trsqTjhsRService;
private final ZgRainDataMapper zgRainDataMapper;
- @Scheduled(cron = "0 0/1 * * * ?")
+// @Scheduled(cron = "0 0/1 * * * ?")
public void selectSwj() {
checkHasRealDate(new BzLive(), bzLiveService);
checkHasRealDate(new SqGqR(), sqGqRService);
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/entity/TableColumnInfo.java b/src/main/java/org/springnewfiber/dataadapter/sswj/entity/TableColumnInfo.java
new file mode 100644
index 0000000..eb05b8c
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/entity/TableColumnInfo.java
@@ -0,0 +1,20 @@
+package org.springnewfiber.dataadapter.sswj.entity;
+
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import lombok.Data;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 11:17
+ **/
+@Data
+public class TableColumnInfo {
+ private String columnName;
+ private String columnComment;
+
+ public String getCloumnTitle() {
+ return columnComment.concat(StringPool.LEFT_BRACKET).concat(columnName).concat(StringPool.RIGHT_BRACKET);
+ }
+}
diff --git a/src/main/java/org/springnewfiber/dataadapter/sswj/mapper/ExcelPlusMapper.java b/src/main/java/org/springnewfiber/dataadapter/sswj/mapper/ExcelPlusMapper.java
new file mode 100644
index 0000000..7d186fb
--- /dev/null
+++ b/src/main/java/org/springnewfiber/dataadapter/sswj/mapper/ExcelPlusMapper.java
@@ -0,0 +1,23 @@
+package org.springnewfiber.dataadapter.sswj.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springnewfiber.dataadapter.sswj.entity.TableColumnInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @program: newfiber-data-adapter
+ * @description:
+ * @author: djt
+ * @create: 2022-05-18 11:15
+ **/
+@Mapper
+public interface ExcelPlusMapper {
+ List selectTableColumn(@Param("dataName") String dataName, @Param("tableName") String tableName);
+
+ String selectTableName(@Param("dataName") String dataName, @Param("tableName") String tableName);
+
+ List