diff --git a/api/application/config/routes.php b/api/application/config/routes.php index 40efadf7..18e306aa 100755 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -377,5 +377,7 @@ $route['faceMarkImage'] = 'PD_Controller/toMakeFaceBoundingBox'; $route['saveFlyhiPD'] = 'Flyhi_Controller/saveFlyhiPD'; $route['listFlyhiPD'] = 'Flyhi_Controller/listFlyhiPD'; +$route['listFlyhiSalesPD'] = 'Flyhi_Controller/listFlyhiPD'; +$route['getFlyhiPD'] = 'Flyhi_Controller/getFlyhiPD'; diff --git a/api/application/controllers/Flyhi_Controller.php b/api/application/controllers/Flyhi_Controller.php index bd1c2d49..6ae7ffde 100644 --- a/api/application/controllers/Flyhi_Controller.php +++ b/api/application/controllers/Flyhi_Controller.php @@ -259,4 +259,28 @@ class Flyhi_Controller extends REST_Controller { $this->response($data,REST_Controller::HTTP_OK); } } + + public function getFlyhiPD_get() + { + $Flyhi_pdid = $this->get('sales_pd_id'); + $section_data = array(); + if(isset($Flyhi_pdid) || $Flyhi_pdid != "" || $Flyhi_pdid != null) + { + $section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $Flyhi_pdid,'isactive' => 1,'section_id' => 1),SALESPD_SECTION_DATA); + } + if($section_data) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $section_data; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NO_CONTENT; + $data['msg'] = 'No Data Found'; + $this->response($data,REST_Controller::HTTP_OK); + } + } }// Class Ends