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'); $fields = array('entity_id','full_name','short_name');
$where_condition_array = array('isactive' => 1,'fk_entity_type_id' => 3); $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); $result_data = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,ENTITY);
// if()
// {
// }
//print_r($this->db->last_query());
if(count($result_data)) if(count($result_data))
{ {
@ -9851,7 +9860,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{ {
//update some master info //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); log_message('ERROR','####UPDATE PD:-'.$new_pd_id);
$logger->info("NEW PD Trigged by dup funciton : ".$new_pd_id,array('ENV'=>ENVIRONMENT)); $logger->info("NEW PD Trigged by dup funciton : ".$new_pd_id,array('ENV'=>ENVIRONMENT));
PDALERTS::pdnotification($new_pd_id); PDALERTS::pdnotification($new_pd_id);

View File

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

View File

@ -10,7 +10,7 @@ class User_Management_Model extends SPARQ_Model {
} }
public function listAllUsers() public function listAllUsers($entityid)
{ {
$result_data = array(); $result_data = array();
@ -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(DESIGNATION.' as DESIGNATION','USERPROFILE.designation = DESIGNATION.designation_id','LEFT');
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role'); $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(); $result = $this->db->get()->result_array();