109 lines
3.3 KiB
PHP
109 lines
3.3 KiB
PHP
<?php
|
|
/**
|
|
|
|
* User: velz
|
|
* This Controller deals with PD Related CRUD Operations
|
|
*/
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
|
require_once APPPATH . '/libraries/REST_Controller.php';
|
|
|
|
|
|
class Dash_Board_Controller extends REST_Controller {
|
|
|
|
function __construct()
|
|
{
|
|
// Construct the parent class
|
|
parent::__construct();
|
|
$this->load->model('Dash_Board_Model');
|
|
|
|
}
|
|
|
|
public function getDashBoardDetailsOfPDTypeAndPDStatusWithDayWeekMonth_get()
|
|
{
|
|
$res = $this->Dash_Board_Model->getDetailsOfPDTypeAndPDStatusWithDayWeekMonth();
|
|
|
|
$data['dataStatus'] = true;
|
|
$data['status'] = REST_Controller::HTTP_OK;
|
|
$data['records'] = $res;
|
|
$this->response($data,REST_Controller::HTTP_OK);
|
|
}
|
|
|
|
public function getDashBoardDetails_post()
|
|
{
|
|
$fdate = '';
|
|
$tdate = '';
|
|
$cityarr = '';
|
|
$lenderarr = '';
|
|
|
|
if($this->post('fromdate')) { $fdate = $this->post('fromdate'); }
|
|
if($this->post('todate')){ $tdate = $this->post('todate'); }
|
|
if($this->post('cityarr')) { $cityarr = $this->post('cityarr'); }
|
|
if($this->post('lenderarr')) { $lenderarr = $this->post('lenderarr'); }
|
|
|
|
// echo $from_date;
|
|
// echo $to_date;
|
|
// print_r($city_arr);
|
|
// print_r($lender_arr);
|
|
// die();
|
|
$res = $this->Dash_Board_Model->getDetailsOfPDType($fdate,$tdate,$cityarr,$lenderarr);
|
|
|
|
|
|
$data['dataStatus'] = true;
|
|
$data['status'] = REST_Controller::HTTP_OK;
|
|
$data['records'] = $res;
|
|
$this->response($data,REST_Controller::HTTP_OK);
|
|
}
|
|
|
|
public function getDashBoardDetailsOfLenderAndCitywise_get()
|
|
{
|
|
$res = $this->Dash_Board_Model->getDetailsOfLenderAndCitywise();
|
|
|
|
$data['dataStatus'] = true;
|
|
$data['status'] = REST_Controller::HTTP_OK;
|
|
$data['records'] = $res;
|
|
$this->response($data,REST_Controller::HTTP_OK);
|
|
}
|
|
|
|
public function getDashBoardDetailsOfCitywise_get()
|
|
{
|
|
$res = $this->Dash_Board_Model->getDashBoardDetailsOfCitywise();
|
|
|
|
$data['dataStatus'] = true;
|
|
$data['status'] = REST_Controller::HTTP_OK;
|
|
$data['records'] = $res;
|
|
$this->response($data,REST_Controller::HTTP_OK);
|
|
}
|
|
public function getDashBoardDetailsOfAlert_get(){
|
|
|
|
$res = $this->Dash_Board_Model->getDashBoardDetailsOfAlert();
|
|
|
|
$data['dataStatus'] = true;
|
|
$data['status'] = REST_Controller::HTTP_OK;
|
|
$data['records'] = $res;
|
|
$this->response($data,REST_Controller::HTTP_OK);
|
|
|
|
}
|
|
|
|
public function PD_MIS_report_post()
|
|
{
|
|
|
|
$filter_params = ($this->post());
|
|
$applicant_id = isset($filter_params['applicant_id']) && $filter_params['applicant_id'] != '' ? $filter_params['applicant_id'] : null;
|
|
$from_date = isset($filter_params['from_date']) && $filter_params['from_date'] != '' ? $filter_params['from_date'] : null;
|
|
$to_date = isset($filter_params['to_date']) && $filter_params['to_date'] != '' ? $filter_params['to_date'] : null;
|
|
$city = isset($filter_params['city']) && $filter_params['city'] != '' ? $filter_params['city'] : null;
|
|
$branch = isset($filter_params['branch']) && $filter_params['branch'] != '' ? $filter_params['branch'] : null;
|
|
|
|
$res = $this->Dash_Board_Model->PD_MIS_report($applicant_id,$from_date,$to_date,$city,$branch);
|
|
|
|
$data['dataStatus'] = true;
|
|
$data['status'] = REST_Controller::HTTP_OK;
|
|
$data['records'] = $res;
|
|
$this->response($data,REST_Controller::HTTP_OK);
|
|
}
|
|
|
|
|
|
}
|