Commit 7b7ba380 by 王志超

feat: 自动审批提交,topo工单流程改为参数提交

parent 7b37439c
Pipeline #86890 passed with stages
in 1 minute 42 seconds
......@@ -428,12 +428,12 @@ public class ChangeFlowBiz {
*/
private void submitToExecutionNode(String flowId, FlowDataDTO flowDataDTO, String uid, Map<String, Object> content, ChangeRecord changeRecord) {
log.debug("[submitToExecutionNode] flowId:{}, uid:{}", flowId, uid);
String nextNodeId = flowService.submitFlow(flowId, flowDataDTO, uid,
ChangeFlowEnum.NEW_CHANGE_FLOW_START.getTopoId(), JSON.toJSONString(content), true,
// 使用 paramMap 方式提交,type=1 表示审批通过/前进到下一节点
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("type", FlowTransitionType.TYPE_APPROVED);
String nextNodeId = flowService.submitFlowWithParamMap(flowId, flowDataDTO, uid,
ChangeFlowEnum.NEW_CHANGE_FLOW_START.getTopoId(), JSON.toJSONString(content), paramMap,
FlowxOperationEnum.SUBMIT.getName(), "提交工单", changeRecord.getCreateTime());
if (null == nextNodeId) {
throw ExceptionFactory.createBiz(ResponseCode.SUBMIT_FLOW_ERROR, "首次提交节点失败");
}
// 更新节点id,使用返回的节点ID
changeRecord.setFlowNode(nextNodeId);
changeRecord.setState(ChangeStatusEnum.WAIT_CONFIRM_CHANGE_PLAN.getStatus());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment