From 8273cfabc1e79c3e5d278ee4afd750bd65952f61 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Wed, 7 May 2025 23:59:26 +0700 Subject: [PATCH 1/5] =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=AD=E0=B8=87?= =?UTF-8?q?=E0=B8=84=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/OrganizationController.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index 9af0480c..11394ab5 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -5647,7 +5647,17 @@ export class OrganizationController extends Controller { } const data = await this.orgRootRepository.find({ - where: { orgRevisionId: orgRevisionActive.id }, + where: { + orgRevisionId: orgRevisionActive.id, + id: In([ + "4b574414-5faa-438c-829a-3c6444582cfd", + "d7e98989-b5ce-47d6-93c3-ab63ed486348", + "6f9b30e1-757a-40d5-b053-61eb1b91c0f0", + "eaf65f33-25e9-4956-9dba-5d909f5eb595", + "87c5bc89-300c-4b6a-99e4-26371436caa2", + "982d33af-4eb5-4cc8-9c9f-b3ccadbb66d7", + ]), + }, order: { orgRootOrder: "ASC", }, From 0ad11a37ee8598cfb76455195042754a43f379f9 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Thu, 8 May 2025 00:19:19 +0700 Subject: [PATCH 2/5] add org kk --- src/controllers/OrganizationController.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index 11394ab5..0b645fa3 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -5656,6 +5656,7 @@ export class OrganizationController extends Controller { "eaf65f33-25e9-4956-9dba-5d909f5eb595", "87c5bc89-300c-4b6a-99e4-26371436caa2", "982d33af-4eb5-4cc8-9c9f-b3ccadbb66d7", + "4b574414-5faa-438c-829a-3c6444582cfd", ]), }, order: { From 558412477285c1ab8b712978c3401d8a33e671e9 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Thu, 8 May 2025 00:35:08 +0700 Subject: [PATCH 3/5] add kk --- src/controllers/OrganizationController.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index 0b645fa3..8bd9905d 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -5650,13 +5650,12 @@ export class OrganizationController extends Controller { where: { orgRevisionId: orgRevisionActive.id, id: In([ - "4b574414-5faa-438c-829a-3c6444582cfd", "d7e98989-b5ce-47d6-93c3-ab63ed486348", "6f9b30e1-757a-40d5-b053-61eb1b91c0f0", "eaf65f33-25e9-4956-9dba-5d909f5eb595", "87c5bc89-300c-4b6a-99e4-26371436caa2", "982d33af-4eb5-4cc8-9c9f-b3ccadbb66d7", - "4b574414-5faa-438c-829a-3c6444582cfd", + "e0545eca-5d0a-4a1c-8bbd-e3e25c2521db", ]), }, order: { From 90f6b5061a5c5603c815e75d8031b6b42193b618 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Thu, 8 May 2025 12:29:06 +0700 Subject: [PATCH 4/5] =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=E0=B8=97=E0=B8=94?= =?UTF-8?q?=E0=B8=A5=E0=B8=AD=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 74 ++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index c5e4ae57..4717e959 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -4759,8 +4759,8 @@ export class CommandController extends Controller { mouthSalaryAmount?: Double | null; commandNo: string | null; commandYear: number | null; - posNo: string | null; - posNoAbb: string | null; + // posNo: string | null; + // posNoAbb: string | null; commandDateAffect?: Date | null; commandDateSign?: Date | null; positionName: string | null; @@ -5458,17 +5458,49 @@ export class CommandController extends Controller { profile.lastUpdatedAt = new Date(); //เพิ่มใหม่จากรับโอน - profile.prefix = item.bodyProfile.prefix && item.bodyProfile.prefix != "" ? item.bodyProfile.prefix : profile.prefix; - profile.firstName = item.bodyProfile.firstName && item.bodyProfile.firstName != "" ? item.bodyProfile.firstName : profile.firstName; - profile.lastName = item.bodyProfile.lastName && item.bodyProfile.lastName != "" ? item.bodyProfile.lastName : profile.lastName; - profile.birthDate = item.bodyProfile.birthDate ? item.bodyProfile.birthDate : profile.birthDate; - profile.gender = item.bodyProfile.gender && item.bodyProfile.gender != "" ? item.bodyProfile.gender : profile.gender; - profile.relationship = item.bodyProfile.relationship && item.bodyProfile.relationship != "" ? item.bodyProfile.relationship : profile.relationship; - profile.religion = item.bodyProfile.religion && item.bodyProfile.religion != "" ? item.bodyProfile.religion : profile.religion; - profile.ethnicity = item.bodyProfile.ethnicity && item.bodyProfile.ethnicity != "" ? item.bodyProfile.ethnicity : profile.ethnicity; - profile.nationality = item.bodyProfile.nationality && item.bodyProfile.nationality != "" ? item.bodyProfile.nationality : profile.nationality; - profile.bloodGroup = item.bodyProfile.bloodGroup && item.bodyProfile.bloodGroup != "" ? item.bodyProfile.bloodGroup : profile.bloodGroup; - profile.phone = item.bodyProfile.phone && item.bodyProfile.phone != "" ? item.bodyProfile.phone : profile.phone; + profile.prefix = + item.bodyProfile.prefix && item.bodyProfile.prefix != "" + ? item.bodyProfile.prefix + : profile.prefix; + profile.firstName = + item.bodyProfile.firstName && item.bodyProfile.firstName != "" + ? item.bodyProfile.firstName + : profile.firstName; + profile.lastName = + item.bodyProfile.lastName && item.bodyProfile.lastName != "" + ? item.bodyProfile.lastName + : profile.lastName; + profile.birthDate = item.bodyProfile.birthDate + ? item.bodyProfile.birthDate + : profile.birthDate; + profile.gender = + item.bodyProfile.gender && item.bodyProfile.gender != "" + ? item.bodyProfile.gender + : profile.gender; + profile.relationship = + item.bodyProfile.relationship && item.bodyProfile.relationship != "" + ? item.bodyProfile.relationship + : profile.relationship; + profile.religion = + item.bodyProfile.religion && item.bodyProfile.religion != "" + ? item.bodyProfile.religion + : profile.religion; + profile.ethnicity = + item.bodyProfile.ethnicity && item.bodyProfile.ethnicity != "" + ? item.bodyProfile.ethnicity + : profile.ethnicity; + profile.nationality = + item.bodyProfile.nationality && item.bodyProfile.nationality != "" + ? item.bodyProfile.nationality + : profile.nationality; + profile.bloodGroup = + item.bodyProfile.bloodGroup && item.bodyProfile.bloodGroup != "" + ? item.bodyProfile.bloodGroup + : profile.bloodGroup; + profile.phone = + item.bodyProfile.phone && item.bodyProfile.phone != "" + ? item.bodyProfile.phone + : profile.phone; await this.profileRepository.save(profile); setLogDataDiff(req, { before, after: profile }); } @@ -5868,11 +5900,11 @@ export class CommandController extends Controller { positionType: profile.posTypeNameTemp, positionLevel: profile.posLevelNameTemp, order: dest_item == null ? 1 : dest_item.order + 1, - orgRoot: orgRootRef?.orgRootName??null, - orgChild1: orgChild1Ref?.orgChild1Name??null, - orgChild2: orgChild2Ref?.orgChild2Name??null, - orgChild3: orgChild3Ref?.orgChild3Name??null, - orgChild4: orgChild4Ref?.orgChild4Name??null, + orgRoot: orgRootRef?.orgRootName ?? null, + orgChild1: orgChild1Ref?.orgChild1Name ?? null, + orgChild2: orgChild2Ref?.orgChild2Name ?? null, + orgChild3: orgChild3Ref?.orgChild3Name ?? null, + orgChild4: orgChild4Ref?.orgChild4Name ?? null, createdUserId: req.user.sub, createdFullName: req.user.name, lastUpdateUserId: req.user.sub, @@ -6070,8 +6102,10 @@ export class CommandController extends Controller { current_holderId: profile.id, }, }); - if(posMasterTemp){ - await this.employeeTempPosMasterRepository.update(posMasterTemp.id,{current_holderId: _null}); + if (posMasterTemp) { + await this.employeeTempPosMasterRepository.update(posMasterTemp.id, { + current_holderId: _null, + }); } } }), From b312e7d8f67d1e2ff812f205a3cec518dc8213db Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Thu, 8 May 2025 14:47:54 +0700 Subject: [PATCH 5/5] edit probation --- src/controllers/CommandController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 4717e959..6bb55426 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -4763,7 +4763,7 @@ export class CommandController extends Controller { // posNoAbb: string | null; commandDateAffect?: Date | null; commandDateSign?: Date | null; - positionName: string | null; + positionName?: string | null; commandCode?: string | null; commandName?: string | null; remark: string | null;