CUS VIDEO SAVE API
This commit is contained in:
parent
0a6f3fd9cb
commit
fa66efe6c8
@ -617,5 +617,7 @@ defined('SALESPD_SECTION_DATA') OR define('SALESPD_SECTION_DATA','t_salespd_sect
|
||||
|
||||
defined('CUS_LINK_META_DATA') OR define('CUS_LINK_META_DATA','t_cus_link_meta_data');
|
||||
|
||||
defined('CUS_VIDEO') OR define('CUS_VIDEO','t_cus_video');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -224,7 +224,8 @@ $route['getLenderContactPersons'] = 'PD_Controller/getLenderContactPersons';
|
||||
$route['getLenderContactPersons'] = 'PD_Controller/getLenderContactPersons';
|
||||
$route['saveApplicantFromGeneralForm'] = 'PD_Controller/saveApplicantFromGeneralForm';
|
||||
$route['putSalCheck'] = 'PD_Controller/putSalCheck';
|
||||
$route['sendCusLinkViaSMS'] = 'PD_Controller/sendCusLinkViaSMS';
|
||||
$route['sendCusLinkViaSMS'] = 'PD_Controller/sendCusLinkViaSMS';
|
||||
$route['saveCusVideo'] = 'PD_Controller/saveCusVideo';
|
||||
// $route['getPDFormDetailsJSON'] = 'PD_Controller/getPDFormDetailsJSON';
|
||||
|
||||
$route['smartyTestFunction'] = 'PD_Controller/smartyTestFunction';
|
||||
|
||||
@ -20,7 +20,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
//class level variable declaration
|
||||
//protected $external_path;
|
||||
private $photo_names = array('selfie_with_person_met' => array('Person met','18'),'person_met_id' => array('Person met ID Proof','18'),'name_board_seen' => array('Name Board Seen','13'), 'stock_image' => array('Stock image','11'),'attendance_seen_pic' => array('Attendance Img','13'),'attendance_seen_pic' => array('Attendance Img','13'),'client_image' => array('Client Bills','2'),'supplier_image' => array('Supplier Bills','1'),'machinary_image' => array('Machinery Image','22'),'gst_Regn_cert_pic' => array('GST Regn Cert','13'),'pf_regn_pic' => array('PF Regn','13'),'esic_regn_pic' => array('ESIC Regn','13'),'export_import_cert_pic' => array('Export Import Cert','13'),'factory_cert_pic' => array('Factory Cert','13'),'shop_eat_act_cert_pic' => array('Shop Est Act Cert','13'),'eb_bill_pic' => array('EB Bill','13'),'practice_cert_pic' => array('Cert of Practice','13'),'fire_noc_pic' => array('Fire NOC','13'));
|
||||
private $photo_names = array('selfie_with_person_met' => array('Person met','18'),'person_met_id' => array('Person met ID Proof','18'),'name_board_seen' => array('Name Board Seen','13'), 'stock_image' => array('Stock image','11'),'client_image' => array('Client Bills','2'),'supplier_image' => array('Supplier Bills','1'),'machinary_image' => array('Machinery Image','22'),'gst_Regn_cert_pic' => array('GST Regn Cert','13'),'pf_regn_pic' => array('PF Regn','13'),'esic_regn_pic' => array('ESIC Regn','13'),'export_import_cert_pic' => array('Export Import Cert','13'),'factory_cert_pic' => array('Factory Cert','13'),'shop_eat_act_cert_pic' => array('Shop Est Act Cert','13'),'eb_bill_pic' => array('EB Bill','13'),'practice_cert_pic' => array('Cert of Practice','13'),'fire_noc_pic' => array('Fire NOC','13'));
|
||||
private $existing_imges = array();
|
||||
|
||||
function __construct()
|
||||
@ -7558,27 +7558,29 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
#####Address Form Questions########
|
||||
$address_form = (json_decode($form_data[5][0]['processed_json'],true));
|
||||
//print_r($address_form);die();
|
||||
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
if(isset($address_form['is_pd_done_on_initiated_address']) && $address_form['is_pd_done_on_initiated_address'] != 1)
|
||||
{
|
||||
|
||||
|
||||
if(!$is_this_tele_pd)
|
||||
{
|
||||
|
||||
// 4 - QNO(1.2) - Comment on locality
|
||||
$score_questions['general']['comment_locality'] = $address_form['alternative_addresses'][0]['comment_locality_master'];
|
||||
// 5 - QNO(1.3) - pd location approach
|
||||
$score_questions['general']['pd_location_approach'] = $address_form['alternative_addresses'][0]['pd_location_master'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else //get it from alternative address
|
||||
{
|
||||
else //get it from alternative address
|
||||
{
|
||||
|
||||
// 4 - QNO(1.2) - Comment on locality
|
||||
$score_questions['general']['comment_locality'] = $address_form['addresses'][0]['comment_locality_master'];
|
||||
// 5 - QNO(1.3) - pd location approach
|
||||
$score_questions['general']['pd_location_approach'] = $address_form['addresses'][0]['pd_location_master'];
|
||||
// 4 - QNO(1.2) - Comment on locality
|
||||
$score_questions['general']['comment_locality'] = $address_form['addresses'][0]['comment_locality_master'];
|
||||
// 5 - QNO(1.3) - pd location approach
|
||||
$score_questions['general']['pd_location_approach'] = $address_form['addresses'][0]['pd_location_master'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9038,6 +9040,12 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$docs_to_be_collected = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' =>$pd_id),PDDOCSTOBECOLLECTED);
|
||||
//print_r($docs_to_be_collected);//die();
|
||||
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($pd_id);
|
||||
if($pd_master_details[0]['customer_segment_abbr'] == 'SAL')
|
||||
{
|
||||
$this->photo_names['attendance_seen_pic'] = array('Attendance Img','13');
|
||||
}
|
||||
|
||||
$final_data = array();
|
||||
$common_images = array();
|
||||
//print_r(($this->existing_imges));die();
|
||||
@ -9239,6 +9247,48 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function saveCusVideo_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$id = null;
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($records['pd_id']);
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||
$key = 'pd'.$records['pd_id'].'/video/'.$records['filename'];
|
||||
|
||||
|
||||
//$temp_file = XLPATH.'/pd_reports/'.$records['pd_id'].'/temp.txt';
|
||||
$sourcefile = $_FILES['video_file']['tmp_name'];
|
||||
// $current_file = fopen($temp_file,'w');
|
||||
// fwrite($current_file, $records['video_blob']);
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$temp_file);
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
log_message('ERROR','###PDVIDEO stored in S3'.$records['pd_id']);
|
||||
$record_data = array('fk_pd_id' => $records['pd_id'],'video_part_name'=>$records['filename']);
|
||||
$id = $this->PD_Model->saveRecords($record_data,CUS_VIDEO);
|
||||
|
||||
}
|
||||
|
||||
if($id != null || $id != "")
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['msg'] = 'Video Saved Successfully';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||
$data['msg'] = 'Something Wrong. Try Later!';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1109,17 +1109,17 @@ if ( isset($pdf) ) {
|
||||
$address_type = $pd_address['address_type'] == 1? $pd_address['address_type_others'] : $pd_address['address_type_master'];
|
||||
$estimated_area = $pd_address['estimated_area'].' ';
|
||||
$estimated_area .= isset($pd_address['uom_others']) && ($pd_address['uom_others'] != "" || $pd_address['uom_others'] != null) ? $pd_address['uom_others'] : $pd_address['uom_master'];
|
||||
$locality = $pd_address['locality'] == 1 ? $pd_address['locality_others']: $pd_address['locality_master'];
|
||||
$locality = $pd_address['locality'] == 1 ? $pd_address['locality_others']: $pd_address['locality_master'];
|
||||
|
||||
$locality = preg_match("/^[aeiouAEIOU]/U", $locality) ? 'an '.$locality : 'a '.$locality;
|
||||
$comment_locality_master = preg_match("/^[aeiouAEIOU]/U", $pd_address['comment_locality_master']) ? 'an '.$pd_address['comment_locality_master'] : 'a '.$pd_address['comment_locality_master'];
|
||||
$locality = preg_match("/^[aeiouAEIOU]/U", $locality) ? 'an '.$locality : 'a '.$locality;
|
||||
// $comment_locality_master = preg_match("/^[aeiouAEIOU]/U", $pd_address['comment_locality_master']) ? 'an '.$pd_address['comment_locality_master'] : 'a '.$pd_address['comment_locality_master'];
|
||||
$property_owner_type = $business_assets_details['business_assets_for_address'][0]['business_ownership_type'];
|
||||
if($property_owner_type == 'rented') { $property_owner_type ='Rented (Rent '.$rupee_symbol.' '.$business_assets_details['business_assets_for_address'][0]['business_monthly_rented_amt'].' Per Month)'; }else{$property_owner_type = 'Owned'; }
|
||||
$yrs_being_run = $business_assets_details['business_assets_for_address'][0]['business_years'].' Years';
|
||||
if($business_assets_details['business_assets_for_address'][0]['business_month'] != ""){ $yrs_being_run.= ' and '.$business_assets_details['business_assets_for_address'][0]['business_month'].' Months';}
|
||||
|
||||
echo '<p style="text-align:justify;">';
|
||||
echo 'he PD was telephonically done with the loan applicant(s) at <span class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></span> of the loan applicants.';
|
||||
echo 'the PD was telephonically done with the loan applicant(s) at <span class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></span>. ';
|
||||
echo 'The <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> is <span class="tooltip">'.$property_owner_type.'<span class="tooltiptext">Business Assest Form - Owner of the Property </span></span> and the business has been in operation from here for the last <span class="tooltip">'.$yrs_being_run.'<span class="tooltiptext">Business Assest Form - Business running Yrs in this premise </span></span>.';
|
||||
echo '<br><br>The <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> is located in <span class="tooltip">'.$locality.'<span class="tooltiptext">Address Form - Locality of Address </span></span> '.($estimated_area != 0? 'and the estimated area of the <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> is <span class="tooltip">'.$estimated_area.'<span class="tooltiptext">Address Form - Estimated Area </span></span> .' : '');
|
||||
// echo '<br><br><span contenteditable="true">The PD location was </span><span class="tooltip">'. $pd_address['pd_location_master'].'<span class="tooltiptext">Address Form - Approach to PD location </span></span>. ' . '<span contenteditable="true">As Per PD Officer, the</span> <span class="tooltip">'.$address_type .'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is situated in</span><span class="tooltip"> '.$comment_locality_master .'<span class="tooltiptext">Address Form - Comment on locality </span></span> <span contenteditable="true">Locality.</span>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user