mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-16 16:54:41 +08:00
删除流程抄送信息
Signed-off-by: 描述不符 <826801306@qq.com>
This commit is contained in:
parent
e49f02f89e
commit
4fff547062
@ -195,7 +195,13 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
|
|||||||
}
|
}
|
||||||
// 发送事件
|
// 发送事件
|
||||||
processDeleteHandler(flowInstances);
|
processDeleteHandler(flowInstances);
|
||||||
return insService.remove(StreamUtils.toList(flowInstances, FlowInstance::getId));
|
// 删除抄送
|
||||||
|
List<Long> instanceIds = StreamUtils.toList(flowInstances, FlowInstance::getId);
|
||||||
|
List<FlowHisTask> flowHisTaskList = flowHisTaskMapper.selectList(new LambdaQueryWrapper<>(FlowHisTask.class).eq(FlowHisTask::getFlowStatus, TaskStatusEnum.COPY.getStatus()).in(FlowHisTask::getInstanceId, instanceIds));
|
||||||
|
if (CollUtil.isNotEmpty(flowHisTaskList)) {
|
||||||
|
FlowEngine.userService().deleteByTaskIds(StreamUtils.toList(flowHisTaskList, FlowHisTask::getTaskId));
|
||||||
|
}
|
||||||
|
return insService.remove(instanceIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -214,6 +220,11 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
|
|||||||
}
|
}
|
||||||
// 发送事件
|
// 发送事件
|
||||||
processDeleteHandler(flowInstances);
|
processDeleteHandler(flowInstances);
|
||||||
|
// 删除抄送
|
||||||
|
List<FlowHisTask> flowHisTaskList = flowHisTaskMapper.selectList(new LambdaQueryWrapper<>(FlowHisTask.class).eq(FlowHisTask::getFlowStatus, TaskStatusEnum.COPY.getStatus()).in(FlowHisTask::getInstanceId, instanceIds));
|
||||||
|
if (CollUtil.isNotEmpty(flowHisTaskList)) {
|
||||||
|
FlowEngine.userService().deleteByTaskIds(StreamUtils.toList(flowHisTaskList, FlowHisTask::getTaskId));
|
||||||
|
}
|
||||||
// 删除实例
|
// 删除实例
|
||||||
return insService.remove(instanceIds);
|
return insService.remove(instanceIds);
|
||||||
}
|
}
|
||||||
@ -234,9 +245,11 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
|
|||||||
}
|
}
|
||||||
// 发送事件
|
// 发送事件
|
||||||
processDeleteHandler(flowInstances);
|
processDeleteHandler(flowInstances);
|
||||||
|
List<FlowHisTask> flowHisTaskList = flowHisTaskMapper.selectList(new LambdaQueryWrapper<>(FlowHisTask.class).eq(FlowHisTask::getFlowStatus, TaskStatusEnum.COPY.getStatus()).in(FlowHisTask::getInstanceId, instanceIds));
|
||||||
List<FlowTask> flowTaskList = flwTaskService.selectByInstIds(instanceIds);
|
List<FlowTask> flowTaskList = flwTaskService.selectByInstIds(instanceIds);
|
||||||
if (CollUtil.isNotEmpty(flowTaskList)) {
|
List<Long> taskIdList = CollUtil.unionAll(StreamUtils.toList(flowTaskList, FlowTask::getId), StreamUtils.toList(flowHisTaskList, FlowHisTask::getTaskId));
|
||||||
FlowEngine.userService().deleteByTaskIds(StreamUtils.toList(flowTaskList, FlowTask::getId));
|
if (CollUtil.isNotEmpty(taskIdList)) {
|
||||||
|
FlowEngine.userService().deleteByTaskIds(taskIdList);
|
||||||
}
|
}
|
||||||
FlowEngine.taskService().deleteByInsIds(instanceIds);
|
FlowEngine.taskService().deleteByInsIds(instanceIds);
|
||||||
FlowEngine.hisTaskService().deleteByInsIds(instanceIds);
|
FlowEngine.hisTaskService().deleteByInsIds(instanceIds);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user