RENTAL PHOTO CHNAGE
This commit is contained in:
parent
81288c22a3
commit
12cf8b746b
@ -6095,7 +6095,8 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
$records = $this->post('records');
|
$records = $this->post('records');
|
||||||
$company_id = isset($records['company_id']) && $records['company_id']? $records['company_id'] : null;
|
$company_id = isset($records['company_id']) && $records['company_id']? $records['company_id'] : null;
|
||||||
$res = $this->saveBase64Images($records['pd_id'],$records['formid'],$company_id,$records['images']);
|
$rental_count_id = isset($records['company_id']) && $records['company_id'] ? $records['company_id'] : null;
|
||||||
|
$res = $this->saveBase64Images($records['pd_id'],$records['formid'],$company_id,$rental_count_id,$records['images']);
|
||||||
|
|
||||||
if(count($res))
|
if(count($res))
|
||||||
{
|
{
|
||||||
@ -6118,7 +6119,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
public function getPDImages_post()
|
public function getPDImages_post()
|
||||||
{
|
{
|
||||||
$records = $this->post('records');
|
$records = $this->post('records');
|
||||||
$result_data = $this->PD_Model->getSignedPDDocsURL($records['pd_id'],isset($records['form_id']) ? $records['form_id']: null ,isset($records['company_id']) ? $records['company_id'] : null,isset($records['is_common']) ? $records['is_common'] : null);
|
$result_data = $this->PD_Model->getSignedPDDocsURL($records['pd_id'],isset($records['form_id']) ? $records['form_id']: null ,isset($records['company_id']) ? $records['company_id'] : null,isset($records['is_common']) ? $records['is_common'] : null,$records['rental_count_id']);
|
||||||
if(count($result_data))
|
if(count($result_data))
|
||||||
{
|
{
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
@ -6136,7 +6137,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveBase64Images($pd_id,$form_id = null,$company_id = null,$data)
|
public function saveBase64Images($pd_id,$form_id = null,$company_id = null,$rental_count_id = null;$data)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -6182,7 +6183,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||||
{
|
{
|
||||||
$record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'pd_document_name'=>$tempdocname,'fk_form_id'=>$form_id,'is_show_report' =>$is_show_report);
|
$record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'pd_document_name'=>$tempdocname,'fk_form_id'=>$form_id,'is_show_report' =>$is_show_report,'rental_count_id' => $rental_count_id);
|
||||||
$record_data['company_id'] = $company_id ? $company_id : null;
|
$record_data['company_id'] = $company_id ? $company_id : null;
|
||||||
$id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS);
|
$id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS);
|
||||||
if($id != null || $id != "") { $count++;}
|
if($id != null || $id != "") { $count++;}
|
||||||
|
|||||||
@ -217,7 +217,7 @@ class PD_Model extends SPARQ_Model {
|
|||||||
/*
|
/*
|
||||||
*Get All PD Related Documents as signed and expired URL's from S3 Buckets
|
*Get All PD Related Documents as signed and expired URL's from S3 Buckets
|
||||||
*/
|
*/
|
||||||
public function getSignedPDDocsURL($pdid,$form_id = null,$company_id = null,$is_common_api = null)
|
public function getSignedPDDocsURL($pdid,$form_id = null,$company_id = null,$is_common_api = null,$rental_count_id = null)
|
||||||
{
|
{
|
||||||
//echo $pdid,$form_id,$company_id;die();
|
//echo $pdid,$form_id,$company_id;die();
|
||||||
$document_lists = array();
|
$document_lists = array();
|
||||||
@ -239,6 +239,12 @@ class PD_Model extends SPARQ_Model {
|
|||||||
if($company_id != null){
|
if($company_id != null){
|
||||||
$where_condition_array['company_id'] = $company_id ;
|
$where_condition_array['company_id'] = $company_id ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($rental_count_id != null)
|
||||||
|
{
|
||||||
|
$where_condition_array['rental_count_id'] = $rental_count_id ;
|
||||||
|
}
|
||||||
|
|
||||||
if($is_common_api != null)
|
if($is_common_api != null)
|
||||||
{
|
{
|
||||||
$where_condition_array['company_id'] = null ;
|
$where_condition_array['company_id'] = null ;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user