PD 3
This commit is contained in:
parent
ad13715c87
commit
d15293b16a
@ -213,7 +213,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
$pd_details['fk_pd_allocated_to'] = null;
|
$pd_details['fk_pd_allocated_to'] = null;
|
||||||
$where_condition_array = array('fk_city_id' => $pd_details['fk_city'],'fk_lender_id' => $pd_details['fk_lender_id']);
|
$where_condition_array = array('fk_city_id' => $pd_details['fk_city'],'fk_lender_id' => $pd_details['fk_lender_id']);
|
||||||
$temp_city_id = $this->PD_Model->selectRecords(PDTEAMMAP,$where_condition_array,$limit=0,$offset=0);
|
$temp_city_id = $this->PD_Model->selectRecords(PDTEAMMAP,$where_condition_array,$limit=0,$offset=0);
|
||||||
print_r($temp_city_id);
|
//print_r($temp_city_id);
|
||||||
if(count($temp_city_id))
|
if(count($temp_city_id))
|
||||||
{
|
{
|
||||||
if(isset($temp_city_id[0]['team_type']))
|
if(isset($temp_city_id[0]['team_type']))
|
||||||
@ -226,20 +226,20 @@ class PD_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
else //Allocate to SineEdge Team with allocation logics
|
else //Allocate to SineEdge Team with allocation logics
|
||||||
{
|
{
|
||||||
echo "SineEdge TEAm";
|
//echo "SineEdge TEAm";
|
||||||
$local_pd_allocation_type = $pd_details['fk_pd_allocation_type'];
|
$local_pd_allocation_type = $pd_details['fk_pd_allocation_type'];
|
||||||
if($local_pd_allocation_type == 1)// AUTO - Load Balance Allocation
|
if($local_pd_allocation_type == 1)// AUTO - Load Balance Allocation
|
||||||
{
|
{
|
||||||
|
|
||||||
echo "AUTO LOAD";
|
//echo "AUTO LOAD";
|
||||||
//select list of pd officers based on pd type, product, customer segment, and team from table (t_pd_officiers_details) and choose minimun allocated one and assign pd Officer and change status form TRIGGERED to ALLOCATED
|
//select list of pd officers based on pd type, product, customer segment, and team from table (t_pd_officiers_details) and choose minimun allocated one and assign pd Officer and change status form TRIGGERED to ALLOCATED
|
||||||
$fields = array('fk_user_id','allocated');
|
$fields = array('fk_user_id','allocated');
|
||||||
|
|
||||||
$where_condition_array = array('fk_pd_type_id' => $pd_details['fk_pd_type'],'fk_team_id' => $temp_city_id[0]['fk_team_id'],'fk_customer_segment' => $pd_details['fk_customer_segment'],'fk_product_id' => $pd_details['fk_product_id'],'isactive' => 1);
|
$where_condition_array = array('fk_pd_type_id' => $pd_details['fk_pd_type'],'fk_team_id' => $temp_city_id[0]['fk_team_id'],'fk_customer_segment' => $pd_details['fk_customer_segment'],'fk_product_id' => $pd_details['fk_product_id'],'isactive' => 1);
|
||||||
|
|
||||||
$list_of_pd_officers = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDOFFICIERSDETAILS);
|
$list_of_pd_officers = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDOFFICIERSDETAILS);
|
||||||
echo "PD OFF";
|
//echo "PD OFF";
|
||||||
print_r($list_of_pd_officers);
|
//print_r($list_of_pd_officers);
|
||||||
$allocated_values = array_column($list_of_pd_officers,'allocated');
|
$allocated_values = array_column($list_of_pd_officers,'allocated');
|
||||||
|
|
||||||
$min_allocated = min($allocated_values);
|
$min_allocated = min($allocated_values);
|
||||||
@ -252,7 +252,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
$pd_details['fk_pd_allocated_to'] = $final_pd_officer_to_allocate;
|
$pd_details['fk_pd_allocated_to'] = $final_pd_officer_to_allocate;
|
||||||
$pd_details['fk_pd_status'] = ALLOCATED;
|
$pd_details['fk_pd_status'] = ALLOCATED;
|
||||||
echo "final".$final_pd_officer_to_allocate;
|
//echo "final".$final_pd_officer_to_allocate;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($local_pd_allocation_type == 2) // AUTO - NEAREST Allocation
|
else if($local_pd_allocation_type == 2) // AUTO - NEAREST Allocation
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class PDALERTS
|
|||||||
*/
|
*/
|
||||||
public static function pdnotification($pdid)
|
public static function pdnotification($pdid)
|
||||||
{
|
{
|
||||||
echo "called";
|
//echo "called";
|
||||||
if($pdid != "" || $pdid != null)
|
if($pdid != "" || $pdid != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ class PDALERTS
|
|||||||
|
|
||||||
|
|
||||||
$no = (string)$no;
|
$no = (string)$no;
|
||||||
echo "SNSNO-".$no;
|
//echo "SNSNO-".$no;
|
||||||
$CI->aws_sns->sendSMS($msg,$no);
|
$CI->aws_sns->sendSMS($msg,$no);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class AWS_SNS
|
|||||||
// "PhoneNumber" => "+917402014940"
|
// "PhoneNumber" => "+917402014940"
|
||||||
// );
|
// );
|
||||||
$mobile_no = "+91".$mobile_no;
|
$mobile_no = "+91".$mobile_no;
|
||||||
echo 'IN SNS--'.$mobile_no;
|
//echo 'IN SNS--'.$mobile_no;
|
||||||
$args = array(
|
$args = array(
|
||||||
"MessageAttributes" => [
|
"MessageAttributes" => [
|
||||||
'AWS.SNS.SMS.SenderID' => [
|
'AWS.SNS.SMS.SenderID' => [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user