增加赛题模块训练接口(未完)

This commit is contained in:
thesai 2024-03-01 18:27:40 +08:00
parent 9df4de84b6
commit 6fe2679fd8
17 changed files with 2991 additions and 685 deletions

@ -1 +1 @@
Subproject commit 6b8e54c0216e2465e84bbd6032f860647381a611
Subproject commit 4ed56c6655935a7cbc3dd9edbb3468a96c875ffd

View File

@ -0,0 +1,73 @@
package club.joylink.rtss.bo.race;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.vo.race.RaceApplication;
import club.joylink.rtss.vo.race.RaceApplication.ResultNode;
import club.joylink.rtss.vo.race.RaceApplication.ResultNode.Builder;
import club.joylink.rtss.vo.race.RaceTask;
import club.joylink.rtss.vo.race.RaceTask.RacePaperSingleModuleGroupTask;
import club.joylink.rtss.vo.race.RaceTask.RaceTaskChildVO;
import club.joylink.rtss.vo.race.RaceTask.RaceTaskChildVO.ChildNodeType;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.Data;
@Data
public class RaceContent {
private long userId;
private long paperId;
private int moduleId;
/**
* 训练使用到的任务树
*/
private RaceTask.RacePaperSingleModuleGroupTask taskTree;
/**
* 训练结果
*/
private RaceApplication.RacePracticeResult.Builder result;
/**
* 结果节点映射仅为了通过ID找节点
*/
private Map<Long, Builder> resultNodeMap = new HashMap<>();
public RaceContent(long userId, long paperId, int moduleId,
RacePaperSingleModuleGroupTask taskTree) {
this.userId = userId;
this.paperId = paperId;
this.moduleId = moduleId;
this.taskTree = taskTree;
this.result = RaceApplication.RacePracticeResult.newBuilder();
result.setCustomModuleId(taskTree.getCustomModuleId());
List<Builder> nodeBuilderList = result.getNodeBuilderList();
buildResultNodeTree(taskTree.getChildList(), nodeBuilderList);
}
public Builder getResultNode(long taskId) {
Builder builder = resultNodeMap.get(taskId);
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(builder,
String.format("任务[%d]不存在", taskId));
return builder;
}
private void buildResultNodeTree(List<RaceTaskChildVO> childrenList,
List<Builder> nodeBuilderList) {
for (RaceTaskChildVO childVO : childrenList) {
//构建对应的结果Node
Builder nodeBuilder = ResultNode.newBuilder();
nodeBuilder.setName(childVO.getName());
nodeBuilder.setType(childVO.getNodeType());
nodeBuilderList.add(nodeBuilder);
//构建任务映射
if (ChildNodeType.TASK == childVO.getNodeType()) {
resultNodeMap.put(childVO.getId(), nodeBuilder);
}
//递归
buildResultNodeTree(childVO.getChildrenList(), nodeBuilder.getChildBuilderList());
}
}
}

View File

@ -1,6 +1,18 @@
package club.joylink.rtss.controller.racetr;
import org.springframework.web.bind.annotation.*;
import club.joylink.rtss.services.race.RaceApplicationService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.race.RaceApplication;
import club.joylink.rtss.vo.race.RaceTaskFinishParamDTO;
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.RequestAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 赛题训练接口
@ -8,16 +20,21 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/race")
public class RaceApplicationController {
private RaceApplicationService raceApplicationService;
/**
* 开始训练
* <p>
* 目前用用户id作为训练上下文的ID即用户同时进行一个训练
*
* @param paperId 赛题ID
* @return 训练的信息
*/
@PostMapping("/{paperId}")
public Object start(@PathVariable long paperId) {
//暂时就用用户id作为竞赛上下文的id也就是说一个用户同时只能开一个竞赛
return null;
@PostMapping("/{paperId}/{moduleId}")
public Object start(@PathVariable long paperId, @PathVariable int moduleId,
@RequestAttribute AccountVO user) {
return raceApplicationService.start(paperId, moduleId, user.getId());
}
/**
@ -26,20 +43,22 @@ public class RaceApplicationController {
* @param simulationId 场景依托的仿真
* @param sceneId 场景的ID
*/
@PutMapping("/{simulationId}/{sceneId}/load")
public void loadScene(@PathVariable String simulationId, @PathVariable String sceneId) {
@PutMapping("/{simulationId}/load/{sceneId}")
public void loadScene(@PathVariable String simulationId, @PathVariable long sceneId,
@RequestAttribute LoginUserInfoVO loginInfo) {
raceApplicationService.loadScene(simulationId, sceneId, loginInfo);
}
/**
* 完成任务
*
* @param taskId 任务ID
* @param record 任务记录需要前端进行判定的操作的记录
* @param paramDTO 完成任务所需的参数主要就是需要前端做判定的操作/步骤
*/
@PutMapping("/{taskId}/finish")
public void finishTask(@PathVariable long taskId, @RequestBody Object record) {
public void finishTask(@PathVariable long taskId, @RequestBody RaceTaskFinishParamDTO paramDTO,
@RequestAttribute AccountVO user) {
raceApplicationService.finishTask(taskId, paramDTO, user);
}
/**
@ -47,8 +66,8 @@ public class RaceApplicationController {
*
* @return 评分结果
*/
public Object finish() {
return null;
public RaceApplication.RacePracticeResult finish(@RequestAttribute AccountVO user) {
return raceApplicationService.finish(user.getId());
}
/**

View File

@ -48,7 +48,8 @@ public class RacePaperController {
* @param user
*/
@PostMapping("/{id}")
public void update(@PathVariable("id") Long id, @RequestBody RacePaperCreateVO updateVO, @RequestAttribute AccountVO user) {
public void update(@PathVariable("id") Long id, @RequestBody RacePaperCreateVO updateVO,
@RequestAttribute AccountVO user) {
this.racePaperService.update(id, updateVO, user);
}
@ -68,7 +69,8 @@ public class RacePaperController {
* @param user
*/
@PostMapping("/{id}/config")
public void configSeting(@PathVariable("id") Long id, @RequestBody RacePaperModuleVO moduleVO, @RequestAttribute AccountVO user) {
public void configSeting(@PathVariable("id") Long id, @RequestBody RacePaperModuleVO moduleVO,
@RequestAttribute AccountVO user) {
this.racePaperService.configSeting(id, moduleVO, user);
}
@ -112,7 +114,8 @@ public class RacePaperController {
*/
@GetMapping("/{paperId}/module/{moduleId}/task")
public RacePaperSingleModuleGroupTask paperModuleTask(@PathVariable("paperId") Long id, @PathVariable("moduleId") Integer moduleId) {
public RacePaperSingleModuleGroupTask paperModuleTask(@PathVariable("paperId") Long id,
@PathVariable("moduleId") Integer moduleId) {
return this.racePaperService.singlePaperModuleTask(id, moduleId);
}

View File

@ -12,7 +12,6 @@ import org.springframework.web.bind.annotation.DeleteMapping;
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.RequestAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -37,12 +36,14 @@ public class RaceTaskController {
}
@PostMapping("/{id}")
public void update(@PathVariable("id") Long id, @RequestBody RaceTaskCreateVO vo, @RequestAttribute AccountVO user) {
public void update(@PathVariable("id") Long id, @RequestBody RaceTaskCreateVO vo,
@RequestAttribute AccountVO user) {
this.taskService.update(id, vo, user);
}
@PostMapping("/{taskId}/bind")
public void bind(@PathVariable("taskId") Long taskId, @RequestBody List<RaceTaskBind> bind, @RequestAttribute AccountVO user) {
public void bind(@PathVariable("taskId") Long taskId, @RequestBody List<RaceTaskBind> bind,
@RequestAttribute AccountVO user) {
this.taskService.bind(taskId, bind, user);
}

View File

@ -32,22 +32,37 @@ import club.joylink.rtss.vo.client.operation.DriveParamVO;
import club.joylink.rtss.vo.client.psl.PslStatus;
import club.joylink.rtss.vo.client.runplan.PlanTripNumberVO;
import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO;
import club.joylink.rtss.vo.client.simulationv1.*;
import club.joylink.rtss.vo.client.simulationv1.RunAsPlanParam;
import club.joylink.rtss.vo.client.simulationv1.SimulationInfoQueryVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationLogPagedQueryVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationUserVO;
import club.joylink.rtss.vo.map.MapVO;
import club.joylink.rtss.vo.map.graph.MapStationNewVO;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.web.bind.annotation.DeleteMapping;
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.RequestAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 新仿真接口
@ -503,9 +518,9 @@ public class SimulationV1Controller {
/**
* 根据功能配置创建仿真
*/
@Deprecated
@PostMapping("/new/{mapId}")
public String createSimulation(@PathVariable long mapId, @RequestBody @Validated SimulationWorkParamVO paramVO,
public String createSimulation(@PathVariable long mapId,
@RequestBody @Validated SimulationWorkParamVO paramVO,
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return simulationService.createSimulation(mapId, paramVO, loginUserInfoVO);

View File

@ -0,0 +1,118 @@
package club.joylink.rtss.services.race;
import club.joylink.rtss.bo.race.RaceContent;
import club.joylink.rtss.entity.training2.DraftTraining2WithBLOBs;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.services.training2.Training2Service;
import club.joylink.rtss.simulation.cbtc.GroupSimulationService;
import club.joylink.rtss.simulation.cbtc.SimulationLifeCycleService;
import club.joylink.rtss.simulation.cbtc.member.MemberManager;
import club.joylink.rtss.util.JsonUtils;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.paper.PaperTrainAnswerDetail;
import club.joylink.rtss.vo.race.RaceApplication.RacePracticeResult;
import club.joylink.rtss.vo.race.RaceApplication.ResultNode.Builder;
import club.joylink.rtss.vo.race.RaceSceneOuterClass;
import club.joylink.rtss.vo.race.RaceTask;
import club.joylink.rtss.vo.race.RaceTaskFinishParamDTO;
import club.joylink.rtss.websocket.StompMessageService;
import com.google.protobuf.InvalidProtocolBufferException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class RaceApplicationService {
private RacePaperService racePaperService;
private GroupSimulationService groupSimulationService;
private MemberManager memberManager;
private SimulationLifeCycleService simulationLifeCycleService;
private ApplicationContext applicationContext;
private StompMessageService stompMessageService;
private Training2Service training2Service;
private RaceSceneService raceSceneService;
private static final Map<Long, RaceContent> raceContentMap = new HashMap<>();
/**
* 开始训练
*
* @return 模块任务树
*/
public RaceTask.RacePaperSingleModuleGroupTask start(long paperId, int moduleId, long userId) {
RaceContent content = new RaceContent(userId, paperId, moduleId,
racePaperService.singlePaperModuleTask(paperId, moduleId));
RaceContent oldContent = raceContentMap.put(userId, content);
if (oldContent != null) {
log.info("用户[%d]开始了[赛题:{}|模块:{}]的训练,并且覆盖了就训练", paperId, moduleId);
} else {
log.info("用户[%d]开始了[赛题:{}|模块:{}]的训练", paperId, moduleId);
}
return content.getTaskTree();
}
public void loadScene(String simulationId, long sceneId, LoginUserInfoVO loginInfo) {
RaceContent content = getContent(loginInfo.getAccountVO().getId());
//获取场景数据
RaceSceneOuterClass.StorageSimulation scene;
try {
scene = RaceSceneOuterClass.Scene
.parseFrom(raceSceneService.findById(sceneId).getProto()).getStorageSimulation();
} catch (InvalidProtocolBufferException e) {
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("场景数据解析出错", e);
}
//场景数据转实训数据
DraftTraining2WithBLOBs draftTraining2 = new DraftTraining2WithBLOBs();
draftTraining2.setBgSceneJson(scene.getBgSceneJson());
// draftTraining2.setOperaJson(scene.get); operaJson没了
draftTraining2.setStepJson(scene.getStepJson());
draftTraining2.setScoringRuleJson(scene.getScoringRuleJson());
draftTraining2.setMemberJson(scene.getMemberJson());
draftTraining2.setPlayerIdJson(JsonUtils.writeValueAsString(scene.getPlayerIdsList()));
// draftTraining2.setClient(scene); client没了
training2Service.trainingDataValid.accept(draftTraining2);
//加载实训
training2Service.simulationLoadTraining(simulationId, draftTraining2, loginInfo);
}
public void finishTask(long taskId, RaceTaskFinishParamDTO paramDTO, AccountVO user) {
if (paramDTO == null) {
return;
}
RaceContent content = getContent(user.getId());
List<PaperTrainAnswerDetail> result = training2Service.finishTraining2(
paramDTO.getSimulationId(), user, paramDTO.getScoreList());
Builder resultNode = content.getResultNode(taskId);
int fullScore = 0;
int score = 0;
for (PaperTrainAnswerDetail paperTrainAnswerDetail : result) {
fullScore += paperTrainAnswerDetail.getRuleScore();
score += paperTrainAnswerDetail.getScore();
}
resultNode.setFullScore(fullScore);
resultNode.setScore(score);
}
public RacePracticeResult finish(long userId) {
RaceContent content = getContent(userId);
RacePracticeResult result = content.getResult().build();
raceContentMap.remove(userId);
log.info("用户[{}]完成[赛题:{} | 模块:{}]", userId, content.getPaperId(),
content.getModuleId());
return result;
}
private RaceContent getContent(long userId) {
RaceContent content = raceContentMap.get(userId);
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertNotNull(content,
String.format("未找到用户[%d]的训练上下文", userId));
return content;
}
}

View File

@ -4,12 +4,10 @@ import club.joylink.rtss.dao.racetr.RacetrTaskDAO;
import club.joylink.rtss.entity.racetr.RacetrTask;
import club.joylink.rtss.entity.racetr.RacetrTaskExample;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.services.ISysUserService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind;
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind.TaskBindType;
import club.joylink.rtss.vo.race.RaceTask.RaceTaskCreateVO;
import club.joylink.rtss.vo.race.RaceTask.RaceTaskDetailVO;
import club.joylink.rtss.vo.race.RaceTaskDetailDTO;
@ -40,14 +38,17 @@ public class RaceTaskService {
private RacetrTask findById(Long id) {
RacetrTask task = this.raceTaskDAO.selectByPrimaryKey(id);
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(task), "没有找到对应的任务");
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(task),
"没有找到对应的任务");
return task;
}
public RaceTaskDetailVO detail(Long id) {
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(id), "请选择对应的任务");
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(id),
"请选择对应的任务");
RaceTaskDetailDTO task = this.raceTaskDAO.details(id);
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(task), "未找到对应的任务数据");
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(task),
"未找到对应的任务数据");
RaceTaskDetailVO.Builder vo = RaceTaskDetailVO.newBuilder();
vo.setId(task.getId());
@ -56,7 +57,9 @@ public class RaceTaskService {
vo.setContent(task.getContent());
vo.setStandards(task.getStandards());
vo.setParentId(task.getParentId());
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(task.getCreatorId(), task.getCreatorName(), task.getUpdaterId(), task.getUpdaterName(), task.getCreateTime(), task.getUpdateTime());
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(task.getCreatorId(),
task.getCreatorName(), task.getUpdaterId(), task.getUpdaterName(), task.getCreateTime(),
task.getUpdateTime());
vo.setModifyInfo(modifyInfoVO);
if (Objects.nonNull(task.getSceneId())) {
vo.setSceneId(task.getSceneId());
@ -97,11 +100,14 @@ public class RaceTaskService {
}
public void bind(Long taskId, List<RaceTaskBind> bind, AccountVO user) {
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(!CollectionUtils.isEmpty(bind), "请选择要绑定的数据");
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(!CollectionUtils.isEmpty(bind),
"请选择要绑定的数据");
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(bind.size() <= 2, "最多绑定只能选择2个类型");
if (bind.size() > 1) {
List<TaskBindType> bindTypes = bind.stream().map(RaceTaskBind::getBindType).distinct().collect(Collectors.toList());
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(bindTypes.size() != 1, "最多绑定只能选择2个类型");
List<TaskBindType> bindTypes = bind.stream().map(RaceTaskBind::getBindType).distinct()
.collect(Collectors.toList());
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(bindTypes.size() != 1,
"最多绑定只能选择2个类型");
}
RacetrTask task = this.findById(taskId);
@ -130,7 +136,8 @@ public class RaceTaskService {
public List<RaceTaskTreeVO> tree() {
List<RacetrTask> taskList = this.raceTaskDAO.selectByExample(null);
Map<Long, List<RaceTaskTreeVO>> mapList = taskList.stream().map(RaceTaskTreeVO::new).collect(Collectors.groupingBy(RaceTaskTreeVO::getParentId));
Map<Long, List<RaceTaskTreeVO>> mapList = taskList.stream().map(RaceTaskTreeVO::new)
.collect(Collectors.groupingBy(RaceTaskTreeVO::getParentId));
List<RaceTaskTreeVO> rootTaskList = mapList.get(TASK_ROOT_ID);
if (CollectionUtils.isEmpty(rootTaskList)) {
return Collections.emptyList();
@ -163,7 +170,8 @@ public class RaceTaskService {
List<RaceTaskTreeVO> collection = Lists.newArrayList(new RaceTaskTreeVO(rt));
this.collectAllChildren(rt.getId(), collection);
List<Long> deleteIds = collection.stream().map(RaceTaskTreeVO::getId).distinct().collect(Collectors.toList());
List<Long> deleteIds = collection.stream().map(RaceTaskTreeVO::getId).distinct()
.collect(Collectors.toList());
log.info("删除任务[{}] 对应所有的子节点id[{}]", id, deleteIds);
RacetrTaskExample example = new RacetrTaskExample();
example.createCriteria().andIdIn(deleteIds);
@ -188,7 +196,8 @@ public class RaceTaskService {
*/
public Map<Long, List<RaceTaskDetailDTO>> recursiveFindTask(List<Long> taskIds) {
List<RaceTaskDetailDTO> taskDtoList = this.raceTaskDAO.recursiveFindTask(taskIds);
Map<Long, List<RaceTaskDetailDTO>> dtoMapList = taskDtoList.stream().collect(Collectors.groupingBy(RaceTaskDetailDTO::getParentId));
Map<Long, List<RaceTaskDetailDTO>> dtoMapList = taskDtoList.stream()
.collect(Collectors.groupingBy(RaceTaskDetailDTO::getParentId));
return dtoMapList;
}
}

View File

@ -637,7 +637,7 @@ public class Training2Service {
/**
* 仿真加载实训 初始化仿真 - 替换实训信息 - 加载背景
*/
private void simulationLoadTraining(String group, DraftTraining2WithBLOBs draftTraining2,
public void simulationLoadTraining(String group, DraftTraining2WithBLOBs draftTraining2,
LoginUserInfoVO loginUserInfoVO) {
Simulation simulation = groupSimulationCache.getSimulationByGroup(group);
// 重置仿真状态
@ -931,7 +931,7 @@ public class Training2Service {
/**
* 检验实训数据是否合规
*/
private Consumer<DraftTraining2WithBLOBs> trainingDataValid = (training) -> {
public Consumer<DraftTraining2WithBLOBs> trainingDataValid = (training) -> {
if (!StringUtils.hasText(training.getPlayerIdJson())) {
throw new SimulationException(SimulationExceptionType.Invalid_Operation
, String.format("实训{id:[%s]}没有参训角色", training.getId()));

View File

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: modify_info.proto
// source: common/modify_info.proto
package club.joylink.rtss.vo.common;
@ -1146,12 +1146,12 @@ public final class ModifyInfo {
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\021modify_info.proto\022\006common\"\214\001\n\014ModifyIn" +
"foVO\022\022\n\ncreator_id\030\001 \001(\003\022\023\n\013create_time\030" +
"\002 \001(\t\022\022\n\nupdater_id\030\003 \001(\003\022\023\n\013update_time" +
"\030\004 \001(\t\022\024\n\014creator_name\030\005 \001(\t\022\024\n\014updater_" +
"name\030\006 \001(\tB\035\n\033club.joylink.rtss.vo.commo" +
"nb\006proto3"
"\n\030common/modify_info.proto\022\006common\"\214\001\n\014M" +
"odifyInfoVO\022\022\n\ncreator_id\030\001 \001(\003\022\023\n\013creat" +
"e_time\030\002 \001(\t\022\022\n\nupdater_id\030\003 \001(\003\022\023\n\013upda" +
"te_time\030\004 \001(\t\022\024\n\014creator_name\030\005 \001(\t\022\024\n\014u" +
"pdater_name\030\006 \001(\tB\035\n\033club.joylink.rtss.v" +
"o.commonb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: page_query.proto
// source: common/page_query.proto
package club.joylink.rtss.vo.common;
@ -552,9 +552,9 @@ public final class PageQuery {
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\020page_query.proto\022\006common\")\n\013PageQueryV" +
"O\022\014\n\004page\030\001 \001(\005\022\014\n\004size\030\002 \001(\005B\035\n\033club.jo" +
"ylink.rtss.vo.commonb\006proto3"
"\n\027common/page_query.proto\022\006common\")\n\013Pag" +
"eQueryVO\022\014\n\004page\030\001 \001(\005\022\014\n\004size\030\002 \001(\005B\035\n\033" +
"club.joylink.rtss.vo.commonb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: race_module.proto
// source: race/race_module.proto
package club.joylink.rtss.vo.race;
@ -5593,23 +5593,23 @@ public final class RaceModule {
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\021race_module.proto\022\004race\032\030common/modify" +
"_info.proto\"\256\001\n\014RaceModuleVO\022\n\n\002id\030\001 \001(\003" +
"\022\014\n\004code\030\003 \001(\t\022\014\n\004desc\030\004 \001(\t\022\020\n\010paper_id" +
"\030\005 \001(\003\022\'\n\014task_setting\030\006 \001(\0132\021.race.Task" +
"Setting\022\020\n\010duration\030\007 \001(\005\022)\n\013modify_info" +
"\030\010 \001(\0132\024.common.ModifyInfoVO\"\235\001\n\020RaceMod" +
"uleListVO\022\n\n\002id\030\001 \001(\003\022\014\n\004code\030\003 \001(\t\022\014\n\004d" +
"esc\030\004 \001(\t\022\020\n\010paper_id\030\005 \001(\003\022\022\n\npaper_nam" +
"e\030\006 \001(\t\022\020\n\010duration\030\007 \001(\005\022)\n\013modify_info" +
"\030\010 \001(\0132\024.common.ModifyInfoVO\"T\n\022RaceModu" +
"leCreateVO\022\014\n\004code\030\001 \001(\t\022\014\n\004desc\030\002 \001(\t\022\020" +
"\n\010paper_id\030\003 \001(\003\022\020\n\010duration\030\004 \001(\005\"\206\001\n\013T" +
"askSetting\022&\n\005group\030\002 \003(\0132\027.race.TaskSet" +
"ting.Group\032O\n\005Group\022\020\n\010task_ids\030\001 \003(\003\022&\n" +
"\005group\030\002 \003(\0132\027.race.TaskSetting.Group\022\014\n" +
"\004name\030\003 \001(\tB\033\n\031club.joylink.rtss.vo.race" +
"b\006proto3"
"\n\026race/race_module.proto\022\004race\032\030common/m" +
"odify_info.proto\"\256\001\n\014RaceModuleVO\022\n\n\002id\030" +
"\001 \001(\003\022\014\n\004code\030\003 \001(\t\022\014\n\004desc\030\004 \001(\t\022\020\n\010pap" +
"er_id\030\005 \001(\003\022\'\n\014task_setting\030\006 \001(\0132\021.race" +
".TaskSetting\022\020\n\010duration\030\007 \001(\005\022)\n\013modify" +
"_info\030\010 \001(\0132\024.common.ModifyInfoVO\"\235\001\n\020Ra" +
"ceModuleListVO\022\n\n\002id\030\001 \001(\003\022\014\n\004code\030\003 \001(\t" +
"\022\014\n\004desc\030\004 \001(\t\022\020\n\010paper_id\030\005 \001(\003\022\022\n\npape" +
"r_name\030\006 \001(\t\022\020\n\010duration\030\007 \001(\005\022)\n\013modify" +
"_info\030\010 \001(\0132\024.common.ModifyInfoVO\"T\n\022Rac" +
"eModuleCreateVO\022\014\n\004code\030\001 \001(\t\022\014\n\004desc\030\002 " +
"\001(\t\022\020\n\010paper_id\030\003 \001(\003\022\020\n\010duration\030\004 \001(\005\"" +
"\206\001\n\013TaskSetting\022&\n\005group\030\002 \003(\0132\027.race.Ta" +
"skSetting.Group\032O\n\005Group\022\020\n\010task_ids\030\001 \003" +
"(\003\022&\n\005group\030\002 \003(\0132\027.race.TaskSetting.Gro" +
"up\022\014\n\004name\030\003 \001(\tB\033\n\031club.joylink.rtss.vo" +
".raceb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: race_paper.proto
// source: race/race_paper.proto
package club.joylink.rtss.vo.race;
@ -6875,29 +6875,29 @@ public final class RacePaper {
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\020race_paper.proto\022\004race\032\030common/modify_" +
"info.proto\032\026race/race_season.proto\"\257\001\n\013R" +
"acePaperVO\022\n\n\002id\030\001 \001(\003\022\014\n\004name\030\002 \001(\t\022\014\n\004" +
"desc\030\003 \001(\t\022\021\n\tseason_id\030\005 \001(\003\022\023\n\013season_" +
"name\030\006 \001(\t\022)\n\013modify_info\030\010 \001(\0132\024.common" +
".ModifyInfoVO\022%\n\005group\030\t \001(\0162\026.race.Race" +
"Season.Group\"\320\001\n\021RacePaperDetailVO\022\n\n\002id" +
"\030\001 \001(\003\022\014\n\004name\030\002 \001(\t\022\014\n\004desc\030\003 \001(\t\022*\n\tmo" +
"dule_vo\030\004 \001(\0132\027.race.RacePaperModuleVO\022\021" +
"\n\tseason_id\030\005 \001(\003\022\023\n\013season_name\030\006 \001(\t\022\024" +
"\n\014support_copy\030\007 \001(\010\022)\n\013modify_info\030\010 \001(" +
"\0132\024.common.ModifyInfoVO\"B\n\021RacePaperCrea" +
"teVO\022\014\n\004name\030\001 \001(\t\022\014\n\004desc\030\002 \001(\t\022\021\n\tseas" +
"on_id\030\003 \001(\003\"\275\002\n\021RacePaperModuleVO\0224\n\007mod" +
"ules\030\001 \003(\0132#.race.RacePaperModuleVO.Pape" +
"rModule\032\232\001\n\013PaperModule\022\023\n\013module_name\030\001" +
" \001(\t\022\020\n\010duration\030\002 \001(\005\022,\n\005group\030\003 \003(\0132\035." +
"race.RacePaperModuleVO.Group\022\034\n\024module_s" +
"core_rule_id\030\004 \001(\003\022\030\n\020custom_module_id\030\005" +
" \001(\005\032U\n\005Group\022\020\n\010task_ids\030\001 \003(\003\022,\n\005group" +
"\030\002 \003(\0132\035.race.RacePaperModuleVO.Group\022\014\n" +
"\004name\030\003 \001(\tB\033\n\031club.joylink.rtss.vo.race" +
"b\006proto3"
"\n\025race/race_paper.proto\022\004race\032\030common/mo" +
"dify_info.proto\032\026race/race_season.proto\"" +
"\257\001\n\013RacePaperVO\022\n\n\002id\030\001 \001(\003\022\014\n\004name\030\002 \001(" +
"\t\022\014\n\004desc\030\003 \001(\t\022\021\n\tseason_id\030\005 \001(\003\022\023\n\013se" +
"ason_name\030\006 \001(\t\022)\n\013modify_info\030\010 \001(\0132\024.c" +
"ommon.ModifyInfoVO\022%\n\005group\030\t \001(\0162\026.race" +
".RaceSeason.Group\"\320\001\n\021RacePaperDetailVO\022" +
"\n\n\002id\030\001 \001(\003\022\014\n\004name\030\002 \001(\t\022\014\n\004desc\030\003 \001(\t\022" +
"*\n\tmodule_vo\030\004 \001(\0132\027.race.RacePaperModul" +
"eVO\022\021\n\tseason_id\030\005 \001(\003\022\023\n\013season_name\030\006 " +
"\001(\t\022\024\n\014support_copy\030\007 \001(\010\022)\n\013modify_info" +
"\030\010 \001(\0132\024.common.ModifyInfoVO\"B\n\021RacePape" +
"rCreateVO\022\014\n\004name\030\001 \001(\t\022\014\n\004desc\030\002 \001(\t\022\021\n" +
"\tseason_id\030\003 \001(\003\"\275\002\n\021RacePaperModuleVO\0224" +
"\n\007modules\030\001 \003(\0132#.race.RacePaperModuleVO" +
".PaperModule\032\232\001\n\013PaperModule\022\023\n\013module_n" +
"ame\030\001 \001(\t\022\020\n\010duration\030\002 \001(\005\022,\n\005group\030\003 \003" +
"(\0132\035.race.RacePaperModuleVO.Group\022\034\n\024mod" +
"ule_score_rule_id\030\004 \001(\003\022\030\n\020custom_module" +
"_id\030\005 \001(\005\032U\n\005Group\022\020\n\010task_ids\030\001 \003(\003\022,\n\005" +
"group\030\002 \003(\0132\035.race.RacePaperModuleVO.Gro" +
"up\022\014\n\004name\030\003 \001(\tB\033\n\031club.joylink.rtss.vo" +
".raceb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: race_scene.proto
// source: race/race_scene.proto
package club.joylink.rtss.vo.race;
@ -5593,26 +5593,26 @@ public final class RaceSceneOuterClass {
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\020race_scene.proto\022\004race\032\030common/modify_" +
"info.proto\"\305\001\n\013RaceSceneVO\022\n\n\002id\030\001 \001(\003\022\014" +
"\n\004name\030\002 \001(\t\022\"\n\004type\030\003 \001(\0162\024.race.RaceSc" +
"ene.Type\022\022\n\nfunctionId\030\004 \001(\003\022\032\n\005scene\030\005 " +
"\001(\0132\013.race.Scene\022(\n\nmodifyInfo\030\006 \001(\0132\024.c" +
"ommon.ModifyInfoVO\022\r\n\005mapId\030\007 \001(\003\022\017\n\007map" +
"Name\030\010 \001(\t\"\234\001\n\017RaceSceneListVO\022\n\n\002id\030\001 \001" +
"(\003\022\014\n\004name\030\002 \001(\t\022\"\n\004type\030\003 \001(\0162\024.race.Ra" +
"ceScene.Type\022\016\n\006map_id\030\004 \001(\003\022\020\n\010map_name" +
"\030\005 \001(\t\022)\n\013modify_info\030\006 \001(\0132\024.common.Mod" +
"ifyInfoVO\"3\n\022RaceScenePublishVO\022\017\n\007dafit" +
"id\030\001 \001(\003\022\014\n\004name\030\003 \001(\t\"I\n\005Scene\022\013\n\003url\030\001" +
" \001(\t\0223\n\022storage_simulation\030\002 \001(\0132\027.race." +
"StorageSimulation\"\201\001\n\021StorageSimulation\022" +
"\025\n\rbg_scene_json\030\001 \001(\t\022\021\n\tstep_json\030\002 \001(" +
"\t\022\023\n\013member_json\030\003 \001(\t\022\022\n\nplayer_ids\030\004 \003" +
"(\t\022\031\n\021scoring_rule_json\030\005 \001(\t\"5\n\tRaceSce" +
"ne\"(\n\004Type\022\013\n\007Unknown\020\000\022\t\n\005Local\020\001\022\010\n\004Li" +
"nk\020\002B\033\n\031club.joylink.rtss.vo.raceb\006proto" +
"3"
"\n\025race/race_scene.proto\022\004race\032\030common/mo" +
"dify_info.proto\"\305\001\n\013RaceSceneVO\022\n\n\002id\030\001 " +
"\001(\003\022\014\n\004name\030\002 \001(\t\022\"\n\004type\030\003 \001(\0162\024.race.R" +
"aceScene.Type\022\022\n\nfunctionId\030\004 \001(\003\022\032\n\005sce" +
"ne\030\005 \001(\0132\013.race.Scene\022(\n\nmodifyInfo\030\006 \001(" +
"\0132\024.common.ModifyInfoVO\022\r\n\005mapId\030\007 \001(\003\022\017" +
"\n\007mapName\030\010 \001(\t\"\234\001\n\017RaceSceneListVO\022\n\n\002i" +
"d\030\001 \001(\003\022\014\n\004name\030\002 \001(\t\022\"\n\004type\030\003 \001(\0162\024.ra" +
"ce.RaceScene.Type\022\016\n\006map_id\030\004 \001(\003\022\020\n\010map" +
"_name\030\005 \001(\t\022)\n\013modify_info\030\006 \001(\0132\024.commo" +
"n.ModifyInfoVO\"3\n\022RaceScenePublishVO\022\017\n\007" +
"dafitid\030\001 \001(\003\022\014\n\004name\030\003 \001(\t\"I\n\005Scene\022\013\n\003" +
"url\030\001 \001(\t\0223\n\022storage_simulation\030\002 \001(\0132\027." +
"race.StorageSimulation\"\201\001\n\021StorageSimula" +
"tion\022\025\n\rbg_scene_json\030\001 \001(\t\022\021\n\tstep_json" +
"\030\002 \001(\t\022\023\n\013member_json\030\003 \001(\t\022\022\n\nplayer_id" +
"s\030\004 \003(\t\022\031\n\021scoring_rule_json\030\005 \001(\t\"5\n\tRa" +
"ceScene\"(\n\004Type\022\013\n\007Unknown\020\000\022\t\n\005Local\020\001\022" +
"\010\n\004Link\020\002B\033\n\031club.joylink.rtss.vo.raceb\006" +
"proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: race_season.proto
// source: race/race_season.proto
package club.joylink.rtss.vo.race;
@ -2495,16 +2495,16 @@ public final class RaceSeasonOuterClass {
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\021race_season.proto\022\004race\032\030common/modify" +
"_info.proto\"\210\001\n\014RaceSeasonVO\022\n\n\002id\030\001 \001(\003" +
"\022\014\n\004code\030\002 \001(\t\022%\n\005group\030\003 \001(\0162\026.race.Rac" +
"eSeason.Group\022\014\n\004term\030\004 \001(\t\022)\n\013modify_in" +
"fo\030\005 \001(\0132\024.common.ModifyInfoVO\"W\n\022RaceSe" +
"asonCreateVO\022\014\n\004code\030\001 \001(\t\022%\n\005group\030\002 \001(" +
"\0162\026.race.RaceSeason.Group\022\014\n\004term\030\003 \001(\t\"" +
"2\n\nRaceSeason\"$\n\005Group\022\013\n\007Unknown\020\000\022\006\n\002Z" +
"Z\020\001\022\006\n\002GZ\020\002B\033\n\031club.joylink.rtss.vo.race" +
"b\006proto3"
"\n\026race/race_season.proto\022\004race\032\030common/m" +
"odify_info.proto\"\210\001\n\014RaceSeasonVO\022\n\n\002id\030" +
"\001 \001(\003\022\014\n\004code\030\002 \001(\t\022%\n\005group\030\003 \001(\0162\026.rac" +
"e.RaceSeason.Group\022\014\n\004term\030\004 \001(\t\022)\n\013modi" +
"fy_info\030\005 \001(\0132\024.common.ModifyInfoVO\"W\n\022R" +
"aceSeasonCreateVO\022\014\n\004code\030\001 \001(\t\022%\n\005group" +
"\030\002 \001(\0162\026.race.RaceSeason.Group\022\014\n\004term\030\003" +
" \001(\t\"2\n\nRaceSeason\"$\n\005Group\022\013\n\007Unknown\020\000" +
"\022\006\n\002ZZ\020\001\022\006\n\002GZ\020\002B\033\n\031club.joylink.rtss.vo" +
".raceb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,

View File

@ -0,0 +1,20 @@
package club.joylink.rtss.vo.race;
import club.joylink.rtss.vo.paper.PaperTrainAnswerDetail;
import java.util.List;
import lombok.Data;
/**
* 赛题训练任务完成接口的参数
* <p>
* 目前仅支持有本地场景的任务
*/
@Data
public class RaceTaskFinishParamDTO {
private String simulationId;
/**
* 实训评分参数与完成实训接口的参数相同
*/
private List<PaperTrainAnswerDetail> scoreList;
}