CHANGE_API : RV

This commit is contained in:
VENKATESHWARAN 2025-06-03 11:13:50 +05:30
parent 179bc74ce9
commit 783aaa9a54
5 changed files with 11 additions and 6 deletions

View File

@ -448,6 +448,7 @@ $routes->cli('cli/new_gdrive_token', 'GoogleDriveController::generateNewGoogleDr
//crone job
$routes->cli('cli/enrollOpendAndClose', 'DashboardController::updatePolicyEnrollmentStatus');
$routes->cli("cli/sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
$routes->cli('cli/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus');
//Employee login api's
$routes->post("/employeeRest/verifyEmployeeNumber", "RestAuthenticationController::verifyEmployeeWithMobileNumber");

View File

@ -336,7 +336,8 @@ class EmployeeController extends AdminController
->join('client_branch cb', 'files.client_branch_id = cb.id', 'left')
->join('policy_type', 'policy_type.id = cp.policy_type_id')
->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
->join("client_rm cr","cr.client_id = c.id and cr.is_active = 1",'left');
->join("client_rm cr","cr.client_id = c.id and cr.is_active = 1",'left')
->where('files.is_active', 1);
if (in_array($role_id, [2, 3])) {
// If the user is a Account Manager or Manager, filter by user_id
@ -386,7 +387,8 @@ class EmployeeController extends AdminController
->join('client_branch', 'client_branch.id = batch_files.client_branch_id')
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
->join('clients', 'clients.id = client_policy.client_id')
->join("client_rm cr","cr.client_id = clients.id and cr.is_active = 1",'left');
->join("client_rm cr","cr.client_id = clients.id and cr.is_active = 1",'left')
->where('batch_files.is_active', 1);
if (in_array($role_id, [2, 3])) {
// If the user is a Account Manager or Manager, filter by user_id

View File

@ -2502,7 +2502,8 @@ class EmployeeRestController extends AdminController
function getEmployeeActiveOrInactivePolicy()
{
if($this->request->getGet('type') == 'Active'){ $policy_status = 1; }else{ $policy_status = 0; }
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policy_type.policy_type as policy_type,insurers.name as insurer_name,tpa.name as tpa_name,tpa.network_hospitals as network_hospitals_url, policy_type.long_name as policy_long_name')
$dayInterval = 10;
$ClientPolicyData = $this->clientPolicyModel->select("client_policy.* , policy_type.policy_type as policy_type,insurers.name as insurer_name,tpa.name as tpa_name,tpa.network_hospitals as network_hospitals_url, policy_type.long_name as policy_long_name, DATE_ADD(client_policy.policy_end_date, INTERVAL {$dayInterval} DAY) as claims_grace_date")
->join('insurers', 'client_policy.insurer_id = insurers.id', 'left')
->join('tpa', 'client_policy.tpa_id = tpa.id', 'left')
->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left')
@ -2565,6 +2566,7 @@ class EmployeeRestController extends AdminController
$data['policy_start_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_start_date']);
$data['policy_end_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_end_date']);
$data['heading'] = $ClientPolicyValue['policy_long_name'];
$data['claims_grace_date'] = $ClientPolicyValue['claims_grace_date'];
// $data['policy_terms'] = $terms;
// if($ClientPolicyValue['policy_type_id'] == 1){ $data['heading'] = 'Group Personal Accident Coverage'; }else

View File

@ -78,7 +78,7 @@ class RestAuthenticationController extends AdminController
->where('employees.emp_status !=', 'truncated')
->where('employees.mobile', $mobile_number)
->where('EP.is_active', 1)
->whereIn('EP.status', ['active'])
->whereIn('EP.status', ['active', 'expired'])
->first();
@ -118,7 +118,7 @@ class RestAuthenticationController extends AdminController
->where('employees.emp_status !=', 'truncated')
->where('employees.email_corporate', $email)
->where('EP.is_active', 1)
->whereIn('EP.status', ['active'])
->whereIn('EP.status', ['active', 'expired'])
->first();
if (isset($employeeData['employee_id'])) {

View File

@ -331,7 +331,7 @@ class ClientPolicyModel extends Model
$client_count = $this->db->affectedRows();
// Update employee_polices table
$employee = $this->db->query("UPDATE employee_polices SET status = 'expired', is_active = 0 WHERE policy_end_date < CURDATE()");
$employee = $this->db->query("UPDATE employee_polices SET status = 'expired' WHERE policy_end_date < CURDATE()");
$emp_count = $this->db->affectedRows();
// Log the result