فهرست منبع

no-nacos report

shiqian 3 سال پیش
والد
کامیت
3958673fe6
29فایلهای تغییر یافته به همراه2542 افزوده شده و 913 حذف شده
  1. 20 31
      boman-report/pom.xml
  2. 26 0
      boman-report/src/main/java/com/boman/report/conf/DruidConfig.java
  3. 34 34
      boman-report/src/main/java/com/boman/report/controller/ImportController.java
  4. 70 70
      boman-report/src/main/java/com/boman/report/controller/StatisticReportController.java
  5. 30 30
      boman-report/src/main/java/com/boman/report/controller/StatisticReportPersonnelController.java
  6. 617 0
      boman-report/src/main/java/com/boman/report/domain/GenTable.java
  7. 679 0
      boman-report/src/main/java/com/boman/report/domain/GenTableColumn.java
  8. 27 0
      boman-report/src/main/java/com/boman/report/mapper/GenTableColumnMapper.java
  9. 23 0
      boman-report/src/main/java/com/boman/report/mapper/GenTableMapper.java
  10. 36 36
      boman-report/src/main/java/com/boman/report/mapper/StatisticReportMapper.java
  11. 25 25
      boman-report/src/main/java/com/boman/report/mapper/StatisticReportPersonnelMapper.java
  12. 28 0
      boman-report/src/main/java/com/boman/report/service/IGenTableColumnService.java
  13. 14 14
      boman-report/src/main/java/com/boman/report/service/IImportServcie.java
  14. 20 20
      boman-report/src/main/java/com/boman/report/service/StatisticReportPersonnelService.java
  15. 39 39
      boman-report/src/main/java/com/boman/report/service/StatisticReportService.java
  16. 61 0
      boman-report/src/main/java/com/boman/report/service/impl/GenTableColumnServiceImpl.java
  17. 199 199
      boman-report/src/main/java/com/boman/report/service/impl/ImportServiceImpl.java
  18. 66 66
      boman-report/src/main/java/com/boman/report/service/impl/StatisticReportPersonnelImpl.java
  19. 198 198
      boman-report/src/main/java/com/boman/report/service/impl/StatisticReportServiceImpl.java
  20. 9 8
      boman-report/src/main/java/org/jeecg/modules/jmreport/BomanReportApplication.java
  21. 29 29
      boman-report/src/main/java/org/jeecg/modules/jmreport/common/ColumnConvertController.java
  22. 72 72
      boman-report/src/main/java/org/jeecg/modules/jmreport/common/ColumnCovertService.java
  23. 1 1
      boman-report/src/main/java/org/jeecg/modules/jmreport/desreport/a/a.java
  24. 3 3
      boman-report/src/main/java/org/jeecg/modules/jmreport/desreport/a/service/a/JmReportDbService.java
  25. 76 0
      boman-report/src/main/resources/application.yml
  26. 0 19
      boman-report/src/main/resources/bootstrap-prod.yml
  27. 0 19
      boman-report/src/main/resources/bootstrap.yml
  28. 57 0
      boman-report/src/main/resources/mapper/GenTableColumnMapper.xml
  29. 83 0
      boman-report/src/main/resources/mapper/GenTableMapper.xml

+ 20 - 31
boman-report/pom.xml

@@ -9,7 +9,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>boman-report</artifactId>
+    <artifactId>boman-report-1.0.0-NO-NACOS</artifactId>
 
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
@@ -30,18 +30,6 @@
             <version>1.1.0</version>
         </dependency>
 
-        <!-- SpringCloud Ailibaba Nacos -->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-        </dependency>
-
-        <!-- SpringCloud Ailibaba Nacos Config -->
-        <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-        </dependency>
-
         <!-- SpringCloud Ailibaba Sentinel -->
         <dependency>
             <groupId>com.alibaba.cloud</groupId>
@@ -55,11 +43,11 @@
         </dependency>
 
 <!--        &lt;!&ndash; Swagger UI &ndash;&gt;-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>${swagger.fox.version}</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>io.springfox</groupId>-->
+<!--            <artifactId>springfox-swagger-ui</artifactId>-->
+<!--            <version>${swagger.fox.version}</version>-->
+<!--        </dependency>-->
 
         <!-- Mysql Connector -->
         <dependency>
@@ -74,16 +62,16 @@
         </dependency>
 
         <!--         RuoYi Common DataScope-->
-        <dependency>
-            <groupId>com.boman</groupId>
-            <artifactId>boman-common-datascope</artifactId>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.boman</groupId>-->
+<!--            <artifactId>boman-common-datascope</artifactId>-->
+<!--        </dependency>-->
 
         <!--         RuoYi Common Log-->
-        <dependency>
-            <groupId>com.boman</groupId>
-            <artifactId>boman-common-log</artifactId>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.boman</groupId>-->
+<!--            <artifactId>boman-common-log</artifactId>-->
+<!--        </dependency>-->
 
         <!--         RuoYi Common Swagger-->
         <dependency>
@@ -97,6 +85,7 @@
             <artifactId>boman-api-gen</artifactId>
             <version>2.5.0-SNAPSHOT</version>
         </dependency>
+
         <dependency>
             <groupId>com.boman</groupId>
             <artifactId>boman-api-web-core</artifactId>
@@ -109,11 +98,11 @@
             <version>${project.version}</version>
         </dependency>
 
-<!--        <dependency>-->
-<!--            <groupId>commons-beanutils</groupId>-->
-<!--            <artifactId>commons-beanutils</artifactId>-->
-<!--            <version>1.9.4</version>-->
-<!--        </dependency>-->
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.9.4</version>
+        </dependency>
 
 <!--        <dependency>-->
 <!--            <groupId>org.projectlombok</groupId>-->

+ 26 - 0
boman-report/src/main/java/com/boman/report/conf/DruidConfig.java

@@ -0,0 +1,26 @@
+package com.boman.report.conf;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.sql.DataSource;
+
+/**
+ * @author shiqian
+ * @date 2021年08月31日 10:17
+ **/
+
+@Configuration
+public class DruidConfig {
+
+    @ConfigurationProperties(prefix = "spring.datasource")
+    @Bean
+    public DataSource druid() {
+        return new DruidDataSource();
+    }
+
+
+}
+

+ 34 - 34
boman-report/src/main/java/com/boman/report/controller/ImportController.java

@@ -1,34 +1,34 @@
-package com.boman.report.controller;
-
-import com.boman.domain.dto.AjaxResult;
-import com.boman.domain.dto.ImportDto;
-import com.boman.report.service.IImportServcie;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 报表导入
- */
-@RestController
-@RequestMapping("/cs/file")
-public class ImportController {
-
-    @Autowired
-    private IImportServcie importServcie;
-
-    /**
-     * 功能描述: 导入接口
-     *
-     * @param importDto     tableName
-     * @return void
-     */
-    @PostMapping("/import")
-    public AjaxResult importData(@RequestBody ImportDto importDto) {
-        try {
-            return importServcie.importData(importDto.getFile(), importDto.getPersonnelId(), importDto.getTableName());
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return AjaxResult.error("失败");
-    }
-}
+//package com.boman.report.controller;
+//
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.domain.dto.ImportDto;
+//import com.boman.report.service.IImportServcie;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//
+///**
+// * 报表导入
+// */
+//@RestController
+//@RequestMapping("/cs/file")
+//public class ImportController {
+//
+//    @Autowired
+//    private IImportServcie importServcie;
+//
+//    /**
+//     * 功能描述: 导入接口
+//     *
+//     * @param importDto     tableName
+//     * @return void
+//     */
+//    @PostMapping("/import")
+//    public AjaxResult importData(@RequestBody ImportDto importDto) {
+//        try {
+//            return importServcie.importData(importDto.getFile(), importDto.getPersonnelId(), importDto.getTableName());
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        return AjaxResult.error("失败");
+//    }
+//}

+ 70 - 70
boman-report/src/main/java/com/boman/report/controller/StatisticReportController.java

@@ -1,70 +1,70 @@
-package com.boman.report.controller;
-
-import com.boman.common.core.web.controller.BaseController;
-import com.boman.common.core.web.page.TableDataInfo;
-import com.boman.domain.dto.AjaxResult;
-import com.boman.report.service.StatisticReportService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.repository.query.Param;
-import org.springframework.web.bind.annotation.*;
-import com.boman.domain.entity.StatisticReport;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/statistic/report")
-public class StatisticReportController extends BaseController {
-
-    @Autowired
-    private StatisticReportService statisticReportService;
-    @Autowired
-    private StatisticReportService reportService;
-
-    /**
-     * 获取报表id集合
-     *
-     * @return
-     */
-    @GetMapping("/datas")
-    public AjaxResult datas(@Param("reportName") String reportName) {
-        return AjaxResult.success(reportService.datas(reportName));
-    }
-
-    /**
-     * 列表
-     * @return
-     */
-    @PostMapping("/list")
-    public TableDataInfo list(@RequestBody StatisticReport report) {
-        startPage();
-        List<StatisticReport> list = reportService.selectList(report);
-        return getDataTable(list);
-    }
-
-    @PostMapping("/saveOrUpdate")
-    public AjaxResult saveOrUpdate(@RequestBody StatisticReport report) {
-        return reportService.saveOrUpdate(report);
-    }
-
-
-    /**
-     * 获取报表详情
-     * @param id
-     * @return
-     */
-    @GetMapping(value = "/reportInfo/{id}")
-    public AjaxResult getReportInfo(@PathVariable Long id)
-    {
-        return statisticReportService.getReportInfo(id);
-    }
-
-    /**
-     * 获取报表详情
-     * @param id
-     * @return
-     */
-    @GetMapping(value = "/detail/{id}")
-    public AjaxResult getDetailById(@PathVariable Long id) {
-        return AjaxResult.success(statisticReportService.getDetailById(id));
-    }
-}
+//package com.boman.report.controller;
+//
+//import com.boman.common.core.web.controller.BaseController;
+//import com.boman.common.core.web.page.TableDataInfo;
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.report.service.StatisticReportService;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.data.repository.query.Param;
+//import org.springframework.web.bind.annotation.*;
+//import com.boman.domain.entity.StatisticReport;
+//
+//import java.util.List;
+//
+//@RestController
+//@RequestMapping("/statistic/report")
+//public class StatisticReportController extends BaseController {
+//
+//    @Autowired
+//    private StatisticReportService statisticReportService;
+//    @Autowired
+//    private StatisticReportService reportService;
+//
+//    /**
+//     * 获取报表id集合
+//     *
+//     * @return
+//     */
+//    @GetMapping("/datas")
+//    public AjaxResult datas(@Param("reportName") String reportName) {
+//        return AjaxResult.success(reportService.datas(reportName));
+//    }
+//
+//    /**
+//     * 列表
+//     * @return
+//     */
+//    @PostMapping("/list")
+//    public TableDataInfo list(@RequestBody StatisticReport report) {
+//        startPage();
+//        List<StatisticReport> list = reportService.selectList(report);
+//        return getDataTable(list);
+//    }
+//
+//    @PostMapping("/saveOrUpdate")
+//    public AjaxResult saveOrUpdate(@RequestBody StatisticReport report) {
+//        return reportService.saveOrUpdate(report);
+//    }
+//
+//
+//    /**
+//     * 获取报表详情
+//     * @param id
+//     * @return
+//     */
+//    @GetMapping(value = "/reportInfo/{id}")
+//    public AjaxResult getReportInfo(@PathVariable Long id)
+//    {
+//        return statisticReportService.getReportInfo(id);
+//    }
+//
+//    /**
+//     * 获取报表详情
+//     * @param id
+//     * @return
+//     */
+//    @GetMapping(value = "/detail/{id}")
+//    public AjaxResult getDetailById(@PathVariable Long id) {
+//        return AjaxResult.success(statisticReportService.getDetailById(id));
+//    }
+//}

+ 30 - 30
boman-report/src/main/java/com/boman/report/controller/StatisticReportPersonnelController.java

@@ -1,30 +1,30 @@
-package com.boman.report.controller;
-
-import com.boman.common.core.web.controller.BaseController;
-import com.boman.common.core.web.page.TableDataInfo;
-import com.boman.domain.entity.StatisticReportPersonnel;
-import com.boman.report.service.StatisticReportPersonnelService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/statistic/reportPersonnel")
-public class StatisticReportPersonnelController extends BaseController {
-
-    @Autowired
-    private StatisticReportPersonnelService service;
-
-    /**
-     * 列表
-     * @return
-     */
-    @RequestMapping("/list")
-    public TableDataInfo list(@RequestBody StatisticReportPersonnel personnel) {
-        startPage();
-        List<StatisticReportPersonnel> list = service.selectList(personnel);
-        return getDataTable(list);
-    }
-
-}
+//package com.boman.report.controller;
+//
+//import com.boman.common.core.web.controller.BaseController;
+//import com.boman.common.core.web.page.TableDataInfo;
+//import com.boman.domain.entity.StatisticReportPersonnel;
+//import com.boman.report.service.StatisticReportPersonnelService;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//
+//import java.util.List;
+//
+//@RestController
+//@RequestMapping("/statistic/reportPersonnel")
+//public class StatisticReportPersonnelController extends BaseController {
+//
+//    @Autowired
+//    private StatisticReportPersonnelService service;
+//
+//    /**
+//     * 列表
+//     * @return
+//     */
+//    @RequestMapping("/list")
+//    public TableDataInfo list(@RequestBody StatisticReportPersonnel personnel) {
+//        startPage();
+//        List<StatisticReportPersonnel> list = service.selectList(personnel);
+//        return getDataTable(list);
+//    }
+//
+//}

+ 617 - 0
boman-report/src/main/java/com/boman/report/domain/GenTable.java

@@ -0,0 +1,617 @@
+package com.boman.report.domain;
+
+import com.boman.domain.BaseEntity;
+
+import java.util.List;
+
+/**
+ * 业务表 gen_table
+ * 
+ * @author ruoyi
+ */
+public class GenTable extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+    /**
+     * 前端传来提示修改的状态 1:修改gen_table  2:修改gen_table_column
+     */
+    private String updateType;
+
+    /** 表名称 */
+//    @NotBlank(message = "表名称不能为空")
+    private String tableName;
+
+    /** 表描述 */
+//    @NotBlank(message = "表描述不能为空")
+    private String tableComment;
+
+    /** 关联父表的表名 */
+    private String subTableName;
+
+    /** 本表关联父表的外键名 */
+    private String subTableFkName;
+
+    /** 实体类名称(首字母大写) */
+    //@NotBlank(message = "实体类名称不能为空")
+    private String className;
+
+    /** 使用的模板(crud单表操作 tree树表操作 sub主子表操作) */
+    private String tplCategory;
+
+    /** 生成包路径 */
+    //@NotBlank(message = "生成包路径不能为空")
+    private String packageName;
+
+    /** 生成模块名 */
+    //@NotBlank(message = "生成模块名不能为空")
+    private String moduleName;
+
+    /** 生成业务名 */
+    //@NotBlank(message = "生成业务名不能为空")
+    private String businessName;
+
+    /** 生成功能名 */
+    //@NotBlank(message = "生成功能名不能为空")
+    private String functionName;
+
+    /** 生成作者 */
+    //@NotBlank(message = "作者不能为空")
+    private String functionAuthor;
+
+    /** 生成代码方式(0zip压缩包 1自定义路径) */
+    private String genType;
+
+    /** 生成路径(不填默认项目路径) */
+    private String genPath;
+
+    /** 主键信息 */
+    private GenTableColumn pkColumn;
+
+    /** 子表信息 */
+    private GenTable subTable;
+
+    /** 表列信息 */
+//    @Valid
+    private List<GenTableColumn> columns;
+
+    /** 主表关联的附表信息(附表包含字段信息) */
+//    @Valid
+    private List<GenTable> relationList;
+
+    /** 其它生成选项 */
+    private String options;
+
+    /**
+     * 是否菜单
+     */
+    private String isMenu;
+
+    /**
+     * 菜单权限(AMDQSUE)
+     */
+//    @NotBlank(message = "菜单权限不能为空")
+    private String menuRole;
+
+    /**
+     * 输入字段
+     */
+    private Long akColumn;
+    private String akColumnName;
+
+    /**
+     * 输出字段
+     */
+    private Long dkColumn;
+    private String dkColumnName;
+
+    /**
+     * 新增触发器
+     */
+    private String triggerCreate;
+
+    /**
+     * 检索触发器
+     */
+    private String triggerRetrieve;
+
+    /**
+     * 修改触发器
+     */
+    private String triggerUpdate;
+
+    /**
+     * 删除触发器
+     */
+    private String triggerDelete;
+
+    /**
+     * 提交触发器
+     */
+    private String triggerSubmit;
+
+    /**
+     * 实际数据库名称
+     */
+    private String realTableName;
+
+    /**
+     * 过滤条件
+     */
+    private String filterConditions;
+
+    /**
+     * 扩展属性
+     */
+    private String extendedAttributes;
+
+
+    /** 树编码字段 */
+    private String treeCode;
+
+    /** 树父编码字段 */
+    private String treeParentCode;
+
+    /** 树名称字段 */
+    private String treeName;
+
+    /** 上级菜单ID字段 */
+    private String parentMenuId;
+
+    /** 上级菜单名称字段 */
+    private String parentMenuName;
+
+
+    /**
+     * 对应表主键
+     */
+    private Long tablePrimaryKey;
+
+    /**
+     * 主键名称
+     */
+    private String tablePrimaryKeyName;
+
+    /**
+     * 此表中的字段是否含有blob的列, true含
+     */
+    private Boolean isContainsBlob;
+
+    /**
+     * 列宽
+     */
+    private Integer tableColumn;
+
+
+    public Integer getTableColumn() {
+        return tableColumn;
+    }
+
+    public void setTableColumn(Integer tableColumn) {
+        this.tableColumn = tableColumn;
+    }
+
+    public String getUpdateType() {
+        return updateType;
+    }
+
+    public void setUpdateType(String updateType) {
+        this.updateType = updateType;
+    }
+
+    public String getAkColumnName() {
+        return akColumnName;
+    }
+
+    public void setAkColumnName(String akColumnName) {
+        this.akColumnName = akColumnName;
+    }
+
+    public String getDkColumnName() {
+        return dkColumnName;
+    }
+
+    public void setDkColumnName(String dkColumnName) {
+        this.dkColumnName = dkColumnName;
+    }
+
+    public String getTablePrimaryKeyName() {
+        return tablePrimaryKeyName;
+    }
+
+    public void setTablePrimaryKeyName(String tablePrimaryKeyName) {
+        this.tablePrimaryKeyName = tablePrimaryKeyName;
+    }
+
+    public Long getTablePrimaryKey() {
+        return tablePrimaryKey;
+    }
+
+    public void setTablePrimaryKey(Long tablePrimaryKey) {
+        this.tablePrimaryKey = tablePrimaryKey;
+    }
+
+    public String getRealTableName() {
+        return realTableName;
+    }
+
+    public void setRealTableName(String realTableName) {
+        this.realTableName = realTableName;
+    }
+
+    public String getFilterConditions() {
+        return filterConditions;
+    }
+
+    public void setFilterConditions(String filterConditions) {
+        this.filterConditions = filterConditions;
+    }
+
+    public String getExtendedAttributes() {
+        return extendedAttributes;
+    }
+
+    public void setExtendedAttributes(String extendedAttributes) {
+        this.extendedAttributes = extendedAttributes;
+    }
+
+    public String getTriggerCreate() {
+        return triggerCreate;
+    }
+
+    public void setTriggerCreate(String triggerCreate) {
+        this.triggerCreate = triggerCreate;
+    }
+
+    public String getTriggerRetrieve() {
+        return triggerRetrieve;
+    }
+
+    public void setTriggerRetrieve(String triggerRetrieve) {
+        this.triggerRetrieve = triggerRetrieve;
+    }
+
+    public String getTriggerUpdate() {
+        return triggerUpdate;
+    }
+
+    public void setTriggerUpdate(String triggerUpdate) {
+        this.triggerUpdate = triggerUpdate;
+    }
+
+    public String getTriggerDelete() {
+        return triggerDelete;
+    }
+
+    public void setTriggerDelete(String triggerDelete) {
+        this.triggerDelete = triggerDelete;
+    }
+
+    public String getTriggerSubmit() {
+        return triggerSubmit;
+    }
+
+    public void setTriggerSubmit(String triggerSubmit) {
+        this.triggerSubmit = triggerSubmit;
+    }
+
+    public Long getAkColumn() {
+        return akColumn;
+    }
+
+    public void setAkColumn(Long akColumn) {
+        this.akColumn = akColumn;
+    }
+
+    public Long getDkColumn() {
+        return dkColumn;
+    }
+
+    public void setDkColumn(Long dkColumn) {
+        this.dkColumn = dkColumn;
+    }
+
+    public String getIsMenu() {
+        return isMenu;
+    }
+
+    public void setIsMenu(String isMenu) {
+        this.isMenu = isMenu;
+    }
+
+    public String getMenuRole() {
+        return menuRole;
+    }
+
+    public void setMenuRole(String menuRole) {
+        this.menuRole = menuRole;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTableName()
+    {
+        return tableName;
+    }
+
+    public void setTableName(String tableName)
+    {
+        this.tableName = tableName;
+    }
+
+    public String getTableComment()
+    {
+        return tableComment;
+    }
+
+    public void setTableComment(String tableComment)
+    {
+        this.tableComment = tableComment;
+    }
+
+    public String getSubTableName()
+    {
+        return subTableName;
+    }
+
+    public void setSubTableName(String subTableName)
+    {
+        this.subTableName = subTableName;
+    }
+
+    public String getSubTableFkName()
+    {
+        return subTableFkName;
+    }
+
+    public void setSubTableFkName(String subTableFkName)
+    {
+        this.subTableFkName = subTableFkName;
+    }
+
+    public String getClassName()
+    {
+        return className;
+    }
+
+    public void setClassName(String className)
+    {
+        this.className = className;
+    }
+
+    public String getTplCategory()
+    {
+        return tplCategory;
+    }
+
+    public void setTplCategory(String tplCategory)
+    {
+        this.tplCategory = tplCategory;
+    }
+
+    public String getPackageName()
+    {
+        return packageName;
+    }
+
+    public void setPackageName(String packageName)
+    {
+        this.packageName = packageName;
+    }
+
+    public String getModuleName()
+    {
+        return moduleName;
+    }
+
+    public void setModuleName(String moduleName)
+    {
+        this.moduleName = moduleName;
+    }
+
+    public String getBusinessName()
+    {
+        return businessName;
+    }
+
+    public void setBusinessName(String businessName)
+    {
+        this.businessName = businessName;
+    }
+
+    public String getFunctionName()
+    {
+        return functionName;
+    }
+
+    public void setFunctionName(String functionName)
+    {
+        this.functionName = functionName;
+    }
+
+    public String getFunctionAuthor()
+    {
+        return functionAuthor;
+    }
+
+    public void setFunctionAuthor(String functionAuthor)
+    {
+        this.functionAuthor = functionAuthor;
+    }
+
+    public String getGenType()
+    {
+        return genType;
+    }
+
+    public void setGenType(String genType)
+    {
+        this.genType = genType;
+    }
+
+    public String getGenPath()
+    {
+        return genPath;
+    }
+
+    public void setGenPath(String genPath)
+    {
+        this.genPath = genPath;
+    }
+
+    public GenTableColumn getPkColumn()
+    {
+        return pkColumn;
+    }
+
+    public void setPkColumn(GenTableColumn pkColumn)
+    {
+        this.pkColumn = pkColumn;
+    }
+
+    public GenTable getSubTable()
+    {
+        return subTable;
+    }
+
+    public void setSubTable(GenTable subTable)
+    {
+        this.subTable = subTable;
+    }
+    public List<GenTableColumn> getColumns()
+    {
+        return columns;
+    }
+
+    public void setColumns(List<GenTableColumn> columns)
+    {
+        this.columns = columns;
+    }
+
+    public String getOptions()
+    {
+        return options;
+    }
+
+    public void setOptions(String options)
+    {
+        this.options = options;
+    }
+
+    public String getTreeCode()
+    {
+        return treeCode;
+    }
+
+    public void setTreeCode(String treeCode)
+    {
+        this.treeCode = treeCode;
+    }
+
+    public String getTreeParentCode()
+    {
+        return treeParentCode;
+    }
+
+    public void setTreeParentCode(String treeParentCode)
+    {
+        this.treeParentCode = treeParentCode;
+    }
+
+    public String getTreeName()
+    {
+        return treeName;
+    }
+
+    public void setTreeName(String treeName)
+    {
+        this.treeName = treeName;
+    }
+
+    public String getParentMenuId()
+    {
+        return parentMenuId;
+    }
+
+    public void setParentMenuId(String parentMenuId)
+    {
+        this.parentMenuId = parentMenuId;
+    }
+
+    public String getParentMenuName()
+    {
+        return parentMenuName;
+    }
+
+    public void setParentMenuName(String parentMenuName)
+    {
+        this.parentMenuName = parentMenuName;
+    }
+
+//    public boolean isSub()
+//    {
+//        return isSub(this.tplCategory);
+//    }
+//
+//    public static boolean isSub(String tplCategory)
+//    {
+//        return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory);
+//    }
+//    public boolean isTree()
+//    {
+//        return isTree(this.tplCategory);
+//    }
+//
+//    public static boolean isTree(String tplCategory)
+//    {
+//        return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory);
+//    }
+//
+//    public boolean isCrud()
+//    {
+//        return isCrud(this.tplCategory);
+//    }
+
+//    public static boolean isCrud(String tplCategory)
+//    {
+//        return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory);
+//    }
+
+//    public boolean isSuperColumn(String javaField)
+//    {
+//        return isSuperColumn(this.tplCategory, javaField);
+//    }
+
+//    public static boolean isSuperColumn(String tplCategory, String javaField)
+//    {
+//        if (isTree(tplCategory))
+//        {
+//            return StringUtils.equalsAnyIgnoreCase(javaField, ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY));
+//        }
+//        return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
+//    }
+
+    public List<GenTable> getRelationList() {
+        return relationList;
+    }
+
+    public void setRelationList(List<GenTable> relationList) {
+        this.relationList = relationList;
+    }
+
+    public Boolean getIsContainsBlob() {
+        return isContainsBlob;
+    }
+
+    public void setIsContainsBlob(Boolean isContainsBlob) {
+        this.isContainsBlob = isContainsBlob;
+    }
+}

+ 679 - 0
boman-report/src/main/java/com/boman/report/domain/GenTableColumn.java

@@ -0,0 +1,679 @@
+package com.boman.report.domain;
+
+import com.boman.domain.BaseEntity;
+import com.boman.domain.SysDictData;
+import com.boman.domain.SysFile;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 代码生成业务字段表 gen_table_column
+ *
+ * @author ruoyi
+ */
+public class GenTableColumn extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 是查询字段 */
+    public static final String IS_QUERY = "1";
+
+    /** 主键 */
+    public static final String IS_PK = "1";
+
+    /** 必填 */
+    public static final String IS_REQUIRED = "1";
+
+    /** 编号 */
+    private Long id;
+
+    /** 归属表编号 */
+    private Long tableId;
+
+    /** 归属表名 数据库没有此字段*/
+    private String tableName;
+
+    /** 列名称 */
+    private String columnName;
+
+    /** 列描述 */
+    private String columnComment;
+
+    /** 列类型 */
+    private String columnType;
+
+    /** JAVA类型 */
+    private String javaType;
+
+    /** JAVA字段名 */
+    //@NotBlank(message = "Java属性不能为空")
+    private String javaField;
+
+    /** 是否主键(1是) */
+    private String isPk;
+
+    /** 是否自增(1是) */
+    private String isIncrement;
+
+    /** 是否必填(1是) */
+    private String isRequired;
+
+    /** 是否为插入字段(1是) */
+    private String isInsert;
+
+    /** 是否编辑字段(1是) */
+    private String isEdit;
+
+    /** 是否列表字段(1是) */
+    private String isList;
+
+    /** 是否查询字段(1是) */
+    private String isQuery;
+
+    /** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */
+    private String queryType;
+
+    /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、image图片上传控件、upload文件上传控件、editor富文本控件) */
+    private String htmlType;
+
+    /**
+     * 外键(表明该表哪个字段是外键,取值id)
+     */
+    private Long foreignKey;
+
+    /**
+     * 外键名称(仅仅给前端展示使用)
+     */
+    private String foreignKeyName;
+
+    /** 字典类型 */
+    private String dictType;
+
+    /** 排序 */
+    private Integer sort;
+
+    /** 如果是下拉框,单选,复选框 对应的子节点的值 */
+    private List<SysDictData> sysDictData;
+
+    /** 哪些字段属于这些hr的 */
+    private Long hrParentId;
+    /**
+     * hr名称(仅仅给前端展示使用)
+     */
+    private String hrParentName;
+
+    /** hr的孩子们 */
+    private List<GenTableColumn> hrChildren;
+
+    /**
+     * 字段排序规则
+     */
+    private String mask;
+    /**
+     * 默认值
+     */
+    private String defaultValue;
+
+    /**
+     * 行数
+     */
+    private String numRows;
+    /**
+     * 列数
+     */
+    private String numColumns;
+
+    /**
+     * 字段翻译器
+     */
+    private String fieldTranslator;
+
+    /**
+     * 扩展属性 eg:{"col":["start_time","end_time"],"comp":"end_time-start_time"}
+     */
+    private String extendedAttributes;
+
+    /**
+     *是否输入 Y是
+     */
+    private String isIn;
+
+    /**
+     * 是否显示 Y是
+     */
+    private String isOut;
+
+    /**
+     * 此列对应的值
+     */
+    private Object columnValue;
+
+    /**
+     * 正则表达式
+     */
+    private String regular;
+
+    /**
+     * readonly, 前端回显的时候,判断是否可编辑
+     */
+    private boolean readonly;
+
+    /**
+     * 查询时:{"fkTableName":"外键表的表名", "fkColumnName":"关联外键表的列名", "dkColumnName":"关联表需要展示的字段名"}
+     * 根据列名获取关联表字段的值和名称{"name":"12", "value":"dept_id"}
+     */
+    private Map<String, Object> fkInfo;
+
+    private List<SysFile> annex;
+
+    /**
+     * 前端单对象展示样式
+     */
+    private String cssClass;
+    /**
+     * 表.字段全称
+     */
+    private String tableColumnName;
+    /**
+     * 前端再计算的时候,是否用到该列的扩展属性 extendedAttributes
+     */
+    private Boolean isUseExtend;
+    /**
+     * 单据编号规则表名称
+     */
+    private String seqName;
+
+    public String getSeqName() {
+        return seqName;
+    }
+
+    public void setSeqName(String seqName) {
+        this.seqName = seqName;
+    }
+
+    public Boolean getIsUseExtend() {
+        return isUseExtend;
+    }
+
+    public void setIsUseExtend(Boolean isUseExtend) {
+        this.isUseExtend = isUseExtend;
+    }
+
+    public String getTableColumnName() {
+        return tableColumnName;
+    }
+
+    public void setTableColumnName(String tableColumnName) {
+        this.tableColumnName = tableColumnName;
+    }
+
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+    public List<SysFile> getAnnex() {
+        return annex;
+    }
+
+    public void setAnnex(List<SysFile> annex) {
+        this.annex = annex;
+    }
+
+    public Map<String, Object> getFkInfo() {
+        return fkInfo;
+    }
+
+    public void setFkInfo(Map<String, Object> fkInfo) {
+        this.fkInfo = fkInfo;
+    }
+
+    public String getRegular() {
+        return regular;
+    }
+
+    public void setRegular(String regular) {
+        this.regular = regular;
+    }
+
+    public String getFieldTranslator() {
+        return fieldTranslator;
+    }
+
+    public void setFieldTranslator(String fieldTranslator) {
+        this.fieldTranslator = fieldTranslator;
+    }
+
+    public String getExtendedAttributes() {
+        return extendedAttributes;
+    }
+
+    public void setExtendedAttributes(String extendedAttributes) {
+        this.extendedAttributes = extendedAttributes;
+    }
+
+    public String getIsIn() {
+        return isIn;
+    }
+
+    public void setIsIn(String isIn) {
+        this.isIn = isIn;
+    }
+
+    public String getIsOut() {
+        return isOut;
+    }
+
+    public void setIsOut(String isOut) {
+        this.isOut = isOut;
+    }
+
+    public String getMask() {
+        return mask;
+    }
+
+    public void setMask(String mask) {
+        this.mask = mask;
+    }
+
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    public void setDefaultValue(String defaultValue) {
+        this.defaultValue = defaultValue;
+    }
+
+    public String getNumRows() {
+        return numRows;
+    }
+
+    public void setNumRows(String numRows) {
+        this.numRows = numRows;
+    }
+
+    public String getNumColumns() {
+        return numColumns;
+    }
+
+    public void setNumColumns(String numColumns) {
+        this.numColumns = numColumns;
+    }
+
+    public Long getForeignKey() {
+        return foreignKey;
+    }
+
+    public void setForeignKey(Long foreignKey) {
+        this.foreignKey = foreignKey;
+    }
+
+    public String getForeignKeyName() {
+        return foreignKeyName;
+    }
+
+    public void setForeignKeyName(String foreignKeyName) {
+        this.foreignKeyName = foreignKeyName;
+    }
+
+    public String getHrParentName() {
+        return hrParentName;
+    }
+
+    public void setHrParentName(String hrParentName) {
+        this.hrParentName = hrParentName;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public void setTableId(Long tableId)
+    {
+        this.tableId = tableId;
+    }
+
+    public Long getTableId()
+    {
+        return tableId;
+    }
+
+    public void setColumnName(String columnName)
+    {
+        this.columnName = columnName;
+    }
+
+    public String getColumnName()
+    {
+        return columnName;
+    }
+
+    public void setColumnComment(String columnComment)
+    {
+        this.columnComment = columnComment;
+    }
+
+    public String getColumnComment()
+    {
+        return columnComment;
+    }
+
+    public void setColumnType(String columnType)
+    {
+        this.columnType = columnType;
+    }
+
+    public String getColumnType()
+    {
+        return columnType;
+    }
+
+    public void setJavaType(String javaType)
+    {
+        this.javaType = javaType;
+    }
+
+    public String getJavaType()
+    {
+        return javaType;
+    }
+
+    public void setJavaField(String javaField)
+    {
+        this.javaField = javaField;
+    }
+
+    public String getJavaField()
+    {
+        return javaField;
+    }
+
+//    public String getCapJavaField()
+//    {
+//        return StringUtils.capitalize(javaField);
+//    }
+
+    public void setIsPk(String isPk)
+    {
+        this.isPk = isPk;
+    }
+
+    public String getIsPk()
+    {
+        return isPk;
+    }
+
+//    public boolean isPk()
+//    {
+//        return isPk(this.isPk);
+//    }
+
+//    public boolean isPk(String isPk)
+//    {
+//        return isPk != null && StringUtils.equals("1", isPk);
+//    }
+
+    public String getIsIncrement()
+    {
+        return isIncrement;
+    }
+
+    public void setIsIncrement(String isIncrement)
+    {
+        this.isIncrement = isIncrement;
+    }
+
+//    public boolean isIncrement()
+//    {
+//        return isIncrement(this.isIncrement);
+//    }
+
+//    public boolean isIncrement(String isIncrement)
+//    {
+//        return isIncrement != null && StringUtils.equals("1", isIncrement);
+//    }
+
+    public void setIsRequired(String isRequired)
+    {
+        this.isRequired = isRequired;
+    }
+
+    public String getIsRequired()
+    {
+        return isRequired;
+    }
+
+//    public boolean isRequired()
+//    {
+//        return isRequired(this.isRequired);
+//    }
+
+//    public boolean isRequired(String isRequired)
+//    {
+//        return isRequired != null && StringUtils.equals("1", isRequired);
+//    }
+
+    public void setIsInsert(String isInsert)
+    {
+        this.isInsert = isInsert;
+    }
+
+    public String getIsInsert()
+    {
+        return isInsert;
+    }
+
+//    public boolean isInsert()
+//    {
+//        return isInsert(this.isInsert);
+//    }
+
+//    public boolean isInsert(String isInsert)
+//    {
+//        return isInsert != null && StringUtils.equals("1", isInsert);
+//    }
+
+    public void setIsEdit(String isEdit)
+    {
+        this.isEdit = isEdit;
+    }
+
+    public String getIsEdit()
+    {
+        return isEdit;
+    }
+
+//    public boolean isEdit()
+//    {
+//        return isInsert(this.isEdit);
+//    }
+
+//    public boolean isEdit(String isEdit)
+//    {
+//        return isEdit != null && StringUtils.equals("1", isEdit);
+//    }
+
+    public void setIsList(String isList)
+    {
+        this.isList = isList;
+    }
+
+    public String getIsList()
+    {
+        return isList;
+    }
+
+//    public boolean isList()
+//    {
+//        return isList(this.isList);
+//    }
+//
+//    public boolean isList(String isList)
+//    {
+//        return isList != null && StringUtils.equals("1", isList);
+//    }
+
+    public void setIsQuery(String isQuery)
+    {
+        this.isQuery = isQuery;
+    }
+
+    public String getIsQuery()
+    {
+        return isQuery;
+    }
+
+//    public boolean isQuery()
+//    {
+//        return isQuery(this.isQuery);
+//    }
+
+//    public boolean isQuery(String isQuery)
+//    {
+//        return isQuery != null && StringUtils.equals("1", isQuery);
+//    }
+
+    public void setQueryType(String queryType)
+    {
+        this.queryType = queryType;
+    }
+
+    public String getQueryType()
+    {
+        return queryType;
+    }
+
+    public String getHtmlType()
+    {
+        return htmlType;
+    }
+
+    public void setHtmlType(String htmlType)
+    {
+        this.htmlType = htmlType;
+    }
+
+    public void setDictType(String dictType)
+    {
+        this.dictType = dictType;
+    }
+
+    public String getDictType()
+    {
+        return dictType;
+    }
+
+    public void setSort(Integer sort)
+    {
+        this.sort = sort;
+    }
+
+    public Integer getSort()
+    {
+        return sort;
+    }
+
+//    public boolean isSuperColumn()
+//    {
+//        return isSuperColumn(this.javaField);
+//    }
+//
+//    public static boolean isSuperColumn(String javaField)
+//    {
+//        return StringUtils.equalsAnyIgnoreCase(javaField,
+//                // BaseEntity
+//                "createBy", "createTime", "updateBy", "updateTime", "remark",
+//                // TreeEntity
+//                "parentName", "parentId", "orderNum", "ancestors");
+//    }
+
+//    public boolean isUsableColumn()
+//    {
+//        return isUsableColumn(javaField);
+//    }
+
+//    public static boolean isUsableColumn(String javaField)
+//    {
+//        // isSuperColumn()中的名单用于避免生成多余Domain属性,若某些属性在生成页面时需要用到不能忽略,则放在此处白名单
+//        return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark");
+//    }
+
+//    public String readConverterExp()
+//    {
+//        String remarks = StringUtils.substringBetween(this.columnComment, "(", ")");
+//        StringBuffer sb = new StringBuffer();
+//        if (StringUtils.isNotEmpty(remarks))
+//        {
+//            for (String value : remarks.split(" "))
+//            {
+//                if (StringUtils.isNotEmpty(value))
+//                {
+//                    Object startStr = value.subSequence(0, 1);
+//                    String endStr = value.substring(1);
+//                    sb.append("").append(startStr).append("=").append(endStr).append(",");
+//                }
+//            }
+//            return sb.deleteCharAt(sb.length() - 1).toString();
+//        }
+//        else
+//        {
+//            return this.columnComment;
+//        }
+//    }
+
+    public List<SysDictData> getSysDictData() {
+        return sysDictData;
+    }
+
+    public void setSysDictData(List<SysDictData> sysDictData) {
+        this.sysDictData = sysDictData;
+    }
+
+    public Long getHrParentId() {
+        return hrParentId;
+    }
+
+    public void setHrParentId(Long hrParentId) {
+        this.hrParentId = hrParentId;
+    }
+
+    public List<GenTableColumn> getHrChildren() {
+        return hrChildren;
+    }
+
+    public void setHrChildren(List<GenTableColumn> hrChildren) {
+        this.hrChildren = hrChildren;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public Object getColumnValue() {
+        return columnValue;
+    }
+
+    public void setColumnValue(Object columnValue) {
+        this.columnValue = columnValue;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
+}

+ 27 - 0
boman-report/src/main/java/com/boman/report/mapper/GenTableColumnMapper.java

@@ -0,0 +1,27 @@
+package com.boman.report.mapper;
+
+/**
+ * @author shiqian
+ * @date 2021年08月31日 10:51
+ **/
+
+import java.util.List;
+
+import com.boman.domain.GenTableColumn;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 业务字段 数据层
+ *
+ * @author ruoyi
+ */
+public interface GenTableColumnMapper {
+    /**
+     * 查询业务字段列表
+     *
+     * @param tableIdList 业务字段编号List
+     * @return 业务字段集合
+     */
+    List<GenTableColumn> listByTableIdList(@Param("tableIdList") List<Long> tableIdList);
+
+}

+ 23 - 0
boman-report/src/main/java/com/boman/report/mapper/GenTableMapper.java

@@ -0,0 +1,23 @@
+package com.boman.report.mapper;
+
+import com.boman.domain.GenTable;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 业务 数据层
+ *
+ * @author ruoyi
+ */
+public interface GenTableMapper {
+
+    /**
+     * 查询表名称业务信息
+     *
+     * @param tableName 表名称
+     * @return 业务信息
+     */
+    GenTable selectGenTableByName(String tableName);
+
+}

+ 36 - 36
boman-report/src/main/java/com/boman/report/mapper/StatisticReportMapper.java

@@ -1,36 +1,36 @@
-package com.boman.report.mapper;
-
-import com.boman.domain.dto.StatisticReportDto;
-import com.boman.domain.entity.StatisticReport;
-import com.boman.domain.entity.StatisticReport;
-import com.boman.domain.entity.vo.StatisticReportVo;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author shiqian
- * @date 2021年08月24日 11:09
- **/
-@Repository
-public interface StatisticReportMapper {
-
-    List<StatisticReportDto> selectReportInfo(Map<String, String> params);
-
-    List<StatisticReport> selectList(StatisticReport report);
-
-    int insert(StatisticReport report);
-
-    int update(StatisticReport report);
-
-    /**
-     * 获取表报详情
-     * @param id
-     * @return
-     */
-    StatisticReportVo getReportInfo(Long id);
-
-    StatisticReport getDetailById(Long id);
-
-}
+//package com.boman.report.mapper;
+//
+//import com.boman.domain.dto.StatisticReportDto;
+//import com.boman.domain.entity.StatisticReport;
+//import com.boman.domain.entity.StatisticReport;
+//import com.boman.domain.entity.vo.StatisticReportVo;
+//import org.springframework.stereotype.Repository;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月24日 11:09
+// **/
+//@Repository
+//public interface StatisticReportMapper {
+//
+//    List<StatisticReportDto> selectReportInfo(Map<String, String> params);
+//
+//    List<StatisticReport> selectList(StatisticReport report);
+//
+//    int insert(StatisticReport report);
+//
+//    int update(StatisticReport report);
+//
+//    /**
+//     * 获取表报详情
+//     * @param id
+//     * @return
+//     */
+//    StatisticReportVo getReportInfo(Long id);
+//
+//    StatisticReport getDetailById(Long id);
+//
+//}

+ 25 - 25
boman-report/src/main/java/com/boman/report/mapper/StatisticReportPersonnelMapper.java

@@ -1,25 +1,25 @@
-package com.boman.report.mapper;
-
-import com.boman.domain.entity.StatisticReportPersonnel;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
- * @author shiqian
- * @date 2021年08月24日 11:09
- **/
-@Repository
-public interface StatisticReportPersonnelMapper {
-
-    int deleteByStatisticIds(Long[] ids);
-
-    int insert(StatisticReportPersonnel personnel);
-
-    int updateStatus(StatisticReportPersonnel personnel);
-
-    List<StatisticReportPersonnel> selectByStatisticId(Long id);
-
-    List<StatisticReportPersonnel> selectList(StatisticReportPersonnel personnel);
-
-}
+//package com.boman.report.mapper;
+//
+//import com.boman.domain.entity.StatisticReportPersonnel;
+//import org.springframework.stereotype.Repository;
+//
+//import java.util.List;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月24日 11:09
+// **/
+//@Repository
+//public interface StatisticReportPersonnelMapper {
+//
+//    int deleteByStatisticIds(Long[] ids);
+//
+//    int insert(StatisticReportPersonnel personnel);
+//
+//    int updateStatus(StatisticReportPersonnel personnel);
+//
+//    List<StatisticReportPersonnel> selectByStatisticId(Long id);
+//
+//    List<StatisticReportPersonnel> selectList(StatisticReportPersonnel personnel);
+//
+//}

+ 28 - 0
boman-report/src/main/java/com/boman/report/service/IGenTableColumnService.java

@@ -0,0 +1,28 @@
+package com.boman.report.service;
+
+import com.boman.domain.GenTableColumn;
+
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @date 2021年08月31日 10:48
+ **/
+public interface IGenTableColumnService {
+
+    /**
+     * 功能描述: 根据表名查询改表所有的字段信息
+     *
+     * @param tableName tableName
+     * @return java.util.List<com.boman.domain.GenTableColumn>
+     */
+    List<GenTableColumn> listColumnsByTableName(String tableName);
+
+    /**
+     * 查询业务字段列表
+     *
+     * @param tableIdList 业务字段编号List
+     * @return 业务字段集合
+     */
+    public List<GenTableColumn> listByTableIdList(List<Long> tableIdList);
+}

+ 14 - 14
boman-report/src/main/java/com/boman/report/service/IImportServcie.java

@@ -1,14 +1,14 @@
-package com.boman.report.service;
-
-import com.alibaba.fastjson.JSONObject;
-import com.boman.domain.dto.AjaxResult;
-import com.boman.domain.dto.ImportFileDto;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-public interface IImportServcie {
-
-    AjaxResult importData(ImportFileDto fileDto, Long personnelId, String tableName) throws Exception;
-
-}
+//package com.boman.report.service;
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.domain.dto.ImportFileDto;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import java.util.List;
+//
+//public interface IImportServcie {
+//
+//    AjaxResult importData(ImportFileDto fileDto, Long personnelId, String tableName) throws Exception;
+//
+//}

+ 20 - 20
boman-report/src/main/java/com/boman/report/service/StatisticReportPersonnelService.java

@@ -1,20 +1,20 @@
-package com.boman.report.service;
-
-import com.boman.domain.entity.StatisticReportPersonnel;
-
-import java.util.List;
-
-/**
- * @author shiqian
- * @date 2021年08月24日 11:09
- **/
-public interface StatisticReportPersonnelService {
-
-    int deleteByStatisticIds(Long[] ids);
-
-    int insert(List<StatisticReportPersonnel> personnels);
-
-    int updateStatus(StatisticReportPersonnel personnel);
-
-    List<StatisticReportPersonnel> selectList(StatisticReportPersonnel personnel);
-}
+//package com.boman.report.service;
+//
+//import com.boman.domain.entity.StatisticReportPersonnel;
+//
+//import java.util.List;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月24日 11:09
+// **/
+//public interface StatisticReportPersonnelService {
+//
+//    int deleteByStatisticIds(Long[] ids);
+//
+//    int insert(List<StatisticReportPersonnel> personnels);
+//
+//    int updateStatus(StatisticReportPersonnel personnel);
+//
+//    List<StatisticReportPersonnel> selectList(StatisticReportPersonnel personnel);
+//}

+ 39 - 39
boman-report/src/main/java/com/boman/report/service/StatisticReportService.java

@@ -1,39 +1,39 @@
-package com.boman.report.service;
-
-import com.boman.domain.dto.AjaxResult;
-import com.boman.domain.dto.StatisticReportDto;
-import com.boman.domain.entity.StatisticReport;
-
-import java.util.List;
-import java.util.Map;
-
-import com.boman.domain.dto.AjaxResult;
-
-import com.boman.domain.dto.AjaxResult;
-import com.boman.domain.entity.StatisticReport;
-
-import java.util.List;
-
-/**
- * @author shiqian
- * @date 2021年08月24日 11:10
- **/
-public interface StatisticReportService {
-
-    Map<String, Object> datas(String name);
-
-    List<StatisticReport> selectList(StatisticReport report);
-
-    AjaxResult saveOrUpdate(StatisticReport report);
-
-    /**
-     * 获取表报详情
-     * @param id
-     * @return
-     */
-    AjaxResult getReportInfo (Long id);
-
-    public StatisticReport getDetailById(Long id);
-   
-}
-
+//package com.boman.report.service;
+//
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.domain.dto.StatisticReportDto;
+//import com.boman.domain.entity.StatisticReport;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//import com.boman.domain.dto.AjaxResult;
+//
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.domain.entity.StatisticReport;
+//
+//import java.util.List;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月24日 11:10
+// **/
+//public interface StatisticReportService {
+//
+//    Map<String, Object> datas(String name);
+//
+//    List<StatisticReport> selectList(StatisticReport report);
+//
+//    AjaxResult saveOrUpdate(StatisticReport report);
+//
+//    /**
+//     * 获取表报详情
+//     * @param id
+//     * @return
+//     */
+//    AjaxResult getReportInfo (Long id);
+//
+//    public StatisticReport getDetailById(Long id);
+//
+//}
+//

+ 61 - 0
boman-report/src/main/java/com/boman/report/service/impl/GenTableColumnServiceImpl.java

@@ -0,0 +1,61 @@
+package com.boman.report.service.impl;
+
+import com.boman.common.core.utils.obj.ObjectUtils;
+import com.boman.domain.GenTable;
+import com.boman.domain.GenTableColumn;
+import com.boman.report.mapper.GenTableColumnMapper;
+import com.boman.report.mapper.GenTableMapper;
+import com.boman.report.service.IGenTableColumnService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author shiqian
+ * @date 2021年08月31日 10:48
+ **/
+@Service
+public class GenTableColumnServiceImpl implements IGenTableColumnService {
+
+    @Resource
+    private GenTableMapper genTableMapper;
+    @Resource
+    private GenTableColumnMapper genTableColumnMapper;
+
+    /**
+     * 功能描述: 根据表名查询改表所有的字段信息
+     *
+     * @param tableName tableName
+     * @return java.util.List<com.boman.domain.GenTableColumn>
+     */
+    @Override
+    public List<GenTableColumn> listColumnsByTableName(String tableName) {
+        GenTable genTable = genTableMapper.selectGenTableByName(tableName);
+
+        List<GenTableColumn> columns = genTable.getColumns();
+        if (ObjectUtils.isEmpty(columns)) {
+            columns = listByTableIdList(Collections.singletonList(genTable.getId()));
+        }
+
+        return columns;
+    }
+
+    /**
+     * 查询业务字段列表
+     *
+     * @param tableIdList 业务字段编号List
+     * @return 业务字段集合
+     */
+    @Override
+    public List<GenTableColumn> listByTableIdList(List<Long> tableIdList) {
+        if (null == tableIdList || tableIdList.isEmpty()) {
+            return Collections.emptyList();
+        }
+
+        return genTableColumnMapper.listByTableIdList(tableIdList);
+
+    }
+}

+ 199 - 199
boman-report/src/main/java/com/boman/report/service/impl/ImportServiceImpl.java

@@ -1,199 +1,199 @@
-package com.boman.report.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.boman.common.core.utils.CollectUtils;
-import com.boman.common.core.utils.StringUtils;
-import com.boman.common.core.utils.obj.ObjectUtils;
-import com.boman.common.core.utils.poi.ExcelUtil;
-import com.boman.common.redis.RedisKey;
-import com.boman.common.redis.service.RedisService;
-import com.boman.domain.GenTable;
-import com.boman.domain.GenTableColumn;
-import com.boman.domain.dto.AjaxResult;
-import com.boman.domain.dto.ImportExcelDto;
-import com.boman.domain.dto.ImportFileDto;
-import com.boman.domain.entity.StatisticReportPersonnel;
-import com.boman.report.mapper.ImportMapper;
-import com.boman.report.service.IImportServcie;
-import com.boman.report.service.StatisticReportPersonnelService;
-import com.boman.web.core.api.RemoteObjService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.*;
-
-/**
- * 导入服务类
- */
-@Service
-public class ImportServiceImpl implements IImportServcie {
-
-    private static final Logger logger = LoggerFactory.getLogger(ImportServiceImpl.class);
-
-    private static final String CREATE_BY = "create_by";
-    private static final String CREATE_TIME = "create_time";
-    private static final String UPDATE_BY = "update_by";
-    private static final String UPDATE_TIME = "update_time";
-
-    @Autowired
-    private ImportMapper importMapper;
-    @Autowired
-    private RedisService redisService;
-    @Autowired
-    private RemoteObjService remoteObjService;
-    @Autowired
-    private StatisticReportPersonnelService personnelService;
-
-    @Override
-    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
-    public AjaxResult importData(ImportFileDto fileDto, Long personnelId, String tableName) throws Exception {
-        Objects.requireNonNull(fileDto, "未上传文件!");
-        ObjectUtils.requireNonNull(tableName, "表名为空!");
-        GenTable genTable = redisService.getCacheObject(RedisKey.TABLE_INFO + tableName);
-        Map<String, GenTableColumn> columnMap = this.genImportColumn(genTable.getColumns());
-        List<GenTableColumn> columns = genColumData(tableName, columnMap);
-        this.genBaseData(columns,  columnMap);
-        ExcelUtil<JSONObject> util = new ExcelUtil<>(JSONObject.class);
-
-        String realPath = getFileRealPath(fileDto);
-        File file = new File(realPath);
-        List<JSONObject> list = util.importCommonExcel("", new FileInputStream(file), columns);
-        ImportExcelDto dto = new ImportExcelDto();
-        dto.setDataList(list);
-        dto.setTableName(tableName);
-
-        try {
-            remoteObjService.importCommonData(dto);
-        }catch (Exception e) {
-            e.printStackTrace();
-        }
-
-        // 上传成功后需要修改上报人的状态
-        StatisticReportPersonnel personnel = new StatisticReportPersonnel();
-        personnel.setId(personnelId);
-        personnel.setStatus("2");
-
-        JSONObject json = (JSONObject) JSONObject.toJSON(fileDto);
-
-        personnel.setUploadFile(JSON.toJSONString(CollectUtils.newArrayList(json)));
-        personnelService.updateStatus(personnel);
-        return AjaxResult.success();
-    }
-
-    /**
-     * 将列组装成map,方便判断,无需多次循环
-     *
-     * @param allColumns
-     * @return
-     */
-    private Map<String, GenTableColumn> genImportColumn(List<GenTableColumn> allColumns) {
-        Map<String, GenTableColumn> columnMap = new HashMap<>();
-        for (GenTableColumn column : allColumns) {
-            String columnName = column.getColumnName();
-            columnMap.put(columnName, column);
-        }
-        return columnMap;
-    }
-
-    /**
-     * 根据报表设计中的表格字段获取gentable中的数据,用于导出
-     *
-     * 数据格式:"rows":{
-     * 	"0":{
-     * 		"cells":{
-         * 		"0":{
-         * 			"text":"#{urge_read_message.message_title}",
-         * 			"style":2
-         *                },
-         * 		"1":{
-         * 			"text":"#{urge_read_message.send_user_id}",
-         * 			"style":2
-         *        },
-         * 		"2":{
-         * 			"text":"#{urge_read_message.receive_user_name}",
-         * 			"style":2
-         *        },
-         * 		"3":{
-         * 			"style":2,
-         * 			"text":"#{urge_read_message.is_del}"
-         *        }* 	},
-         * 	"len":100
-     * },
-     * @param tableName
-     * @param columnMap 列map集合
-     * @return
-     */
-    private List<GenTableColumn> genColumData(String tableName, Map<String, GenTableColumn> columnMap) {
-        List<GenTableColumn> columns = new ArrayList<>();
-        // 根据名获取报表设计相关数据
-        JSONObject designObject = importMapper.getReportDesignData(tableName);
-        if(designObject == null) {
-            AjaxResult.error("数据表没有设计报表模板!请先设计报表模板!");
-        }
-        String jsonStr = designObject.getString("jsonStr");
-        if(StringUtils.isEmpty(jsonStr)) {
-            AjaxResult.error("报表模板没有相关设计数据,请确认是否设计好报表模板!");
-        }
-        JSONObject rowDatas = JSONObject.parseObject(jsonStr).getJSONObject("rows");
-        int maxKey = rowDatas.size() - 1;
-        Iterator<String> rowIterator = rowDatas.keySet().iterator();
-        int count  = 0;
-        while (rowIterator.hasNext()) {
-            count ++;
-            String key = rowIterator.next();
-            if(count == maxKey) {
-                JSONObject cells = JSONObject.parseObject(rowDatas.getString(key));
-                Iterator<String> cellIterator = cells.keySet().iterator();
-                while (cellIterator.hasNext()) {
-                    String cellKey = cellIterator.next();
-                    JSONObject feildJson = cells.getJSONObject(cellKey);
-                    Iterator<String> feildIterator = feildJson.keySet().iterator();
-                    while (feildIterator.hasNext()) {
-                        String feildName = "";
-                        String textStr = feildJson.getString(feildIterator.next());
-                        if(StringUtils.isNotEmpty(textStr)) {
-                            JSONObject textJson = JSONObject.parseObject(textStr);
-                            String text = textJson.getString("text");
-                            // 获取数据
-                            if(StringUtils.isNotEmpty(text)) {
-                                String realText = text.replace("#{", "").replace("}", "");
-                                feildName = realText.substring(tableName.length() + 1, realText.length());
-                                if(columnMap.containsKey(feildName)) {
-                                    columns.add(columnMap.get(feildName));
-                                }
-                            }
-                        }
-                    }
-                }
-                break;
-            }
-        }
-        return columns;
-    }
-
-    /**
-     * 基础字段填充
-     *
-     * @param columns
-     * @param columnMap
-     */
-    private void genBaseData(List<GenTableColumn> columns, Map<String, GenTableColumn> columnMap) {
-        columns.add(columnMap.get(CREATE_BY));
-        columns.add(columnMap.get(CREATE_TIME));
-        columns.add(columnMap.get(UPDATE_BY));
-        columns.add(columnMap.get(UPDATE_TIME));
-    }
-
-    private String getFileRealPath(ImportFileDto dto) {
-        return dto.getAbsolutePath();
-    }
-}
+//package com.boman.report.service.impl;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.alibaba.fastjson.JSONArray;
+//import com.alibaba.fastjson.JSONObject;
+//import com.boman.common.core.utils.CollectUtils;
+//import com.boman.common.core.utils.StringUtils;
+//import com.boman.common.core.utils.obj.ObjectUtils;
+//import com.boman.common.core.utils.poi.ExcelUtil;
+//import com.boman.common.redis.RedisKey;
+//import com.boman.common.redis.service.RedisService;
+//import com.boman.domain.GenTable;
+//import com.boman.domain.GenTableColumn;
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.domain.dto.ImportExcelDto;
+//import com.boman.domain.dto.ImportFileDto;
+//import com.boman.domain.entity.StatisticReportPersonnel;
+//import com.boman.report.mapper.ImportMapper;
+//import com.boman.report.service.IImportServcie;
+//import com.boman.report.service.StatisticReportPersonnelService;
+//import com.boman.web.core.api.RemoteObjService;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Isolation;
+//import org.springframework.transaction.annotation.Transactional;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import java.io.File;
+//import java.io.FileInputStream;
+//import java.util.*;
+//
+///**
+// * 导入服务类
+// */
+//@Service
+//public class ImportServiceImpl implements IImportServcie {
+//
+//    private static final Logger logger = LoggerFactory.getLogger(ImportServiceImpl.class);
+//
+//    private static final String CREATE_BY = "create_by";
+//    private static final String CREATE_TIME = "create_time";
+//    private static final String UPDATE_BY = "update_by";
+//    private static final String UPDATE_TIME = "update_time";
+//
+//    @Autowired
+//    private ImportMapper importMapper;
+//    @Autowired
+//    private RedisService redisService;
+//    @Autowired
+//    private RemoteObjService remoteObjService;
+//    @Autowired
+//    private StatisticReportPersonnelService personnelService;
+//
+//    @Override
+//    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
+//    public AjaxResult importData(ImportFileDto fileDto, Long personnelId, String tableName) throws Exception {
+//        Objects.requireNonNull(fileDto, "未上传文件!");
+//        ObjectUtils.requireNonNull(tableName, "表名为空!");
+//        GenTable genTable = redisService.getCacheObject(RedisKey.TABLE_INFO + tableName);
+//        Map<String, GenTableColumn> columnMap = this.genImportColumn(genTable.getColumns());
+//        List<GenTableColumn> columns = genColumData(tableName, columnMap);
+//        this.genBaseData(columns,  columnMap);
+//        ExcelUtil<JSONObject> util = new ExcelUtil<>(JSONObject.class);
+//
+//        String realPath = getFileRealPath(fileDto);
+//        File file = new File(realPath);
+//        List<JSONObject> list = util.importCommonExcel("", new FileInputStream(file), columns);
+//        ImportExcelDto dto = new ImportExcelDto();
+//        dto.setDataList(list);
+//        dto.setTableName(tableName);
+//
+//        try {
+//            remoteObjService.importCommonData(dto);
+//        }catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
+//        // 上传成功后需要修改上报人的状态
+//        StatisticReportPersonnel personnel = new StatisticReportPersonnel();
+//        personnel.setId(personnelId);
+//        personnel.setStatus("2");
+//
+//        JSONObject json = (JSONObject) JSONObject.toJSON(fileDto);
+//
+//        personnel.setUploadFile(JSON.toJSONString(CollectUtils.newArrayList(json)));
+//        personnelService.updateStatus(personnel);
+//        return AjaxResult.success();
+//    }
+//
+//    /**
+//     * 将列组装成map,方便判断,无需多次循环
+//     *
+//     * @param allColumns
+//     * @return
+//     */
+//    private Map<String, GenTableColumn> genImportColumn(List<GenTableColumn> allColumns) {
+//        Map<String, GenTableColumn> columnMap = new HashMap<>();
+//        for (GenTableColumn column : allColumns) {
+//            String columnName = column.getColumnName();
+//            columnMap.put(columnName, column);
+//        }
+//        return columnMap;
+//    }
+//
+//    /**
+//     * 根据报表设计中的表格字段获取gentable中的数据,用于导出
+//     *
+//     * 数据格式:"rows":{
+//     * 	"0":{
+//     * 		"cells":{
+//         * 		"0":{
+//         * 			"text":"#{urge_read_message.message_title}",
+//         * 			"style":2
+//         *                },
+//         * 		"1":{
+//         * 			"text":"#{urge_read_message.send_user_id}",
+//         * 			"style":2
+//         *        },
+//         * 		"2":{
+//         * 			"text":"#{urge_read_message.receive_user_name}",
+//         * 			"style":2
+//         *        },
+//         * 		"3":{
+//         * 			"style":2,
+//         * 			"text":"#{urge_read_message.is_del}"
+//         *        }* 	},
+//         * 	"len":100
+//     * },
+//     * @param tableName
+//     * @param columnMap 列map集合
+//     * @return
+//     */
+//    private List<GenTableColumn> genColumData(String tableName, Map<String, GenTableColumn> columnMap) {
+//        List<GenTableColumn> columns = new ArrayList<>();
+//        // 根据名获取报表设计相关数据
+//        JSONObject designObject = importMapper.getReportDesignData(tableName);
+//        if(designObject == null) {
+//            AjaxResult.error("数据表没有设计报表模板!请先设计报表模板!");
+//        }
+//        String jsonStr = designObject.getString("jsonStr");
+//        if(StringUtils.isEmpty(jsonStr)) {
+//            AjaxResult.error("报表模板没有相关设计数据,请确认是否设计好报表模板!");
+//        }
+//        JSONObject rowDatas = JSONObject.parseObject(jsonStr).getJSONObject("rows");
+//        int maxKey = rowDatas.size() - 1;
+//        Iterator<String> rowIterator = rowDatas.keySet().iterator();
+//        int count  = 0;
+//        while (rowIterator.hasNext()) {
+//            count ++;
+//            String key = rowIterator.next();
+//            if(count == maxKey) {
+//                JSONObject cells = JSONObject.parseObject(rowDatas.getString(key));
+//                Iterator<String> cellIterator = cells.keySet().iterator();
+//                while (cellIterator.hasNext()) {
+//                    String cellKey = cellIterator.next();
+//                    JSONObject feildJson = cells.getJSONObject(cellKey);
+//                    Iterator<String> feildIterator = feildJson.keySet().iterator();
+//                    while (feildIterator.hasNext()) {
+//                        String feildName = "";
+//                        String textStr = feildJson.getString(feildIterator.next());
+//                        if(StringUtils.isNotEmpty(textStr)) {
+//                            JSONObject textJson = JSONObject.parseObject(textStr);
+//                            String text = textJson.getString("text");
+//                            // 获取数据
+//                            if(StringUtils.isNotEmpty(text)) {
+//                                String realText = text.replace("#{", "").replace("}", "");
+//                                feildName = realText.substring(tableName.length() + 1, realText.length());
+//                                if(columnMap.containsKey(feildName)) {
+//                                    columns.add(columnMap.get(feildName));
+//                                }
+//                            }
+//                        }
+//                    }
+//                }
+//                break;
+//            }
+//        }
+//        return columns;
+//    }
+//
+//    /**
+//     * 基础字段填充
+//     *
+//     * @param columns
+//     * @param columnMap
+//     */
+//    private void genBaseData(List<GenTableColumn> columns, Map<String, GenTableColumn> columnMap) {
+//        columns.add(columnMap.get(CREATE_BY));
+//        columns.add(columnMap.get(CREATE_TIME));
+//        columns.add(columnMap.get(UPDATE_BY));
+//        columns.add(columnMap.get(UPDATE_TIME));
+//    }
+//
+//    private String getFileRealPath(ImportFileDto dto) {
+//        return dto.getAbsolutePath();
+//    }
+//}

+ 66 - 66
boman-report/src/main/java/com/boman/report/service/impl/StatisticReportPersonnelImpl.java

@@ -1,66 +1,66 @@
-package com.boman.report.service.impl;
-
-import com.boman.common.core.utils.SecurityUtils;
-import com.boman.domain.entity.StatisticReportPersonnel;
-import com.boman.report.mapper.StatisticReportPersonnelMapper;
-import com.boman.report.service.StatisticReportPersonnelService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.sql.Timestamp;
-import java.util.List;
-
-import static com.boman.common.core.utils.obj.ObjectUtils.*;
-
-/**
- * @author shiqian
- * @date 2021年08月24日 11:11
- **/
-@Service
-public class StatisticReportPersonnelImpl implements StatisticReportPersonnelService {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(StatisticReportPersonnelImpl.class);
-
-    @Autowired
-    private StatisticReportPersonnelMapper personnelMapper;
-
-    @Override
-    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
-    public int deleteByStatisticIds(Long[] ids) {
-        return personnelMapper.deleteByStatisticIds(ids);
-    }
-
-    @Override
-    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
-    public int insert(List<StatisticReportPersonnel> personnels) {
-        if(isEmpty(personnels)) {
-            return 0;
-        }
-
-        for(StatisticReportPersonnel personnel : personnels) {
-            Timestamp timestamp = new Timestamp(System.currentTimeMillis());
-            personnel.setCreateTime(timestamp);
-            personnel.setUpdateTime(timestamp);
-            personnelMapper.insert(personnel);
-        }
-        return personnels.size();
-    }
-
-    @Override
-    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
-    public int updateStatus(StatisticReportPersonnel personnel) {
-        return personnelMapper.updateStatus(personnel);
-    }
-
-    @Override
-    public List<StatisticReportPersonnel> selectList(StatisticReportPersonnel personnel) {
-        personnel.setUserName(SecurityUtils.getUsername());
-        return personnelMapper.selectList(personnel);
-    }
-
-
-}
+//package com.boman.report.service.impl;
+//
+//import com.boman.common.core.utils.SecurityUtils;
+//import com.boman.domain.entity.StatisticReportPersonnel;
+//import com.boman.report.mapper.StatisticReportPersonnelMapper;
+//import com.boman.report.service.StatisticReportPersonnelService;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Isolation;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.sql.Timestamp;
+//import java.util.List;
+//
+//import static com.boman.common.core.utils.obj.ObjectUtils.*;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月24日 11:11
+// **/
+//@Service
+//public class StatisticReportPersonnelImpl implements StatisticReportPersonnelService {
+//
+//    private static final Logger LOGGER = LoggerFactory.getLogger(StatisticReportPersonnelImpl.class);
+//
+//    @Autowired
+//    private StatisticReportPersonnelMapper personnelMapper;
+//
+//    @Override
+//    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
+//    public int deleteByStatisticIds(Long[] ids) {
+//        return personnelMapper.deleteByStatisticIds(ids);
+//    }
+//
+//    @Override
+//    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
+//    public int insert(List<StatisticReportPersonnel> personnels) {
+//        if(isEmpty(personnels)) {
+//            return 0;
+//        }
+//
+//        for(StatisticReportPersonnel personnel : personnels) {
+//            Timestamp timestamp = new Timestamp(System.currentTimeMillis());
+//            personnel.setCreateTime(timestamp);
+//            personnel.setUpdateTime(timestamp);
+//            personnelMapper.insert(personnel);
+//        }
+//        return personnels.size();
+//    }
+//
+//    @Override
+//    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
+//    public int updateStatus(StatisticReportPersonnel personnel) {
+//        return personnelMapper.updateStatus(personnel);
+//    }
+//
+//    @Override
+//    public List<StatisticReportPersonnel> selectList(StatisticReportPersonnel personnel) {
+//        personnel.setUserName(SecurityUtils.getUsername());
+//        return personnelMapper.selectList(personnel);
+//    }
+//
+//
+//}

+ 198 - 198
boman-report/src/main/java/com/boman/report/service/impl/StatisticReportServiceImpl.java

@@ -1,198 +1,198 @@
-package com.boman.report.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.TypeReference;
-import com.boman.common.core.utils.CollectUtils;
-import com.boman.common.core.utils.StringUtils;
-import com.boman.domain.SysFile;
-import com.boman.domain.dto.AjaxResult;
-import com.boman.domain.dto.StatisticReportDto;
-import com.boman.domain.entity.StatisticReport;
-import com.boman.domain.entity.StatisticReportPersonnel;
-import com.boman.domain.entity.vo.StatisticReportVo;
-import com.boman.report.mapper.StatisticReportMapper;
-import com.boman.report.mapper.StatisticReportPersonnelMapper;
-import com.boman.report.service.StatisticReportService;
-import com.boman.common.core.utils.SecurityUtils;
-import com.boman.report.service.StatisticReportPersonnelService;
-import org.apache.commons.lang3.SerializationUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
-import org.springframework.transaction.annotation.Transactional;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author shiqian
- * @date 2021年08月24日 11:10
- **/
-@Service
-public class StatisticReportServiceImpl implements StatisticReportService {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ImportServiceImpl.class);
-
-
-    public static final String INSERT =  "insert";
-
-    public static final String UPDATE =  "update";
-
-
-    @Autowired
-    private StatisticReportPersonnelService personnelService;
-
-    @Autowired
-    private StatisticReportMapper statisticReportMapper;
-
-    @Autowired
-    private StatisticReportPersonnelMapper statisticReportPersonnelMapper;
-    /**
-     * 获取表报详情
-     * @param id
-     * @return
-     */
-    @Override
-    public AjaxResult getReportInfo(Long id) {
-        StatisticReportVo reportInfo = statisticReportMapper.getReportInfo(id);
-        //获取参与人员信息
-        List<StatisticReportPersonnel> statisticReportPersonnels = statisticReportPersonnelMapper.selectByStatisticId(id);
-        if (statisticReportPersonnels != null && statisticReportPersonnels.size() > 0){
-            Map<String, List<String>> personnelMap = statisticReportPersonnels.stream().collect(Collectors.groupingBy(StatisticReportPersonnel::getDeptName, Collectors.mapping(StatisticReportPersonnel::getUserName, Collectors.toList())));
-            Map<String, List<String>> filledOutMap = statisticReportPersonnels.stream().filter(e -> "1".equals(e.getStatus())).collect(Collectors.groupingBy(StatisticReportPersonnel::getDeptName, Collectors.mapping(StatisticReportPersonnel::getUserName, Collectors.toList())));
-            Map<String, List<StatisticReportPersonnel>> filledInMap = statisticReportPersonnels.stream().filter(e -> "2".equals(e.getStatus())).collect(Collectors.groupingBy(StatisticReportPersonnel::getDeptName));
-            //参与人员
-            List<Map<String,Object>> personnelList = new ArrayList<>();
-            //已填报
-            List<Map<String,Object>> filledInList = new ArrayList<>();
-            //未填报
-            List<Map<String,Object>> filledOutList = new ArrayList<>();
-            if (personnelMap != null && personnelMap.size() > 0){
-                personnelMap.forEach((key, value) -> {
-                    Map<String,Object> map = new HashMap<>();
-                    map.put("deptName",key);
-                    map.put("userNameList",value);
-                    personnelList.add(map);
-                });
-            }
-            if (filledOutMap != null && filledOutMap.size() > 0){
-                filledOutMap.forEach((key, value) -> {
-                    Map<String,Object> map= new HashMap<>();
-                    map.put("deptName",key);
-                    map.put("userNameList",value);
-                    filledOutList.add(map);
-                });
-            }
-            if (filledInMap != null && filledInMap.size() > 0){
-                Set<String> strings = filledInMap.keySet();
-                for (String deptName : strings) {
-                    List<StatisticReportPersonnel> statisticReportPersonnelList = filledInMap.get(deptName);
-                    if (statisticReportPersonnelList != null && statisticReportPersonnelList.size() > 0){
-                        for (StatisticReportPersonnel statisticReportPersonnel : statisticReportPersonnelList) {
-                            Map<String,Object> map = new HashMap<>();
-                            map.put("deptName",deptName);
-                            map.put("userNameList",statisticReportPersonnel.getUserName());
-                            String uploadFile = statisticReportPersonnel.getUploadFile();
-                            //[{"name":"1627634606200.pdf","url":"http://192.168.101.11:9300/statics/2021/07/30/1627634606200.pdf","status":"success","uid":1627634606225}]
-                            List<SysFile> sysFileList = JSON.parseObject(uploadFile, new TypeReference<List<SysFile>>() {}.getType());
-                            List<String> fileName = new ArrayList<>();
-                            List<String> fileUrl = new ArrayList<>();
-                            if (sysFileList != null && sysFileList.size() > 0){
-                                for (SysFile sysFile : sysFileList) {
-                                    fileName.add(sysFile.getName());
-                                    fileUrl.add(sysFile.getUrl());
-                                }
-                            }
-                            map.put("fileNameList",fileName);
-                            map.put("fileUrlList",fileUrl);
-                            filledInList.add(map);
-                        }
-                    }
-                }
-            }
-            reportInfo.setPersonnelList(personnelList);
-            reportInfo.setFilledInList(filledInList);
-            reportInfo.setFilledOutList(filledOutList);
-        }
-        return AjaxResult.success(reportInfo);
-    }
-
-    @Override
-    public Map<String, Object> datas(String name) {
-        Map<String, Object> result = new HashMap<>();
-        Map<String, String> params = CollectUtils.newHashMap();
-        if(StringUtils.isNotEmpty(name)) {
-            params.put("name", name);
-        }
-        params.put("userName", SecurityUtils.getUsername());
-        List<StatisticReportDto> reportDtos = statisticReportMapper.selectReportInfo(params);
-        result.put("reports", reportDtos);
-        return result;
-    }
-
-    @Override
-    public List<StatisticReport> selectList(StatisticReport report) {
-        report.setCreateBy(SecurityUtils.getUsername());
-        return statisticReportMapper.selectList(report);
-    }
-
-    @Override
-    public StatisticReport getDetailById(Long id) {
-        return statisticReportMapper.getDetailById(id);
-    }
-
-    @Override
-    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
-    public AjaxResult saveOrUpdate(StatisticReport report) {
-        try {
-            if (report.getId() != null) { // 修改
-                genReport(report, UPDATE);
-                // 先删除所有字表数据
-                personnelService.deleteByStatisticIds(new Long[]{report.getId()});
-                // 保存报表数据
-                statisticReportMapper.update(report);
-            } else {//新增
-                genReport(report, INSERT);
-                statisticReportMapper.insert(report);
-            }
-
-            // 获取人员
-            genReportPersonal(report);
-            personnelService.insert(report.getPersonnels());
-        } catch (Exception e) {
-            LOGGER.info("新增错误,{}", e.getMessage());
-            return AjaxResult.error();
-        }
-
-        return AjaxResult.success();
-    }
-
-    private void genReport(StatisticReport report, String type) {
-        Date now = new Date();
-        String username = SecurityUtils.getUsername();
-        if (type.equals(INSERT)) {
-            report.setCreateBy(username);
-            report.setCreateTime(now);
-        }
-
-        report.setUpdateBy(username);
-        report.setUpdateTime(now);
-    }
-
-    private void genReportPersonal(StatisticReport report) {
-        Long statisticId = report.getId();
-        String reportName =  report.getReportName();
-        String userName = SecurityUtils.getUsername();
-        Date now = new Date();
-        List<StatisticReportPersonnel> personnels = report.getPersonnels();
-        for (StatisticReportPersonnel personnel : personnels) {
-            personnel.setStatisticId(statisticId);
-            personnel.setReportName(reportName);
-            personnel.setCreateBy(userName);
-            personnel.setCreateTime(now);
-            personnel.setUpdateBy(userName);
-            personnel.setUpdateTime(now);
-        }
-    }
-}
+//package com.boman.report.service.impl;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.alibaba.fastjson.TypeReference;
+//import com.boman.common.core.utils.CollectUtils;
+//import com.boman.common.core.utils.StringUtils;
+//import com.boman.domain.SysFile;
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.domain.dto.StatisticReportDto;
+//import com.boman.domain.entity.StatisticReport;
+//import com.boman.domain.entity.StatisticReportPersonnel;
+//import com.boman.domain.entity.vo.StatisticReportVo;
+//import com.boman.report.mapper.StatisticReportMapper;
+//import com.boman.report.mapper.StatisticReportPersonnelMapper;
+//import com.boman.report.service.StatisticReportService;
+//import com.boman.common.core.utils.SecurityUtils;
+//import com.boman.report.service.StatisticReportPersonnelService;
+//import org.apache.commons.lang3.SerializationUtils;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Isolation;
+//import org.springframework.transaction.annotation.Transactional;
+//import java.util.*;
+//import java.util.stream.Collectors;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月24日 11:10
+// **/
+//@Service
+//public class StatisticReportServiceImpl implements StatisticReportService {
+//
+//    private static final Logger LOGGER = LoggerFactory.getLogger(ImportServiceImpl.class);
+//
+//
+//    public static final String INSERT =  "insert";
+//
+//    public static final String UPDATE =  "update";
+//
+//
+//    @Autowired
+//    private StatisticReportPersonnelService personnelService;
+//
+//    @Autowired
+//    private StatisticReportMapper statisticReportMapper;
+//
+//    @Autowired
+//    private StatisticReportPersonnelMapper statisticReportPersonnelMapper;
+//    /**
+//     * 获取表报详情
+//     * @param id
+//     * @return
+//     */
+//    @Override
+//    public AjaxResult getReportInfo(Long id) {
+//        StatisticReportVo reportInfo = statisticReportMapper.getReportInfo(id);
+//        //获取参与人员信息
+//        List<StatisticReportPersonnel> statisticReportPersonnels = statisticReportPersonnelMapper.selectByStatisticId(id);
+//        if (statisticReportPersonnels != null && statisticReportPersonnels.size() > 0){
+//            Map<String, List<String>> personnelMap = statisticReportPersonnels.stream().collect(Collectors.groupingBy(StatisticReportPersonnel::getDeptName, Collectors.mapping(StatisticReportPersonnel::getUserName, Collectors.toList())));
+//            Map<String, List<String>> filledOutMap = statisticReportPersonnels.stream().filter(e -> "1".equals(e.getStatus())).collect(Collectors.groupingBy(StatisticReportPersonnel::getDeptName, Collectors.mapping(StatisticReportPersonnel::getUserName, Collectors.toList())));
+//            Map<String, List<StatisticReportPersonnel>> filledInMap = statisticReportPersonnels.stream().filter(e -> "2".equals(e.getStatus())).collect(Collectors.groupingBy(StatisticReportPersonnel::getDeptName));
+//            //参与人员
+//            List<Map<String,Object>> personnelList = new ArrayList<>();
+//            //已填报
+//            List<Map<String,Object>> filledInList = new ArrayList<>();
+//            //未填报
+//            List<Map<String,Object>> filledOutList = new ArrayList<>();
+//            if (personnelMap != null && personnelMap.size() > 0){
+//                personnelMap.forEach((key, value) -> {
+//                    Map<String,Object> map = new HashMap<>();
+//                    map.put("deptName",key);
+//                    map.put("userNameList",value);
+//                    personnelList.add(map);
+//                });
+//            }
+//            if (filledOutMap != null && filledOutMap.size() > 0){
+//                filledOutMap.forEach((key, value) -> {
+//                    Map<String,Object> map= new HashMap<>();
+//                    map.put("deptName",key);
+//                    map.put("userNameList",value);
+//                    filledOutList.add(map);
+//                });
+//            }
+//            if (filledInMap != null && filledInMap.size() > 0){
+//                Set<String> strings = filledInMap.keySet();
+//                for (String deptName : strings) {
+//                    List<StatisticReportPersonnel> statisticReportPersonnelList = filledInMap.get(deptName);
+//                    if (statisticReportPersonnelList != null && statisticReportPersonnelList.size() > 0){
+//                        for (StatisticReportPersonnel statisticReportPersonnel : statisticReportPersonnelList) {
+//                            Map<String,Object> map = new HashMap<>();
+//                            map.put("deptName",deptName);
+//                            map.put("userNameList",statisticReportPersonnel.getUserName());
+//                            String uploadFile = statisticReportPersonnel.getUploadFile();
+//                            //[{"name":"1627634606200.pdf","url":"http://192.168.101.11:9300/statics/2021/07/30/1627634606200.pdf","status":"success","uid":1627634606225}]
+//                            List<SysFile> sysFileList = JSON.parseObject(uploadFile, new TypeReference<List<SysFile>>() {}.getType());
+//                            List<String> fileName = new ArrayList<>();
+//                            List<String> fileUrl = new ArrayList<>();
+//                            if (sysFileList != null && sysFileList.size() > 0){
+//                                for (SysFile sysFile : sysFileList) {
+//                                    fileName.add(sysFile.getName());
+//                                    fileUrl.add(sysFile.getUrl());
+//                                }
+//                            }
+//                            map.put("fileNameList",fileName);
+//                            map.put("fileUrlList",fileUrl);
+//                            filledInList.add(map);
+//                        }
+//                    }
+//                }
+//            }
+//            reportInfo.setPersonnelList(personnelList);
+//            reportInfo.setFilledInList(filledInList);
+//            reportInfo.setFilledOutList(filledOutList);
+//        }
+//        return AjaxResult.success(reportInfo);
+//    }
+//
+//    @Override
+//    public Map<String, Object> datas(String name) {
+//        Map<String, Object> result = new HashMap<>();
+//        Map<String, String> params = CollectUtils.newHashMap();
+//        if(StringUtils.isNotEmpty(name)) {
+//            params.put("name", name);
+//        }
+//        params.put("userName", SecurityUtils.getUsername());
+//        List<StatisticReportDto> reportDtos = statisticReportMapper.selectReportInfo(params);
+//        result.put("reports", reportDtos);
+//        return result;
+//    }
+//
+//    @Override
+//    public List<StatisticReport> selectList(StatisticReport report) {
+//        report.setCreateBy(SecurityUtils.getUsername());
+//        return statisticReportMapper.selectList(report);
+//    }
+//
+//    @Override
+//    public StatisticReport getDetailById(Long id) {
+//        return statisticReportMapper.getDetailById(id);
+//    }
+//
+//    @Override
+//    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
+//    public AjaxResult saveOrUpdate(StatisticReport report) {
+//        try {
+//            if (report.getId() != null) { // 修改
+//                genReport(report, UPDATE);
+//                // 先删除所有字表数据
+//                personnelService.deleteByStatisticIds(new Long[]{report.getId()});
+//                // 保存报表数据
+//                statisticReportMapper.update(report);
+//            } else {//新增
+//                genReport(report, INSERT);
+//                statisticReportMapper.insert(report);
+//            }
+//
+//            // 获取人员
+//            genReportPersonal(report);
+//            personnelService.insert(report.getPersonnels());
+//        } catch (Exception e) {
+//            LOGGER.info("新增错误,{}", e.getMessage());
+//            return AjaxResult.error();
+//        }
+//
+//        return AjaxResult.success();
+//    }
+//
+//    private void genReport(StatisticReport report, String type) {
+//        Date now = new Date();
+//        String username = SecurityUtils.getUsername();
+//        if (type.equals(INSERT)) {
+//            report.setCreateBy(username);
+//            report.setCreateTime(now);
+//        }
+//
+//        report.setUpdateBy(username);
+//        report.setUpdateTime(now);
+//    }
+//
+//    private void genReportPersonal(StatisticReport report) {
+//        Long statisticId = report.getId();
+//        String reportName =  report.getReportName();
+//        String userName = SecurityUtils.getUsername();
+//        Date now = new Date();
+//        List<StatisticReportPersonnel> personnels = report.getPersonnels();
+//        for (StatisticReportPersonnel personnel : personnels) {
+//            personnel.setStatisticId(statisticId);
+//            personnel.setReportName(reportName);
+//            personnel.setCreateBy(userName);
+//            personnel.setCreateTime(now);
+//            personnel.setUpdateBy(userName);
+//            personnel.setUpdateTime(now);
+//        }
+//    }
+//}

+ 9 - 8
boman-report/src/main/java/org/jeecg/modules/jmreport/BomanReportApplication.java

@@ -1,22 +1,23 @@
 package org.jeecg.modules.jmreport;
 
-import com.boman.common.security.annotation.EnableCustomConfig;
-import com.boman.common.security.annotation.EnableRyFeignClients;
-import com.boman.common.swagger.annotation.EnableCustomSwagger2;
+//import com.boman.common.security.annotation.EnableCustomConfig;
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
-import org.springframework.cloud.client.SpringCloudApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.scheduling.annotation.EnableAsync;
 
 /**
  * web-core
  *
  * @author shiqian
  */
-@EnableCustomConfig
-@EnableCustomSwagger2
-@EnableRyFeignClients
-@SpringCloudApplication
+@EnableAspectJAutoProxy(exposeProxy = true)
+@MapperScan("com.boman.**.mapper")
+@EnableAsync
 @ComponentScan(value = {"com.boman", "org.jeecg.modules.jmreport"})
+@SpringBootApplication
 public class BomanReportApplication {
 
     public static void main(String[] args) {

+ 29 - 29
boman-report/src/main/java/org/jeecg/modules/jmreport/common/ColumnConvertController.java

@@ -1,29 +1,29 @@
-package org.jeecg.modules.jmreport.common;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * @author shiqian
- * @date 2021年08月17日 14:40
- **/
-@RestController
-@RequestMapping("column/")
-public class ColumnConvertController {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ColumnConvertController.class);
-
-    @Resource
-    private ColumnCovertService columnCovertService;
-
-
-    @GetMapping("/id")
-    public void aa(){
-        columnCovertService.columnCovert("587786946755219456", "boman_message", "发文报表");
-    }
-}
+//package org.jeecg.modules.jmreport.common;
+//
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import javax.annotation.Resource;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月17日 14:40
+// **/
+//@RestController
+//@RequestMapping("column/")
+//public class ColumnConvertController {
+//
+//    private static final Logger LOGGER = LoggerFactory.getLogger(ColumnConvertController.class);
+//
+//    @Resource
+//    private ColumnCovertService columnCovertService;
+//
+//
+//    @GetMapping("/id")
+//    public void aa(){
+//        columnCovertService.columnCovert("587786946755219456", "boman_message", "发文报表");
+//    }
+//}

+ 72 - 72
boman-report/src/main/java/org/jeecg/modules/jmreport/common/ColumnCovertService.java

@@ -1,72 +1,72 @@
-package org.jeecg.modules.jmreport.common;
-
-import com.boman.domain.GenTableColumn;
-import com.boman.domain.dto.AjaxResult;
-import com.boman.gen.api.RemoteGenTableColumnService;
-import org.jeecg.modules.jmreport.desreport.dao.JimuReportDbDao;
-import org.jeecg.modules.jmreport.desreport.dao.JimuReportDbFieldDao;
-import org.jeecg.modules.jmreport.desreport.entity.JmReportDb;
-import org.jeecg.modules.jmreport.desreport.entity.JmReportDbField;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-
-import java.util.List;
-
-import static com.boman.common.core.utils.obj.ObjectUtils.*;
-
-/**
- * @author shiqian
- * @date 2021年08月17日 14:41
- **/
-@Service
-public class ColumnCovertService {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ColumnCovertService.class);
-
-    @Resource
-    private JimuReportDbDao reportDbDao;
-    @Resource
-    private JimuReportDbFieldDao reportDbFieldDao;
-    @Resource
-    private RemoteGenTableColumnService remoteGenTableColumnService;
-
-    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
-    public List<JmReportDbField> columnCovert(String reportId, String tableName, String tableNameChn) {
-        requireNonNull(reportId, "reportId is empty");
-        requireNonNull(tableName, "tableName is empty");
-        requireNonNull(tableNameChn, "tableNameChn is empty");
-        List<JmReportDb> jmReportDbs = reportDbDao.selectList(reportId);
-        requireNonNull(jmReportDbs, "jmReportDbs is empty");
-        JmReportDb jmReportDb = jmReportDbs.get(0);
-        String jmReportDbId = jmReportDb.getId();
-        jmReportDb.setDbChName(tableNameChn);
-
-        reportDbDao.update(jmReportDb);
-
-        List<JmReportDbField> jmReportDbFields = reportDbFieldDao.listByDbId(jmReportDbId);
-        List<GenTableColumn> genTableColumns = remoteGenTableColumnService.listColumnsByTableName(tableName);
-        requireNonNull(genTableColumns, "genTableColumns is empty");
-
-        for (JmReportDbField field : jmReportDbFields) {
-            String fieldName = field.getFieldName();
-            for (GenTableColumn column : genTableColumns) {
-                if (fieldName.equalsIgnoreCase(column.getColumnName())) {
-                    field.setFieldText(column.getColumnComment());
-                    break;
-                }
-            }
-
-            // 更改filedText
-            reportDbFieldDao.update(field);
-        }
-
-        return jmReportDbFields;
-    }
-
-
-}
+//package org.jeecg.modules.jmreport.common;
+//
+//import com.boman.domain.GenTableColumn;
+//import com.boman.domain.dto.AjaxResult;
+//import com.boman.gen.api.RemoteGenTableColumnService;
+//import org.jeecg.modules.jmreport.desreport.dao.JimuReportDbDao;
+//import org.jeecg.modules.jmreport.desreport.dao.JimuReportDbFieldDao;
+//import org.jeecg.modules.jmreport.desreport.entity.JmReportDb;
+//import org.jeecg.modules.jmreport.desreport.entity.JmReportDbField;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Isolation;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import javax.annotation.Resource;
+//
+//import java.util.List;
+//
+//import static com.boman.common.core.utils.obj.ObjectUtils.*;
+//
+///**
+// * @author shiqian
+// * @date 2021年08月17日 14:41
+// **/
+//@Service
+//public class ColumnCovertService {
+//
+//    private static final Logger LOGGER = LoggerFactory.getLogger(ColumnCovertService.class);
+//
+//    @Resource
+//    private JimuReportDbDao reportDbDao;
+//    @Resource
+//    private JimuReportDbFieldDao reportDbFieldDao;
+//    @Resource
+//    private RemoteGenTableColumnService remoteGenTableColumnService;
+//
+//    @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
+//    public List<JmReportDbField> columnCovert(String reportId, String tableName, String tableNameChn) {
+//        requireNonNull(reportId, "reportId is empty");
+//        requireNonNull(tableName, "tableName is empty");
+//        requireNonNull(tableNameChn, "tableNameChn is empty");
+//        List<JmReportDb> jmReportDbs = reportDbDao.selectList(reportId);
+//        requireNonNull(jmReportDbs, "jmReportDbs is empty");
+//        JmReportDb jmReportDb = jmReportDbs.get(0);
+//        String jmReportDbId = jmReportDb.getId();
+//        jmReportDb.setDbChName(tableNameChn);
+//
+//        reportDbDao.update(jmReportDb);
+//
+//        List<JmReportDbField> jmReportDbFields = reportDbFieldDao.listByDbId(jmReportDbId);
+//        List<GenTableColumn> genTableColumns = remoteGenTableColumnService.listColumnsByTableName(tableName);
+//        requireNonNull(genTableColumns, "genTableColumns is empty");
+//
+//        for (JmReportDbField field : jmReportDbFields) {
+//            String fieldName = field.getFieldName();
+//            for (GenTableColumn column : genTableColumns) {
+//                if (fieldName.equalsIgnoreCase(column.getColumnName())) {
+//                    field.setFieldText(column.getColumnComment());
+//                    break;
+//                }
+//            }
+//
+//            // 更改filedText
+//            reportDbFieldDao.update(field);
+//        }
+//
+//        return jmReportDbFields;
+//    }
+//
+//
+//}

+ 1 - 1
boman-report/src/main/java/org/jeecg/modules/jmreport/desreport/a/a.java

@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.jeecg.modules.jmreport.api.data.IDataSetFactory;
-import org.jeecg.modules.jmreport.common.ColumnCovertService;
+//import org.jeecg.modules.jmreport.common.ColumnCovertService;
 //import org.jeecg.modules.jmreport.common.ExportExcelService;
 import org.jeecg.modules.jmreport.common.annotation.JimuLoginRequired;
 import org.jeecg.modules.jmreport.common.expetion.JimuReportException;

+ 3 - 3
boman-report/src/main/java/org/jeecg/modules/jmreport/desreport/a/service/a/JmReportDbService.java

@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
 import javax.servlet.http.HttpServletRequest;
 
 import com.boman.domain.GenTableColumn;
-import com.boman.gen.api.RemoteGenTableColumnService;
+import com.boman.report.service.IGenTableColumnService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.jeecg.modules.jmreport.common.expetion.JimuReportException;
@@ -90,7 +90,7 @@ public class JmReportDbService implements IJmReportDbService {
     @Value("${jeecg.jmreport.apiBasePath:}")
     private String apiBasePath;
     @Autowired
-    private RemoteGenTableColumnService remoteGenTableColumnService;
+    private IGenTableColumnService genTableColumnService;
 
     @Override
     @Transactional
@@ -678,7 +678,7 @@ public class JmReportDbService implements IJmReportDbService {
         }
 
         // 查询我们自己的gen_table_column
-        List<GenTableColumn> columns = remoteGenTableColumnService.listColumnsByTableName(tableName);
+        List<GenTableColumn> columns = genTableColumnService.listColumnsByTableName(tableName);
         if (CollectionUtils.isEmpty(columns)) {
             return var5;
         }

+ 76 - 0
boman-report/src/main/resources/application.yml

@@ -0,0 +1,76 @@
+server:
+  port: 1234
+
+spring:
+  application:
+    name: boman-report
+
+  redis:
+    host: 192.168.101.10
+    port: 6379
+    password: Boman123
+    database: 2
+
+  datasource:
+    url: jdbc:mysql://192.168.101.10/jiaoyuju?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+    username: root
+    password: Boman123
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    max-idle: 10
+    max-wait: 10000
+    min-idle: 5
+    initial-size: 5
+
+#  datasource:
+#    druid:
+#      stat-view-servlet:
+#        enabled: true
+#        loginUsername: admin
+#        loginPassword: 123456
+#    dynamic:
+#      druid:
+#        initial-size: 5
+#        min-idle: 5
+#        maxActive: 20
+#        maxWait: 60000
+#        timeBetweenEvictionRunsMillis: 60000
+#        minEvictableIdleTimeMillis: 300000
+#        validationQuery: SELECT 1 FROM DUAL
+#        testWhileIdle: true
+#        testOnBorrow: false
+#        testOnReturn: false
+#        poolPreparedStatements: true
+#        maxPoolPreparedStatementPerConnectionSize: 20
+#        filters: stat,wall,slf4j
+#        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+#      datasource:
+#        master:
+##          driver-class-name: com.mysql.jdbc.Driver
+#          url: jdbc:mysql://192.168.101.10/jiaoyuju?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+#          username: root
+#          password: Boman123
+
+report:
+  tableNames: boman_message,sys_config,sys_contacts,sys_dept,sys_dict_data,sys_dict_type,sys_info,sys_job,sys_job_log,sys_logininfor,sys_memorandum,sys_menu,sys_notice,sys_oper_log,sys_post,sys_role,sys_role_data,sys_role_dept,sys_schedule,sys_user,sys_user_old,sys_user_post,sys_user_role,boman_group,boman_group_user,instance_business,gen_table,gen_table_column,gen_table_relation,boman_message_receive,boman_news,boman_recieve_dispatch_message,urge_read_message,statistic_report,statistic_report_personnel,table_sql
+
+minidao :
+  base-package: org.jeecg.modules.jmreport.desreport.dao*
+  # 数据库类型:mysql|postgresql|oracle|sqlserver
+  db-type: mysql
+
+jeecg:
+  uploadType: local
+  path: c:\file
+
+mybatis:
+#  typeAliasesPackage: com.boman.web.core
+  mapperLocations: classpath:mapper/**/*.xml
+
+seata:
+  enabled: false
+  application-id: ${spring.application.name}
+  tx-service-group: ${spring.application.name}-group
+  enable-auto-data-source-proxy: false
+  service:
+    vgroup-mapping:
+      boman-system-group: default

+ 0 - 19
boman-report/src/main/resources/bootstrap-prod.yml

@@ -1,19 +0,0 @@
-server:
-  port: 12345
-
-spring:
-  application:
-    name: boman-report
-  profiles:
-    active: prod
-  cloud:
-    nacos:
-      discovery:
-        server-addr: 127.0.0.1:8848
-        namespace: bbba8691-596e-436f-9b72-a28e8db0da40
-      config:
-        server-addr: 127.0.0.1:8848
-        file-extension: yml
-        shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: bbba8691-596e-436f-9b72-a28e8db0da40

+ 0 - 19
boman-report/src/main/resources/bootstrap.yml

@@ -1,19 +0,0 @@
-server:
-  port: 1234
-
-spring: 
-  application:
-    name: boman-report
-  profiles:
-    active: jiaoyu
-  cloud:
-    nacos:
-      discovery:
-        server-addr: 192.168.101.10:8848
-        namespace: d8110874-ad03-4826-80bc-ff00126c1644  #潜山教育局
-      config:
-        server-addr: 192.168.101.10:8848
-        file-extension: yml
-        shared-configs:
-          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: d8110874-ad03-4826-80bc-ff00126c1644  #潜山教育局

+ 57 - 0
boman-report/src/main/resources/mapper/GenTableColumnMapper.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.boman.report.mapper.GenTableColumnMapper">
+    
+    <resultMap type="com.boman.report.domain.GenTableColumn" id="GenTableColumnResult">
+        <result property="id"       column="id"      />
+        <result property="tableId"        column="table_id"       />
+        <result property="columnName"     column="column_name"    />
+        <result property="columnComment"  column="column_comment" />
+        <result property="columnType"     column="column_type"    />
+        <result property="javaType"       column="java_type"      />
+        <result property="javaField"      column="java_field"     />
+        <result property="isPk"           column="is_pk"          />
+        <result property="isIncrement"    column="is_increment"   />
+        <result property="isRequired"     column="is_required"    />
+        <result property="isInsert"       column="is_insert"      />
+        <result property="isEdit"         column="is_edit"        />
+        <result property="isList"         column="is_list"        />
+        <result property="isQuery"        column="is_query"       />
+        <result property="queryType"      column="query_type"     />
+        <result property="htmlType"       column="html_type"      />
+        <result property="foreignKey"     column="foreign_key"      />
+        <result property="dictType"       column="dict_type"      />
+        <result property="sort"           column="sort"           />
+        <result property="createBy"       column="create_by"      />
+        <result property="createTime"     column="create_time"    />
+        <result property="updateBy"       column="update_by"      />
+        <result property="updateTime"     column="update_time"    />
+        <result property="hrParentId"     column="hr_parent_id"    />
+        <result property="mask"     column="mask"    />
+        <result property="defaultValue"     column="default_value"    />
+        <result property="numRows"     column="num_rows"    />
+        <result property="numColumns"     column="num_columns"    />
+        <result property="fieldTranslator"     column="field_translator"    />
+        <result property="extendedAttributes"     column="extended_attributes"    />
+        <result property="isIn"     column="is_in"    />
+        <result property="isOut"     column="is_out"    />
+        <result property="regular"     column="regular"    />
+        <result property="tableColumnName"     column="table_column_name"    />
+        <result property="seqName"     column="seq_name"    />
+    </resultMap>
+	
+	<sql id="selectGenTableColumnVo">
+        select id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, foreign_key, dict_type, sort, create_by, create_time, update_by, update_time, hr_parent_id, mask, default_value, num_rows, num_columns, field_translator, extended_attributes, is_in, is_out, regular, table_column_name, seq_name from gen_table_column
+    </sql>
+
+    <select id="listByTableIdList" parameterType="list" resultMap="GenTableColumnResult">
+        <include refid="selectGenTableColumnVo"/>
+        where table_id in
+        <foreach collection="tableIdList" open="(" close=")" separator="," item="tableId">
+            #{tableId}
+        </foreach>
+        order by sort
+    </select>
+</mapper>

+ 83 - 0
boman-report/src/main/resources/mapper/GenTableMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.boman.report.mapper.GenTableMapper">
+
+	<resultMap type="com.boman.report.domain.GenTable" id="GenTableResult">
+	    <id     property="id"        column="id"          />
+		<result property="tableName"      column="table_name"        />
+		<result property="tableComment"   column="table_comment"     />
+		<result property="subTableName"   column="sub_table_name"    />
+		<result property="subTableFkName" column="sub_table_fk_name" />
+		<result property="className"      column="class_name"        />
+		<result property="tplCategory"    column="tpl_category"      />
+		<result property="packageName"    column="package_name"      />
+		<result property="moduleName"     column="module_name"       />
+		<result property="businessName"   column="business_name"     />
+		<result property="functionName"   column="function_name"     />
+		<result property="functionAuthor" column="function_author"   />
+		<result property="genType"        column="gen_type"          />
+		<result property="genPath"        column="gen_path"          />
+		<result property="options"        column="options"           />
+		<result property="createBy"       column="create_by"         />
+		<result property="createTime"     column="create_time"       />
+		<result property="updateBy"       column="update_by"         />
+		<result property="updateTime"     column="update_time"       />
+		<result property="remark"         column="remark"            />
+		<result property="isMenu"         column="is_menu"            />
+		<result property="menuRole"         column="menu_role"            />
+		<result property="akColumn"         column="ak_column"            />
+		<result property="dkColumn"         column="dk_column"            />
+		<result property="triggerCreate"         column="trigger_create"            />
+		<result property="triggerRetrieve"         column="trigger_retrieve"            />
+		<result property="triggerUpdate"         column="trigger_update"            />
+		<result property="triggerDelete"         column="trigger_delete"            />
+		<result property="triggerSubmit"         column="trigger_submit"            />
+		<result property="realTableName"         column="real_table_name"            />
+		<result property="filterConditions"         column="filter_conditions"            />
+		<result property="extendedAttributes"         column="extended_attributes"            />
+		<result property="tablePrimaryKey"         column="table_primary_key"            />
+		<result property="tableColumn"         column="table_column"            />
+		<collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />
+	</resultMap>
+	
+	<resultMap type="com.boman.report.domain.GenTableColumn" id="GenTableColumnResult">
+        <id     property="id"       column="c_id"      />
+        <result property="tableId"        column="table_id"       />
+        <result property="columnName"     column="column_name"    />
+        <result property="columnComment"  column="column_comment" />
+        <result property="columnType"     column="column_type"    />
+        <result property="javaType"       column="java_type"      />
+        <result property="javaField"      column="java_field"     />
+        <result property="isPk"           column="is_pk"          />
+        <result property="isIncrement"    column="is_increment"   />
+        <result property="isRequired"     column="is_required"    />
+        <result property="isInsert"       column="is_insert"      />
+        <result property="isEdit"         column="is_edit"        />
+        <result property="isList"         column="is_list"        />
+        <result property="isQuery"        column="is_query"       />
+        <result property="queryType"      column="query_type"     />
+        <result property="htmlType"       column="html_type"      />
+        <result property="dictType"       column="dict_type"      />
+        <result property="sort"           column="sort"           />
+        <result property="createBy"       column="create_by"      />
+        <result property="createTime"     column="create_time"    />
+        <result property="updateBy"       column="update_by"      />
+        <result property="updateTime"     column="update_time"    />
+    </resultMap>
+	
+	<sql id="selectGenTableVo">
+        select id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options,
+         create_by, create_time, update_by, update_time, remark, is_menu, menu_role, ak_column, dk_column, trigger_create, trigger_retrieve, trigger_update, trigger_delete, trigger_submit, real_table_name, filter_conditions, extended_attributes, table_primary_key, table_column from gen_table
+    </sql>
+
+	<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
+		SELECT t.id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, t.is_menu, t.menu_role, t.ak_column, t.dk_column, t.trigger_create, t.trigger_retrieve, t.trigger_update, t.trigger_delete, t.trigger_submit, t.real_table_name, t.filter_conditions, t.extended_attributes, t.table_primary_key, t.table_column,
+			   c.id as c_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
+		FROM gen_table t
+				 LEFT JOIN gen_table_column c ON t.id = c.table_id
+		where t.table_name = #{tableName} order by c.sort
+	</select>
+
+</mapper>