SMART PD FEEDBACK 1

This commit is contained in:
Velz2020 2020-07-21 11:15:37 +05:30
parent a697784e41
commit 0b6ded2013
3 changed files with 19 additions and 6 deletions

View File

@ -129,7 +129,16 @@ class PD_Controller extends REST_Controller {
{
$fields = array('entity_id','full_name','short_name');
$where_condition_array = array('isactive' => 1,'fk_entity_type_id' => 3);
if($this->get('vendor_name')){$where_condition_array['full_name like'] = '%'.$this->get('vendor_name').'%';}
//if($this->get('location')){$where_condition_array['location like'] = '%'.$this->get('vendor_name').'%';}
//print_r($where_condition_array);die();
//die();
$result_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,ENTITY);
// if()
// {
// }
//print_r($this->db->last_query());
if(count($result_data))
{
@ -9851,7 +9860,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{
//update some master info
$this->PD_Model->updateRecords(array('parent_pd_id' => $new_pd_id,'fk_primary_address_id' => $address_id,'fk_address_id' => $address_id'dupof' => $pdid),PDTRIGGER,array('pd_id' => $new_pd_id));
$this->PD_Model->updateRecords(array('parent_pd_id' => $new_pd_id,'fk_primary_address_id' => $address_id,'fk_address_id' => $address_id,'dupof' => $pdid),PDTRIGGER,array('pd_id' => $new_pd_id));
log_message('ERROR','####UPDATE PD:-'.$new_pd_id);
$logger->info("NEW PD Trigged by dup funciton : ".$new_pd_id,array('ENV'=>ENVIRONMENT));
PDALERTS::pdnotification($new_pd_id);

View File

@ -25,8 +25,9 @@ class User_Management_Controller extends REST_Controller {
public function listAllUsers_get()
{
//echo "function";
$result = $this->User_Management_Model->listAllUsers();
$entityid = null;
if($this->get('eid')){$entityid = $this->get('eid');}
$result = $this->User_Management_Model->listAllUsers($entityid);
//echo "result";
if($result['data_status'])
{

View File

@ -10,9 +10,9 @@ class User_Management_Model extends SPARQ_Model {
}
public function listAllUsers()
public function listAllUsers($entityid)
{
$result_data = array();
$this->db->select('USERPROFILE.userid, USERPROFILE.aws_name, USERPROFILE.first_name as user_first_name, USERPROFILE.last_name as user_last_name, USERPROFILE.email, USERPROFILE.mobile_no, USERPROFILE.profilepic, USERPROFILE.createdon, USERPROFILE.fk_createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as created_full_name, USERPROFILE.updatedon, USERPROFILE.fk_updatedby,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name)as update_full_name, USERPROFILE.fk_entity_id,ENTITY.full_name, USERPROFILE.isactive, USERPROFILE.fk_city,CITY.name as city_name, USERPROFILE.fk_state,STATE.name as state_name, PDOFFICIERSDETAILS.fk_pd_type_id,PDOFFICIERSDETAILS.fk_team_id,USERPROFILEROLES.user_role,USERPROFILE.fk_entity_type_id,ENTITYTYPE.name as entitytypename,ROLES.role_name,DESIGNATION.designation as designation_name,USERPROFILE.designation,USERPROFILE.fk_lender_branch_id');
@ -28,7 +28,10 @@ class User_Management_Model extends SPARQ_Model {
$this->db->join(DESIGNATION.' as DESIGNATION','USERPROFILE.designation = DESIGNATION.designation_id','LEFT');
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role');
if($entityid)
{
$this->db->where('USERPROFILE.fk_entity_id',$entityid);
}
$result = $this->db->get()->result_array();