| | |
| | | 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为空!"); |