no message

This commit is contained in:
kittapath 2024-11-25 16:57:36 +07:00
parent ade79873ed
commit 0b4e597a81
3 changed files with 61 additions and 36 deletions

View file

@ -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 =