From e0be0fbb82467491ed3b6e360a3aa5ba54c5c0ad Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 17 Feb 2025 22:34:41 +0700 Subject: [PATCH] no message --- src/controllers/ImportDataController.ts | 10 +++++++++- src/entities/HR_EDUCATION_EMP.ts | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/controllers/ImportDataController.ts b/src/controllers/ImportDataController.ts index acb0007d..4f7f6626 100644 --- a/src/controllers/ImportDataController.ts +++ b/src/controllers/ImportDataController.ts @@ -977,7 +977,14 @@ export class ImportDataController extends Controller { profiles.map(async (_item) => { const existingProfile = await this.HR_EDUCATION_EMPRepo.find({ where: { CIT: _item.citizenId }, - select: ["CIT", "EDUCATION_CODE", "START_EDUCATION_YEAR", "EDUCATION_YEAR", "INSTITUE"], + select: [ + "CIT", + "EDUCATION_CODE", + "START_EDUCATION_YEAR", + "EDUCATION_YEAR", + "INSTITUE", + "EDUCATION_SEQ", + ], }); const educationLevel = await this.profileEducationRepo.findOne({ @@ -1009,6 +1016,7 @@ export class ImportDataController extends Controller { education.profileEmployeeId = _item.id; education.degree = educationCode ? educationCode.EDUCATION_NAME : ""; education.institute = item.INSTITUE; + education.level = item.EDUCATION_SEQ ? null_ : Number(item.EDUCATION_SEQ); education.startDate = startDate; education.endDate = endDate; education.createdUserId = request.user.sub; diff --git a/src/entities/HR_EDUCATION_EMP.ts b/src/entities/HR_EDUCATION_EMP.ts index add09acb..bec7fed0 100644 --- a/src/entities/HR_EDUCATION_EMP.ts +++ b/src/entities/HR_EDUCATION_EMP.ts @@ -45,4 +45,11 @@ export class HR_EDUCATION_EMP { default: null, }) INSTITUE: string; + + @Column({ + nullable: true, + length: 255, + default: null, + }) + EDUCATION_SEQ: string; }