This commit is contained in:
parent
78778e0eb0
commit
6e6253887f
1 changed files with 35 additions and 11 deletions
|
|
@ -547,6 +547,11 @@ export class KeycloakController extends Controller {
|
||||||
.createQueryBuilder("profile")
|
.createQueryBuilder("profile")
|
||||||
.leftJoinAndSelect("profile.roleKeycloaks", "roleKeycloaks")
|
.leftJoinAndSelect("profile.roleKeycloaks", "roleKeycloaks")
|
||||||
.leftJoinAndSelect("profile.current_holders", "current_holders")
|
.leftJoinAndSelect("profile.current_holders", "current_holders")
|
||||||
|
.leftJoinAndSelect("current_holders.orgRoot", "orgRoot")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild1", "orgChild1")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
|
||||||
.where("profile.keycloak IS NOT NULL AND profile.keycloak != ''")
|
.where("profile.keycloak IS NOT NULL AND profile.keycloak != ''")
|
||||||
.andWhere(checkChildFromRole)
|
.andWhere(checkChildFromRole)
|
||||||
.andWhere(conditions)
|
.andWhere(conditions)
|
||||||
|
|
@ -566,6 +571,13 @@ export class KeycloakController extends Controller {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.orderBy("profile.citizenId", "ASC")
|
.orderBy("profile.citizenId", "ASC")
|
||||||
|
.orderBy("orgRoot.orgRootOrder", "ASC")
|
||||||
|
.addOrderBy("orgChild1.orgChild1Order", "ASC")
|
||||||
|
.addOrderBy("orgChild2.orgChild2Order", "ASC")
|
||||||
|
.addOrderBy("orgChild3.orgChild3Order", "ASC")
|
||||||
|
.addOrderBy("orgChild4.orgChild4Order", "ASC")
|
||||||
|
.addOrderBy("current_holders.posMasterOrder", "ASC")
|
||||||
|
.addOrderBy("current_holders.posMasterCreatedAt", "ASC")
|
||||||
.skip((body.page - 1) * body.pageSize)
|
.skip((body.page - 1) * body.pageSize)
|
||||||
.take(body.pageSize)
|
.take(body.pageSize)
|
||||||
.getManyAndCount();
|
.getManyAndCount();
|
||||||
|
|
@ -574,6 +586,11 @@ export class KeycloakController extends Controller {
|
||||||
.createQueryBuilder("profileEmployee")
|
.createQueryBuilder("profileEmployee")
|
||||||
.leftJoinAndSelect("profileEmployee.roleKeycloaks", "roleKeycloaks")
|
.leftJoinAndSelect("profileEmployee.roleKeycloaks", "roleKeycloaks")
|
||||||
.leftJoinAndSelect("profileEmployee.current_holders", "current_holders")
|
.leftJoinAndSelect("profileEmployee.current_holders", "current_holders")
|
||||||
|
.leftJoinAndSelect("current_holders.orgRoot", "orgRoot")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild1", "orgChild1")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
|
||||||
|
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
|
||||||
.where("profileEmployee.keycloak IS NOT NULL AND profileEmployee.keycloak != ''")
|
.where("profileEmployee.keycloak IS NOT NULL AND profileEmployee.keycloak != ''")
|
||||||
.andWhere(checkChildFromRole)
|
.andWhere(checkChildFromRole)
|
||||||
.andWhere(conditions)
|
.andWhere(conditions)
|
||||||
|
|
@ -598,6 +615,13 @@ export class KeycloakController extends Controller {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.orderBy("profileEmployee.citizenId", "ASC")
|
.orderBy("profileEmployee.citizenId", "ASC")
|
||||||
|
.orderBy("orgRoot.orgRootOrder", "ASC")
|
||||||
|
.addOrderBy("orgChild1.orgChild1Order", "ASC")
|
||||||
|
.addOrderBy("orgChild2.orgChild2Order", "ASC")
|
||||||
|
.addOrderBy("orgChild3.orgChild3Order", "ASC")
|
||||||
|
.addOrderBy("orgChild4.orgChild4Order", "ASC")
|
||||||
|
.addOrderBy("current_holders.posMasterOrder", "ASC")
|
||||||
|
.addOrderBy("current_holders.posMasterCreatedAt", "ASC")
|
||||||
.skip((body.page - 1) * body.pageSize)
|
.skip((body.page - 1) * body.pageSize)
|
||||||
.take(body.pageSize)
|
.take(body.pageSize)
|
||||||
.getManyAndCount();
|
.getManyAndCount();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue