test import date
This commit is contained in:
parent
abe581f0e5
commit
3474c03b97
1 changed files with 6 additions and 2 deletions
|
|
@ -45,7 +45,9 @@ export class ProfileSalaryController extends Controller {
|
||||||
let data: any = [];
|
let data: any = [];
|
||||||
const positionOfficer = await this.positionOfficerRepo.find();
|
const positionOfficer = await this.positionOfficerRepo.find();
|
||||||
await this.positionOfficerRepo.remove(positionOfficer);
|
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) {
|
for await (const x of profile) {
|
||||||
const position = await AppDataSource.query("CALL GetProfileSalaryPosition(?)", [x.id]);
|
const position = await AppDataSource.query("CALL GetProfileSalaryPosition(?)", [x.id]);
|
||||||
const _position = position.length > 0 ? position[0] : [];
|
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),
|
Months: ((calDayDiff.days_diff / 30.4375) % 12).toFixed(4),
|
||||||
Days: (calDayDiff.days_diff % 30.4375).toFixed(4),
|
Days: (calDayDiff.days_diff % 30.4375).toFixed(4),
|
||||||
};
|
};
|
||||||
|
console.log(mapData);
|
||||||
|
return new HttpSuccess(mapData);
|
||||||
// data.push(_mapData);
|
// data.push(_mapData);
|
||||||
await this.positionOfficerRepo.save(mapData);
|
// await this.positionOfficerRepo.save(mapData);
|
||||||
}
|
}
|
||||||
// await this.positionOfficerRepo.save(data);
|
// await this.positionOfficerRepo.save(data);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue