From c43eeb9066086fa2beb0ce50337e01e0ce12d844 Mon Sep 17 00:00:00 2001 From: Bright Date: Mon, 7 Oct 2024 12:34:04 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B8=94=E0=B9=8C=20=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=A5=E0=B8=87?= =?UTF-8?q?=E0=B8=99=E0=B8=B2=E0=B8=A1,=20=E0=B8=A7=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B8=A1=E0=B8=B5=E0=B8=9C=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index b34fa2df..842aff50 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -1021,6 +1021,8 @@ export class CommandController extends Controller { commandNo?: string | null; commandYear?: number | null; commandId?: string | null; + commandAffectDate?: Date | null; + commandExcecuteDate?: Date | null; persons: { refId: string; citizenId: string; @@ -1033,6 +1035,7 @@ export class CommandController extends Controller { ) { let command = new Command(); let commandCode = null; + let null_:any = null if ( requestBody.commandId != undefined && requestBody.commandId != null && @@ -1071,6 +1074,12 @@ export class CommandController extends Controller { command.isAttachment = commandType.isAttachment; command.status = "NEW"; command.issue = commandType.name; + command.commandAffectDate = requestBody.commandAffectDate + ? new Date(requestBody.commandAffectDate) + : null_, + command.commandExcecuteDate = requestBody.commandExcecuteDate + ? new Date(requestBody.commandExcecuteDate) + : null_, command.createdUserId = request.user.sub; command.createdFullName = request.user.name; command.createdAt = new Date();