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