fix query

This commit is contained in:
Warunee Tamkoo 2025-10-01 17:58:36 +07:00
parent a45d3744e5
commit e5dfed9312
2 changed files with 2 additions and 2 deletions

View file

@ -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(

View file

@ -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(