Commit 4ecfe049 authored by chenzhao's avatar chenzhao

修改代码

parent 488294d7
......@@ -218,50 +218,6 @@ public class CheckServiceImpl implements ICheckService {
return new PageImpl<>(content, param, total);
}
content = checkMapper.getCheckInfoNew(param);
if (!CollectionUtils.isEmpty(content)) {
Set<String> userIds = Sets.newHashSet(Lists.transform(content, CheckInfoVo::getUserId));
Set<String> deptIds = Sets.newHashSet(Lists.transform(content, CheckInfoVo::getDepId));
deptIds.remove("");
deptIds.remove(null);
String joinUserId="";
for (String userId:userIds) {
if(!ObjectUtils.isEmpty(userId)){
joinUserId=joinUserId+userId+",";
}
}
// List<AgencyUserModel> userModels = remoteSecurityService.listUserByUserIds( toke, product, appKey,joinUserId);
Map<String, String> deptMap = new HashMap<String,String>();
// if(!CollectionUtils.isEmpty(deptIds)){
// List<LinkedHashMap> deptList = remoteSecurityService.listDepartmentByDeptIds( toke, product, appKey,Joiner.on(",").join(deptIds));
// //deptMap = deptList.stream().collect(Collectors.toMap(DepartmentModel::getSequenceNbr, DepartmentModel::getDepartmentName));
//
// for (int i = 0; i < deptList.size(); i++) {
// deptMap.put(deptList.get(i).get("sequenceNbr").toString(), deptList.get(i).get("departmentName").toString());
// }
//
//
// }
// Map<String,String> userModelMap = userModels.stream().collect(Collectors.toMap(AgencyUserModel::getUserId,AgencyUserModel::getRealName ,(k1,k2)->k2));
Map<String, String> deptMapNew= deptMap;
List<String> userNames = new ArrayList<>();
content.forEach(e -> {
userNames.clear();
List<String> userIds1 = Arrays.asList(e.getUserId().split(","));
for(String userId : userIds1){
FeignClientResult result = jcsFeignClient.selectById(userId);
Object result1 = result.getResult();
String personName = ((Map<String, Object>) result1).get("personName").toString();
userNames.add(personName);
}
userNames.remove(null);
e.setUserName(Joiner.on(",").join(userNames));
// e.setDepartmentName(deptMapNew.get(e.getDepId()));
});
}
return new PageImpl<>(content, param, total);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment