add admin path
This commit is contained in:
parent
24f1e2cc49
commit
3a033ddc9b
1 changed files with 51 additions and 0 deletions
|
|
@ -1309,6 +1309,57 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API รายละเอียดรายการประเมินผลการปฏิบัติราชการระดับบุคคล (ADMIN)
|
||||||
|
*
|
||||||
|
* @summary รายละเอียดรายการประเมินผลการปฏิบัติราชการระดับบุคคล (ADMIN)
|
||||||
|
*
|
||||||
|
* @param {string} id Guid, *Id รายการประเมินผลการปฏิบัติราชการระดับบุคคล (ADMIN)
|
||||||
|
*/
|
||||||
|
@Get("admin/{id}")
|
||||||
|
async GetKpiAdminEvaluationById(@Path() id: string, @Request() req: RequestWithUser) {
|
||||||
|
await new permission().PermissionGet(req, "SYS_KPI_LIST");
|
||||||
|
const kpiUserEvaluation = await this.kpiUserEvalutionRepository.findOne({
|
||||||
|
relations: ["kpiPeriod"],
|
||||||
|
where: { id: id },
|
||||||
|
});
|
||||||
|
if (!kpiUserEvaluation) {
|
||||||
|
throw new HttpError(
|
||||||
|
HttpStatusCode.NOT_FOUND,
|
||||||
|
"ไม่พบข้อมูลรายการประเมินผลการปฏิบัติราชการระดับบุคคลนี้",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const mapData = {
|
||||||
|
id: kpiUserEvaluation.id,
|
||||||
|
profileId: kpiUserEvaluation.profileId,
|
||||||
|
prefix: kpiUserEvaluation.prefix,
|
||||||
|
firstName: kpiUserEvaluation.firstName,
|
||||||
|
lastName: kpiUserEvaluation.lastName,
|
||||||
|
position: kpiUserEvaluation.position,
|
||||||
|
posLevelName: kpiUserEvaluation.posLevelName,
|
||||||
|
posTypeName: kpiUserEvaluation.posTypeName,
|
||||||
|
posExecutiveName: kpiUserEvaluation.posExecutiveName,
|
||||||
|
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||||
|
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||||
|
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||||
|
createdAt: kpiUserEvaluation.createdAt,
|
||||||
|
evaluatorId: kpiUserEvaluation.evaluatorId,
|
||||||
|
commanderId: kpiUserEvaluation.commanderId,
|
||||||
|
commanderHighId: kpiUserEvaluation.commanderHighId,
|
||||||
|
kpiPeriodId: kpiUserEvaluation.kpiPeriodId,
|
||||||
|
totalPoint1: kpiUserEvaluation.totalPoint1,
|
||||||
|
totalPoint2_1: kpiUserEvaluation.totalPoint2_1,
|
||||||
|
totalPoint2_2: kpiUserEvaluation.totalPoint2_2,
|
||||||
|
summaryPoint: kpiUserEvaluation.summaryPoint,
|
||||||
|
isOpen: kpiUserEvaluation.isOpen,
|
||||||
|
openDate: kpiUserEvaluation.openDate,
|
||||||
|
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
||||||
|
durationKPI:
|
||||||
|
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||||
|
};
|
||||||
|
return new HttpSuccess(mapData);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue