SMS and CHNAGES
This commit is contained in:
parent
ce43d289b3
commit
801016222f
@ -219,6 +219,7 @@ $route['getPDImages'] = 'PD_Controller/getPDImages';
|
||||
$route['getDashBoardMaster'] = 'Dash_Board_Controller/getDashBoardDetails';
|
||||
$route['getDashBoardLenderCity'] = 'Dash_Board_Controller/getDashBoardDetailsOfLenderAndCitywise';
|
||||
$route['getDashBoardDetailsOfCity'] = 'Dash_Board_Controller/getDashBoardDetailsOfCitywise';
|
||||
$route['getDashBoardAlertDetails'] = 'Dash_Board_Controller/getDashBoardDetailsOfAlert';
|
||||
$route['getDashBoardAlertDetails'] = 'Dash_Board_Controller/getDashBoardDetailsOfAlert';
|
||||
$route['PD_MIS_report'] = 'Dash_Board_Controller/PD_MIS_report';
|
||||
|
||||
|
||||
|
||||
@ -86,5 +86,16 @@ class Dash_Board_Controller extends REST_Controller {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
|
||||
public function PD_MIS_report_get()
|
||||
{
|
||||
$res = $this->Dash_Board_Model->PD_MIS_report();
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $res;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -681,7 +681,7 @@ class PD_Controller extends REST_Controller {
|
||||
public function updatePDMaster_post()
|
||||
{
|
||||
$pd_details = $this->post('records');
|
||||
|
||||
$logger = MYLOG::logFunction();
|
||||
if(isset($pd_details['pd_id']) && $pd_details['pd_id'] != "")
|
||||
{
|
||||
|
||||
@ -729,7 +729,7 @@ class PD_Controller extends REST_Controller {
|
||||
unset($pd_details['link']);
|
||||
$string2 = str_shuffle('1234567890');
|
||||
$OTP = substr($string2,0,6);
|
||||
$msg = "Code for starting your personal discussions with the verification officer is ".$OTP .". Pls share this only when the officer has reached your place in person";
|
||||
$msg = "OTP for starting your personal discussions with the verification officer is ".$OTP.".Pls share this only when the officer has reached your place in person.";
|
||||
$no = (string)$pd_details['mobile_no'];
|
||||
unset($pd_details['mobile_no']);
|
||||
//$pd_details['OTP'] = $OTP;
|
||||
@ -788,29 +788,26 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
if($pd_details['fk_pd_template_id'] != "" || $pd_details['fk_pd_template_id'] != null)
|
||||
{
|
||||
//$logger = MYLOG::logFunction();
|
||||
//$logger->info("TEMPLATE ASSIGN FUNCTIONALTIY".$pd_details['fk_pd_template_id']." CHOOSED",array('ENV'=>ENVIRONMENT,'PDID' => $pd_details['pd_id'],'Pre-Status' => $res_array[0]['pd_status'],'Current_status' => $pd_details['pd_status']));
|
||||
|
||||
$logger->info("TEMPLATE ASSIGN FUNCTIONALTIY".$pd_details['fk_pd_template_id']." CHOOSED",array('ENV'=>ENVIRONMENT,'PDID' => $pd_details['pd_id'],'Pre-Status' => $exist_pd_details[0]['pd_status'],'Current_status' => $pd_details['pd_status']));
|
||||
|
||||
|
||||
|
||||
//$dataToBot = array('ENV'=>ENVIRONMENT,'Task Name'=>'PD Template Assign','Template ID'=>$choosed_template_id[0]['fk_template_id'] ,'PDID'=> $pd_details['pd_id'],'Method' => 'UpdatePDMaster','Pre-Status' => $res_array[0]['pd_status'],'Current_status' => $pd_details['pd_status']);
|
||||
//MYHTTPCLIENT::sendPOST($dataToBot);
|
||||
$dataToBot = array('ENV'=>ENVIRONMENT,'Task Name'=>'PD Template Assign','Template ID'=>$choosed_template_id[0]['fk_template_id'] ,'PDID'=> $pd_details['pd_id'],'Method' => 'UpdatePDMaster','Pre-Status' => $exist_pd_details[0]['pd_status'],'Current_status' => $pd_details['pd_status']);
|
||||
MYHTTPCLIENT::sendPOST($dataToBot);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$primary_address_id = null;
|
||||
//echo "primary_address_id--".$primary_address_id;
|
||||
|
||||
if( $exist_pd_details[0]['fk_primary_address_id'] == null && $exist_pd_details[0]['is_child'] == 0)//Master PD only
|
||||
{
|
||||
$primary_address_id = isset($pd_details['fk_primary_address_id'])?$pd_details['fk_primary_address_id']:null;
|
||||
$pd_details['fk_address_id'] = $primary_address_id;
|
||||
}
|
||||
|
||||
// if( $exist_pd_details[0]['parent_pd_id'] == null)
|
||||
// {
|
||||
// $pd_details['parent_pd_id'] = isset($pd_details['parent_pd_id']) ? $pd_details['parent_pd_id'] : null;
|
||||
// }
|
||||
|
||||
if( $exist_pd_details[0]['is_child'] == 0)
|
||||
{
|
||||
if(isset($pd_details['parent_pd_id']) && ($pd_details['parent_pd_id'] == null || $pd_details['parent_pd_id'] == ""))
|
||||
@ -822,7 +819,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$where_condition_array = array('pd_id' => $pd_details['pd_id']);
|
||||
$pd_id_modified = $this->PD_Model->updateRecords($pd_details,PDTRIGGER,$where_condition_array);
|
||||
|
||||
//print_r($pd_details);
|
||||
|
||||
//Update Address table,if primary address choosed
|
||||
if($primary_address_id != null)
|
||||
@ -837,6 +834,9 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
if($pd_id_modified != null || $pd_id_modified != '' && $count != 0)
|
||||
{
|
||||
|
||||
$logger->info("PD UPDATED",array('ENV'=>ENVIRONMENT,'DATA' => $pd_details,'Pre-Status' => $exist_pd_details[0]['pd_status'],'Current_status' => $pd_details['pd_status']));
|
||||
|
||||
PDALERTS::pdnotification($pd_details['pd_id']);
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
@ -874,6 +874,8 @@ class PD_Controller extends REST_Controller {
|
||||
$newpd['fk_pd_type'] = $parent_pd_details[0]['fk_pd_type'];
|
||||
$newpd['pd_branch_id'] = $parent_pd_details[0]['pd_branch_id'];
|
||||
$newpd['is_child'] = 1;
|
||||
$newpd['loan_amount'] = $parent_pd_details[0]['loan_amount'];
|
||||
$newpd['fk_pd_allocated_to'] = $parent_pd_details[0]['fk_pd_allocated_to'];
|
||||
|
||||
$newpd['pd_status'] = $pd_details['pd_status'];
|
||||
$newpd['fk_updatedby'] = $pd_details['fk_updatedby'];
|
||||
@ -1323,7 +1325,7 @@ class PD_Controller extends REST_Controller {
|
||||
public function allocatePD_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
|
||||
//print_r($records);
|
||||
//if($records['fk_pd_allocated_to'] != "" || $records['fk_pd_allocated_to'] != null)
|
||||
//{
|
||||
$records['pd_status'] = ALLOCATED;
|
||||
@ -2401,9 +2403,8 @@ class PD_Controller extends REST_Controller {
|
||||
$additional_pd_id = $pd_id;
|
||||
$pd_id = $parent_form_index != null ? $parent_pd_id : $pd_id;
|
||||
|
||||
|
||||
}
|
||||
//echo $pd_id;
|
||||
}
|
||||
//echo $pd_id;echo $pd_form_id;
|
||||
if($pd_form_id == 18)
|
||||
{
|
||||
|
||||
@ -2432,7 +2433,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
|
||||
if($pd_form_id == 5 )//address form && ($parent_pd_id != $pd_id)
|
||||
if($is_addtional_pd == 1 && $pd_form_id == 5)//address form && ($parent_pd_id != $pd_id)
|
||||
{
|
||||
|
||||
$fields = array('*');
|
||||
@ -2472,7 +2473,7 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$fields = array('json','processed_json');
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id'=>$pd_form_id,'fk_pd_id'=>$pd_id);
|
||||
|
||||
@ -4691,7 +4692,7 @@ class PD_Controller extends REST_Controller {
|
||||
public function codeigniterViewTest_post()
|
||||
{
|
||||
|
||||
PDALERTS::pdnotification(652);
|
||||
PDALERTS::pdnotification(600);
|
||||
die();
|
||||
$records = $this->post('records');
|
||||
$pdid = $records['pd_id'];
|
||||
|
||||
@ -13,10 +13,12 @@ class MYHTTPCLIENT
|
||||
if(LOGTOBOT == true)
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$response = $client->post( BOTURLVENBA, [
|
||||
$client->post( BOTURLVENBA, [
|
||||
'headers' => ['Content-Type' => 'application/json'],
|
||||
'body' => json_encode($dataToBot)
|
||||
]);
|
||||
|
||||
|
||||
//return $response;
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ class PDALERTS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//echo $is_flag;
|
||||
if($is_flag == 0)
|
||||
{
|
||||
|
||||
|
||||
@ -11,13 +11,15 @@ class SMS_GUPSHUP
|
||||
$sms_api_url = str_replace('{{sms_api_pwd}}',$CI->config->item('sms_api_pwd'),$sms_api_url);
|
||||
$sms_api_url = str_replace('{{send_to_mobile_no}}',$no,$sms_api_url);
|
||||
$sms_api_url = str_replace('{{send_msg}}',$msg,$sms_api_url);
|
||||
|
||||
// echo $no;
|
||||
// echo $msg;
|
||||
// echo $sms_api_url;die();
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$response = $client->post($sms_api_url);
|
||||
$contents = (string) $response->getBody();
|
||||
|
||||
$logger = MYLOG::logFunction();
|
||||
$logger->info("Msg Send Status",array('response_data' => $contents));
|
||||
$logger->info("Msg Send Status",array('response_data' => $contents,'mobile_no' => $no,'msg' => $msg,'sms_api_url' => $sms_api_url));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -201,5 +201,15 @@ class Dash_Board_Model extends SPARQ_Model {
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
||||
public function PD_MIS_report()
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from(PDMIS);
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -37,7 +37,7 @@ class PD_Model extends SPARQ_Model {
|
||||
$this->db->JOIN(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH','PDTRIGGER.pd_branch_id = ENTITYLENDERBRANCH.entity_lender_branch_id','LEFT');
|
||||
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1','LEFT');
|
||||
$this->db->WHERE('PDTRIGGER.pd_status !=',ARCHIVED);
|
||||
$this->db->WHERE('PDTRIGGER.is_child !=',1);
|
||||
//$this->db->WHERE('PDTRIGGER.is_child !=',1);
|
||||
|
||||
if($pdofficerid != "" || $pdofficerid != null)
|
||||
{
|
||||
@ -343,6 +343,7 @@ class PD_Model extends SPARQ_Model {
|
||||
$this->db->ORDER_BY('PDADDRESS.pd_address_id');
|
||||
$result_child_array = $this->db->GET()->result_array();
|
||||
//print_r($this->db->last_query());
|
||||
//print_r($result_child_array);
|
||||
|
||||
if(count($result_child_array) != 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user