From e8dabe4763e38b694e90bd9def2c096b0c6dd88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Wed, 11 Nov 2020 15:55:36 +0800 Subject: [PATCH] fix --- .../impl/EvaluationGroupServiceImpl.java | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java index 7dd6d7ee..aef16fad 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/EvaluationGroupServiceImpl.java @@ -378,18 +378,28 @@ public class EvaluationGroupServiceImpl extends ServiceImpl ids,EvaluationGroup group) { String staffIds = group.getStaffIds(); - if(StringUtil.isNotBlank(staffIds)){ - String[] split = staffIds.split(","); - Set set = new HashSet(Arrays.asList(split)); - set.removeAll(new HashSet(ids)); //set.addAll(new HashSet(ids)); - String join = StringUtils.join(set, ","); - group.setStaffIds(join); - int i = evaluationGroupMapper.updateCoverEvaluationGroupById(group); - return i; + String outIds = group.getOutIds(); + //删除选中人员 + if(StringUtil.isNotBlank(staffIds)){ + String[] staffs = staffIds.split(","); + Set staffsSet = new HashSet(Arrays.asList(staffs)); + staffsSet.removeAll(ids); + group.setStaffIds(StringUtils.join(staffsSet, ",")); } - return 0; - } + //增加排除人员 + if(StringUtil.isBlank(outIds)){ + group.setOutIds(StringUtils.join(ids, ",")); + } + else { + String[] outs = outIds.split(","); + Set outsSet = new HashSet(Arrays.asList(outs)); + outsSet.addAll(ids); + group.setOutIds(StringUtils.join(outsSet, ",")); + } + + return evaluationGroupMapper.updateById(group); + } @Override public String getEvaluationCopyIdsByEvaluationIds(String evaluationIds,Long startId) { @@ -402,4 +412,5 @@ public class EvaluationGroupServiceImpl extends ServiceImpl