FIX_ISSUE
This commit is contained in:
parent
3c58db2692
commit
b63950ed00
@ -6470,9 +6470,9 @@ class ClientController extends AdminController
|
||||
// ---------- EMP SERVICE CONTROLLER --------------------------------------------------------------------------------
|
||||
|
||||
$empServiceController = new EmployeeServiceController();
|
||||
// $res = $empServiceController->excelFileFormatValidation(['file_id' => '1248']);
|
||||
// $res = $empServiceController->excelFileDataValidation(['file_id' => '1252']);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1263]);
|
||||
// $res = $empServiceController->excelFileFormatValidation(['file_id' => '1264']);
|
||||
// $res = $empServiceController->excelFileDataValidation(['file_id' => '1264']);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1264]);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1262]);
|
||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1169]);
|
||||
// $res = $empServiceController->employeesOnboardProcess(['file_id' => 835]);
|
||||
|
||||
@ -1402,6 +1402,8 @@ class EmployeeServiceController extends AdminController
|
||||
|
||||
$employee_data_group_by_family = data_group_by_family($excel_data, 'excel', '', $current_column_action);
|
||||
// dd($employee_data_group_by_family);
|
||||
|
||||
$employee_insert_count = 0;
|
||||
foreach ($employee_data_group_by_family as $emp_id => $family)
|
||||
{
|
||||
|
||||
@ -1425,11 +1427,25 @@ class EmployeeServiceController extends AdminController
|
||||
$data = calculate_premium_new(family_data:$family,policy_terms: $policy_terms,slab_details : $slab_details,fileArr: $file, existing_units:$existing_units);
|
||||
// dd($data);
|
||||
$employee_data_group_by_family[$emp_id] = $data;
|
||||
$this->employeesOnboardProcess(['familiy_data' => $data,'file' => $file]);
|
||||
$res = $this->employeesOnboardProcess(['familiy_data' => $data,'file' => $file]);
|
||||
|
||||
if($res > 0){
|
||||
$employee_insert_count++;
|
||||
}
|
||||
}
|
||||
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
if($employee_insert_count > 0){
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => ''])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded success',['file_id' => $file_id]);
|
||||
}else{
|
||||
$reason = json_encode([
|
||||
'error_summary' => [5 => 1],
|
||||
'error_data' => "Rack rate configuration issue: Please check the slab rates configuration"
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
$this->fileModel->where('id', $file_id)->set(['status' => 'failed','reason' => $reason])->update();
|
||||
$this->myLogger->logme("error",'{file_id} uploaded failed with reason: Rack rate configuration issue: Please check the slab rates configuration',['file_id' => $file_id]);
|
||||
|
||||
}
|
||||
|
||||
$this->setPullNotification($this->getFileMetaDataByFileId($file_id,'success'));
|
||||
|
||||
@ -1842,6 +1858,7 @@ class EmployeeServiceController extends AdminController
|
||||
$policy_details = $this->clientPolicyModel->where('id', $file['policy_id'])->first();
|
||||
// dd($policy_details);
|
||||
|
||||
$employee_insert_count = 0;
|
||||
foreach($familiy_data as $fkey => $value)
|
||||
{
|
||||
if(is_array($value))
|
||||
@ -1974,6 +1991,7 @@ class EmployeeServiceController extends AdminController
|
||||
// else{ $emp_policy_id = $employee_policy[0]['id']; }
|
||||
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
$employee_insert_count++;
|
||||
|
||||
}// if end
|
||||
}// is array check end
|
||||
@ -1982,6 +2000,8 @@ class EmployeeServiceController extends AdminController
|
||||
$this->myLogger->logme('error','######Incoming value is not an array');
|
||||
}
|
||||
}// for end
|
||||
|
||||
return $employee_insert_count;
|
||||
}//function end
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user