修改当考评组删除所有人时继续发起的逻辑,测试
This commit is contained in:
parent
a4e336765d
commit
73889446fd
@ -217,7 +217,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
}).collect(Collectors.toList());
|
||||
Map<String, String> maps = ids1.stream().collect(Collectors.toMap(e->e, e->e));
|
||||
|
||||
|
||||
//求差集发起,但是历史记录怎么搞
|
||||
List<String> ids= Arrays.stream(flowStart.getGroupIds().split(",")).map(new Function<String, String>() {
|
||||
@Override
|
||||
public String apply(String s) {
|
||||
@ -233,17 +233,25 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
i++;
|
||||
}
|
||||
|
||||
if(ids.size() == 0){
|
||||
return R.ok("发起成功,该任务已经发起过")
|
||||
.put("data", flowStart1);
|
||||
}
|
||||
ids1.addAll(ids);
|
||||
flowStart1.setGroupIds(ids1.stream().collect(Collectors.joining(",")));//把新的组信息加入
|
||||
updateFlowStartById(flowStart1);//更新组信息到记录里面
|
||||
|
||||
flowStart.setGroupIds(ids.stream().collect(Collectors.joining(",")));//过滤后的考核组
|
||||
flowStart.setId(flowStart1.getId());
|
||||
flowStart.setIsDelete(flowStart1.getIsDelete());
|
||||
|
||||
|
||||
if(ids.size() == 0){
|
||||
/*return R.ok("发起成功,该任务已经发起过")
|
||||
.put("data", flowStart1);*/
|
||||
log.info("可能会使用历史数模板数据");
|
||||
flowStart.setId(flowStart1.getId());
|
||||
flowStart.setIsDelete(flowStart1.getIsDelete());
|
||||
}else{
|
||||
log.info("有新增组");
|
||||
ids1.addAll(ids);
|
||||
flowStart1.setGroupIds(ids1.stream().collect(Collectors.joining(",")));//把新的组信息加入
|
||||
updateFlowStartById(flowStart1);//更新组信息到记录里面
|
||||
|
||||
flowStart.setGroupIds(ids.stream().collect(Collectors.joining(",")));//过滤后的考核组
|
||||
flowStart.setId(flowStart1.getId());
|
||||
flowStart.setIsDelete(flowStart1.getIsDelete());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user