no message
This commit is contained in:
parent
d897c8c041
commit
fa52b33786
4 changed files with 1007 additions and 13 deletions
|
|
@ -2557,9 +2557,11 @@ export class ProfileController extends Controller {
|
|||
},
|
||||
})
|
||||
async listProfile(
|
||||
@Request() request: RequestWithUser,
|
||||
@Query("page") page: number = 1,
|
||||
@Query("pageSize") pageSize: number = 10,
|
||||
@Query() searchField?: "firstName" | "lastName" | "fullName" | "citizenId" | "position" | "posNo",
|
||||
@Query()
|
||||
searchField?: "firstName" | "lastName" | "fullName" | "citizenId" | "position" | "posNo",
|
||||
@Query() searchKeyword: string = "",
|
||||
@Query() posType?: string,
|
||||
@Query() posLevel?: string,
|
||||
|
|
@ -2597,6 +2599,7 @@ export class ProfileController extends Controller {
|
|||
} else if (node === 4 && nodeId) {
|
||||
nodeCondition = "current_holders.orgChild4Id = :nodeId";
|
||||
}
|
||||
// let _data = await new permission().PermissionOrgList(request, "SYS_REGISTRY_OFFICER");
|
||||
const [record, total] = await this.profileRepo
|
||||
.createQueryBuilder("profile")
|
||||
.leftJoinAndSelect("profile.posLevel", "posLevel")
|
||||
|
|
@ -2609,6 +2612,46 @@ export class ProfileController extends Controller {
|
|||
.leftJoinAndSelect("current_holders.orgChild2", "orgChild2")
|
||||
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
|
||||
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
|
||||
// .andWhere(
|
||||
// _data.root != undefined && _data.root != null
|
||||
// ? `current_holders.orgRootId IN (:...node)`
|
||||
// : "1=1",
|
||||
// {
|
||||
// node: _data.root,
|
||||
// },
|
||||
// )
|
||||
// .andWhere(
|
||||
// _data.child1 != undefined && _data.child1 != null
|
||||
// ? `current_holders.orgChild1Id IN (:...node)`
|
||||
// : "1=1",
|
||||
// {
|
||||
// node: _data.child1,
|
||||
// },
|
||||
// )
|
||||
// .andWhere(
|
||||
// _data.child2 != undefined && _data.child2 != null
|
||||
// ? `current_holders.orgChild2Id IN (:...node)`
|
||||
// : "1=1",
|
||||
// {
|
||||
// node: _data.child2,
|
||||
// },
|
||||
// )
|
||||
// .andWhere(
|
||||
// _data.child3 != undefined && _data.child3 != null
|
||||
// ? `current_holders.orgChild3Id IN (:...node)`
|
||||
// : "1=1",
|
||||
// {
|
||||
// node: _data.child3,
|
||||
// },
|
||||
// )
|
||||
// .andWhere(
|
||||
// _data.child4 != undefined && _data.child4 != null
|
||||
// ? `current_holders.orgChild4Id IN (:...node)`
|
||||
// : "1=1",
|
||||
// {
|
||||
// node: _data.child4,
|
||||
// },
|
||||
// )
|
||||
.andWhere(
|
||||
posType != undefined && posType != null && posType != ""
|
||||
? "posType.posTypeName LIKE :keyword1"
|
||||
|
|
@ -2647,11 +2690,11 @@ export class ProfileController extends Controller {
|
|||
)
|
||||
.andWhere(nodeCondition, {
|
||||
nodeId: nodeId,
|
||||
})
|
||||
})
|
||||
.skip((page - 1) * pageSize)
|
||||
.take(pageSize)
|
||||
.getManyAndCount();
|
||||
|
||||
|
||||
const findRevision = await this.orgRevisionRepo.findOne({
|
||||
where: { orgRevisionIsCurrent: true },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue