EXIST CHECK CHANGED
This commit is contained in:
parent
085ed0e31a
commit
0c06abe312
@ -4854,7 +4854,7 @@ public function getPDFormDetailsJSON_post()
|
||||
|
||||
$key = 'pd'.$pdid.'/'.$main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
|
||||
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
//$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
if($pd_master_details[0]['is_zip_created'])
|
||||
{
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
@ -9164,9 +9164,11 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
public function checkExistPDDetails_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
//print_r($records);die();
|
||||
$client = $this->post('client');
|
||||
|
||||
|
||||
$lender_applicant_id = isset($records['lender_applicant_id']) ? $records['lender_applicant_id'] : null;
|
||||
$applicant_name = isset($records['applicant_name']) ? $records['applicant_name'] : null;
|
||||
$applicant_name = isset($records['applicant_name']) ? strtolower(trim($records['applicant_name'])) : null;
|
||||
$mobile_no = isset($records['mobile_no']) ? $records['mobile_no'] : null;
|
||||
$params = array();
|
||||
$table = null;
|
||||
@ -9188,7 +9190,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$table = PDAPPLICANTSDETAILS;
|
||||
}
|
||||
|
||||
$result_data = $this->PD_Model->checkExistPDDetails($params,$table);
|
||||
$result_data = $this->PD_Model->checkExistPDDetails($params,$table,$client);
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $result_data;
|
||||
|
||||
@ -1867,7 +1867,7 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
}
|
||||
|
||||
function checkExistPDDetails($params,$table)
|
||||
function checkExistPDDetails($params,$table,$client)
|
||||
{
|
||||
if(count($params) && $table)
|
||||
{
|
||||
@ -1889,14 +1889,21 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
if(isset($params['applicant_name']) && $params['applicant_name'])
|
||||
{
|
||||
$where_condition_array['applicant_name'] = $params['applicant_name'];
|
||||
$where_condition_array['lower(trim(applicant_name))'] = $params['applicant_name'];
|
||||
}
|
||||
|
||||
$joins = array(
|
||||
array('table'=>PDTRIGGER.' as PDTRIGGER','condition'=>'PDAPPLICANTSDETAILS.fk_pd_id = PDTRIGGER.pd_id','jointype'=>'LEFT'),
|
||||
$joins = array(
|
||||
array('table'=>PDTRIGGER.' as PDTRIGGER','condition'=>'PDAPPLICANTSDETAILS.fk_pd_id = PDTRIGGER.pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1' ,'jointype'=>'INNER JOIN')
|
||||
);
|
||||
return $this->getJoinRecords($fields,$table,$joins,$where_condition_array);
|
||||
//print_r($this->db->last_query());
|
||||
if($client)
|
||||
{
|
||||
$joins = array(
|
||||
array('table'=>PDTRIGGER." as PDTRIGGER",'condition'=>"PDAPPLICANTSDETAILS.fk_pd_id = PDTRIGGER.pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1 AND PDTRIGGER.fk_lender_id = $client" ,"jointype"=>"INNER JOIN")
|
||||
);
|
||||
}
|
||||
return
|
||||
$this->getJoinRecords($fields,$table,$joins,$where_condition_array);
|
||||
print_r($this->db->last_query());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user