SMC credit PD : ps

This commit is contained in:
VE10-Sanjeev 2023-04-27 16:03:34 +05:30
parent 2e2e3a7b18
commit a0324bfabb

View File

@ -2038,16 +2038,26 @@ public function filterSalesPDList_post() {
}else { }else {
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes'); $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
} }
### Automation CET Data Push Credit-PD $columns = array('PDTRIGGER.pd_id');
sleep(10); $table = PDTRIGGER . ' as PDTRIGGER';
$result = $this->dataSynchronization($smc_credit_pd,0); $where_arr = array('PDTRIGGER.is_the_data_transfer_cet'=>0,'PDTRIGGER.pd_status' => COMPLETED,'PDTRIGGER.pd_id'=>$smc_credit_pd);
log_message('ERROR', '#### Automation CET Data Push Credit-PD ('.$smc_credit_pd.') status '.$result->status.' Data Transfered'); $details = $this->SMC_Credit_PD_Model->selectCustomRecords($columns, $where_arr, $table);
if(isset($result->status) && $result->status == 200){ if(!empty($details)){
log_message('ERROR', '#### Credit-PD ('.$smc_credit_pd.') status '.$result->status." Data Transfered"); ### Automation CET Data Push Credit-PD
$update_fields2 = array('is_the_data_transfer_cet' => 1); sleep(10);
$this->SMC_Credit_PD_Model->updateRecords($update_fields2,PDTRIGGER,array('pd_id' => $smc_credit_pd)); $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{ }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['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK; $data['status'] = REST_Controller::HTTP_OK;