no message
This commit is contained in:
parent
ade79873ed
commit
0b4e597a81
3 changed files with 61 additions and 36 deletions
|
|
@ -1420,6 +1420,12 @@ export class ProfileEmployeeController extends Controller {
|
|||
nodeCondition = "current_holders.orgChild4Id = :nodeId";
|
||||
}
|
||||
nodeCondition = nodeCondition + nodeAll;
|
||||
const findRevision = await this.orgRevisionRepo.findOne({
|
||||
where: { orgRevisionIsCurrent: true },
|
||||
});
|
||||
if (!findRevision) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "not found. OrgRevision");
|
||||
}
|
||||
const [record, total] = await this.profileRepo
|
||||
.createQueryBuilder("profileEmployee")
|
||||
.leftJoinAndSelect("profileEmployee.posLevel", "posLevel")
|
||||
|
|
@ -1524,16 +1530,13 @@ export class ProfileEmployeeController extends Controller {
|
|||
.andWhere(nodeCondition, {
|
||||
nodeId: nodeId,
|
||||
})
|
||||
.andWhere(`current_holders.orgRevisionId LIKE :orgRevisionId`, {
|
||||
orgRevisionId: findRevision.id,
|
||||
})
|
||||
.orderBy("current_holders.posMasterNo", "ASC")
|
||||
.skip((page - 1) * pageSize)
|
||||
.take(pageSize)
|
||||
.getManyAndCount();
|
||||
const findRevision = await this.orgRevisionRepo.findOne({
|
||||
where: { orgRevisionIsCurrent: true },
|
||||
});
|
||||
if (!findRevision) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "not found. OrgRevision");
|
||||
}
|
||||
const data = await Promise.all(
|
||||
record.map((_data) => {
|
||||
const shortName =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue