เพิ่ม body คำสั่ง10

This commit is contained in:
Bright 2024-11-01 15:50:52 +07:00
parent 70ef98707a
commit 30df664aa7

View file

@ -100,7 +100,7 @@ export class CommandTypeController extends Controller {
*/
@Get("{id}")
async GetById(@Path() id: string) {
const _commandType = await this.commandTypeRepository.findOne({
let _commandType = await this.commandTypeRepository.findOne({
where: { id },
select: [
"id",
@ -120,6 +120,28 @@ export class CommandTypeController extends Controller {
if (!_commandType) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
}
if(_commandType.code == "C-PM-10") {
let _commandType10: any
_commandType10 = {
id: _commandType.id,
name: _commandType.name,
commandSysId: _commandType.commandSysId,
code: _commandType.code,
fileCover: _commandType.fileCover,
fileAttachment: _commandType.fileAttachment,
isActive: _commandType.isActive,
detailHeader: _commandType.detailHeader,
detailBody: _commandType.detailBody,
detailFooter: _commandType.detailFooter,
subtitle: _commandType.subtitle,
isAttachment: _commandType.isAttachment,
name1: "..........................ประธาน",
name2: "..........................ผู้บังคับบัญชา",
name3: "..........................ผู้ดูแล",
name4: "..........................ผู้ดูแล",
}
_commandType = _commandType10;
}
return new HttpSuccess(_commandType);
}