history kpi
This commit is contained in:
parent
46e23f619c
commit
36de3d9717
5 changed files with 118 additions and 124 deletions
|
|
@ -551,4 +551,22 @@ export class kpiRoleController extends Controller {
|
|||
}
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* API ประวัดิตัวชี้วัดตามตำแหน่ง
|
||||
* @param id Guid, *Id ประวัดิตัวชี้วัดตามตำแหน่ง
|
||||
*/
|
||||
@Get("history/{id}")
|
||||
async GetHistory(@Path() id: string) {
|
||||
const kpiRoleHistory = await this.kpiRoleHistoryRepository.find({
|
||||
where: { kpiRoleId: id },
|
||||
order:{
|
||||
createdAt: "ASC"
|
||||
}
|
||||
});
|
||||
if (!kpiRoleHistory) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประวัดิตัวชี้วัดตามตำแหน่งนี้");
|
||||
}
|
||||
return new HttpSuccess(kpiRoleHistory);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue