Skip to content
Merged

Dev #41

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
973 changes: 973 additions & 0 deletions designs/approval.pen

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
@Data
@NoArgsConstructor
public class ProcessNode {

public final static int STATE_HISTORY = -1;
public final static int STATE_CURRENT = 0;
public final static int STATE_NEXT = 1;

/**
* 节点名称
*/
Expand All @@ -30,23 +35,30 @@ public class ProcessNode {
private String nodeType;

/**
* 是否历史记录
* 记录状态
* -1 为历史状态
* 0 为当前状态
* 1 为后续状态
*/
private boolean history;
private int state;

/**
* 节点审批人
*/
private List<FlowOperatorBody> operators;


public boolean isHistory(){
return this.state == STATE_HISTORY;
}

public ProcessNode(FlowRecord flowRecord, Workflow workflow) {
this.nodeId = flowRecord.getNodeId();
IFlowNode flowNode = workflow.getFlowNode(this.nodeId);
this.nodeName = flowNode.getName();
this.nodeType = flowNode.getType();
this.operators = new ArrayList<>();
this.history = true;
this.state = STATE_HISTORY;
this.operators.add(new FlowOperatorBody(flowRecord));
}

Expand All @@ -56,7 +68,16 @@ public ProcessNode(IFlowNode flowNode, List<IFlowOperator> operators) {
this.nodeName = flowNode.getName();
this.nodeType = flowNode.getType();
this.operators = operators.stream().map(FlowOperatorBody::new).toList();
this.history = false;
this.state = STATE_NEXT;
}


public boolean isFlowNode(IFlowNode currentNode) {
return this.nodeId.equals(currentNode.getId());
}

public void setCurrentState() {
this.state = STATE_CURRENT;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ private void fetchNextNode(FlowSession flowSession, List<IFlowNode> nexNodes) {
operators = operatorManager.getOperators();
}
ProcessNode processNode = new ProcessNode(flowNode,operators);
if(processNode.isFlowNode(this.currentNode)){
processNode.setCurrentState();
}
this.nodeList.add(processNode);
List<IFlowNode> nextNodes = workflow.nextNodes(flowNode);
this.fetchNextNode(flowSession.updateSession(flowNode), nextNodes);
Expand Down
3 changes: 3 additions & 0 deletions frontend/.claude/commands/git-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# git push command

根据当前调整内容,并创建git的提交指令,并添加对应的提交信息,然后执行git push命令将本地的提交推送到远程仓库。
Loading