This commit is contained in:
Adisak 2025-12-18 18:16:32 +07:00
parent a813d31df9
commit 2917d8b593

View file

@ -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";