add field search-personal both
This commit is contained in:
parent
681b0aa326
commit
cd456516c0
2 changed files with 61 additions and 1 deletions
|
|
@ -81,6 +81,7 @@ export class ProfileController extends Controller {
|
||||||
private disciplineRepository = AppDataSource.getRepository(ProfileDiscipline);
|
private disciplineRepository = AppDataSource.getRepository(ProfileDiscipline);
|
||||||
private educationRepository = AppDataSource.getRepository(ProfileEducation);
|
private educationRepository = AppDataSource.getRepository(ProfileEducation);
|
||||||
private salaryRepository = AppDataSource.getRepository(ProfileSalary);
|
private salaryRepository = AppDataSource.getRepository(ProfileSalary);
|
||||||
|
private profileEducationRepository = AppDataSource.getRepository(ProfileEducation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* report ประวัติแบบย่อ ข้าราชการ
|
* report ประวัติแบบย่อ ข้าราชการ
|
||||||
|
|
@ -2081,6 +2082,11 @@ export class ProfileController extends Controller {
|
||||||
(x) => x.orgRevisionId == findRevision.id,
|
(x) => x.orgRevisionId == findRevision.id,
|
||||||
)?.posMasterNo;
|
)?.posMasterNo;
|
||||||
|
|
||||||
|
const latestProfileEducation = await this.profileEducationRepository.findOne({
|
||||||
|
where: { profileId: item.id },
|
||||||
|
order: { createdAt: "DESC" },
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
|
|
@ -2092,6 +2098,7 @@ export class ProfileController extends Controller {
|
||||||
email: item.email,
|
email: item.email,
|
||||||
phone: item.phone,
|
phone: item.phone,
|
||||||
name: fullName,
|
name: fullName,
|
||||||
|
birthDate: item.birthDate,
|
||||||
positionLevel: item.posLevelId,
|
positionLevel: item.posLevelId,
|
||||||
positionLevelName: item.posLevel?.posLevelName,
|
positionLevelName: item.posLevel?.posLevelName,
|
||||||
positionType: item.posTypeId,
|
positionType: item.posTypeId,
|
||||||
|
|
@ -2119,6 +2126,29 @@ export class ProfileController extends Controller {
|
||||||
posTypeName: item.posType?.posTypeName,
|
posTypeName: item.posType?.posTypeName,
|
||||||
posLevelId: item.posLevelId,
|
posLevelId: item.posLevelId,
|
||||||
posLevelName: item.posLevel?.posLevelName,
|
posLevelName: item.posLevel?.posLevelName,
|
||||||
|
profileEducation: latestProfileEducation
|
||||||
|
? {
|
||||||
|
id: latestProfileEducation.id,
|
||||||
|
degree: latestProfileEducation.degree,
|
||||||
|
country: latestProfileEducation.country,
|
||||||
|
duration: latestProfileEducation.duration,
|
||||||
|
durationYear: latestProfileEducation.durationYear,
|
||||||
|
field: latestProfileEducation.field,
|
||||||
|
finishDate: latestProfileEducation.finishDate,
|
||||||
|
fundName: latestProfileEducation.fundName,
|
||||||
|
gpa: latestProfileEducation.gpa,
|
||||||
|
institute: latestProfileEducation.institute,
|
||||||
|
other: latestProfileEducation.other,
|
||||||
|
startDate: latestProfileEducation.startDate,
|
||||||
|
endDate: latestProfileEducation.endDate,
|
||||||
|
educationLevel: latestProfileEducation.educationLevel,
|
||||||
|
positionPath: latestProfileEducation.positionPath,
|
||||||
|
positionPathId: latestProfileEducation.positionPathId,
|
||||||
|
isDate: latestProfileEducation.isDate,
|
||||||
|
isEducation: latestProfileEducation.isEducation,
|
||||||
|
note: latestProfileEducation.note,
|
||||||
|
}
|
||||||
|
: null,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
private employmentHistoryRepository = AppDataSource.getRepository(
|
private employmentHistoryRepository = AppDataSource.getRepository(
|
||||||
ProfileEmployeeEmploymentHistory,
|
ProfileEmployeeEmploymentHistory,
|
||||||
);
|
);
|
||||||
|
private profileEducationRepository = AppDataSource.getRepository(ProfileEducation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* report ประวัติแบบย่อ ลูกจ้าง
|
* report ประวัติแบบย่อ ลูกจ้าง
|
||||||
|
|
@ -1369,7 +1370,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
"posType",
|
"posType",
|
||||||
"posLevel",
|
"posLevel",
|
||||||
"current_holders",
|
"current_holders",
|
||||||
"profileSalary",
|
"profileSalarys",
|
||||||
"current_holders.orgRoot",
|
"current_holders.orgRoot",
|
||||||
"current_holders.orgChild1",
|
"current_holders.orgChild1",
|
||||||
"current_holders.orgChild2",
|
"current_holders.orgChild2",
|
||||||
|
|
@ -1503,6 +1504,11 @@ export class ProfileEmployeeController extends Controller {
|
||||||
(x) => x.orgRevisionId == findRevision.id,
|
(x) => x.orgRevisionId == findRevision.id,
|
||||||
)?.posMasterNo;
|
)?.posMasterNo;
|
||||||
|
|
||||||
|
const latestProfileEducation = await this.profileEducationRepository.findOne({
|
||||||
|
where: { profileEmployeeId: item.id },
|
||||||
|
order: { createdAt: "DESC" },
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
prefix: item.prefix,
|
prefix: item.prefix,
|
||||||
|
|
@ -1514,6 +1520,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
email: item.email,
|
email: item.email,
|
||||||
phone: item.phone,
|
phone: item.phone,
|
||||||
name: fullName,
|
name: fullName,
|
||||||
|
birthDate: item.birthDate,
|
||||||
positionLevel: item.posLevelId,
|
positionLevel: item.posLevelId,
|
||||||
positionLevelName: item.posLevel?.posLevelName,
|
positionLevelName: item.posLevel?.posLevelName,
|
||||||
positionType: item.posTypeId,
|
positionType: item.posTypeId,
|
||||||
|
|
@ -1541,6 +1548,29 @@ export class ProfileEmployeeController extends Controller {
|
||||||
posTypeName: item.posType?.posTypeName,
|
posTypeName: item.posType?.posTypeName,
|
||||||
posLevelId: item.posLevelId,
|
posLevelId: item.posLevelId,
|
||||||
posLevelName: item.posLevel?.posLevelName,
|
posLevelName: item.posLevel?.posLevelName,
|
||||||
|
profileEducation: latestProfileEducation
|
||||||
|
? {
|
||||||
|
id: latestProfileEducation.id,
|
||||||
|
degree: latestProfileEducation.degree,
|
||||||
|
country: latestProfileEducation.country,
|
||||||
|
duration: latestProfileEducation.duration,
|
||||||
|
durationYear: latestProfileEducation.durationYear,
|
||||||
|
field: latestProfileEducation.field,
|
||||||
|
finishDate: latestProfileEducation.finishDate,
|
||||||
|
fundName: latestProfileEducation.fundName,
|
||||||
|
gpa: latestProfileEducation.gpa,
|
||||||
|
institute: latestProfileEducation.institute,
|
||||||
|
other: latestProfileEducation.other,
|
||||||
|
startDate: latestProfileEducation.startDate,
|
||||||
|
endDate: latestProfileEducation.endDate,
|
||||||
|
educationLevel: latestProfileEducation.educationLevel,
|
||||||
|
positionPath: latestProfileEducation.positionPath,
|
||||||
|
positionPathId: latestProfileEducation.positionPathId,
|
||||||
|
isDate: latestProfileEducation.isDate,
|
||||||
|
isEducation: latestProfileEducation.isEducation,
|
||||||
|
note: latestProfileEducation.note,
|
||||||
|
}
|
||||||
|
: null,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue