This commit is contained in:
Bright 2025-03-06 13:00:02 +07:00
parent 990d80e64d
commit e31e98b316
2 changed files with 16 additions and 3 deletions

View file

@ -86,7 +86,7 @@ export class ProfileSalaryController extends Controller {
await this.positionEmployeeRepo.clear();
const profile = await this.profileEmployeeRepo.find();
for await (const x of profile) {
const position = await AppDataSource.query("CALL GetProfileSalaryPosition(?)", [x.id]);
const position = await AppDataSource.query("CALL GetProfileEmployeeSalaryPosition(?)", [x.id]);
const _position = position.length > 0 ? position[0] : [];
const mapPosition =
_position.length > 1
@ -176,7 +176,7 @@ export class ProfileSalaryController extends Controller {
await this.levelEmployeeRepo.clear();
const profile = await this.profileEmployeeRepo.find({ relations: ["posLevel"] });
for await (const x of profile) {
const positionLevel = await AppDataSource.query("CALL GetProfileSalaryLevel(?)", [x.id]);
const positionLevel = await AppDataSource.query("CALL GetProfileEmployeeSalaryLevel(?)", [x.id]);
const _positionLevel = positionLevel.length > 0 ? positionLevel[0] : [];
const mapPositionLevel =
_positionLevel.length > 1