fix
This commit is contained in:
parent
346d161083
commit
022d88068b
1 changed files with 30 additions and 0 deletions
|
|
@ -347,6 +347,28 @@ export class EvaluationController {
|
|||
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API get template ประกาศคัดเลือก
|
||||
*
|
||||
* @summary get template ประกาศคัดเลือก (ADMIN)
|
||||
*
|
||||
* @param {string} id id ข้อมูลการประเมิน
|
||||
*/
|
||||
@Get("get-announce-template/{id}")
|
||||
async getAnnounceTemp(@Path() id: string, @Request() request: RequestWithUser) {
|
||||
try {
|
||||
const evaluation = await this.evaluationRepository.findOne({ where: { id } , select: ["id","detailAnnounceStep5Body","detailAnnounceStep5Footer"]});
|
||||
if (!evaluation) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลการประเมิน");
|
||||
}
|
||||
return new HttpSuccess(evaluation);
|
||||
} catch (error: any) {
|
||||
if (error instanceof HttpError) {
|
||||
throw error;
|
||||
} else throw new HttpError(HttpStatusCode.INTERNAL_SERVER_ERROR, error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ดึงข้อมูลรายละเอียด step การขอประเมิน
|
||||
|
|
@ -1768,6 +1790,14 @@ export class EvaluationController {
|
|||
await this.evaluationRepository.save(evaluation, { data: request });
|
||||
setLogDataDiff(request, { before, after: evaluation });
|
||||
|
||||
// const _director = await new CallAPI()
|
||||
// .PostData(request, "/org/workflow/find/director/SYS_EVA_REQ", {
|
||||
// refId: [evaluation.userId],
|
||||
// })
|
||||
// .then((x) => {})
|
||||
// .catch((x) => {});
|
||||
// console.log("_director>>",_director);
|
||||
|
||||
await new CallAPI()
|
||||
.PostData(request, "/placement/noti/keycloak", {
|
||||
subject: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue