no message
This commit is contained in:
parent
acb3434154
commit
9067895450
1 changed files with 22 additions and 11 deletions
|
|
@ -1408,6 +1408,8 @@ export class PositionController extends Controller {
|
|||
typeCondition.current_holderId = IsNull();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
body.isAll = true;
|
||||
}
|
||||
let findPosition: any;
|
||||
let masterId = new Array();
|
||||
|
|
@ -1464,9 +1466,15 @@ export class PositionController extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
const revisionCondition = {
|
||||
let revisionCondition: any = {
|
||||
orgRevisionId: body.revisionId,
|
||||
};
|
||||
if (_exitsRole == true) {
|
||||
revisionCondition = {
|
||||
orgRevisionId: body.revisionId,
|
||||
authRoleId: In(_authRoleId),
|
||||
};
|
||||
}
|
||||
|
||||
const conditions = [
|
||||
{
|
||||
|
|
@ -1494,16 +1502,19 @@ export class PositionController extends Controller {
|
|||
.leftJoinAndSelect("current_holder.posType", "posType")
|
||||
.leftJoinAndSelect("current_holder.posLevel", "posLevel")
|
||||
.where(conditions)
|
||||
.orWhere(
|
||||
new Brackets((qb) => {
|
||||
if (body.keyword != null && body.keyword != "" && _exitsRole) {
|
||||
qb.andWhere("posMaster.authRoleId IN (:...authRoleId)", { authRoleId: _authRoleId })
|
||||
.andWhere(checkChildConditions)
|
||||
.andWhere(typeCondition)
|
||||
.andWhere(revisionCondition);
|
||||
}
|
||||
}),
|
||||
)
|
||||
// .orWhere(
|
||||
// new Brackets((qb) => {
|
||||
// qb.andWhere(
|
||||
// body.keyword != null && body.keyword != "" && _exitsRole
|
||||
// ? `posMaster.authRoleId IN (:...authRoleId)'`
|
||||
// : "1=1",
|
||||
// { authRoleId: _authRoleId },
|
||||
// )
|
||||
// .andWhere(checkChildConditions)
|
||||
// .andWhere(typeCondition)
|
||||
// .andWhere(revisionCondition);
|
||||
// }),
|
||||
// )
|
||||
.orWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.andWhere(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue