From 999e77582e9993ee3d5c93e0d1152eb34e9a9043 Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 4 Nov 2024 17:12:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AB=E0=B8=A1=E0=B8=B2=E0=B8=A2=E0=B9=80?= =?UTF-8?q?=E0=B8=AB=E0=B8=95=E0=B8=B8=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 092a886f..4bf6736e 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -1389,10 +1389,10 @@ export class CommandController extends Controller { where: { id }, relations: ["commandSigns"], order: { - commandSigns:{ - createdAt: "ASC" - } - }, + commandSigns: { + createdAt: "ASC", + }, + }, }); if (!command) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้"); @@ -1488,8 +1488,8 @@ export class CommandController extends Controller { commandSign.lastUpdateFullName = request.user.name; commandSign.lastUpdatedAt = new Date(); await this.commandSignRepository.save(commandSign); - if(commandSign.isSignatory == true) - await this.PutSelectPending(commandSign.commandId, { sign: true }, request); + if (commandSign.isSignatory == true) + await this.PutSelectPending(commandSign.commandId, { sign: true }, request); return new HttpSuccess(); } @@ -1517,6 +1517,8 @@ export class CommandController extends Controller { prefix: string | null; firstName: string | null; lastName: string | null; + remarkVertical?: string | null; + remarkHorizontal?: string | null; }[]; }, @Request() request: RequestWithUser, @@ -1601,6 +1603,14 @@ export class CommandController extends Controller { let commandRecive = new CommandRecive(); commandRecive = Object.assign(new CommandRecive(), item); commandRecive.order = order; + // commandRecive.amount = "xxxxxxxxxx"; + // commandRecive.positionSalaryAmount = "xxxxxxxxxx"; + // commandRecive.mouthSalaryAmount = "xxxxxxxxxx"; + commandRecive.remarkVertical = + item.remarkVertical == null ? null_ : item.remarkVertical; + commandRecive.remarkHorizontal = + item.remarkHorizontal == null ? null_ : item.remarkHorizontal; + commandRecive.order = order; commandRecive.commandId = command.id; commandRecive.createdUserId = request.user.sub; commandRecive.createdFullName = request.user.name;