yangys
2025-09-15 d4ca3871c18474768c924fcbfd6e8d3178040092
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/excution/unlock/UnlockFinishListener.java
@@ -3,12 +3,16 @@
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;
/**
 * 解锁完成执行的事件,功能:插入审批表数据
@@ -19,9 +23,7 @@
   @Autowired
   private RuntimeService runtimeService;
   @Autowired
   private FlowProgramFileService flowProgramFileService;
   @Autowired
   private NcProgramApprovedService ncProgramApprovedService;
   private NcNodeHisService nodeHisService;
   @Autowired
   private NcNodeService ncNodeService;
   /**
@@ -30,10 +32,12 @@
    */
   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);
   }
}