This commit is contained in:
AdisakKanthawilang 2025-04-22 16:11:45 +07:00
parent 022d88068b
commit 536572d0e7

View file

@ -1790,19 +1790,22 @@ 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);
let _director: any;
await new CallAPI()
.PostData(request, "/org/workflow/find/director-with-keycloak/SYS_EVA_REQ", {
refId: [evaluation.userId],
})
.then((x) => {
_director = x;
})
.catch((x) => {});
await new CallAPI()
.PostData(request, "/placement/noti/keycloak", {
subject: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
body: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
receiverUserId: "59134ef9-9e62-41d0-aac5-339be727f2b0",
receiverUserId: _director.id,
payload: "",
isSendMail: true,
isSendInbox: true,
@ -1810,6 +1813,7 @@ export class EvaluationController {
})
.then((x) => {})
.catch((x) => {});
return new HttpSuccess();
} catch (error: any) {
if (error instanceof HttpError) {
@ -2837,6 +2841,7 @@ export class EvaluationController {
"commanderAbovePositionDoc2",
"commanderAbovePositionOldDoc2",
"evaluationResult",
"isUpdated",
],
});
if (!evaluation) {
@ -2880,6 +2885,7 @@ export class EvaluationController {
"commanderAbovePositionDoc2",
"commanderAbovePositionOldDoc2",
"evaluationResult",
"isUpdated",
],
});
if (!evaluation) {