|
|
|
@ -321,9 +321,11 @@ class PassFlow |
|
|
|
if (empty($dm)) $dm = new Dm(); |
|
|
|
|
|
|
|
$where = ' "granularity"='."'hourly' "; |
|
|
|
$groupsWhere = null; |
|
|
|
if (!empty($param)) { |
|
|
|
if (!empty($param['groupsId'])) { |
|
|
|
$groupsId = explode("|",$param['groupsId']); |
|
|
|
$groupsWhere = ['groupId' => $groupsId]; |
|
|
|
$where .= ' and "groupId" in (' . "'" . implode("','",$groupsId) . "')"; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -338,6 +340,15 @@ class PassFlow |
|
|
|
$allTimeData[$str] = 0; |
|
|
|
} |
|
|
|
$returnData = []; |
|
|
|
|
|
|
|
# 获取各组初始数值 |
|
|
|
$groupData = $dm->select('bt_passenger_monitor_group',$groupsWhere); |
|
|
|
foreach ($groupData as $groupDataRow) { |
|
|
|
foreach ($allTimeData as $date => $dateValue) { |
|
|
|
$returnData[$groupDataRow['groupName']][$date] = $dateValue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
foreach ($list as $value) { |
|
|
|
$date = date('H:00',ceil($value['createTime'] / 1000)); // 各时间端进馆人数 |
|
|
|
if (!isset($allTimeData[$date])) continue; |
|
|
|
|