This commit is contained in:
2026-04-17 14:17:58 +07:00
parent 879d694615
commit 9d83476f9e

View File

@ -74,6 +74,7 @@ export class InpatientRoomController {
const res_count = query;
const res_list = query
.leftJoinAndSelect("InpatientRoom.room", "room")
.orderBy("InpatientRoom." + param.order_field, param.order_direction)
.offset(offset)
.limit(limit);
@ -165,7 +166,11 @@ export class InpatientRoomController {
let param: any = await schema.validateAsync(req.params);
let data = await InpatientRoomModel.list({ id: param.id }).then((q) => q.getOne());
let data = await InpatientRoomModel.list({ id: param.id }).then((q) =>
q //
.leftJoinAndSelect("InpatientRoom.room", "room")
.getOne(),
);
if (!data) throw { message: "Inpatient Room " + Language.lang.failed_not_found };