From e5dfed9312d32ac3d7d2a0d9c8599fce8ba82858 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 1 Oct 2025 17:58:36 +0700 Subject: [PATCH] fix query --- src/controllers/ProfileController.ts | 2 +- src/controllers/ProfileEmployeeController.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index bc02a392..e6f4c1e7 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -5888,7 +5888,7 @@ export class ProfileController extends Controller { ) // .andWhere("profile.leaveCommandId Is NOT NULL") .andWhere( - "profileSalary.order = (SELECT MAX(ps.order) FROM profileSalary ps WHERE ps.profileId = profile.id and profileSalary.positionName != 'เกษียณอายุราชการ')", + "profileSalary.order = (SELECT MAX(ps.order) FROM profileSalary ps WHERE ps.profileId = profile.id and ps.positionName != 'เกษียณอายุราชการ')", ) .andWhere( diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 076881de..7ee64703 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2786,7 +2786,7 @@ export class ProfileEmployeeController extends Controller { ) // .andWhere("profileEmployee.leaveCommandId Is NOT NULL") .andWhere( - "profileSalary.order = (SELECT MAX(ps.order) FROM profileSalary ps WHERE ps.profileEmployeeId = profileEmployee.id and profileSalary.positionName != 'เกษียณอายุราชการ')", + "profileSalary.order = (SELECT MAX(ps.order) FROM profileSalary ps WHERE ps.profileEmployeeId = profileEmployee.id and ps.positionName != 'เกษียณอายุราชการ')", ) // .andWhere(