diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index ec42f64e..26cc79d9 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -74,8 +74,8 @@ export class CommandController extends Controller { : `${status.trim().toLocaleUpperCase()}`, }, ) - .andWhere(year != null && year != undefined && year != 0 ? "command.year = :year" : "1=1", { - year: year == null || year == undefined || year == 0 ? null : `${year}`, + .andWhere(year != null && year != undefined && year != 0 ? "command.commandYear = :commandYear" : "1=1", { + commandYear: year == null || year == undefined || year == 0 ? null : `${year}`, }) .andWhere( commandTypeId != null && commandTypeId != undefined && commandTypeId != ""