getSMCVendorPDOfficersList : ps
This commit is contained in:
parent
ee19e60cee
commit
3b413653db
@ -326,4 +326,5 @@ $route['getRequestForDataDump'] = 'Request_DataDump_Controller/getRequestForData
|
||||
$route['getMasterForDataDump'] = 'Request_DataDump_Controller/getMasterForDataDump';
|
||||
$route['downloadDataDump'] = 'Request_DataDump_Controller/downloadDataDump2';
|
||||
|
||||
$route['getSMCVendorList'] = 'SMC_Credit_PD_Controller/getCityWiseAgency';
|
||||
$route['getSMCVendorList'] = 'SMC_Credit_PD_Controller/getCityWiseAgency';
|
||||
$route['getSMCVendorPDOfficersList'] = 'SMC_Credit_PD_Controller/getSMCVendorPDOfficersList';
|
||||
@ -1811,9 +1811,19 @@ public function filterSalesPDList_post() {
|
||||
: array('dataStatus' => false,'status' => REST_Controller::HTTP_NOT_FOUND,'msg' =>'No Records Found!');
|
||||
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//2 roles = SMC Vendor PD officer and SMC Vendor PD manager
|
||||
function getSMCVendorPDOfficersList_get(){
|
||||
|
||||
$role_id = $this->get('role_id');
|
||||
$entity_id = $this->get('fk_entity_id');
|
||||
$Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id);
|
||||
$data = (!empty($Lenderlist))
|
||||
? array('dataStatus' => true,'status' => REST_Controller::HTTP_OK,'records' => $Lenderlist)
|
||||
: array('dataStatus' => false,'status' => REST_Controller::HTTP_NOT_FOUND,'msg' =>'No Records Found!');
|
||||
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2289,5 +2289,21 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
}
|
||||
|
||||
function getSMCVendorPDOfficersList($role,$entity){
|
||||
if(empty($role)){
|
||||
$role = array(28,29);
|
||||
}
|
||||
$this->db->select('USERPROFILE.userid, concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name, USERPROFILE.email, USERPROFILE.mobile_no,USERPROFILEROLES.user_role,ROLES.role_name, ROLES.role_description');
|
||||
$this->db->from(USERPROFILE.' as USERPROFILE');
|
||||
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive = 1','LEFT');
|
||||
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role and ROLES.isactive = 1','LEFT');
|
||||
$this->db->where('USERPROFILE.isactive',1);
|
||||
$this->db->where_in('USERPROFILEROLES.user_role',$role);
|
||||
if(!empty($entity)){ $this->db->where('USERPROFILE.fk_entity_id',$entity); }
|
||||
$result = $this->db->get()->result_array();
|
||||
// print_r($this->db->last_query());die();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user