filter ประวัติหน่วยงาน
This commit is contained in:
parent
9b0b51ea36
commit
e8094726f0
2 changed files with 12 additions and 4 deletions
|
|
@ -238,7 +238,12 @@ export class DevelopmentEmployeeHistoryController extends Controller {
|
|||
: "1=1",
|
||||
{ year: body.year },
|
||||
)
|
||||
.andWhere(body.root != null ? "developmentHistory.root = :root" : "1=1", { root: body.root })
|
||||
.andWhere(
|
||||
body.root != null && body.root != undefined ? "developmentHistory.rootId = :root" : "1=1",
|
||||
{
|
||||
root: body.root,
|
||||
},
|
||||
)
|
||||
.andWhere("developmentHistory.type = :type", { type: type })
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
|
|
|
|||
|
|
@ -230,9 +230,12 @@ export class DevelopmentOfficerHistoryController extends Controller {
|
|||
: "1=1",
|
||||
{ year: body.year },
|
||||
)
|
||||
.andWhere(body.root != null && body.root != undefined ? "development.root = :root" : "1=1", {
|
||||
root: body.root,
|
||||
})
|
||||
.andWhere(
|
||||
body.root != null && body.root != undefined ? "development.rootId = :root" : "1=1",
|
||||
{
|
||||
root: body.root,
|
||||
},
|
||||
)
|
||||
.andWhere(body.root != null ? "developmentHistory.root = :root" : "1=1", { root: body.root })
|
||||
.andWhere("developmentHistory.type = :type", { type: type })
|
||||
.andWhere(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue