This commit is contained in:
AdisakKanthawilang 2025-08-27 14:53:16 +07:00
parent f66e721fa4
commit 6cd39da15f

View file

@ -4050,33 +4050,33 @@ export class OrganizationDotnetController extends Controller {
},
) {
let typeCondition: any = {};
if (body.isAll == false) {
if (body.node === 0) {
typeCondition = {
orgRootId: body.nodeId,
// orgChild1Id: IsNull(),
};
} else if (body.node === 1) {
typeCondition = {
orgChild1Id: body.nodeId,
orgChild2Id: IsNull(),
};
} else if (body.node === 2) {
typeCondition = {
orgChild2Id: body.nodeId,
orgChild3Id: IsNull(),
};
} else if (body.node === 3) {
typeCondition = {
orgChild3Id: body.nodeId,
orgChild4Id: IsNull(),
};
} else if (body.node === 4) {
typeCondition = {
orgChild4Id: body.nodeId,
};
}
} else {
// if (body.isAll == false) {
// if (body.node === 0) {
// typeCondition = {
// orgRootId: body.nodeId,
// orgChild1Id: IsNull(),
// };
// } else if (body.node === 1) {
// typeCondition = {
// orgChild1Id: body.nodeId,
// orgChild2Id: IsNull(),
// };
// } else if (body.node === 2) {
// typeCondition = {
// orgChild2Id: body.nodeId,
// orgChild3Id: IsNull(),
// };
// } else if (body.node === 3) {
// typeCondition = {
// orgChild3Id: body.nodeId,
// orgChild4Id: IsNull(),
// };
// } else if (body.node === 4) {
// typeCondition = {
// orgChild4Id: body.nodeId,
// };
// }
// } else {
if (body.node === 0) {
typeCondition = {
orgRootId: body.nodeId,
@ -4098,7 +4098,7 @@ export class OrganizationDotnetController extends Controller {
orgChild4Id: body.nodeId,
};
}
}
// }
let profile = await this.profileRepo.find({
where: { keycloak: Not(IsNull()) || Not(""), isLeave: false, current_holders: typeCondition },
relations: [