Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/rtss-server into test1
This commit is contained in:
commit
02078eb039
@ -4,6 +4,7 @@ import club.joylink.rtss.constants.BusinessConsts;
|
||||
import club.joylink.rtss.dao.*;
|
||||
import club.joylink.rtss.entity.*;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.simulation.cbtc.GroupSimulationService;
|
||||
import club.joylink.rtss.vo.UserVO;
|
||||
import club.joylink.rtss.vo.client.*;
|
||||
import club.joylink.rtss.vo.client.company.DepartmentVO;
|
||||
@ -60,6 +61,9 @@ public class ExamService implements IExamService{
|
||||
@Autowired
|
||||
private IMapService iMapService;
|
||||
|
||||
@Autowired
|
||||
private GroupSimulationService groupSimulationService;
|
||||
|
||||
/**
|
||||
* 创建考试定义
|
||||
*/
|
||||
@ -330,10 +334,10 @@ public class ExamService implements IExamService{
|
||||
});
|
||||
examsLessonVO.setExamDefinitionList(examDefinitionVOList);
|
||||
// 设置权限
|
||||
// List<UserPermissionVO> voList = userPermissionService.findTeachVOByMapIdAndUserId(lessonVO.getMapId(), userVO.getId());
|
||||
List<UserPermissionVO> examPermissions = this.iUserPermissionService.getExamUserPermission(userVO,
|
||||
lessonVO.getMapId(), lessonVO.getPrdType(), lessonId);
|
||||
examsLessonVO.setPermissionList(examPermissions);
|
||||
examsLessonVO.setAvailable(groupSimulationService.hasPermission(userVO, lessonVO.getMapId(), lessonVO.getPrdType()));
|
||||
// List<UserPermissionVO> examPermissions = this.iUserPermissionService.getExamUserPermission(userVO,
|
||||
// lessonVO.getMapId(), lessonVO.getPrdType(), lessonId);
|
||||
// examsLessonVO.setPermissionList(examPermissions);
|
||||
return examsLessonVO;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class LessonService implements ILessonService {
|
||||
trainingVOList = iTrainingV1Service.queryByIds(trainingIds);
|
||||
}
|
||||
// 查询权限
|
||||
boolean valid = groupSimulationService.hasPermission(userVO, lessonVO.getMapId(), null);
|
||||
boolean valid = groupSimulationService.hasPermission(userVO, lessonVO.getMapId(), lessonVO.getPrdType());
|
||||
// 生成tree
|
||||
lessonTreeVO.setTree(TreeNode.buildValidLessonTrainingTree(lessonVO, chapterVOList, trainingVOList, relVOList, valid));
|
||||
// lessonTreeVO.setPermissionList(permissionVOList);
|
||||
|
@ -75,6 +75,9 @@ public class ExamsLessonVO {
|
||||
|
||||
private boolean systemFault;
|
||||
|
||||
/** 用户是否有权使用改考试 */
|
||||
private boolean available;
|
||||
|
||||
public ExamsLessonVO(LessonVO lessonVO) {
|
||||
this.id = lessonVO.getId();
|
||||
this.name = lessonVO.getName();
|
||||
|
Loading…
Reference in New Issue
Block a user