คอมเม้นผู้บังคับบัญชา
This commit is contained in:
parent
9576d26753
commit
7f7b676750
9 changed files with 318 additions and 10 deletions
|
|
@ -22,6 +22,7 @@ import HttpStatusCode from "../interfaces/http-status";
|
|||
import { KpiRole, createKpiRole, updateKpiRole } from "../entities/kpiRole";
|
||||
import CallAPI from "../interfaces/call-api";
|
||||
import { KpiPeriod } from "../entities/kpiPeriod";
|
||||
import { Brackets } from "typeorm";
|
||||
|
||||
@Route("api/v1/kpi/role")
|
||||
@Tags("kpiRole")
|
||||
|
|
@ -257,6 +258,14 @@ export class kpiRoleController extends Controller {
|
|||
.andWhere(position != undefined ? "kpiRole.position LIKE :position" : "1=1", {
|
||||
position: `%${position}%`,
|
||||
})
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere("kpiRole.including LIKE :keyword", { keyword: `%${keyword}%` }).orWhere(
|
||||
"kpiRole.includingName LIKE :keyword",
|
||||
{ keyword: `%${keyword}%` },
|
||||
);
|
||||
}),
|
||||
)
|
||||
.select([
|
||||
"kpiRole.id",
|
||||
"kpiPeriod.year",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue