Browse Source

评价计划编辑修改

master
CMM 1 year ago
parent
commit
8e1e0689eb
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java

+ 12
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java View File

@@ -293,6 +293,18 @@ public class PerformanceAppraisalPlanManage {
pa.setUpdateBy(user.getUsername());
performanceAppraisalService.updateById(pa);
String target = editDTO.getTarget();
// 如果新编辑的评价计划不包含项目,删除原计划添加的评价项目信息
if (StringUtils.isNotBlank(target) && !target.contains(EvalObjectEnum.PROJECT.getCode())){
performanceAppraisalProjectService.remove(Wrappers.lambdaQuery(PerformanceAppraisalProject.class)
.eq(PerformanceAppraisalProject::getAppraisalId,editDTO.getId()));
}

// 如果新编辑的评价计划不包含应用,删除原计划添加的评价应用信息
if (StringUtils.isNotBlank(target) && !target.contains(EvalObjectEnum.APP.getCode())){
performanceAppraisalApplicationService.remove(Wrappers.lambdaQuery(PerformanceAppraisalApplication.class)
.eq(PerformanceAppraisalApplication::getAppraisalId,editDTO.getId()));
}

if(StringUtils.isNotBlank(target) &&
target.contains(EvalObjectEnum.PROJECT.getCode()) &&
CollUtil.isNotEmpty(editDTO.getProjects())){


Loading…
Cancel
Save