From b008d91eb2164f1fee174bfb24e430a4cebe2b52 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 16 Dec 2022 15:45:28 +0530 Subject: [PATCH] FI report fixes and Api : ps --- api/application/config/routes.php | 5 ++- .../controllers/Flyhi_Controller.php | 37 +++++++++++++++++++ api/application/models/Flyhi_Model.php | 9 +++++ .../JSONTOREPORT_FI_OV_DI.php | 25 ++++++++----- .../JSONTOREPORT_FI_OV_SAL.php | 19 +++++++--- .../report_templates/JSONTOREPORT_FI_RV.php | 22 +++++++---- 6 files changed, 95 insertions(+), 22 deletions(-) diff --git a/api/application/config/routes.php b/api/application/config/routes.php index dc0af2cd..516bfdb1 100755 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -410,9 +410,12 @@ $route['archivePDSMCImages'] = 'SMC_Credit_PD_Controller/archivePDImages'; $route['smcPhotoPDFDownload'] = 'SMC_Credit_PD_Controller/imgPDFDownload'; $route['myFunction']='Flyhi_Controller/myFunction'; $route['previewDigiLockerDocs']='Flyhi_Controller/previewDigiLockerDocs'; +$route['applicantWiseDigiLockerDocs']='Flyhi_Controller/DigiLockerDocs'; $route['purge_pddata']='Data_Dump_Controller/renamingExistingPDinfo'; $route['checkjsonPD']='Data_Dump_Controller/checkjsonPD'; $route['deleteS3Image']='Data_Dump_Controller/deleteS3Images'; -$route['saveShortsVideo'] = 'PD_Controller/saveShortsVideo'; \ No newline at end of file +$route['saveShortsVideo'] = 'PD_Controller/saveShortsVideo'; + +$route['merge']='Data_Dump_Controller/pdfmerge'; \ No newline at end of file diff --git a/api/application/controllers/Flyhi_Controller.php b/api/application/controllers/Flyhi_Controller.php index 52da93a9..6a254062 100644 --- a/api/application/controllers/Flyhi_Controller.php +++ b/api/application/controllers/Flyhi_Controller.php @@ -2549,6 +2549,43 @@ $this->load->view("digital_locker",$view_data); $reponse_data['msg'] = 'No File Uploaded'; $this->response($reponse_data,REST_Controller::HTTP_OK); } + } + + public function DigiLockerDocs_post(){ + $this->load->helper('digital_locker'); + $form_data = $this->post(); + $pd_id = $form_data['pd_id']; + // print_r($pd_id); + $details = $this->Flyhi_Model->getDocsDetails($pd_id); + // print_r($details); + if(!empty($details)){ + + $fields = array('pd_id','fk_lender_id'); + $where_condition_array = array('pd_id' => $pd_id); + $dtls = $this->Flyhi_Model->selectCustomRecords($fields,$where_condition_array,PDTRIGGER); + $pd_id = (count($dtls)>0) ? $dtls[0]['pd_id'] : null; + $fk_lender_id = (count($dtls)>0) ? $dtls[0]['fk_lender_id'] : null; + $bucketname = LENDER_BUCKET_NAME_PREFIX.$fk_lender_id; + for($i=0;$iaws_s3->getSingleObjectInaBucketAsSignedURI($bucketname, $key, '+30 minutes'); + $details[$i]['url'] = $singed_uri; + } + // print_r($details); + $reponse_data['dataStatus'] = true; + $reponse_data['status'] = REST_Controller::HTTP_OK; + $reponse_data['msg'] = $details; + }else{ + $reponse_data['dataStatus'] = false; + $reponse_data['status'] = REST_Controller::HTTP_NO_CONTENT; + $reponse_data['msg'] = 'No Documents Founded'; + } + $this->response($reponse_data,REST_Controller::HTTP_OK); + + + + + } public function readfile($file){ chmod($file, 0777); diff --git a/api/application/models/Flyhi_Model.php b/api/application/models/Flyhi_Model.php index b2e2e742..45d0387c 100644 --- a/api/application/models/Flyhi_Model.php +++ b/api/application/models/Flyhi_Model.php @@ -93,4 +93,13 @@ class Flyhi_Model extends SPARQ_Model { // $modified = $this->db->query($sql); } + public function getDocsDetails($pd_id){ + // c.fk_pd_id, c.applicant_name, c.digi_locker_token, d.pd_document_id, d.fk_pd_id, d.img_type, d.image_key, d.pd_document_title, d.pd_document_name, d.pd_image_alias_name, d.createdon, d.fk_createdby, d.isactive, d.content_type + $sql = "SELECT d.fk_pd_id,c.pd_co_applicant_id, c.applicant_name, d.pd_document_id, d.image_key, d.pd_document_title, d.pd_document_name, d.pd_image_alias_name + FROM t_pd_documents as d + left join t_pd_co_applicants_details as c on c.fk_pd_id = d.fk_pd_id and d.co_applicant_id = c.pd_co_applicant_id + where d.fk_pd_id = ".$pd_id." and d.content_type = 3 and d.isactive = 1"; + return $this->db->query($sql)->result_array(); + } + } \ No newline at end of file diff --git a/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php b/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php index 42afa6c0..7e92186c 100644 --- a/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php +++ b/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php @@ -308,7 +308,8 @@ defined('BASEPATH') or exit('No direct script access allowed'); if (strtoupper($value['is_person_met']) == 'YES') { echo '

' . 'Applicant (' . isset($value['Name_of_the_Person_met_master']) ? $value['Name_of_the_Person_met_master'] : $value['Name_of_the_Person_met'] . ') was met at the visited address.' . '

'; } else if (strtoupper($value['is_person_met']) == 'NO') { - echo '

' . '(' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '

'; + $designation = str_replace(' of', '', $value['designation_person_met_master']); + echo '

' . '(' . $value['Name_of_the_Person'] . ') (' . $designation . ') was met at the visited address during visit.' . '

'; } if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") { echo '

' . $general_form['general_remark'] . '

'; @@ -465,7 +466,7 @@ defined('BASEPATH') or exit('No direct script access allowed'); -
  • Neighbourhood Check Status is .
  • +
  • Neighbourhood Check Status is .
  • @@ -557,7 +558,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
    -
      ✔'; ?>
      -
    • Final Status of Field Visit:
    • + Final Status of Field Visit:

      @@ -616,10 +616,17 @@ defined('BASEPATH') or exit('No direct script access allowed');
      -
      -
    -
    -
  • Remarks:
  • +
    + Remarks: +
      + $remark_value) { + echo '
    • ' . $remark_value['common_remarks'] . '

    • '; + }} + ?> +
    +
    + Remarks: ' . $pd_officer_final_remark . '

    ' ?>
    diff --git a/api/application/views/report_templates/JSONTOREPORT_FI_OV_SAL.php b/api/application/views/report_templates/JSONTOREPORT_FI_OV_SAL.php index 9747c894..db33649e 100644 --- a/api/application/views/report_templates/JSONTOREPORT_FI_OV_SAL.php +++ b/api/application/views/report_templates/JSONTOREPORT_FI_OV_SAL.php @@ -308,7 +308,8 @@ defined('BASEPATH') or exit('No direct script access allowed'); if (strtoupper($value['is_person_met']) == 'YES') { echo '

    ' . 'Applicant (' . isset($value['Name_of_the_Person_met_master']) ? $value['Name_of_the_Person_met_master'] : $value['Name_of_the_Person_met'] . ') was met at the visited address.' . '

    '; } else if (strtoupper($value['is_person_met']) == 'NO') { - echo '

    ' . 'During PD (' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '

    '; + $designation = str_replace(' of', '', $value['designation_person_met_master']); + echo '

    ' . 'During PD (' . $value['Name_of_the_Person'] . ') (' . $designation . ') was met at the visited address during visit.' . '

    '; } if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") { echo '

    ' . $general_form['general_remark'] . '

    '; @@ -506,7 +507,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
    -
      + ✔'; ?> @@ -565,8 +566,16 @@ defined('BASEPATH') or exit('No direct script access allowed'); -
      -
    +
    + Remarks: +
      + $remark_value) { + echo '
    • ' . $remark_value['common_remarks'] . '

    • '; + }} + ?> +
    +
  • Remarks:
  • ' . $pd_officer_final_remark . '

    ' ?> diff --git a/api/application/views/report_templates/JSONTOREPORT_FI_RV.php b/api/application/views/report_templates/JSONTOREPORT_FI_RV.php index 8f36bd3c..c3467563 100644 --- a/api/application/views/report_templates/JSONTOREPORT_FI_RV.php +++ b/api/application/views/report_templates/JSONTOREPORT_FI_RV.php @@ -259,7 +259,7 @@ defined('BASEPATH') or exit('No direct script access allowed'); echo "

    "; echo "
    "; echo "

    VISIT REPORT

    "; - echo "
    for the case of
    "; + echo "
    for the case of
    "; echo "

    " . $main_applicant_name . "

    "; echo "
    "; echo "



    "; @@ -308,7 +308,8 @@ defined('BASEPATH') or exit('No direct script access allowed'); if (strtoupper($value['is_person_met']) == 'YES') { echo '

    ' . 'Applicant (' . isset($value['Name_of_the_Person_met_master']) ? $value['Name_of_the_Person_met_master'] : $value['Name_of_the_Person_met'] . ') was met at the visited address.' . '

    '; } else if (strtoupper($value['is_person_met']) == 'NO') { - echo '

    ' . '(' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '

    '; + $designation = str_replace(' of', '', $value['designation_person_met_master']); + echo '

    ' . '(' . $value['Name_of_the_Person'] . ') (' . $designation . ') was met at the visited address during visit.' . '

    '; } if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") { echo '

    ' . $general_form['general_remark'] . '

    '; @@ -462,7 +463,7 @@ defined('BASEPATH') or exit('No direct script access allowed'); -
  • Neighbourhood Check Status is .
  • +
  • Neighbourhood Check Status is .
  • @@ -559,7 +560,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
    -
      ✔'; ?> @@ -618,8 +618,16 @@ defined('BASEPATH') or exit('No direct script access allowed'); -
      -
    +
    + Remarks: +
      + $remark_value) { + echo '
    • ' . $remark_value['common_remarks'] . '

    • '; + }} + ?> +
    +
  • Remarks:
  • ' . $pd_officer_final_remark . '

    ' ?>