diff --git a/source/application/common/logic/PassFlow.php b/source/application/common/logic/PassFlow.php index 351f6fc..e29a417 100644 --- a/source/application/common/logic/PassFlow.php +++ b/source/application/common/logic/PassFlow.php @@ -349,12 +349,14 @@ class PassFlow foreach ($list as $value) { if (!isset($data[$value['groupId']]['allEnter'])) $data[$value['groupId']]['allEnter'] = 0; $data[$value['groupId']]['allEnter'] += $value['allEnter']; + if (!isset($data[$value['groupId']]['holdValue'])) $data[$value['groupId']]['holdValue'] = 0; + $data[$value['groupId']]['holdValue'] += $value['holdValue']; } $groupThreshold = self::$groupThreshold; $returnData = []; foreach ($data as $groupId => $val) { - $proportion = $val['holdValue'] > 0 ? round($val['holdValue']/$groupThreshold[$val['groupId']],4) : 0; + $proportion = $val['holdValue'] > 0 ? round($val['holdValue']/$groupThreshold[$groupId],4) : 0; $val['proportion'] = ($proportion * 100) . "%"; $val['congestion'] = self::getPassType($proportion); $val['groupId'] = $groupId;