From 573d2788be731875162b2bd5decf78046b5000ab Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 17 Feb 2025 17:14:24 +0700 Subject: [PATCH] no message --- src/controllers/ImportDataController.ts | 6 +++--- src/controllers/ProfileController.ts | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/controllers/ImportDataController.ts b/src/controllers/ImportDataController.ts index 0e4ada5c..3a40e1c3 100644 --- a/src/controllers/ImportDataController.ts +++ b/src/controllers/ImportDataController.ts @@ -247,9 +247,9 @@ export class ImportDataController extends Controller { // if (item["FLAG_RETIRE_STATUS"] != "" && item["FLAG_RETIRE_STATUS"] != null) { // continue; // } - if (item["FLAG_PERSON_TYPE"] != "6") { - continue; - } + // if (item["FLAG_PERSON_TYPE"] != "6") { + // continue; + // } // if (new Date(item["RET_YEAR"]).getFullYear() >= 2567) { // continue; // } diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index fca3c91b..6a2a9e4d 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -6641,9 +6641,10 @@ export class ProfileController extends Controller { position: profile.position, leaveDate: profile.dateLeave, posMasterNo: posMaster == null ? null : posMaster.posMasterNo, - posLevelName: profile.posType == null && profile.posLevel == null - ? null - : `${profile.posType.posTypeShortName} ${profile.posLevel.posLevelName}`, + posLevelName: + profile.posType == null && profile.posLevel == null + ? null + : `${profile.posType.posTypeShortName} ${profile.posLevel.posLevelName}`, posLevelRank: profile.posLevel == null ? null : profile.posLevel.posLevelRank, posLevelId: profile.posLevel == null ? null : profile.posLevel.id, posTypeName: profile.posType == null ? null : profile.posType.posTypeName, @@ -8839,14 +8840,14 @@ export class ProfileController extends Controller { */ @Get("retireDate/mock") async calRetireDate() { - const profile = await this.profileRepo.find({ relations: ["profileSalary"] }); + const profile = await this.profileEmpRepo.find(); const _null: any = null; const profiles = profile.map((_data) => ({ ..._data, dateRetire: _data.birthDate == null ? _null : calculateRetireDate(_data.birthDate), dateRetireLaw: _data.birthDate == null ? _null : calculateRetireLaw(_data.birthDate), })); - await this.profileRepo.save(profiles); + await this.profileEmpRepo.save(profiles); return new HttpSuccess(); } /**