Commit 357f4966d30418128ad6aa501bc96bdf45555e42

Authored by smallNorthLee
1 parent 13c2d36e

review: 代码审查 修改方法名称validateNextAssignees

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
... ... @@ -525,7 +525,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
525 525 if (CollUtil.isNotEmpty(reqVO.getVariables())) {
526 526 Map<String, Object> variables = FlowableUtils.filterTaskFormVariable(reqVO.getVariables());
527 527 // 校验传递的参数中是否存在不是下一个执行的节点
528   - checkNextActivityNodes(userId, reqVO.getVariables(), task.getProcessInstanceId(), reqVO.getNextAssignees());
  528 + validateNextAssignees(userId, reqVO.getVariables(), task.getProcessInstanceId(), reqVO.getNextAssignees());
529 529 // 下个节点审批人如果不存在,则由前端传递
530 530 if (CollUtil.isNotEmpty(reqVO.getNextAssignees())) {
531 531 // 获取实例中的全部节点数据,避免后续节点的审批人被覆盖
... ... @@ -550,7 +550,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
550 550 * @param processInstanceId 流程实例id
551 551 * @param nextActivityNodes 下一个执行节点信息 {节点id : [审批人id,审批人id]}
552 552 */
553   - private void checkNextActivityNodes(Long loginUserId, Map<String, Object> variables,String processInstanceId,
  553 + private void validateNextAssignees(Long loginUserId, Map<String, Object> variables,String processInstanceId,
554 554 Map<String, List<Long>> nextActivityNodes){
555 555 // 1、查询流程【预测】的全部信息
556 556 BpmApprovalDetailRespVO approvalDetail = processInstanceService.getApprovalDetail(loginUserId,
... ... @@ -562,7 +562,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
562 562 List<BpmApprovalDetailRespVO.ActivityNode> notStartActivityNodes = activityNodes.stream().filter(node ->
563 563 BpmTaskCandidateStrategyEnum.START_USER_SELECT.getStrategy().equals(node.getCandidateStrategy())
564 564 && BpmTaskStatusEnum.NOT_START.getStatus().equals(node.getStatus())).toList();
565   - // 3、校验传递的参数中是否存在不是下一节点的信息
  565 + // 3、校验传递的参数中是否存在不是下一个节点的信息
566 566 for (Map.Entry<String, List<Long>> nextActivityNode : nextActivityNodes.entrySet()) {
567 567 if (notStartActivityNodes.stream().noneMatch(taskNode -> taskNode.getId().equals(nextActivityNode.getKey()))) {
568 568 log.error("[checkNextActivityNodes][ ({}) 不是下一个执行的流程节点!]", nextActivityNode.getKey());
... ...