新增技术监督模块

This commit is contained in:
2022-11-10 18:30:54 +08:00
parent 0d959fe747
commit 94254f614f
9 changed files with 334 additions and 1 deletions

View File

@@ -22,6 +22,7 @@
<module>pqs-quality</module>
<module>pqs-advance</module>
<module>pqs-prepare</module>
<module>pqs-process</module>
</modules>
<packaging>pom</packaging>
<name>灿能微服务生态系统</name>

View File

@@ -62,7 +62,9 @@ public class Knife4jSwaggerConfig {
"com.njcn.harmonic.controller",
"com.njcn.event.controller",
"com.njcn.energy.controller",
"com.njcn.quality.controller")
"com.njcn.quality.controller",
"com.njcn.process.controller"
)
.collect(Collectors.toList());
List<GrantType> grantTypes = new ArrayList<>();
String passwordTokenUrl = "http://" + gatewayUrl + "/pqs-auth/oauth/token";

View File

@@ -110,6 +110,14 @@ spring:
- SwaggerHeaderFilter
- StripPrefix=1
- id: process-boot
uri: lb://process-boot
predicates:
- Path=/process-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
@@ -139,6 +147,7 @@ whitelist:
- /event-boot/**
- /quality-boot/**
- /harmonic-prepare/**
- /process-boot/**
mqtt:

20
pqs-process/pom.xml Normal file
View File

@@ -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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pqs</artifactId>
<groupId>com.njcn</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pqs-process</artifactId>
<name>技术监督管理</name>
<modules>
<module>process-api</module>
<module>process-boot</module>
</modules>
<packaging>pom</packaging>
</project>

View File

@@ -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>
<artifactId>pqs-process</artifactId>
<groupId>com.njcn</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>技术监督管理</name>
<artifactId>process-api</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-db</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-microservice</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-poi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>pms-device-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>pq-device-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.jeffreyning</groupId>
<artifactId>mybatisplus-plus</artifactId>
<version>1.5.1-RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pqs-process</artifactId>
<groupId>com.njcn</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>技术监督管理模块</name>
<artifactId>process-boot</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>prepare-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-web</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-swagger</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-influxDB</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>pq-device-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>user-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>event-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-minio</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>processboot</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>build-image</id>
<phase>${docker.operate}</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<!--<serverId>36dockerHarbor</serverId>-->
<registryUrl>http://${docker.repostory}</registryUrl>
<!-- 镜像名称 -->
<imageName>${docker.repostory}/${docker.registry.name}/${project.artifactId}</imageName>
<imageTags>
<imageTag>latest</imageTag>
</imageTags>
<dockerHost>${docker.url}</dockerHost>
<dockerDirectory>${basedir}/</dockerDirectory>
<resources>
<resource>
<targetPath>/ROOT</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,25 @@
package com.njcn.process;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* pqs
*
* @author cdf
* @date 2022/11/10
*/
@Slf4j
@MapperScan("com.njcn.**.mapper")
@EnableFeignClients(basePackages = "com.njcn")
@SpringBootApplication(scanBasePackages = "com.njcn")
public class ProcessApplication {
public static void main(String[] args) {
SpringApplication.run(ProcessApplication.class, args);
}
}

View File

@@ -0,0 +1,60 @@
#当前服务的基本信息
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10222
#feign接口开启服务熔断降级处理
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos注册中心以及配置中心的指定
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-Id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
#项目日志的配置
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis配置信息
mybatis-plus:
type-aliases-package: com.njcn.process.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -0,0 +1,22 @@
package com.njcn.process;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* pqs
*
* @author cdf
* @date 2022/11/10
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class ProcessApplicationTest {
@Test
public void test1(){
}
}