แก้เช็คอัจราในผังเงินเดือนลูกจ้าง
This commit is contained in:
parent
c124a05561
commit
9fa5e03d24
1 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ import {
|
|||
SalaryRankEmployees,
|
||||
UpdateSalaryRankEmployee,
|
||||
} from "../entities/SalaryRankEmployees";
|
||||
import { Salarys } from "../entities/Salarys";
|
||||
import { SalaryEmployees } from "../entities/SalaryEmployees";
|
||||
@Route("api/v1/salary/rate/employee")
|
||||
@Tags("SalaryRankEmployee")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -34,7 +34,7 @@ import { Salarys } from "../entities/Salarys";
|
|||
@SuccessResponse(HttpStatusCode.OK, "สำเร็จ")
|
||||
export class SalaryRankEmployeesController extends Controller {
|
||||
private salaryRankEmployeeRepository = AppDataSource.getRepository(SalaryRankEmployees);
|
||||
private salaryRepository = AppDataSource.getRepository(Salarys);
|
||||
private salaryEmployeeRepository = AppDataSource.getRepository(SalaryEmployees);
|
||||
|
||||
/**
|
||||
* API สร้างอัตราเงินเดือนลูกจ้าง
|
||||
|
|
@ -48,7 +48,7 @@ export class SalaryRankEmployeesController extends Controller {
|
|||
@Request() request: { user: Record<string, any> },
|
||||
) {
|
||||
try {
|
||||
const checkSalary = await this.salaryRepository.findOne({
|
||||
const checkSalary = await this.salaryEmployeeRepository.findOne({
|
||||
where: { id: requestBody.salaryEmployeeId },
|
||||
});
|
||||
if (!checkSalary) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue