update add year param

This commit is contained in:
AdisakKanthawilang 2025-08-01 10:02:52 +07:00
parent 6e0181c52b
commit f382e3622f

View file

@ -72,6 +72,7 @@ export class KpiUserEvaluationController extends Controller {
page: number; page: number;
pageSize: number; pageSize: number;
kpiPeriodId?: string; kpiPeriodId?: string;
year?: number;
keyword?: string; keyword?: string;
status?: string | null; status?: string | null;
results?: string | null; results?: string | null;
@ -104,6 +105,9 @@ export class KpiUserEvaluationController extends Controller {
kpiPeriodId: requestBody.kpiPeriodId, kpiPeriodId: requestBody.kpiPeriodId,
}, },
) )
.andWhere(
requestBody.year ? "kpiUserEvaluation.year LIKE :year" : "1=1", {year: requestBody.year},
)
.andWhere( .andWhere(
requestBody.status != null && requestBody.status != undefined requestBody.status != null && requestBody.status != undefined
? requestBody.status.trim().toUpperCase() == "NEW" ? requestBody.status.trim().toUpperCase() == "NEW"