fix
This commit is contained in:
parent
d7fc649854
commit
c94d3eb547
1 changed files with 9 additions and 10 deletions
|
|
@ -929,16 +929,15 @@ export class ProfileController extends Controller {
|
||||||
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
.leftJoinAndSelect("current_holder.profileSalary", "profileSalary")
|
||||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||||
.leftJoinAndSelect("current_holder.posType", "posType")
|
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||||
.where({
|
.where((qb) => {
|
||||||
orgRevisionId: findRevision?.id,
|
if (body.rootId) {
|
||||||
current_holderId: Not(IsNull()),
|
qb.andWhere("posMaster.orgRootId = :rootId", { rootId: body.rootId });
|
||||||
|
}
|
||||||
|
qb.andWhere("posMaster.current_holderId IS NOT NULL");
|
||||||
|
qb.andWhere("posMaster.orgRevisionId = :orgRevisionId", {
|
||||||
|
orgRevisionId: findRevision?.id,
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.orWhere(
|
|
||||||
body.rootId == null ? "1=1" : "posMaster.orgRootId = :rootId",
|
|
||||||
{
|
|
||||||
rootId: body.rootId,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.where(
|
qb.where(
|
||||||
|
|
@ -997,7 +996,7 @@ export class ProfileController extends Controller {
|
||||||
{
|
{
|
||||||
keyword: `%${body.keyword}%`,
|
keyword: `%${body.keyword}%`,
|
||||||
},
|
},
|
||||||
);
|
)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.skip((body.page - 1) * body.pageSize)
|
.skip((body.page - 1) * body.pageSize)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue