COMPANY MAS
This commit is contained in:
parent
e164e8f36b
commit
e58eb5aa70
@ -85,8 +85,8 @@ defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automat
|
|||||||
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
||||||
|
|
||||||
// define login route name for token verification
|
// define login route name for token verification
|
||||||
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
|
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
|
||||||
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListOfProducts'); // no errors
|
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'triggerNewPD'); // no errors
|
||||||
|
|
||||||
/*********************AWS resources Constants*************************************************/
|
/*********************AWS resources Constants*************************************************/
|
||||||
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
||||||
|
|||||||
@ -73,6 +73,7 @@ $route['saveMaster'] = 'Common_Masters_Controller/saveMaster';
|
|||||||
$route['savePDAllocationType'] = 'Common_Masters_Controller/savePDAllocationType';
|
$route['savePDAllocationType'] = 'Common_Masters_Controller/savePDAllocationType';
|
||||||
$route['savePDNotifications'] = 'Common_Masters_Controller/savePDNotifications';
|
$route['savePDNotifications'] = 'Common_Masters_Controller/savePDNotifications';
|
||||||
$route['getPDNotificationsList'] = 'Common_Masters_Controller/getPDNotificationsList';
|
$route['getPDNotificationsList'] = 'Common_Masters_Controller/getPDNotificationsList';
|
||||||
|
$route['saveCompany'] = 'Common_Masters_Controller/saveCompany';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -82,6 +83,7 @@ $route['getListOfUsers'] = 'User_Management_Controller/listAllUsers';
|
|||||||
$route['saveNewUser'] = 'User_Management_Controller/saveNewUser';
|
$route['saveNewUser'] = 'User_Management_Controller/saveNewUser';
|
||||||
$route['updateExistUser'] = 'User_Management_Controller/updateExistUser';
|
$route['updateExistUser'] = 'User_Management_Controller/updateExistUser';
|
||||||
$route['getUsersDetails'] = 'User_Management_Controller/getUsersDetails';
|
$route['getUsersDetails'] = 'User_Management_Controller/getUsersDetails';
|
||||||
|
$route['getSingedProfilePicURL'] = 'User_Management_Controller/getSingedProfilePicURL';
|
||||||
|
|
||||||
// TEMPLATE MANAGEMENT
|
// TEMPLATE MANAGEMENT
|
||||||
$route['listAllTemplates'] = 'Template_Management_Controller/listAllTemplates';
|
$route['listAllTemplates'] = 'Template_Management_Controller/listAllTemplates';
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -170,12 +170,14 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
|
|
||||||
/********For Save New PD while Trigger****/
|
/********For Save New PD while Trigger****/
|
||||||
|
/*
|
||||||
|
sample data
|
||||||
|
{
|
||||||
|
"pd_details":{ "fk_lender_id": "1", "lender_applicant_id":"12458","fk_product_id":"2","fk_subproduct_id":"1","fk_pd_type":"2", "fk_pd_status":"2","pd_specific_clarification":"nothing","createdon":"2017","fk_createdby":"2","fk_pd_allocation_type":"3","fk_pd_allocated_to":"1","fk_pd_template_id":"2","fk_customer_segment":"1","pd_officier_final_judgement":"54561","pd_agency_id":"1","loan_amount":"1589655","addressline1":"1", "addressline2":"2", "addressline3":"3", "fk_city":"1", "fk_state":"2", "pincode":"966852"}
|
||||||
|
}
|
||||||
|
*/
|
||||||
public function triggerNewPD_post()
|
public function triggerNewPD_post()
|
||||||
{
|
{
|
||||||
//echo "TRIGGER";
|
|
||||||
//$this->aws_ses->verifyEmailIdentity('raro@spindl-e.com');
|
|
||||||
//$this->aws_ses->sendMail('raro@spindl-e.com');
|
|
||||||
//die();
|
|
||||||
$pd_details = json_decode($this->post('pd_details'),true);
|
$pd_details = json_decode($this->post('pd_details'),true);
|
||||||
$pd_applicant_details = json_decode($this->post('pd_applicant_details'),true);
|
$pd_applicant_details = json_decode($this->post('pd_applicant_details'),true);
|
||||||
$pd_document_titles = json_decode($this->post('pd_document_titles'),true);
|
$pd_document_titles = json_decode($this->post('pd_document_titles'),true);
|
||||||
@ -206,6 +208,8 @@ class PD_Controller extends REST_Controller {
|
|||||||
$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);
|
||||||
if(count($temp_city_id))
|
if(count($temp_city_id))
|
||||||
|
{
|
||||||
|
if(isset($temp_city_id[0]['type']))
|
||||||
{
|
{
|
||||||
if($temp_city_id[0]['type'] == 0) // Allocate to Vendor
|
if($temp_city_id[0]['type'] == 0) // Allocate to Vendor
|
||||||
{
|
{
|
||||||
@ -250,12 +254,15 @@ class PD_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}//End Of isset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***********************END OF PD ALLOCATION TYPE AND PROCESS***********/
|
/***********************END OF PD ALLOCATION TYPE AND PROCESS***********/
|
||||||
|
|
||||||
|
|
||||||
$pd_id = $this->PD_Model->saveRecords(PDTRIGGER,$pd_details);
|
$pd_id = $this->PD_Model->saveRecords(PDTRIGGER,$pd_details);
|
||||||
|
|
||||||
|
|
||||||
@ -300,7 +307,11 @@ class PD_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update into pd officer details
|
||||||
|
if($pd_details['fk_pd_allocated_to'] != null || $pd_details['fk_pd_allocated_to'] != '')
|
||||||
|
{
|
||||||
|
$this->PD_Model->updatePDofficersDetail($pd_details['fk_pd_allocated_to']);
|
||||||
|
}
|
||||||
if($pd_id != null || $pd_id != '' && $count != 0)
|
if($pd_id != null || $pd_id != '' && $count != 0)
|
||||||
{
|
{
|
||||||
// CALL pdnotification Helper function to send pd alerts @ params pdid,pdstatus
|
// CALL pdnotification Helper function to send pd alerts @ params pdid,pdstatus
|
||||||
|
|||||||
@ -129,7 +129,7 @@ class User_Management_Controller extends REST_Controller {
|
|||||||
|
|
||||||
if($pdofficer != ""){
|
if($pdofficer != ""){
|
||||||
$pdofficer['fk_user_id'] = $user_id;
|
$pdofficer['fk_user_id'] = $user_id;
|
||||||
print_r($pdofficer);
|
//print_r($pdofficer);
|
||||||
$this->User_Management_Model->saveRecords($pdofficer,PDOFFICIERSDETAILS);
|
$this->User_Management_Model->saveRecords($pdofficer,PDOFFICIERSDETAILS);
|
||||||
}
|
}
|
||||||
if($user_id != '' || $user_id != null)
|
if($user_id != '' || $user_id != null)
|
||||||
@ -302,7 +302,7 @@ class User_Management_Controller extends REST_Controller {
|
|||||||
@params userid , entity id, profilepic name
|
@params userid , entity id, profilepic name
|
||||||
URL expires 5 min
|
URL expires 5 min
|
||||||
*/
|
*/
|
||||||
public function getSingedProfilePicURL()
|
public function getSingedProfilePicURL_post()
|
||||||
{
|
{
|
||||||
$userid = $this->post('userid');
|
$userid = $this->post('userid');
|
||||||
$entityid = $this->post('entityid');
|
$entityid = $this->post('entityid');
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class SPARQ_Model extends CI_Model {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveRecords($record_data = array(),$table_name,$print_query = '')
|
public function saveRecords($table_name,$record_data = array(),$print_query = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->insert($table_name,$record_data);
|
$this->db->insert($table_name,$record_data);
|
||||||
|
|||||||
@ -22,27 +22,28 @@ class PD_Model extends SPARQ_Model {
|
|||||||
$this->db->JOIN(USERPROFILE.' as USERPROFILE','PDTRIGGER.fk_createdby = USERPROFILE.userid');
|
$this->db->JOIN(USERPROFILE.' as USERPROFILE','PDTRIGGER.fk_createdby = USERPROFILE.userid');
|
||||||
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','PDTRIGGER.fk_updatedby = USERPROFILE1.userid','LEFT');
|
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','PDTRIGGER.fk_updatedby = USERPROFILE1.userid','LEFT');
|
||||||
$this->db->JOIN(PDALLOCATIONTYPE.' as PDALLOCATIONTYPE','PDTRIGGER.fk_pd_allocation_type = PDALLOCATIONTYPE.pd_allocation_type_id');
|
$this->db->JOIN(PDALLOCATIONTYPE.' as PDALLOCATIONTYPE','PDTRIGGER.fk_pd_allocation_type = PDALLOCATIONTYPE.pd_allocation_type_id');
|
||||||
$this->db->JOIN(USERPROFILE.' as USERPROFILE2','PDTRIGGER.fk_pd_allocation_type = USERPROFILE2.userid');
|
$this->db->JOIN(USERPROFILE.' as USERPROFILE2','PDTRIGGER.fk_pd_allocated_to = USERPROFILE2.userid');
|
||||||
$this->db->JOIN(TEMPLATE.' as TEMPLATE','PDTRIGGER.fk_pd_template_id = TEMPLATE.template_id');
|
$this->db->JOIN(TEMPLATE.' as TEMPLATE','PDTRIGGER.fk_pd_template_id = TEMPLATE.template_id');
|
||||||
$this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','PDTRIGGER.fk_customer_segment = CUSTOMERSEGMENT.customer_segment_id');
|
$this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','PDTRIGGER.fk_customer_segment = CUSTOMERSEGMENT.customer_segment_id');
|
||||||
$this->db->JOIN(ENTITY.' as AGENCY','PDTRIGGER.pd_agency_id = AGENCY.entity_id','LEFT');
|
$this->db->JOIN(ENTITY.' as AGENCY','PDTRIGGER.pd_agency_id = AGENCY.entity_id','LEFT');
|
||||||
$this->db->ORDER_BY('PDTRIGGER.pd_id',$sort);
|
$this->db->ORDER_BY('PDTRIGGER.pd_id',$sort);
|
||||||
$this->db->LIMIT($page,$limit);
|
$this->db->LIMIT($limit,$page);
|
||||||
$result_array = $this->db->GET()->result_array();
|
$result_array = $this->db->GET()->result_array();
|
||||||
|
|
||||||
if(count($result_array) != 0)
|
if(count($result_array) != 0)
|
||||||
{
|
{
|
||||||
foreach($result_array as $key => $result)
|
foreach($result_array as $key => $result)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode');
|
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode');
|
||||||
$this->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
|
$this->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
|
||||||
$this->db->JOIN(STATE.' as STATE','PDAPPLICANTSDETAILS.fk_state = STATE.state_id ');
|
$this->db->JOIN(STATE.' as STATE','PDAPPLICANTSDETAILS.fk_state = STATE.state_id ');
|
||||||
$this->db->JOIN(CITY.' as CITY','PDAPPLICANTSDETAILS.fk_city = CITY.city_id');
|
$this->db->JOIN(CITY.' as CITY','PDAPPLICANTSDETAILS.fk_city = CITY.city_id');
|
||||||
$this->db->WHERE('PDAPPLICANTSDETAILS.fk_pd_id = $result["pd_id"]');
|
$this->db->WHERE('PDAPPLICANTSDETAILS.fk_pd_id ',$result['pd_id']);
|
||||||
$result_child_array = $this->db->GET()->result_array();
|
$result_child_array = $this->db->GET()->result_array();
|
||||||
if(count($result_child_array) != 0)
|
if(count($result_child_array) != 0)
|
||||||
{
|
{
|
||||||
array_push($result[$key],$result_child_array);
|
$result_array[$key]['applicat_details'] = $result_child_array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,4 +73,10 @@ class PD_Model extends SPARQ_Model {
|
|||||||
$this->db->WHERE_IN('fk_user_id',$lender_specific_pdofficers_list);
|
$this->db->WHERE_IN('fk_user_id',$lender_specific_pdofficers_list);
|
||||||
$result = $this->db->get()->result_array();
|
$result = $this->db->get()->result_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updatePDofficersDetail($userid)
|
||||||
|
{
|
||||||
|
$sql = 'UPDATE '.PDOFFICIERSDETAILS.' SET total = total+1, allocated = allocated+1 WHERE fk_user_id ='.$userid;
|
||||||
|
$modified = $this->db->query($sql);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user