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