|
@@ -108,37 +108,6 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
private String agencyId;
|
|
|
|
|
|
@Override
|
|
|
- public List<EvolutionAgencyVO> agencypoToVO(List<Optional<EvaluationAgencyPO>> optionalList) {
|
|
|
- List<EvolutionAgencyVO> evolutionAgencyVOS=optionalList.stream().map(evaluationAgencyPO -> {
|
|
|
- EvaluationAgency evaluationAgency = new EvaluationAgency();
|
|
|
- BeanUtils.copyProperties(evaluationAgencyPO, evaluationAgency);
|
|
|
- return new EvolutionAgencyVO(evaluationAgency);
|
|
|
- }).collect(Collectors.toList());
|
|
|
-
|
|
|
- return evolutionAgencyVOS;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<CrowdTaskVO> findMoreHotTasks() {
|
|
|
- List<CrowdTaskVO> moreHotTasks = taskDao.findMoreHotTasks().stream().map(crowdTestTaskPO->{
|
|
|
- CrowdTestTask task = new CrowdTestTask();
|
|
|
- BeanUtils.copyProperties(crowdTestTaskPO, task);
|
|
|
- return new CrowdTaskVO(task);
|
|
|
- }).collect(Collectors.toList());
|
|
|
- return moreHotTasks;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<CrowdTestProjectVO> findMoreHotProjects() {
|
|
|
- List<CrowdTestProjectVO> moreHotProjects = projectDao.findAll().stream().map(crowdTestProjectPO->{
|
|
|
- CrowdTestProject project = new CrowdTestProject();
|
|
|
- BeanUtils.copyProperties(crowdTestProjectPO, project);
|
|
|
- return new CrowdTestProjectVO(project);
|
|
|
- }).collect(Collectors.toList());
|
|
|
- return moreHotProjects;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
public EnterpriseAuthVO getEnterpriseAuthByUserId(Long userId) {
|
|
|
EnterpriseAuthentication enterpriseAuthentication = new EnterpriseAuthentication();
|
|
|
EnterpriseAuthenticationPO enterpriseAuthenticationPO = enterpriseAuthenticationDao.findByUserId(userId);
|
|
@@ -204,7 +173,6 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
EvolutionAgencyVO agencyVO = new EvolutionAgencyVO();
|
|
|
agencyVO.setName(agency.getEvaluationAgencyName());
|
|
|
agencyVO.setLogo(agency.getAgencyPhoto());
|
|
|
-
|
|
|
agencyVO.setTaskCount(rankInfo.getCount());
|
|
|
agencyVO.setId(agency.getId());
|
|
|
agencyVO.setUserId(agency.getUserId());
|
|
@@ -697,7 +665,7 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<EvolutionAgencyVO> renderAgencyList(){
|
|
|
+ public List<EvolutionAgencyVO> renderAgencyList() {
|
|
|
List<EvolutionAgencyVO> agencyList = new ArrayList<>();
|
|
|
EvaluationAgency agencyTemplate = evaluationAgencyRepo.findAgencyById(Long.parseLong(agencyId));
|
|
|
agencyDao.findAll().forEach(evaluationAgencyPO -> {
|
|
@@ -822,7 +790,6 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
userVO.setProvince(userPO.get().getProvince());
|
|
|
userVO.setCity(userPO.get().getCity());
|
|
|
userVO.setCounty(userPO.get().getCounty());
|
|
|
-// userVO.setDetailedAddress(userPO.get().getDetailedAddress());
|
|
|
userVO.setPersonalCompetence(userPO.get().getPersonalCompetence());
|
|
|
userDTO.setUserVO(userVO);
|
|
|
return userDTO;
|
|
@@ -955,6 +922,20 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
return technicalArticlesDTO;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public IndexInfoDTO getHotTesting() {
|
|
|
+ IndexInfoDTO indexInfoDTO = new IndexInfoDTO();
|
|
|
+ Pageable pageable = PageRequest.of(0, 10);
|
|
|
+ List<ApplicationTypeVO> applicationTypeRank = projectDao.findTotalCountOfApplicationType(pageable).stream().map(rankInfos -> {
|
|
|
+ ApplicationType applicationType = commonRepo.getApplicationTypeByAppCode(rankInfos.getCode());
|
|
|
+ ApplicationTypeVO applicationTypeVO = new ApplicationTypeVO(applicationType);
|
|
|
+ applicationTypeVO.setCount(rankInfos.getCount());
|
|
|
+ return applicationTypeVO;
|
|
|
+ }).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
+ indexInfoDTO.setApplicationTypeRank(applicationTypeRank);
|
|
|
+ return indexInfoDTO;
|
|
|
+ }
|
|
|
+
|
|
|
private ProjectOperationControl initProjectPermission(CrowdTestProject project, User user) {
|
|
|
ProjectOperationControl operationControl = new ProjectOperationControl();
|
|
|
if (user == null)
|