| | |
| | | if (!user.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())&&!user.getUserType().equals(UserTypeEnum.COMPANY_USER.getCode())&&!user.getUserType().equals(UserTypeEnum.COMPANY_ADMIN.getCode())){ |
| | | throw new ApiException("普通用户无法添加相关数据"); |
| | | } |
| | | ExStudent exStudent = exStudentMapper.selectStudentById(Long.valueOf(evaluate.getPersonId())); |
| | | if ( user.getDeptId()!=null){ |
| | | if ( user.getDeptId().equals(exStudent.getDeptId())) { |
| | | throw new ApiException("请勿选择本部门成员"); |
| | | } |
| | | } |
| | | // ExStudent exStudent = exStudentMapper.selectStudentById(Long.valueOf(evaluate.getPersonId())); |
| | | // if ( user.getDeptId()!=null){ |
| | | // if ( user.getDeptId().equals(exStudent.getDeptId())) { |
| | | // throw new ApiException("请勿选择本部门成员"); |
| | | // } |
| | | // } |
| | | evaluate.setCreateBy(SecurityUtils.getUsername()); |
| | | evaluate.setCreateTime(LocalDateTime.now()); |
| | | evaluateMapper.insert(evaluate); |