diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/AppAppraisalController.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/AppAppraisalController.java index ded57ee..3a2f660 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/AppAppraisalController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/AppAppraisalController.java @@ -48,10 +48,10 @@ public class AppAppraisalController { return appAppraisalManage.evaluatedList(planId,req); } - @GetMapping("/detail/{appId}") + @GetMapping("/detail/{planId}/{appId}") @ApiOperation("获取详情") - public AppAppraisalIndexDetailVO detail(@PathVariable Long appId){ - return appAppraisalManage.detail(appId); + public AppAppraisalIndexDetailVO detail(@PathVariable Long planId,@PathVariable Long appId){ + return appAppraisalManage.detail(planId,appId); } @PostMapping("/save") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/AppAppraisalManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/AppAppraisalManage.java index 1910309..1076adf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/AppAppraisalManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/AppAppraisalManage.java @@ -28,7 +28,6 @@ import com.ningdatech.pmapi.performance.model.dto.ProjectAppraisalDTO; import com.ningdatech.pmapi.performance.model.entity.*; import com.ningdatech.pmapi.performance.model.req.PerformanceAppraisalListReq; import com.ningdatech.pmapi.performance.service.*; -import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.sys.model.entity.Role; import com.ningdatech.pmapi.sys.service.IRoleService; import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; @@ -288,7 +287,7 @@ public class AppAppraisalManage { } - public AppAppraisalIndexDetailVO detail(Long appId) { + public AppAppraisalIndexDetailVO detail(Long planId, Long appId) { ProjectApplication projectApplication = projectApplicationService.getById(appId); VUtils.isTrue(Objects.isNull(projectApplication)).throwMessage("应用不存在!"); @@ -312,9 +311,10 @@ public class AppAppraisalManage { .orderBy(Boolean.TRUE,Boolean.TRUE,PerformanceAppraisalAppIndicator::getSort)); // 获取当前应用通用指标的的打分信息 Map commonScoreInfoMap = performanceAppraisalAppScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class) + .eq(PerformanceAppraisalAppScoreInfo::getAppraisalId,planId) .eq(PerformanceAppraisalAppScoreInfo::getApplicationId, appId) .eq(PerformanceAppraisalAppScoreInfo::getIndexType, AppIndexTypeEnum.COMMON.getCode())) - .stream().collect(Collectors.toMap(PerformanceAppraisalAppScoreInfo::getId, p -> p)); + .stream().collect(Collectors.toMap(PerformanceAppraisalAppScoreInfo::getIndexId, p -> p)); if (CollUtil.isNotEmpty(commonIndexList)) { List commonIndexDetails = commonIndexList.stream().map(i -> { AppIndexDetailVO vo = new AppIndexDetailVO(); @@ -335,9 +335,10 @@ public class AppAppraisalManage { .orderBy(Boolean.TRUE,Boolean.TRUE,PerformanceAppraisalAppIndicator::getSort)); // 获取当前应用辅助指标的的打分信息 Map auxScoreInfoMap = performanceAppraisalAppScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class) + .eq(PerformanceAppraisalAppScoreInfo::getAppraisalId,planId) .eq(PerformanceAppraisalAppScoreInfo::getApplicationId, appId) .eq(PerformanceAppraisalAppScoreInfo::getIndexType, AppIndexTypeEnum.AUX.getCode())) - .stream().collect(Collectors.toMap(PerformanceAppraisalAppScoreInfo::getId, p -> p)); + .stream().collect(Collectors.toMap(PerformanceAppraisalAppScoreInfo::getIndexId, p -> p)); if (CollUtil.isNotEmpty(auxIndexList)) { List auxIndexDetails = auxIndexList.stream().map(i -> { AppIndexDetailVO vo = new AppIndexDetailVO(); @@ -355,9 +356,10 @@ public class AppAppraisalManage { .eq(ProjectCoreBusinessIndicators::getApplicationId, appId)); // 获取当前应用业务指标的的打分信息 Map businessScoreInfoMap = performanceAppraisalAppScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalAppScoreInfo.class) + .eq(PerformanceAppraisalAppScoreInfo::getAppraisalId,planId) .eq(PerformanceAppraisalAppScoreInfo::getApplicationId, appId) .eq(PerformanceAppraisalAppScoreInfo::getIndexType, AppIndexTypeEnum.BUSINESS.getCode())) - .stream().collect(Collectors.toMap(PerformanceAppraisalAppScoreInfo::getId, p -> p)); + .stream().collect(Collectors.toMap(PerformanceAppraisalAppScoreInfo::getIndexId, p -> p)); if (CollUtil.isNotEmpty(coreBusinessIndicators)) { List businessIndexDetails = coreBusinessIndicators.stream().map(c -> { AppBusinessIndexDetailVO appBusinessIndexDetailVo = new AppBusinessIndexDetailVO(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/OrgSelfAppraisalManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/OrgSelfAppraisalManage.java index a0a0977..9df9352 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/OrgSelfAppraisalManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/OrgSelfAppraisalManage.java @@ -470,5 +470,7 @@ public class OrgSelfAppraisalManage { } } + + } }