Compare commits
17 Commits
Author | SHA1 | Date |
---|---|---|
thesai | f14e377565 | |
thesai | b302bb360b | |
thesai | 1e2ed4d305 | |
thesai | 436a07bcf4 | |
thesai | 235f4dce5b | |
thesai | ac87b0dbe9 | |
thesai | 3536ff75ad | |
thesai | f57952b755 | |
thesai | 9c9e7c60e3 | |
thesai | 98abf0691a | |
thesai | 16e8dc191f | |
tiger_zhou | 4f151fae4a | |
tiger_zhou | e93171e958 | |
thesai | 4cd80bbec5 | |
thesai | 8125e32d7e | |
thesai | e23864fa72 | |
thesai | 212773e679 |
471
pom.xml
471
pom.xml
|
@ -1,231 +1,252 @@
|
|||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.3.5.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>club.joylink</groupId>
|
||||
<artifactId>rtss</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>rtss</name>
|
||||
<description>Rail transit simulation system</description>
|
||||
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<pagehelper.version>4.1.1</pagehelper.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- javax.validation -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--spring切面aop依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.digitalpetri.modbus</groupId>
|
||||
<artifactId>modbus-codec</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 硬件检测依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core-java11</artifactId>
|
||||
<version>5.7.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||
<artifactId>wechatpay-apache-httpclient</artifactId>
|
||||
<version>0.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.huawei.sis</groupId>-->
|
||||
<!-- <artifactId>huaweicloud-java-sdk-sis</artifactId>-->
|
||||
<!-- <version>1.3.2</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/libs/huaweicloud-java-sdk-sis-1.3.2.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>31.1-jre</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.4.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.retry</groupId>
|
||||
<artifactId>spring-retry</artifactId>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.10.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
<!-- iscs -->
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hubspot.jackson</groupId>
|
||||
<artifactId>jackson-datatype-protobuf</artifactId>
|
||||
<version>0.9.12</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>com.chenlb.mmseg4j</groupId>
|
||||
<artifactId>mmseg4j-core</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>-->
|
||||
<!-- <dependency>
|
||||
<groupId>org.ansj</groupId>
|
||||
<artifactId>ansj_seg</artifactId>
|
||||
<version>5.1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.9.11</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>info.debatty</groupId>
|
||||
<artifactId>java-string-similarity</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.3.5.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>club.joylink</groupId>
|
||||
<artifactId>rtss</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>rtss</name>
|
||||
<description>Rail transit simulation system</description>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.github.shalousun</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<version>2.1.9</version>
|
||||
<configuration>
|
||||
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
||||
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <exclude>com.alibaba:fastjson</exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- <!–自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意–>-->
|
||||
<!-- <!–smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件–>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <include>com.alibaba:fastjson</include>-->
|
||||
<!-- </includes>-->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
||||
<!-- <phase>compile</phase>-->
|
||||
<goals>
|
||||
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
||||
<goal>html</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<pagehelper.version>4.1.1</pagehelper.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- javax.validation -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--spring切面aop依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.digitalpetri.modbus</groupId>
|
||||
<artifactId>modbus-codec</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 硬件检测依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core-java11</artifactId>
|
||||
<version>5.7.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||
<artifactId>wechatpay-apache-httpclient</artifactId>
|
||||
<version>0.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.huawei.sis</groupId>-->
|
||||
<!-- <artifactId>huaweicloud-java-sdk-sis</artifactId>-->
|
||||
<!-- <version>1.3.2</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/libs/huaweicloud-java-sdk-sis-1.3.2.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>31.1-jre</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.4.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.retry</groupId>
|
||||
<artifactId>spring-retry</artifactId>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.10.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
<!-- iscs -->
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.23.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hubspot.jackson</groupId>
|
||||
<artifactId>jackson-datatype-protobuf</artifactId>
|
||||
<version>0.9.12</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>com.chenlb.mmseg4j</groupId>
|
||||
<artifactId>mmseg4j-core</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>-->
|
||||
<!-- <dependency>
|
||||
<groupId>org.ansj</groupId>
|
||||
<artifactId>ansj_seg</artifactId>
|
||||
<version>5.1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.9.11</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>info.debatty</groupId>
|
||||
<artifactId>java-string-similarity</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.github.shalousun</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<version>2.1.9</version>
|
||||
<configuration>
|
||||
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
||||
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <exclude>com.alibaba:fastjson</exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- <!–自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意–>-->
|
||||
<!-- <!–smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件–>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <include>com.alibaba:fastjson</include>-->
|
||||
<!-- </includes>-->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
||||
<!-- <phase>compile</phase>-->
|
||||
<goals>
|
||||
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
||||
<goal>html</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyun-central</id>
|
||||
<url>https://maven.aliyun.com/repository/central</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>aliyun-snapshots</id>
|
||||
<url>https://maven.aliyun.com/repository/snapshots</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>aliyun-central</id>
|
||||
<url>https://maven.aliyun.com/repository/central</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
|
|
|
@ -27,6 +27,6 @@ public class CgyStatsBO {
|
|||
private AtomicLong visitor;
|
||||
//实训人数
|
||||
private final Set<Long> userSet = new HashSet<>();
|
||||
//实训时长
|
||||
//实训时长/s
|
||||
private AtomicLong duration;
|
||||
}
|
||||
|
|
|
@ -124,8 +124,7 @@ public class TrainingV2PublishController {
|
|||
*/
|
||||
@PostMapping("/infos")
|
||||
public List<PublishedTraining2InfoRspVo> findTrainingListInfos(
|
||||
@RequestBody PublishedTrainingListRspVo vo
|
||||
,
|
||||
@RequestBody PublishedTrainingListRspVo vo,
|
||||
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) {
|
||||
//只查询以上架
|
||||
vo.setState(BusinessConsts.STATUS_USE_INT);
|
||||
|
|
|
@ -4,15 +4,25 @@ import club.joylink.rtss.services.ISysUserService;
|
|||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.UserQueryVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.user.*;
|
||||
import club.joylink.rtss.vo.client.user.MobileInfoVO;
|
||||
import club.joylink.rtss.vo.client.user.RetrievePwdVO;
|
||||
import club.joylink.rtss.vo.client.user.UpdateEmailVO;
|
||||
import club.joylink.rtss.vo.client.user.UpdateMobileVO;
|
||||
import club.joylink.rtss.vo.client.user.UpdatePasswordVO;
|
||||
import club.joylink.rtss.vo.user.AccountCreateVO;
|
||||
import club.joylink.rtss.vo.user.AccountRegisterVO;
|
||||
import club.joylink.rtss.vo.user.UserRegisterCheck;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 系统账户接口
|
||||
|
@ -21,165 +31,186 @@ import java.util.List;
|
|||
@RequestMapping("/api/userinfo")
|
||||
public class SysAccountController {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
|
||||
@PostMapping("/register")
|
||||
public void register(@RequestBody @Validated(value = UserRegisterCheck.class) AccountCreateVO accountCreateVO) {
|
||||
this.iSysUserService.register(accountCreateVO);
|
||||
}
|
||||
@PostMapping("/register")
|
||||
public void register(
|
||||
@RequestBody @Validated(value = UserRegisterCheck.class) AccountCreateVO accountCreateVO) {
|
||||
this.iSysUserService.register(accountCreateVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新注册接口
|
||||
*/
|
||||
@PostMapping("/register2")
|
||||
public void register2(@RequestBody @Validated AccountRegisterVO registerVO) {
|
||||
this.iSysUserService.register2(registerVO);
|
||||
}
|
||||
/**
|
||||
* 新注册接口
|
||||
*/
|
||||
@PostMapping("/register2")
|
||||
public void register2(@RequestBody @Validated AccountRegisterVO registerVO) {
|
||||
this.iSysUserService.register2(registerVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*根据姓名或电话号查询用户
|
||||
*/
|
||||
@GetMapping(path="/nameOrMobile")
|
||||
public List<AccountVO> queryUserByNameOrMobile(String query) {
|
||||
List<AccountVO> list = this.iSysUserService.queryUserByNameOrMobile(query);
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 根据姓名或电话号查询用户
|
||||
*/
|
||||
@GetMapping(path = "/nameOrMobile")
|
||||
public List<AccountVO> queryUserByNameOrMobile(String query) {
|
||||
List<AccountVO> list = this.iSysUserService.queryUserByNameOrMobile(query);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号是否已经注册
|
||||
*/
|
||||
@GetMapping("/isExist/mobile")
|
||||
public boolean isMobileExist(String mobile) {
|
||||
return iSysUserService.isSameMobileExist(mobile);
|
||||
}
|
||||
/**
|
||||
* 手机号是否已经注册
|
||||
*/
|
||||
@GetMapping("/isExist/mobile")
|
||||
public boolean isMobileExist(String mobile) {
|
||||
return iSysUserService.isSameMobileExist(mobile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 邮箱是否已经注册
|
||||
*/
|
||||
@GetMapping("/isExist/email")
|
||||
public boolean isEmailExist(String email) {
|
||||
return iSysUserService.isSameEmailExist(email);
|
||||
}
|
||||
/**
|
||||
* 邮箱是否已经注册
|
||||
*/
|
||||
@GetMapping("/isExist/email")
|
||||
public boolean isEmailExist(String email) {
|
||||
return iSysUserService.isSameEmailExist(email);
|
||||
}
|
||||
|
||||
/**
|
||||
*根据用户id获取用户信息
|
||||
*/
|
||||
@GetMapping(path = "/{id}")
|
||||
public AccountVO getUserBaseInfoById(@PathVariable Long id) {
|
||||
return this.iSysUserService.getUserBaseInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 根据用户id获取用户信息
|
||||
*/
|
||||
@GetMapping(path = "/{id}")
|
||||
public AccountVO getUserBaseInfoById(@PathVariable Long id) {
|
||||
return this.iSysUserService.getUserBaseInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*修改用户信息
|
||||
*/
|
||||
@PutMapping(path = "/{id}")
|
||||
public void modify(@PathVariable Long id, @RequestBody AccountVO userInfo, String vdcode) {
|
||||
this.iSysUserService.modify(id, userInfo, vdcode);
|
||||
}
|
||||
/**
|
||||
* 修改用户信息
|
||||
*/
|
||||
@PutMapping(path = "/{id}")
|
||||
public void modify(@PathVariable Long id, @RequestBody AccountVO userInfo, String vdcode) {
|
||||
this.iSysUserService.modify(id, userInfo, vdcode);
|
||||
}
|
||||
|
||||
/**
|
||||
*微信关注事件
|
||||
*/
|
||||
@GetMapping(path = "/wxsubscribe")
|
||||
public void wxSubscribe(@RequestParam String wxId) {
|
||||
iSysUserService.wxSubscribeEventHandle(wxId);
|
||||
}
|
||||
/**
|
||||
* 微信关注事件
|
||||
*/
|
||||
@GetMapping(path = "/wxsubscribe")
|
||||
public void wxSubscribe(@RequestParam String wxId) {
|
||||
iSysUserService.wxSubscribeEventHandle(wxId);
|
||||
}
|
||||
|
||||
/**
|
||||
*批量修改用户的openId为unionId
|
||||
*/
|
||||
@PutMapping(path = "/batchchange/unionid")
|
||||
public void batchChangeOpenId2UnionId() {
|
||||
this.iSysUserService.batchChangeOpenId2UnionId();
|
||||
}
|
||||
/**
|
||||
* 批量修改用户的openId为unionId
|
||||
*/
|
||||
@PutMapping(path = "/batchchange/unionid")
|
||||
public void batchChangeOpenId2UnionId() {
|
||||
this.iSysUserService.batchChangeOpenId2UnionId();
|
||||
}
|
||||
|
||||
/**
|
||||
*更新用户真实姓名
|
||||
*/
|
||||
@PutMapping(path = "/{id}/name")
|
||||
public void updateName(@PathVariable Long id, String name) {
|
||||
this.iSysUserService.updateUserName(id, name);
|
||||
}
|
||||
/**
|
||||
* 更新用户真实姓名
|
||||
*/
|
||||
@PutMapping(path = "/{id}/name")
|
||||
public void updateName(@PathVariable Long id, String name) {
|
||||
this.iSysUserService.updateUserName(id, name);
|
||||
}
|
||||
|
||||
/**
|
||||
*更新用户昵称
|
||||
*/
|
||||
@PutMapping(path = "/{id}/nickname")
|
||||
public void updateNickname(@PathVariable Long id, String nickname) {
|
||||
this.iSysUserService.updateNickname(id, nickname);
|
||||
}
|
||||
/**
|
||||
* 更新用户昵称
|
||||
*/
|
||||
@PutMapping(path = "/{id}/nickname")
|
||||
public void updateNickname(@PathVariable Long id, String nickname) {
|
||||
this.iSysUserService.updateNickname(id, nickname);
|
||||
}
|
||||
|
||||
/**
|
||||
*用户上传头像
|
||||
*/
|
||||
@PostMapping(path = "/{id}/avatar")
|
||||
public void uploadAvatar(@PathVariable Long id, @RequestBody AccountVO accountVO) {
|
||||
this.iSysUserService.updateAvatar(id, accountVO.getAvatarPath());
|
||||
}
|
||||
/**
|
||||
* 用户上传头像
|
||||
*/
|
||||
@PostMapping(path = "/{id}/avatar")
|
||||
public void uploadAvatar(@PathVariable Long id, @RequestBody AccountVO accountVO) {
|
||||
this.iSysUserService.updateAvatar(id, accountVO.getAvatarPath());
|
||||
}
|
||||
|
||||
/**
|
||||
*发送手机验证码
|
||||
*/
|
||||
@PostMapping(path = "/mobile/code")
|
||||
public String sendMobileValidCode(@RequestBody MobileInfoVO mobileInfoVO) {
|
||||
return this.iSysUserService.sendMobileValidCode(mobileInfoVO);
|
||||
}
|
||||
/**
|
||||
* 发送手机验证码
|
||||
*/
|
||||
@PostMapping(path = "/mobile/code")
|
||||
public String sendMobileValidCode(@RequestBody MobileInfoVO mobileInfoVO) {
|
||||
return this.iSysUserService.sendMobileValidCode(mobileInfoVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*发送邮箱验证码
|
||||
*/
|
||||
@PostMapping(path = "/email/code")
|
||||
public String sendEmailValidCode(String email) {
|
||||
return this.iSysUserService.sendEmailValidCode(email);
|
||||
}
|
||||
/**
|
||||
* 发送邮箱验证码
|
||||
*/
|
||||
@PostMapping(path = "/email/code")
|
||||
public String sendEmailValidCode(String email) {
|
||||
return this.iSysUserService.sendEmailValidCode(email);
|
||||
}
|
||||
|
||||
/**
|
||||
*更新用户手机号
|
||||
*/
|
||||
@PutMapping(path = "/{id}/mobile")
|
||||
public void updateMobile(@PathVariable Long id, @RequestBody @Validated UpdateMobileVO updateMobileVO) {
|
||||
this.iSysUserService.updateMobile(id, updateMobileVO);
|
||||
}
|
||||
/**
|
||||
* 更新用户手机号
|
||||
*/
|
||||
@PutMapping(path = "/{id}/mobile")
|
||||
public void updateMobile(@PathVariable Long id,
|
||||
@RequestBody @Validated UpdateMobileVO updateMobileVO) {
|
||||
this.iSysUserService.updateMobile(id, updateMobileVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*更新用户邮箱
|
||||
*/
|
||||
@PutMapping(path = "/{id}/email")
|
||||
public void updateEmail(@PathVariable Long id, @RequestBody @Validated UpdateEmailVO updateEmailVO) {
|
||||
this.iSysUserService.updateEmail(id, updateEmailVO);
|
||||
}
|
||||
/**
|
||||
* 更新用户邮箱
|
||||
*/
|
||||
@PutMapping(path = "/{id}/email")
|
||||
public void updateEmail(@PathVariable Long id,
|
||||
@RequestBody @Validated UpdateEmailVO updateEmailVO) {
|
||||
this.iSysUserService.updateEmail(id, updateEmailVO);
|
||||
}
|
||||
|
||||
/**
|
||||
*更新用户登陆密码
|
||||
*/
|
||||
@PutMapping(path = "/{id}/password")
|
||||
public void updatePassword(@PathVariable Long id, @RequestBody @Validated UpdatePasswordVO updatePasswordVO) {
|
||||
this.iSysUserService.updatePassword(id, updatePasswordVO);
|
||||
}
|
||||
/**
|
||||
* 更新用户登陆密码
|
||||
*/
|
||||
@PutMapping(path = "/{id}/password")
|
||||
public void updatePassword(@PathVariable Long id,
|
||||
@RequestBody @Validated UpdatePasswordVO updatePasswordVO) {
|
||||
this.iSysUserService.updatePassword(id, updatePasswordVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按条件分页查询指定来源的账号
|
||||
*/
|
||||
@GetMapping("/page/criteria/{source}")
|
||||
public PageVO<AccountVO> queryPagedAccountOfTheSource(UserQueryVO queryVO, @PathVariable String source) {
|
||||
queryVO.setSource(source);
|
||||
return this.iSysUserService.queryPagedUser(queryVO);
|
||||
}
|
||||
/**
|
||||
* 按条件分页查询指定来源的账号
|
||||
*/
|
||||
@GetMapping("/page/criteria/{source}")
|
||||
public PageVO<AccountVO> queryPagedAccountOfTheSource(UserQueryVO queryVO,
|
||||
@PathVariable String source) {
|
||||
queryVO.setSource(source);
|
||||
return this.iSysUserService.queryPagedUser(queryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 超管重置用户密码
|
||||
*/
|
||||
@PutMapping("/{id}/reset/pwd")
|
||||
public void resetPwd(@PathVariable long id) {
|
||||
iSysUserService.resetPwd(id);
|
||||
}
|
||||
/**
|
||||
* 超管重置用户密码
|
||||
*/
|
||||
@PutMapping("/{id}/reset/pwd")
|
||||
public void resetPwd(@PathVariable long id) {
|
||||
iSysUserService.resetPwd(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 找回密码
|
||||
*/
|
||||
@PutMapping("/retrieve/pwd")
|
||||
public void retrievePwd(@RequestBody @Validated RetrievePwdVO vo) {
|
||||
iSysUserService.retrievePwd(vo);
|
||||
}
|
||||
/**
|
||||
* 找回密码
|
||||
*/
|
||||
@PutMapping("/retrieve/pwd")
|
||||
public void retrievePwd(@RequestBody @Validated RetrievePwdVO vo) {
|
||||
iSysUserService.retrievePwd(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id列表获取用户信息
|
||||
*/
|
||||
@PostMapping("/list/ids")
|
||||
public List<AccountVO> listByIds(@RequestBody List<Long> ids) {
|
||||
return iSysUserService.listByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有用户
|
||||
*/
|
||||
@GetMapping("/list/all")
|
||||
public List<AccountVO> listAll() {
|
||||
return iSysUserService.listAll();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -363,4 +363,8 @@ public interface ISysUserService {
|
|||
boolean isSameMobileExist(String mobile);
|
||||
|
||||
boolean isSameEmailExist(String email);
|
||||
|
||||
List<AccountVO> listByIds(List<Long> ids);
|
||||
|
||||
List<AccountVO> listAll();
|
||||
}
|
||||
|
|
|
@ -1112,6 +1112,20 @@ public class SysUserService implements ISysUserService {
|
|||
return sysAccountDAO.countByExample(example) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountVO> listByIds(List<Long> ids) {
|
||||
SysAccountExample example = new SysAccountExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
List<SysAccount> sysAccounts = sysAccountDAO.selectByExample(example);
|
||||
return AccountVO.convertFromDB(sysAccounts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountVO> listAll() {
|
||||
List<SysAccount> sysAccounts = sysAccountDAO.selectByExample(null);
|
||||
return AccountVO.convertFromDB(sysAccounts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询包含组织信息的用户信息
|
||||
*/
|
||||
|
|
|
@ -98,7 +98,7 @@ public class CgyStatsService {
|
|||
+ "app_secret=" + statsBO.getAppSecret();
|
||||
body.put("sign", EncryptUtil.md5(sb).toLowerCase());
|
||||
//扩展字段
|
||||
body.put("duration", statsBO.getDuration().get());
|
||||
body.put("duration", statsBO.getDuration().get() / 60); //分钟
|
||||
SimulationInfoQueryVO queryVO = new SimulationInfoQueryVO();
|
||||
queryVO.setFunctionId(statsBO.getFunctionId());
|
||||
List<SimulationInfoVO> sims = simulationService.listAllSimulation(queryVO);
|
||||
|
@ -108,7 +108,7 @@ public class CgyStatsService {
|
|||
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
|
||||
HttpEntity<Map<String, Object>> httpEntity = new HttpEntity<>(body, httpHeaders);
|
||||
Map<String, String> resBody = restTemplate.postForObject(
|
||||
"https://common-dev.educloudxr.com/api/applicationCenter/openapi/summary", httpEntity,
|
||||
"http://gdjtapp.cdivtc.edu.cn/api/applicationCenter/openapi/summary", httpEntity,
|
||||
Map.class);
|
||||
if (resBody != null && Objects.equals(resBody.get("code"), "100001")) {
|
||||
log.error(String.format("成工院虚仿平台同步数据失败:[%s][%s]", resBody.get("msg"),
|
||||
|
@ -122,10 +122,12 @@ public class CgyStatsService {
|
|||
public void syncUserSimulationUsing(UserSimulationRecordEvent event) {
|
||||
UserSimulationRecord record = event.getRecord();
|
||||
CgyStatsBO cgyStatsBO = functionStatsMap.get(record.getFunctionId());
|
||||
cgyStatsBO.getVisitor().incrementAndGet();
|
||||
cgyStatsBO.getUserSet().add(record.getUserId());
|
||||
cgyStatsBO.getDuration().addAndGet(record.getDuration());
|
||||
cgyStatsBO.getChange().set(true);
|
||||
if (Objects.nonNull(cgyStatsBO)) {
|
||||
cgyStatsBO.getVisitor().incrementAndGet();
|
||||
cgyStatsBO.getUserSet().add(record.getUserId());
|
||||
cgyStatsBO.getDuration().addAndGet(record.getDuration());
|
||||
cgyStatsBO.getChange().set(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -380,9 +380,7 @@ public class Training2PublishService {
|
|||
if (reqVO.getType() != null) {
|
||||
or.andTypeEqualTo(reqVO.getType().value());
|
||||
}
|
||||
// if(reqVO.getOrgId() !=null){
|
||||
// or.andOrgIdNotEqualTo(reqVO.getOrgId());
|
||||
// }
|
||||
example.setOrderByClause("id desc");
|
||||
List<PublishedTraining2> list = this.publishedDao.selectByExample(example);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return List.of();
|
||||
|
|
|
@ -16,8 +16,6 @@ import club.joylink.rtss.simulation.cbtc.GroupSimulationService;
|
|||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.SimulationLifeCycleService;
|
||||
import club.joylink.rtss.simulation.cbtc.SimulationService;
|
||||
import club.joylink.rtss.simulation.cbtc.conversation.ConversationGroup;
|
||||
import club.joylink.rtss.simulation.cbtc.conversation.ConversationMember;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
||||
import club.joylink.rtss.simulation.cbtc.data.vo.ConversationMessageVO;
|
||||
import club.joylink.rtss.simulation.cbtc.data.vo.Training2MessageVO;
|
||||
|
@ -317,9 +315,12 @@ public class Training2Service {
|
|||
Map<Long, Float> scoreMap = new HashMap<>();
|
||||
if (!CollectionUtils.isEmpty(training2.getScoringRules())) {
|
||||
training2.getScoringRules().stream()
|
||||
.filter(score -> Objects.equals(score.getMember().getId(), member.getId()))
|
||||
.findFirst().ifPresent(scoringRule2 -> scoringRule2.getDetails()
|
||||
.forEach(d -> scoreMap.put(d.getStep().getId(), d.getScore())));
|
||||
.flatMap(sr -> sr.getDetails().stream())
|
||||
.forEach(d -> scoreMap.put(d.getStep().getId(), d.getScore()));
|
||||
// training2.getScoringRules().stream()
|
||||
//// .filter(score -> Objects.equals(score.getMember().getId(), member.getId()))
|
||||
// .findFirst().ifPresent(scoringRule2 -> scoringRule2.getDetails()
|
||||
// .forEach(d -> scoreMap.put(d.getStep().getId(), d.getScore())));
|
||||
}
|
||||
// 前端传回的步骤信息
|
||||
Map<Long, PaperTrainAnswerDetail> answerDetailMap = new HashMap<>();
|
||||
|
@ -327,20 +328,23 @@ public class Training2Service {
|
|||
scoreDetailList.forEach(d -> answerDetailMap.put(d.getStepId(), d));
|
||||
}
|
||||
return training2.getSteps().stream()
|
||||
.filter(s -> Objects.equals(s.getSimulationMember().getId(), member.getId()))
|
||||
// .filter(s -> Objects.equals(s.getSimulationMember().getId(), member.getId()))
|
||||
.map(step -> {
|
||||
PaperTrainAnswerDetail detail = new PaperTrainAnswerDetail();
|
||||
detail.setStepId(step.getId());
|
||||
detail.setHaveRule(scoreMap.containsKey(step.getId()));
|
||||
if (answerDetailMap.containsKey(step.getId())) {
|
||||
detail.setSuccess(answerDetailMap.get(step.getId()).isSuccess());
|
||||
detail.setRuleScore(scoreMap.get(step.getId()));
|
||||
if (!Objects.equals(step.getSimulationMember().getId(), member.getId())) {
|
||||
detail.setSuccess(true);
|
||||
detail.setScore(detail.getRuleScore());
|
||||
} else {
|
||||
if (answerDetailMap.containsKey(step.getId())) {
|
||||
detail.setSuccess(answerDetailMap.get(step.getId()).isSuccess());
|
||||
detail.setClientOperations(answerDetailMap.get(step.getId()).getClientOperations());
|
||||
detail.setNotExistAppend(true);
|
||||
}
|
||||
detail.setScore(
|
||||
detail.isHaveRule() && detail.isSuccess() ? scoreMap.get(step.getId()) : 0F);
|
||||
detail.setClientOperations(answerDetailMap.get(step.getId()).getClientOperations());
|
||||
detail.setNotExistAppend(true);
|
||||
}
|
||||
if (detail.isHaveRule()) {
|
||||
detail.setRuleScore(scoreMap.get(step.getId()));
|
||||
}
|
||||
return detail;
|
||||
}).collect(Collectors.toList());
|
||||
|
|
|
@ -21,6 +21,7 @@ import club.joylink.rtss.vo.client.WebSocketMessageType;
|
|||
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
|
||||
import club.joylink.rtss.websocket.StompMessageService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -33,14 +34,14 @@ import java.util.stream.Collectors;
|
|||
@Component
|
||||
public class ATSMessageCollectAndDispatcher {
|
||||
|
||||
@Autowired
|
||||
private Joylink3DMessageService joylink3DMessageService;
|
||||
@Autowired
|
||||
private Joylink3DMessageService joylink3DMessageService;
|
||||
|
||||
@Autowired
|
||||
private StompMessageService stompMessageService;
|
||||
@Autowired
|
||||
private StompMessageService stompMessageService;
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
// public void run(Simulation simulation) {
|
||||
//// long start = System.currentTimeMillis();
|
||||
|
@ -62,222 +63,223 @@ public class ATSMessageCollectAndDispatcher {
|
|||
//// System.out.println(String.format("收集并发送设备状态用时: [%s ms]", (end - start)));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 收集仿真所有设备状态并发送给仿真用户
|
||||
*/
|
||||
public void collectAllAndSend(Simulation simulation) {
|
||||
List<DeviceStatusVO> deviceStatuses = collectAll(simulation);
|
||||
// 构建并发送设备状态消息
|
||||
SocketMessageVO<List<DeviceStatusVO>> deviceStatusMessage =
|
||||
SocketMessageFactory.buildSimulationDeviceStatusesMessage(simulation.getId(), deviceStatuses);
|
||||
Set<String> sessions = simulation.getSimulationUserIds();
|
||||
stompMessageService.sendToUser(sessions, deviceStatusMessage);
|
||||
}
|
||||
/**
|
||||
* 收集仿真所有设备状态并发送给仿真用户
|
||||
*/
|
||||
public void collectAllAndSend(Simulation simulation) {
|
||||
List<DeviceStatusVO> deviceStatuses = collectAll(simulation);
|
||||
// 构建并发送设备状态消息
|
||||
SocketMessageVO<List<DeviceStatusVO>> deviceStatusMessage =
|
||||
SocketMessageFactory.buildSimulationDeviceStatusesMessage(simulation.getId(), deviceStatuses);
|
||||
Set<String> sessions = simulation.getSimulationUserIds();
|
||||
stompMessageService.sendToUser(sessions, deviceStatusMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 收集仿真所有设备状态
|
||||
*/
|
||||
public List<DeviceStatusVO> collectAll(Simulation simulation) {
|
||||
List<DeviceStatusVO> totalList = new ArrayList<>();
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
Map<String, ? extends MapElement> deviceMap = repository.getDeviceMap();
|
||||
deviceMap.values().forEach(device -> {
|
||||
DeviceStatus deviceStatus = repository.findStatusByCode(device.getCode());
|
||||
if (Objects.isNull(deviceStatus)) {
|
||||
deviceStatus = buildDeviceStatus(device);
|
||||
if (Objects.nonNull(deviceStatus)) {
|
||||
repository.addDeviceInfo(deviceStatus);
|
||||
totalList.add(deviceStatus.convert2VO(device));
|
||||
}
|
||||
} else {
|
||||
DeviceStatusVO statusVO = buildDeviceStatusVO(device);
|
||||
if (deviceStatus.compareAndChange(device, statusVO)) {
|
||||
totalList.add(statusVO);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 列车状态
|
||||
List<TrainInfo> trainList = repository.getSuperviseTrainList();
|
||||
trainList.forEach(train -> {
|
||||
TrainStatus trainStatus = repository.findStatusByCode(train.getGroupNumber(), TrainStatus.class);
|
||||
if (Objects.isNull(trainStatus)) {
|
||||
/**
|
||||
* 收集仿真所有设备状态
|
||||
*/
|
||||
public List<DeviceStatusVO> collectAll(Simulation simulation) {
|
||||
List<DeviceStatusVO> totalList = new ArrayList<>();
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
Map<String, ? extends MapElement> deviceMap = repository.getDeviceMap();
|
||||
deviceMap.values().forEach(device -> {
|
||||
DeviceStatus deviceStatus = repository.findStatusByCode(device.getCode());
|
||||
if (Objects.isNull(deviceStatus)) {
|
||||
deviceStatus = buildDeviceStatus(device);
|
||||
if (Objects.nonNull(deviceStatus)) {
|
||||
repository.addDeviceInfo(deviceStatus);
|
||||
totalList.add(deviceStatus.convert2VO(device));
|
||||
}
|
||||
} else {
|
||||
DeviceStatusVO statusVO = buildDeviceStatusVO(device);
|
||||
if (deviceStatus.compareAndChange(device, statusVO)) {
|
||||
totalList.add(statusVO);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 列车状态
|
||||
List<TrainInfo> trainList = repository.getSuperviseTrainList();
|
||||
trainList.forEach(train -> {
|
||||
TrainStatus trainStatus = repository.findStatusByCode(train.getGroupNumber(), TrainStatus.class);
|
||||
if (Objects.isNull(trainStatus)) {
|
||||
// if(simulation.getBuildParams().getProdType() == MapPrdTypeEnum.YJDDZH){
|
||||
if(Objects.equals(simulation.getProject(),MapPrdTypeEnum.YJDDZH.name())){
|
||||
trainStatus = new YJDDZHTrainStatus(train);
|
||||
}else{
|
||||
trainStatus = new TrainStatus(train);
|
||||
}
|
||||
repository.addDeviceInfo(trainStatus);
|
||||
totalList.add(trainStatus.convert2VO(train));
|
||||
} else {
|
||||
DeviceStatusVO statusVO;
|
||||
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
|
||||
trainStatus = new YJDDZHTrainStatus(train);
|
||||
} else {
|
||||
trainStatus = new TrainStatus(train);
|
||||
}
|
||||
repository.addDeviceInfo(trainStatus);
|
||||
totalList.add(trainStatus.convert2VO(train));
|
||||
} else {
|
||||
DeviceStatusVO statusVO;
|
||||
// if(simulation.getBuildParams().getProdType() == MapPrdTypeEnum.YJDDZH){
|
||||
if(Objects.equals(simulation.getProject(),MapPrdTypeEnum.YJDDZH.name())){
|
||||
statusVO = new YJDDZHTrainStatusVO(train);
|
||||
}else{
|
||||
statusVO = new TrainStatusVO(train);
|
||||
}
|
||||
if (trainStatus.compareAndChange(train, statusVO)) {
|
||||
totalList.add(statusVO);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 回库删除的列车状态
|
||||
List<TrainStatus> inboundTrainList = new ArrayList<>();
|
||||
List<TrainStatus> trainStatusList = repository.getTrainStatusList();
|
||||
if (!CollectionUtils.isEmpty(trainStatusList)) {
|
||||
for (TrainStatus trainStatus : trainStatusList) {
|
||||
TrainInfo trainInfo = repository.findSupervisedTrainByGroup(trainStatus.getGroupNumber());
|
||||
if (Objects.isNull(trainInfo)) {
|
||||
totalList.add(TrainStatusVO.buildDispose(trainStatus.getGroupNumber()));
|
||||
inboundTrainList.add(trainStatus);
|
||||
repository.deleteDeviceStatus(trainStatus.getCode());
|
||||
}
|
||||
}
|
||||
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
|
||||
statusVO = new YJDDZHTrainStatusVO(train);
|
||||
} else {
|
||||
// statusVO = new TrainStatusVO(train);
|
||||
statusVO = new TrainStatusVO(trainStatus);
|
||||
}
|
||||
joylink3DMessageService.handleTrainInbound(simulation, inboundTrainList);
|
||||
return totalList;
|
||||
}
|
||||
|
||||
private DeviceStatus buildDeviceStatus(MapElement device) {
|
||||
DeviceStatus status = null;
|
||||
switch (device.getDeviceType()) {
|
||||
case SECTION:
|
||||
status = new SectionStatus((Section) device);
|
||||
break;
|
||||
case SWITCH:
|
||||
status = new SwitchStatus((Switch) device);
|
||||
break;
|
||||
case SIGNAL:
|
||||
status = new SignalStatus((Signal) device);
|
||||
break;
|
||||
case STATION:
|
||||
status = new StationStatus((Station) device);
|
||||
break;
|
||||
case STAND:
|
||||
status = new StandStatus((Stand) device);
|
||||
break;
|
||||
case PSD:
|
||||
status = new PSDStatus((PSD) device);
|
||||
break;
|
||||
case ZC:
|
||||
status = new ZCStatus((ZC) device);
|
||||
break;
|
||||
case ROUTE:
|
||||
status = new RouteStatus((Route) device);
|
||||
break;
|
||||
case OVERLAP: {
|
||||
status = new OverlapStatus((RouteOverlap) device);
|
||||
break;
|
||||
}
|
||||
case CYCLE:
|
||||
status = new CycleStatus((Cycle) device);
|
||||
break;
|
||||
case DIRECTION_ROD:
|
||||
status = new DirectionRodStatus((DirectionRod) device);
|
||||
break;
|
||||
case CATENARY:
|
||||
status = new CatenaryStatus((Catenary) device);
|
||||
break;
|
||||
|
||||
case STATION_DIRECTION:
|
||||
status = new StationDirectionStatus((StationDirection) device);
|
||||
break;
|
||||
if (trainStatus.compareAndChange(train, statusVO)) {
|
||||
totalList.add(statusVO);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
private DeviceStatusVO buildDeviceStatusVO(MapElement device) {
|
||||
DeviceStatusVO status = null;
|
||||
switch (device.getDeviceType()) {
|
||||
case SECTION:
|
||||
status = new SectionStatusVO((Section) device);
|
||||
break;
|
||||
case SWITCH:
|
||||
status = new SwitchStatusVO((Switch) device);
|
||||
break;
|
||||
case SIGNAL:
|
||||
status = new SignalStatusVO((Signal) device);
|
||||
break;
|
||||
case STATION:
|
||||
status = new StationStatusVO((Station) device);
|
||||
break;
|
||||
case STAND:
|
||||
status = new StandStatusVO((Stand) device);
|
||||
break;
|
||||
case PSD:
|
||||
status = new PSDStatusVO((PSD) device);
|
||||
break;
|
||||
case ZC:
|
||||
status = new ZCStatusVO((ZC) device);
|
||||
break;
|
||||
case ROUTE:
|
||||
status = new RouteStatusVO((Route) device);
|
||||
break;
|
||||
case OVERLAP: {
|
||||
status = new OverlapStatusVO((RouteOverlap) device);
|
||||
break;
|
||||
}
|
||||
case CYCLE:
|
||||
status = new CycleStatusVO((Cycle) device);
|
||||
break;
|
||||
case DIRECTION_ROD:
|
||||
status = new DirectionRodStatusVO((DirectionRod) device);
|
||||
break;
|
||||
case CATENARY:
|
||||
status = new CatenaryStatusVO((Catenary) device);
|
||||
break;
|
||||
|
||||
case STATION_DIRECTION:
|
||||
status = new StationDirectionStatusVO((StationDirection) device);
|
||||
break;
|
||||
}
|
||||
});
|
||||
// 回库删除的列车状态
|
||||
List<TrainStatus> inboundTrainList = new ArrayList<>();
|
||||
List<TrainStatus> trainStatusList = repository.getTrainStatusList();
|
||||
if (!CollectionUtils.isEmpty(trainStatusList)) {
|
||||
for (TrainStatus trainStatus : trainStatusList) {
|
||||
TrainInfo trainInfo = repository.findSupervisedTrainByGroup(trainStatus.getGroupNumber());
|
||||
if (Objects.isNull(trainInfo)) {
|
||||
totalList.add(TrainStatusVO.buildDispose(trainStatus.getGroupNumber()));
|
||||
inboundTrainList.add(trainStatus);
|
||||
repository.deleteDeviceStatus(trainStatus.getCode());
|
||||
}
|
||||
return status;
|
||||
}
|
||||
}
|
||||
joylink3DMessageService.handleTrainInbound(simulation, inboundTrainList);
|
||||
return totalList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列车运行数据
|
||||
*/
|
||||
public void sendTrainRunData(Simulation simulation, RealRun realRun) {
|
||||
stompMessageService.sendToUser(simulation.getSimulationUserIds(),
|
||||
SocketMessageFactory.build(WebSocketMessageType.Simulation_RunFact,
|
||||
simulation.getId(), Arrays.asList(realRun)));
|
||||
}
|
||||
private DeviceStatus buildDeviceStatus(MapElement device) {
|
||||
DeviceStatus status = null;
|
||||
switch (device.getDeviceType()) {
|
||||
case SECTION:
|
||||
status = new SectionStatus((Section) device);
|
||||
break;
|
||||
case SWITCH:
|
||||
status = new SwitchStatus((Switch) device);
|
||||
break;
|
||||
case SIGNAL:
|
||||
status = new SignalStatus((Signal) device);
|
||||
break;
|
||||
case STATION:
|
||||
status = new StationStatus((Station) device);
|
||||
break;
|
||||
case STAND:
|
||||
status = new StandStatus((Stand) device);
|
||||
break;
|
||||
case PSD:
|
||||
status = new PSDStatus((PSD) device);
|
||||
break;
|
||||
case ZC:
|
||||
status = new ZCStatus((ZC) device);
|
||||
break;
|
||||
case ROUTE:
|
||||
status = new RouteStatus((Route) device);
|
||||
break;
|
||||
case OVERLAP: {
|
||||
status = new OverlapStatus((RouteOverlap) device);
|
||||
break;
|
||||
}
|
||||
case CYCLE:
|
||||
status = new CycleStatus((Cycle) device);
|
||||
break;
|
||||
case DIRECTION_ROD:
|
||||
status = new DirectionRodStatus((DirectionRod) device);
|
||||
break;
|
||||
case CATENARY:
|
||||
status = new CatenaryStatus((Catenary) device);
|
||||
break;
|
||||
|
||||
/**
|
||||
* 仿真设备操作消息
|
||||
*/
|
||||
public void handlerOperateMessage(Simulation simulation, OperationMessage operationMessage) {
|
||||
SocketMessageVO<OperationMessage> socketMessageVO =
|
||||
SocketMessageFactory.build(WebSocketMessageType.Simulation_ApplyHandle, simulation.getId(), operationMessage);
|
||||
Set<SimulationMember> humanMembers = operationMessage.getTargetMembers().stream().filter(m -> !m.isRobot()).collect(Collectors.toSet());
|
||||
//当在场景实训设计中,并且无真人成员时,将数据暂存,等待后续角色有人扮演时再发送
|
||||
if (simulation.isInSceneTraining() && CollectionUtils.isEmpty(humanMembers)) {
|
||||
for (SimulationMember targetMember : operationMessage.getTargetMembers()) {
|
||||
targetMember.getUnreceivedMessages().offer(socketMessageVO);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (CollectionUtils.isEmpty(humanMembers)) {
|
||||
//目标都是机器人,选择一个机器人发送事件处理
|
||||
applicationContext.publishEvent(new SimulationOperationMessageEvent(this, simulation, operationMessage));
|
||||
return;
|
||||
}
|
||||
//目标成员有真人,推送对应真人处理
|
||||
stompMessageService.sendToUser(humanMembers.stream().map(SimulationMember::getUserId).collect(Collectors.toSet()), socketMessageVO);
|
||||
case STATION_DIRECTION:
|
||||
status = new StationDirectionStatus((StationDirection) device);
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步仿真系统时间给客户端
|
||||
*/
|
||||
public void syncTime(Simulation simulation) {
|
||||
Set<String> sessions = simulation.getSimulationUserIds();
|
||||
SocketMessageVO<Long> timeSyncMessage = SocketMessageFactory.buildSimulationTimeSyncMessage(simulation);
|
||||
stompMessageService.sendToUser(sessions, timeSyncMessage);
|
||||
}
|
||||
private DeviceStatusVO buildDeviceStatusVO(MapElement device) {
|
||||
DeviceStatusVO status = null;
|
||||
switch (device.getDeviceType()) {
|
||||
case SECTION:
|
||||
status = new SectionStatusVO((Section) device);
|
||||
break;
|
||||
case SWITCH:
|
||||
status = new SwitchStatusVO((Switch) device);
|
||||
break;
|
||||
case SIGNAL:
|
||||
status = new SignalStatusVO((Signal) device);
|
||||
break;
|
||||
case STATION:
|
||||
status = new StationStatusVO((Station) device);
|
||||
break;
|
||||
case STAND:
|
||||
status = new StandStatusVO((Stand) device);
|
||||
break;
|
||||
case PSD:
|
||||
status = new PSDStatusVO((PSD) device);
|
||||
break;
|
||||
case ZC:
|
||||
status = new ZCStatusVO((ZC) device);
|
||||
break;
|
||||
case ROUTE:
|
||||
status = new RouteStatusVO((Route) device);
|
||||
break;
|
||||
case OVERLAP: {
|
||||
status = new OverlapStatusVO((RouteOverlap) device);
|
||||
break;
|
||||
}
|
||||
case CYCLE:
|
||||
status = new CycleStatusVO((Cycle) device);
|
||||
break;
|
||||
case DIRECTION_ROD:
|
||||
status = new DirectionRodStatusVO((DirectionRod) device);
|
||||
break;
|
||||
case CATENARY:
|
||||
status = new CatenaryStatusVO((Catenary) device);
|
||||
break;
|
||||
|
||||
public void addJobs(Simulation simulation) {
|
||||
simulation.addJob(SimulationModule.SYNC_TIME.name(), () -> syncTime(simulation), SimulationConstants.SYNC_TIME_RATE);
|
||||
simulation.addFixedRateJob(SimulationModule.MESSAGE.name(), () -> collectAllAndSend(simulation), SimulationConstants.SEND_CLIENT_RATE);
|
||||
case STATION_DIRECTION:
|
||||
status = new StationDirectionStatusVO((StationDirection) device);
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列车运行数据
|
||||
*/
|
||||
public void sendTrainRunData(Simulation simulation, RealRun realRun) {
|
||||
stompMessageService.sendToUser(simulation.getSimulationUserIds(),
|
||||
SocketMessageFactory.build(WebSocketMessageType.Simulation_RunFact,
|
||||
simulation.getId(), Arrays.asList(realRun)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 仿真设备操作消息
|
||||
*/
|
||||
public void handlerOperateMessage(Simulation simulation, OperationMessage operationMessage) {
|
||||
SocketMessageVO<OperationMessage> socketMessageVO =
|
||||
SocketMessageFactory.build(WebSocketMessageType.Simulation_ApplyHandle, simulation.getId(), operationMessage);
|
||||
Set<SimulationMember> humanMembers = operationMessage.getTargetMembers().stream().filter(m -> !m.isRobot()).collect(Collectors.toSet());
|
||||
//当在场景实训设计中,并且无真人成员时,将数据暂存,等待后续角色有人扮演时再发送
|
||||
if (simulation.isInSceneTraining() && CollectionUtils.isEmpty(humanMembers)) {
|
||||
for (SimulationMember targetMember : operationMessage.getTargetMembers()) {
|
||||
targetMember.getUnreceivedMessages().offer(socketMessageVO);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (CollectionUtils.isEmpty(humanMembers)) {
|
||||
//目标都是机器人,选择一个机器人发送事件处理
|
||||
applicationContext.publishEvent(new SimulationOperationMessageEvent(this, simulation, operationMessage));
|
||||
return;
|
||||
}
|
||||
//目标成员有真人,推送对应真人处理
|
||||
stompMessageService.sendToUser(humanMembers.stream().map(SimulationMember::getUserId).collect(Collectors.toSet()), socketMessageVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步仿真系统时间给客户端
|
||||
*/
|
||||
public void syncTime(Simulation simulation) {
|
||||
Set<String> sessions = simulation.getSimulationUserIds();
|
||||
SocketMessageVO<Long> timeSyncMessage = SocketMessageFactory.buildSimulationTimeSyncMessage(simulation);
|
||||
stompMessageService.sendToUser(sessions, timeSyncMessage);
|
||||
}
|
||||
|
||||
public void addJobs(Simulation simulation) {
|
||||
simulation.addJob(SimulationModule.SYNC_TIME.name(), () -> syncTime(simulation), SimulationConstants.SYNC_TIME_RATE);
|
||||
simulation.addFixedRateJob(SimulationModule.MESSAGE.name(), () -> collectAllAndSend(simulation), SimulationConstants.SEND_CLIENT_RATE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -413,6 +413,10 @@ public class CiApiServiceImpl2 implements CiApiService {
|
|||
throw BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.exception(
|
||||
"signalCode和routeCode不能都为空");
|
||||
}
|
||||
//开启联锁自动进路的信号机不能办理引导进路,需先解除自动进路(成都三操作文档)
|
||||
if (signal.getRouteList().stream().anyMatch(Route::isFleetMode)) {
|
||||
throw BusinessExceptionAssertEnum.OPERATION_FAIL.exception("需先解除自动进路状态");
|
||||
}
|
||||
|
||||
if (route == null && signal.getRouteList().stream().anyMatch(Route::isAnySwitchMasterLock)) {
|
||||
openGuideAspect4GuideMasterLock(simulation, signal);
|
||||
|
|
|
@ -113,7 +113,7 @@ public class CiRouteService {
|
|||
// return new Route.CheckFailMessage(Route.CheckFailReason.SectionFaultOccupied, section);
|
||||
// }
|
||||
}
|
||||
if (!start.isCbtcMode()) {
|
||||
if (!start.isCbtcMode() && !guide) {
|
||||
// 后备办理检查
|
||||
// 区段占用
|
||||
for (Section section : sectionList) {
|
||||
|
@ -584,9 +584,13 @@ public class CiRouteService {
|
|||
route.setLock(false);
|
||||
}
|
||||
}
|
||||
section.faultUnlock();
|
||||
if (section.isShowLogic()) {
|
||||
section.getLogicList().forEach(Section::faultUnlock);
|
||||
if (section.isSwitchTrack()) {
|
||||
switchFaultUnlock(simulation, section.getRelSwitch(), route);
|
||||
} else {
|
||||
section.faultUnlock();
|
||||
if (section.isShowLogic()) {
|
||||
section.getLogicList().forEach(Section::faultUnlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public class CgySignalServiceImpl implements RealDeviceService {
|
|||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), true, channel);
|
||||
break;
|
||||
case Y:
|
||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_ddj(), false, channel);
|
||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_ddj(), true, channel);
|
||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_lxj(), true, channel);
|
||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_yxj(), false, channel);
|
||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), false, channel);
|
||||
|
@ -139,7 +139,8 @@ public class CgySignalServiceImpl implements RealDeviceService {
|
|||
break;
|
||||
case G:
|
||||
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_ddj(), w_ddj,
|
||||
false, channel);
|
||||
false,
|
||||
channel);
|
||||
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_lxj(), w_lxj, true,
|
||||
channel);
|
||||
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_yxj(), w_yxj,
|
||||
|
|
|
@ -7,18 +7,17 @@ import club.joylink.rtss.vo.client.org.OrgVO;
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 账户对象
|
||||
|
@ -28,307 +27,316 @@ import java.util.List;
|
|||
@Setter
|
||||
@EqualsAndHashCode
|
||||
public class AccountVO implements Serializable {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 登录账户名(线下登录账户名)
|
||||
*/
|
||||
private String account;
|
||||
/**
|
||||
* 父账户
|
||||
*/
|
||||
private String parentAccount;
|
||||
/**
|
||||
* 账户类型
|
||||
*/
|
||||
private String type;
|
||||
public static final String Type_1 = "1"; // 个人账户
|
||||
public static final String Type_2 = "2"; // 第三方企业账户
|
||||
public static final String Type_3 = "3"; // 第三方企业子账户
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 账号所属的组织(是账号表里的字段)
|
||||
*/
|
||||
private Long orgId;
|
||||
/**
|
||||
* 登录账户名(线下登录账户名)
|
||||
*/
|
||||
private String account;
|
||||
/**
|
||||
* 父账户
|
||||
*/
|
||||
private String parentAccount;
|
||||
/**
|
||||
* 账户类型
|
||||
*/
|
||||
private String type;
|
||||
public static final String Type_1 = "1"; // 个人账户
|
||||
public static final String Type_2 = "2"; // 第三方企业账户
|
||||
public static final String Type_3 = "3"; // 第三方企业子账户
|
||||
|
||||
/**
|
||||
* 真实姓名
|
||||
*/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String name;
|
||||
/**
|
||||
* 账号所属的组织(是账号表里的字段)
|
||||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickname;
|
||||
/**
|
||||
* 真实姓名
|
||||
*/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 头像资源地址
|
||||
*/
|
||||
private String avatarPath;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@NotBlank(message = "手机号码不能为空")
|
||||
private String mobile;
|
||||
/**
|
||||
* 头像资源地址
|
||||
*/
|
||||
private String avatarPath;
|
||||
|
||||
/**
|
||||
* 国家码
|
||||
*/
|
||||
private String nationcode;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@NotBlank(message = "手机号码不能为空")
|
||||
private String mobile;
|
||||
|
||||
private String password;
|
||||
/**
|
||||
* 国家码
|
||||
*/
|
||||
private String nationcode;
|
||||
|
||||
/**
|
||||
* 微信openId
|
||||
*/
|
||||
@NotBlank(message = "微信OPENID不能为空")
|
||||
private String wxId;
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 微信unionId
|
||||
*/
|
||||
private String wxUnionId;
|
||||
/**
|
||||
* 微信openId
|
||||
*/
|
||||
@NotBlank(message = "微信OPENID不能为空")
|
||||
private String wxId;
|
||||
|
||||
/**
|
||||
* 微信小程序openId
|
||||
*/
|
||||
private String wmOpenId;
|
||||
/**
|
||||
* 微信unionId
|
||||
*/
|
||||
private String wxUnionId;
|
||||
|
||||
/**
|
||||
* 数据库的roles字段
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String dbRoles;
|
||||
/**
|
||||
* 微信小程序openId
|
||||
*/
|
||||
private String wmOpenId;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private List<String> roles;
|
||||
/**
|
||||
* 数据库的roles字段
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String dbRoles;
|
||||
|
||||
/**
|
||||
* 账号来源(最初的目的是给cgy做注册人数变化曲线)
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private List<String> roles;
|
||||
|
||||
/**
|
||||
* email邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 账号来源(最初的目的是给cgy做注册人数变化曲线)
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 状态:1-可用
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* email邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 状态:1-可用
|
||||
*/
|
||||
private String status;
|
||||
|
||||
//单位信息
|
||||
private Long companyId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private String companyName;
|
||||
private Boolean companyAdmin;
|
||||
/**
|
||||
* 用户所属组织关联的项目
|
||||
*/
|
||||
private List<String> projectCodes;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
//单位信息
|
||||
private Long companyId;
|
||||
|
||||
private String companyName;
|
||||
private Boolean companyAdmin;
|
||||
/**
|
||||
* 用户所属组织关联的项目
|
||||
*/
|
||||
private List<String> projectCodes;
|
||||
|
||||
|
||||
public AccountVO() {
|
||||
public AccountVO() {
|
||||
}
|
||||
|
||||
public AccountVO(SysAccount account) {
|
||||
this.id = account.getId();
|
||||
this.account = account.getAccount();
|
||||
this.parentAccount = account.getParentAccount();
|
||||
this.type = account.getType();
|
||||
this.orgId = account.getOrgId();
|
||||
this.name = account.getName();
|
||||
this.nickname = account.getNickname();
|
||||
this.avatarPath = account.getAvatarPath();
|
||||
this.mobile = account.getMobile();
|
||||
this.nationcode = account.getNationcode();
|
||||
this.password = account.getPassword();
|
||||
this.wxId = account.getWxId();
|
||||
this.wxUnionId = account.getWxUnionId();
|
||||
this.wmOpenId = account.getWmOpenId();
|
||||
this.setRolesByString(account.getRoles());
|
||||
this.source = account.getSource();
|
||||
this.email = account.getEmail();
|
||||
this.status = account.getStatus();
|
||||
this.createTime = account.getCreateTime();
|
||||
this.updateTime = account.getUpdateTime();
|
||||
}
|
||||
|
||||
public static AccountVO system() {
|
||||
AccountVO accountVO = new AccountVO();
|
||||
accountVO.setId(0L);
|
||||
accountVO.setName("系统");
|
||||
return accountVO;
|
||||
}
|
||||
|
||||
public static SysAccount fromVO(AccountVO accountVo) {
|
||||
SysAccount account = new SysAccount();
|
||||
account.setId(accountVo.getId());
|
||||
account.setName(accountVo.getName());
|
||||
account.setNickname(accountVo.getNickname());
|
||||
account.setNationcode(accountVo.getNationcode());
|
||||
account.setMobile(accountVo.getMobile());
|
||||
account.setWxId(accountVo.getWxId());
|
||||
account.setWxUnionId(accountVo.getWxUnionId());
|
||||
account.setRoles(accountVo.getRolesStr());
|
||||
account.setEmail(accountVo.getEmail());
|
||||
account.setStatus(accountVo.getStatus());
|
||||
account.setCreateTime(accountVo.getCreateTime());
|
||||
return account;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getIdStr() {
|
||||
return String.valueOf(this.id);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getRolesStr() {
|
||||
if (!CollectionUtils.isEmpty(this.roles)) {
|
||||
return String.join(",", this.roles.toArray(new String[]{}));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public AccountVO(SysAccount account) {
|
||||
this.id = account.getId();
|
||||
this.account = account.getAccount();
|
||||
this.parentAccount = account.getParentAccount();
|
||||
this.type = account.getType();
|
||||
this.orgId = account.getOrgId();
|
||||
this.name = account.getName();
|
||||
this.nickname = account.getNickname();
|
||||
this.avatarPath = account.getAvatarPath();
|
||||
this.mobile = account.getMobile();
|
||||
this.nationcode = account.getNationcode();
|
||||
this.password = account.getPassword();
|
||||
this.wxId = account.getWxId();
|
||||
this.wxUnionId = account.getWxUnionId();
|
||||
this.wmOpenId = account.getWmOpenId();
|
||||
this.setRolesByString(account.getRoles());
|
||||
this.source = account.getSource();
|
||||
this.email = account.getEmail();
|
||||
this.status = account.getStatus();
|
||||
this.createTime = account.getCreateTime();
|
||||
public void setRolesByString(String roles) {
|
||||
if (StringUtils.hasText(roles)) {
|
||||
String[] splits = roles.split(",");
|
||||
this.roles = new ArrayList<>();
|
||||
Collections.addAll(this.roles, splits);
|
||||
}
|
||||
}
|
||||
|
||||
public static AccountVO system() {
|
||||
public void setRolesByString() {
|
||||
if (StringUtils.hasText(dbRoles)) {
|
||||
String[] splits = dbRoles.split(",");
|
||||
this.roles = new ArrayList<>();
|
||||
Collections.addAll(this.roles, splits);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserVO [id=" + id + ", name=" + name + ", nickname=" + nickname + ", mobile=" + mobile
|
||||
+ ", email=" + email + ", nationcode="
|
||||
+ nationcode + ", wxId=" + wxId + "]";
|
||||
}
|
||||
|
||||
public static List<AccountVO> convertFromDB(List<SysAccount> list) {
|
||||
List<AccountVO> voList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
list.forEach(account -> voList.add(new AccountVO(account)));
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
|
||||
public static List<AccountVO> convert2BaseInfoVO(List<SysAccount> list) {
|
||||
List<AccountVO> voList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
list.forEach(account -> {
|
||||
AccountVO accountVO = new AccountVO();
|
||||
accountVO.setId(0L);
|
||||
accountVO.setName("系统");
|
||||
return accountVO;
|
||||
accountVO.setId(account.getId());
|
||||
accountVO.setName(account.getName());
|
||||
accountVO.setNickname(account.getNickname());
|
||||
accountVO.setMobile(account.getMobile());
|
||||
voList.add(accountVO);
|
||||
});
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
|
||||
public static SysAccount fromVO(AccountVO accountVo) {
|
||||
SysAccount account = new SysAccount();
|
||||
account.setId(accountVo.getId());
|
||||
account.setName(accountVo.getName());
|
||||
account.setNickname(accountVo.getNickname());
|
||||
account.setNationcode(accountVo.getNationcode());
|
||||
account.setMobile(accountVo.getMobile());
|
||||
account.setWxId(accountVo.getWxId());
|
||||
account.setWxUnionId(accountVo.getWxUnionId());
|
||||
account.setRoles(accountVo.getRolesStr());
|
||||
account.setEmail(accountVo.getEmail());
|
||||
account.setStatus(accountVo.getStatus());
|
||||
account.setCreateTime(accountVo.getCreateTime());
|
||||
return account;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getIdStr() {
|
||||
return String.valueOf(this.id);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getRolesStr() {
|
||||
if (!CollectionUtils.isEmpty(this.roles)) {
|
||||
return String.join(",", this.roles.toArray(new String[]{}));
|
||||
public static List<SysAccount> convert2UnionIdInfoVOs(List<AccountVO> voList) {
|
||||
List<SysAccount> list = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(voList)) {
|
||||
voList.forEach(userVO -> {
|
||||
if (StringUtils.hasText(userVO.getWxUnionId())) {
|
||||
SysAccount account = new SysAccount();
|
||||
account.setId(userVO.getId());
|
||||
account.setWxUnionId(userVO.getWxUnionId());
|
||||
list.add(account);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setRolesByString(String roles) {
|
||||
if (StringUtils.hasText(roles)) {
|
||||
String[] splits = roles.split(",");
|
||||
this.roles = new ArrayList<>();
|
||||
Collections.addAll(this.roles, splits);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 是否管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isAdmin() {
|
||||
return !CollectionUtils.isEmpty(this.roles)
|
||||
&& (this.roles.contains(BusinessConsts.ROLE_04) || this.roles.contains(
|
||||
BusinessConsts.ROLE_05));
|
||||
}
|
||||
|
||||
public void setRolesByString() {
|
||||
if (StringUtils.hasText(dbRoles)) {
|
||||
String[] splits = dbRoles.split(",");
|
||||
this.roles = new ArrayList<>();
|
||||
Collections.addAll(this.roles, splits);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 是否超级管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isSuperAdmin() {
|
||||
return !CollectionUtils.isEmpty(this.roles)
|
||||
&& (this.roles.contains(BusinessConsts.ROLE_05));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserVO [id=" + id + ", name=" + name + ", nickname=" + nickname + ", mobile=" + mobile + ", email=" + email + ", nationcode="
|
||||
+ nationcode + ", wxId=" + wxId + "]";
|
||||
}
|
||||
public void filter4Client() {
|
||||
this.password = null;
|
||||
this.wxUnionId = null;
|
||||
this.wxId = null;
|
||||
this.wmOpenId = null;
|
||||
this.createTime = null;
|
||||
}
|
||||
|
||||
public static List<AccountVO> convertFromDB(List<SysAccount> list) {
|
||||
List<AccountVO> voList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
list.forEach(account -> voList.add(new AccountVO(account)));
|
||||
}
|
||||
return voList;
|
||||
public void forClient() {
|
||||
if (StringUtils.hasText(dbRoles)) {
|
||||
this.roles = List.of(dbRoles.split(","));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<AccountVO> convert2BaseInfoVO(List<SysAccount> list) {
|
||||
List<AccountVO> voList = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
list.forEach(account -> {
|
||||
AccountVO accountVO = new AccountVO();
|
||||
accountVO.setId(account.getId());
|
||||
accountVO.setName(account.getName());
|
||||
accountVO.setNickname(account.getNickname());
|
||||
accountVO.setMobile(account.getMobile());
|
||||
voList.add(accountVO);
|
||||
});
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
public void setOrgInfo(Org org, Boolean companyAdmin, List<String> projectCodes) {
|
||||
this.companyId = org.getId();
|
||||
this.companyName = org.getName();
|
||||
this.companyAdmin = companyAdmin;
|
||||
this.projectCodes = projectCodes;
|
||||
}
|
||||
|
||||
public static List<SysAccount> convert2UnionIdInfoVOs(List<AccountVO> voList) {
|
||||
List<SysAccount> list = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(voList)) {
|
||||
voList.forEach(userVO -> {
|
||||
if (StringUtils.hasText(userVO.getWxUnionId())) {
|
||||
SysAccount account = new SysAccount();
|
||||
account.setId(userVO.getId());
|
||||
account.setWxUnionId(userVO.getWxUnionId());
|
||||
list.add(account);
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
public void copyOrgInfo(AccountVO accountVO) {
|
||||
if (accountVO != null) {
|
||||
this.companyId = accountVO.getCompanyId();
|
||||
this.companyName = accountVO.getCompanyName();
|
||||
this.companyAdmin = accountVO.getCompanyAdmin();
|
||||
this.projectCodes = accountVO.getProjectCodes();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isAdmin() {
|
||||
return !CollectionUtils.isEmpty(this.roles)
|
||||
&& (this.roles.contains(BusinessConsts.ROLE_04) || this.roles.contains(BusinessConsts.ROLE_05));
|
||||
}
|
||||
@JsonIgnore
|
||||
public boolean isThirdChildAccount() {
|
||||
return Type_3.equalsIgnoreCase(this.type) && StringUtils.hasText(this.parentAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否超级管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isSuperAdmin() {
|
||||
return !CollectionUtils.isEmpty(this.roles)
|
||||
&& (this.roles.contains(BusinessConsts.ROLE_05));
|
||||
}
|
||||
|
||||
public void filter4Client() {
|
||||
this.password = null;
|
||||
this.wxUnionId = null;
|
||||
this.wxId = null;
|
||||
this.wmOpenId = null;
|
||||
this.createTime = null;
|
||||
}
|
||||
|
||||
public void forClient() {
|
||||
if (StringUtils.hasText(dbRoles)) {
|
||||
this.roles = List.of(dbRoles.split(","));
|
||||
}
|
||||
}
|
||||
|
||||
public void setOrgInfo(Org org, Boolean companyAdmin, List<String> projectCodes) {
|
||||
this.companyId = org.getId();
|
||||
this.companyName = org.getName();
|
||||
this.companyAdmin = companyAdmin;
|
||||
this.projectCodes = projectCodes;
|
||||
}
|
||||
|
||||
public void copyOrgInfo(AccountVO accountVO) {
|
||||
if (accountVO != null) {
|
||||
this.companyId = accountVO.getCompanyId();
|
||||
this.companyName = accountVO.getCompanyName();
|
||||
this.companyAdmin = accountVO.getCompanyAdmin();
|
||||
this.projectCodes = accountVO.getProjectCodes();
|
||||
}
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isThirdChildAccount() {
|
||||
return Type_3.equalsIgnoreCase(this.type) && StringUtils.hasText(this.parentAccount);
|
||||
}
|
||||
|
||||
public void setOrgProjectVO(OrgVO orgVO, boolean orgAdmin) {
|
||||
if (orgVO != null) {
|
||||
this.companyId = orgVO.getId();
|
||||
this.companyName = orgVO.getName();
|
||||
this.companyAdmin = orgAdmin;
|
||||
this.projectCodes = orgVO.getProjectCodes();
|
||||
} else {
|
||||
this.companyId = null;
|
||||
this.companyName = null;
|
||||
this.companyAdmin = false;
|
||||
this.projectCodes = List.of();
|
||||
}
|
||||
public void setOrgProjectVO(OrgVO orgVO, boolean orgAdmin) {
|
||||
if (orgVO != null) {
|
||||
this.companyId = orgVO.getId();
|
||||
this.companyName = orgVO.getName();
|
||||
this.companyAdmin = orgAdmin;
|
||||
this.projectCodes = orgVO.getProjectCodes();
|
||||
} else {
|
||||
this.companyId = null;
|
||||
this.companyName = null;
|
||||
this.companyAdmin = false;
|
||||
this.projectCodes = List.of();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,140 +1,145 @@
|
|||
package club.joylink.rtss.vo.map;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class MapCiGenerateConfig {
|
||||
|
||||
//--------------------联锁数据生成配置start-------------------
|
||||
/**
|
||||
*是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号
|
||||
*/
|
||||
private boolean likeHa1;
|
||||
//--------------------联锁数据生成配置start-------------------
|
||||
/**
|
||||
* 是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号
|
||||
*/
|
||||
private boolean likeHa1;
|
||||
|
||||
/**
|
||||
*是否生成侧防:true-生成侧防,不要联动道岔,false-不生成侧防,用联动道岔
|
||||
*/
|
||||
private boolean generateFls;
|
||||
/**
|
||||
* 是否生成侧防:true-生成侧防,不要联动道岔,false-不生成侧防,用联动道岔
|
||||
*/
|
||||
private boolean generateFls;
|
||||
|
||||
/**
|
||||
*信号机接近区段只取最近的一个
|
||||
*/
|
||||
private boolean signalApproachOnlyOne;
|
||||
/**
|
||||
* 信号机接近区段只取最近的一个
|
||||
*/
|
||||
private boolean signalApproachOnlyOne;
|
||||
|
||||
/**
|
||||
*信号机接近区段仅考虑定位道岔
|
||||
*/
|
||||
private boolean signalApproachOnlyNpSwitch;
|
||||
/**
|
||||
* 信号机接近区段仅考虑定位道岔
|
||||
*/
|
||||
private boolean signalApproachOnlyNpSwitch;
|
||||
|
||||
/**
|
||||
*信号机接近区段不跨过前方同向信号机
|
||||
*/
|
||||
private boolean signalApproachNotPassPreSignal = true;
|
||||
/**
|
||||
* 信号机接近区段不跨过前方同向信号机
|
||||
*/
|
||||
private boolean signalApproachNotPassPreSignal = true;
|
||||
|
||||
/**
|
||||
*进路名称使用终端信号机同区段反向信号机名称命名:true-使用反向(如果存在的话),false-使用终端信号机命名
|
||||
*/
|
||||
private boolean routeNameUseEndOppositeSignalName;
|
||||
/**
|
||||
* 进路名称使用终端信号机同区段反向信号机名称命名:true-使用反向(如果存在的话),false-使用终端信号机命名
|
||||
*/
|
||||
private boolean routeNameUseEndOppositeSignalName;
|
||||
|
||||
/**
|
||||
*是否生成折返进路
|
||||
*/
|
||||
private boolean generateTbRoute;
|
||||
/**
|
||||
* 是否生成折返进路
|
||||
*/
|
||||
private boolean generateTbRoute;
|
||||
|
||||
/**
|
||||
*折返进路名称使用终端信号机反向信号机名称
|
||||
*/
|
||||
private boolean tbRouteNameUseEndOppositeSignalName;
|
||||
/**
|
||||
* 折返进路名称使用终端信号机反向信号机名称(并且终端按钮亦使用反向信号机-成都三联锁)
|
||||
*/
|
||||
private boolean tbRouteNameUseEndOppositeSignalName;
|
||||
|
||||
/**
|
||||
*进路始端防护信号机是否总是绿灯:true-总是开绿灯,false-根据进路中有无反位道岔生成绿灯或黄灯
|
||||
*/
|
||||
private boolean routeSignalAlwaysGreen;
|
||||
/**
|
||||
* 进路始端防护信号机是否总是绿灯:true-总是开绿灯,false-根据进路中有无反位道岔生成绿灯或黄灯
|
||||
*/
|
||||
private boolean routeSignalAlwaysGreen;
|
||||
|
||||
/**
|
||||
*多个延续保护路径生成多条进路:true-生成多条进路,false-生成一条进路
|
||||
*/
|
||||
private boolean routeApartByOverlap;
|
||||
/**
|
||||
* 多个延续保护路径生成多条进路:true-生成多条进路,false-生成一条进路
|
||||
*/
|
||||
private boolean routeApartByOverlap;
|
||||
|
||||
/**
|
||||
*延续保护是否只构建道岔
|
||||
*/
|
||||
private boolean overlapOnlySwitch;
|
||||
/**
|
||||
* 延续保护是否只构建道岔
|
||||
*/
|
||||
private boolean overlapOnlySwitch;
|
||||
//
|
||||
// @ApiModelProperty(value = "延续保护构建是否只考虑一个道岔计轴")
|
||||
// private boolean overlapOnlyOneSwitch;
|
||||
/**
|
||||
* 延续保护最小长度
|
||||
*/
|
||||
private float overlapMinLen = 55;
|
||||
/**
|
||||
* 延续保护最小长度
|
||||
*/
|
||||
private float overlapMinLen = 55;
|
||||
|
||||
/**
|
||||
*延续保护道岔是否只构建定位道岔
|
||||
*/
|
||||
private boolean overlapSwitchNpOnly;
|
||||
/**
|
||||
* 延续保护道岔是否只构建定位道岔
|
||||
*/
|
||||
private boolean overlapSwitchNpOnly;
|
||||
|
||||
/**
|
||||
*延续保护道岔在防护信号机与所属区段方向相反时,只构建定位道岔
|
||||
*/
|
||||
private boolean overlapSignalOppositeSwitchNpOnly;
|
||||
/**
|
||||
* 延续保护道岔在防护信号机与所属区段方向相反时,只构建定位道岔
|
||||
*/
|
||||
private boolean overlapSignalOppositeSwitchNpOnly;
|
||||
|
||||
/**
|
||||
*延续保护的建立方式:true-通过触发建立,false-随进路建立
|
||||
*/
|
||||
private boolean overlapSettingByTrigger;
|
||||
/**
|
||||
* 延续保护的建立方式:true-通过触发建立,false-随进路建立
|
||||
*/
|
||||
private boolean overlapSettingByTrigger;
|
||||
|
||||
/**
|
||||
*默认延续保护解锁时间
|
||||
*/
|
||||
private int overlapReleaseTime = 60;
|
||||
/**
|
||||
* 默认延续保护解锁时间
|
||||
*/
|
||||
private int overlapReleaseTime = 60;
|
||||
|
||||
/**
|
||||
*默认进路解锁时间
|
||||
*/
|
||||
private int routeReleaseTime = 45;
|
||||
/**
|
||||
* 默认进路解锁时间
|
||||
*/
|
||||
private int routeReleaseTime = 45;
|
||||
|
||||
/**
|
||||
*是否生成自动折返
|
||||
*/
|
||||
private boolean generateCycle;
|
||||
/**
|
||||
* 是否生成自动折返
|
||||
*/
|
||||
private boolean generateCycle;
|
||||
|
||||
/**
|
||||
*是否生成进路信号按钮
|
||||
*/
|
||||
private boolean routeButton;
|
||||
/**
|
||||
* 是否生成进路信号按钮
|
||||
*/
|
||||
private boolean routeButton;
|
||||
|
||||
/**
|
||||
*若生成进路信号按钮,进路信号按钮是否取最近的一个信号机
|
||||
*/
|
||||
private boolean getNearlySignal;
|
||||
/**
|
||||
* 若生成进路信号按钮,进路信号按钮是否取最近的一个信号机
|
||||
*/
|
||||
private boolean getNearlySignal;
|
||||
|
||||
/**
|
||||
*是否生成目的地码定义(泰雷兹式)
|
||||
*/
|
||||
private boolean generateDestination;
|
||||
/**
|
||||
* 是否生成目的地码定义(泰雷兹式)
|
||||
*/
|
||||
private boolean generateDestination;
|
||||
|
||||
/** 上下行站台共享紧急关闭效果的车站 */
|
||||
private Set<String> sharingECStations = new HashSet<>();
|
||||
/**
|
||||
* 上下行站台共享紧急关闭效果的车站
|
||||
*/
|
||||
private Set<String> sharingECStations = new HashSet<>();
|
||||
|
||||
/** 进路联锁不包含站台扣车 */
|
||||
private boolean routeInterlockDoNotIncludeStandHoldTrain;
|
||||
/**
|
||||
* 进路联锁不包含站台扣车
|
||||
*/
|
||||
private boolean routeInterlockDoNotIncludeStandHoldTrain;
|
||||
|
||||
// @ApiModelProperty(value = "是否分开生成ATP联锁和地面信号联锁")
|
||||
// private boolean apartGroundAndAtp;
|
||||
|
||||
/** 是否处理停车场/车辆段逻辑 */
|
||||
private boolean handleDepot;
|
||||
/**
|
||||
* 是否处理停车场/车辆段逻辑
|
||||
*/
|
||||
private boolean handleDepot;
|
||||
|
||||
/**
|
||||
* 是大铁线路?
|
||||
*/
|
||||
private boolean railway;
|
||||
/**
|
||||
* 是大铁线路?
|
||||
*/
|
||||
private boolean railway;
|
||||
|
||||
//--------------------联锁数据生成配置end-------------------
|
||||
//--------------------联锁数据生成配置end-------------------
|
||||
|
||||
}
|
||||
|
|
|
@ -1,48 +1,46 @@
|
|||
package club.joylink.rtss.vo.paper;
|
||||
|
||||
import club.joylink.rtss.vo.client.training2.Operation2VO;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class PaperTrainAnswerDetail {
|
||||
|
||||
/**
|
||||
* 实训步骤id
|
||||
*/
|
||||
private Long stepId;
|
||||
/**
|
||||
* 实训步骤id
|
||||
*/
|
||||
private Long stepId;
|
||||
|
||||
/**
|
||||
* 实训是否成功
|
||||
*/
|
||||
private boolean success;
|
||||
/**
|
||||
* 实训是否成功
|
||||
*/
|
||||
private boolean success;
|
||||
|
||||
/**
|
||||
* 获得的分数
|
||||
*/
|
||||
private Float score;
|
||||
/**
|
||||
* 获得的分数
|
||||
*/
|
||||
private Float score;
|
||||
|
||||
/**
|
||||
* 规则设置的分数
|
||||
*/
|
||||
private Float ruleScore;
|
||||
/**
|
||||
* 规则设置的分数
|
||||
*/
|
||||
private Float ruleScore;
|
||||
|
||||
/**
|
||||
* 是否有打分规则
|
||||
*/
|
||||
private boolean haveRule;
|
||||
/**
|
||||
* 是否有打分规则
|
||||
*/
|
||||
private boolean haveRule;
|
||||
|
||||
private boolean notExistAppend;
|
||||
/**
|
||||
* 客户端操作的实训,对应的id必须要传
|
||||
*/
|
||||
private List<TrainOperations> clientOperations;
|
||||
private boolean notExistAppend;
|
||||
/**
|
||||
* 客户端操作的实训,对应的id必须要传
|
||||
*/
|
||||
private List<TrainOperations> clientOperations;
|
||||
|
||||
public static class TrainOperations extends Operation2VO.ClientOperation2VO {
|
||||
|
||||
public static class TrainOperations extends Operation2VO.ClientOperation2VO{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue