แก้ไขค้นหาชื่อคนครอง master/list
This commit is contained in:
parent
21aa51ff99
commit
ba76e787b0
1 changed files with 15 additions and 0 deletions
|
|
@ -1096,6 +1096,21 @@ export class PositionController extends Controller {
|
|||
.andWhere(revisionCondition);
|
||||
}),
|
||||
)
|
||||
.orWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.andWhere(
|
||||
body.keyword != null && body.keyword != ""
|
||||
? `CONCAT(next_holder.prefix, next_holder.firstName, next_holder.lastName) like '%${body.keyword}%'`
|
||||
: "1=1",
|
||||
{
|
||||
keyword: `%${body.keyword}%`,
|
||||
},
|
||||
)
|
||||
.andWhere(checkChildConditions)
|
||||
.andWhere(typeCondition)
|
||||
.andWhere(revisionCondition);
|
||||
}),
|
||||
)
|
||||
.orderBy("posMaster.posMasterOrder", "ASC")
|
||||
.skip((body.page - 1) * body.pageSize)
|
||||
.take(body.pageSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue