Merge branch 'training-bug' into test

This commit is contained in:
joylink_zhangsai 2020-11-27 14:11:28 +08:00
commit 76df1f7cd0
4 changed files with 223 additions and 82 deletions

View File

@ -60,7 +60,9 @@ public interface BusinessConsts {
*/ */
String DEFAULT_PASSWORD = "123456"; String DEFAULT_PASSWORD = "123456";
/**贵州装备智造学院默认导入学生用户密码*/ /**
* 贵州装备智造学院默认导入学生用户密码
*/
String GZB_DEFAULT_PASSWORD = "666666"; String GZB_DEFAULT_PASSWORD = "666666";
String SYSTEM_BIGSCREEN = "bigScreen"; String SYSTEM_BIGSCREEN = "bigScreen";
@ -95,6 +97,7 @@ public interface BusinessConsts {
/** /**
* 缓存前缀 * 缓存前缀
*
* @author sheng * @author sheng
*/ */
interface CachePrefix { interface CachePrefix {
@ -109,9 +112,13 @@ public interface BusinessConsts {
*/ */
interface WebSocketSubscribeTopic { interface WebSocketSubscribeTopic {
String Common = "/topic/message"; String Common = "/topic/message";
/** 综合演练房间 */ /**
* 综合演练房间
*/
String Room = "/queue/room/%s"; String Room = "/queue/room/%s";
/** 仿真 */ /**
* 仿真
*/
String Simulation = "/queue/simulation/%s"; String Simulation = "/queue/simulation/%s";
String Sandbox3D = "/queue/simulation/jl3d/%s"; String Sandbox3D = "/queue/simulation/jl3d/%s";
String TrainDrive3D = "/queue/simulation/drive/%s"; String TrainDrive3D = "/queue/simulation/drive/%s";
@ -121,7 +128,9 @@ public interface BusinessConsts {
} }
/** 设备类型 */ /**
* 设备类型
*/
interface DeviceType { interface DeviceType {
String Link = "01"; String Link = "01";
String Switch = "02"; String Switch = "02";
@ -131,11 +140,17 @@ public interface BusinessConsts {
String StationStand = "06"; String StationStand = "06";
} }
/** 车站计数器类型 */ /**
* 车站计数器类型
*/
interface CounterType { interface CounterType {
/** 区故解 */ /**
* 区故解
*/
String type01 = "01"; String type01 = "01";
/** 总人解 */ /**
* 总人解
*/
String type02 = "02"; String type02 = "02";
} }
@ -143,20 +158,33 @@ public interface BusinessConsts {
/** /**
* 权限类型 * 权限类型
*
* @author Jade * @author Jade
*/ */
interface Type { interface Type {
/** 教学 */ /**
* 教学
*/
String Type01 = "01"; String Type01 = "01";
/** 考试 */ /**
* 考试
*/
String Type02 = "02"; String Type02 = "02";
/** 仿真 */ /**
* 仿真
*/
String Type03 = "03"; String Type03 = "03";
/** 大屏 */ /**
* 大屏
*/
String Type04 = "04"; String Type04 = "04";
/** 琏计划 */ /**
* 琏计划
*/
String Type05 = "05"; String Type05 = "05";
/** 三维 */ /**
* 三维
*/
String Type06 = "06"; String Type06 = "06";
} }
@ -164,17 +192,29 @@ public interface BusinessConsts {
* 试用时间单位 * 试用时间单位
*/ */
interface TimeUnit { interface TimeUnit {
/** 年 */ /**
*
*/
String TimeUnit01 = "01"; String TimeUnit01 = "01";
/** 月 */ /**
*
*/
String TimeUnit02 = "02"; String TimeUnit02 = "02";
/** 日 */ /**
*
*/
String TimeUnit03 = "03"; String TimeUnit03 = "03";
/** 时 */ /**
*
*/
String TimeUnit04 = "04"; String TimeUnit04 = "04";
/** 分(默认) */ /**
* 默认
*/
String TimeUnit05 = "05"; String TimeUnit05 = "05";
/** 秒 */ /**
*
*/
String TimeUnit06 = "06"; String TimeUnit06 = "06";
} }
@ -182,15 +222,25 @@ public interface BusinessConsts {
* 来源 * 来源
*/ */
interface Source { interface Source {
/** 来自订单 */ /**
* 来自订单
*/
String Source01 = "01"; String Source01 = "01";
/** 来自订单权限分发打包 */ /**
* 来自订单权限分发打包
*/
String Source02 = "02"; String Source02 = "02";
/** 来自个人权限分发 */ /**
* 来自个人权限分发
*/
String Source03 = "03"; String Source03 = "03";
/** 来自个人权限打包分发 */ /**
* 来自个人权限打包分发
*/
String Source04 = "04"; String Source04 = "04";
/** 来自个人权限转赠 */ /**
* 来自个人权限转赠
*/
String Source05 = "05"; String Source05 = "05";
} }
@ -199,70 +249,109 @@ public interface BusinessConsts {
interface Order { interface Order {
/** /**
* 订单类型 * 订单类型
*
* @author sheng * @author sheng
*/ */
interface Type { interface Type {
/** 个人 */ /**
* 个人
*/
String Type01 = "01"; String Type01 = "01";
/** 企业合同 */ /**
* 企业合同
*/
String Type02 = "02"; String Type02 = "02";
/** 合约赠送 */ /**
* 合约赠送
*/
String Type03 = "03"; String Type03 = "03";
/** 内部分配 */ /**
* 内部分配
*/
String Type04 = "04"; String Type04 = "04";
} }
/** /**
* 业务类型 * 业务类型
*
* @author sheng * @author sheng
*/ */
interface BizType { interface BizType {
/** 正常购买 */ /**
* 正常购买
*/
String Type01 = "01"; String Type01 = "01";
/** 续费 */ /**
* 续费
*/
String Type02 = "02"; String Type02 = "02";
/** 增加权限数量 */ /**
* 增加权限数量
*/
String Type03 = "03"; String Type03 = "03";
/** 续费+增加权限数量 */ /**
* 续费+增加权限数量
*/
String Type04 = "04"; String Type04 = "04";
} }
/** /**
* 支付类型 * 支付类型
*
* @author sheng * @author sheng
*/ */
interface PayType { interface PayType {
/** 合同线下支付 */ /**
* 合同线下支付
*/
String Type01 = "01"; String Type01 = "01";
/** 微信支付 */ /**
* 微信支付
*/
String Type02 = "02"; String Type02 = "02";
/** 支付宝支付 */ /**
* 支付宝支付
*/
String Type03 = "03"; String Type03 = "03";
} }
/** /**
* 支付状态 * 支付状态
*
* @author sheng * @author sheng
*/ */
interface PayStatus { interface PayStatus {
/** 待支付 */ /**
* 待支付
*/
String Status01 = "01"; String Status01 = "01";
/** 已支付 */ /**
* 已支付
*/
String Status02 = "02"; String Status02 = "02";
/** 取消 */ /**
* 取消
*/
String Status03 = "03"; String Status03 = "03";
} }
/** /**
* 订单状态 * 订单状态
*
* @author sheng * @author sheng
*/ */
interface Status { interface Status {
/** 未完成 */ /**
* 未完成
*/
String Status01 = "01"; String Status01 = "01";
/** 完成 */ /**
* 完成
*/
String Status02 = "02"; String Status02 = "02";
/** 取消 */ /**
* 取消
*/
String Status03 = "03"; String Status03 = "03";
} }
@ -284,6 +373,7 @@ public interface BusinessConsts {
/** /**
* 模式 * 模式
*
* @author Jade * @author Jade
*/ */
interface Mode { interface Mode {
@ -296,14 +386,20 @@ public interface BusinessConsts {
*/ */
String Mode05 = "05"; String Mode05 = "05";
} }
/** /**
* 实训状态类型 * 实训状态类型
*
* @author Jade * @author Jade
*/ */
interface StatusType { interface StatusType {
/** 开始 */ /**
* 开始
*/
String Type01 = "01"; String Type01 = "01";
/** 结束 */ /**
* 结束
*/
String Type02 = "02"; String Type02 = "02";
} }
@ -311,18 +407,33 @@ public interface BusinessConsts {
* 实训生成类型 * 实训生成类型
*/ */
interface GenerateType { interface GenerateType {
/** 自动 */ /**
* 自动
*/
String GenerateType01 = "01"; String GenerateType01 = "01";
/** 人工 */ /**
* 人工
*/
String GenerateType02 = "02"; String GenerateType02 = "02";
} }
enum Type { enum Type {
Section("区段实训"), Switch("道岔实训"), Signal("信号机实训"), Stand("站台实训"), Station("车站实训"), ControlConvertMenu("控制权实训"), TrainWindow("车次窗实训"), LimitControl("限速实训"), Driver("司机驾驶实训"), Train("列车实训"); Section("区段实训"),
Switch("道岔实训"),
Signal("信号机实训"),
Stand("站台实训"),
Station("车站实训"),
ControlConvertMenu("控制权实训"),
TrainWindow("车次窗实训"),
LimitControl("限速实训"),
Driver("司机驾驶实训"),
Train("列车实训");
private String description; private String description;
Type(String description) { Type(String description) {
this.description = description; this.description = description;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -332,6 +443,7 @@ public interface BusinessConsts {
interface Exam { interface Exam {
/** /**
* 考试结果 * 考试结果
*
* @author Jade * @author Jade
*/ */
interface Result { interface Result {
@ -353,12 +465,14 @@ public interface BusinessConsts {
String Result04 = "04"; String Result04 = "04";
} }
/**考试试题作答结果/原因*/ /**
interface QuestionCause{ * 考试试题作答结果/原因
String INCORRECT = "操作错误"; */
interface QuestionCause {
String INCORRECT = "操作错误";
String OVERTIME = "操作超时"; String OVERTIME = "操作超时";
String PERFECT = "操作完美"; String PERFECT = "操作完美";
String CORRECT = "操作正确,但没有达到最优操作时间"; String CORRECT = "操作正确,但没有达到最优操作时间";
} }
} }
@ -384,6 +498,7 @@ public interface BusinessConsts {
*/ */
String Type03 = "03"; String Type03 = "03";
} }
/** /**
* 运行方向类型 * 运行方向类型
*/ */
@ -427,13 +542,14 @@ public interface BusinessConsts {
interface Lesson { interface Lesson {
enum PrdInfo { enum PrdInfo {
prdType01("【ATS现地工作站实操】" ,"该课程基于国内知名信号厂商的真实ATS系统利用虚拟现实、人工智能等成熟的互联网技术并结合一线运营人员的宝贵经验实现了对现地工作站的原理级仿真。"), prdType01("【ATS现地工作站实操】", "该课程基于国内知名信号厂商的真实ATS系统利用虚拟现实、人工智能等成熟的互联网技术并结合一线运营人员的宝贵经验实现了对现地工作站的原理级仿真。"),
prdType02("【ATS行调工作站实操】","该课程基于国内知名信号厂商的真实ATS系统利用虚拟现实、人工智能等成熟的互联网技术并结合一线运营人员的宝贵经验实现了对行调工作站的原理级仿真。") ; prdType02("【ATS行调工作站实操】", "该课程基于国内知名信号厂商的真实ATS系统利用虚拟现实、人工智能等成熟的互联网技术并结合一线运营人员的宝贵经验实现了对行调工作站的原理级仿真。");
private String name; private String name;
private String remarks; private String remarks;
PrdInfo(String name, String remarks) { PrdInfo(String name, String remarks) {
this.name =name; this.name = name;
this.remarks =remarks; this.remarks = remarks;
} }
public String getName() { public String getName() {
@ -444,13 +560,14 @@ public interface BusinessConsts {
return remarks; return remarks;
} }
} }
interface Version{
interface Version {
String originalVersion = "0.0"; String originalVersion = "0.0";
} }
} }
interface Section { interface Section {
interface SectionType { interface SectionType {
/** /**
* 物理区段 * 物理区段
@ -498,7 +615,9 @@ public interface BusinessConsts {
* 类型 * 类型
*/ */
interface Type { interface Type {
/** 实训生成任务 */ /**
* 实训生成任务
*/
String Type01 = "01"; String Type01 = "01";
} }
@ -506,15 +625,25 @@ public interface BusinessConsts {
* 状态 * 状态
*/ */
interface Status { interface Status {
/** 未开始 */ /**
* 未开始
*/
String Status01 = "01"; String Status01 = "01";
/** 进行中 */ /**
* 进行中
*/
String Status02 = "02"; String Status02 = "02";
/** 已完成 */ /**
* 已完成
*/
String Status03 = "03"; String Status03 = "03";
/** 待执行 */ /**
* 待执行
*/
String Status04 = "04"; String Status04 = "04";
/** 已取消 */ /**
* 已取消
*/
String Status05 = "05"; String Status05 = "05";
} }
} }
@ -537,6 +666,7 @@ public interface BusinessConsts {
*/ */
String State03 = "03"; String State03 = "03";
} }
/** /**
* 房间状态 * 房间状态
*/ */
@ -576,16 +706,16 @@ public interface BusinessConsts {
*/ */
interface RealLine { interface RealLine {
interface Direction{ interface Direction {
String LEFT = "left"; String LEFT = "left";
String RIGHT = "right"; String RIGHT = "right";
} }
} }
interface SystemNoticeType{ interface SystemNoticeType {
String email ="01"; String email = "01";
String sms ="02"; String sms = "02";
} }
/** /**
@ -617,15 +747,25 @@ public interface BusinessConsts {
*/ */
enum TheoryType { enum TheoryType {
/** 单选题*/ /**
* 单选题
*/
select, select,
/** 多选题*/ /**
* 多选题
*/
multi, multi,
/**判断题*/ /**
* 判断题
*/
judge, judge,
/**填空题*/ /**
* 填空题
*/
fill, fill,
/**问答*/ /**
* 问答
*/
answer answer
} }
} }

View File

@ -653,6 +653,8 @@ public class LessonService implements ILessonService {
int orderNum = 1; int orderNum = 1;
Random random = new Random(); Random random = new Random();
for (BusinessConsts.Training.Type type : BusinessConsts.Training.Type.values()) { for (BusinessConsts.Training.Type type : BusinessConsts.Training.Type.values()) {
List<Training> trainings = iTrainingV1Service.queryTrainingsBy(mapVO.getId(), lesson.getPrdType(), type.name());
if (CollectionUtils.isEmpty(trainings)) continue;
//章节 //章节
LsLessonChapter chapter = new LsLessonChapter(); LsLessonChapter chapter = new LsLessonChapter();
chapter.setLessonId(lesson.getId()); chapter.setLessonId(lesson.getId());
@ -661,9 +663,7 @@ public class LessonService implements ILessonService {
chapter.setName(type.getDescription()); chapter.setName(type.getDescription());
chapter.setRemarks(chapter.getName() + "章节"); chapter.setRemarks(chapter.getName() + "章节");
lessonChapterDAO.insert(chapter); lessonChapterDAO.insert(chapter);
List<Training> trainings = iTrainingV1Service.queryTrainingsBy(mapVO.getId(), lesson.getPrdType(), type.name()); trainings.stream().collect(Collectors.groupingBy(Training::getOperateType)).forEach((s, ts) -> {
if (CollectionUtils.isEmpty(trainings)) continue;
trainings.stream().collect(Collectors.groupingBy(t -> t.getOperateType())).forEach((s, ts) -> {
examTrainings.add(ts.get(random.nextInt(ts.size()))); examTrainings.add(ts.get(random.nextInt(ts.size())));
int i = 1; int i = 1;
while (i < 3) { while (i < 3) {

View File

@ -97,7 +97,7 @@ public class SignalGeneratorNew implements GeneratorNew {
if (route.isGuide()) { // 引导进路跳过 if (route.isGuide()) { // 引导进路跳过
continue; continue;
} }
trainingVOList.add(this.build(config, simulation, route, operateDefinitionVO)); trainingVOList.add(this.build(config, simulation, signal, operateDefinitionVO));
// 仿真重置 // 仿真重置
simulation.reset(); simulation.reset();
} }
@ -165,7 +165,7 @@ public class SignalGeneratorNew implements GeneratorNew {
} }
this.deviceStatusModifyTool.openRouteDirect(simulation, route); this.deviceStatusModifyTool.openRouteDirect(simulation, route);
this.deviceStatusModifyTool.closeSignalDirectly(route.getStart()); this.deviceStatusModifyTool.closeSignalDirectly(route.getStart());
trainingVOList.add(this.build(config, simulation, route, operateDefinitionVO)); trainingVOList.add(this.build(config, simulation, signal, operateDefinitionVO));
// 仿真重置 // 仿真重置
simulation.reset(); simulation.reset();
} }
@ -209,7 +209,7 @@ public class SignalGeneratorNew implements GeneratorNew {
.collect(Collectors.toList()); .collect(Collectors.toList());
for (Route route : fltRouteList) { for (Route route : fltRouteList) {
deviceStatusModifyTool.openRouteDirect(simulation, route); deviceStatusModifyTool.openRouteDirect(simulation, route);
trainingVOList.add(this.build(config, simulation, route, operateDefinitionVO)); trainingVOList.add(this.build(config, simulation, route.getStart(), operateDefinitionVO));
// 仿真重置 // 仿真重置
simulation.reset(); simulation.reset();
} }
@ -248,7 +248,7 @@ public class SignalGeneratorNew implements GeneratorNew {
} else { } else {
for (Route route : arcRouteList) { for (Route route : arcRouteList) {
route.setCiControl(true); route.setCiControl(true);
trainingVOList.add(this.build(config, simulation, route, operateDefinitionVO)); trainingVOList.add(this.build(config, simulation, signal, operateDefinitionVO));
// 仿真重置 // 仿真重置
simulation.reset(); simulation.reset();
} }

View File

@ -94,6 +94,7 @@ tencent-cloud:
logging: logging:
file: file:
path: /logs/joylink/rtss path: /logs/joylink/rtss
max-size: 100MB
level: level:
club.joylink.rtss: DEBUG club.joylink.rtss: DEBUG