ค้นหาตามสถานะ
This commit is contained in:
parent
30636c482d
commit
6dfe7203d4
1 changed files with 4 additions and 0 deletions
|
|
@ -72,6 +72,7 @@ export class kpiEvaluationController extends Controller {
|
|||
@Query("page") page: number = 1,
|
||||
@Query("pageSize") pageSize: number = 10,
|
||||
@Query("keyword") keyword?: string,
|
||||
@Query("status") status?: string,
|
||||
) {
|
||||
let whereClause: any = {};
|
||||
|
||||
|
|
@ -84,6 +85,9 @@ export class kpiEvaluationController extends Controller {
|
|||
|
||||
const [kpiEvaluation, total] = await this.kpiEvaluationRepository.findAndCount({
|
||||
...whereClause,
|
||||
...(status == null || status == undefined
|
||||
? {}
|
||||
: { evaluationStatus: status.trim().toUpperCase() }),
|
||||
...(keyword ? {} : { skip: (page - 1) * pageSize, take: pageSize }),
|
||||
order: {
|
||||
level: "DESC",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue