Parcourir la source

评价计划分组-添加待评价项目、应用校验修改

tags/24080901
CMM il y a 1 an
Parent
révision
3488c2edf7
3 fichiers modifiés avec 26 ajouts et 6 suppressions
  1. +23
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/performance/model/dto/AddAppraisalObjectDTO.java
  3. +0
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/PerformanceAppraisalVO.java

+ 23
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java Voir le fichier

@@ -668,6 +668,7 @@ public class PerformanceAppraisalPlanManage {
PerformanceAppraisalProjectVO vo = new PerformanceAppraisalProjectVO();
if(projectMap.containsKey(projectCode)){
Project project = projectMap.get(projectCode);
vo.setProjectName(project.getProjectName());
vo.setProjectTypeName(BizUtils.getProjectTypeName(project.getProjectType()));
vo.setProjectType(project.getProjectType());
vo.setId(project.getId());
@@ -729,6 +730,17 @@ public class PerformanceAppraisalPlanManage {
// 获取已经创建的评价计划中添加的评价项目ID
List<Long> projectIds = performanceAppraisalProjectService.list().stream()
.map(PerformanceAppraisalProject::getProjectId).collect(Collectors.toList());
Long appraisalId = addDTO.getAppraisalId();
// 如果评价计划不为空,说明是编辑评价计划,
// 评价计划中原来已经勾选的待评价项目,不作为判断重复添加的内容
if (Objects.nonNull(appraisalId)){
// 获取当前编辑的评价计划中选择的项目
List<Long> proIds = performanceAppraisalProjectService.list(Wrappers.lambdaQuery(PerformanceAppraisalProject.class)
.eq(PerformanceAppraisalProject::getAppraisalId, appraisalId)).stream()
.map(PerformanceAppraisalProject::getProjectId).collect(Collectors.toList());
// 去除这些项目
projectIds.removeAll(proIds);
}
// 如果有交集,说明选择的项目中,有已经在其他评价计划中的项目
if (Boolean.TRUE.equals(haveIntersection(projectIdList, projectIds))){
// 得到交集
@@ -756,6 +768,17 @@ public class PerformanceAppraisalPlanManage {
// 获取已经创建的评价计划中添加的评价应用ID
List<Long> applicationIds = performanceAppraisalApplicationService.list().stream()
.map(PerformanceAppraisalApplication::getApplicationId).collect(Collectors.toList());
Long appraisalId = addDTO.getAppraisalId();
// 如果评价计划不为空,说明是编辑评价计划,
// 评价计划中原来已经勾选的待评价应用,不作为判断重复添加的内容
if (Objects.nonNull(appraisalId)){
// 获取当前编辑的评价计划中选择的应用
List<Long> appIds = performanceAppraisalApplicationService.list(Wrappers.lambdaQuery(PerformanceAppraisalApplication.class)
.eq(PerformanceAppraisalApplication::getAppraisalId, appraisalId)).stream()
.map(PerformanceAppraisalApplication::getApplicationId).collect(Collectors.toList());
// 去除这些应用
applicationIds.removeAll(appIds);
}
// 如果有交集,说明选择的应用中,有已经在其他评价计划中的应用
if (Boolean.TRUE.equals(haveIntersection(applicationIdList, applicationIds))){
// 得到交集


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/performance/model/dto/AddAppraisalObjectDTO.java Voir le fichier

@@ -25,6 +25,9 @@ public class AddAppraisalObjectDTO implements Serializable {

private static final long serialVersionUID = 1L;

@ApiModelProperty("评价计划ID")
private Long appraisalId;

@ApiModelProperty("评价项目 只有ID 和是否复评")
private List<Long> projectIds;



+ 0
- 6
pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/PerformanceAppraisalVO.java Voir le fichier

@@ -31,12 +31,6 @@ public class PerformanceAppraisalVO implements Serializable {
@ApiModelProperty("计划名称")
private String name;

@ApiModelProperty("自评开始时间")
private LocalDateTime selfAppraisalStart;

@ApiModelProperty("自评结束时间")
private LocalDateTime selfAppraisalEnd;

@ApiModelProperty("评价目标 1项目 2应用 可多选 1,2")
private String target;



Chargement…
Annuler
Enregistrer