Video Log : ps

This commit is contained in:
VE10-Sanjeev 2022-11-17 13:45:36 +05:30
parent 2784ae3cb0
commit 49c57af16d
2 changed files with 9 additions and 2 deletions

View File

@ -10264,11 +10264,14 @@ class PD_Controller extends REST_Controller
{
$id = $this->PD_Model->saveRecords($records, VIDEO_ROOM_INFO);
if($records['user_id'] != null){
$log_array = array('primary_key' => $records['fk_pd_id'], 'table_name' => 't_video_room_info','field_name' => 'user_id','new_value' => $records['user_id']);
$log_array = array('primary_key'=>$records['fk_pd_id'],'table_name'=>'t_pd_triggered',
'field_name'=>'video_call_initiate_user','old_value'=>null,'new_value'=>null,
'fk_createdby'=>$records['user_id'],'createdon' => date('Y-m-d H-i-s'));
$this->PD_Model->saveRecords($log_array, `h_common_masters`);}
// print_r($this->db->last_query());
} else {
$this->load->library('twlio');
unset($records['user_id']);
$composition_result_data = $this->twlio->startComposistion($records['room_id']);
// $composition_result_data = $this->twlio->startComposistion('RM23b8d502434e46e696d1fbd5d64c59c8');
// print_r($composition_result_data);

View File

@ -631,7 +631,7 @@ class PD_Model extends SPARQ_Model {
//get pd Master Details
$pd_master_detials = $this->getPDMasterDetails($pdid);
$arrayForText = array("fk_lender_id" => "Lender", "fk_entity_billing_id" => "Billing ID", "lender_applicant_id" => "Applicant Ref ID", "pd_date_of_initiation" => "PD Date of Initiation", "fk_product_id" => "Product", "fk_subproduct_id" => "Sub Product","fk_pd_type" => "PD Type", "pd_status" => "PD Status", "pd_specific_clarification"=> "PD Specific Clarification","fk_pd_allocation_type" => "Allocation Type", "fk_pd_allocated_to" => "Allocated Person", "fk_pd_template_id" => "PD Tempale", "fk_customer_segment" => "Customer Segment", "pd_officier_final_judgement" => "PD Officer Finale Judgement", "pd_agency_id" => "PD Agency", "loan_amount" => "Loan Amount", "addressline1" => "Addressline1", "addressline2" => "Addressline1", "addressline3" => "Addressline1", "fk_city" => "City", "fk_state" => "State", "pincode" => "Pincode", "bounce_reason" => "Bounce Reason", "executive_id" => "PD Executive","central_pd_officer_id"=>"Central PD Officer","pd_contact_person" => "Lender Contact Person", "pd_contact_mobileno" => "Lender Contact Mobile Number", "scheduled_on" => "Scheduled On", "completed_on" => "Completed On",'fk_address_id' => 'PD Address Map','fk_primary_address_id' => 'Primary Address',"vendor_status" => 'Vendor Status');
$arrayForText = array("fk_lender_id" => "Lender", "fk_entity_billing_id" => "Billing ID", "lender_applicant_id" => "Applicant Ref ID", "pd_date_of_initiation" => "PD Date of Initiation", "fk_product_id" => "Product", "fk_subproduct_id" => "Sub Product","fk_pd_type" => "PD Type", "pd_status" => "PD Status", "pd_specific_clarification"=> "PD Specific Clarification","fk_pd_allocation_type" => "Allocation Type", "fk_pd_allocated_to" => "Allocated Person", "fk_pd_template_id" => "PD Tempale", "fk_customer_segment" => "Customer Segment", "pd_officier_final_judgement" => "PD Officer Finale Judgement", "pd_agency_id" => "PD Agency", "loan_amount" => "Loan Amount", "addressline1" => "Addressline1", "addressline2" => "Addressline1", "addressline3" => "Addressline1", "fk_city" => "City", "fk_state" => "State", "pincode" => "Pincode", "bounce_reason" => "Bounce Reason", "executive_id" => "PD Executive","central_pd_officer_id"=>"Central PD Officer","pd_contact_person" => "Lender Contact Person", "pd_contact_mobileno" => "Lender Contact Mobile Number", "scheduled_on" => "Scheduled On", "completed_on" => "Completed On",'fk_address_id' => 'PD Address Map','fk_primary_address_id' => 'Primary Address',"vendor_status" => 'Vendor Status',"video_call_initiate_user"=> "Call Initiated User");
$this->db->SELECT('COMMONMASTER.log_id, COMMONMASTER.primary_key, COMMONMASTER.table_name, COMMONMASTER.field_name, COMMONMASTER.old_value, COMMONMASTER.new_value, COMMONMASTER.fk_createdby, DATE_FORMAT(COMMONMASTER.createdon,"%D %b %Y at %h:%i:%s %p") as createdon,COMMONMASTER.createdon raw_date_createdon,concat(USERPROFILE.first_name," ",IFNULL(USERPROFILE.last_name,"")) as createdby,ENTITYBILLINGOLD.billing_name as old_billing_name,ENTITYBILLINGNEW.billing_name as new_billing_name,ENTITYOLD.full_name as old_entity_name,ENTITYNEW.full_name as new_entity_name,PRODUCTSOLD.abbr as old_product,PRODUCTSNEW.abbr as new_product,SUBPRODUCTSOLD.abbr as old_sub_product,SUBPRODUCTSNEW.abbr as new_sub_product,PDTYPEOLD.type_name as old_type_name,PDTYPENEW.type_name as new_type_name,concat(ALLOCATEDOLD.first_name," ",IFNULL(ALLOCATEDOLD.last_name,"")) as old_allocated_to,concat(ALLOCATEDNEW.first_name," ",IFNULL(ALLOCATEDNEW.last_name,"")) as new_allocated_to,TEMPLATEOLD.template_name as old_template_name,TEMPLATENEW.template_name as new_template_name,CUSTOMERSEGMENTOLD.name as old_cs_name,CUSTOMERSEGMENTNEW.name as new_cs_name,AGENCYOLD.full_name as old_agencyname,AGENCYNEW.full_name as new_agencyname,CITYOLD.name as old_city,CITYNEW.name as new_city,STATEOLD.name as old_state,STATENEW.name as new_state,concat(EXECUTIVEOLD.first_name," ",IFNULL(EXECUTIVEOLD.last_name,"")) as old_executive,concat(EXECUTIVENEW.first_name," ",IFNULL(EXECUTIVENEW.last_name,"")) as new_executive,concat(CENTRALPDOLD.first_name," ",IFNULL(CENTRALPDOLD.last_name,"")) as old_central_pd_officer_id,concat(CENTRALPDNEW.first_name," ",IFNULL(CENTRALPDNEW.last_name," ")) as new_central_pd_officer_id,ALLOCATIONOLD.pd_allocation_type_name as old_allocation_type,ALLOCATIONNEW.pd_allocation_type_name as new_allocation_type,BOUNCEMASTEROLD.bounce_reason_name as old_bounce_reason,BOUNCEMASTERNEW.bounce_reason_name as new_bounce_reason,PINCODEOLD.pincode as old_pincode,PINCODENEW.pincode as new_pincode,PDTRIGGER.other_pincode');
$this->db->FROM(COMMONMASTER.' as COMMONMASTER');
@ -1016,6 +1016,10 @@ class PD_Model extends SPARQ_Model {
}
break;
case 'video_call_initiate_user':
$log_string = $log['createdby']." initiated call at .".$log['createdon'];
$actual_logs[] = $log_string;
break;
default: