diff --git a/api/application/config/routes.php b/api/application/config/routes.php index c1924449..e1a6ed7a 100755 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -324,4 +324,6 @@ $route['getCompanyListForSMCList'] = 'SMC_Credit_PD_Controller/getCompanyListFor $route['getRequestForDataDump'] = 'Request_DataDump_Controller/getRequestForDataDump'; $route['getMasterForDataDump'] = 'Request_DataDump_Controller/getMasterForDataDump'; -$route['downloadDataDump'] = 'Request_DataDump_Controller/downloadDataDump2'; \ No newline at end of file +$route['downloadDataDump'] = 'Request_DataDump_Controller/downloadDataDump2'; + +$route['getCityWiseLender'] = 'PD_Controller/getCityWiseLender'; \ No newline at end of file diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 36f1f91e..23683c84 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -11272,6 +11272,351 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $entity_loc = $this->PD_Model->getEntityAddr($lender); $this->response(satellite_image::getdistancematrix($entity_loc,$pd_loc),REST_Controller::HTTP_OK,true); } + + function getCityWiseLender_get(){ + // 26/3374-maharashtra/mumbai, 5/869-delhi/delhi + $city_id = $this->get('city_id'); + $city_arr = array(3374,869); + //if(in_array($city_id,$city_arr)) + // {$Lenderlist = $this->PD_Model->getCityWiseLender($city_id);} + if((int)$city_id == 3374){ + $Lenderlist = array (0 => array ('entity_id' => '13','full_name' => 'ABC Ltd','short_name' => 'ABC','billing_address' => array (), + 'branches' => array (0 => array ('entity_lender_branch_id' => '14','branch_name' => 'Bank of Baroda Gurgaon',), + 1 => array ('entity_lender_branch_id' => '42','branch_name' => 'Uttarpradesh branch',), + 2 => array ('entity_lender_branch_id' => '43', + 'branch_name' => 'Satna branch', + ), + ), + ), + 1 => + array ( + 'entity_id' => '42', + 'full_name' => 'Capsave Finance Private Limited', + 'short_name' => 'CFPL', + 'billing_address' => + array ( + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '54', + 'branch_name' => 'CFPL-Delhi', + ), + ), + ), + 2 => + array ( + 'entity_id' => '12', + 'full_name' => 'Citibank', + 'short_name' => 'CITI', + 'billing_address' => + array ( + 0 => + array ( + 'entity_billing_id' => '11', + 'fk_entity_id' => '12', + 'billing_name' => 'CITI-TRICHY', + 'addressline1' => '121', + 'addressline2' => 'Anna Salai', + 'addressline3' => 'Chennai, Tamilnadu', + 'pincode' => '600002', + 'email' => 'citi@citibank.com', + 'mobileno' => '8695754123', + 'gstno' => 'AJNBV458532JH', + 'pan' => 'AUIOK85G', + 'gststatecode' => '', + 'isactive' => '1', + 'updatedon' => '2019-02-13 05:06:34', + 'updatedby' => '1', + 'createdon' => NULL, + 'createdby' => NULL, + 'is_dist_cal_enabled' => NULL, + 'geo_loc' => NULL, + ), + 1 => + array ( + 'entity_billing_id' => '12', + 'fk_entity_id' => '12', + 'billing_name' => 'CITI-CHENNAI', + 'addressline1' => '40', + 'addressline2' => 'Ram Nagar', + 'addressline3' => 'Chennai, Tamilnadu', + 'pincode' => '600048', + 'email' => 'ravikumar@citibank.com', + 'mobileno' => '9790391135', + 'gstno' => 'GHFRT125478JK', + 'pan' => 'FGTRB96K', + 'gststatecode' => '', + 'isactive' => '1', + 'updatedon' => '2019-02-13 05:06:34', + 'updatedby' => '1', + 'createdon' => NULL, + 'createdby' => NULL, + 'is_dist_cal_enabled' => NULL, + 'geo_loc' => NULL, + ), + ), + 'branches' => + array ( + ), + ), + 3 => + array ( + 'entity_id' => '4', + 'full_name' => 'City Union Bank', + 'short_name' => 'CUB', + 'billing_address' => + array ( + ), + 'branches' => + array ( + ), + ), + 4 => + array ( + 'entity_id' => '16', + 'full_name' => 'Clix Capital Services Private Limited', + 'short_name' => 'CLIX', + 'billing_address' => + array ( + 0 => + array ( + 'entity_billing_id' => '16', + 'fk_entity_id' => '16', + 'billing_name' => 'CLIX CAPTIAL', + 'addressline1' => '14/23', + 'addressline2' => 'South Street', + 'addressline3' => 'Gurugram, Hariyana', + 'pincode' => '610001', + 'email' => 'Clix@group.com', + 'mobileno' => '0000000000', + 'gstno' => '0', + 'pan' => '0', + 'gststatecode' => '', + 'isactive' => '1', + 'updatedon' => '2019-06-13 06:21:56', + 'updatedby' => '165', + 'createdon' => NULL, + 'createdby' => NULL, + 'is_dist_cal_enabled' => NULL, + 'geo_loc' => NULL, + ), + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '28', + 'branch_name' => 'Gurugram', + ), + 1 => + array ( + 'entity_lender_branch_id' => '49', + 'branch_name' => 'Ghaziabad', + ), + 2 => + array ( + 'entity_lender_branch_id' => '50', + 'branch_name' => 'Delhi', + ), + ), + )); + } else if((int)$city_id == 869){ + $Lenderlist = array(0 => + array ( + 'entity_id' => '38', + 'full_name' => 'Clix Housing Finance Private Limited', + 'short_name' => 'CHFPL', + 'billing_address' => + array ( + 0 => + array ( + 'entity_billing_id' => '27', + 'fk_entity_id' => '38', + 'billing_name' => 'Clix Housing Finance Private Limited', + 'addressline1' => '9, B 901, Two Horizon Centre, DLF phase 5', + 'addressline2' => ' DLF Phase 5', + 'addressline3' => 'Gurgaon, Haryana', + 'pincode' => '122002', + 'email' => 'Test@clixhousing.com', + 'mobileno' => '9099999999', + 'gstno' => 'GSTASD456988', + 'pan' => 'PAN123645', + 'gststatecode' => '', + 'isactive' => '1', + 'updatedon' => '2020-01-22 05:14:31', + 'updatedby' => '165', + 'createdon' => NULL, + 'createdby' => NULL, + 'is_dist_cal_enabled' => NULL, + 'geo_loc' => NULL, + ), + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '44', + 'branch_name' => 'Gurgaon', + ), + 1 => + array ( + 'entity_lender_branch_id' => '47', + 'branch_name' => 'Ghaziabad', + ), + 2 => + array ( + 'entity_lender_branch_id' => '48', + 'branch_name' => 'Delhi', + ), + ), + ), + 1 => + array ( + 'entity_id' => '43', + 'full_name' => 'CSL Finance Limited', + 'short_name' => 'CSLFL', + 'billing_address' => + array ( + 0 => + array ( + 'entity_billing_id' => '31', + 'fk_entity_id' => '43', + 'billing_name' => 'CSL Finance Limited', + 'addressline1' => '716-717, 7th Floor, World Trade Tower, ', + 'addressline2' => 'Sector-16', + 'addressline3' => 'Noida, Uttar Pradesh', + 'pincode' => '201301', + 'email' => 'pner@cslfinance.in', + 'mobileno' => '9000470123', + 'gstno' => '055555CC0122C1ZJ', + 'pan' => 'AAAC5555', + 'gststatecode' => '', + 'isactive' => '1', + 'updatedon' => '2021-08-18 05:25:35', + 'updatedby' => '298', + 'createdon' => NULL, + 'createdby' => NULL, + 'is_dist_cal_enabled' => '1', + 'geo_loc' => '28.6428915,77.2169007', + ), + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '55', + 'branch_name' => 'Noida', + ), + ), + ), + 2 => + array ( + 'entity_id' => '20', + 'full_name' => 'DBS Pvt Ltd', + 'short_name' => 'DBSBANK', + 'billing_address' => + array ( + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '41', + 'branch_name' => 'Nicobar', + ), + ), + ), + 3 => + array ( + 'entity_id' => '41', + 'full_name' => 'Demo Finance Pvt Ltd', + 'short_name' => 'DEMOLTD', + 'billing_address' => + array ( + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '53', + 'branch_name' => 'Demo Finance - New Delhi', + ), + ), + ), + 4 => + array ( + 'entity_id' => '18', + 'full_name' => 'Growth Bank', + 'short_name' => 'GROWTH', + 'billing_address' => + array ( + ), + 'branches' => + array ( + ), + ), + 5 => + array ( + 'entity_id' => '21', + 'full_name' => 'Hero Housing Finance Limited', + 'short_name' => 'HHFL', + 'billing_address' => + array ( + 0 => + array ( + 'entity_billing_id' => '19', + 'fk_entity_id' => '21', + 'billing_name' => 'Hero Housing Finance Limited', + 'addressline1' => 'Ist Floor, Hero Housing Finance Limited, A-44, 1st Floor, Mohan Co-Operative Industrial Estate', + 'addressline2' => 'Near Mohan Estate Metro Station', + 'addressline3' => 'Mathura Road, New Delhi', + 'pincode' => '110044', + 'email' => 'Sine@sinemanagment.com', + 'mobileno' => '9715454901', + 'gstno' => '07AADCH9153R1ZV', + 'pan' => 'AADCH9153R', + 'gststatecode' => '', + 'isactive' => '1', + 'updatedon' => '2019-08-22 10:34:32', + 'updatedby' => '165', + 'createdon' => NULL, + 'createdby' => NULL, + 'is_dist_cal_enabled' => NULL, + 'geo_loc' => NULL, + ), + ), + 'branches' => + array ( + 0 => + array ( + 'entity_lender_branch_id' => '31', + 'branch_name' => 'Chennai-HHFL', + ), + ), + )); + }else{ + $Lenderlist = array(); + } + + + if(!empty($Lenderlist)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $Lenderlist; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NOT_FOUND; + $data['msg'] = 'Something went wrong!'; + $this->response($data,REST_Controller::HTTP_OK); + } + + } }