|
@@ -347,11 +347,19 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
|
|
|
// 获取入驻品牌机构
|
|
|
List<ResidentAgency> allResidentAgency = commonRepo.getAllResidentAgency();
|
|
|
- List<EvaluationAgencyVO> agencyVOS = allResidentAgency.stream().map(residentAgency -> {
|
|
|
+ List<EvaluationAgencyVO> agencyVOS = new ArrayList<>();
|
|
|
+ List<EvaluationAgencyVO> agencyVOList = allResidentAgency.stream().map(residentAgency -> {
|
|
|
EvaluationAgency agency = evaluationAgencyRepo.findAgencyById(residentAgency.getAgencyId());
|
|
|
EvaluationAgencyVO evalutionAgencyVO = new EvaluationAgencyVO(agency);
|
|
|
return evalutionAgencyVO;
|
|
|
}).collect(Collectors.toList());
|
|
|
+ if (agencyVOList.size() > 12) {
|
|
|
+ for (int i = 0; i < 12; i++) {
|
|
|
+ agencyVOS.add(agencyVOList.get(i));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ agencyVOS = agencyVOList;
|
|
|
+ }
|
|
|
|
|
|
// 获取合作机构
|
|
|
// List<Partner> partnerList = commonRepo.getAllPartner();
|
|
@@ -454,10 +462,18 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
|
|
|
// 获取资源和工具
|
|
|
List<Resource> resourceList = commonRepo.getAllResource();
|
|
|
- List<ResourceVO> resourceVOS = resourceList.stream().map(resource -> {
|
|
|
+ List<ResourceVO> resourceVOS = new ArrayList<>();
|
|
|
+ List<ResourceVO> resourceVOList = resourceList.stream().map(resource -> {
|
|
|
ResourceVO resourceVO = new ResourceVO(resource);
|
|
|
return resourceVO;
|
|
|
}).collect(Collectors.toList());
|
|
|
+ if (resourceVOList.size() > 12) {
|
|
|
+ for (int i = 0; i < 12; i++) {
|
|
|
+ resourceVOS.add(resourceVOList.get(i));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ resourceVOS = resourceVOList;
|
|
|
+ }
|
|
|
|
|
|
indexInfoDTO.setApplicationTypeRank(applicationTypeRanks);
|
|
|
indexInfoDTO.setAgencyRank(agencyRanks);
|