From 1e2b04fabbbc4b1ae37d7951068d7ab235f5b5f9 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 17 九月 2025 15:29:38 +0800
Subject: [PATCH] 现场编制功能适配
---
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/excution/unlock/UnlockFinishListener.java | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/excution/unlock/UnlockFinishListener.java b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/excution/unlock/UnlockFinishListener.java
index 8752c04..a6343e6 100644
--- a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/excution/unlock/UnlockFinishListener.java
+++ b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/excution/unlock/UnlockFinishListener.java
@@ -5,7 +5,12 @@
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.excution.ListenerHelper;
+import org.springblade.mdm.flow.service.FlowCommonService;
import org.springblade.mdm.flow.service.FlowProgramFileService;
+import org.springblade.mdm.flow.service.FlowProgramProperties;
+import org.springblade.mdm.program.entity.NcNode;
+import org.springblade.mdm.program.entity.NcProgramApproved;
import org.springblade.mdm.program.service.NcNodeHisService;
import org.springblade.mdm.program.service.NcNodeService;
import org.springblade.mdm.program.service.NcProgramApprovedService;
@@ -26,6 +31,12 @@
private NcNodeHisService nodeHisService;
@Autowired
private NcNodeService ncNodeService;
+ @Autowired
+ private FlowCommonService flowCommonService;
+ @Autowired
+ private NcProgramApprovedService approvedService;
+ @Autowired
+ private ListenerHelper listenerHelper;
/**
* 鍦ㄦ祦绋嬬粨鏉熸椂鑷姩璋冪敤,锛堥厤缃湪瀹℃壒缁撴潫浜嬩欢鐨別xecutelistener涓簡锛�
* @param execution 鎵ц瀵硅薄
@@ -33,11 +44,20 @@
public void handle(DelegateExecution execution) {
// 鎵ц涓氬姟閫昏緫
Date time = DateUtil.now();
- Long nodeId = runtimeService.getVariable(execution.getId(),FlowContants.NODE_ID,Long.class);
- this.ncNodeService.unlock(nodeId);
+ FlowProgramProperties props = flowCommonService.getProgramProperties(execution.getProcessInstanceId());
+ //Long nodeId = runtimeService.getVariable(execution.getId(),FlowContants.NODE_ID,Long.class);
+
+ NcNode packageNode = this.ncNodeService.getById(props.getNodeId());
+ if(packageNode.isDeviationProgram()) {
+ listenerHelper.addApproveTable(packageNode,props);
+ }
+ this.ncNodeService.unlock(props.getNodeId());
+
nodeHisService.mergeNodeToHisGeTime(time);
}
+
+
}
--
Gitblit v1.9.3