|
@@ -125,7 +125,6 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
userVO.setTaskCount(rankCountInfos.get(i).getCount());
|
|
|
userVOS.add(userVO);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
return userVOS;
|
|
|
}
|
|
@@ -336,7 +335,6 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
|
|
|
@Override
|
|
|
public IndexDTO renderIndex() {
|
|
|
-
|
|
|
Pageable pageable = PageRequest.of(0, 10);
|
|
|
//获取用户排名
|
|
|
List<UserVO> userRanks = projectDao.findTotalPriceOfUser(pageable).stream().map(rankInfo -> {
|
|
@@ -642,15 +640,24 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ReportDetailsDTO renderProjectReportDetails(String projectCode, String reportCode, Long userId) {
|
|
|
+ public ReportDetailsDTO renderProjectReportDetails(String projectCode, String reportCode, Long userId){
|
|
|
CrowdTestProject project = projectRepo.getByProjectCode(projectCode);
|
|
|
CrowdTestReport report = project.getCrowdTestReportForProject();
|
|
|
if (report == null)
|
|
|
throw new CrowdTestReportNotExistException();
|
|
|
ReportDetailsDTO reportDetailsDTO = new ReportDetailsDTO();
|
|
|
+ /*
|
|
|
+ 如果该项目是已经完成的那么报告是不能修改的这边我在Vo上面加了一个属性Updated
|
|
|
+ */
|
|
|
+ if (project.getStatus() == CrowdTestProjectStatus.HAS_FINISHED){
|
|
|
+ report.setUpdated(false);
|
|
|
+ }
|
|
|
reportDetailsDTO.setCrowdReportVO(new CrowdReportVO(report));
|
|
|
- if (project.getStatus() < CrowdTestProjectStatus.HAS_FINISHED && project.getRegionalManagerId().equals(userId))
|
|
|
+
|
|
|
+ if (project.getStatus() < CrowdTestProjectStatus.HAS_FINISHED && project.getRegionalManagerId().equals(userId)) {
|
|
|
reportDetailsDTO.setOperational(true);
|
|
|
+
|
|
|
+ }
|
|
|
return reportDetailsDTO;
|
|
|
}
|
|
|
|