Browse Source

优化数据接口

master
wanghongjun 3 years ago
parent
commit
6621900d61
  1. 4
      source/application/common/logic/PassFlow.php

4
source/application/common/logic/PassFlow.php

@ -473,9 +473,9 @@ class PassFlow
$bw_data = []; $bw_data = [];
foreach ($dateArr as $date => $granularity) { foreach ($dateArr as $date => $granularity) {
$museumWhere = ' "groupId"='."'510'".' and "granularity" = ' . "'{$granularity}'" . ' and "date" = ' . "'{$date}'"; $museumWhere = ' "groupId"='."'510'".' and "granularity" = ' . "'{$granularity}'" ;
$museumWhere .= ' and "statTime" >= ' . "'{$dateData[$date]['start_time']}'" . ' and "statTime" <= ' . "'{$dateData[$date]['end_time']}'"; $museumWhere .= ' and "statTime" >= ' . "'{$dateData[$date]['start_time']}'" . ' and "statTime" <= ' . "'{$dateData[$date]['end_time']}'";
$museumRes = $dm->find('bt_passenger_flow_all',$museumWhere,' SUM("flowInNum") as NUM'); $museumRes = $dm->find('bt_passenger_flow',$museumWhere,' SUM("flowInNum") as NUM');
$bw_data[$date] = $museumRes['NUM'] ?: 0; $bw_data[$date] = $museumRes['NUM'] ?: 0;
} }
$bw_today_incount = isset($bw_data['day']) ? $bw_data['day'] : 0; $bw_today_incount = isset($bw_data['day']) ? $bw_data['day'] : 0;

Loading…
Cancel
Save