From 58ea6f67c140066c20eb368cd68d1218055f5b04 Mon Sep 17 00:00:00 2001 From: Bright Date: Mon, 28 Oct 2024 14:46:55 +0700 Subject: [PATCH] =?UTF-8?q?fix=20#699=20=E0=B9=81=E0=B8=99=E0=B8=9A?= =?UTF-8?q?=E0=B8=97=E0=B9=89=E0=B8=B2=E0=B8=A2=E0=B9=84=E0=B8=A1=E0=B9=88?= =?UTF-8?q?=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 29 ++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index c507e3a9..3da10d53 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -2830,7 +2830,20 @@ export class CommandController extends Controller { @Request() req: RequestWithUser, @Body() body: { - refIds: string[]; + refIds: { + refId?: string; + Sequence?: number; + CitizenId?: string; + Prefix?: string; + FirstName?: string; + LastName?: string; + Amount?: number; + PositionSalaryAmount?: number; + MouthSalaryAmount?: number; + RemarkHorizontal?: string; + RemarkVertical?: string; + CommandYear?: number; + }[]; }, ) { let data: any = []; @@ -2857,7 +2870,7 @@ export class CommandController extends Controller { "posMasterChild.current_holder.posType", ], where: { - id: item, + id: item.refId, }, }); if (!posMasterAct) { @@ -2893,13 +2906,13 @@ export class CommandController extends Controller { "" + posMasterAct.posMasterChild?.current_holder?.firstName ?? "" + " " + posMasterAct.posMasterChild?.current_holder?.lastName ?? null, - oc: (posMasterAct.posMasterChild?.current_holder?.position ?? null) + "/" + _organization, - postype: posMasterAct.posMasterChild?.current_holder?.posType?.posTypeName ?? null, - poslevel: posMasterAct.posMasterChild?.current_holder?.posLevel?.posLevelName ?? null, - organizationNew: _organizationNew, + oc: (posMasterAct.posMasterChild?.current_holder?.position ?? "-") + "/" + (_organization ?? "-"), + postype: posMasterAct.posMasterChild?.current_holder?.posType?.posTypeName ?? "-", + poslevel: posMasterAct.posMasterChild?.current_holder?.posLevel?.posLevelName ?? "-", + organizationNew: _organizationNew ?? "-", // date: Extension.ToThaiShortDate_noPrefix(new Date()), - dateStart: "", - dateEnd: "", + dateStart: "-", + dateEnd: "-", order: posMasterAct.posMasterOrder == null ? "-"