From ac2e9e200636a52b763512832187728788f4dbfd Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 28 Apr 2025 13:47:46 +0700 Subject: [PATCH] #1453 --- src/controllers/ReportController.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 4b44251..01b4f88 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -7236,7 +7236,7 @@ export class ReportController extends Controller { let conditionGroup = ""; if (body.type.trim().toUpperCase() == "GROUP1.1") { conditionGroup = - "(salaryProfile.posType = 'ทั่วไป' AND salaryProfile.posLevel = 'ชำนาญงาน') OR (salaryProfile.posType = 'ทั่วไป' AND salaryProfile.posLevel = 'ปฏิบัติงาน') OR (salaryProfile.posType = 'วิชาการ' AND salaryProfile.posLevel = 'ปฏิบัติการ') OR (salaryProfile.posType = 'วิชาการ' AND salaryProfile.posLevel = 'ชำนาญการ')"; + "(salaryProfile.posType = 'ทั่วไป' AND salaryProfile.posLevel = 'ชำนาญงาน') OR (salaryProfile.posType = 'ทั่วไป' AND salaryProfile.posLevel = 'ปฏิบัติงาน') OR (salaryProfile.posType = 'ทั่วไป' AND salaryProfile.posLevel = 'อาวุโส') OR (salaryProfile.posType = 'วิชาการ' AND salaryProfile.posLevel = 'ปฏิบัติการ') OR (salaryProfile.posType = 'วิชาการ' AND salaryProfile.posLevel = 'ชำนาญการ') OR (salaryProfile.posType = 'วิชาการ' AND salaryProfile.posLevel = 'ชำนาญการพิเศษ') OR (salaryProfile.posType = 'อำนวยการ' AND salaryProfile.posLevel = 'ต้น')"; } else if (body.type.trim().toUpperCase() == "GROUP1.2") { conditionGroup = "(salaryProfile.posType = 'ทั่วไป' AND salaryProfile.posLevel = 'อาวุโส') OR (salaryProfile.posType = 'วิชาการ' AND salaryProfile.posLevel = 'ชำนาญการพิเศษ') OR (salaryProfile.posType = 'อำนวยการ' AND salaryProfile.posLevel = 'ต้น')"; @@ -7255,7 +7255,6 @@ export class ReportController extends Controller { const salaryOrgs = await this.salaryOrgRepository.find({ where: { salaryPeriodId: salary.id, snapshot: "SNAP2" }, }); - let salaryRank = await AppDataSource.getRepository(SalaryProfile) .createQueryBuilder("salaryProfile") .andWhere("salaryProfile.rootId LIKE :rootId", { @@ -7296,7 +7295,7 @@ export class ReportController extends Controller { .addOrderBy("salaryProfile.child4Order", "ASC") .addOrderBy("salaryProfile.posMasterNo", "ASC") .getMany(); - + const _salaryRank = salaryRank.map((item) => ({ id: item.id, posMasterNo: `${item.orgShortName} ${item.posMasterNo}`,