Browse Source

报表中心后台项目构建

master
dimengzhe 2 years ago
parent
commit
1d8cbf9928
  1. 64
      anrui-reportcenter/anrui-reportcenter-api/pom.xml
  2. 37
      anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReport.java
  3. 143
      anrui-reportcenter/anrui-reportcenter-biz/pom.xml
  4. 23
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/ReportcenterApplication.java
  5. 35
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/config/Swagger2Config.java
  6. 33
      anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application-devv.yml
  7. 31
      anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application-pro.yml
  8. 32
      anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application-test.yml
  9. 62
      anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application.yml
  10. 13
      anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/banner.txt
  11. 50
      anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/logback-spring.xml
  12. 26
      anrui-reportcenter/pom.xml

64
anrui-reportcenter/anrui-reportcenter-api/pom.xml

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.yxt</groupId>
<artifactId>yxt-parent</artifactId>
<version>0.0.1</version>
<relativePath/>
</parent>
<!-- <parent>
<groupId>com.yxt.anrui</groupId>
<artifactId>anrui-reportcenter</artifactId>
<version>0.0.1</version>
</parent>-->
<modelVersion>4.0.0</modelVersion>
<artifactId>anrui-reportcenter-api</artifactId>
<groupId>com.yxt.anrui</groupId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.yxt</groupId>
<artifactId>yxt-common-core</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<url>http://172.18.0.3:8081/repository/yxt-mvn-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<url>http://172.18.0.3:8081/repository/yxt-mvn-snapshot/</url>
</snapshotRepository>
</distributionManagement>
</project>

37
anrui-reportcenter/anrui-reportcenter-api/src/main/java/com/yxt/anrui/reportcenter/api/dailyreport/DailyReport.java

@ -0,0 +1,37 @@
package com.yxt.anrui.reportcenter.api.dailyreport;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description:
* @author: dimengzhe
* @date: 2023/9/25
**/
@Data
public class DailyReport {
private int id;
@ApiModelProperty("创建时间")
private String createTime;
@ApiModelProperty("事业部sid")
private String busOrgSid;
@ApiModelProperty("事业部名称")
private String busOrgName;
private String brandSid;
@ApiModelProperty("品牌名称")
private String brandName;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("分公司sid")
private String useOrgName;
@ApiModelProperty("车型sid")
private String vehModelSid;
@ApiModelProperty("车型名称")
private String vehModeName;
@ApiModelProperty("配置sid")
private String vehMConfigSid;
@ApiModelProperty("配置名称")
private String vehMConfigName;
}

143
anrui-reportcenter/anrui-reportcenter-biz/pom.xml

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.yxt</groupId>
<artifactId>yxt-parent</artifactId>
<version>0.0.1</version>
<relativePath/>
</parent>
<!-- <parent>
<groupId>com.yxt.anrui</groupId>
<artifactId>anrui-reportcenter</artifactId>
<version>0.0.1</version>
</parent>-->
<modelVersion>4.0.0</modelVersion>
<artifactId>anrui-reportcenter-biz</artifactId>
<groupId>com.yxt.anrui</groupId>
<version>0.0.1</version>
<dependencies>
<dependency>
<artifactId>anrui-reportcenter-api</artifactId>
<groupId>com.yxt.anrui</groupId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yxt</groupId>
<artifactId>yxt-common-base</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!--mysql-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>net.dongliu</groupId>
<artifactId>apk-parser</artifactId>
<version>2.6.10</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.jws</groupId>
<artifactId>javax.jws-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
</dependency>
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>javax.xml.soap-api</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.6</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*Mapper.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

23
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/ReportcenterApplication.java

@ -0,0 +1,23 @@
package com.yxt.anrui.reportcenter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @author dimengzhe
*/
@SpringBootApplication(scanBasePackages = {
"com.yxt.common.base.config",
"com.yxt.anrui.reportcenter"
})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {})
public class ReportcenterApplication {
public static void main(String[] args) {
SpringApplication.run(ReportcenterApplication.class, args);
}
}

35
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/config/Swagger2Config.java

@ -0,0 +1,35 @@
package com.yxt.anrui.reportcenter.config;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* @author dimengzhe
* @date 2020/9/9 16:42
* @description
*/
@Configuration
@EnableSwagger2
@EnableKnife4j
public class Swagger2Config {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo()).select()
.apis(RequestHandlerSelectors.basePackage("com.yxt"))
.paths(PathSelectors.any()).build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("安瑞/报表中心").description("报表中心接口").version("1.0")
.build();
}
}

33
anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application-devv.yml

@ -0,0 +1,33 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/anrui_reportcenter?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
username: root
password: root
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
redis:
database: 3 # Redis数据库索引(默认为0)
host: 127.0.0.1
jedis:
pool:
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
max-idle: 8 #连接池中的最大空闲连接
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
min-idle: 0 # 连接池中的最小空闲连接
password: 123456
port: 6379
timeout: 0 # 连接超时时间(毫秒)
image:
upload:
path: D:\\anrui\\upload\\
url:
prefix: http://192.168.1.108:8111/upload/
login:
path: D:\\images\\pic-click
config:
url:
prefix: http://192.168.1.108:8111/

31
anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application-pro.yml

@ -0,0 +1,31 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://120.46.172.184:3306/anrui_reportcenter?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
username: root
password: '@anrui18033887500'
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
redis:
database: 3 # Redis数据库索引(默认为0)
host: 127.0.0.1
jedis:
pool:
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
max-idle: 8 #连接池中的最大空闲连接
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
min-idle: 0 # 连接池中的最小空闲连接
password: 123456
port: 6379
timeout: 0 # 连接超时时间(毫秒)
image:
upload:
path: D:\anrui\upload\
url:
prefix: http://120.46.172.184/api/upload/
config:
url:
prefix: http://120.46.172.184/api/

32
anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application-test.yml

@ -0,0 +1,32 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.18.0.4:3306/anrui_reportcenter?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
username: root
password: yxt_mysql_138
cloud:
nacos:
discovery:
server-addr: 172.18.0.5:8848
redis:
database: 3 # Redis数据库索引(默认为0)
host: 172.18.0.7
jedis:
pool:
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
max-idle: 8 #连接池中的最大空闲连接
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
min-idle: 0 # 连接池中的最小空闲连接
password:
port: 6379
timeout: 0 # 连接超时时间(毫秒)
image:
upload:
path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/
url:
prefix: http://anrui.yyundong.com/upload/
config:
url:
prefix: http://anrui.yyundong.com

62
anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/application.yml

@ -0,0 +1,62 @@
spring:
application:
name: anrui-reportcenter
profiles:
active: devv
messages:
# 国际化资源文件路径
basename: i18n/messages
servlet:
#上传文件
multipart:
max-file-size: 50MB
max-request-size: 100MB
devtools:
restart:
# 热部署开关
enabled: true
mvc:
async:
request-timeout: 20000
server:
port: 7003
max-http-header-size: 102400
tomcat:
max-http-form-post-size: -1
#mybatis
mybatis-plus:
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapper-locations: classpath*:**Mapper.xml
global-config:
refresh: true
db-config:
#定义生成ID的类型
id-type: Auto
db-type: mysql
configuration:
map-underscore-to-camel-case: false
cache-enabled: true
call-setters-on-nulls: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#hystrix的超时时间
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
thread:
timeoutInMilliseconds: 60000
#ribbon的超时时间
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000

13
anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/banner.txt

@ -0,0 +1,13 @@
,----.. ____
/ / \ ,' , `.
| : : ,---. ,-+-,.' _ | ,---. ,---,
. | ;. / ' ,'\ ,-+-. ; , || ' ,'\ ,-+-. / |
. ; /--` / / | ,--.'|' | || ,---. / / | ,--.'|' |
; | ; . ; ,. :| | ,', | |,/ \ . ; ,. :| | ,"' |
| : | ' | |: :| | / | |--'/ / | ' | |: :| | / | |
. | '___' | .; :| : | | , . ' / | ' | .; :| | | | |
' ; : .'| : || : | |/ ' ; /| | : || | | |/
' | '/ :\ \ / | | |`-' ' | / | \ \ / | | |--'
| : / `----' | ;/ | : | `----' | |/
\ \ .' '---' \ \ / '---'
`---` `----'

50
anrui-reportcenter/anrui-reportcenter-biz/src/main/resources/logback-spring.xml

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="log.base" value="logs/anrui_reportcenter" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 :
|%blue(%thread) 线程 如 :DiscoveryClient-CacheRefreshExecutor-0-->
<!--<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>-->
<pattern>%yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n)
</pattern>
<!--<charset>UTF-8</charset> -->
</encoder>
</appender>
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<appender name="FILEOUT"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.base}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.base}.%d{yyyyMMdd}.%i.log.zip
</fileNamePattern>
<!-- 当文件大小超过10MB时触发滚动 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>1MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<!--<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>-->
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}
-%msg%n</Pattern>
<!--<charset>UTF-8</charset> -->
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILEOUT" />
</root>
</configuration>

26
anrui-reportcenter/pom.xml

@ -0,0 +1,26 @@
<?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>
<artifactId>anrui-reportcenter</artifactId>
<modules>
<module>anrui-reportcenter-api</module>
<module>anrui-reportcenter-biz</module>
</modules>
<groupId>com.yxt.anrui</groupId>
<version>0.0.1</version>
<packaging>pom</packaging>
<description>报表中心</description>
<parent>
<groupId>com.yxt.anrui</groupId>
<artifactId>anrui</artifactId>
<version>0.0.1</version>
</parent>
</project>
Loading…
Cancel
Save