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 ? "-"