SMC data Sync . SE Report LIve fixes : ps
This commit is contained in:
parent
ffc7cf1d3c
commit
852ca6a46c
@ -317,8 +317,10 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
$data['CETresponse'] = $response;
|
$data['CETresponse'] = $response;
|
||||||
if($response){
|
if($response){
|
||||||
log_message('ERROR', '#### Credit PD ('.$smc_credit_pd.') status '.json_encode($response)." Data Transfered");
|
log_message('ERROR', '#### Credit PD ('.$smc_credit_pd.') status '.json_encode($response)." Data Transfered");
|
||||||
$update_fields2 = array('is_the_data_transfer_cet' => 1);
|
if(isset($response->status) && $response->status == 200){
|
||||||
$this->SMC_Credit_PD_Model->updateRecords($update_fields2,PDTRIGGER,array('pd_id' => $smc_credit_pd));
|
$update_fields2 = array('is_the_data_transfer_cet' => 1);
|
||||||
|
$this->SMC_Credit_PD_Model->updateRecords($update_fields2,PDTRIGGER,array('pd_id' => $smc_credit_pd));
|
||||||
|
}
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$data['msg'] = 'Data Shared Successfully';
|
$data['msg'] = 'Data Shared Successfully';
|
||||||
@ -416,6 +418,7 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
## In this Function $dummy_flag `0` = Automation and 1 = Manual
|
||||||
function dataSynchronization($smc_credit_pd,$dummy_flag)
|
function dataSynchronization($smc_credit_pd,$dummy_flag)
|
||||||
{
|
{
|
||||||
$this->load->helper('smc_creditpd');
|
$this->load->helper('smc_creditpd');
|
||||||
@ -517,7 +520,8 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = cet_creditpd::pushwithcetcreditpdapi($common_fields, $CETAPP_creditPD_data);
|
$result = cet_creditpd::pushwithcetcreditpdapi($common_fields, $CETAPP_creditPD_data);
|
||||||
if(isset($result->status) && $result->status == 200){
|
return $result;
|
||||||
|
// if(isset($result->status) && $result->status == 200){
|
||||||
// if($dummy_flag == 1){
|
// if($dummy_flag == 1){
|
||||||
// $photograph_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
// $photograph_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||||
// $satellite_image = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1,'img_name=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
// $satellite_image = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $smc_credit_pd,'isactive' => 1,'img_name=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||||
@ -554,15 +558,14 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
// // }die();
|
// // }die();
|
||||||
// $result->imageStatus = $j.'/'.$totalimages;
|
// $result->imageStatus = $j.'/'.$totalimages;
|
||||||
// }
|
// }
|
||||||
return $result;
|
// return $result;
|
||||||
}else{
|
// }else{
|
||||||
log_message('ERROR', '#### Section Details pushed Images Details Not Pushed');
|
// log_message('ERROR', '#### Section Details pushed Images Details Not Pushed');
|
||||||
$data['dataStatus'] = false;
|
// $data['dataStatus'] = false;
|
||||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
// $data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||||
$data['msg'] = 'Section Details pushed Images Details Not Pushed ! Try Later';
|
// $data['msg'] = 'Section Details pushed Images Details Not Pushed ! Try Later';
|
||||||
$this->response($data, REST_Controller::HTTP_OK);
|
// $this->response($data, REST_Controller::HTTP_OK);
|
||||||
}
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log_message('ERROR', '#### There is No Data Found relevant Credit PDID ');
|
log_message('ERROR', '#### There is No Data Found relevant Credit PDID ');
|
||||||
$data['dataStatus'] = false;
|
$data['dataStatus'] = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user