Google Sheet : ps
This commit is contained in:
parent
29dc61270e
commit
e9c8c4d2ee
@ -96,7 +96,7 @@ defined('ROUTE_LOGIN_V') OR define('ROUTE_LOGIN_V', 'generateSatelliteImg
|
|||||||
defined('ROUTE_LOGIN_U') OR define('ROUTE_LOGIN_U', 'generateOTP');
|
defined('ROUTE_LOGIN_U') OR define('ROUTE_LOGIN_U', 'generateOTP');
|
||||||
defined('ROUTE_LOGIN_T') OR define('ROUTE_LOGIN_T', 'verifyOTP');
|
defined('ROUTE_LOGIN_T') OR define('ROUTE_LOGIN_T', 'verifyOTP');
|
||||||
defined('ROUTE_LOGIN_S') OR define('ROUTE_LOGIN_S', 'purge_pddata');
|
defined('ROUTE_LOGIN_S') OR define('ROUTE_LOGIN_S', 'purge_pddata');
|
||||||
defined('ROUTE_LOGIN_J') OR define('ROUTE_LOGIN_J', 'newSalesPd');
|
defined('ROUTE_LOGIN_J') OR define('ROUTE_LOGIN_J', 'googleSheet');
|
||||||
defined('ROUTE_LOGIN_I') OR define('ROUTE_LOGIN_I', 'saveDatadumpRequest');
|
defined('ROUTE_LOGIN_I') OR define('ROUTE_LOGIN_I', 'saveDatadumpRequest');
|
||||||
defined('ROUTE_LOGIN_H') OR define('ROUTE_LOGIN_H', 'transferCreditPDToCETApp');
|
defined('ROUTE_LOGIN_H') OR define('ROUTE_LOGIN_H', 'transferCreditPDToCETApp');
|
||||||
defined('ROUTE_LOGIN_G') OR define('ROUTE_LOGIN_G', 'transferSalesPDToCETApp');
|
defined('ROUTE_LOGIN_G') OR define('ROUTE_LOGIN_G', 'transferSalesPDToCETApp');
|
||||||
|
|||||||
@ -392,7 +392,7 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
$sales_pd_id = $details[$i]['sales_pd_id'];
|
$sales_pd_id = $details[$i]['sales_pd_id'];
|
||||||
// echo $sales_pd_id;
|
// echo $sales_pd_id;
|
||||||
$result = $this->dataSynchronization($sales_pd_id);
|
$result = $this->dataSynchronization($sales_pd_id);
|
||||||
$data['CETresponse'][$i][$sales_pd_id] = $result;
|
$data['CETresponse'][$sales_pd_id] = $result;
|
||||||
sleep(2);
|
sleep(2);
|
||||||
if(isset($result->status) && $result->status == 200){
|
if(isset($result->status) && $result->status == 200){
|
||||||
$flag = $flag+1;
|
$flag = $flag+1;
|
||||||
@ -483,7 +483,9 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
$photograph_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
$photograph_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
$satellite_image = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
$satellite_image = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
log_message('ERROR', '#### Sales PD ('.$sales_pd_id.') There are ' . count($photograph_data).' Images');
|
log_message('ERROR', '#### Sales PD ('.$sales_pd_id.') There are ' . count($photograph_data).' Images');
|
||||||
|
$totalimages = count($satellite_image)+count($photograph_data);
|
||||||
if(count($photograph_data)>0){
|
if(count($photograph_data)>0){
|
||||||
|
$j=0;
|
||||||
for ($i = 0; $i < count($photograph_data); $i++){
|
for ($i = 0; $i < count($photograph_data); $i++){
|
||||||
$img_fields = $common_fields;
|
$img_fields = $common_fields;
|
||||||
$img_fields['img_name'] = $photograph_data[$i]['img_name'];
|
$img_fields['img_name'] = $photograph_data[$i]['img_name'];
|
||||||
@ -491,6 +493,7 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
$img_fields['img'] = $img_split[1];
|
$img_fields['img'] = $img_split[1];
|
||||||
// $img_fields[0]['img'] = $photograph_data[$i]['img'];
|
// $img_fields[0]['img'] = $photograph_data[$i]['img'];
|
||||||
$img_result = cet_salespd::pushwithcetphotographapi($img_fields,$i);
|
$img_result = cet_salespd::pushwithcetphotographapi($img_fields,$i);
|
||||||
|
if(isset($img_result->status) && ($img_result->status == 200)){$j++;}else{ log_message('ERROR', '#### Sales PD ('.$sales_pd_id.') ' . $photograph_data[$i]['img_name'].' Images Not Transfer Check it'); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,7 +503,9 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
$stt_fields['img_name'] = $satellite_image[0]['img_name'];
|
$stt_fields['img_name'] = $satellite_image[0]['img_name'];
|
||||||
$stt_fields['img'] = $satellite_image[0]['img'];
|
$stt_fields['img'] = $satellite_image[0]['img'];
|
||||||
$stt_result = cet_salespd::pushwithcetphotographapi($stt_fields,0);
|
$stt_result = cet_salespd::pushwithcetphotographapi($stt_fields,0);
|
||||||
|
if(isset($stt_result->status) && ($stt_result->status == 200)){$j++;}else{ log_message('ERROR', '#### Sales PD ('.$sales_pd_id.') ' . $satellite_image[0]['img_name'].' Images Not Transfer Check it'); }
|
||||||
}
|
}
|
||||||
|
$result->imageStatus = $j.'/'.$totalimages;
|
||||||
return $result;
|
return $result;
|
||||||
}else{
|
}else{
|
||||||
log_message('ERROR',"### CET APP SALES PDID (".$sales_pd_id.") PullSalesPDData response :".json_encode($result));
|
log_message('ERROR',"### CET APP SALES PDID (".$sales_pd_id.") PullSalesPDData response :".json_encode($result));
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class AUTHORIZATION
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( $routingName == LOGIN || $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B || $routingName == ROUTE_LOGIN_C || $routingName == ROUTE_LOGIN_D || $routingName == ROUTE_LOGIN_E || $routingName == ROUTE_LOGIN_F || $routingName == ROUTE_LOGIN_S || $routingName == ROUTE_LOGIN_G || $routingName == ROUTE_LOGIN_H || $routingName == ROUTE_LOGIN_I)
|
if( $routingName == LOGIN || $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B || $routingName == ROUTE_LOGIN_C || $routingName == ROUTE_LOGIN_D || $routingName == ROUTE_LOGIN_E || $routingName == ROUTE_LOGIN_F || $routingName == ROUTE_LOGIN_S || $routingName == ROUTE_LOGIN_G || $routingName == ROUTE_LOGIN_H || $routingName == ROUTE_LOGIN_I || $routingName == ROUTE_LOGIN_J)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class CET_SALESPD
|
|||||||
curl_close( $ch );
|
curl_close( $ch );
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$response = array();
|
$response->error = array($e->getMessage());
|
||||||
log_message('ERROR', "CET APP SALES PDID (".$pdid.") ERR : " . $e->getMessage());
|
log_message('ERROR', "CET APP SALES PDID (".$pdid.") ERR : " . $e->getMessage());
|
||||||
}
|
}
|
||||||
return $response;
|
return $response;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user