ออกคำสั่งไล่ออก (เพิ่มวินัย)
This commit is contained in:
parent
2e28488564
commit
ac42957b91
1 changed files with 17 additions and 1 deletions
|
|
@ -55,6 +55,7 @@ import CallAPI from "../interfaces/call-api";
|
|||
import Extension from "../interfaces/extension";
|
||||
import { Prefixe } from "../entities/Prefixe";
|
||||
import { ProfileInsignia } from "../entities/ProfileInsignia";
|
||||
import { ProfileDisciplineHistory } from "../entities/ProfileDisciplineHistory";
|
||||
|
||||
@Route("api/v1/org/profile")
|
||||
@Tags("Profile")
|
||||
|
|
@ -91,6 +92,7 @@ export class ProfileController extends Controller {
|
|||
private subDistrictRepo = AppDataSource.getRepository(SubDistrict);
|
||||
private profileInsigniaRepo = AppDataSource.getRepository(ProfileInsignia);
|
||||
private profileDisciplineRepo = AppDataSource.getRepository(ProfileDiscipline);
|
||||
private disciplineHistoryRepository = AppDataSource.getRepository(ProfileDisciplineHistory);
|
||||
/**
|
||||
* report ประวัติแบบย่อ ข้าราชการ
|
||||
*
|
||||
|
|
@ -1434,7 +1436,21 @@ export class ProfileController extends Controller {
|
|||
lastUpdateUserId: req.user.sub,
|
||||
lastUpdateFullName: req.user.name,
|
||||
});
|
||||
await Promise.all([this.profileRepo.save(profile), this.salaryRepository.save(profileSalary)]);
|
||||
//เพิ่มวินัย
|
||||
const profileDiscipline: ProfileDiscipline = Object.assign(new ProfileDiscipline(), {
|
||||
date: body.date,
|
||||
profileId: body.profileId,
|
||||
refCommandNo: body.refCommandNo,
|
||||
createdUserId: req.user.sub,
|
||||
createdFullName: req.user.name,
|
||||
lastUpdateUserId: req.user.sub,
|
||||
lastUpdateFullName: req.user.name,
|
||||
});
|
||||
await Promise.all([
|
||||
this.profileRepo.save(profile),
|
||||
this.salaryRepository.save(profileSalary),
|
||||
this.profileDisciplineRepo.save(profileDiscipline)
|
||||
]);
|
||||
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue