diff --git a/src/controllers/ProfileSalaryController.ts b/src/controllers/ProfileSalaryController.ts index d2bee9eb..34dcf91f 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -45,7 +45,9 @@ export class ProfileSalaryController extends Controller { let data: any = []; const positionOfficer = await this.positionOfficerRepo.find(); await this.positionOfficerRepo.remove(positionOfficer); - const profile = await this.profileRepo.find(); + const profile = await this.profileRepo.find({ + where: { id: "46dec43d-2ed7-4f04-9843-dbade7a156c7" }, + }); for await (const x of profile) { const position = await AppDataSource.query("CALL GetProfileSalaryPosition(?)", [x.id]); const _position = position.length > 0 ? position[0] : []; @@ -74,8 +76,10 @@ export class ProfileSalaryController extends Controller { Months: ((calDayDiff.days_diff / 30.4375) % 12).toFixed(4), Days: (calDayDiff.days_diff % 30.4375).toFixed(4), }; + console.log(mapData); + return new HttpSuccess(mapData); // data.push(_mapData); - await this.positionOfficerRepo.save(mapData); + // await this.positionOfficerRepo.save(mapData); } // await this.positionOfficerRepo.save(data);