From b5823fdf2831d55be8a4ae564502012ce8f9f712 Mon Sep 17 00:00:00 2001 From: harid Date: Thu, 2 Oct 2025 18:17:19 +0700 Subject: [PATCH] emp --- .../OrganizationDotnetController.ts | 56 +++++++++++++++---- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index b3cc030f..a5e04d3d 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -5101,12 +5101,13 @@ export class OrganizationDotnetController extends Controller { role: string; isRetirement?: boolean; revisionId?: string; + reqNode?: number; + reqNodeId?: string; }, ) { let typeCondition: any = {}; - const node = body.role === "OWNER" ? null : body.node; - if (body.role === "OWNER" || body.role === "CHILD") { - switch (node) { + if (body.role === "CHILD") { + switch (body.node) { case 0: typeCondition = { orgRoot: { @@ -5149,14 +5150,49 @@ export class OrganizationDotnetController extends Controller { typeCondition = {}; break; } - } else if (body.role === "ROOT") { - typeCondition = { - orgRoot: { - ancestorDNA: body.nodeId - }, - }; + } else if (body.role === "ROOT" || body.role === "OWNER") { + switch (body.reqNode) { + case 0: + typeCondition = { + orgRoot: { + id: body.reqNodeId + } + }; + break; + case 1: + typeCondition = { + orgChild1: { + id: body.reqNodeId + } + }; + break; + case 2: + typeCondition = { + orgChild2: { + id: body.reqNodeId + } + }; + break; + case 3: + typeCondition = { + orgChild3: { + id: body.reqNodeId + } + }; + break; + case 4: + typeCondition = { + orgChild4: { + id: body.reqNodeId + } + }; + break; + default: + typeCondition = {}; + break; + } } else if (body.role === "NORMAL") { - switch (node) { + switch (body.node) { case 0: typeCondition = { orgRoot: {