This commit is contained in:
wangliwen 2022-09-02 09:20:13 +08:00
parent 087b1ca78f
commit c542c51e5c
1 changed files with 5 additions and 4 deletions

View File

@ -209,13 +209,14 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
private void mpComplete(List<TAbilityApplicationDTO> abilityApplicationDTO, DelegateTask delegateTask, final String assignee) { // 处理免批或申请人为资源提供方部门审批人 private void mpComplete(List<TAbilityApplicationDTO> abilityApplicationDTO, DelegateTask delegateTask, final String assignee) { // 处理免批或申请人为资源提供方部门审批人
Optional<TAbilityApplicationDTO> abilityApplicationDTOOptional = abilityApplicationDTO.stream().findAny(); Optional<TAbilityApplicationDTO> abilityApplicationDTOOptional = abilityApplicationDTO.stream().findAny();
abilityApplicationDTOOptional.ifPresent(index -> { if (abilityApplicationDTOOptional.isPresent()) {
if (abilityApplicationDTOOptional.get().getUserId().equals(delegateTask.getAssignee())) { if (abilityApplicationDTOOptional.get().getUserId().equals(delegateTask.getAssignee())) {
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "申请人为资源提供方部门审批人,默认通过"); taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "申请人为资源提供方部门审批人,默认通过");
taskService.complete(delegateTask.getId(), delegateTask.getVariables()); taskService.complete(delegateTask.getId(), delegateTask.getVariables());
return; return;
} }
}); }
if (StringUtils.isNotEmpty(assignee) if (StringUtils.isNotEmpty(assignee)
&& StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class))
&& delegateTask.getVariable("creator", String.class).equals(assignee)) { && delegateTask.getVariable("creator", String.class).equals(assignee)) {