no message

This commit is contained in:
kittapath 2024-11-26 17:33:39 +07:00
parent acb3434154
commit 9067895450

View file

@ -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(