|
|
|
@ -81,27 +81,27 @@ public class BsEpciuPatrolInspectionServiceImpl extends BaseServiceImpl<BsEpciuP |
|
|
|
IPage<BsEpciuPatrolInspectionVO> bsEpciuPatrolInspectionVOIPage = |
|
|
|
IPage<BsEpciuPatrolInspectionVO> bsEpciuPatrolInspectionVOIPage = |
|
|
|
page.setRecords(baseMapper.selectBsEpciuPatrolInspectionPage(page, bsEpciuPatrolInspection)); |
|
|
|
page.setRecords(baseMapper.selectBsEpciuPatrolInspectionPage(page, bsEpciuPatrolInspection)); |
|
|
|
|
|
|
|
|
|
|
|
Set<String> manIds = |
|
|
|
//Set<String> manIds =
|
|
|
|
bsEpciuPatrolInspectionVOIPage.getRecords().stream().map(BsEpciuPatrolInspectionVO::getInsMan).collect(Collectors.toSet()); |
|
|
|
// bsEpciuPatrolInspectionVOIPage.getRecords().stream().map(BsEpciuPatrolInspectionVO::getInsMan).collect(Collectors.toSet());
|
|
|
|
if (CollUtil.isNotEmpty(manIds)) { |
|
|
|
//if (CollUtil.isNotEmpty(manIds)) {
|
|
|
|
String userId = Func.toStr(manIds); |
|
|
|
// String userId = Func.toStr(manIds);
|
|
|
|
List<User> users = new ArrayList<>(); |
|
|
|
// List<User> users = new ArrayList<>();
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
users = userClient.userUNListByIds(userId); |
|
|
|
// users = userClient.userUNListByIds(userId);
|
|
|
|
} catch (Exception e) { |
|
|
|
// } catch (Exception e) {
|
|
|
|
e.printStackTrace(); |
|
|
|
// e.printStackTrace();
|
|
|
|
return bsEpciuPatrolInspectionVOIPage; |
|
|
|
// return bsEpciuPatrolInspectionVOIPage;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
if (CollUtil.isEmpty( users)){ |
|
|
|
// if (CollUtil.isEmpty( users)){
|
|
|
|
return bsEpciuPatrolInspectionVOIPage; |
|
|
|
// return bsEpciuPatrolInspectionVOIPage;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
Map<String, String> userMap = users.stream().collect(Collectors.toMap(s -> s.getId().toString(), User::getName)); |
|
|
|
// Map<String, String> userMap = users.stream().collect(Collectors.toMap(s -> s.getId().toString(), User::getName));
|
|
|
|
bsEpciuPatrolInspectionVOIPage.getRecords().forEach(bsEpciuPatrolInspectionVO -> { |
|
|
|
// bsEpciuPatrolInspectionVOIPage.getRecords().forEach(bsEpciuPatrolInspectionVO -> {
|
|
|
|
bsEpciuPatrolInspectionVO.setInsMan(userMap.getOrDefault(bsEpciuPatrolInspectionVO.getInsMan(),bsEpciuPatrolInspectionVO.getInsMan())); |
|
|
|
// bsEpciuPatrolInspectionVO.setInsMan(userMap.getOrDefault(bsEpciuPatrolInspectionVO.getInsMan(),bsEpciuPatrolInspectionVO.getInsMan()));
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
} |
|
|
|
//}
|
|
|
|
return bsEpciuPatrolInspectionVOIPage; |
|
|
|
return bsEpciuPatrolInspectionVOIPage; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|