From 6e986f878ae7b82b1291a2d368485c30a2e02e86 Mon Sep 17 00:00:00 2001 From: colly_wyx <wangyixiong_007@163.com> Date: Thu, 26 Apr 2018 14:57:07 +0800 Subject: [PATCH] 新增原始数据上传接口 --- Yfs/Domain/Data.php | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/Yfs/Domain/Data.php b/Yfs/Domain/Data.php index 0a76dd5..b70b495 100644 --- a/Yfs/Domain/Data.php +++ b/Yfs/Domain/Data.php @@ -9,6 +9,8 @@ $this->model = new Model_Data(); $this->hourly_model = new Model_DataHourly(); $this->warn_model = new Model_DataWarn(); + $this->task_model = new Model_Task(); + $this->data_original_model = new Model_DataOriginal(); } /** @@ -33,6 +35,12 @@ } elseif($value['type'] == 1){ $this->hourly_model->add($arr); + $task_arr = array(); + if(!in_arrar($task_arr)){ + $task_arr['date'] = $arr['date']; + $this->task_model->add($arr); + } + } if(isset($arr['_id'])) unset($arr['_id']); @@ -43,6 +51,20 @@ } + /** + * ������������������������ + * @return [type] [description] + */ + public function originalUpload(){ + $arr = array(); + $arr['data'] = $data['data']; + $arr['time'] = $data['time']; + $arr['create_time'] = date('Y-m-d H:i:s'); + $this->data_original_model->add($arr); + return true; + } + + public function getList(){ return $this->model->getList(); } -- Gitblit v1.8.0