From 2350acca6b060df86e351640c41392c006ef1733 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Mon, 23 Sep 2024 16:31:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E7=BA=BF=E4=B8=8A=E7=89=88?= =?UTF-8?q?=E6=9C=ACCreate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/pass/Create.php | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/source/application/api/controller/pass/Create.php b/source/application/api/controller/pass/Create.php index 13af68c..f1202ff 100644 --- a/source/application/api/controller/pass/Create.php +++ b/source/application/api/controller/pass/Create.php @@ -38,9 +38,9 @@ class Create extends Controller $queryWhere = ['groupId' => $val['groupId'],'granularity' => $val['granularity'],'statTime' => $val['statTime']]; $query = $dm->find('bt_passenger_flow',$queryWhere); - - $groupRes = $dm->find('bt_passenger_monitor_group',['groupId' => $val['groupId']]); - $groupName = isset($groupRes['groupName']) ? $groupRes['groupName']:$val['groupName']; + + $groupRes = $dm->find('bt_passenger_monitor_group',['groupId' => $val['groupId']]); + $groupName = isset($groupRes['groupName']) ? $groupRes['groupName']:$val['groupName']; $insert_arr = [ 'groupId' => $val['groupId'], @@ -123,26 +123,28 @@ class Create extends Controller return $this->renderSuccess(); } - + /** + *虚拟数据同步 + **/ protected function mergeYearlyData(&$val) { if ($val['granularity'] == 'yearly' && date("Y") == '2023') { $mergeData = [ '110' => [ - 'flowInNum' => 0, - 'noRepeatInNum' => 0, + 'flowInNum' => 2339810, + 'noRepeatInNum' => 2339810, ], '210' => [ - 'flowInNum' => 0, - 'noRepeatInNum' => 0, + 'flowInNum' => 2545807, + 'noRepeatInNum' => 2545807, ], '310' => [ - 'flowInNum' => 0, - 'noRepeatInNum' => 0, + 'flowInNum' => 799444, + 'noRepeatInNum' => 799444, ], '510' => [ - 'flowInNum' => 0, - 'noRepeatInNum' => 0, + 'flowInNum' => 25212, + 'noRepeatInNum' => 25212, ], ]; @@ -150,7 +152,6 @@ class Create extends Controller $val['noRepeatInNum'] = round($val['noRepeatInNum']+$mergeData[$val['groupId']]['noRepeatInNum']); } } - /** * 创建总客流统计数据 * @return array