From bbd8c1c0e9d3a976c26c4094d5a06aa041c30162 Mon Sep 17 00:00:00 2001 From: Bright Date: Thu, 23 May 2024 10:08:41 +0700 Subject: [PATCH 1/2] =?UTF-8?q?report=20=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B9=81=E0=B8=9A=E0=B8=9A?= =?UTF-8?q?=E0=B8=A2=E0=B9=88=E0=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileController.ts | 112 ++++++++++++++++++- src/controllers/ProfileEmployeeController.ts | 107 ++++++++++++++++++ 2 files changed, 216 insertions(+), 3 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 4fb2a65e..c0873efc 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -40,6 +40,9 @@ import { import { RequestWithUser } from "../middlewares/user"; import { Position } from "../entities/Position"; import { ProfileEmployee } from "../entities/ProfileEmployee"; +import { Province } from "../entities/Province"; +import { District } from "../entities/District"; +import { SubDistrict } from "../entities/SubDistrict"; @Route("api/v1/org/profile") @Tags("Profile") @@ -57,8 +60,110 @@ export class ProfileController extends Controller { private profileHistoryRepo = AppDataSource.getRepository(ProfileHistory); private posLevelRepo = AppDataSource.getRepository(PosLevel); private posTypeRepo = AppDataSource.getRepository(PosType); - private orgRevisionRepository = AppDataSource.getRepository(OrgRevision); private positionRepository = AppDataSource.getRepository(Position); + private provinceRepository = AppDataSource.getRepository(Province); + private districtRepository = AppDataSource.getRepository(District); + private subDistrict = AppDataSource.getRepository(SubDistrict); + + /** + * report ประวัติแบบย่อ ข้าราชการ + * + * @summary report ประวัติแบบย่อ ข้าราชการ + * + * @param {string} id Id โปรไฟล์ + */ + @Get("kp7-short/{id}") + async kp7ShortById(@Path() id: string) { + const orgRevision = await this.orgRevisionRepo.findOne({ + where: { orgRevisionIsCurrent: true }, + }); + + const profile = await this.profileRepo.findOne({ + relations: [ + "profileSalary", + "profileEducations", + "current_holders", + "current_holders.orgRoot", + "current_holders.orgChild1", + "current_holders.orgChild2", + "current_holders.orgChild3", + "current_holders.orgChild4" + ], + where: { id: id, }, + }); + if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + + const province = await this.provinceRepository.findOneBy({ id: profile.registrationProvinceId }) + const district = await this.districtRepository.findOneBy({ id: profile.registrationDistrictId }) + const subDistrict = await this.subDistrict.findOneBy({ id: profile.registrationSubDistrictId }) + + const root = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgRoot; + + const child1 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild1; + + const child2 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild2; + + const child3 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild3; + + const child4 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild4; + + let _root = root == null || root == undefined ? "" : `${root.orgRootName}`; + let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`; + let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`; + let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`; + let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`; + + const mapData = { + Id: profile.id, + CitizenId: profile.citizenId, + Prefix: profile.prefix, + FirstName: profile.firstName, + LastName: profile.lastName, + DateOfBirth: profile.birthDate, + DateRetire: profile.dateRetire, + RegistrationAddress: `${profile.registrationAddress}\r\nตำบล/แขวง ${province?.name}\r\nเขต/อำเภอ ${district?.name}\r\nจังหวัด ${subDistrict?.name} รหัสไปรษณีย์ ${profile.registrationZipCode}`, + SalaryAmount: profile.profileSalary.length > 0 + ? profile.profileSalary[0].amount + : null, + Education: profile.profileEducations.length > 0 + ? profile.profileEducations[profile.profileEducations.length-1].institute + : null, + AppointText: profile.dateAppoint, + SalaryDate: profile.profileSalary.length > 0 + ? profile.profileSalary[0].date + : null, + PositionName: profile.position, + OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`, + } + + return new HttpSuccess(mapData); + + } /** * @@ -572,7 +677,7 @@ export class ProfileController extends Controller { .skip((page - 1) * pageSize) .take(pageSize) .getManyAndCount(); - const findRevision = await this.orgRevisionRepository.findOne({ + const findRevision = await this.orgRevisionRepo.findOne({ where: { orgRevisionIsCurrent: true }, }); if (!findRevision) { @@ -1139,6 +1244,7 @@ export class ProfileController extends Controller { * * @summary ORG_065 - ข้อมูลทะเบียนประวัติตาม citizenId (ADMIN) #70 * + * @param id หมายเลขประจำตัวประชาชน (citizenId) */ @Get("citizenid/position/{id}") async getProfileByCitizenId( @@ -1685,7 +1791,7 @@ export class ProfileController extends Controller { const orgRevisionActive = await this.orgRevisionRepo.findOne({ where: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false }, }); - const findRevision = await this.orgRevisionRepository.findOne({ + const findRevision = await this.orgRevisionRepo.findOne({ where: { orgRevisionIsCurrent: true }, }); if (!findRevision) { diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 2498e0ee..ce1b30ae 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -31,6 +31,10 @@ import { import { EmployeePosLevel } from "../entities/EmployeePosLevel"; import { EmployeePosType } from "../entities/EmployeePosType"; import { RequestWithUser } from "../middlewares/user"; +import { Position } from "../entities/Position"; +import { Province } from "../entities/Province"; +import { District } from "../entities/District"; +import { SubDistrict } from "../entities/SubDistrict"; @Route("api/v1/org/profile-employee") @Tags("ProfileEmployee") @@ -47,6 +51,109 @@ export class ProfileEmployeeController extends Controller { private profileHistoryRepo = AppDataSource.getRepository(ProfileEmployeeHistory); private posLevelRepo = AppDataSource.getRepository(EmployeePosLevel); private posTypeRepo = AppDataSource.getRepository(EmployeePosType); + private provinceRepository = AppDataSource.getRepository(Province); + private districtRepository = AppDataSource.getRepository(District); + private subDistrict = AppDataSource.getRepository(SubDistrict); + + /** + * report ประวัติแบบย่อ ลูกจ้าง + * + * @summary report ประวัติแบบย่อ ลูกจ้าง + * + * @param {string} id Id โปรไฟล์ + */ + @Get("kp7-short/{id}") + async kp7ShortById(@Path() id: string) { + const orgRevision = await this.orgRevisionRepo.findOne({ + where: { orgRevisionIsCurrent: true }, + }); + + const profile = await this.profileRepo.findOne({ + relations: [ + "profileSalarys", + "profileEducations", + "current_holders", + "current_holders.orgRoot", + "current_holders.orgChild1", + "current_holders.orgChild2", + "current_holders.orgChild3", + "current_holders.orgChild4" + ], + where: { id: id, }, + }); + if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + + const province = await this.provinceRepository.findOneBy({ id: profile.registrationProvinceId }) + const district = await this.districtRepository.findOneBy({ id: profile.registrationDistrictId }) + const subDistrict = await this.subDistrict.findOneBy({ id: profile.registrationSubDistrictId }) + + const root = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgRoot; + + const child1 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild1; + + const child2 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild2; + + const child3 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild3; + + const child4 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild4; + + let _root = root == null || root == undefined ? "" : `${root.orgRootName}`; + let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`; + let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`; + let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`; + let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`; + + const mapData = { + Id: profile.id, + CitizenId: profile.citizenId, + Prefix: profile.prefix, + FirstName: profile.firstName, + LastName: profile.lastName, + DateOfBirth: profile.birthDate, + DateRetire: profile.dateRetire, + RegistrationAddress: `${profile.registrationAddress}\r\nตำบล/แขวง ${province?.name}\r\nเขต/อำเภอ ${district?.name}\r\nจังหวัด ${subDistrict?.name} รหัสไปรษณีย์ ${profile.registrationZipCode}`, + SalaryAmount: profile.profileSalarys.length > 0 + ? profile.profileSalarys[0].amount + : null, + Education: profile.profileEducations.length > 0 + ? profile.profileEducations[profile.profileEducations.length-1].institute + : null, + AppointText: profile.dateAppoint, + SalaryDate: profile.profileSalarys.length > 0 + ? profile.profileSalarys[0].date + : null, + PositionName: profile.position, + OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`, + } + + return new HttpSuccess(mapData); + + } /** * API สร้างทะเบียนประวัติ From 2149b799dc2942b782ff483e2410cb36fcc4f17f Mon Sep 17 00:00:00 2001 From: Bright Date: Thu, 23 May 2024 10:08:41 +0700 Subject: [PATCH 2/2] =?UTF-8?q?report=20=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B9=81=E0=B8=9A=E0=B8=9A?= =?UTF-8?q?=E0=B8=A2=E0=B9=88=E0=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileController.ts | 112 ++++++++++++++++++- src/controllers/ProfileEmployeeController.ts | 107 ++++++++++++++++++ 2 files changed, 216 insertions(+), 3 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 4fb2a65e..c0873efc 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -40,6 +40,9 @@ import { import { RequestWithUser } from "../middlewares/user"; import { Position } from "../entities/Position"; import { ProfileEmployee } from "../entities/ProfileEmployee"; +import { Province } from "../entities/Province"; +import { District } from "../entities/District"; +import { SubDistrict } from "../entities/SubDistrict"; @Route("api/v1/org/profile") @Tags("Profile") @@ -57,8 +60,110 @@ export class ProfileController extends Controller { private profileHistoryRepo = AppDataSource.getRepository(ProfileHistory); private posLevelRepo = AppDataSource.getRepository(PosLevel); private posTypeRepo = AppDataSource.getRepository(PosType); - private orgRevisionRepository = AppDataSource.getRepository(OrgRevision); private positionRepository = AppDataSource.getRepository(Position); + private provinceRepository = AppDataSource.getRepository(Province); + private districtRepository = AppDataSource.getRepository(District); + private subDistrict = AppDataSource.getRepository(SubDistrict); + + /** + * report ประวัติแบบย่อ ข้าราชการ + * + * @summary report ประวัติแบบย่อ ข้าราชการ + * + * @param {string} id Id โปรไฟล์ + */ + @Get("kp7-short/{id}") + async kp7ShortById(@Path() id: string) { + const orgRevision = await this.orgRevisionRepo.findOne({ + where: { orgRevisionIsCurrent: true }, + }); + + const profile = await this.profileRepo.findOne({ + relations: [ + "profileSalary", + "profileEducations", + "current_holders", + "current_holders.orgRoot", + "current_holders.orgChild1", + "current_holders.orgChild2", + "current_holders.orgChild3", + "current_holders.orgChild4" + ], + where: { id: id, }, + }); + if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + + const province = await this.provinceRepository.findOneBy({ id: profile.registrationProvinceId }) + const district = await this.districtRepository.findOneBy({ id: profile.registrationDistrictId }) + const subDistrict = await this.subDistrict.findOneBy({ id: profile.registrationSubDistrictId }) + + const root = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgRoot; + + const child1 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild1; + + const child2 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild2; + + const child3 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild3; + + const child4 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild4; + + let _root = root == null || root == undefined ? "" : `${root.orgRootName}`; + let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`; + let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`; + let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`; + let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`; + + const mapData = { + Id: profile.id, + CitizenId: profile.citizenId, + Prefix: profile.prefix, + FirstName: profile.firstName, + LastName: profile.lastName, + DateOfBirth: profile.birthDate, + DateRetire: profile.dateRetire, + RegistrationAddress: `${profile.registrationAddress}\r\nตำบล/แขวง ${province?.name}\r\nเขต/อำเภอ ${district?.name}\r\nจังหวัด ${subDistrict?.name} รหัสไปรษณีย์ ${profile.registrationZipCode}`, + SalaryAmount: profile.profileSalary.length > 0 + ? profile.profileSalary[0].amount + : null, + Education: profile.profileEducations.length > 0 + ? profile.profileEducations[profile.profileEducations.length-1].institute + : null, + AppointText: profile.dateAppoint, + SalaryDate: profile.profileSalary.length > 0 + ? profile.profileSalary[0].date + : null, + PositionName: profile.position, + OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`, + } + + return new HttpSuccess(mapData); + + } /** * @@ -572,7 +677,7 @@ export class ProfileController extends Controller { .skip((page - 1) * pageSize) .take(pageSize) .getManyAndCount(); - const findRevision = await this.orgRevisionRepository.findOne({ + const findRevision = await this.orgRevisionRepo.findOne({ where: { orgRevisionIsCurrent: true }, }); if (!findRevision) { @@ -1139,6 +1244,7 @@ export class ProfileController extends Controller { * * @summary ORG_065 - ข้อมูลทะเบียนประวัติตาม citizenId (ADMIN) #70 * + * @param id หมายเลขประจำตัวประชาชน (citizenId) */ @Get("citizenid/position/{id}") async getProfileByCitizenId( @@ -1685,7 +1791,7 @@ export class ProfileController extends Controller { const orgRevisionActive = await this.orgRevisionRepo.findOne({ where: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false }, }); - const findRevision = await this.orgRevisionRepository.findOne({ + const findRevision = await this.orgRevisionRepo.findOne({ where: { orgRevisionIsCurrent: true }, }); if (!findRevision) { diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 2498e0ee..ce1b30ae 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -31,6 +31,10 @@ import { import { EmployeePosLevel } from "../entities/EmployeePosLevel"; import { EmployeePosType } from "../entities/EmployeePosType"; import { RequestWithUser } from "../middlewares/user"; +import { Position } from "../entities/Position"; +import { Province } from "../entities/Province"; +import { District } from "../entities/District"; +import { SubDistrict } from "../entities/SubDistrict"; @Route("api/v1/org/profile-employee") @Tags("ProfileEmployee") @@ -47,6 +51,109 @@ export class ProfileEmployeeController extends Controller { private profileHistoryRepo = AppDataSource.getRepository(ProfileEmployeeHistory); private posLevelRepo = AppDataSource.getRepository(EmployeePosLevel); private posTypeRepo = AppDataSource.getRepository(EmployeePosType); + private provinceRepository = AppDataSource.getRepository(Province); + private districtRepository = AppDataSource.getRepository(District); + private subDistrict = AppDataSource.getRepository(SubDistrict); + + /** + * report ประวัติแบบย่อ ลูกจ้าง + * + * @summary report ประวัติแบบย่อ ลูกจ้าง + * + * @param {string} id Id โปรไฟล์ + */ + @Get("kp7-short/{id}") + async kp7ShortById(@Path() id: string) { + const orgRevision = await this.orgRevisionRepo.findOne({ + where: { orgRevisionIsCurrent: true }, + }); + + const profile = await this.profileRepo.findOne({ + relations: [ + "profileSalarys", + "profileEducations", + "current_holders", + "current_holders.orgRoot", + "current_holders.orgChild1", + "current_holders.orgChild2", + "current_holders.orgChild3", + "current_holders.orgChild4" + ], + where: { id: id, }, + }); + if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + + const province = await this.provinceRepository.findOneBy({ id: profile.registrationProvinceId }) + const district = await this.districtRepository.findOneBy({ id: profile.registrationDistrictId }) + const subDistrict = await this.subDistrict.findOneBy({ id: profile.registrationSubDistrictId }) + + const root = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgRoot; + + const child1 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild1; + + const child2 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild2; + + const child3 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild3; + + const child4 = + profile.current_holders == null || + profile.current_holders.length == 0 || + profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null + ? null + : profile.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild4; + + let _root = root == null || root == undefined ? "" : `${root.orgRootName}`; + let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`; + let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`; + let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`; + let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`; + + const mapData = { + Id: profile.id, + CitizenId: profile.citizenId, + Prefix: profile.prefix, + FirstName: profile.firstName, + LastName: profile.lastName, + DateOfBirth: profile.birthDate, + DateRetire: profile.dateRetire, + RegistrationAddress: `${profile.registrationAddress}\r\nตำบล/แขวง ${province?.name}\r\nเขต/อำเภอ ${district?.name}\r\nจังหวัด ${subDistrict?.name} รหัสไปรษณีย์ ${profile.registrationZipCode}`, + SalaryAmount: profile.profileSalarys.length > 0 + ? profile.profileSalarys[0].amount + : null, + Education: profile.profileEducations.length > 0 + ? profile.profileEducations[profile.profileEducations.length-1].institute + : null, + AppointText: profile.dateAppoint, + SalaryDate: profile.profileSalarys.length > 0 + ? profile.profileSalarys[0].date + : null, + PositionName: profile.position, + OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`, + } + + return new HttpSuccess(mapData); + + } /** * API สร้างทะเบียนประวัติ