From b0b1e06a782b1c5ae6d847bd835845fa7f64126d Mon Sep 17 00:00:00 2001 From: kittapath Date: Wed, 5 Feb 2025 15:38:21 +0700 Subject: [PATCH] add dna --- src/controllers/CommandController.ts | 12 +- src/controllers/OrganizationController.ts | 296 ++++++++++++++++-- src/controllers/ProfileController.ts | 35 +++ src/controllers/ProfileEmployeeController.ts | 40 +++ .../ProfileEmployeeTempController.ts | 5 + 5 files changed, 350 insertions(+), 38 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 4f765f16..e8bf6f17 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -4749,7 +4749,7 @@ export class CommandController extends Controller { const posMaster = await this.employeePosMasterRepository.findOne({ where: { id: profile.posmasterIdTemp }, - relations: ["orgRoot"], + relations: ["orgRoot", "orgChild1", "orgChild2", "orgChild3", "orgChild4"], }); if (posMaster == null) throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้"); @@ -4865,6 +4865,10 @@ export class CommandController extends Controller { rootId: posMaster.orgRootId, rootShortName: posMaster.orgRoot.orgRootShortName, rootDnaId: posMaster.orgRoot.ancestorDNA, + child1DnaId: posMaster.orgChild1.ancestorDNA, + child2DnaId: posMaster.orgChild2.ancestorDNA, + child3DnaId: posMaster.orgChild3.ancestorDNA, + child4DnaId: posMaster.orgChild4.ancestorDNA, }); await this.profileEmployeeRepository.save(profile); await this.employeePositionRepository.save(positionNew); @@ -4872,9 +4876,9 @@ export class CommandController extends Controller { }), ); await new CallAPI() - .PostData(req, - "/placement/appointment/employee-appoint-21/report/excecute", { profileEmps: _reqBody } - ) + .PostData(req, "/placement/appointment/employee-appoint-21/report/excecute", { + profileEmps: _reqBody, + }) .catch((error) => { throw new Error("Failed. Cannot update status. ", error); }); diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index dd212d5f..57e96829 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -5522,45 +5522,273 @@ export class OrganizationController extends Controller { rootId: y.id, rootDnaId: y.ancestorDNA, child1Id: null, + child1DnaId: null, child2Id: null, + child2DnaId: null, child3Id: null, + child3DnaId: null, child4Id: null, + child4DnaId: null, })); data2 = _data2.map((y) => ({ name: y.orgRootName, rootId: y.id, rootDnaId: y.ancestorDNA, child1Id: null, + child1DnaId: null, child2Id: null, + child2DnaId: null, child3Id: null, + child3DnaId: null, child4Id: null, + child4DnaId: null, + })); + break; + } + case 1: { + const _data1 = await this.child1Repository.find({ + where: { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub1), + }, + }, + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot"], + }); + const _data2 = await this.child1Repository.find({ + where: [ + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub2), + }, + }, + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: IsNull(), + }, + }, + ], + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot"], + }); + data1 = _data1.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.id, + child1DnaId: y.ancestorDNA, + child2Id: null, + child2DnaId: null, + child3Id: null, + child3DnaId: null, + child4Id: null, + child4DnaId: null, + })); + data2 = _data2.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.id, + child1DnaId: y.ancestorDNA, + child2Id: null, + child2DnaId: null, + child3Id: null, + child3DnaId: null, + child4Id: null, + child4DnaId: null, + })); + break; + } + case 2: { + const _data1 = await this.child2Repository.find({ + where: { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub1), + }, + }, + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot", "orgChild1"], + }); + const _data2 = await this.child2Repository.find({ + where: [ + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub2), + }, + }, + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: IsNull(), + }, + }, + ], + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot", "orgChild1"], + }); + data1 = _data1.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.orgChild1.id, + child1DnaId: y.orgChild1.ancestorDNA, + child2Id: y.id, + child2DnaId: y.ancestorDNA, + child3Id: null, + child3DnaId: null, + child4Id: null, + child4DnaId: null, + })); + data2 = _data2.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.orgChild1.id, + child1DnaId: y.orgChild1.ancestorDNA, + child2Id: y.id, + child2DnaId: y.ancestorDNA, + child3Id: null, + child3DnaId: null, + child4Id: null, + child4DnaId: null, + })); + break; + } + case 3: { + const _data1 = await this.child3Repository.find({ + where: { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub1), + }, + }, + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot", "orgChild1", "orgChild2"], + }); + const _data2 = await this.child3Repository.find({ + where: [ + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub2), + }, + }, + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: IsNull(), + }, + }, + ], + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot", "orgChild1", "orgChild2"], + }); + data1 = _data1.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.orgChild1.id, + child1DnaId: y.orgChild1.ancestorDNA, + child2Id: y.orgChild2.id, + child2DnaId: y.orgChild2.ancestorDNA, + child3Id: y.id, + child3DnaId: y.ancestorDNA, + child4Id: null, + child4DnaId: null, + })); + data2 = _data2.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.orgChild1.id, + child1DnaId: y.orgChild1.ancestorDNA, + child2Id: y.orgChild2.id, + child2DnaId: y.orgChild2.ancestorDNA, + child3Id: y.id, + child3DnaId: y.ancestorDNA, + child4Id: null, + child4DnaId: null, + })); + break; + } + case 4: { + const _data1 = await this.child4Repository.find({ + where: { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub1), + }, + }, + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot", "orgChild1", "orgChild2", "orgChild3"], + }); + const _data2 = await this.child4Repository.find({ + where: [ + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: In(orgRootRankSub2), + }, + }, + { + id: requestBody.nodeId ?? "", + orgRoot: { + orgRootRankSub: IsNull(), + }, + }, + ], + order: { + orgRoot: { orgRootOrder: "ASC" }, + }, + relations: ["orgRoot", "orgChild1", "orgChild2", "orgChild3"], + }); + data1 = _data1.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.orgChild1.id, + child1DnaId: y.orgChild1.ancestorDNA, + child2Id: y.orgChild2.id, + child2DnaId: y.orgChild2.ancestorDNA, + child3Id: y.orgChild3.id, + child3DnaId: y.orgChild3.ancestorDNA, + child4Id: y.id, + child4DnaId: y.ancestorDNA, + })); + data2 = _data2.map((y) => ({ + name: y.orgRoot.orgRootName, + rootId: y.orgRoot.id, + rootDnaId: y.orgRoot.ancestorDNA, + child1Id: y.orgChild1.id, + child1DnaId: y.orgChild1.ancestorDNA, + child2Id: y.orgChild2.id, + child2DnaId: y.orgChild2.ancestorDNA, + child3Id: y.orgChild3.id, + child3DnaId: y.orgChild3.ancestorDNA, + child4Id: y.id, + child4DnaId: y.ancestorDNA, })); break; } - // case 1: { - // const data = await this.child1Repository.find({ - // where: { id: requestBody.nodeId }, - // }); - // return new HttpSuccess(data); - // } - // case 2: { - // const data = await this.child2Repository.find({ - // where: { id: requestBody.nodeId }, - // }); - // return new HttpSuccess(data); - // } - // case 3: { - // const data = await this.child3Repository.find({ - // where: { id: requestBody.nodeId }, - // }); - // return new HttpSuccess(data); - // } - // case 4: { - // const data = await this.child4Repository.find({ - // where: { id: requestBody.nodeId }, - // }); - // return new HttpSuccess(data); - // } default: { const orgRevision = await this.orgRevisionRepository.findOne({ where: { @@ -5646,7 +5874,7 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, - rootDnaId: data.ancestorDNA, + rootDnaId: data.orgRoot == null ? null : data.orgRoot.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.id, @@ -5668,11 +5896,11 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, - rootDnaId: data.ancestorDNA, + rootDnaId: data.orgRoot == null ? null : data.orgRoot.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.orgChild1Id, - child1DnaId: data.ancestorDNA, + child1DnaId: data.orgChild1 == null ? null : data.orgChild1.ancestorDNA, child1: data.orgChild1 == null ? null : data.orgChild1.orgChild1Name, child1ShortName: data.orgChild1 == null ? null : data.orgChild1.orgChild1ShortName, child2Id: data.id, @@ -5695,15 +5923,15 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, - rootDnaId: data.ancestorDNA, + rootDnaId: data.orgRoot == null ? null : data.orgRoot.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.orgChild1Id, - child1DnaId: data.ancestorDNA, + child1DnaId: data.orgChild1 == null ? null : data.orgChild1.ancestorDNA, child1: data.orgChild1 == null ? null : data.orgChild1.orgChild1Name, child1ShortName: data.orgChild1 == null ? null : data.orgChild1.orgChild1ShortName, child2Id: data.orgChild2Id, - child2DnaId: data.ancestorDNA, + child2DnaId: data.orgChild2 == null ? null : data.orgChild2.ancestorDNA, child2: data.orgChild2 == null ? null : data.orgChild2.orgChild2Name, child2ShortName: data.orgChild2 == null ? null : data.orgChild2.orgChild2ShortName, child3Id: data.id, @@ -5727,19 +5955,19 @@ export class OrganizationController extends Controller { } return new HttpSuccess({ rootId: data.orgRootId, - rootDnaId: data.ancestorDNA, + rootDnaId: data.orgRoot == null ? null : data.orgRoot.ancestorDNA, root: data.orgRoot == null ? null : data.orgRoot.orgRootName, rootShortName: data.orgRoot == null ? null : data.orgRoot.orgRootShortName, child1Id: data.orgChild1Id, - child1DnaId: data.ancestorDNA, + child1DnaId: data.orgChild1 == null ? null : data.orgChild1.ancestorDNA, child1: data.orgChild1 == null ? null : data.orgChild1.orgChild1Name, child1ShortName: data.orgChild1 == null ? null : data.orgChild1.orgChild1ShortName, child2Id: data.orgChild2Id, - child2DnaId: data.ancestorDNA, + child2DnaId: data.orgChild2 == null ? null : data.orgChild2.ancestorDNA, child2: data.orgChild2 == null ? null : data.orgChild2.orgChild2Name, child2ShortName: data.orgChild2 == null ? null : data.orgChild2.orgChild2ShortName, child3Id: data.orgChild3Id, - child3DnaId: data.ancestorDNA, + child3DnaId: data.orgChild3 == null ? null : data.orgChild3.ancestorDNA, child3: data.orgChild3 == null ? null : data.orgChild3.orgChild3Name, child3ShortName: data.orgChild3 == null ? null : data.orgChild3.orgChild3ShortName, child4Id: data.id, diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 7418a49e..10d7c041 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -6452,18 +6452,23 @@ export class ProfileController extends Controller { posTypeId: profile.posType == null ? null : profile.posType.id, orgRevisionId: root == null ? null : root.orgRevisionId, rootId: root == null ? null : root.id, + rootDnaId: root == null ? null : root.ancestorDNA, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName, child1Id: child1 == null ? null : child1.id, + child1DnaId: child1 == null ? null : child1.ancestorDNA, child1: child1 == null ? null : child1.orgChild1Name, child1ShortName: child1 == null ? null : child1.orgChild1ShortName, child2Id: child2 == null ? null : child2.id, + child2DnaId: child2 == null ? null : child2.ancestorDNA, child2: child2 == null ? null : child2.orgChild2Name, child2ShortName: child2 == null ? null : child2.orgChild2ShortName, child3Id: child3 == null ? null : child3.id, + child3DnaId: child3 == null ? null : child3.ancestorDNA, child3: child3 == null ? null : child3.orgChild3Name, child3ShortName: child3 == null ? null : child3.orgChild3ShortName, child4Id: child4 == null ? null : child4.id, + child4DnaId: child4 == null ? null : child4.ancestorDNA, child4: child4 == null ? null : child4.orgChild4Name, child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null, @@ -8038,6 +8043,12 @@ export class ProfileController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgRoot == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgRootId, + rootDnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgRoot == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, root: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -8050,6 +8061,12 @@ export class ProfileController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild1 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild1Id, + child1DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild1 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child1: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -8063,6 +8080,12 @@ export class ProfileController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild2 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild2Id, + child2DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild2 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child2: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -8076,6 +8099,12 @@ export class ProfileController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild3 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild3Id, + child3DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild3 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child3: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -8089,6 +8118,12 @@ export class ProfileController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4Id, + child4DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child4: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 7631dd4e..f48019b3 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2242,18 +2242,23 @@ export class ProfileEmployeeController extends Controller { posExecutiveId: position == null || position.posExecutive == null ? null : position.posExecutive.id, rootId: root == null ? null : root.id, + rootDnaId: root == null ? null : root.ancestorDNA, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName, child1Id: child1 == null ? null : child1.id, + child1DnaId: child1 == null ? null : child1.ancestorDNA, child1: child1 == null ? null : child1.orgChild1Name, child1ShortName: child1 == null ? null : child1.orgChild1ShortName, child2Id: child2 == null ? null : child2.id, + child2DnaId: child2 == null ? null : child2.ancestorDNA, child2: child2 == null ? null : child2.orgChild2Name, child2ShortName: child2 == null ? null : child2.orgChild2ShortName, child3Id: child3 == null ? null : child3.id, + child3DnaId: child3 == null ? null : child3.ancestorDNA, child3: child3 == null ? null : child3.orgChild3Name, child3ShortName: child3 == null ? null : child3.orgChild3ShortName, child4Id: child4 == null ? null : child4.id, + child4DnaId: child4 == null ? null : child4.ancestorDNA, child4: child4 == null ? null : child4.orgChild4Name, child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null, @@ -3607,6 +3612,12 @@ export class ProfileEmployeeController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgRoot == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgRootId, + rootDnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgRoot == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, root: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -3619,6 +3630,12 @@ export class ProfileEmployeeController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild1 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild1Id, + child1DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild1 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child1: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -3632,6 +3649,12 @@ export class ProfileEmployeeController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild2 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild2Id, + child2DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild2 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child2: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -3645,6 +3668,12 @@ export class ProfileEmployeeController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild3 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild3Id, + child3DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild3 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child3: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -3658,6 +3687,12 @@ export class ProfileEmployeeController extends Controller { profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4 == null ? null : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4Id, + child4DnaId: + profile.current_holders == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || + profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4 == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == revisionId)?.ancestorDNA, child4: profile.current_holders == null || profile.current_holders.find((x) => x.orgRevisionId == revisionId) == null || @@ -4550,18 +4585,23 @@ export class ProfileEmployeeController extends Controller { posTypeId: profile.posType == null ? null : profile.posType.id, // posExecutiveName: "", rootId: root == null ? null : root.id, + rootDnaId: root == null ? null : root.ancestorDNA, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName, child1Id: child1 == null ? null : child1.id, + child1DnaId: child1 == null ? null : child1.ancestorDNA, child1: child1 == null ? null : child1.orgChild1Name, child1ShortName: child1 == null ? null : child1.orgChild1ShortName, child2Id: child2 == null ? null : child2.id, + child2DnaId: child2 == null ? null : child2.ancestorDNA, child2: child2 == null ? null : child2.orgChild2Name, child2ShortName: child2 == null ? null : child2.orgChild2ShortName, child3Id: child3 == null ? null : child3.id, + child3DnaId: child3 == null ? null : child3.ancestorDNA, child3: child3 == null ? null : child3.orgChild3Name, child3ShortName: child3 == null ? null : child3.orgChild3ShortName, child4Id: child4 == null ? null : child4.id, + child4DnaId: child4 == null ? null : child4.ancestorDNA, child4: child4 == null ? null : child4.orgChild4Name, child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null, diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index f4bc3cba..47c47902 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -3814,18 +3814,23 @@ export class ProfileEmployeeTempController extends Controller { posTypeId: profile.posType == null ? null : profile.posType.id, // posExecutiveName: "", rootId: root == null ? null : root.id, + rootDnaId: root == null ? null : root.ancestorDNA, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName, child1Id: child1 == null ? null : child1.id, + child1DnaId: child1 == null ? null : child1.ancestorDNA, child1: child1 == null ? null : child1.orgChild1Name, child1ShortName: child1 == null ? null : child1.orgChild1ShortName, child2Id: child2 == null ? null : child2.id, + child2DnaId: child2 == null ? null : child2.ancestorDNA, child2: child2 == null ? null : child2.orgChild2Name, child2ShortName: child2 == null ? null : child2.orgChild2ShortName, child3Id: child3 == null ? null : child3.id, + child3DnaId: child3 == null ? null : child3.ancestorDNA, child3: child3 == null ? null : child3.orgChild3Name, child3ShortName: child3 == null ? null : child3.orgChild3ShortName, child4Id: child4 == null ? null : child4.id, + child4DnaId: child4 == null ? null : child4.ancestorDNA, child4: child4 == null ? null : child4.orgChild4Name, child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null,