เพิ่มเงินเดือนล่าสุด
This commit is contained in:
parent
a0b4bef3a4
commit
857b0624f4
1 changed files with 57 additions and 1 deletions
|
|
@ -168,11 +168,67 @@ export class OrganizationDotnetController extends Controller {
|
||||||
relations: {
|
relations: {
|
||||||
posLevel: true,
|
posLevel: true,
|
||||||
posType: true,
|
posType: true,
|
||||||
|
profileSalary: true
|
||||||
},
|
},
|
||||||
where: { keycloak: keycloakId },
|
where: { keycloak: keycloakId },
|
||||||
|
order:{
|
||||||
|
profileSalary:{
|
||||||
|
date: "DESC"
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
return new HttpSuccess(profile);
|
|
||||||
|
const mapProfile = {
|
||||||
|
id: profile.id,
|
||||||
|
avatar: profile.avatar,
|
||||||
|
avatarName: profile.avatarName,
|
||||||
|
rank: profile.rank,
|
||||||
|
prefix: profile.prefix,
|
||||||
|
firstName: profile.firstName,
|
||||||
|
lastName: profile.lastName,
|
||||||
|
citizenId: profile.citizenId,
|
||||||
|
position: profile.position,
|
||||||
|
posLevelId: profile.posLevelId,
|
||||||
|
email: profile.email,
|
||||||
|
phone: profile.phone,
|
||||||
|
keycloak: profile.keycloak,
|
||||||
|
isProbation: profile.isProbation,
|
||||||
|
isLeave: profile.isLeave,
|
||||||
|
leaveReason: profile.leaveReason,
|
||||||
|
dateRetire: profile.dateRetire,
|
||||||
|
dateAppoint: profile.dateAppoint,
|
||||||
|
dateRetireLaw: profile.dateRetireLaw,
|
||||||
|
dateStart: profile.dateStart,
|
||||||
|
govAgeAbsent: profile.govAgeAbsent,
|
||||||
|
govAgePlus: profile.govAgePlus,
|
||||||
|
birthDate: profile.birthDate,
|
||||||
|
reasonSameDate: profile.reasonSameDate,
|
||||||
|
telephoneNumber: profile.telephoneNumber,
|
||||||
|
nationality: profile.nationality,
|
||||||
|
gender: profile.gender,
|
||||||
|
relationship: profile.relationship,
|
||||||
|
religion: profile.religion,
|
||||||
|
bloodGroup: profile.bloodGroup,
|
||||||
|
registrationAddress: profile.registrationAddress,
|
||||||
|
registrationProvinceId: profile.registrationProvinceId,
|
||||||
|
registrationDistrictId: profile.registrationDistrictId,
|
||||||
|
registrationSubDistrictId: profile.registrationSubDistrictId,
|
||||||
|
registrationZipCode: profile.registrationZipCode,
|
||||||
|
currentAddress: profile.currentAddress,
|
||||||
|
currentProvinceId: profile.currentProvinceId,
|
||||||
|
currentSubDistrictId: profile.currentSubDistrictId,
|
||||||
|
currentZipCode: profile.currentZipCode,
|
||||||
|
dutyTimeId: profile.dutyTimeId,
|
||||||
|
dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate,
|
||||||
|
posLevel: profile.posLevel? profile.posLevel : null,
|
||||||
|
posType: profile.posType? profile.posType : null,
|
||||||
|
profileSalary: profile.profileSalary.length > 0
|
||||||
|
? profile.profileSalary[0]
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
|
||||||
|
return new HttpSuccess(mapProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue