Datadump master lender list added : ps

This commit is contained in:
VE10-Sanjeev 2022-12-22 10:51:24 +05:30
parent 12b1def3fd
commit 8303f91b9d
2 changed files with 36 additions and 35 deletions

View File

@ -57,38 +57,38 @@ class Request_DataDump_Controller extends REST_Controller {
$this->response($data,REST_Controller::HTTP_OK);
}//getMasterForDataDump closed here.
public function getMasterForDataDump_post(){
log_message('ERROR','## XL-datadump Master Details inside Fns - '.date('Y-m-d H:i:s A'));
$records = $this->post();
$result = $this->Data_Dump_Model->filtermasterfordatadumprequest();
if(count($result) > 0)
{ log_message('ERROR',"## XL-datadump Master Details : ".json_encode($result));
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;
$data['records'] = $result;
$data['message'] = "Totalpd-count Except Truncate cases";
if(!empty($records)){
$pd_type = isset($records['pd_type'])?$records['pd_type']:null;
$pd_from_date = isset($records['pd_from_date'])?$records['pd_from_date']: null;
$pd_to_date = isset($records['pd_to_date'])?$records['pd_to_date']: null;
$pd_city = isset($records['pd_city'])?$records['pd_city']: null;
$pd_products = isset($records['pd_products'])?$records['pd_products']: null;
$pd_lender = isset($records['pd_lender'])?$records['pd_lender']: null;
$pd_customer_segment = isset($records['pd_customer_segment'])?$records['pd_customer_segment']: null;
$pd_status = COMPLETED;
$result_data = $this->Data_Dump_Model->PDList($pd_type, $pd_status, $pd_from_date, $pd_to_date, $pd_city, $pd_products, $pd_lender,$pd_customer_segment);
$data['records']['pdid'] = $result_data;
$data['records']['totalpd'] = count($result_data);
$data['message'] = "Totalpd-count Should be completed Cases only";
}
}else{ log_message('ERROR',"## XL-datadump Master Details Error ");
$data['dataStatus'] = false;
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
$data['message'] = "Fails";
unset($data['records']);
}
$this->response($data,REST_Controller::HTTP_OK);
}//getMasterForDataDump closed here.
// public function getMasterForDataDump_post(){
// log_message('ERROR','## XL-datadump Master Details inside Fns - '.date('Y-m-d H:i:s A'));
// $records = $this->post();
// $result = $this->Data_Dump_Model->filtermasterfordatadumprequest();
// if(count($result) > 0)
// { log_message('ERROR',"## XL-datadump Master Details : ".json_encode($result));
// $data['dataStatus'] = true;
// $data['status'] = REST_Controller::HTTP_OK;
// $data['records'] = $result;
// $data['message'] = "Totalpd-count Except Truncate cases";
// if(!empty($records)){
// $pd_type = isset($records['pd_type'])?$records['pd_type']:null;
// $pd_from_date = isset($records['pd_from_date'])?$records['pd_from_date']: null;
// $pd_to_date = isset($records['pd_to_date'])?$records['pd_to_date']: null;
// $pd_city = isset($records['pd_city'])?$records['pd_city']: null;
// $pd_products = isset($records['pd_products'])?$records['pd_products']: null;
// $pd_lender = isset($records['pd_lender'])?$records['pd_lender']: null;
// $pd_customer_segment = isset($records['pd_customer_segment'])?$records['pd_customer_segment']: null;
// $pd_status = COMPLETED;
// $result_data = $this->Data_Dump_Model->PDList($pd_type, $pd_status, $pd_from_date, $pd_to_date, $pd_city, $pd_products, $pd_lender,$pd_customer_segment);
// $data['records']['pdid'] = $result_data;
// $data['records']['totalpd'] = count($result_data);
// $data['message'] = "Totalpd-count Should be completed Cases only";
// }
// }else{ log_message('ERROR',"## XL-datadump Master Details Error ");
// $data['dataStatus'] = false;
// $data['status'] = REST_Controller::HTTP_NO_CONTENT;
// $data['message'] = "Fails";
// unset($data['records']);
// }
// $this->response($data,REST_Controller::HTTP_OK);
// }//getMasterForDataDump closed here.
### Request the Details For XL-Data-Dump.
public function getRequestForDataDump_post(){

View File

@ -118,9 +118,10 @@ class Data_Dump_Model extends SPARQ_Model {
$result['product'] = $this->db->select('PRODUCTS.product_id,PRODUCTS.name,PRODUCTS.abbr')->from(PRODUCTS.' as PRODUCTS')->WHERE('PRODUCTS.isactive',1)->GET()->result_array();
$result['customersegment'] = $this->db->select('CUSTOMERSEGMENT.customer_segment_id,CUSTOMERSEGMENT.name,CUSTOMERSEGMENT.abbr')->from(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT')->WHERE('CUSTOMERSEGMENT.isactive',1)->GET()->result_array();
$result['city'] = $this->db->select('CITY.city_id, CITY.name')->from(CITY.' as CITY')->WHERE('CITY.isactive',1)->GET()->result_array();
$result['pdid'] = $this->db->select('PDTRIGGER.pd_sno,PDTRIGGER.pd_id,PDTRIGGER.pd_status')->from(PDTRIGGER.' as PDTRIGGER')->WHERE('PDTRIGGER.pd_status !=',"TRUNCATED")->GET()->result_array();
$result['totalpd'] = count($result['pdid']);
$result['overallpdcount'] = count($result['pdid']);
$result['lender'] = $this->db->select(' ENTITY.entity_id, ENTITY.full_name, ENTITY.short_name')->from(ENTITY.' as ENTITY')->WHERE(' ENTITY.isactive',1)->GET()->result_array();
// $result['pdid'] = $this->db->select('PDTRIGGER.pd_sno,PDTRIGGER.pd_id,PDTRIGGER.pd_status')->from(PDTRIGGER.' as PDTRIGGER')->WHERE('PDTRIGGER.pd_status !=',"TRUNCATED")->GET()->result_array();
// $result['totalpd'] = count($result['pdid']);
// $result['overallpdcount'] = count($result['pdid']);
return $result;
}