FIX_CLIENT_UPLOAD_VALIDATION_ISSUE
This commit is contained in:
parent
a2f85d77ac
commit
9124a8792d
@ -27,7 +27,7 @@ use App\Models\NotificationModel;
|
|||||||
use App\Models\UserModel;
|
use App\Models\UserModel;
|
||||||
use App\Models\FEContentModel;
|
use App\Models\FEContentModel;
|
||||||
use App\Models\AddImgModel;
|
use App\Models\AddImgModel;
|
||||||
use App\Models\FileModel;
|
|
||||||
|
|
||||||
|
|
||||||
use App\Controllers\Jobs ;
|
use App\Controllers\Jobs ;
|
||||||
@ -668,7 +668,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$file_name_with_path = WRITEPATH."/uploads/excel/".$filename;
|
$file_name_with_path = WRITEPATH."/uploads/excel/".$filename;
|
||||||
|
|
||||||
//make an entry in DB
|
//make an entry in DB
|
||||||
$file_id = $this->fileModel->insert(['file_name' => $filename, 'client_id' => $client_id, 'policy_id' => $policy_id, 'created_by' => $loggedInUserID, 'status' => $status, 'action' => 'enrollment', 'client_branch_id' => $client_branch_id]); //here field policy_id have client_policy_id and not policy id from policy master
|
$file_id = $this->fileModel->insert(['file_name' => $filename, 'client_id' => $client_id, 'policy_id' => $policy_id, 'created_by' =>$employee_id, 'status' => 'inprogress', 'action' => 'enrollment', 'client_branch_id' => $client_branch_id]); //here field policy_id have client_policy_id and not policy id from policy master
|
||||||
$this->myLogger->logme("error", '{file_id} - client uploaded success', ['file_id' => $file_id]);
|
$this->myLogger->logme("error", '{file_id} - client uploaded success', ['file_id' => $file_id]);
|
||||||
|
|
||||||
$empServiceController = new EmployeeServiceController();
|
$empServiceController = new EmployeeServiceController();
|
||||||
@ -712,23 +712,23 @@ class EmployeeRestController extends AdminController
|
|||||||
$file_data =$this->fileModel->insert($extractData);
|
$file_data =$this->fileModel->insert($extractData);
|
||||||
|
|
||||||
$extra = [];
|
$extra = [];
|
||||||
if (count($data[0]) == 11) {
|
// if (count($data[0]) == 11) {
|
||||||
$value = ['Sno','Emp_Code','Name','DOJ','Gender','Relation','DOB','Mail','Mobile','SI','Grade'];
|
// $value = ['Sno','Emp_Code','Name','DOJ','Gender','Relation','DOB','Mail','Mobile','SI','Grade'];
|
||||||
$check_miss_match = [];
|
// $check_miss_match = [];
|
||||||
for ($i=0; $i <count($value) ; $i++) {
|
// for ($i=0; $i <count($value) ; $i++) {
|
||||||
if ($data[0][$i] != $value[$i]) {
|
// if ($data[0][$i] != $value[$i]) {
|
||||||
$check_miss_match[]=$data[0][$i];
|
// $check_miss_match[]=$data[0][$i];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (count($check_miss_match) > 0) {
|
// if (count($check_miss_match) > 0) {
|
||||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Column Name's are miss Match's!", 'data'=> $check_miss_match], 200);
|
// return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Column Name's are miss Match's!", 'data'=> $check_miss_match], 200);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(count($data[0]) != 11){
|
// if(count($data[0]) != 11){
|
||||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Uploaded file row count is Not Match!" ], 200);
|
// return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Uploaded file row count is Not Match!" ], 200);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//this change the column name into index number
|
//this change the column name into index number
|
||||||
for ($i = 0; $i < count($data[0]); $i++) {
|
for ($i = 0; $i < count($data[0]); $i++) {
|
||||||
|
|||||||
@ -873,7 +873,7 @@ class EmployeeServiceController extends AdminController
|
|||||||
$job_details = new Jobs();
|
$job_details = new Jobs();
|
||||||
$r = Jobs::addJob(['job_name' => 'excelFileDataValidation','payload' => ['file_id' => $file_id]]);
|
$r = Jobs::addJob(['job_name' => 'excelFileDataValidation','payload' => ['file_id' => $file_id]]);
|
||||||
// $jobWorker = new JobWorker();
|
// $jobWorker = new JobWorker();
|
||||||
// JobWorker::processJob($r);s
|
// JobWorker::processJob($r);
|
||||||
|
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@ -632,7 +632,7 @@ if (!function_exists('check_dependent_conflict'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//check for any cross parents but not more than two
|
//check for any cross parents but not more than two
|
||||||
if($allowed_adults == 0 && $allowed_parents_count == 1 && $allowed_parent_in_laws_count == 1 && (2 < ($received_parents_count + $received_parent_in_laws_count)))
|
if($allowed_adults == 2 && (2 < ($received_parents_count + $received_parent_in_laws_count)))
|
||||||
{
|
{
|
||||||
// dd($allowed_adults);
|
// dd($allowed_adults);
|
||||||
$result['status'] = false;
|
$result['status'] = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user