|
|
@@ -1,14 +1,25 @@ |
|
|
|
package com.ningdatech.pmapi.user.manage; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; |
|
|
|
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService; |
|
|
|
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; |
|
|
|
import com.ningdatech.pmapi.user.model.po.ReqUserDetailEditPO; |
|
|
|
import com.ningdatech.pmapi.user.model.po.ReqUserDisablePO; |
|
|
|
import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; |
|
|
|
import com.ningdatech.pmapi.user.model.vo.ResUserDetailVO; |
|
|
|
import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; |
|
|
|
import com.ningdatech.pmapi.user.service.IUserInfoService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author liuxinxin |
|
|
|
* @date 2023/2/13 上午9:09 |
|
|
@@ -17,12 +28,47 @@ import org.springframework.stereotype.Component; |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class UserInfoManage { |
|
|
|
|
|
|
|
private final IDingOrganizationService iDingOrganizationService; |
|
|
|
private final IDingEmployeeInfoService iDingEmployeeInfoService; |
|
|
|
private final IUserInfoService iUserInfoService; |
|
|
|
|
|
|
|
public PageVo<ResUserInfoListVO> list(ReqUserInfoListPO reqUserInfoListPO) { |
|
|
|
LambdaQueryWrapper<DingEmployeeInfo> wrapper = Wrappers.lambdaQuery(DingEmployeeInfo.class) |
|
|
|
.eq(DingEmployeeInfo::getMainJob, "true"); |
|
|
|
|
|
|
|
return null; |
|
|
|
Page<DingEmployeeInfo> page = iDingEmployeeInfoService.page(new Page<>(reqUserInfoListPO.getPageNumber(), reqUserInfoListPO.getPageSize()), wrapper); |
|
|
|
List<DingEmployeeInfo> records = page.getRecords(); |
|
|
|
long total = page.getTotal(); |
|
|
|
List<ResUserInfoListVO> resUserInfoListVOList = new ArrayList<>(); |
|
|
|
if (records != null && records.size() > 0) { |
|
|
|
resUserInfoListVOList = records.stream() |
|
|
|
.map(r -> { |
|
|
|
ResUserInfoListVO resListVO = new ResUserInfoListVO(); |
|
|
|
resListVO.setName(r.getEmployeeName()); |
|
|
|
resListVO.setOrgName(r.getOrganizationCode()); |
|
|
|
resListVO.setOrgCode(r.getOrganizationCode()); |
|
|
|
// TODO 从用户信息中获取 |
|
|
|
// resListVO.setPhoneNo(); |
|
|
|
// 从所属组织中获取 |
|
|
|
// resListVO.setRegionId(); |
|
|
|
resListVO.setStatus(false); |
|
|
|
resListVO.setUpdateTime(r.getUpdateOn()); |
|
|
|
// 从用户信息中获取 |
|
|
|
resListVO.setUserId(1L); |
|
|
|
resListVO.setEmployeeCode(r.getEmployeeCode()); |
|
|
|
resListVO.setUserRoleList(new ArrayList<>()); |
|
|
|
return resListVO; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
PageVo<ResUserInfoListVO> pageVo = new PageVo<>(); |
|
|
|
pageVo.setTotal(total); |
|
|
|
pageVo.setRecords(resUserInfoListVOList); |
|
|
|
return pageVo; |
|
|
|
} |
|
|
|
|
|
|
|
public void disable(ReqUserDisablePO reqUserDisablePO) { |
|
|
|
public void disableOrEnable(ReqUserDisablePO reqUserDisablePO) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|