comment เครียร์ตำแหน่งลูกจ้างหลังลบออกจากครองตำแหน่ง
This commit is contained in:
parent
5efb7346d6
commit
342c7dde67
1 changed files with 16 additions and 16 deletions
|
|
@ -2293,22 +2293,22 @@ export class EmployeePositionController extends Controller {
|
|||
if (!dataMaster) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
|
||||
}
|
||||
if (dataMaster.current_holderId != null) {
|
||||
const profile = await this.profileRepository.findOne({
|
||||
where: {
|
||||
id: dataMaster.current_holderId,
|
||||
},
|
||||
});
|
||||
const _null: any = null;
|
||||
if (profile != null) {
|
||||
profile.posLevelId = _null;
|
||||
profile.posTypeId = _null;
|
||||
profile.position = _null;
|
||||
profile.employeeOc = _null;
|
||||
profile.positionEmployeePositionId = _null;
|
||||
await this.profileRepository.save(profile);
|
||||
}
|
||||
}
|
||||
// if (dataMaster.current_holderId != null) {
|
||||
// const profile = await this.profileRepository.findOne({
|
||||
// where: {
|
||||
// id: dataMaster.current_holderId,
|
||||
// },
|
||||
// });
|
||||
// const _null: any = null;
|
||||
// if (profile != null) {
|
||||
// profile.posLevelId = _null;
|
||||
// profile.posTypeId = _null;
|
||||
// profile.position = _null;
|
||||
// profile.employeeOc = _null;
|
||||
// profile.positionEmployeePositionId = _null;
|
||||
// await this.profileRepository.save(profile);
|
||||
// }
|
||||
// }
|
||||
|
||||
await this.employeePosMasterRepository.update(id, {
|
||||
isSit: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue