fix
This commit is contained in:
parent
e59bb66a50
commit
966d565ac6
1 changed files with 3 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ export class EmployeePosLevelController extends Controller {
|
|||
|
||||
const EmpPosType = await this.employeePosTypeRepository.findOne({
|
||||
where: { id: requestBody.posTypeId },
|
||||
|
||||
});
|
||||
if (!EmpPosType) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||
|
|
@ -66,6 +67,7 @@ export class EmployeePosLevelController extends Controller {
|
|||
const chkEmpPosLevelName = await this.employeePosLevelRepository.findOne({
|
||||
where: {
|
||||
posLevelName: requestBody.posLevelName,
|
||||
posTypeId: requestBody.posTypeId,
|
||||
},
|
||||
});
|
||||
if (chkEmpPosLevelName) {
|
||||
|
|
@ -108,7 +110,7 @@ export class EmployeePosLevelController extends Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกลุ่มงานลูกจ้างประจำนี้");
|
||||
}
|
||||
|
||||
const chkEmpPosLevel = await this.employeePosLevelRepository.find({
|
||||
const chkEmpPosLevel = await this.employeePosLevelRepository.findOne({
|
||||
where: {
|
||||
id: Not(id),
|
||||
posLevelName: requestBody.posLevelName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue