Google Video & Face API report Changes Merged
This commit is contained in:
commit
156cdd4866
@ -95,6 +95,7 @@ defined('ROUTE_LOGIN_W') OR define('ROUTE_LOGIN_W', 'saveSalesPDImage');
|
||||
defined('ROUTE_LOGIN_V') OR define('ROUTE_LOGIN_V', 'generateSatelliteImg'); // no errors
|
||||
defined('ROUTE_LOGIN_U') OR define('ROUTE_LOGIN_U', 'generateOTP');
|
||||
defined('ROUTE_LOGIN_T') OR define('ROUTE_LOGIN_T', 'verifyOTP');
|
||||
defined('ROUTE_LOGIN_C') OR define('ROUTE_LOGIN_C', 'getCreditPDReportforCETApp');
|
||||
defined('ROUTE_LOGIN_B') OR define('ROUTE_LOGIN_B', 'getSalesPDReportforCETApp');
|
||||
defined('ROUTE_LOGIN_A') OR define('ROUTE_LOGIN_A', 'getAuditedImages'); // no errors
|
||||
defined('TURN_SERVER_API') OR define('TURN_SERVER_API', 'getServerInfo'); // no errors
|
||||
@ -123,8 +124,10 @@ defined('PDF_ATTACHEMENT_URL') OR define('PDF_ATTACHEMENT_URL','https://apitest.
|
||||
defined('OPTIMIZED_IMAGE_BUCKET_NAME') OR define('OPTIMIZED_IMAGE_BUCKET_NAME','optimized-images-demo');
|
||||
defined('IMAGE_OPTIMIZE_LAMBDA_URL') OR define('IMAGE_OPTIMIZE_LAMBDA_URL','https://wlaax92nne.execute-api.ap-south-1.amazonaws.com/demo');
|
||||
defined('VIDEO_SHORT_URL') OR define('VIDEO_SHORT_URL','https://lkt.pdgenie.com/');
|
||||
defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdData');
|
||||
defined('CET_SALESPD_INTEGRATION_IMG_URL') OR define('CET_SALESPD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_IMG_URL') OR define('CET_CREDIT_PD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdPhotographsData');
|
||||
}
|
||||
else if(ENVIRONMENT == 'testing')
|
||||
{
|
||||
@ -143,8 +146,10 @@ else if(ENVIRONMENT == 'testing')
|
||||
defined('OPTIMIZED_IMAGE_BUCKET_NAME') OR define('OPTIMIZED_IMAGE_BUCKET_NAME','optimized-images-demo');
|
||||
defined('IMAGE_OPTIMIZE_LAMBDA_URL') OR define('IMAGE_OPTIMIZE_LAMBDA_URL','https://wlaax92nne.execute-api.ap-south-1.amazonaws.com/demo');
|
||||
defined('VIDEO_SHORT_URL') OR define('VIDEO_SHORT_URL','https://lkt.pdgenie.com/');
|
||||
defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdData');
|
||||
defined('CET_SALESPD_INTEGRATION_IMG_URL') OR define('CET_SALESPD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_IMG_URL') OR define('CET_CREDIT_PD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdPhotographsData');
|
||||
}
|
||||
else if(ENVIRONMENT == 'production')
|
||||
{
|
||||
@ -163,8 +168,10 @@ else if(ENVIRONMENT == 'production')
|
||||
defined('OPTIMIZED_IMAGE_BUCKET_NAME') OR define('OPTIMIZED_IMAGE_BUCKET_NAME','optimized-images-live');
|
||||
defined('IMAGE_OPTIMIZE_LAMBDA_URL') OR define('IMAGE_OPTIMIZE_LAMBDA_URL','https://4u9t03hvfb.execute-api.ap-south-1.amazonaws.com/live');
|
||||
defined('VIDEO_SHORT_URL') OR define('VIDEO_SHORT_URL','https://l.pdgenie.com/');
|
||||
defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_SALESPD_INTEGRATION_URL') OR define('CET_SALESPD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdData');
|
||||
defined('CET_SALESPD_INTEGRATION_IMG_URL') OR define('CET_SALESPD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_URL') OR define('CET_CREDIT_PD_INTEGRATION_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData');
|
||||
defined('CET_CREDIT_PD_INTEGRATION_IMG_URL') OR define('CET_CREDIT_PD_INTEGRATION_IMG_URL','https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdPhotographsData');
|
||||
}
|
||||
|
||||
/*********************END of AWS resources Constants*************************************************/
|
||||
|
||||
@ -363,7 +363,6 @@ $route['sendNotificationToOfficers'] = 'PD_Controller/sendNotificationToOfficers
|
||||
|
||||
$route['getMasterForDataDump'] = 'Request_DataDump_Controller/getMasterForDataDump';
|
||||
$route['getRequestForDataDump'] = 'Request_DataDump_Controller/getRequestForDataDump';
|
||||
|
||||
$route['addgoogleCalenderEvent'] = 'GC_Event_Controller/addGoogleCalenterEvent';//dummy checking purpose
|
||||
$route['getEventList'] = 'GC_Event_Controller/getGoogleCalenderEventList';//dummy checking purpose
|
||||
$route['getEvent'] = 'GC_Event_Controller/getEventFromGoogleCalender';//dummy checking purpose
|
||||
@ -371,4 +370,6 @@ $route['getEvent'] = 'GC_Event_Controller/getEventFromGoogleCalender';//dummy ch
|
||||
$route['createGmeetLink'] = 'PD_Controller/createGmeetLink'; //only developer testing, not for APP use
|
||||
$route['deleteCalenderEvent'] = 'PD_Controller/deleteCalenderEvent'; //only developer testing, not for APP use
|
||||
|
||||
$route['getSalesPDReportforCETApp'] = 'Sales_PD_Controller/getSalesPDReportforCETApp';
|
||||
$route['getSalesPDReportforCETApp'] = 'Sales_PD_Controller/getSalesPDReportforCETApp';
|
||||
$route['getCreditPDReportforCETApp'] = 'SMC_Credit_PD_Controller/getCreditPDReportforCETApp';
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ class PD_Controller extends REST_Controller {
|
||||
$this->load->helper('MYUTIL');
|
||||
$this->load->helper('satellite_image');
|
||||
$this->load->library('pdfgenerator');
|
||||
$this->load->helper('faceapi');
|
||||
|
||||
//$this->load->library('excel');
|
||||
$this->load->library('phpmailer_library');
|
||||
@ -988,6 +989,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$pd_details['complete_override_data'] = json_encode($pd_details['complete_override_data']);
|
||||
$pd_details['completed_on'] = date('Y-m-d H:i:s');
|
||||
$this->toMakeFaceBoundingBox($exist_pd_details);
|
||||
}
|
||||
|
||||
if(array_key_exists('link',$pd_details))
|
||||
@ -5104,6 +5106,7 @@ public function getPDFormDetailsJSON_post()
|
||||
}
|
||||
|
||||
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid,$random_string);
|
||||
// print_r($data['pd_master_details']);die;
|
||||
$data['pd_master_details'][0]['pd_report_generated_date'] = date('d/m/Y g:i:s A');
|
||||
|
||||
|
||||
@ -5195,9 +5198,17 @@ public function getPDFormDetailsJSON_post()
|
||||
}
|
||||
$t = 'DEFAULT DATA';
|
||||
// if(!count($add_on_pd))
|
||||
// {
|
||||
|
||||
// {
|
||||
if($data['pd_master_details'][0]['facemark_image_generated'] == 1 && $data['pd_master_details'][0]['is_face_api_enabled'] == 1){
|
||||
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$data['pd_master_details'][0]['fk_lender_id'];
|
||||
$destination_path = $this->external_path."/pd_reports/". $pdid ."/face_api_image.png";
|
||||
// $bucket_name = LENDER_BUCKET_NAME_PREFIX."3";
|
||||
// $destination_path = $this->external_path."/pd_reports/". "3184" ."/face_api_image.png";
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$destination_path,'+10 minutes');
|
||||
$data['pd_master_details'][0]['face_api_image'] = $singed_uri;
|
||||
}
|
||||
|
||||
if($data['pd_master_details'][0]['fk_pd_type'] == 1) //Full PD
|
||||
{
|
||||
|
||||
@ -11870,6 +11881,7 @@ public function getCompaniesListsFromGeneralFormRawJSONV2_post()
|
||||
}
|
||||
}
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
|
||||
/****
|
||||
@ -11915,4 +11927,72 @@ public function getCompaniesListsFromGeneralFormRawJSONV2_post()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// public function facemark_get(){
|
||||
public function toMakeFaceBoundingBox($master_details){
|
||||
// $pdid = $this->get('pd');//pdid 3184 comment this
|
||||
$pdid = $master_details[0]['pd_id'];
|
||||
$bounding_box = array();
|
||||
if(!empty($pdid)){
|
||||
// $master_details = $this->PD_Model->getPDMasterDetails($pdid);//comment this
|
||||
if($master_details[0]['pd_status'] == COMPLETED && $master_details[0]['facemark_image_generated'] == 0){
|
||||
$db_result = $this->PD_Model->selectCustomRecords(array('faceapi_result'),array('pd_id' => $pdid),PDTRIGGER);
|
||||
$string = $db_result[0]['faceapi_result'];
|
||||
// echo gettype($string);
|
||||
$my_array = json_decode($string,true);
|
||||
// echo gettype($my_array);
|
||||
if(!empty($my_array) && !empty($my_array["FaceMatches"])){
|
||||
$arr = $my_array["FaceMatches"];
|
||||
for($i=0;$i<count($arr);$i++){
|
||||
$bounding_box[$i] = $arr[$i]['Face']['BoundingBox'];
|
||||
$bounding_box[$i]['Similarity'] = $arr[$i]['Similarity'];
|
||||
}
|
||||
}
|
||||
$where_condition_array = array('fk_pd_id' => $pdid,'isactive' => 1,'image_key' => "selfie_with_person_met");
|
||||
$img_result = $this->PD_Model->selectCustomRecords(array('pd_document_id','pd_document_name','pd_document_title','image_key'),$where_condition_array,PDDOCUMENTS);
|
||||
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$master_details[0]['fk_lender_id'];
|
||||
$key = 'pd'.$pdid.'/'.$img_result[0]['pd_document_name'];
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
|
||||
// $temp_image_name = "sample.png";
|
||||
$temp_image_name = "face_api_image.png";
|
||||
$destination_path = $this->external_path."/pd_reports/". $pdid ."/".$temp_image_name;
|
||||
file_put_contents($destination_path, file_get_contents($singed_uri));
|
||||
|
||||
faceapi::toMakeFaceBoundingBox($temp_image_name,$bounding_box,$destination_path);
|
||||
|
||||
$key = 'pd'.$pdid.'/'.$temp_image_name;
|
||||
$sourcefile = $destination_path;
|
||||
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
|
||||
// print_r($s3result);die();
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
$this->db->WHERE('pd_id',$pdid)->UPDATE(PDTRIGGER,array('facemark_image_generated' => 1));
|
||||
unlink($destination_path);
|
||||
}
|
||||
// $data['dataStatus'] = true;
|
||||
// $data['status'] = REST_Controller::HTTP_OK;
|
||||
// $data['msg'] = 'Given PDID ';
|
||||
// $data['details'] = $bounding_box;
|
||||
}
|
||||
// else{
|
||||
// $data['dataStatus'] = false;
|
||||
// $data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
// $data['msg'] = 'Given PDID is Not in Completed Status';
|
||||
// }
|
||||
}
|
||||
// else{
|
||||
// $data['dataStatus'] = false;
|
||||
// $data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
// $data['msg'] = 'PDID is Not Available';
|
||||
// }
|
||||
// $this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -24,8 +24,7 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
$this->load->library('pdfgenerator');
|
||||
$this->load->helper('satellite_image');
|
||||
$this->load->library('phpmailer_library');
|
||||
|
||||
|
||||
$this->load->helper('cet_creditpd');
|
||||
}
|
||||
|
||||
public function loadSalesPDTemplate_post()
|
||||
@ -168,7 +167,6 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
|
||||
$where_condition_array = array('SMC_CREDIT_PD.smc_credit_pd' => $smc_credit_pd);
|
||||
$SMC_CREDIT_PD = $this->SMC_Credit_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array);
|
||||
|
||||
if($SMC_CREDIT_PD)
|
||||
{
|
||||
ini_set('max_execution_time', 0);
|
||||
@ -1522,13 +1520,20 @@ public function filterSalesPDList_post() {
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$this->load->helper('smc_creditpd');
|
||||
$this->load->helper('cet_creditpd');
|
||||
$this->load->helper('smcpdscore');
|
||||
|
||||
|
||||
|
||||
$view_data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($records['pd_id']);
|
||||
$view_data['applicant_details'] = $this->PD_Model->getApplicantsDetails($records['pd_id']);
|
||||
//$pd_section_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'fk_pd_id' => $records['pd_id']),SMC_CREDIT_PD_SECTION_DATA,array(),'','fk_form_id','ASC');
|
||||
$pd_section_data = $this->SMC_Credit_PD_Model->getSMCTemplateForPD($records['pd_id'],$view_data['pd_master_details'][0]['fk_product_id'],null,null,'REPORT');
|
||||
// print_r ($view_data['pd_master_details']);die();
|
||||
//$common_fields = array('pdid'=>111,
|
||||
// 'product'=>$view_data['pd_master_details'][0]['product_abbr'],
|
||||
// 'caseno'=>'MWISE00840');
|
||||
$common_fields = array('pdid'=>$view_data['pd_master_details'][0]['pd_id'],
|
||||
'product'=>$view_data['pd_master_details'][0]['product_abbr'],
|
||||
'caseno'=>$view_data['pd_master_details'][0]['pd_sno']);
|
||||
// print_r($pd_section_data);die();
|
||||
$forms_data_to_be_get_direct_from_excel_sheet = array(3,9,10,15);
|
||||
|
||||
@ -1546,7 +1551,8 @@ public function filterSalesPDList_post() {
|
||||
|
||||
// if($value['fk_form_id'] == 2){print_r($value['json']);die();}
|
||||
$view_data['pd_section_data'][$value['fk_form_id']] = $value['json'];
|
||||
// $CETAPP_creditPD_data[$value['form_name']] = $value['json'];
|
||||
$CETAPP_creditPD_data[$value['form_name']] = $value['json'];
|
||||
// $CETAPP_creditPD_data[$value['fk_form_id']] = $value['json'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1556,7 +1562,8 @@ public function filterSalesPDList_post() {
|
||||
$data_from_excel = $this->loadDataFromExcelBusiProcess($view_data['pd_master_details'],$value['fk_form_id']);
|
||||
//print_r($data_from_excel);die();
|
||||
$view_data['pd_section_data'][$value['fk_form_id']] = $data_from_excel;
|
||||
// $CETAPP_creditPD_data[$value['form_name']] = $data_from_excel;
|
||||
$CETAPP_creditPD_data[$value['form_name']] = $data_from_excel;
|
||||
// $CETAPP_creditPD_data[$value['fk_form_id']]= $data_from_excel;
|
||||
|
||||
}
|
||||
}
|
||||
@ -1566,6 +1573,21 @@ public function filterSalesPDList_post() {
|
||||
// print_r($view_data['pd_section_data'][15]);die();
|
||||
$view_data['smc_images'] = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $records['pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
$view_data['satellite'] = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $records['pd_id'],'isactive' => 1,'img_name=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
if(count($view_data['smc_images'])>0){
|
||||
for ($i = 0; $i < count($view_data['smc_images']); $i++){
|
||||
$img_fields = $common_fields;
|
||||
$img_fields['img_name'] = $view_data['smc_images'][$i]['img_name'];
|
||||
$img_split = explode( ',', $view_data['smc_images'][$i]['img']);
|
||||
$img_fields['img'] = $img_split[1];
|
||||
// $img_fields[0]['img'] = $view_data['section9'][$i]['img'];
|
||||
cet_creditpd::pushwithcetphotographapi($img_fields,$i);
|
||||
}}
|
||||
if(!empty($view_data['satellite'])){
|
||||
$stt_fields = $common_fields;
|
||||
$stt_fields['img_name'] = $view_data['satellite'][0]['img_name'];
|
||||
$stt_fields['img'] = $view_data['satellite'][0]['img'];
|
||||
cet_creditpd::pushwithcetphotographapi($stt_fields,0);
|
||||
}
|
||||
// print_r($view_data['smc_images']);die();
|
||||
//print_r(count($view_data['smc_images']));die();
|
||||
|
||||
@ -1637,17 +1659,17 @@ public function filterSalesPDList_post() {
|
||||
}
|
||||
}
|
||||
$view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr;
|
||||
// $CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
|
||||
$CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
|
||||
// $CETAPP_creditPD_data[5]['key_stakeholders'] = $temp_arr;
|
||||
}// ### LFMP key_stakeholders ends
|
||||
// log_message('ERROR',"SUSEEN".json_encode($CETAPP_creditPD_data));die();
|
||||
|
||||
cet_creditpd::pushwithcetcreditpdapi($common_fields,$CETAPP_creditPD_data);
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == "NBFC/MFI"){
|
||||
$html_content = $this->load->view('smc_creditpd_reports/NBFC',$view_data,true);
|
||||
}else{
|
||||
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
||||
}
|
||||
|
||||
// echo $html_content;exit();
|
||||
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
||||
$new_pdf_name = "PD_Report_".$view_data['pd_master_details'][0]['main_applicant'];
|
||||
|
||||
@ -1860,6 +1882,50 @@ public function filterSalesPDList_post() {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
function getCreditPDReportforCETApp_get(){
|
||||
// 3090
|
||||
log_message('ERROR','## CreditPDReportforCETApp Fns Entered');
|
||||
$get = $this->get('credit_pd_id');
|
||||
if(!empty($get)){
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($get);
|
||||
if($pd_master_details[0]['pd_status'] == "COMPLETED"){
|
||||
$old_pdf_name = $pd_master_details[0]['main_applicant'];
|
||||
$old_key = 'pd'.$get.'/pd_reports/'.$old_pdf_name.'.pdf';
|
||||
|
||||
$new_pdf_name = "PD_Report_".$pd_master_details[0]['main_applicant'];
|
||||
$new_key = 'pd'.$get.'/pd_reports/'.$new_pdf_name.'.pdf';
|
||||
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.(ENVIRONMENT == 'production' ? 7 : 35);
|
||||
|
||||
$output_file = $this->external_path ."/pd_reports/" . $get . "/temp.pdf";
|
||||
|
||||
$_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$old_key,'30 minutes');
|
||||
|
||||
$headers = @get_headers($_uri);
|
||||
if($headers && strpos( $headers[0], '200')) {
|
||||
$singed_uri = $_uri;
|
||||
}else {
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$new_key,'30 minutes');
|
||||
}
|
||||
$data['records'] = $singed_uri;
|
||||
log_message('ERROR',"Credit Report Generated for CET App");
|
||||
$statusMsg = 'Report Available.';
|
||||
}else{
|
||||
log_message('ERROR',"Credit Report Is Not Completed Given PDID");
|
||||
$statusMsg = 'Report is Not Completed For Given PDID.';
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
log_message('ERROR','Credit Report Not Available for CET App');
|
||||
$statusMsg = 'Report Not Available.';
|
||||
}
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['msg'] = $statusMsg;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
include_once APPPATH.'/vendor/autoload.php';
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
$this->load->helper('satellite_image');
|
||||
$this->load->helper('camunda');
|
||||
$this->load->library('phpmailer_library');
|
||||
$this->load->helper('salespd_cetapp');
|
||||
$this->load->helper('cet_salespd');
|
||||
|
||||
|
||||
}
|
||||
@ -224,7 +224,7 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
$img_split = explode( ',', $view_data['section9'][$i]['img']);
|
||||
$img_fields['img'] = $img_split[1];
|
||||
// $img_fields[0]['img'] = $view_data['section9'][$i]['img'];
|
||||
salespd_cetapp::pushwithcetphotographapi($img_fields,$i);
|
||||
cet_salespd::pushwithcetphotographapi($img_fields,$i);
|
||||
}
|
||||
// "section9":{"selfie_with_person_met":"SAVED","approach_to_pd_location":["SAVED",""],"name_board_seen":["SAVED",""],"stock_image":["SAVED","SAVED","SAVED","SAVED",""],"workplace_interior_image":["SAVED","SAVED",""]}}
|
||||
// $arr1 =array();$arr2 =array();
|
||||
@ -240,13 +240,13 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
// }
|
||||
//}
|
||||
}
|
||||
salespd_cetapp::pushwithcetsalespdapi($common_fields,$section_fields,1);
|
||||
cet_salespd::pushwithcetsalespdapi($common_fields,$section_fields,1);
|
||||
$view_data['satellite_image'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
if(!empty($view_data['satellite_image'])){
|
||||
$stt_fields = $common_fields;
|
||||
$stt_fields['img_name'] = $view_data['satellite_image'][0]['img_name'];
|
||||
$stt_fields['img'] = $view_data['satellite_image'][0]['img'];
|
||||
salespd_cetapp::pushwithcetphotographapi($stt_fields);
|
||||
cet_salespd::pushwithcetphotographapi($stt_fields);
|
||||
}
|
||||
$view_data['product_id'] = $sales_pd_data[0]['product_id'];
|
||||
$view_data['geo_location'] = $sales_pd_data[0]['geo_location'];
|
||||
@ -1380,9 +1380,9 @@ public function filterSalesPDList_post() {
|
||||
$get = $this->get('sales_pd_id');
|
||||
if(!empty($get)){
|
||||
$this->prepareSalesPDReport($get);
|
||||
log_message('ERROR',"Report Generated for CET App");
|
||||
log_message('ERROR',"Sales Report Generated for CET App");
|
||||
}else{
|
||||
log_message('ERROR','Report Not Available for CET App');
|
||||
log_message('ERROR','Sales Report Not Available for CET App');
|
||||
$statusMsg = 'Report Not Available.';
|
||||
}
|
||||
$data['dataStatus'] = true;
|
||||
|
||||
@ -72,7 +72,7 @@ class AUTHORIZATION
|
||||
}
|
||||
|
||||
|
||||
if( $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B)
|
||||
if( $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B || $routingName == ROUTE_LOGIN_C)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
74
api/application/helpers/cet_creditpd_helper.php
Normal file
74
api/application/helpers/cet_creditpd_helper.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
class CET_CREDITPD
|
||||
{
|
||||
// public static function fns(){
|
||||
// echo "I am at 6";
|
||||
// }
|
||||
public static function pushwithcetcreditpdapi($fields,$data)
|
||||
{
|
||||
log_message('ERROR','#### Inside cet creditpd helper fns');
|
||||
if (array_key_exists("Photograph's", $data)) {
|
||||
unset($data["Photograph's"]);
|
||||
}
|
||||
$key_check = array("Supplier details","Clients details","Stock details", "Neighbourhood Details", "Existing Loan Obligations","Business Assets");
|
||||
for($i=0;$i<count($key_check);$i++){
|
||||
if(array_key_exists($key_check[$i],$data)){
|
||||
if(array_key_exists('display_data', $data[$key_check[$i]]))
|
||||
unset($data[$key_check[$i]]['display_data']); }
|
||||
}
|
||||
$fields['data'] = $data;
|
||||
$pdid = $fields['pdid'];
|
||||
$headers = array('Content-Type: application/json');
|
||||
$ch = curl_init();
|
||||
$output_data = json_encode( $fields );
|
||||
// log_message('ERROR',"PullcreditPDData api Request Format : ".$output_data);
|
||||
// curl_setopt( $ch,CURLOPT_URL, "https://demo.devopsmcfinance.com/cet_creditpd/api/PullCreditPdData");
|
||||
curl_setopt( $ch,CURLOPT_URL, CET_CREDIT_PD_INTEGRATION_URL);
|
||||
curl_setopt( $ch,CURLOPT_POST, true );
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, true );
|
||||
curl_setopt( $ch,CURLOPT_POSTFIELDS, $output_data);
|
||||
$result = curl_exec($ch );
|
||||
$response = json_decode($result);
|
||||
log_message('ERROR',"CET APP CREDIT PDID (".$pdid.") response :".json_encode($response));
|
||||
curl_close( $ch );
|
||||
|
||||
}
|
||||
|
||||
// multipart/form-data;
|
||||
public static function pushwithcetphotographapi($fields,$index)
|
||||
{
|
||||
log_message('ERROR','#### pushwithcetphotographapi Helper FNS');
|
||||
$CI =&get_instance();
|
||||
$img = $fields['img'];
|
||||
$pdid = $fields['pdid'];
|
||||
$img = str_replace('data:image/png;base64,', '', $img);
|
||||
$img = str_replace(' ', '+', $img);
|
||||
$data = base64_decode($img);
|
||||
$file = $CI->external_path.'/tmp/temp'. $index .date('Y-m-d_h-i-s') .'.png';
|
||||
$curlFile = curl_file_create($file);
|
||||
$success = file_put_contents($file, $data);
|
||||
$headers = array('Content-Type: multipart/form-data');
|
||||
// $headers = array('Content-Type: application/json');
|
||||
$ch = curl_init();
|
||||
$log_msg = " PullcreditPdPhotographsData api (".$fields['img_name'].")";
|
||||
$fields['img'] = $curlFile;
|
||||
curl_setopt( $ch,CURLOPT_URL, CET_CREDIT_PD_INTEGRATION_IMG_URL);
|
||||
curl_setopt( $ch,CURLOPT_POST, true );
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
// curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, true );
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
|
||||
$result=curl_exec($ch);
|
||||
$response = json_decode($result);
|
||||
log_message('ERROR',"###CET APP CREDIT PDID (".$pdid.") ".$log_msg."response :".json_encode($response));
|
||||
curl_close( $ch );
|
||||
unlink($file);
|
||||
// unlink($file_name_with_full_path);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
class SALESPD_CETAPP
|
||||
class CET_SALESPD
|
||||
{
|
||||
public static function pushwithcetsalespdapi($fields,$data,$flag)
|
||||
public static function pushwithcetsalespdapi_bkup($fields,$data,$flag)
|
||||
{
|
||||
log_message('ERROR','#### pushwithcetsalespdapi Helper FNS');
|
||||
$fields['data'] = $data;
|
||||
@ -44,12 +44,33 @@ class SALESPD_CETAPP
|
||||
// log_message('ERROR',"result : ".json_encode($result));
|
||||
curl_close( $ch );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static function pushwithcetsalespdapi($fields,$data,$flag)
|
||||
{
|
||||
log_message('ERROR','#### pushwithcetsalespdapi Helper FNS');
|
||||
$fields['data'] = $data;
|
||||
$pdid = $fields['pdid'];
|
||||
$headers = array('Content-Type: application/json');
|
||||
$ch = curl_init();
|
||||
$output_data = json_encode( $fields );
|
||||
// log_message('ERROR',"PullSalesPDData api Request Format : ".$output_data);
|
||||
curl_setopt( $ch,CURLOPT_URL, CET_SALESPD_INTEGRATION_URL);
|
||||
curl_setopt( $ch,CURLOPT_POST, true );
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, true );
|
||||
curl_setopt( $ch,CURLOPT_POSTFIELDS, $output_data);
|
||||
$result = curl_exec($ch );
|
||||
$response = json_decode($result);
|
||||
log_message('ERROR',"CET APP SALES PDID (".$pdid.") ".$log_msg."PullSalesPDData api response :".json_encode($response));
|
||||
curl_close( $ch );
|
||||
|
||||
}
|
||||
// multipart/form-data;
|
||||
public static function pushwithcetphotographapi($fields,$index)
|
||||
{
|
||||
// log_message('ERROR','#### pushwithcetphotographapi Helper FNS');
|
||||
log_message('ERROR','#### pushwithcetphotographapi Helper FNS');
|
||||
$CI =&get_instance();
|
||||
$img = $fields['img'];
|
||||
$pdid = $fields['pdid'];
|
||||
@ -63,10 +84,9 @@ class SALESPD_CETAPP
|
||||
// $headers = array('Content-Type: application/json');
|
||||
$ch = curl_init();
|
||||
// $url = 'https://apitest.pdgenie.com/file_receive.php';
|
||||
$url = 'https://demo.devopsmcfinance.com/cet_salespd/api/PullSalesPdPhotographsData';
|
||||
$log_msg = " PullSalesPdPhotographsData api (".$fields['img_name'].")";
|
||||
$fields['img'] = $curlFile;
|
||||
curl_setopt( $ch,CURLOPT_URL, $url);
|
||||
curl_setopt( $ch,CURLOPT_URL, CET_SALESPD_INTEGRATION_IMG_URL);
|
||||
curl_setopt( $ch,CURLOPT_POST, true );
|
||||
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
|
||||
@ -74,11 +94,9 @@ class SALESPD_CETAPP
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
|
||||
$result=curl_exec($ch);
|
||||
$response = json_decode($result);
|
||||
log_message('ERROR',"###CET APP PDID (".$pdid.") ".$log_msg."response :".json_encode($response));
|
||||
log_message('ERROR',"###CET APP SALES PDID (".$pdid.") ".$log_msg."response :".json_encode($response));
|
||||
curl_close( $ch );
|
||||
unlink($file);
|
||||
// unlink($file_name_with_full_path);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
109
api/application/helpers/faceapi_helper.php
Normal file
109
api/application/helpers/faceapi_helper.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
class faceapi
|
||||
{
|
||||
public static function toMakeFaceBoundingBox($image_name,$BoundingBox,$destination_path){
|
||||
$get_image_format = explode(".",$image_name);
|
||||
// $image_format = $get_image_format[1];
|
||||
$img = imagecreatefrompng($destination_path);
|
||||
// if($image_format == 'png'){
|
||||
// $img = imagecreatefrompng($destination_path);
|
||||
// }else if($image_format == 'jpeg'){
|
||||
// $img = imagecreatefromjpeg($destination_path);
|
||||
// }else if($image_format == 'jpg'){
|
||||
// $img = imagecreatefromjpg($destination_path);
|
||||
// }
|
||||
|
||||
|
||||
$red = imagecolorallocate($img, 255, 0, 0);
|
||||
$black = imagecolorallocate($img, 0, 0, 0);
|
||||
$white = imagecolorallocate($img, 255, 255, 255);
|
||||
|
||||
|
||||
|
||||
list($imagewidth, $imageheight) = getimagesize($destination_path);
|
||||
|
||||
for($i=0;$i<count($BoundingBox);$i++){
|
||||
|
||||
$Left_coordinate = ($BoundingBox[$i]['Left'] * $imagewidth) ;
|
||||
$Top_coordinate = ($BoundingBox[$i]['Top'] * $imageheight) ;
|
||||
$Face_width = ($BoundingBox[$i]['Width'] * $imagewidth) ;
|
||||
$Face_height = ($BoundingBox[$i]['Height'] * $imageheight) ;
|
||||
$Similarity = round($BoundingBox[$i]['Similarity']);
|
||||
|
||||
$x1 = $Left_coordinate;
|
||||
$y1 = $Top_coordinate;
|
||||
|
||||
self::DrawLine($x1,$y1,$Face_width,$Face_height,$Similarity,$img,$destination_path);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function DrawLine($x1,$y1,$Face_width,$Face_height,$Similarity,$img,$destination_path){
|
||||
if($Similarity >= 70 ){// above 70 green
|
||||
$color = imagecolorallocate($img, 0, 153, 0);
|
||||
}else if($Similarity < 70 ){// below 70 red
|
||||
$color = imagecolorallocate($img, 255, 0, 0);
|
||||
}
|
||||
$Similarity = $Similarity." %";
|
||||
//TOP LINe
|
||||
$t_x1 = $x1;
|
||||
$t_y1 = $y1;
|
||||
$t_x2 = ($x1+$Face_width);
|
||||
$t_y2 = $y1;
|
||||
|
||||
//bottom line
|
||||
$b_x1 = $x1;
|
||||
$b_y1 = ($y1+$Face_height);
|
||||
$b_x2 = ($x1+$Face_width);
|
||||
$b_y2 = ($y1+$Face_height);
|
||||
|
||||
$imgl = self::imagelinethick($img,$t_x1,$t_y1,$t_x2,$t_y2,$color,7);//top line
|
||||
$imgl = self::imagelinethick($img,$b_x1,$b_y1,$b_x2,$b_y2,$color,7);//bottom line
|
||||
$imgl = self::imagelinethick($img,$t_x1,$t_y1,$b_x1,$b_y1,$color,7);//left line
|
||||
$imgl = self::imagelinethick($img,$t_x2,$t_y2,$b_x2,$b_y2,$color,7);//right line
|
||||
// apppath / doc la roboto.tff
|
||||
$font = APPPATH."docs/roboto.ttf";
|
||||
imagettftext($img, 20, 0, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
|
||||
imagepng($img, $destination_path);
|
||||
// imagepng($img, "face4.png");
|
||||
// if($image_format == 'png'){
|
||||
// imagepng($img, $destination_path);
|
||||
// }else if($image_format == 'jpeg'){
|
||||
// imagejpeg($img, $destination_path);
|
||||
// }else if($image_format == 'jpg'){
|
||||
// imagejpg($img, $destination_path);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public static function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)
|
||||
{
|
||||
/* this way it works well only for orthogonal lines
|
||||
imagesetthickness($image, $thick);
|
||||
return imageline($image, $x1, $y1, $x2, $y2, $color);
|
||||
*/
|
||||
if ($thick == 1) {
|
||||
return imageline($image, $x1, $y1, $x2, $y2, $color);
|
||||
}
|
||||
$t = $thick / 2 - 0.5;
|
||||
if ($x1 == $x2 || $y1 == $y2) {
|
||||
return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);
|
||||
}
|
||||
$k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q
|
||||
$a = $t / sqrt(1 + pow($k, 2));
|
||||
$points = array(
|
||||
round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),
|
||||
round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),
|
||||
round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),
|
||||
round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),
|
||||
);
|
||||
imagefilledpolygon($image, $points, 4, $color);
|
||||
return imagepolygon($image, $points, 4, $color);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
@ -740,7 +740,7 @@ class PDALERTS
|
||||
$CI->db->FROM(COMMONMASTER.' as COMMONMASTER');
|
||||
$CI->db->JOIN(USERPROFILE.' as USERPROFILE','COMMONMASTER.fk_createdby = USERPROFILE.userid','LEFT');
|
||||
$CI->db->WHERE('COMMONMASTER.table_name="'.PDTRIGGER.'" AND COMMONMASTER.primary_key=',$pd_id);
|
||||
$CI->db->WHERE('COMMONMASTER.old_value ="'.ALLOCATED.'" AND COMMONMASTER.new_value ="'.ALLOCATED_TO_FIA.'"');
|
||||
$CI->db->WHERE('COMMONMASTER.new_value ="'.ALLOCATED_TO_FIA.'"');
|
||||
$CI->db->ORDER_BY('COMMONMASTER.log_id','desc');
|
||||
$logs = $CI->db->GET()->result_array();
|
||||
$case_initiated_by = count($logs) > 0 ? $logs[0]['createdby'] : "-";
|
||||
@ -756,19 +756,19 @@ class PDALERTS
|
||||
$mail_id = $rcm_mail_id;
|
||||
}
|
||||
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 2(RCM and CM) PD ID :'.$pd_id." and MAIL : ".$mail_id);
|
||||
$msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']." have been triggered to the vendor. ";
|
||||
$subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name'];
|
||||
$msg = "PD for Loan Application ID-".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']." have been triggered to the vendor. ";
|
||||
$subject = "PD allocated to vendor for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name'];
|
||||
$ref_str = "vendor email id";
|
||||
}
|
||||
if($flag == 1){ // Mail Content For - Agency ONLY
|
||||
$mail_id = $core_details[0]['agency_mail'];
|
||||
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1(AGENCY) PD ID :'.$pd_id." and MAIL : ".$mail_id);
|
||||
$msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']." have been allocated to you. ";
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name'];
|
||||
$msg = "PD for Loan Application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']." have been allocated to you. ";
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name'];
|
||||
$ref_str = "client email id";
|
||||
}
|
||||
if($flag == 3){ // Mail Conent For - Allocated Person ONLY
|
||||
$mail_id = $core_details[0]['allocated_email'];
|
||||
// $mail_id = $core_details[0]['allocated_email'];
|
||||
log_message('ERROR','#### MW-AGENCY MAIL CALLED TYPE 3(Normal Allocated Person) PD ID : '.$pd_id." and MAIL : ".$mail_id);
|
||||
$CI->db->SELECT("*");
|
||||
$CI->db->FROM(PDNOTIFICATIONMSG." as PDNOTIFICATIONMSG");
|
||||
@ -777,12 +777,12 @@ class PDALERTS
|
||||
$pd_notification_msg = $CI->db->GET()->result_array();
|
||||
$msg = $pd_notification_msg[0]['lender'];
|
||||
$msg = self::stringReplace($msg,$core_details,'MAIL');
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name'];
|
||||
$subject = "PD allocated for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name'];
|
||||
$ref_str = "";
|
||||
// $mail->addBCC("sanjeev.p@venbainfotech.com");
|
||||
}
|
||||
|
||||
if(!empty($core_details[0]['excel_file_id']) && $core_details[0]['excel_file_id'] != null){
|
||||
// if(!empty($core_details[0]['excel_file_id']) && $core_details[0]['excel_file_id'] != null){
|
||||
$CI->db->SELECT("PDAPPLICANTSDETAILS.applicant_name,PDAPPLICANTSDETAILS.mobile_no");
|
||||
$CI->db->FROM(PDAPPLICANTSDETAILS." as PDAPPLICANTSDETAILS");
|
||||
$CI->db->WHERE("PDAPPLICANTSDETAILS.fk_pd_id",$pd_id);
|
||||
@ -799,20 +799,22 @@ class PDALERTS
|
||||
$company_name = "-";
|
||||
$applicant_name = "-";
|
||||
}
|
||||
}else{
|
||||
$company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
|
||||
$applicant_name = $core_details[0]['applicant_name'] ? $core_details[0]['applicant_name'] : "-";
|
||||
}
|
||||
// }else{
|
||||
// $company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
|
||||
// $applicant_name = $core_details[0]['applicant_name'] ? $core_details[0]['applicant_name'] : "-";
|
||||
// }
|
||||
// $company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
|
||||
$msg .= "<br><br> 1. Name of the firm : ".$company_name
|
||||
."<br> 2. Address : ".$core_details[0]['addressline1'].",".$core_details[0]['city_name'].",".$core_details[0]['state_name']."-".$core_details[0]['pincode']."."
|
||||
."<br> 3. Loan Amount : ".$core_details[0]['loan_amount']
|
||||
."<br> 4. Name of the loan applicant : ".$applicant_name
|
||||
."<br> 5. Contact Number : ".$core_details[0]['mobile_no']
|
||||
."<br> 6. Case initiated by : ".$case_initiated_by;
|
||||
."<br> 6. Case initiated by : ".$case_initiated_by
|
||||
."<br> 7. Case allocated to : ".($core_details[0]['agency_name'] ? $core_details[0]['agency_name'] : ($core_details[0]['pdofficer_name'] ? $core_details[0]['pdofficer_name'] : "-"));
|
||||
if(!empty($ref_str)){
|
||||
$msg .= "<br><br><br> This is an automatically generated notification mail. Please contact on ".$ref_str." for any
|
||||
queries/update. ";
|
||||
|
||||
if(!empty($mail_id)){
|
||||
$arg = array('mail'=>$mail_id,'pd_id'=>$pd_id,'msg'=>$msg,'subject'=>$subject);
|
||||
SELF::send_smcagencymail($CI,$arg);
|
||||
|
||||
@ -24,7 +24,8 @@ class smc_creditpd
|
||||
case 14://future
|
||||
case 18://credit
|
||||
case 19://final remarks
|
||||
$return_data = json_decode($section['json'],true);
|
||||
// $return_data = json_decode($section['json'],true);
|
||||
$return_data = SELF::getFinalRemarksSectionData($section);
|
||||
break;
|
||||
case 3://fund
|
||||
$return_data = SELF::getLoanSectionData($section);
|
||||
@ -34,6 +35,7 @@ class smc_creditpd
|
||||
break;
|
||||
case 8://assest
|
||||
$return_data = SELF::getAssestSectionData($section);
|
||||
// print_r($return_data);
|
||||
break;
|
||||
|
||||
case 11://supplier
|
||||
@ -185,7 +187,9 @@ class smc_creditpd
|
||||
$seven_row = '<tr>'.'<td> Is there a Loan Against the Asset? (Yes / No) </td>';
|
||||
foreach ($json['business_assets_details'] as $key => $value)
|
||||
{
|
||||
|
||||
$json['business_assets_details'][$key]['business_assets_mode_name'] = ( $value['business_assets_mode'] == 1 ? $value['other_asset_description'] : $asset_type [ $value['business_assets_mode'] ]);
|
||||
$json['business_assets_details'][$key]['business_owner_name'] = (isset($value['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($value['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
|
||||
$description = $value['other_asset_description'];
|
||||
if(isset($value['property_type']))
|
||||
{
|
||||
@ -381,6 +385,7 @@ class smc_creditpd
|
||||
$eight_row = '<tr>'.'<td> Balance Tenure (Mnts) </td>';
|
||||
foreach ($json['existing_loan_details'] as $key => $value)
|
||||
{
|
||||
$json['existing_loan_details'][$key]['business_owner_name'] = (isset($value['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($value['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
|
||||
$header_row .= '<th>Loan '.($key + 1).'</th>';
|
||||
$first_row .= '<td style="text-align:center;">'. $value['loan_type'] .'</td>';
|
||||
@ -533,6 +538,17 @@ class smc_creditpd
|
||||
return $json;
|
||||
}
|
||||
|
||||
static function getFinalRemarksSectionData($section)
|
||||
{
|
||||
$json = json_decode($section['json'],true);
|
||||
$customer_behaviour = array("1" => 'Others',"2" => 'Rude',"3" => 'Polite');
|
||||
$pd_officer_recommandations = array("2"=>'Positive',"3"=>'Negative',"5"=>'Refer to Credit',"0"=>'Others');
|
||||
$json['pd_officer_recommendation_name'] = isset($value['pd_officer_recommendation'])? $pd_officer_recommandations [ $value['pd_officer_recommendation_name'] ] : 'NA';
|
||||
$json['customer_behaviour_name'] = (isset($value['customer_behaviour']) ? $customer_behaviour [ $value['customer_behaviour'] ] : 'NA');
|
||||
// echo 'json***';
|
||||
// print_r($json);
|
||||
return $json;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@ -711,6 +711,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -718,6 +718,10 @@ font-weight: bolder;;
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -712,6 +712,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -708,6 +708,10 @@ if ( isset($pdf) ) {
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -691,6 +691,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo "</div>";
|
||||
echo '<br>';
|
||||
|
||||
|
||||
@ -712,6 +712,10 @@ if ( isset($pdf) ) {
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -710,6 +710,10 @@ if ( isset($pdf) ) {
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -678,6 +678,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -678,6 +678,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -679,6 +679,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
@ -682,6 +682,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
//echo '</div>';
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
|
||||
@ -689,6 +689,10 @@ font-weight: bolder;;
|
||||
}
|
||||
//echo '</div>';
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '<br>';
|
||||
?>
|
||||
|
||||
|
||||
@ -680,6 +680,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
|
||||
|
||||
|
||||
}
|
||||
if(isset($pd_master_details[0]['face_api_image']))
|
||||
{
|
||||
echo '<img src="'.$pd_master_details[0]['face_api_image'].'" width="300" height="200" alt=""/>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user