PD ENTITY CHNAGE
This commit is contained in:
parent
3d0c3d4553
commit
49f64188ec
@ -87,7 +87,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
|
||||
// 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', '(listAllTemplates/:any)'); // no errors
|
||||
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getEntityBillingInfo'); // no errors
|
||||
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getAnswersForPD'); // no errors
|
||||
|
||||
/*********************AWS resources Constants*************************************************/
|
||||
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
||||
|
||||
@ -117,6 +117,7 @@ $route['saveNewEntity'] = 'Entity_Management_Controller/saveNewEntity';
|
||||
$route['saveExistEntity'] = 'Entity_Management_Controller/saveExistEntity';
|
||||
$route['getEntityBillingInfo'] = 'Entity_Management_Controller/getEntityBillingInfo';
|
||||
$route['getLocationHierarchy'] = 'Entity_Management_Controller/getLocationHierarchy';
|
||||
$route['getEntityMasterInfo'] = 'Entity_Management_Controller/getEntityMasterInfo';
|
||||
|
||||
//PD RELATED
|
||||
$route['triggerNewPD'] = 'PD_Controller/triggerNewPD';
|
||||
@ -136,4 +137,5 @@ $route['getListPDOfficers'] = 'PD_Controller/getListPDOfficers';
|
||||
$route['loadFullTemplate'] = 'PD_Controller/loadFullTemplate';
|
||||
$route['allbase'] = 'PD_Controller/base';
|
||||
$route['savePDQuestions'] = 'PD_Controller/saveActualPDQuestions';
|
||||
$route['getAnswersForPD'] = 'PD_Controller/getAnswersForPD';
|
||||
|
||||
|
||||
@ -274,6 +274,37 @@ class Entity_Management_Controller extends REST_Controller {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getEntityMasterInfo_get()
|
||||
{
|
||||
$entity_id = "";
|
||||
if($this->get('eid')) { $entity_id = $this->get('eid'); }
|
||||
|
||||
if( $entity_id != "" || $entity_id != null)
|
||||
{
|
||||
|
||||
// $columns = array('ENTITY.entity_id, ENTITY.full_name, ENTITY.short_name');
|
||||
// $table = array('');
|
||||
// $joins = array();
|
||||
// $where_condition_array = array();
|
||||
$result = $this->Entity_Management_Model->listAllEntities(0,0,0,0,$entity_id);
|
||||
if(count($result))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $result;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class Entity_Management_Model extends SPARQ_Model {
|
||||
}
|
||||
|
||||
|
||||
public function listAllEntities($page,$limit,$sort,$entity_type_id)
|
||||
public function listAllEntities($page,$limit,$sort,$entity_type_id,$entity_id)
|
||||
{
|
||||
$result_data = array();
|
||||
|
||||
@ -23,6 +23,11 @@ class Entity_Management_Model extends SPARQ_Model {
|
||||
{
|
||||
$this->db->WHERE('ENTITY.fk_entity_type_id',$entity_type_id);
|
||||
}
|
||||
|
||||
if($entity_id != null || $entity_id != '')
|
||||
{
|
||||
$this->db->WHERE('ENTITY.entity_id',$entity_id);
|
||||
}
|
||||
$this->db->ORDER_BY('ENTITY.fk_entity_type_id',$sort);
|
||||
$this->db->LIMIT($page,$limit);
|
||||
|
||||
|
||||
@ -344,12 +344,14 @@ class PD_Model extends SPARQ_Model {
|
||||
// $this->db->SELECT('QUESTIONANSWERS.question_answer_id,QUESTIONANSWERS.answer,TEMPLATEANSWERWEIGHTAGE.template_answer_weightage_id, TEMPLATEANSWERWEIGHTAGE.fk_template_question_id, TEMPLATEANSWERWEIGHTAGE.fk_question_answer_id, TEMPLATEANSWERWEIGHTAGE.template_answer_weightage,PDDETAIL.pd_detail_id');
|
||||
// $this->db->FROM(TEMPLATEANSWERWEIGHTAGE.' as TEMPLATEANSWERWEIGHTAGE');
|
||||
// $this->db->JOIN(QUESTIONANSWERS.' as QUESTIONANSWERS','TEMPLATEANSWERWEIGHTAGE.fk_question_answer_id = QUESTIONANSWERS.question_answer_id','LEFT');
|
||||
// $this->db->JOIN(PDDETAIL.' as PDDETAIL',"QUESTIONANSWERS.question_answer_id = PDDETAIL.pd_answer_id AND PDDETAIL.fk_pd_id = $pdid",'LEFT');
|
||||
// $this->db->JOIN(PDDETAIL.' as PDDETAIL',"QUESTIONANSWERS.question_answer_id = PDDETAIL.pd_answer_id AND PDDETAIL.fk_pd_id = $pd_id",'LEFT');
|
||||
// // $this->db->WHERE('QUESTIONANSWERS.fk_question_id',$question['question_id']);
|
||||
// $this->db->WHERE('TEMPLATEANSWERWEIGHTAGE.fk_template_question_id',$question['template_question_id']);
|
||||
// $this->db->WHERE('TEMPLATEANSWERWEIGHTAGE.fk_template_question_id',$question_id);
|
||||
// //$this->db->WHERE('TEMPLATEANSWERWEIGHTAGE.fk_question_category_id',$category_id);
|
||||
// //$this->db->WHERE('TEMPLATEANSWERWEIGHTAGE.fk_template_id',$template_id);
|
||||
// // $this->db->WHERE('PDDETAIL.fk_pd_id',$pdid);
|
||||
// $answers = $this->db->GET()->result_array();
|
||||
// $questions[$answer_key]['answers'] = $answers;
|
||||
// print_r($answers);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user