From dff7d7ef3a9a7f59dbdc76362d63a3dd6c3ed965 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 4 Feb 2025 17:18:22 +0700 Subject: [PATCH] =?UTF-8?q?fix=20SIT=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B8=A3=E0=B8=A3=E0=B8=88=E0=B8=B8=20=E0=B9=81?= =?UTF-8?q?=E0=B8=95=E0=B9=88=E0=B8=87=E0=B8=95=E0=B8=B1=E0=B9=89=E0=B8=87?= =?UTF-8?q?=20=E0=B8=A2=E0=B9=89=E0=B8=B2=E0=B8=A2=20=E0=B9=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=99>>=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2?= =?UTF-8?q?=E0=B8=99=E0=B8=88=E0=B8=B3=E0=B8=99=E0=B8=A7=E0=B8=99=E0=B8=A5?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=88=E0=B8=B3=20=E0=B8=81=E0=B8=97?= =?UTF-8?q?=E0=B8=A1.=20=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B9=84=E0=B8=94?= =?UTF-8?q?=E0=B9=89=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=20=E0=B9=81=E0=B8=95?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B8=95=E0=B8=B1=E0=B9=89=E0=B8=87=E0=B9=81?= =?UTF-8?q?=E0=B8=A5=E0=B8=B0=E0=B8=A2=E0=B9=89=E0=B8=B2=E0=B8=A2=20(?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B9=84?= =?UTF-8?q?=E0=B8=A1=E0=B9=88=E0=B8=96=E0=B8=B9=E0=B8=81=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B8=A5=E0=B8=87=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99)=20#1085?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index cb8d16da..477e886e 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -4686,6 +4686,7 @@ export class CommandController extends Controller { }[]; }, ) { + let _reqBody: any[] = []; const roleKeycloak = await this.roleKeycloakRepo.findOne({ where: { name: Like("USER") }, }); @@ -4854,13 +4855,28 @@ export class CommandController extends Controller { profile.dateAppoint = new Date(); profile.amount = item.amount == null ? _null : item.amount; profile.amountSpecial = item.amountSpecial == null ? _null : item.amountSpecial; - + _reqBody.push({ + profileId: profile.id, + prefix: profile.prefix, + firstName: profile.firstName, + lastName: profile.lastName, + citizenId: profile.citizenId, + root: posMaster.orgRoot.orgRootName, + rootId: posMaster.orgRootId, + rootShortName: posMaster.orgRoot.orgRootShortName + }); await this.profileEmployeeRepository.save(profile); await this.employeePositionRepository.save(positionNew); } }), ); - + await new CallAPI() + .PostData(req, + "/placement/appointment/employee-appoint-21/report/excecute", { profileEmps: _reqBody } + ) + .catch((error) => { + throw new Error("Failed. Cannot update status. ", error); + }); return new HttpSuccess(); }