log message mistake : ps
This commit is contained in:
parent
ed25177900
commit
8ea2beb02a
@ -147,18 +147,18 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
// addresses
|
||||
// [{"addressline1":"Third Floor Right Side Bal K 83-84 Udyan Road Uttam Nagar New Delhi","fk_city":"869","fk_state":"5","pincode":"27491","other_pincode":null}]
|
||||
for($i=0;$i<count($GSdata);$i++){
|
||||
log_message("G-Sheet For PD Step 2 (Processing data for-loop)");
|
||||
log_message("info","G-Sheet For PD Step 2 (Processing data for-loop)");
|
||||
if($i==1 && $GSdata[$i] != ""){
|
||||
$modifiedData['lender'] = $GSdata[$i];
|
||||
$fk_lender_id = $this->Data_Dump_Model->getId(1,$GSdata[$i]);
|
||||
$pd_details['fk_lender_id']=$fk_lender_id;
|
||||
$pd_details['sub_entity_id']=$fk_lender_id;
|
||||
log_message("G-Sheet For PD Step 2.1 (First Cell lender/casebookedin) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['lender']." PD :".$pd_details['fk_lender_id']." ".$pd_details['sub_entity_id']);
|
||||
log_message("info","G-Sheet For PD Step 2.1 (First Cell lender/casebookedin) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['lender']." PD :".$pd_details['fk_lender_id']." ".$pd_details['sub_entity_id']);
|
||||
}
|
||||
if($i==2 && $GSdata[$i] != ""){
|
||||
$modifiedData['lender_applicant_id'] = str_replace(" ", "", $GSdata[$i]);
|
||||
$pd_details['lender_applicant_id'] =str_replace(" ", "", $GSdata[$i]);
|
||||
log_message("G-Sheet For PD Step 2.2 (Second Cell - loan applicantid)GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['lender_applicant_id']." PD :".$pd_details['lender_applicant_id']);
|
||||
log_message("info","G-Sheet For PD Step 2.2 (Second Cell - loan applicantid)GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['lender_applicant_id']." PD :".$pd_details['lender_applicant_id']);
|
||||
}
|
||||
if($i==3 && $GSdata[$i] != ""){
|
||||
$applicatantParts = explode(',',$GSdata[$i]);
|
||||
@ -180,11 +180,11 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
$modifiedData['pd_applicant_details'][0]['mobile_no'] = $GSdata[4] ? $GSdata[4] : null;
|
||||
$pd_applicant_details[0]['applicant_type'] = 1;
|
||||
$modifiedData['pd_applicant_details'][0]['applicant_type'] = 1;
|
||||
log_message("G-Sheet For PD Step 2.3 (Third Cell applicantdetails) GSheet data : ".$GSdata[$i]);
|
||||
log_message("info","G-Sheet For PD Step 2.3 (Third Cell applicantdetails) GSheet data : ".$GSdata[$i]);
|
||||
//." Modify : ".$modifiedData." PD :".$pd_details);
|
||||
}
|
||||
if($i==4 && $GSdata[$i] != ""){ $modifiedData['mobileNumber'] = $GSdata[$i];
|
||||
log_message("G-Sheet For PD Step 2.4 (Fourth Cell mobilenumber) GSheet data : ".$GSdata[$i]);
|
||||
log_message("info","G-Sheet For PD Step 2.4 (Fourth Cell mobilenumber) GSheet data : ".$GSdata[$i]);
|
||||
//." Modify : ".$modifiedData." PD :".$pd_details);
|
||||
}
|
||||
if($i==5 && $GSdata[$i] != ""){//address section.
|
||||
@ -214,13 +214,13 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
$pd_details['addressline1']=$addresses['addressline1'];
|
||||
// echo "Original Address : ".$GSdata[$i];
|
||||
// echo "Modified Address : ".$address;
|
||||
log_message("G-Sheet For PD Step 2.5 (Fifth Cell address) GSheet data : ".$GSdata[$i]);
|
||||
log_message("info","G-Sheet For PD Step 2.5 (Fifth Cell address) GSheet data : ".$GSdata[$i]);
|
||||
//." Modify : ".$modifiedData." PD :".$pd_details);
|
||||
}
|
||||
if($i==6 && $GSdata[$i] != ""){
|
||||
$modifiedData['createdPerson'] = $GSdata[$i];
|
||||
$pd_details['fk_createdby'] = $this->Data_Dump_Model->getId(8,$GSdata[$i]);
|
||||
log_message("G-Sheet For PD Step 2.6 (Sixth Cell createdPerson) GSheet data : ".$GSdata[$i]);
|
||||
log_message("info","G-Sheet For PD Step 2.6 (Sixth Cell createdPerson) GSheet data : ".$GSdata[$i]);
|
||||
// ." Modify : ".$modifiedData." PD :".$pd_details);
|
||||
}
|
||||
if($i==7 && ($GSdata[$i] != "" || $GSdata[$i] != 0)){
|
||||
@ -249,7 +249,7 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
}}
|
||||
$modifiedData['loanAmount'] = implode("",$amount);
|
||||
$pd_details['loan_amount'] = implode("",$amount);
|
||||
log_message("G-Sheet For PD Step 2.7 (Seventh Cell Amount) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['loanAmount']." PD :".$pd_details['loan_amount']);
|
||||
log_message("info","G-Sheet For PD Step 2.7 (Seventh Cell Amount) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['loanAmount']." PD :".$pd_details['loan_amount']);
|
||||
}
|
||||
if($i==8 && $GSdata[$i] != ""){
|
||||
$product = explode('/', $GSdata[$i]);
|
||||
@ -266,7 +266,7 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
$fk_product_id = $this->Data_Dump_Model->getId(2,$product[0]);
|
||||
$pd_details['fk_product_id'] = $product[0] ? $fk_product_id : null ;
|
||||
}
|
||||
log_message("G-Sheet For PD Step 2.8 (eighth Cell Product/SubProduct) GSheet data : ".$GSdata[$i]);
|
||||
log_message("info","G-Sheet For PD Step 2.8 (eighth Cell Product/SubProduct) GSheet data : ".$GSdata[$i]);
|
||||
//." Modify : ".$modifiedData." PD :".$pd_details);
|
||||
}
|
||||
if($i==9 && $GSdata[$i] != ""){
|
||||
@ -280,19 +280,19 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
}else{
|
||||
$pd_details['fk_pd_type'] = $modifiedData['type'] == "FULLPD" ? 1 : ($modifiedData['type'] == "SMARTPD" ? 2 :($modifiedData['type'] == "TELEPD" ? 3 : 0) ) ;
|
||||
}
|
||||
log_message("G-Sheet For PD Step 2.9 (ninth Cell type/cs) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['type']." PD :".$pd_details['fk_pd_type']);
|
||||
log_message("info","G-Sheet For PD Step 2.9 (ninth Cell type/cs) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['type']." PD :".$pd_details['fk_pd_type']);
|
||||
}
|
||||
if($i==10 && $GSdata[$i] != ""){
|
||||
// $modifiedData['date'] = $GSdata[$i];
|
||||
$new_date_format = date('Y-m-d H:i:s', strtotime($GSdata[$i]));
|
||||
$modifiedData['date'] = $new_date_format;
|
||||
$pd_details['pd_date_of_initiation'] = $new_date_format;
|
||||
log_message("G-Sheet For PD Step 2.10 (tenth Cell initiationdate) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['date']." PD :".$pd_details['pd_date_of_initiation']);
|
||||
log_message("info","G-Sheet For PD Step 2.10 (tenth Cell initiationdate) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['date']." PD :".$pd_details['pd_date_of_initiation']);
|
||||
}
|
||||
if($i==11 && $GSdata[$i] != ""){
|
||||
$modifiedData['remarks'] = $GSdata[$i];
|
||||
$pd_details['remarks'] = $GSdata[$i];
|
||||
log_message("G-Sheet For PD Step 2.11 (eleventh Cell Remarks) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['remarks']." PD :".$pd_details['remarks']);
|
||||
log_message("info","G-Sheet For PD Step 2.11 (eleventh Cell Remarks) GSheet data : ".$GSdata[$i]." Modify : ".$modifiedData['remarks']." PD :".$pd_details['remarks']);
|
||||
}
|
||||
|
||||
}
|
||||
@ -337,16 +337,16 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
}
|
||||
$pd_details['random_string'] = $randomString;
|
||||
$pd_details['is_notify_enabled'] = 1;
|
||||
log_message("G-Sheet For PD Step 3 (Before Inserting Trigger)");
|
||||
log_message("info","G-Sheet For PD Step 3 (Before Inserting Trigger)");
|
||||
// PDdetails :".$pd_details);
|
||||
try {
|
||||
$pd_id = $this->Data_Dump_Model->saveRecords($pd_details,PDTRIGGER);
|
||||
log_message("G-Sheet For PD Step 4 (PDID gotten) PDID : ".$pd_id);
|
||||
log_message("info","G-Sheet For PD Step 4 (PDID gotten) PDID : ".$pd_id);
|
||||
if(empty($pd_id)) {
|
||||
throw new Exception('Error On Inserting TRIGGER details');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
log_message("G-Sheet For PD Step 4 (PDID gotten) ERR : ".$e->getMessage());
|
||||
log_message("info","G-Sheet For PD Step 4 (PDID gotten) ERR : ".$e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
// $pd_id = 3073;
|
||||
@ -356,7 +356,7 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
{
|
||||
if($pd_applicant_details != "" || $pd_applicant_details != null)
|
||||
{
|
||||
log_message("G-Sheet For PD Step 5 (applicant)");
|
||||
log_message("info","G-Sheet For PD Step 5 (applicant)");
|
||||
// Applicant : ".$pd_applicant_details);
|
||||
foreach($pd_applicant_details as $pd_applicant_detail)
|
||||
{
|
||||
@ -365,13 +365,13 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
if($pd_applicant_detail['company_name']){ $pd_applicant_detail['company_name'] = trim(MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['company_name'])); }
|
||||
try {
|
||||
$co_applicant_id = $this->Data_Dump_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS);
|
||||
log_message("G-Sheet For PD Step 5.1 (applicant pkid) Applicant-ID : ".$co_applicant_id);
|
||||
log_message("info","G-Sheet For PD Step 5.1 (applicant pkid) Applicant-ID : ".$co_applicant_id);
|
||||
if(empty($co_applicant_id)) {
|
||||
throw new Exception('Error On Inserting Applicant details');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
//alert the user.
|
||||
log_message("G-Sheet For PD Step 5.1 (applicant pkid) ERR : ".$e->getMessage());
|
||||
log_message("info","G-Sheet For PD Step 5.1 (applicant pkid) ERR : ".$e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
@ -387,25 +387,25 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
$addresses['assigned_pd'] = $pd_id;
|
||||
try {
|
||||
$address_id = $this->Data_Dump_Model->saveRecords($addresses,PDADDRESS);
|
||||
log_message("G-Sheet For PD Step 6 (Addresses) addressId : ".$address_id);
|
||||
log_message("info","G-Sheet For PD Step 6 (Addresses) addressId : ".$address_id);
|
||||
if(empty($address_id)) {
|
||||
throw new Exception('Error On Inserting Adresses details');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
log_message("G-Sheet For PD Step 6 (Addresses) ERR : ".$e->getMessage());
|
||||
log_message("info","G-Sheet For PD Step 6 (Addresses) ERR : ".$e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
$triggertbl_records = array('fk_primary_address_id'=>$address_id,'fk_address_id'=>$address_id);
|
||||
|
||||
try {
|
||||
$this->Data_Dump_Model->updateRecords($triggertbl_records,PDTRIGGER,array('pd_id' => $pd_id));
|
||||
log_message("G-Sheet For PD Step 7 (updateAddresses in trigger)");
|
||||
log_message("info","G-Sheet For PD Step 7 (updateAddresses in trigger)");
|
||||
if(empty($this->Data_Dump_Model->updateRecords($triggertbl_records,PDTRIGGER,array('pd_id' => $pd_id)))) {
|
||||
throw new Exception('Error On updated Adresses Details in trigger table');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
//alert the user.
|
||||
log_message("G-Sheet For PD Step 7 (updateAddresses in trigger) ERR : ".$e->getMessage());
|
||||
log_message("info","G-Sheet For PD Step 7 (updateAddresses in trigger) ERR : ".$e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user