API รายละเอียดผังเงินเดือน
This commit is contained in:
parent
ba09c7bac2
commit
f181a19fdf
1 changed files with 39 additions and 4 deletions
|
|
@ -41,8 +41,8 @@ export class Salary extends Controller {
|
|||
@Example(
|
||||
{
|
||||
salaryType: "string", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posType: "string", //*ระดับของตำแหน่ง
|
||||
posLevel: "string", //*ประเภทของตำแหน่ง
|
||||
posTypeId: "string(Guid)", //*ระดับของตำแหน่ง
|
||||
posLevelId: "string(Guid)", //*ประเภทของตำแหน่ง
|
||||
isActive: "boolean", //*สถานะการใช้งาน
|
||||
date: "datetime", //ให้ไว้ ณ วันที่
|
||||
startDate: "datetime", //วันที่มีผลบังคับใช้
|
||||
|
|
@ -113,8 +113,8 @@ export class Salary extends Controller {
|
|||
@Example(
|
||||
{
|
||||
salaryType: "string", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posType: "string", //*ระดับของตำแหน่ง
|
||||
posLevel: "string", //*ประเภทของตำแหน่ง
|
||||
posTypeId: "string(Guid)", //*ระดับของตำแหน่ง
|
||||
posLevelId: "string(Guid)", //*ประเภทของตำแหน่ง
|
||||
isActive: "boolean", //*สถานะการใช้งาน
|
||||
date: "datetime", //ให้ไว้ ณ วันที่
|
||||
startDate: "datetime", //วันที่มีผลบังคับใช้
|
||||
|
|
@ -215,6 +215,41 @@ export class Salary extends Controller {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API รายละเอียดผังเงินเดือน
|
||||
*
|
||||
* @summary SLR_004 - รายละเอียดผังเงินเดือน #4
|
||||
*
|
||||
* @param {string} id Guid, *Id ผังเงินเดือน
|
||||
*/
|
||||
@Get("{id}")
|
||||
@Example(
|
||||
{
|
||||
salaryType: "string", //*ประเภทผัง (OFFICER->"ข้าราชการกรุงเทพมหานครสามัญ",EMPLOYEE->"ลูกจ้างประจำกรุงเทพมหานคร")
|
||||
posTypeId: "string(Guid)", //*ระดับของตำแหน่ง
|
||||
posLevelId: "string(Guid)", //*ประเภทของตำแหน่ง
|
||||
isActive: "boolean", //*สถานะการใช้งาน
|
||||
date: "datetime", //ให้ไว้ ณ วันที่
|
||||
startDate: "datetime", //วันที่มีผลบังคับใช้
|
||||
endDate: "datetime", //วันที่สิ้นสุดบังคับใช้
|
||||
detail: "string", //คำอธิบาย
|
||||
},
|
||||
)
|
||||
async GetSalaryById(@Path() id: string) {
|
||||
try {
|
||||
const salary = await this.salaryRepository.findOne({
|
||||
where: { id: id },
|
||||
select: ["salaryType", "posTypeId", "posLevelId", "isActive", "date", "startDate", "endDate", "details"]
|
||||
});
|
||||
if (!salary) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: "+ id);
|
||||
}
|
||||
return new HttpSuccess(salary);
|
||||
} catch (error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue