| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.delegate.DelegateExecution; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.program.service.NcNodeHisService; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramApprovedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 解锁完成执行的事件,功能:插入审批表数据 |
| | |
| | | @Autowired |
| | | private RuntimeService runtimeService; |
| | | @Autowired |
| | | private FlowProgramFileService flowProgramFileService; |
| | | @Autowired |
| | | private NcProgramApprovedService ncProgramApprovedService; |
| | | private NcNodeHisService nodeHisService; |
| | | @Autowired |
| | | private NcNodeService ncNodeService; |
| | | /** |
| | |
| | | */ |
| | | public void handle(DelegateExecution execution) { |
| | | // 执行业务逻辑 |
| | | String instId = execution.getProcessInstanceId(); |
| | | Date time = DateUtil.now(); |
| | | Long nodeId = runtimeService.getVariable(execution.getId(),FlowContants.NODE_ID,Long.class); |
| | | |
| | | this.ncNodeService.unlock(nodeId); |
| | | |
| | | nodeHisService.mergeNodeToHisGeTime(time); |
| | | } |
| | | |
| | | } |