ソースを参照

新增报表模块

caixiaofeng 10 ヶ月 前
コミット
5661f0736e

+ 28 - 0
flow-report/flow-report-api/pom.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.flow</groupId>
+        <artifactId>flow-report</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flow-report-api</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.flow</groupId>
+            <artifactId>flow-report-entity</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 15 - 0
flow-report/flow-report-api/src/main/java/com/flow/service/ReportDatasourceService.java

@@ -0,0 +1,15 @@
+package com.flow.service;
+
+import com.flow.common.mybatis.service.BaseService;
+import com.flow.entity.ReportDatasource;
+
+import java.util.Set;
+
+public interface ReportDatasourceService extends BaseService<ReportDatasource> {
+
+    ReportDatasource create(ReportDatasource reportDatasource);
+
+    ReportDatasource update(ReportDatasource reportDatasource);
+
+    void delete(Set<Long> ids);
+}

+ 28 - 0
flow-report/flow-report-biz/pom.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.flow</groupId>
+        <artifactId>flow-report</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flow-report-biz</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.flow</groupId>
+            <artifactId>flow-report-api</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 7 - 0
flow-report/flow-report-biz/src/main/java/com/flow/dao/ReportDatasourceDao.java

@@ -0,0 +1,7 @@
+package com.flow.dao;
+
+import com.flow.common.mybatis.dao.BaseDao;
+import com.flow.entity.ReportDatasource;
+
+public interface ReportDatasourceDao  extends BaseDao<ReportDatasource> {
+}

+ 33 - 0
flow-report/flow-report-biz/src/main/java/com/flow/service/impl/ReportDatasourceServiceImpl.java

@@ -0,0 +1,33 @@
+package com.flow.service.impl;
+
+import com.flow.common.mybatis.service.impl.BaseServiceImpl;
+import com.flow.dao.ReportDatasourceDao;
+import com.flow.entity.ReportDatasource;
+import com.flow.service.ReportDatasourceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Set;
+
+
+@Service
+public class ReportDatasourceServiceImpl extends BaseServiceImpl<ReportDatasourceDao, ReportDatasource> implements ReportDatasourceService {
+    @Autowired
+    private ReportDatasourceDao reportDatasourceDao;
+
+
+    @Override
+    public ReportDatasource create(ReportDatasource reportDatasource) {
+        return null;
+    }
+
+    @Override
+    public ReportDatasource update(ReportDatasource reportDatasource) {
+        return null;
+    }
+
+    @Override
+    public void delete(Set<Long> ids) {
+
+    }
+}

+ 28 - 0
flow-report/flow-report-controller/pom.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.flow</groupId>
+        <artifactId>flow-report</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flow-report-controller</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.flow</groupId>
+            <artifactId>flow-report-api</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 37 - 0
flow-report/flow-report-controller/src/main/java/com/flow/controller/ReportDatasourceController.java

@@ -0,0 +1,37 @@
+package com.flow.controller;
+
+import com.flow.common.core.model.Result;
+import com.flow.entity.ReportDatasource;
+import com.flow.service.ReportDatasourceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Set;
+
+@RestController
+@RequestMapping("/reportDatasource")
+public class ReportDatasourceController {
+    @Autowired
+    private ReportDatasourceService reportDatasourceService;
+
+    @PreAuthorize("hasAnyAuthority('reportDatasource:add')")
+    @PostMapping
+    public Result<ReportDatasource> create(@RequestBody ReportDatasource reportDatasource) {
+        return Result.success(reportDatasourceService.create(reportDatasource));
+    }
+
+    @PreAuthorize("hasAnyAuthority('reportDatasource:edit')")
+    @PutMapping
+    public Result<ReportDatasource> update(@RequestBody ReportDatasource reportDatasource) {
+        return Result.success(reportDatasourceService.update(reportDatasource));
+    }
+
+    @PreAuthorize("hasAnyAuthority('reportDatasource:del')")
+    @DeleteMapping
+    public Result<?> delete(@RequestBody Set<Long> ids) {
+        reportDatasourceService.delete(ids);
+        return Result.success();
+    }
+
+}

+ 20 - 0
flow-report/flow-report-entity/pom.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.flow</groupId>
+        <artifactId>flow-report</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flow-report-entity</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+</project>

+ 19 - 0
flow-report/flow-report-entity/src/main/java/com/flow/entity/ReportDatasource.java

@@ -0,0 +1,19 @@
+package com.flow.entity;
+import com.baomidou.mybatisplus.annotation.SqlCondition;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.flow.common.mybatis.entity.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("report_datasource")
+public class ReportDatasource extends BaseEntity {
+    @TableField(condition = SqlCondition.LIKE)
+    private String name;
+    private Integer type;
+    protected String url;
+    protected String username;
+    protected String password;
+}

+ 43 - 0
flow-report/pom.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>pom</packaging>
+    <modules>
+        <module>flow-report-entity</module>
+        <module>flow-report-api</module>
+        <module>flow-report-biz</module>
+        <module>flow-report-controller</module>
+    </modules>
+
+    <parent>
+        <groupId>com.flow</groupId>
+        <artifactId>lowflow</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>flow-report</artifactId>
+    <name>report 报表模块</name>
+    <description>报表数据打印</description>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.flow</groupId>
+            <artifactId>flow-common-core</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.flow</groupId>
+            <artifactId>flow-common-mybatis-starter</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 1 - 0
pom.xml

@@ -19,6 +19,7 @@
         <module>flow-system</module>
         <module>flow-file</module>
         <module>flow-im</module>
+        <module>flow-report</module>
     </modules>
 
     <groupId>com.flow</groupId>