Commit 275accfc by “zcwang”

modify: 提交节点更新数据库节点

parent 5e18cd12
...@@ -144,12 +144,15 @@ public class ChangeFlowBiz { ...@@ -144,12 +144,15 @@ public class ChangeFlowBiz {
// todo:判断发起人和审核人 // todo:判断发起人和审核人
// 如果发起人=变更负责人 // 如果发起人=变更负责人
if (true) { if (appConfig.getTestSwitch()) {
String nextNodeId = submitFlow(flowId, flowDataDTO, uid, String nextNodeId = submitFlow(flowId, flowDataDTO, uid,
ChangeFlowEnum.CHANGE_FLOW_START.getTopoId(), JSON.toJSONString(content)); ChangeFlowEnum.CHANGE_FLOW_START.getTopoId(), JSON.toJSONString(content));
if (null == nextNodeId) { if (null == nextNodeId) {
throw ExceptionFactory.createBiz(ResponseCode.SUBMIT_FLOW_ERROR, "首次提交节点失败"); throw ExceptionFactory.createBiz(ResponseCode.SUBMIT_FLOW_ERROR, "首次提交节点失败");
} }
// 更新节点id
changeRecord.setFlowNode(nodeId);
changeFlowService.updateRecord(changeRecord);
return nextNodeId; return nextNodeId;
} }
return flowId; return flowId;
...@@ -323,8 +326,11 @@ public class ChangeFlowBiz { ...@@ -323,8 +326,11 @@ public class ChangeFlowBiz {
Map<String, Object> content = new HashMap<>(CommonConstants.INIT_HASH_MAP_SIZE); Map<String, Object> content = new HashMap<>(CommonConstants.INIT_HASH_MAP_SIZE);
content.put("updateTime", System.currentTimeMillis()); content.put("updateTime", System.currentTimeMillis());
content.put(CommonConstants.FLOW_OPERATION_KEY, FlowOperationTypeEnum.PASS.getValue()); content.put(CommonConstants.FLOW_OPERATION_KEY, FlowOperationTypeEnum.PASS.getValue());
return this.submitFlow(flowId.toString(), flowDataDTO, uid, String nextNodeId = this.submitFlow(flowId.toString(), flowDataDTO, uid,
ChangeFlowEnum.CHANGE_FLOW_SUBMIT.getTopoId(), JSON.toJSONString(content)); ChangeFlowEnum.CHANGE_FLOW_SUBMIT.getTopoId(), JSON.toJSONString(content));
changeRecord.setFlowNode(nextNodeId);
changeFlowService.updateRecord(changeRecord);
return nextNodeId;
} }
private ChangeRecord getFlowInfo(Long flowId) { private ChangeRecord getFlowInfo(Long flowId) {
......
...@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component; ...@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component;
import com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig; import com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig;
import com.ctrip.framework.apollo.spring.annotation.ValueMapping; import com.ctrip.framework.apollo.spring.annotation.ValueMapping;
import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.Data; import lombok.Data;
...@@ -28,4 +29,7 @@ public class AppConfig { ...@@ -28,4 +29,7 @@ public class AppConfig {
@Value("${changeExecLimit:20}") @Value("${changeExecLimit:20}")
private Integer changeExecLimit; private Integer changeExecLimit;
@Value("${testSwitch:true}")
private Boolean testSwitch;
} }
\ No newline at end of file
...@@ -74,7 +74,7 @@ public class ChangeFlowSubmitReq { ...@@ -74,7 +74,7 @@ public class ChangeFlowSubmitReq {
/** /**
* 变更收益类型 * 变更收益类型
*/ */
private String changeProfit; private Integer changeProfit;
/** /**
* 变更收益说明 * 变更收益说明
*/ */
......
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