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();