|
@@ -1,6 +1,7 @@
|
|
|
package com.jeeplus.human.enrollment.enrollmentRegistration.service;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.TypeReference;
|
|
@@ -80,6 +81,9 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
if (StringUtils.isNotBlank(projectReportData.getDepartment())) {
|
|
|
queryWrapper.eq("a.department",projectReportData.getDepartment());
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(projectReportData.getCompanyId())) {
|
|
|
+ queryWrapper.eq("so.parent_id",projectReportData.getCompanyId());
|
|
|
+ }
|
|
|
IPage<EnrollmentRegistration> list = mapper.findList(page, queryWrapper);
|
|
|
return list;
|
|
|
|
|
@@ -471,23 +475,26 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
// 查询基础信息表
|
|
|
EnrollmentRegistration info = mapper.getById(id);
|
|
|
//根据用户查询岗位和角色信息
|
|
|
- UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(info.getUserId());
|
|
|
- ArrayList<String> roles = new ArrayList<>();
|
|
|
- ArrayList<String> posts = new ArrayList<>();
|
|
|
- if (userDTO != null){
|
|
|
- if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
|
|
|
- for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
|
|
|
- roles.add(roleDTO.getId());
|
|
|
+ if (ObjectUtil.isNotEmpty(info)){
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(info.getUserId());
|
|
|
+ ArrayList<String> roles = new ArrayList<>();
|
|
|
+ ArrayList<String> posts = new ArrayList<>();
|
|
|
+ if (userDTO != null){
|
|
|
+ if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
|
|
|
+ for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
|
|
|
+ roles.add(roleDTO.getId());
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if (CollectionUtil.isNotEmpty(userDTO.getPostDTOList())){
|
|
|
- for (PostDTO postDTO : userDTO.getPostDTOList()) {
|
|
|
- posts.add(postDTO.getId());
|
|
|
+ if (CollectionUtil.isNotEmpty(userDTO.getPostDTOList())){
|
|
|
+ for (PostDTO postDTO : userDTO.getPostDTOList()) {
|
|
|
+ posts.add(postDTO.getId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ info.setRoleIdList(roles);
|
|
|
+ info.setPostIdList(posts);
|
|
|
}
|
|
|
- info.setRoleIdList(roles);
|
|
|
- info.setPostIdList(posts);
|
|
|
+
|
|
|
return info;
|
|
|
}
|
|
|
|