CHANGE_TPA_RECON
This commit is contained in:
parent
7a97ced0f6
commit
9194787e14
@ -227,6 +227,8 @@ $routes->group("/employee", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get("retail-endorsement-list", "EmployeeController::retailendorsementlist");
|
||||
$routes->post("retail-endorsement-save", "EmployeeController::retailendorsementsave");
|
||||
$routes->get("getTPADataVariationReport/(:num)", "EmployeeController::getTPADataVariationReport/$1");
|
||||
$routes->get("getTPADataVariationReportView/(:num)", "EmployeeController::getTPADataVariationReport/$1/view");
|
||||
$routes->get("proceedTPADataVariationNextStep/(:num)", "EmployeeController::proceedTPADataVariationNextStep/$1");
|
||||
$routes->get("bulkGenerateEcardAndStoreinS3", "EmployeeController::bulkGenerateEcardAndStoreinS3");
|
||||
$routes->get('clearCdSession', 'EmployeeController::clearCdSession');
|
||||
$routes->get('checkSessionStatus', 'EmployeeController::checkSessionStatus');
|
||||
|
||||
@ -3938,7 +3938,7 @@ class EmployeeController extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function getTPADataVariationReport($file_id)
|
||||
public function getTPADataVariationReport($file_id, $type = 'download')
|
||||
{
|
||||
$file_info = $this->batchFileModel->where('id', $file_id)->find();
|
||||
$client_id = $file_info[0]['client_id'];
|
||||
@ -3985,17 +3985,107 @@ class EmployeeController extends AdminController
|
||||
->findAll();
|
||||
// d($not_in_nhance);die();
|
||||
|
||||
if( !empty($not_in_tpa) || !empty($not_in_nhance) || !empty($emp_data_wo_tpa_id) )
|
||||
{
|
||||
$this->exportVariationReportExcel($not_in_tpa,$not_in_nhance,$emp_data_wo_tpa_id);
|
||||
if (!empty($not_in_tpa) || !empty($not_in_nhance) || !empty($emp_data_wo_tpa_id)) {
|
||||
if ($type === 'download') {
|
||||
$this->exportVariationReportExcel($not_in_tpa, $not_in_nhance, $emp_data_wo_tpa_id);
|
||||
} else {
|
||||
$response = [
|
||||
'not_in_tpa' => $not_in_tpa,
|
||||
'not_in_nhance' => $not_in_nhance,
|
||||
'mismatch_data' => $emp_data_wo_tpa_id,
|
||||
];
|
||||
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => true,
|
||||
'code' => 200,
|
||||
'message' => '',
|
||||
'data' => $response,
|
||||
],
|
||||
200
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if ($type === 'download') {
|
||||
return false;
|
||||
}
|
||||
// $this->exportVariationReportExcel([],[],[]);
|
||||
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => false,
|
||||
'code' => 202,
|
||||
'message' => 'No data found',
|
||||
'data' => [],
|
||||
],
|
||||
200
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function proceedTPADataVariationNextStep($file_id)
|
||||
{
|
||||
try {
|
||||
if (empty($file_id)) {
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => false,
|
||||
'code' => 400,
|
||||
'message' => 'Invalid file reference',
|
||||
'data' => [],
|
||||
],
|
||||
200
|
||||
);
|
||||
}
|
||||
|
||||
$file = $this->batchFileModel->find($file_id);
|
||||
|
||||
if (!$file) {
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => false,
|
||||
'code' => 404,
|
||||
'message' => 'File not found',
|
||||
'data' => [],
|
||||
],
|
||||
200
|
||||
);
|
||||
}
|
||||
|
||||
$this->myLogger->logme(
|
||||
'error',
|
||||
'TPA variation review completed and proceed to next clicked',
|
||||
[
|
||||
'file_id' => $file_id,
|
||||
'user_id' => get_session_userid(),
|
||||
]
|
||||
);
|
||||
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => true,
|
||||
'code' => 200,
|
||||
'message' => 'Proceed to next step recorded successfully.',
|
||||
'data' => [],
|
||||
],
|
||||
200
|
||||
);
|
||||
} catch (\Throwable $e) {
|
||||
$this->myLogger->logme(
|
||||
'error',
|
||||
'Error while processing TPA variation proceed to next: ' . $e->getMessage(),
|
||||
['file_id' => $file_id]
|
||||
);
|
||||
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => false,
|
||||
'code' => 500,
|
||||
'message' => 'Unable to proceed to the next step at the moment.',
|
||||
'data' => [],
|
||||
],
|
||||
200
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user