From a05311b864dab25e2dbef9ba0a4658d97ed96f12 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 16 Aug 2023 16:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A9=E6=95=88=E8=AF=84=E4=BB=B7-=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E8=AF=84=E4=BB=B7=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/performance/controller/AppAppraisalController.java | 6 +++--- .../pmapi/performance/manage/AppAppraisalManage.java | 12 +++++++----- .../pmapi/performance/manage/OrgSelfAppraisalManage.java | 2 ++ 3 files changed, 12 insertions(+), 8 deletions(-) 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 { } } + + } }