CHANGES_ in hr api's : GWM
This commit is contained in:
parent
b0de0e9d84
commit
fb0426a308
@ -477,7 +477,8 @@ $routes->post("calculatePremium", "EmployeeRestController::calculatePremium");
|
|||||||
$routes->post("iAgreeForAddOn", "EmployeeRestController::iAgreeForAddOn");
|
$routes->post("iAgreeForAddOn", "EmployeeRestController::iAgreeForAddOn");
|
||||||
|
|
||||||
$routes->get("exportDataByClientPolicyId", "EmployeeRestController::exportDataByClientPolicyId");
|
$routes->get("exportDataByClientPolicyId", "EmployeeRestController::exportDataByClientPolicyId");
|
||||||
$routes->get("getCashDepositData", "EmployeeRestController::getCashDepositData");
|
|
||||||
|
$routes->get("getPolicyLevelEmployeeSummaryData", "EmployeeRestController::getPolicyLevelEmployeeSummaryData");
|
||||||
$routes->get("exportCashDepositData", "EmployeeRestController::exportCashDepositData");
|
$routes->get("exportCashDepositData", "EmployeeRestController::exportCashDepositData");
|
||||||
|
|
||||||
$routes->get("removeEmpAndEmpPolicyData", "EmployeeRestController::removeEmpAndEmpPolicyData");
|
$routes->get("removeEmpAndEmpPolicyData", "EmployeeRestController::removeEmpAndEmpPolicyData");
|
||||||
|
|||||||
@ -2487,38 +2487,17 @@ class EmployeeRestController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCashDepositData()
|
public function getPolicyLevelEmployeeSummaryData()
|
||||||
{
|
{
|
||||||
|
|
||||||
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.client_id as clientId , client_policy.insurer_id as insurerId,insurers.name as insurer_name')
|
|
||||||
->join('insurers', 'client_policy.insurer_id = insurers.id', 'left')
|
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type ')
|
||||||
->where('client_policy.client_id', $this->request->getGet('client_id') )
|
->where('client_policy.client_id', $this->request->getGet('client_id') )
|
||||||
->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') )
|
->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') )
|
||||||
->where('client_policy.is_active', 1 )
|
->where('client_policy.is_active', 1 )
|
||||||
->where('client_policy.policy_status', 1)
|
->where('client_policy.policy_status', 1)
|
||||||
->groupBy('client_policy.insurer_id')
|
|
||||||
->findAll();
|
->findAll();
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
if(count($ClientPolicyData))
|
|
||||||
{
|
|
||||||
foreach ($ClientPolicyData as $key => $value) {
|
|
||||||
|
|
||||||
$data['clientId'] = $value['clientId'];
|
|
||||||
$data['insurerId'] = $value['insurerId'];
|
|
||||||
$data['insurerName'] = $value['insurer_name'];
|
|
||||||
$data['depositData'] = $this->clientPolicyModel->getdepositData($value['clientId'],$value['insurerId']);
|
|
||||||
$data['balance'] = count($data['depositData']) ? $data['depositData'][0]->balance : 0;
|
|
||||||
|
|
||||||
$data['policyDetails'] = [];
|
|
||||||
$ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type ')
|
|
||||||
|
|
||||||
->where('client_policy.insurer_id', $value['insurerId'] )
|
|
||||||
->where('client_policy.client_id', $this->request->getGet('client_id') )
|
|
||||||
->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') )
|
|
||||||
->where('client_policy.is_active', 1 )
|
|
||||||
->where('client_policy.policy_status', 1)
|
|
||||||
->findAll();
|
|
||||||
// dd( $ClientPolicyData);
|
// dd( $ClientPolicyData);
|
||||||
foreach ($ClientPolicyData as $key => $value)
|
foreach ($ClientPolicyData as $key => $value)
|
||||||
{
|
{
|
||||||
@ -2543,13 +2522,8 @@ class EmployeeRestController extends AdminController
|
|||||||
$value['membersCountOfEnrolled'] = $enrolledCount;
|
$value['membersCountOfEnrolled'] = $enrolledCount;
|
||||||
$value['membersCountOfDraft'] = $draftCount;
|
$value['membersCountOfDraft'] = $draftCount;
|
||||||
|
|
||||||
array_push($data['policyDetails'],$value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
array_push($result,$value);
|
||||||
array_push($result,$data);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2724,7 +2698,7 @@ class EmployeeRestController extends AdminController
|
|||||||
->where('client_policy.enrolment_visibility', 1 )
|
->where('client_policy.enrolment_visibility', 1 )
|
||||||
->orderby('client_policy.id' , 'ASC')
|
->orderby('client_policy.id' , 'ASC')
|
||||||
->findAll();
|
->findAll();
|
||||||
dd( $ClientPolicyData);
|
|
||||||
// Retrieve employee and dependents data by passing the employee code
|
// Retrieve employee and dependents data by passing the employee code
|
||||||
$employeeData = $this->employeeModel->where('emp_code',$this->request->getGet('emp_code'))
|
$employeeData = $this->employeeModel->where('emp_code',$this->request->getGet('emp_code'))
|
||||||
->where('client_id',$this->request->getGet('client_id'))
|
->where('client_id',$this->request->getGet('client_id'))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user