This commit is contained in:
AdisakKanthawilang 2025-04-24 11:51:31 +07:00
parent 25fc86c8a8
commit eb7eddabf6

View file

@ -190,6 +190,16 @@ export class ReoportController {
"evaluation.detailAnnounceStep5Footer",
"evaluation.positionArea",
"evaluation.posExecutive",
"evaluation.commanderFullname",
"evaluation.commanderPosition",
"evaluation.commanderPositionOld",
"evaluation.commanderOrg",
"evaluation.commanderOrgOld",
"evaluation.commanderAboveFullname",
"evaluation.commanderAbovePosition",
"evaluation.commanderAbovePositionOld",
"evaluation.commanderAboveOrg",
"evaluation.commanderAboveOrgOld",
"education.educationLevel",
"education.institute",
@ -290,34 +300,9 @@ export class ReoportController {
let dateStart: any;
let dateRetireLaw: any;
let org: any;
let commanderFullname: any;
let commanderPosition: any;
let commanderRootName: any;
let commanderOrg: any;
let commanderAboveFullname: any;
let commanderAbovePosition: any;
let commanderAboveRootName: any;
let commanderAboveOrg: any;
if (!evaluation.userId) {
return "ไม่พบข้อมูลผู้ขอประเมิน";
}
await new CallAPI()
.GetData(request, `/org/profile/keycloak/commander/${evaluation.userId}`)
.then(async (x) => {
(root = x.root),
(dateStart = x.dateStart),
(dateRetireLaw = x.dateRetireLaw),
(org = x.org),
(commanderFullname = x.commanderFullname),
(commanderPosition = x.commanderPosition),
(commanderRootName = x.commanderRootName),
(commanderOrg = x.commanderOrg),
(commanderAboveFullname = x.commanderAboveFullname),
(commanderAbovePosition = x.commanderAbovePosition),
(commanderAboveRootName = x.commanderAboveRootName),
(commanderAboveOrg = x.commanderAboveOrg);
})
.catch();
const evaluationOld = await this.evaluationRepository.find({
where: {
id: Not(id),
@ -519,15 +504,22 @@ export class ReoportController {
subject: performance.subject,
evaluationResult: performance.evaluationResult,
})),
commanderFullname: commanderFullname ? commanderFullname : "-",
commanderPosition: commanderPosition ? commanderPosition : "-",
commanderRootName: commanderRootName ? commanderRootName : "-",
commanderOrg: commanderOrg ? commanderOrg : "-",
commanderAboveFullname: commanderAboveFullname ? commanderAboveFullname : "-",
commanderAbovePosition: commanderAbovePosition ? commanderAbovePosition : "-",
commanderAboveRootName: commanderAboveRootName ? commanderAboveRootName : "-",
commanderAboveOrg: commanderAboveOrg ? commanderAboveOrg : "-",
// commanderPositionSign: `${commanderPosition} สำนักงานการเจ้าหน้าที่ ${commanderRootName}` + `\n` + `${commanderAbovePosition} ${commanderAboveRootName}`,
commanderFullname: evaluation.commanderFullname ? evaluation.commanderFullname : "-",
commanderPosition: evaluation.commanderPosition ? evaluation.commanderPosition : "-",
commanderPositionOld: evaluation.commanderPositionOld ? evaluation.commanderPositionOld : "-",
commanderRootName: "-",
commanderOrg: evaluation.commanderOrg ? evaluation.commanderOrg : "-",
commanderOrgOld: evaluation.commanderOrg ? evaluation.commanderOrg : "-",
commanderAboveFullname: evaluation.commanderAboveFullname ? evaluation.commanderAboveFullname : "-",
commanderAbovePosition: evaluation.commanderAbovePosition ? evaluation.commanderAbovePosition : "-",
commanderAbovePositionOld: evaluation.commanderAbovePositionOld ? evaluation.commanderAbovePositionOld : "-",
commanderAboveRootName: "-",
commanderAboveOrg: evaluation.commanderAboveOrg ? evaluation.commanderAboveOrg : "-",
commanderAboveOrgOld: evaluation.commanderAboveOrgOld ? evaluation.commanderAboveOrgOld : "-",
commanderPositionSign: (evaluation.commanderPosition ? evaluation.commanderPosition : "") + (evaluation.commanderOrg ? " " + evaluation.commanderOrg : "")
+ (evaluation.commanderPosition || evaluation.commanderOrg ? `\n` + "ขณะดำรงตำแหน่ง" : "") + (evaluation.commanderPositionOld ? " " + evaluation.commanderPositionOld:"") + (evaluation.commanderOrgOld ? " " + evaluation.commanderOrgOld : ""),
commanderAbovePositionSign: (evaluation.commanderAbovePosition ? evaluation.commanderAbovePosition : "") + (evaluation.commanderAboveOrg ? " " + evaluation.commanderAboveOrg : "")
+ (evaluation.commanderAbovePosition || evaluation.commanderAboveOrg ? `\n` + "ขณะดำรงตำแหน่ง" : "") + (evaluation.commanderAbovePositionOld ? " " + evaluation.commanderAbovePositionOld: "") + (evaluation.commanderAboveOrgOld ? " " + evaluation.commanderAboveOrgOld : ""),
years: years,
};