From b4f12282ac6c8b9f70a4901f04e69553d5f4065d Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Thu, 27 Jul 2023 19:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=BA=E8=AE=BE=E6=96=B9=E6=A1=88=E7=94=B3?= =?UTF-8?q?=E6=8A=A5=E5=BA=94=E7=94=A8=E4=BF=A1=E6=81=AF=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IndicatorConfigController.java | 11 ++++++++--- .../performance/manage/IndicatorConfigManage.java | 9 ++++++--- .../model/req/PerformanceAppraisalListReq.java | 6 ++++++ .../pmapi/projectlib/manage/ProjectLibManage.java | 21 +++++++++++++-------- .../pmapi/todocenter/manage/TodoCenterManage.java | 6 ++++-- 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/IndicatorConfigController.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/IndicatorConfigController.java index 24bdad3..22a77da 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/IndicatorConfigController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/IndicatorConfigController.java @@ -12,7 +12,6 @@ import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; -import java.util.List; /** * 绩效评价-指标配置 @@ -30,8 +29,8 @@ public class IndicatorConfigController { @GetMapping("/project/index/template/list") @ApiOperation("项目指标模板列表") - public PageVo projectList(PerformanceAppraisalListReq req) { - return indicatorConfigManage.projectList(req); + public PageVo projectIndexTemplateList(PerformanceAppraisalListReq req) { + return indicatorConfigManage.projectIndexTemplateList(req); } @GetMapping("/project/index/template/detail/{id}") @@ -68,4 +67,10 @@ public class IndicatorConfigController { public String projectTemplateDelete(@PathVariable Long id) { return indicatorConfigManage.projectTemplateDelete(id); } + + @GetMapping("/project/index/list") + @ApiOperation("项目指标库列表") + public PageVo projectIndexList(PerformanceAppraisalListReq req) { + return indicatorConfigManage.projectIndexList(req); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java index 98b32b5..691ecf6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java @@ -11,7 +11,6 @@ import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.enumeration.CommonEnum; -import com.ningdatech.pmapi.performance.enumration.PerformanceTemplateStageNameEnum; import com.ningdatech.pmapi.performance.enumration.PerformanceTemplateTypeEnum; import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorProjectTemplateSaveDTO; import com.ningdatech.pmapi.performance.model.dto.ProjectTemplateDetailDTO; @@ -24,7 +23,6 @@ import com.ningdatech.pmapi.performance.service.IPerformanceIndicatorProjectTemp import com.ningdatech.pmapi.performance.service.IPerformanceIndicatorProjectTemplateService; import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; import com.ningdatech.pmapi.user.util.LoginUserUtil; -import com.wflow.bean.entity.WflowModels; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -57,7 +55,7 @@ public class IndicatorConfigManage { * @param req * @return */ - public PageVo projectList(PerformanceAppraisalListReq req) { + public PageVo projectIndexTemplateList(PerformanceAppraisalListReq req) { Page page = req.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplate.class) .like(StringUtils.isNotBlank(req.getTemplateName()), PerformanceIndicatorProjectTemplate::getName, req.getTemplateName()) @@ -345,4 +343,9 @@ public class IndicatorConfigManage { } return "模版复制失败"; } + + public PageVo projectIndexList(PerformanceAppraisalListReq req) { + + return null; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/req/PerformanceAppraisalListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/req/PerformanceAppraisalListReq.java index 5e81877..08ff060 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/req/PerformanceAppraisalListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/req/PerformanceAppraisalListReq.java @@ -33,4 +33,10 @@ public class PerformanceAppraisalListReq extends PagePo { @ApiModelProperty("区域code") private String regionCode; + + @ApiModelProperty("指标名称") + private String indexName; + + @ApiModelProperty("指标类型 1一级指标 2二级指标 3三级指标") + private Integer type; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index f7546b3..9e5edfa 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -365,10 +365,12 @@ public class ProjectLibManage { .eq(ProjectApplication::getProjectCode, project.getProjectCode()) .eq(ProjectApplication::getProjectVersion, project.getVersion()) .eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); - projectApplicationService.removeBatchByIds(applications); - List applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList()); - projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) - .in(ProjectCoreBusinessIndicators::getApplicationId,applicationIds)); + if (CollUtil.isNotEmpty(applications)) { + projectApplicationService.removeBatchByIds(applications); + List applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList()); + projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) + .in(ProjectCoreBusinessIndicators::getApplicationId,applicationIds)); + } if (isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())) { Project finalProject = project; @@ -508,10 +510,13 @@ public class ProjectLibManage { .in(CollUtil.isNotEmpty(projectCodeList), ProjectApplication::getProjectCode, projectCodeList) .eq(ProjectApplication::getProjectVersion, project.getVersion()) .eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); - projectApplicationService.removeBatchByIds(applications); - List applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList()); - projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) - .in(ProjectCoreBusinessIndicators::getApplicationId,applicationIds)); + if (CollUtil.isNotEmpty(applications)) { + projectApplicationService.removeBatchByIds(applications); + List applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList()); + projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) + .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds)); + } + //app List applicationList = projecDto.getApplicationList(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index e0380d2..802ef20 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -1130,10 +1130,12 @@ public class TodoCenterManage { .eq(ProjectApplication::getProjectCode, project.getProjectCode()) .eq(ProjectApplication::getProjectVersion, project.getVersion()) .eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); - projectApplicationService.removeBatchByIds(applicationList); - List applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList()); + if (CollUtil.isNotEmpty(applicationList)) { + projectApplicationService.removeBatchByIds(applicationList); + List applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList()); // projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) // .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds)); + } List applications = projectDto.getApplicationList(); if (isApp && CollUtil.isNotEmpty(applications)) {