From f382e3622f06b5845f04230ed5e4c87fadf4204c Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Fri, 1 Aug 2025 10:02:52 +0700 Subject: [PATCH] update add year param --- src/controllers/KpiUserEvaluationController.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/KpiUserEvaluationController.ts b/src/controllers/KpiUserEvaluationController.ts index 4505555..3e00c96 100644 --- a/src/controllers/KpiUserEvaluationController.ts +++ b/src/controllers/KpiUserEvaluationController.ts @@ -72,6 +72,7 @@ export class KpiUserEvaluationController extends Controller { page: number; pageSize: number; kpiPeriodId?: string; + year?: number; keyword?: string; status?: string | null; results?: string | null; @@ -104,6 +105,9 @@ export class KpiUserEvaluationController extends Controller { kpiPeriodId: requestBody.kpiPeriodId, }, ) + .andWhere( + requestBody.year ? "kpiUserEvaluation.year LIKE :year" : "1=1", {year: requestBody.year}, + ) .andWhere( requestBody.status != null && requestBody.status != undefined ? requestBody.status.trim().toUpperCase() == "NEW"