no message
This commit is contained in:
parent
ecadf565ac
commit
b3dae5a6d7
1 changed files with 21 additions and 1 deletions
|
|
@ -4225,7 +4225,18 @@ export class ProfileController extends Controller {
|
||||||
async getProfileByCitizenId(@Request() request: RequestWithUser, @Path() id: string) {
|
async getProfileByCitizenId(@Request() request: RequestWithUser, @Path() id: string) {
|
||||||
const profile = await this.profileRepo.findOne({
|
const profile = await this.profileRepo.findOne({
|
||||||
where: { citizenId: id },
|
where: { citizenId: id },
|
||||||
relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot"],
|
relations: [
|
||||||
|
"posLevel",
|
||||||
|
"posType",
|
||||||
|
"current_holders",
|
||||||
|
"current_holders.orgRoot",
|
||||||
|
"profileSalary",
|
||||||
|
],
|
||||||
|
order: {
|
||||||
|
profileSalary: {
|
||||||
|
order: "DESC",
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
|
||||||
|
|
@ -4311,6 +4322,15 @@ export class ProfileController extends Controller {
|
||||||
child4ShortName: child4 == null ? null : child4.orgChild4ShortName,
|
child4ShortName: child4 == null ? null : child4.orgChild4ShortName,
|
||||||
node: null,
|
node: null,
|
||||||
nodeId: null,
|
nodeId: null,
|
||||||
|
amount: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null,
|
||||||
|
positionSalaryAmount:
|
||||||
|
profile && profile.profileSalary.length > 0
|
||||||
|
? profile.profileSalary[0].positionSalaryAmount
|
||||||
|
: null,
|
||||||
|
mouthSalaryAmount:
|
||||||
|
profile && profile.profileSalary.length > 0
|
||||||
|
? profile.profileSalary[0].mouthSalaryAmount
|
||||||
|
: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_profile.child4Id != null) {
|
if (_profile.child4Id != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue