diff --git a/sql/20230206-zhou.sql b/sql/20230206-zhou.sql new file mode 100644 index 000000000..41a5d78e4 --- /dev/null +++ b/sql/20230206-zhou.sql @@ -0,0 +1,12 @@ +-- 用户答题生成对应的规则id +ALTER TABLE `rts_paper_user_question` + ADD COLUMN `rule_id` bigint not NULL COMMENT '试卷规则rts_paper_rule的id' AFTER `pu_id`; + + +ALTER TABLE `rts_paper_user_question` + ADD COLUMN `sub_type` bigint not NULL COMMENT '规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)' AFTER `type`; + + +ALTER TABLE `rts_paper_user_question` MODIFY COLUMN tmp_answer VARCHAR(1000); + + diff --git a/src/main/java/club/joylink/rtss/controller/permission2/DistributeController.java b/src/main/java/club/joylink/rtss/controller/permission2/DistributeController.java index 8a2f3d597..93c329828 100644 --- a/src/main/java/club/joylink/rtss/controller/permission2/DistributeController.java +++ b/src/main/java/club/joylink/rtss/controller/permission2/DistributeController.java @@ -62,7 +62,7 @@ public class DistributeController { * 从权限分发,直接分发给指定主体 * * @param pdId 权限分发id - * @param subjectType 主体类型,其值为(user,org),user-一般用户,org-组织 + * @param subjectType 主体类型,其值为(user,org,project),user-一般用户,org-组织,project - 项目 * */ @PostMapping("/{pdId}/to/{subjectType}/{subjectId}") diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationTrainingV2Controller.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationTrainingV2Controller.java index 39cfb6b1a..1a5b0f1e3 100644 --- a/src/main/java/club/joylink/rtss/controller/simulation/SimulationTrainingV2Controller.java +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationTrainingV2Controller.java @@ -6,6 +6,7 @@ import club.joylink.rtss.simulation.cbtc.script.ScriptBO; import club.joylink.rtss.vo.AccountVO; import club.joylink.rtss.vo.LoginUserInfoVO; import club.joylink.rtss.vo.client.training2.ScoringRuleVO; +import club.joylink.rtss.vo.paper.PaperTrainAnswerDetail; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -69,7 +70,7 @@ public class SimulationTrainingV2Controller { * 结束实训 */ @PutMapping("/{group}/finish") - public Float finishTraining2(@PathVariable String group, @RequestAttribute AccountVO user, @RequestBody List scoreList) { + public Double finishTraining2(@PathVariable String group, @RequestAttribute AccountVO user, @RequestBody List scoreList) { return training2Service.finishTraining2(group, user, scoreList); } diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java index 960f95795..33ce307fc 100644 --- a/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java @@ -511,12 +511,13 @@ public class SimulationV1Controller { /** * 仿真创建接口(新) */ + /*@Deprecated @PostMapping("/new/{mapId}") public String createSimulation(@PathVariable long mapId, @RequestBody @Validated SimulationWorkParamVO paramVO, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) { return simulationService.createSimulation(mapId, null, paramVO, loginUserInfoVO); - } + }*/ /** * 根据地图功能id创建仿真 diff --git a/src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java b/src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java index 6ca708e04..f999e90f9 100644 --- a/src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java +++ b/src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java @@ -21,7 +21,7 @@ public interface PermissionSubjectDAO { "(case when A.subject_type = 'user' then B.nickname else '' end) as nick_name," + "(case when A.subject_type = 'project' then E.code else '' end ) as project_code,"+ " A.amount,A.remains,A.status,A.forever,A.start_time,A.end_time,A.create_time," + - " D.name as permission_name,A.permission_id,A.distribute_id,D.map_id,D.project_code,D.map_id,D.permission_type " + + " D.name as permission_name,A.permission_id,A.distribute_id,D.map_id,D.project_code,D.permission_type " + " from rts_permission_subject A left join sys_account B on A.subject_type = 'user' and A.subject_id = B.id " + " left join org C on A.subject_type = 'org' and A.subject_id = C.id " + " left join rts_project E on A.subject_type = 'project' and A.subject_id = E.id " + @@ -34,7 +34,7 @@ public interface PermissionSubjectDAO { " and (C.id = #{orgId} or B.id = #{userId} or E.code = #{projectCode}) " + " and A.status = #{status}" + "") - List findPermissionWithMapIdAndUserInfo(/*@Param("mapId") Long mapId,*/@Param("orgId") Long orgId,@Param("userId") Long userId,@Param("status") Integer status,@Param("projectCode") String projectCode); + List findPermissionWithMapIdAndUserInfo(/*@Param("mapId") Long mapId,*/@Param("orgId") Long orgId,@Param("userId") Long userId,@Param("status") Integer status,@Param("projectCode") String projectCode); @Select("") + List selectByDistributeIdAndPermissionId(@Param("list") List refList);*/ + @Select("