test import date

This commit is contained in:
kittapath 2025-03-06 09:58:38 +07:00
parent abe581f0e5
commit 3474c03b97

View file

@ -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);