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
|
||||
const isEmployee = type === "EMPLOYEE";
|
||||
|
||||
const records = await AppDataSource.getRepository(ProfileSalary).find({
|
||||
where: {
|
||||
[isEmployee ? "profileEmployeeId" : "profileId"]: profileId,
|
||||
},
|
||||
select: ["commandDateAffect", "dateGovernment", "isGovernment"],
|
||||
order: { order: "ASC" },
|
||||
});
|
||||
// const records = await AppDataSource.getRepository(ProfileSalary).find({
|
||||
// where: {
|
||||
// [isEmployee ? "profileEmployeeId" : "profileId"]: profileId,
|
||||
// },
|
||||
// select: ["commandDateAffect", "dateGovernment", "isGovernment"],
|
||||
// order: { order: "ASC" },
|
||||
// });
|
||||
|
||||
if (!records || records.length === 0) {
|
||||
return null;
|
||||
}
|
||||
// if (!records || records.length === 0) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
let endDateFristRec: any = null;
|
||||
endDateFristRec = await AppDataSource.getRepository(ProfileSalary).findOne({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue