| | |
| | | import com.qianwen.core.tool.utils.SpringUtil; |
| | | import com.qianwen.smartman.modules.cps.convert.EmployeeConvert; |
| | | import com.qianwen.smartman.modules.cps.dto.EmployeeDTO; |
| | | import com.qianwen.smartman.modules.cps.entity.CommonGroup; |
| | | import com.qianwen.smartman.modules.cps.service.ICommonGroupService; |
| | | import com.qianwen.smartman.modules.cps.vo.EmployeeDetailVO; |
| | | import com.qianwen.smartman.modules.system.entity.User; |
| | |
| | | employeeDetailVO.setPostName(Func.join(postName)); |
| | | employeeDetailVO.setAccount(Func.isNotEmpty(user) ? user.getAccount() : null); |
| | | employeeDetailVO.setRoleName(Func.join(roleName)); |
| | | |
| | | employeeDetailVO.setOrganizationName( |
| | | Optional.<String>ofNullable(employeeDetailVO.getOrganizationId()) |
| | | .map(orgid -> { |
| | | ICommonGroupService groupService = SpringUtil.getBean(ICommonGroupService.class); |
| | | return groupService.getById(orgid); |
| | | //return null; |
| | | }) |
| | | .map(CommonGroup::getName) |
| | | .orElse(null) |
| | | ); |
| | | /* |
| | | Optional ofNullable = Optional.ofNullable(employeeDetailVO.getOrganizationId()); |
| | | ICommonGroupService iCommonGroupService = (ICommonGroupService) SpringUtil.getBean(ICommonGroupService.class); |
| | | iCommonGroupService.getClass(); |
| | |
| | | }).map((v0) -> { |
| | | return v0.getName(); |
| | | }).orElse(null)); |
| | | */ |
| | | |
| | | return employeeDetailVO; |
| | | } |
| | | } |