| | |
| | | package org.springblade.flow.business.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.HistoryService; |
| | | import org.flowable.engine.TaskService; |
| | |
| | | import org.flowable.task.api.TaskQuery; |
| | | import org.flowable.task.api.history.HistoricTaskInstance; |
| | | import org.flowable.task.api.history.HistoricTaskInstanceQuery; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | |
| | | import org.springblade.flow.engine.constant.FlowEngineConstant; |
| | | import org.springblade.flow.engine.entity.FlowProcess; |
| | | import org.springblade.flow.engine.utils.FlowCache; |
| | | import org.springblade.modules.property.entity.PropertyCapitalApplyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCapitalApplyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.LinkedList; |
| | |
| | | flow.setProcessIsFinished(FlowEngineConstant.STATUS_UNFINISHED); |
| | | } |
| | | } |
| | | IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, historicTaskInstance.getProcessInstanceId())); |
| | | if (capitalApplyEntity != null) { |
| | | flow.setName(capitalApplyEntity.getName()); |
| | | flow.setDistrictId(capitalApplyEntity.getDistrictId()); |
| | | flow.setLinkman(capitalApplyEntity.getLinkman()); |
| | | flow.setLinkPhone(capitalApplyEntity.getLinkPhone()); |
| | | } |
| | | flow.setStatus(FlowEngineConstant.STATUS_FINISH); |
| | | flowList.add(flow); |
| | | }); |
| | |
| | | flow.setBusinessTable(businessKey[0]); |
| | | flow.setBusinessId(businessKey[1]); |
| | | } |
| | | IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, task.getProcessInstanceId())); |
| | | if (capitalApplyEntity != null) { |
| | | flow.setName(capitalApplyEntity.getName()); |
| | | flow.setDistrictId(capitalApplyEntity.getDistrictId()); |
| | | flow.setLinkman(capitalApplyEntity.getLinkman()); |
| | | flow.setLinkPhone(capitalApplyEntity.getLinkPhone()); |
| | | } |
| | | |
| | | FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId()); |
| | | flow.setCategory(processDefinition.getCategory()); |