เพิ่มเลขที่คำสั่ง

This commit is contained in:
DESKTOP-2S5P7D1\Windows 10 2024-11-04 16:10:37 +07:00
parent 114a27c5e6
commit a9273a4cd1
2 changed files with 16 additions and 15 deletions

View file

@ -1238,6 +1238,7 @@ export class ReportController extends Controller {
await Promise.all( await Promise.all(
lists.map(async list => { lists.map(async list => {
list.status = "DONE" list.status = "DONE"
list.commandNo = `${body?.refIds[0]?.commandNo || ""}/${body.refIds[0].commandYear + 543}`
await this.appointRepository.save(list) await this.appointRepository.save(list)
}) })
) )

View file

@ -1,19 +1,19 @@
import { RequestWithUser } from "../middlewares/user"; import { RequestWithUser } from "../middlewares/user"
import HttpStatus from "./http-status"; import HttpStatus from "./http-status"
import { addLogSequence } from "./utils"; import { addLogSequence } from "./utils"
class HttpSuccess { class HttpSuccess {
/** /**
* HTTP Status Code * HTTP Status Code
*/ */
status: HttpStatus; status: HttpStatus
message: string; message: string
data?: any; result?: any
constructor(data?: any) { constructor(result?: any) {
this.status = HttpStatus.OK; this.status = HttpStatus.OK
this.message = "สำเร็จ"; this.message = "สำเร็จ"
this.data = data; this.result = result
} }
} }
export default HttpSuccess; export default HttpSuccess