fix issue #1357 ข้อมูลอายุราชการไม่แสดง
This commit is contained in:
parent
3ce2f932d6
commit
5837ca1724
1 changed files with 10 additions and 10 deletions
|
|
@ -47,17 +47,17 @@ export async function calculateGovAge(profileId: string, type: string) {
|
||||||
// type = OFFICER , EMPLOYEE
|
// type = OFFICER , EMPLOYEE
|
||||||
const isEmployee = type === "EMPLOYEE";
|
const isEmployee = type === "EMPLOYEE";
|
||||||
|
|
||||||
const records = await AppDataSource.getRepository(ProfileSalary).find({
|
// const records = await AppDataSource.getRepository(ProfileSalary).find({
|
||||||
where: {
|
// where: {
|
||||||
[isEmployee ? "profileEmployeeId" : "profileId"]: profileId,
|
// [isEmployee ? "profileEmployeeId" : "profileId"]: profileId,
|
||||||
},
|
// },
|
||||||
select: ["commandDateAffect", "dateGovernment", "isGovernment"],
|
// select: ["commandDateAffect", "dateGovernment", "isGovernment"],
|
||||||
order: { order: "ASC" },
|
// order: { order: "ASC" },
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (!records || records.length === 0) {
|
// if (!records || records.length === 0) {
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
let endDateFristRec: any = null;
|
let endDateFristRec: any = null;
|
||||||
endDateFristRec = await AppDataSource.getRepository(ProfileSalary).findOne({
|
endDateFristRec = await AppDataSource.getRepository(ProfileSalary).findOne({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue