|
@@ -108,9 +108,10 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
return null;
|
|
|
}).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
//获取机构排名
|
|
|
+ String agencyName = agencyDao.findById(Long.parseLong(agencyId)).get().getEvaluationAgencyName();
|
|
|
List<EvolutionAgencyVO> agencyRanks = taskToUserDao.findTotalPriceOfAgency(pageable).stream().map(rankInfo -> {
|
|
|
EvaluationAgencyPO agency = agencyDao.findByUserId(rankInfo.getEntityId());
|
|
|
- if (agency!=null) {
|
|
|
+ if (agency!=null && !agency.getEvaluationAgencyName().equals(agencyName)) {
|
|
|
EvolutionAgencyVO agencyVO = new EvolutionAgencyVO();
|
|
|
agencyVO.setName(agency.getEvaluationAgencyName());
|
|
|
agencyVO.setLogo(agency.getAgencyPhoto());
|
|
@@ -189,9 +190,9 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
//定向
|
|
|
List<CrowdTestProjectPO> acceptableProject = crowdTestProjectPOList.stream().filter(crowdTestProjectPO -> crowdTestProjectPO.getStatus()==CrowdTestProjectStatus.HAS_RELEASED).collect(Collectors.toList());
|
|
|
//广场的
|
|
|
- acceptableProject.addAll(projectDao.findAllByStatusLessThanAndProjectDistributionTypeId(CrowdTestProjectStatus.HAS_RECEIVED, 2L));
|
|
|
+ acceptableProject.addAll(projectDao.findAllByStatusLessThanAndProjectDistributionTypeIdAndIsDeletedAndUserIdIsNot(CrowdTestProjectStatus.HAS_RECEIVED, 2L,DeletedStatus.isNotDeleted, userId));
|
|
|
//区域的
|
|
|
- acceptableProject.addAll(projectDao.findByStatusLessThanAndProjectDistributionTypeId(CrowdTestProjectStatus.HAS_RECEIVED, 1L)
|
|
|
+ acceptableProject.addAll(projectDao.findByStatusLessThanAndProjectDistributionTypeIdAndIsDeletedAndUserIdIsNot(CrowdTestProjectStatus.HAS_RECEIVED, 1L,DeletedStatus.isNotDeleted, userId)
|
|
|
.stream().filter(crowdTestProjectPO -> user.getRegionalManager().getRegionalList().stream()
|
|
|
.anyMatch(reg -> (reg.getProvince().equals("*") || reg.getProvince().equals(crowdTestProjectPO.getDistributionProvince())) && (reg.getCity().equals("*")||reg.getCity().equals(crowdTestProjectPO.getDistributionCity())))).collect(Collectors.toList()));
|
|
|
myCrowdDTO.setAcceptableProjects(acceptableProject.stream().sorted(Comparator.comparing(CrowdTestProjectPO::getCreateTime).thenComparing(CrowdTestProjectPO::getStatus).reversed())
|
|
@@ -535,12 +536,14 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
if (project.getUserId().equals(user.getId())||user.getRoleList().stream().anyMatch(role -> role.getName().equals("SystemAdministrator"))){
|
|
|
if (project.getStatus() < CrowdTestProjectStatus.HAS_RECEIVED){
|
|
|
operationControl.setUpdate(true);
|
|
|
+ operationControl.setReceive(false);
|
|
|
} else if (project.getStatus() == CrowdTestProjectStatus.HAS_COMMITED){
|
|
|
operationControl.setConfirmFinish(true);
|
|
|
}
|
|
|
}
|
|
|
//区域管理员视角
|
|
|
- if (user.getRoleList().stream().anyMatch(role -> role.getName().equals("RegionalManager"))){
|
|
|
+ else if (user.getRoleList().stream().anyMatch(role -> role.getName().equals("RegionalManager"))){
|
|
|
+ operationControl.setUpdate(false);
|
|
|
if ((project.getProjectDistributionTypeId() == 0 && project.getRegionalManagerId().equals(user.getId()))
|
|
|
|| (project.getProjectDistributionTypeId()>0 && project.getStatus()>=CrowdTestProjectStatus.HAS_RECEIVED && project.getRegionalManagerId().equals(user.getId()))){
|
|
|
if (project.getStatus() == CrowdTestProjectStatus.HAS_RELEASED){
|