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