role id for officer list : ps

This commit is contained in:
sanjeev 2021-11-24 17:44:35 +05:30
parent 0e082f0b83
commit 93039d64a3
2 changed files with 9 additions and 7 deletions

View File

@ -1816,9 +1816,10 @@ public function filterSalesPDList_post() {
//2 roles = SMC Vendor PD officer and SMC Vendor PD manager
function getSMCVendorPDOfficersList_get(){
$role_id = $this->get('role_id');
$entity_id = $this->get('entity_id');
$Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id);
// $role_id = $this->get('role_id');
// $entity_id = $this->get('entity_id');
// $Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id);
$Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList();
$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!');

View File

@ -2289,10 +2289,11 @@ class PD_Model extends SPARQ_Model {
}
function getSMCVendorPDOfficersList($role,$entity){
if(empty($role)){
$role = array(28,29);
}
function getSMCVendorPDOfficersList(){
// if(empty($role)){
// $role = array(28,29);
$role = array(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');