fix #699 แนบท้ายไม่แสดง

This commit is contained in:
Bright 2024-10-28 14:46:55 +07:00
parent 5e361e375b
commit 58ea6f67c1

View file

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