lyh
2025-03-17 cf7d913ff24fce658f72cb996d056ccdaf1b96e0
lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/service/impl/FlowTaskServiceImpl.java
@@ -1,6 +1,5 @@
package org.jeecg.modules.flowable.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
@@ -13,8 +12,8 @@
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.*;
import org.flowable.bpmn.model.Process;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
import org.flowable.common.engine.impl.identity.Authentication;
@@ -39,13 +38,13 @@
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
import org.jeecg.modules.flowable.apithird.business.service.impl.FlowMyBusinessServiceImpl;
import org.jeecg.modules.flowable.apithird.common.constant.ProcessConstants;
import org.jeecg.modules.flowable.apithird.common.enums.FlowComment;
import org.jeecg.modules.flowable.apithird.common.exception.CustomException;
import org.jeecg.modules.flowable.apithird.entity.ActStatus;
import org.jeecg.modules.flowable.apithird.entity.SysUser;
import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI;
import org.jeecg.modules.flowable.apithird.service.IFlowThirdService;
import org.jeecg.modules.flowable.apithird.common.constant.ProcessConstants;
import org.jeecg.modules.flowable.apithird.common.enums.FlowComment;
import org.jeecg.modules.flowable.apithird.common.exception.CustomException;
import org.jeecg.modules.flowable.domain.dto.FlowCommentDto;
import org.jeecg.modules.flowable.domain.dto.FlowNextDto;
import org.jeecg.modules.flowable.domain.dto.FlowTaskDto;
@@ -872,7 +871,7 @@
        String myTaskId = null;
        HistoricTaskInstance myTask = null;
        for (HistoricTaskInstance hti : htiList) {
            if (loginUser.getUsername().toString().equals(hti.getAssignee())) {
            if (loginUser.getUsername().equals(hti.getAssignee())) {
                myTaskId = hti.getId();
                myTask = hti;
                break;
@@ -992,7 +991,10 @@
            flowTask.setProcDefId(histTask.getProcessDefinitionId());
            flowTask.setTaskDefKey(histTask.getTaskDefinitionKey());
            flowTask.setTaskName(histTask.getName());
            flowTask.setDescription(flowMyBusinessService.getByProcessInstanceId(histTask.getProcessInstanceId()).getTitle());
            FlowMyBusiness flowMyBusiness = flowMyBusinessService.getByProcessInstanceId(histTask.getProcessInstanceId());
            if (flowMyBusiness != null) {
                flowTask.setDescription(flowMyBusiness.getTitle());
            }
            // 流程定义信息
            ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
                    .processDefinitionId(histTask.getProcessDefinitionId())