Merge branch 'develop' into adiDev
This commit is contained in:
commit
b954ae9716
2 changed files with 18 additions and 22 deletions
|
|
@ -7161,6 +7161,7 @@ export class OrganizationController extends Controller {
|
|||
"orgRoot.orgRootRank",
|
||||
"orgRoot.orgRootRankSub",
|
||||
"orgRoot.responsibility",
|
||||
"orgRoot.isDeputy",
|
||||
])
|
||||
.orderBy("orgRoot.orgRootOrder", "ASC")
|
||||
.getMany();
|
||||
|
|
@ -7170,6 +7171,7 @@ export class OrganizationController extends Controller {
|
|||
return {
|
||||
orgTreeId: orgRoot.id,
|
||||
orgLevel: 0,
|
||||
isDeputy: orgRoot.isDeputy,
|
||||
orgName: orgRoot.orgRootName,
|
||||
orgTreeName: orgRoot.orgRootName,
|
||||
orgTreeShortName: orgRoot.orgRootShortName,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export class WorkflowController extends Controller {
|
|||
sysName: string;
|
||||
posLevelName: string;
|
||||
posTypeName: string;
|
||||
fullName?: string|null
|
||||
fullName?: string | null;
|
||||
},
|
||||
) {
|
||||
let profileType = "OFFICER";
|
||||
|
|
@ -1103,7 +1103,7 @@ export class WorkflowController extends Controller {
|
|||
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
||||
current_holderId: profile.id,
|
||||
},
|
||||
relations: ["orgChild1"],
|
||||
relations: ["orgChild1", "orgRoot"],
|
||||
});
|
||||
const profileDirector = await this.posMasterRepo.findOne({
|
||||
where: {
|
||||
|
|
@ -1116,12 +1116,14 @@ export class WorkflowController extends Controller {
|
|||
isOfficer: false,
|
||||
isStaff: false,
|
||||
isDirector: profileDirector?.isDirector ?? false,
|
||||
isDeputy: false,
|
||||
});
|
||||
let isOfficer = profileOfficer.orgChild1 == null ? false : profileOfficer.orgChild1.isOfficer;
|
||||
return new HttpSuccess({
|
||||
isOfficer: isOfficer,
|
||||
isStaff: !isOfficer,
|
||||
isDirector: profileDirector?.isDirector ?? false,
|
||||
isDeputy: profileOfficer?.orgRoot?.isDeputy ?? false,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1265,7 +1267,6 @@ export class WorkflowController extends Controller {
|
|||
refId: string[];
|
||||
},
|
||||
) {
|
||||
|
||||
const _posMaster = await this.posMasterRepo.find({
|
||||
where: {
|
||||
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
||||
|
|
@ -1284,12 +1285,12 @@ export class WorkflowController extends Controller {
|
|||
current_holder: Not(IsNull()),
|
||||
posMasterAssigns: { assignId: system.trim().toUpperCase() },
|
||||
}));
|
||||
|
||||
|
||||
const posMaster = await this.posMasterRepo.find({
|
||||
where: _data,
|
||||
relations: ["current_holder"],
|
||||
});
|
||||
|
||||
|
||||
const data = posMaster.map((x) => ({
|
||||
id: x.current_holder.id,
|
||||
citizenId: x.current_holder.citizenId,
|
||||
|
|
@ -1297,7 +1298,7 @@ export class WorkflowController extends Controller {
|
|||
firstName: x.current_holder.firstName,
|
||||
lastName: x.current_holder.lastName,
|
||||
}));
|
||||
|
||||
|
||||
return new HttpSuccess(data);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1315,12 +1316,11 @@ export class WorkflowController extends Controller {
|
|||
refId: string[];
|
||||
},
|
||||
) {
|
||||
|
||||
const profileWithKc = await this.profileRepo.find({
|
||||
where:{
|
||||
keycloak: In(body.refId)
|
||||
}
|
||||
})
|
||||
where: {
|
||||
keycloak: In(body.refId),
|
||||
},
|
||||
});
|
||||
|
||||
const profileIds = profileWithKc.map((p) => p.id);
|
||||
|
||||
|
|
@ -1332,14 +1332,8 @@ export class WorkflowController extends Controller {
|
|||
},
|
||||
current_holderId: In(profileIds),
|
||||
},
|
||||
select: [
|
||||
"orgRootId",
|
||||
"orgChild1Id",
|
||||
"orgChild2Id",
|
||||
"orgChild3Id",
|
||||
"orgChild4Id",
|
||||
],
|
||||
})
|
||||
select: ["orgRootId", "orgChild1Id", "orgChild2Id", "orgChild3Id", "orgChild4Id"],
|
||||
});
|
||||
|
||||
const _data: any = _posMaster.map((x) => ({
|
||||
orgRootId: x.orgRootId,
|
||||
|
|
@ -1351,12 +1345,12 @@ export class WorkflowController extends Controller {
|
|||
current_holder: Not(IsNull()),
|
||||
posMasterAssigns: { assignId: system.trim().toUpperCase() },
|
||||
}));
|
||||
|
||||
|
||||
const posMaster = await this.posMasterRepo.find({
|
||||
where: _data,
|
||||
relations: ["current_holder"],
|
||||
});
|
||||
|
||||
|
||||
const data = posMaster.map((x) => ({
|
||||
id: x.current_holder.id,
|
||||
keycloak: x.current_holder.keycloak,
|
||||
|
|
@ -1365,7 +1359,7 @@ export class WorkflowController extends Controller {
|
|||
firstName: x.current_holder.firstName,
|
||||
lastName: x.current_holder.lastName,
|
||||
}));
|
||||
|
||||
|
||||
return new HttpSuccess(data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue