From db8242513644b246a30222663ef20e21f1e7c7ce Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期二, 10 六月 2025 09:55:46 +0800 Subject: [PATCH] init --- exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java index 15d920a..ff0174e 100644 --- a/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java +++ b/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java @@ -290,6 +290,31 @@ return trainRecordVOList; } + @Override + public List<ExStudent> selectStudentCheckAll(ExStudent student) { + SysUser currentUser= SecurityUtils.getLoginUser().getUser(); + if(!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())){ + student.setCompanyId(currentUser.getCompanyId()); + Map<String,Object> paramsMap=new HashMap<>(); + if(currentUser.getUserType().equals(UserTypeEnum.DEPART_USER.getCode())) {//部门级用户 + List<Long> workshopUserIds=userMapper.selectWorkshopUserIds(currentUser.getId()); + if(workshopUserIds==null){ + workshopUserIds=new ArrayList<>(); + } + workshopUserIds.add(currentUser.getId()); + paramsMap.put("createIds",workshopUserIds); + student.setParams(paramsMap); + }else if(currentUser.getUserType().equals(UserTypeEnum.WORKSHOP_USER.getCode())){//车间级用户 + List<Long> workshopUserIds=new ArrayList<>(); + workshopUserIds.add(currentUser.getId()); + workshopUserIds.add(currentUser.getParentId()); + paramsMap.put("createIds",workshopUserIds); + student.setParams(paramsMap); + } + } + return baseMapper.selectStudentList(student); + } + public ExStudent checkUserDataScope(Long studentId) { if(studentId==null){ throw new ApiException("学员id为空!"); -- Gitblit v1.9.2