SMC credit PD : ps
This commit is contained in:
parent
2e2e3a7b18
commit
a0324bfabb
@ -2038,16 +2038,26 @@ public function filterSalesPDList_post() {
|
||||
}else {
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
|
||||
}
|
||||
### Automation CET Data Push Credit-PD
|
||||
sleep(10);
|
||||
$result = $this->dataSynchronization($smc_credit_pd,0);
|
||||
log_message('ERROR', '#### Automation CET Data Push Credit-PD ('.$smc_credit_pd.') status '.$result->status.' Data Transfered');
|
||||
if(isset($result->status) && $result->status == 200){
|
||||
log_message('ERROR', '#### Credit-PD ('.$smc_credit_pd.') status '.$result->status." Data Transfered");
|
||||
$update_fields2 = array('is_the_data_transfer_cet' => 1);
|
||||
$this->SMC_Credit_PD_Model->updateRecords($update_fields2,PDTRIGGER,array('pd_id' => $smc_credit_pd));
|
||||
$columns = array('PDTRIGGER.pd_id');
|
||||
$table = PDTRIGGER . ' as PDTRIGGER';
|
||||
$where_arr = array('PDTRIGGER.is_the_data_transfer_cet'=>0,'PDTRIGGER.pd_status' => COMPLETED,'PDTRIGGER.pd_id'=>$smc_credit_pd);
|
||||
$details = $this->SMC_Credit_PD_Model->selectCustomRecords($columns, $where_arr, $table);
|
||||
if(!empty($details)){
|
||||
### Automation CET Data Push Credit-PD
|
||||
sleep(10);
|
||||
$result = $this->dataSynchronization($smc_credit_pd,0);
|
||||
log_message('ERROR', '#### Automation CET Data Push Credit-PD ('.$smc_credit_pd.') status '.$result->status.' Data Transfered');
|
||||
if(isset($result->status) && $result->status == 200){
|
||||
log_message('ERROR', '#### Credit-PD ('.$smc_credit_pd.') status '.$result->status." Data Transfered");
|
||||
$update_fields2 = array('is_the_data_transfer_cet' => 1);
|
||||
$this->SMC_Credit_PD_Model->updateRecords($update_fields2,PDTRIGGER,array('pd_id' => $smc_credit_pd));
|
||||
}else{
|
||||
log_message('ERROR', '#### Credit-PD ('.$smc_credit_pd.') status '.$result->status);
|
||||
}
|
||||
}else{
|
||||
log_message('ERROR', '#### Credit-PD ('.$smc_credit_pd.') status '.$result->status);
|
||||
$result = 'CET Data Push ('.$smc_credit_pd.') Credit-PD Already Done';
|
||||
log_message('ERROR', '#### '.$result);
|
||||
|
||||
}
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user