|
|
@ -1186,8 +1186,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
if (CollectionUtils.isEmpty(configListResult.getData())){ |
|
|
|
return result; |
|
|
|
} |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> configList = configListResult.getData(); |
|
|
|
PageInfo<Map<String, Object>> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectResiUsers(configList.stream().map(m -> m.getColumnName()).collect(Collectors.toList()), staffInfo.getAgencyId())); |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> configListOrigin = configListResult.getData(); |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> configList = new ArrayList<>(); |
|
|
|
if (StringUtils.isNotBlank(formDTO.getCategoryCode())){ |
|
|
|
for (CustomerCategoryShowAndWarnListResultDTO c : configListOrigin) { |
|
|
|
if (c.getColumnName().equals(formDTO.getCategoryCode())){ |
|
|
|
configList.add(c); |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
configList = configListOrigin; |
|
|
|
} |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> finalConfigList = configList; |
|
|
|
PageInfo<Map<String, Object>> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectResiUsers(finalConfigList.stream().map(m -> m.getColumnName()).collect(Collectors.toList()), staffInfo.getAgencyId())); |
|
|
|
List<Map<String, Object>> list = pageInfo.getList(); |
|
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
return result; |
|
|
@ -1200,7 +1211,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
List<HouseInfoDTO> houseInfos = houseInfosResult.getData(); |
|
|
|
userList.forEach(u -> houseInfos.stream().filter(h -> h.getHomeId().equals(u.getHomeId())).forEach(h -> u.setFamily(h.getAllName()))); |
|
|
|
result.setList(userList); |
|
|
|
// 类型+网格+家庭 排序
|
|
|
|
userList.forEach(u -> { |
|
|
|
String types = u.getType().stream().map(String::valueOf).collect(Collectors.joining("、")); |
|
|
|
String s = types + u.getGridName() + u.getFamily(); |
|
|
|
u.setSortString(s); |
|
|
|
}); |
|
|
|
List<PersonWarnRightListResultDTO.PersonWarnRightList> finalResult = userList.stream().sorted(Comparator.comparing(PersonWarnRightListResultDTO.PersonWarnRightList::getSortString)).collect(Collectors.toList()); |
|
|
|
result.setList(finalResult); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|