public IPage<ContractCodeRuleVo> listAll(ContractCodeRuleFindDto findDto, ContractCodeRuleSearchDto contractCodeRuleSearchDto) {
IPage<ContractCodeRuleVo> contractCodeRuleAll = contractCodeRuleMapper.findContractCodeRuleAll(findDto.toPage(), contractCodeRuleSearchDto);
List<ContractCodeRuleVo> records = contractCodeRuleAll.getRecords();
Set<String> collect = records.stream().map(ContractCodeRuleVo::getOperationManager).collect(Collectors.toSet());
Set<String> assigneeUser = records.stream().map(ContractCodeRuleVo::getAssigneeUserId).collect(Collectors.toSet());
ResponseBean<List<SysUserDictVo>> byUserIdList = userQueryFeignClient.findByUserIdList(collect);
Map<String, String> userMap = byUserIdList.getData().stream()
.collect(Collectors.toMap(SysUserDictVo::getUserId, SysUserDictVo::getName));
ResponseBean<List<SysUserDictVo>> assigneeUserList = userQueryFeignClient.findByUserIdList(assigneeUser);
Map<String, String> assigneeUserMap = assigneeUserList.getData().stream()
.collect(Collectors.toMap(SysUserDictVo::getUserId, SysUserDictVo::getName));
for (ContractCodeRuleVo contractCodeRuleVo : records) {
contractCodeRuleVo.setOperationManager(userMap.get(contractCodeRuleVo.getOperationManager()));
contractCodeRuleVo.setAssigneeUserName(assigneeUserMap.get(contractCodeRuleVo.getAssigneeUserId()));
}
return contractCodeRuleAll;
}