From 2917d8b593d3cae8855ae8047202bad54b82eaca Mon Sep 17 00:00:00 2001 From: Adisak Date: Thu, 18 Dec 2025 18:16:32 +0700 Subject: [PATCH] fix --- .../OrganizationDotnetController.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 00eb9b5a..dc8d0d6a 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -100,6 +100,27 @@ export class OrganizationDotnetController extends Controller { condition = "1=1"; break; } + } else if (body.role === "BROTHER") { + switch (body.node) { + case 0: + condition = "orgRoot.ancestorDNA = :nodeId"; + break; + case 1: + condition = "orgRoot.ancestorDNA = :nodeId"; + break; + case 2: + condition = "orgChild1.ancestorDNA = :nodeId"; + break; + case 3: + condition = "orgChild2.ancestorDNA = :nodeId"; + break; + case 4: + condition = "orgChild3.ancestorDNA = :nodeId"; + break; + default: + condition = "1=1"; + break; + } conditionParams = { nodeId: body.nodeId }; } else if (body.role === "ROOT") { condition = "orgRoot.ancestorDNA = :nodeId";