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