mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 10:48:43 +08:00 
			
		
		
		
	仿钉钉流程设计- 会签按比例通过bug 修复
This commit is contained in:
		| @@ -54,17 +54,6 @@ public class CompleteByRejectCountExpression { | ||||
|         // 多人会签(按通过比例) | ||||
|         Integer approveRatio = NumberUtils.parseInt(BpmnModelUtils.parseExtensionElement(flowElement, USER_TASK_APPROVE_RATIO)); | ||||
|         Assert.notNull(approveRatio, "通过比例不能空"); | ||||
|         if (Objects.equals(100, approveRatio)) { | ||||
|             // 所有人都同意 | ||||
|             if (agreeCount == nrOfInstances) { | ||||
|                 return true; | ||||
|             } | ||||
|             // 一个人拒绝了 | ||||
|             if (rejectCount > 0) { | ||||
|                 execution.setVariable(String.format("%s_reject", flowElement.getId()), Boolean.TRUE); | ||||
|                 return true; | ||||
|             } | ||||
|         } else { | ||||
|         // 判断通过比例 | ||||
|         double approvePct = approveRatio / (double) 100; | ||||
|         double realApprovePct = (double) agreeCount / nrOfInstances; | ||||
| @@ -74,11 +63,10 @@ public class CompleteByRejectCountExpression { | ||||
|         double rejectPct = (100 - approveRatio) / (double) 100; | ||||
|         double realRejectPct = (double) rejectCount / nrOfInstances; | ||||
|         // 判断拒绝比例 | ||||
|             if (realRejectPct >= rejectPct) { | ||||
|         if (realRejectPct > rejectPct) { | ||||
|             execution.setVariable(String.format("%s_reject", flowElement.getId()), Boolean.TRUE); | ||||
|             return true; | ||||
|         } | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jason
					jason