entity ย้ายสับเปลี่ยนตำแหน่ง

This commit is contained in:
Bright 2024-06-11 16:14:36 +07:00
parent de27e1941b
commit dd5662c14a
4 changed files with 292 additions and 1 deletions

View file

@ -556,7 +556,11 @@ export class ProfileEmployeeController extends Controller {
const exists =
!!body.citizenId &&
(await this.profileRepo.findOne({
where: { id: Not(id), citizenId: body.citizenId },
where: {
id: Not(id),
citizenId: body.citizenId,
employeeClass: String(body.employeeClass)
},
}));
if (exists) {