diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index ddac1c70..89fec9d1 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -117,6 +117,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";