From 92f4ccb30a69d941e51195a4ffedfb467996351f Mon Sep 17 00:00:00 2001 From: Adisak Date: Wed, 12 Nov 2025 18:20:02 +0700 Subject: [PATCH] test --- src/controllers/CommandController.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 29b9533c..32a2c1c2 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -4266,21 +4266,21 @@ export class CommandController extends Controller { body.data.map(async (item) => { const profile: any = await this.profileRepository.findOne({ where: { id: item.profileId }, - relations: ["roleKeycloaks","current_holders"], + relations: ["roleKeycloaks"], }); if (!profile) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลทะเบียนประวัตินี้"); } - const orgRevision = await this.orgRevisionRepo.findOne({ - where: { - orgRevisionIsCurrent: true, - orgRevisionIsDraft: false, - }, - }); + // const orgRevision = await this.orgRevisionRepo.findOne({ + // where: { + // orgRevisionIsCurrent: true, + // orgRevisionIsDraft: false, + // }, + // }); - const orgRevisionRef = - profile?.current_holders?.find((x:any) => x.orgRevisionId == orgRevision?.id) ?? null; + // const orgRevisionRef = + // profile?.current_holders?.find((x:any) => x.orgRevisionId == orgRevision?.id) ?? null; //ลบตำแหน่งที่รักษาการแทน const code = _command?.commandType?.code; @@ -4310,9 +4310,9 @@ export class CommandController extends Controller { lastUpdatedAt: new Date(), }; if (item.isLeave != undefined && item.isLeave == true) { - if(orgRevisionRef){ - await CreatePosMasterHistoryOfficer(orgRevisionRef.id, req, "DELETE"); - } + // if(orgRevisionRef){ + // await CreatePosMasterHistoryOfficer(orgRevisionRef.id, req, "DELETE"); + // } await removeProfileInOrganize(profile.id, "OFFICER"); } const clearProfile = await checkCommandType(String(item.commandId));