|
@@ -1,5 +1,6 @@ |
|
|
package com.ningdatech.pmapi.user.service.impl; |
|
|
package com.ningdatech.pmapi.user.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
import com.ningdatech.basic.exception.BizException; |
|
@@ -15,10 +16,7 @@ import lombok.RequiredArgsConstructor; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -68,10 +66,13 @@ public class UserInfoServiceImpl extends ServiceImpl<NdUserInfoMapper, UserInfo> |
|
|
@Override |
|
|
@Override |
|
|
public Map<String, ProcessInstanceUserDto> getUserMapByEmployeeCode(Set<String> staterUsers) { |
|
|
public Map<String, ProcessInstanceUserDto> getUserMapByEmployeeCode(Set<String> staterUsers) { |
|
|
List<UserInfo> userInfos = userInfoMapper.selectList(Wrappers.lambdaQuery(UserInfo.class) |
|
|
List<UserInfo> userInfos = userInfoMapper.selectList(Wrappers.lambdaQuery(UserInfo.class) |
|
|
.eq(UserInfo::getEmployeeCode,staterUsers)); |
|
|
|
|
|
|
|
|
.in(UserInfo::getEmployeeCode,staterUsers)); |
|
|
|
|
|
if(CollUtil.isEmpty(userInfos)){ |
|
|
|
|
|
return Collections.emptyMap(); |
|
|
|
|
|
} |
|
|
return userInfos.stream().map(u -> { |
|
|
return userInfos.stream().map(u -> { |
|
|
ProcessInstanceUserDto userInfo = new ProcessInstanceUserDto(); |
|
|
ProcessInstanceUserDto userInfo = new ProcessInstanceUserDto(); |
|
|
userInfo.setUserId(String.valueOf(u.getId())); |
|
|
|
|
|
|
|
|
userInfo.setUserId(u.getEmployeeCode()); |
|
|
userInfo.setUserName(u.getRealName()); |
|
|
userInfo.setUserName(u.getRealName()); |
|
|
Long accountId = u.getAccountId(); |
|
|
Long accountId = u.getAccountId(); |
|
|
if (Objects.isNull(accountId)) { |
|
|
if (Objects.isNull(accountId)) { |
|
|