From b48bec206f958c817730b45244d2ba3e85bd2da8 Mon Sep 17 00:00:00 2001 From: kittapath Date: Thu, 30 Jan 2025 08:52:47 +0700 Subject: [PATCH] edit ancestorDNA --- src/controllers/OrganizationController.ts | 15 ++++++++++++ src/controllers/ProfileController.ts | 30 +++++++++++++++-------- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index 0cee1ae4..7c6546c3 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -5625,6 +5625,7 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.id, + rootDnaId: data.ancestorDNA, root: data.orgRootName, rootShortName: data.orgRootShortName, }); @@ -5641,9 +5642,11 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, + rootDnaId: data.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.id, + child1DnaId: data.ancestorDNA, child1: data.orgChild1Name, child1ShortName: data.orgChild1ShortName, }); @@ -5661,12 +5664,15 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, + rootDnaId: data.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.orgChild1Id, + child1DnaId: data.ancestorDNA, child1: data.orgChild1 == null ? null : data.orgChild1.orgChild1Name, child1ShortName: data.orgChild1 == null ? null : data.orgChild1.orgChild1ShortName, child2Id: data.id, + child2DnaId: data.ancestorDNA, child2: data.orgChild2Name, child2ShortName: data.orgChild2ShortName, }); @@ -5685,15 +5691,19 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, + rootDnaId: data.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.orgChild1Id, + child1DnaId: data.ancestorDNA, child1: data.orgChild1 == null ? null : data.orgChild1.orgChild1Name, child1ShortName: data.orgChild1 == null ? null : data.orgChild1.orgChild1ShortName, child2Id: data.orgChild2Id, + child2DnaId: data.ancestorDNA, child2: data.orgChild2 == null ? null : data.orgChild2.orgChild2Name, child2ShortName: data.orgChild2 == null ? null : data.orgChild2.orgChild2ShortName, child3Id: data.id, + child3DnaId: data.ancestorDNA, child3: data.orgChild3Name, child3ShortName: data.orgChild3ShortName, }); @@ -5713,18 +5723,23 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, + rootDnaId: data.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.orgChild1Id, + child1DnaId: data.ancestorDNA, child1: data.orgChild1 == null ? null : data.orgChild1.orgChild1Name, child1ShortName: data.orgChild1 == null ? null : data.orgChild1.orgChild1ShortName, child2Id: data.orgChild2Id, + child2DnaId: data.ancestorDNA, child2: data.orgChild2 == null ? null : data.orgChild2.orgChild2Name, child2ShortName: data.orgChild2 == null ? null : data.orgChild2.orgChild2ShortName, child3Id: data.orgChild3Id, + child3DnaId: data.ancestorDNA, child3: data.orgChild3 == null ? null : data.orgChild3.orgChild3Name, child3ShortName: data.orgChild3 == null ? null : data.orgChild3.orgChild3ShortName, child4Id: data.id, + child4DnaId: data.ancestorDNA, child4: data.orgChild4Name, child4ShortName: data.orgChild4ShortName, }); diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 49729408..51d1412a 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -5321,19 +5321,24 @@ export class ProfileController extends Controller { : position.posExecutive.posExecutivePriority, posExecutiveId: position == null || position.posExecutive == null ? null : position.posExecutive.id, - rootId: root == null ? null : root.id, + rootId: root == null ? null : root.ancestorDNA, + rootDnaId: root == null ? null : root.ancestorDNA, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName, - child1Id: child1 == null ? null : child1.id, + child1Id: child1 == null ? null : child1.ancestorDNA, + child1DnaId: child1 == null ? null : child1.ancestorDNA, child1: child1 == null ? null : child1.orgChild1Name, child1ShortName: child1 == null ? null : child1.orgChild1ShortName, - child2Id: child2 == null ? null : child2.id, + child2Id: child2 == null ? null : child2.ancestorDNA, + child2DnaId: child2 == null ? null : child2.ancestorDNA, child2: child2 == null ? null : child2.orgChild2Name, child2ShortName: child2 == null ? null : child2.orgChild2ShortName, - child3Id: child3 == null ? null : child3.id, + child3Id: child3 == null ? null : child3.ancestorDNA, + child3DnaId: child3 == null ? null : child3.ancestorDNA, child3: child3 == null ? null : child3.orgChild3Name, child3ShortName: child3 == null ? null : child3.orgChild3ShortName, - child4Id: child4 == null ? null : child4.id, + child4Id: child4 == null ? null : child4.ancestorDNA, + child4DnaId: child4 == null ? null : child4.ancestorDNA, child4: child4 == null ? null : child4.orgChild4Name, child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null, @@ -5467,19 +5472,24 @@ export class ProfileController extends Controller { : position.posExecutive.posExecutivePriority, posExecutiveId: position == null || position.posExecutive == null ? null : position.posExecutive.id, - rootId: root == null ? null : root.id, + rootId: root == null ? null : root.ancestorDNA, + rootDnaId: root == null ? null : root.ancestorDNA, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName, - child1Id: child1 == null ? null : child1.id, + child1Id: child1 == null ? null : child1.ancestorDNA, + child1DnaId: child1 == null ? null : child1.ancestorDNA, child1: child1 == null ? null : child1.orgChild1Name, child1ShortName: child1 == null ? null : child1.orgChild1ShortName, - child2Id: child2 == null ? null : child2.id, + child2Id: child2 == null ? null : child2.ancestorDNA, + child2DnaId: child2 == null ? null : child2.ancestorDNA, child2: child2 == null ? null : child2.orgChild2Name, child2ShortName: child2 == null ? null : child2.orgChild2ShortName, - child3Id: child3 == null ? null : child3.id, + child3Id: child3 == null ? null : child3.ancestorDNA, + child3DnaId: child3 == null ? null : child3.ancestorDNA, child3: child3 == null ? null : child3.orgChild3Name, child3ShortName: child3 == null ? null : child3.orgChild3ShortName, - child4Id: child4 == null ? null : child4.id, + child4Id: child4 == null ? null : child4.ancestorDNA, + child4DnaId: child4 == null ? null : child4.ancestorDNA, child4: child4 == null ? null : child4.orgChild4Name, child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null,