From 288bdb2dff535f036f8db909f3621cc78ef63564 Mon Sep 17 00:00:00 2001 From: Bright Date: Mon, 10 Jun 2024 10:43:19 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9?= =?UTF-8?q?=E0=B8=A5=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=87=E0=B8=8A=E0=B8=B1=E0=B9=88=E0=B8=A7=E0=B8=84=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A7=20ById?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileEmployeeController.ts | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index b716b39a..d5367569 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2541,6 +2541,36 @@ export class ProfileEmployeeController extends Controller { return new HttpSuccess(); } + /** + * API ข้อมูลลูกจ้างชั่วคราว + * + * @summary ข้อมูลลูกจ้างชั่วคราว (ADMIN) + * + * @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว + */ + @Get("information/{profileEmployeeId}") + async getInformationById(@Path() profileEmployeeId: string) { + const profileInformation = await this.profileRepo.findOne({ + where: { id: profileEmployeeId } + }); + if (!profileInformation) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + + const mapData = { + id: profileInformation.id, + positionEmployeeGroupId: profileInformation.positionEmployeeGroupId, + positionEmployeeLineId: profileInformation.positionEmployeeLineId, + positionEmployeePositionId: profileInformation.positionEmployeePositionId, + employeeOc: profileInformation.employeeOc, + employeeTypeIndividual: profileInformation.employeeTypeIndividual, + employeeWage: profileInformation.employeeWage, + employeeMoneyIncrease: profileInformation.employeeMoneyIncrease, + employeeMoneyAllowance: profileInformation.employeeMoneyAllowance, + employeeMoneyEmployee: profileInformation.employeeMoneyEmployee, + employeeMoneyEmployer: profileInformation.employeeMoneyEmployer, + }; + return new HttpSuccess(mapData); + } + /** * API ประวัติการแก้ไขข้อมูลลูกจ้างชั่วคราว *