From a9273a4cd15bf63dd8f7a2ed354bf85e2aa62161 Mon Sep 17 00:00:00 2001 From: "DESKTOP-2S5P7D1\\Windows 10" Date: Mon, 4 Nov 2024 16:10:37 +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=B9=80=E0=B8=A5=E0=B8=82=E0=B8=97=E0=B8=B5=E0=B9=88=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/ReportController.ts | 1 + src/interfaces/http-success.ts | 30 ++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 620f8b1..84ee7e7 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -1238,6 +1238,7 @@ export class ReportController extends Controller { await Promise.all( lists.map(async list => { list.status = "DONE" + list.commandNo = `${body?.refIds[0]?.commandNo || ""}/${body.refIds[0].commandYear + 543}` await this.appointRepository.save(list) }) ) diff --git a/src/interfaces/http-success.ts b/src/interfaces/http-success.ts index d2f282b..e6a53a2 100644 --- a/src/interfaces/http-success.ts +++ b/src/interfaces/http-success.ts @@ -1,19 +1,19 @@ -import { RequestWithUser } from "../middlewares/user"; -import HttpStatus from "./http-status"; -import { addLogSequence } from "./utils"; +import { RequestWithUser } from "../middlewares/user" +import HttpStatus from "./http-status" +import { addLogSequence } from "./utils" class HttpSuccess { - /** - * HTTP Status Code - */ - status: HttpStatus; - message: string; - data?: any; + /** + * HTTP Status Code + */ + status: HttpStatus + message: string + result?: any - constructor(data?: any) { - this.status = HttpStatus.OK; - this.message = "สำเร็จ"; - this.data = data; - } + constructor(result?: any) { + this.status = HttpStatus.OK + this.message = "สำเร็จ" + this.result = result + } } -export default HttpSuccess; +export default HttpSuccess