This commit is contained in:
AdisakKanthawilang 2024-12-16 17:39:27 +07:00
parent 168a5ec53c
commit 0338ba48d1

View file

@ -666,7 +666,8 @@ export class OrganizationUnauthorizeController extends Controller {
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.leftJoinAndSelect("current_holders.positions", "positions")
.leftJoinAndSelect("positions.posExecutive", "posExecutive")
.where({ citizenId: id })
.where("current_holders.orgRevisionId = :orgRevisionId", { orgRevisionId: findRevision.id })
.andWhere({ citizenId: id })
.getOne();
if (!findProfile) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found Profile");
@ -872,8 +873,9 @@ export class OrganizationUnauthorizeController extends Controller {
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.leftJoinAndSelect("current_holders.positions", "positions")
.where("current_holders.orgRevisionId = :orgRevisionId", { orgRevisionId: findRevision.id })
// .leftJoinAndSelect("positions.posExecutive", "posExecutive")
.where({ citizenId: id, employeeClass: "PERM" })
.andWhere({ citizenId: id, employeeClass: "PERM" })
.getOne();
if (!findProfile) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found Profile");