GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: 并签未配置比例时按全部通过处理并补充合并审批多模式验证 (#265) · codingapi/flow-engine@180aede

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • flow-engine-framework/src
    • main/java/com/codingapi/flow/manager
      • NodeStrategyManager.java
    • test/java/com/codingapi/flow/service
      • FlowIssue265MergeAuditModeTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎flow-engine-framework/src/main/java/com/codingapi/flow/manager/NodeStrategyManager.java‎

Copy file name to clipboardExpand all lines: flow-engine-framework/src/main/java/com/codingapi/flow/manager/NodeStrategyManager.java
+13-2Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,26 @@ public MultiOperatorAuditStrategy.Type getMultiOperatorAuditStrategyType() {
160160

161161
/**
162162
* 多操作者审批并签比例
163+
*
164+
* <p>比例语义为「通过人数占审批席位数的比例」,有效区间为 (0, 1]。
165+
* 未配置(0 或负数)或超过 1 时按 1(全部通过)返回:比例为 0 会让并签退化成或签
166+
* (首个审批人通过即完成节点、其他审批人待办被自动办结),与并签「全部通过才算完成」
167+
* 的配置意图不符,因此按需全部通过处理(issue #265)。
168+
*
169+
* @return 归一化后的并签比例,取值区间 (0, 1]
163170
*/
164171
public float getMultiOperatorAuditMergePercent() {
165172
List<INodeStrategy> strategies = this.strategies;
166173
for (INodeStrategy strategy : strategies) {
167174
if (strategy instanceof MultiOperatorAuditStrategy) {
168-
return ((MultiOperatorAuditStrategy) strategy).getPercent();
175+
float percent = ((MultiOperatorAuditStrategy) strategy).getPercent();
176+
if (percent <= 0) {
177+
return 1f;
178+
}
179+
return Math.min(percent, 1f);
169180
}
170181
}
171-
return 0;
182+
return 1f;
172183
}
173184

174185
/**

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.