check query
This commit is contained in:
parent
ac36b37612
commit
f4305c895e
1 changed files with 9 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ import { Position } from "../entities/Position";
|
|||
import { Profile } from "../entities/Profile";
|
||||
@Route("api/v1/org/pos")
|
||||
@Tags("Position")
|
||||
// @Security("bearerAuth")
|
||||
@Security("bearerAuth")
|
||||
@Response(
|
||||
HttpStatusCode.INTERNAL_SERVER_ERROR,
|
||||
"เกิดข้อผิดพลาด ไม่สามารถแสดงรายการได้ กรุณาลองใหม่ในภายหลัง",
|
||||
|
|
@ -992,7 +992,13 @@ export class PositionController extends Controller {
|
|||
.leftJoinAndSelect("posMaster.current_holder", "current_holder")
|
||||
.leftJoinAndSelect("posMaster.next_holder", "next_holder")
|
||||
.where(conditions)
|
||||
.orWhere(searchShortName)
|
||||
.orWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.where(searchShortName)
|
||||
.andWhere(checkChildConditions)
|
||||
.andWhere(typeCondition)
|
||||
}),
|
||||
)
|
||||
.orWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.where(
|
||||
|
|
@ -1004,7 +1010,7 @@ export class PositionController extends Controller {
|
|||
},
|
||||
)
|
||||
.andWhere(checkChildConditions)
|
||||
.andWhere(typeCondition);
|
||||
.andWhere(typeCondition)
|
||||
}),
|
||||
)
|
||||
.orderBy("posMaster.posMasterOrder", "ASC")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue