From abe581f0e543105ded9d7d9454f1be92ed9f0a8b Mon Sep 17 00:00:00 2001 From: kittapath Date: Thu, 6 Mar 2025 00:39:50 +0700 Subject: [PATCH] no message --- src/controllers/ProfileSalaryController.ts | 84 +++++++++++----------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/src/controllers/ProfileSalaryController.ts b/src/controllers/ProfileSalaryController.ts index e352dbe1..d2bee9eb 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -237,26 +237,28 @@ export class ProfileSalaryController extends Controller { throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว"); } const record = await this.salaryRepo.find({ - where: { - profileId: profile.id, - commandCode: In([ - "0", - "9", - "1", - "2", - "3", - "4", - "8", - "10", - "11", - "12", - "13", - "14", - "15", - "16", - IsNull(), - ]), - }, + where: [ + { + profileId: profile.id, + commandCode: In([ + "0", + "9", + "1", + "2", + "3", + "4", + "8", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + ]), + }, + { profileId: profile.id, commandCode: IsNull() }, + ], // order: { order: "ASC" }, order: { commandDateAffect: "ASC" }, }); @@ -281,26 +283,28 @@ export class ProfileSalaryController extends Controller { if (_workflow == false) await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", profileId); const record = await this.salaryRepo.find({ - where: { - profileId: profileId, - commandCode: In([ - "0", - "9", - "1", - "2", - "3", - "4", - "8", - "10", - "11", - "12", - "13", - "14", - "15", - "16", - IsNull(), - ]), - }, + where: [ + { + profileId: profileId, + commandCode: In([ + "0", + "9", + "1", + "2", + "3", + "4", + "8", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + ]), + }, + { profileId: profileId, commandCode: IsNull() }, + ], // order: { order: "ASC" }, order: { commandDateAffect: "ASC" }, });