add isRetirement? (keycloak-all-officer)
This commit is contained in:
parent
f4e8ec277e
commit
482421cea6
1 changed files with 18 additions and 2 deletions
|
|
@ -3012,6 +3012,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
node: number;
|
node: number;
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
isAll: boolean;
|
isAll: boolean;
|
||||||
|
isRetirement?: boolean;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
let typeCondition: any = {};
|
let typeCondition: any = {};
|
||||||
|
|
@ -3064,7 +3065,7 @@ export class OrganizationDotnetController extends Controller {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const 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: [
|
||||||
"posType",
|
"posType",
|
||||||
|
|
@ -3077,7 +3078,22 @@ export class OrganizationDotnetController extends Controller {
|
||||||
"current_holders.orgChild4",
|
"current_holders.orgChild4",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
if(body.isRetirement){
|
||||||
|
profile = await this.profileRepo.find({
|
||||||
|
where: { keycloak: Not(IsNull()) || Not(""), isLeave: false, current_holders: typeCondition, isRetirement: true },
|
||||||
|
relations: [
|
||||||
|
"posType",
|
||||||
|
"posLevel",
|
||||||
|
"current_holders",
|
||||||
|
"current_holders.orgRoot",
|
||||||
|
"current_holders.orgChild1",
|
||||||
|
"current_holders.orgChild2",
|
||||||
|
"current_holders.orgChild3",
|
||||||
|
"current_holders.orgChild4",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const findRevision = await this.orgRevisionRepo.findOne({
|
const findRevision = await this.orgRevisionRepo.findOne({
|
||||||
where: { orgRevisionIsCurrent: true },
|
where: { orgRevisionIsCurrent: true },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue