From 6554636eeb6decad3b5fdf2168d9d9760d0b2e73 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 17 Oct 2025 12:14:35 +0700 Subject: [PATCH] fix: range date of retire --- src/controllers/ProfileController.ts | 4 ++-- src/controllers/ProfileEmployeeController.ts | 4 ++-- src/controllers/ProfileEmployeeTempController.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 55f857f4..d4e65f29 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -10438,8 +10438,8 @@ export class ProfileController extends Controller { .leftJoinAndSelect("positions.posExecutive", "posExecutive") // calculate range: start = 2 Oct of (year-1), end = 1 Oct of year (inclusive) .where("profile.dateRetire BETWEEN :start AND :end", { - start: `${year - 1}-10-02`, - end: `${year}-10-01`, + start: `${year - 1}-10-01`, + end: `${year}-09-30`, }) .andWhere("profile.isLeave = :isLeave AND profile.isRetirement = :isRetirement", { isLeave: false, diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 4a8f40ca..a7d905ad 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -5034,8 +5034,8 @@ export class ProfileEmployeeController extends Controller { .leftJoinAndSelect("current_holders.positions", "positions") // calculate range: start = 2 Oct of (year-1), end = 1 Oct of year (inclusive) .where("profileEmployee.dateRetire BETWEEN :start AND :end", { - start: `${year - 1}-10-02`, - end: `${year}-10-01`, + start: `${year - 1}-10-01`, + end: `${year}-09-30`, }) .andWhere( "profileEmployee.isLeave = :isLeave AND profileEmployee.isRetirement = :isRetirement", diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index 6cc6e387..46ef525b 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -3231,8 +3231,8 @@ export class ProfileEmployeeTempController extends Controller { // .leftJoinAndSelect("positions.posExecutive", "posExecutive") // calculate range: start = 2 Oct of (year-1), end = 1 Oct of year (inclusive) .where("profileEmployee.dateRetire BETWEEN :start AND :end", { - start: `${year - 1}-10-02`, - end: `${year}-10-01`, + start: `${year - 1}-10-01`, + end: `${year}-09-30`, }) .andWhere( "profileEmployee.isLeave = :isLeave AND profileEmployee.isRetirement = :isRetirement",