เพิ่มขั้นเงินเดือน

This commit is contained in:
Kittapath 2024-03-18 13:50:53 +07:00
parent 153d29557b
commit 297d567fad
3 changed files with 25 additions and 4 deletions

View file

@ -1643,7 +1643,7 @@ export class SalaryPeriodController extends Controller {
}),
);
await Promise.all(
orgProfiles.map(async (profile: any) => {
orgProfileEmployees.map(async (profile: any) => {
const salaryOrgNew = await this.salaryOrgEmployeeRepository.findOne({
where: {
salaryPeriodId: salaryPeriod.id,
@ -1979,7 +1979,6 @@ export class SalaryPeriodController extends Controller {
}
}
total = 1000;
let orgProfileEmployees: any;
let _orgProfileEmployees = await new CallAPI().PostData(
request,
"org/unauthorize/profile/salary/employee/gen",
@ -1991,7 +1990,7 @@ export class SalaryPeriodController extends Controller {
period: salaryPeriod.period,
},
);
orgProfileEmployees = _orgProfileEmployees.data;
let orgProfileEmployees = _orgProfileEmployees.data;
total = _orgProfileEmployees.total;
if (total > 1000) {
const page = Math.ceil(total / 1000);
@ -2113,7 +2112,7 @@ export class SalaryPeriodController extends Controller {
}),
);
await Promise.all(
orgProfiles.map(async (profile: any) => {
orgProfileEmployees.map(async (profile: any) => {
const salaryOrgNew = await this.salaryOrgEmployeeRepository.findOne({
where: {
salaryPeriodId: salaryPeriod.id,