Merge branch 'develop' into feat/org-move-draf-current

* develop:
  add fields
This commit is contained in:
Warunee Tamkoo 2026-02-09 17:46:37 +07:00
commit 1cab2b3afc

View file

@ -519,6 +519,7 @@ export class CommandController extends Controller {
commandTypeName: command.commandType?.name || null,
commandCode: command.commandType?.code || null,
commandSysId: command.commandType?.commandSysId || null,
createdUserId: command.createdUserId
};
return new HttpSuccess(_command);
}
@ -2310,6 +2311,19 @@ export class CommandController extends Controller {
}
}
if (issue == null) issue = "...................................";
const operators = await this.commandOperatorRepository.find({
select: {
prefix: true,
firstName: true,
lastName: true,
roleName: true,
orderNo: true
},
where: { commandId: command.id },
order: { orderNo: "ASC" },
});
return new HttpSuccess({
template: command.commandType.fileAttachment,
reportName: "xlsx-report",
@ -2325,6 +2339,15 @@ export class CommandController extends Controller {
command.commandExcecuteDate == null
? ""
: Extension.ToThaiNumber(Extension.ToThaiFullDate2(command.commandExcecuteDate)),
operators: operators.length > 0
? operators.map(x => ({
fullName: `${x.prefix ?? ""}${x.firstName ?? ""} ${x.lastName ?? ""}`,
roleName: x.roleName
}))
: [{
fullName: "",
roleName: "เจ้าหน้าที่ดำเนินการ"
}]
},
});
}