diff --git a/src/controllers/EvaluationController.ts b/src/controllers/EvaluationController.ts index c2d078f..ba9c270 100644 --- a/src/controllers/EvaluationController.ts +++ b/src/controllers/EvaluationController.ts @@ -508,9 +508,10 @@ export class EvaluationController { if (!evaluation) { return `not found data`; } + let _code = requestBody.type == "EXPERT" ? "ST05-1" : requestBody.type == "EXPERTISE" ? "ST05-1" : requestBody.type == "SPECIAL_EXPERT" ? "ST05-2" : "ST05-1"; const announceTemplate5 = await this.announceTemplateRepository.findOne({ where:{ - code : "ST05-1" + code : _code }, select: ["detailBody","detailFooter"] }) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index d0cbcff..287e9af 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -319,6 +319,8 @@ export class ReoportController { currentYear: Extension.ToThaiNumber(thaiYear.toString()), }; let _orgNoNewLine = (org ? org : "-").replace(/\n/g, " "); + let topic10 = evaluation.type == "EXPERT" || evaluation.type == "EXPERTISE" ? "หน่วยงาน" : evaluation.type == "SPECIAL_EXPERT" ? "กรุงเทพมหานคร" : "หน่วยงาน"; + let footer10 = evaluation.type == "EXPERT" || evaluation.type == "EXPERTISE" ? "หัวหน้าหน่วยงาน" : evaluation.type == "SPECIAL_EXPERT" ? "ปลัดกรุงเทพมหานคร" : "หัวหน้าหน่วยงาน"; let typeTh = evaluation.type == "EXPERT" ? "ชำนาญการ" : evaluation.type == "EXPERTISE" ? "เชียวชาญ" : evaluation.type == "SPECIAL_EXPERT" ? "ชำนาญการพิเศษ":""; const dataEvaluation = { isEducationalQft: evaluation.isEducationalQft, @@ -349,6 +351,8 @@ export class ReoportController { positionAreaWithSym: evaluation.positionArea?`(${Extension.ToThaiNumber(evaluation.positionArea)})` : "", posExecutive: evaluation.posExecutive, posFull: (evaluation.position ? `${evaluation.position}` : "") + (evaluation.positionLevel ? `${evaluation.positionLevel}` : "") + (evaluation.posExecutive ? " " + `${evaluation.posExecutive}` : "") , + topic10: topic10, + footer10: footer10, birthDate: evaluation.birthDate != null && evaluation.birthDate != "" ? Extension.ToThaiNumber(