สร้างรอบ

This commit is contained in:
Kittapath 2024-03-08 11:38:27 +07:00
parent 7fb9f887ab
commit 5ef3c3e417

View file

@ -1384,15 +1384,17 @@ export class SalaryPeriodController extends Controller {
salaryOrgNew.rootId = rootId;
salaryOrgNew.revisionId = salaryPeriod.revisionId;
salaryOrgNew.snapshot = snapshot;
salaryOrgNew.group = "GROUP1";
salaryOrgNew.createdUserId = request.user.sub;
salaryOrgNew.createdFullName = request.user.name;
salaryOrgNew.lastUpdateUserId = request.user.sub;
salaryOrgNew.lastUpdateFullName = request.user.name;
salaryOrgNew.group = "GROUP1";
await this.salaryOrgRepository.save(salaryOrgNew);
delete salaryOrgNew.id;
salaryOrgNew.group = "GROUP2";
await this.salaryOrgRepository.save(salaryOrgNew);
if (salaryPeriod.period != "SPECIAL") {
delete salaryOrgNew.id;
salaryOrgNew.group = "GROUP2";
await this.salaryOrgRepository.save(salaryOrgNew);
}
}),
);
if (salaryPeriod.period != "SPECIAL") {
@ -1667,15 +1669,17 @@ export class SalaryPeriodController extends Controller {
salaryOrgNew.rootId = rootId;
salaryOrgNew.revisionId = salaryPeriod.revisionId;
salaryOrgNew.snapshot = snapshot;
salaryOrgNew.group = "GROUP1";
salaryOrgNew.createdUserId = request.user.sub;
salaryOrgNew.createdFullName = request.user.name;
salaryOrgNew.lastUpdateUserId = request.user.sub;
salaryOrgNew.lastUpdateFullName = request.user.name;
salaryOrgNew.group = "GROUP1";
await this.salaryOrgRepository.save(salaryOrgNew);
delete salaryOrgNew.id;
salaryOrgNew.group = "GROUP2";
await this.salaryOrgRepository.save(salaryOrgNew);
if (salaryPeriod.period != "SPECIAL") {
delete salaryOrgNew.id;
salaryOrgNew.group = "GROUP2";
await this.salaryOrgRepository.save(salaryOrgNew);
}
}),
);