fix: [esign] 근로계약서 연봉계약종료연도 및 연봉 상세내역 자동반영
- 연봉계약 기간: salary_effective_date 없을 때 입사일 기념일 기준 현재 계약기간 산출 (직전 기념일~다음 기념일-1일) - API 응답에 기본급, 고정연장근로수당, 식대, 월급여, 통상시급 추가 - labelMap에 기본급, 고정연장근로수당, 식대, 통상시급 패턴 추가
This commit is contained in:
@@ -117,6 +117,12 @@ public function searchEmployees(Request $request): JsonResponse
|
||||
// 최신 연봉 정보 결정: 현재값 우선, 없으면 이력에서 최신 탐색
|
||||
$annualSalary = $salaryInfo['annual_salary'] ?? null;
|
||||
$salaryEffectiveDate = $salaryInfo['effective_date'] ?? null;
|
||||
$baseSalary = $salaryInfo['base_salary'] ?? null;
|
||||
$fixedOvertimePay = $salaryInfo['fixed_overtime_pay'] ?? null;
|
||||
$mealAllowance = $salaryInfo['meal_allowance'] ?? null;
|
||||
$fixedOvertimeHours = $salaryInfo['fixed_overtime_hours'] ?? null;
|
||||
$monthlySalary = $salaryInfo['monthly_salary'] ?? null;
|
||||
$hourlyWage = $salaryInfo['hourly_wage'] ?? null;
|
||||
|
||||
if ($annualSalary === null && ! empty($salaryInfo['history'])) {
|
||||
$latest = collect($salaryInfo['history'])
|
||||
@@ -124,6 +130,10 @@ public function searchEmployees(Request $request): JsonResponse
|
||||
->first();
|
||||
$annualSalary = $latest['annual_salary'] ?? null;
|
||||
$salaryEffectiveDate = $latest['effective_date'] ?? null;
|
||||
$baseSalary = $latest['base_salary'] ?? null;
|
||||
$fixedOvertimePay = $latest['fixed_overtime_pay'] ?? null;
|
||||
$mealAllowance = $latest['meal_allowance'] ?? $mealAllowance;
|
||||
$fixedOvertimeHours = $latest['fixed_overtime_hours'] ?? null;
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -141,6 +151,12 @@ public function searchEmployees(Request $request): JsonResponse
|
||||
'birth_day' => $birthDay,
|
||||
'annual_salary' => $annualSalary,
|
||||
'salary_effective_date' => $salaryEffectiveDate,
|
||||
'base_salary' => $baseSalary,
|
||||
'fixed_overtime_pay' => $fixedOvertimePay,
|
||||
'meal_allowance' => $mealAllowance,
|
||||
'fixed_overtime_hours' => $fixedOvertimeHours,
|
||||
'monthly_salary' => $monthlySalary,
|
||||
'hourly_wage' => $hourlyWage,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user