เลื่อนเงินเดือนลูกจ้าง

This commit is contained in:
Kittapath 2024-03-21 22:59:53 +07:00
parent d3dd7012a1
commit 9449a1f989
7 changed files with 448 additions and 441 deletions

View file

@ -14,7 +14,7 @@ import {
Get,
Query,
} from "tsoa";
import { Like} from "typeorm";
import { Like } from "typeorm";
import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success";
import HttpStatusCode from "../interfaces/http-status";
@ -126,12 +126,11 @@ export class SalaryRanksController extends Controller {
if (keyword != undefined && keyword !== "") {
whereClause = {
where: [
{ salaryId: id },
{ salary: Like(`%${keyword}%`) },
{ salary: Like(`%${keyword}%`) },
{ salaryHalf: Like(`%${keyword}%`) },
{ salaryHalfSpecial: Like(`%${keyword}%`) },
{ salaryHalfSpecial: Like(`%${keyword}%`) },
{ salaryFull: Like(`%${keyword}%`) },
{ salaryFullSpecial: Like(`%${keyword}%`) },
{ salaryFullSpecial: Like(`%${keyword}%`) },
{ salaryFullHalf: Like(`%${keyword}%`) },
{ salaryFullHalfSpecial: Like(`%${keyword}%`) },
],
@ -139,6 +138,9 @@ export class SalaryRanksController extends Controller {
}
const [salaryRank, total] = await this.salaryRankRepository.findAndCount({
...whereClause,
where: {
salaryId: id,
},
select: [
"id",
"salary",