Browse Source

建设方案申报应用信息判空

master
CMM 1 year ago
parent
commit
b4f12282ac
5 changed files with 37 additions and 16 deletions
  1. +8
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/IndicatorConfigController.java
  2. +6
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java
  3. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/model/req/PerformanceAppraisalListReq.java
  4. +13
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  5. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 8
- 3
pmapi/src/main/java/com/ningdatech/pmapi/performance/controller/IndicatorConfigController.java View File

@@ -12,7 +12,6 @@ import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


import javax.validation.Valid; import javax.validation.Valid;
import java.util.List;


/** /**
* 绩效评价-指标配置 * 绩效评价-指标配置
@@ -30,8 +29,8 @@ public class IndicatorConfigController {


@GetMapping("/project/index/template/list") @GetMapping("/project/index/template/list")
@ApiOperation("项目指标模板列表") @ApiOperation("项目指标模板列表")
public PageVo<ProjectIndexTemplateVO> projectList(PerformanceAppraisalListReq req) {
return indicatorConfigManage.projectList(req);
public PageVo<ProjectIndexTemplateVO> projectIndexTemplateList(PerformanceAppraisalListReq req) {
return indicatorConfigManage.projectIndexTemplateList(req);
} }


@GetMapping("/project/index/template/detail/{id}") @GetMapping("/project/index/template/detail/{id}")
@@ -68,4 +67,10 @@ public class IndicatorConfigController {
public String projectTemplateDelete(@PathVariable Long id) { public String projectTemplateDelete(@PathVariable Long id) {
return indicatorConfigManage.projectTemplateDelete(id); return indicatorConfigManage.projectTemplateDelete(id);
} }

@GetMapping("/project/index/list")
@ApiOperation("项目指标库列表")
public PageVo<ProjectIndexTemplateVO> projectIndexList(PerformanceAppraisalListReq req) {
return indicatorConfigManage.projectIndexList(req);
}
} }

+ 6
- 3
pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/IndicatorConfigManage.java View File

@@ -11,7 +11,6 @@ import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.enumeration.CommonEnum; 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.enumration.PerformanceTemplateTypeEnum;
import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorProjectTemplateSaveDTO; import com.ningdatech.pmapi.performance.model.dto.PerformanceIndicatorProjectTemplateSaveDTO;
import com.ningdatech.pmapi.performance.model.dto.ProjectTemplateDetailDTO; 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.performance.service.IPerformanceIndicatorProjectTemplateService;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil; import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.bean.entity.WflowModels;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@@ -57,7 +55,7 @@ public class IndicatorConfigManage {
* @param req * @param req
* @return * @return
*/ */
public PageVo<ProjectIndexTemplateVO> projectList(PerformanceAppraisalListReq req) {
public PageVo<ProjectIndexTemplateVO> projectIndexTemplateList(PerformanceAppraisalListReq req) {
Page<PerformanceIndicatorProjectTemplate> page = req.page(); Page<PerformanceIndicatorProjectTemplate> page = req.page();
LambdaQueryWrapper<PerformanceIndicatorProjectTemplate> wrapper = Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplate.class) LambdaQueryWrapper<PerformanceIndicatorProjectTemplate> wrapper = Wrappers.lambdaQuery(PerformanceIndicatorProjectTemplate.class)
.like(StringUtils.isNotBlank(req.getTemplateName()), PerformanceIndicatorProjectTemplate::getName, req.getTemplateName()) .like(StringUtils.isNotBlank(req.getTemplateName()), PerformanceIndicatorProjectTemplate::getName, req.getTemplateName())
@@ -345,4 +343,9 @@ public class IndicatorConfigManage {
} }
return "模版复制失败"; return "模版复制失败";
} }

public PageVo<ProjectIndexTemplateVO> projectIndexList(PerformanceAppraisalListReq req) {

return null;
}
} }

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/model/req/PerformanceAppraisalListReq.java View File

@@ -33,4 +33,10 @@ public class PerformanceAppraisalListReq extends PagePo {


@ApiModelProperty("区域code") @ApiModelProperty("区域code")
private String regionCode; private String regionCode;

@ApiModelProperty("指标名称")
private String indexName;

@ApiModelProperty("指标类型 1一级指标 2二级指标 3三级指标")
private Integer type;
} }

+ 13
- 8
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -365,10 +365,12 @@ public class ProjectLibManage {
.eq(ProjectApplication::getProjectCode, project.getProjectCode()) .eq(ProjectApplication::getProjectCode, project.getProjectCode())
.eq(ProjectApplication::getProjectVersion, project.getVersion()) .eq(ProjectApplication::getProjectVersion, project.getVersion())
.eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); .eq(ProjectApplication::getIsConstruct, Boolean.TRUE));
projectApplicationService.removeBatchByIds(applications);
List<Long> 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<Long> 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())) { if (isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())) {
Project finalProject = project; Project finalProject = project;
@@ -508,10 +510,13 @@ public class ProjectLibManage {
.in(CollUtil.isNotEmpty(projectCodeList), ProjectApplication::getProjectCode, projectCodeList) .in(CollUtil.isNotEmpty(projectCodeList), ProjectApplication::getProjectCode, projectCodeList)
.eq(ProjectApplication::getProjectVersion, project.getVersion()) .eq(ProjectApplication::getProjectVersion, project.getVersion())
.eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); .eq(ProjectApplication::getIsConstruct, Boolean.TRUE));
projectApplicationService.removeBatchByIds(applications);
List<Long> 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<Long> applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList());
projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
.in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
}



//app //app
List<ProjectApplicationDTO> applicationList = projecDto.getApplicationList(); List<ProjectApplicationDTO> applicationList = projecDto.getApplicationList();


+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -1130,10 +1130,12 @@ public class TodoCenterManage {
.eq(ProjectApplication::getProjectCode, project.getProjectCode()) .eq(ProjectApplication::getProjectCode, project.getProjectCode())
.eq(ProjectApplication::getProjectVersion, project.getVersion()) .eq(ProjectApplication::getProjectVersion, project.getVersion())
.eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); .eq(ProjectApplication::getIsConstruct, Boolean.TRUE));
projectApplicationService.removeBatchByIds(applicationList);
List<Long> applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList());
if (CollUtil.isNotEmpty(applicationList)) {
projectApplicationService.removeBatchByIds(applicationList);
List<Long> applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList());
// projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) // projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
// .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds)); // .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
}


List<ProjectApplicationDTO> applications = projectDto.getApplicationList(); List<ProjectApplicationDTO> applications = projectDto.getApplicationList();
if (isApp && CollUtil.isNotEmpty(applications)) { if (isApp && CollUtil.isNotEmpty(applications)) {


Loading…
Cancel
Save