From cb3ac2f49269b8cc1044f0cdeaca5296cdaccc48 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Thu, 27 Jun 2024 12:02:32 +0700 Subject: [PATCH] no message --- src/controllers/SalaryPeriodController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index 1c1eaf5..4e87a72 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -13,7 +13,7 @@ import { Query, } from "tsoa"; import { AppDataSource } from "../database/data-source"; -import { In, Not, MoreThan, Brackets, Like, MoreThanOrEqual } from "typeorm"; +import { In, Not, MoreThan, Brackets, Like, MoreThanOrEqual, IsNull } from "typeorm"; import HttpSuccess from "../interfaces/http-success"; import HttpError from "../interfaces/http-error"; import HttpStatusCode from "../interfaces/http-status"; @@ -28,6 +28,7 @@ import { SalaryRanks } from "../entities/SalaryRanks"; import CallAPI from "../interfaces/call-api"; import { SalaryOrgEmployee } from "../entities/SalaryOrgEmployee"; import { SalaryProfileEmployee } from "../entities/SalaryProfileEmployee"; +import { isNullOrUndefined } from "util"; @Route("api/v1/salary/period") @Tags("Salary") @@ -1871,6 +1872,7 @@ export class SalaryPeriodController extends Controller { .createQueryBuilder("salaryPeriod") .andWhere(year != 0 ? "salaryPeriod.year LIKE :year" : "1=1", { year: `${year}` }) .andWhere({ isActive: true }) + .andWhere({ revisionId: Not(IsNull()) }) .select([ "salaryPeriod.id", "salaryPeriod.period",