This commit is contained in:
AdisakKanthawilang 2025-03-11 16:12:32 +07:00
parent 7d572b18d2
commit f31ecf1c2b
11 changed files with 349 additions and 19 deletions

View file

@ -3229,6 +3229,7 @@ export class OrganizationDotnetController extends Controller {
nodeId: string;
isAll: boolean;
isRetirement?: boolean;
revisionId?: string;
},
) {
let typeCondition: any = {};
@ -3314,11 +3315,17 @@ export class OrganizationDotnetController extends Controller {
],
});
}
const findRevision = await this.orgRevisionRepo.findOne({
let findRevision = await this.orgRevisionRepo.findOne({
where: { orgRevisionIsCurrent: true },
});
if(body.revisionId){
findRevision = await this.orgRevisionRepo.findOne({
where: { id: body.revisionId },
});
}
const profile_ = await Promise.all(
profile.map((item: Profile) => {
const shortName =
@ -3393,6 +3400,7 @@ export class OrganizationDotnetController extends Controller {
node: number;
nodeId: string;
isAll: boolean;
revisionId?: string;
},
) {
let typeCondition: any = {};
@ -3459,9 +3467,15 @@ export class OrganizationDotnetController extends Controller {
],
});
const findRevision = await this.orgRevisionRepo.findOne({
let findRevision = await this.orgRevisionRepo.findOne({
where: { orgRevisionIsCurrent: true },
});
if(body.revisionId){
findRevision = await this.orgRevisionRepo.findOne({
where: { id: body.revisionId },
});
}
const profile_ = await Promise.all(
profile.map((item: ProfileEmployee) => {