From bbf28f9d2ddc1ab87ba1b6f12a831756f8334596 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 18 Mar 2025 11:32:47 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=AA=E0=B8=A3=E0=B8=B8?= =?UTF-8?q?=E0=B8=9B=E0=B8=88=E0=B8=B3=E0=B8=99=E0=B8=A7=E0=B8=99=E0=B8=9C?= =?UTF-8?q?=E0=B8=A5=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A1=E0=B8=B4=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/EvaluationController.ts | 11 +++++++++- src/controllers/ReportController.ts | 3 +-- src/entities/Evaluation.ts | 28 +++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/controllers/EvaluationController.ts b/src/controllers/EvaluationController.ts index 11a94e7..90a1f61 100644 --- a/src/controllers/EvaluationController.ts +++ b/src/controllers/EvaluationController.ts @@ -444,7 +444,16 @@ export class EvaluationController { } const before = null; - + await new CallAPI() + .GetData(request, `/org/profile/keycloak/commander/${request.user.sub}`) + .then(async (x) => { + evaluation.rootDnaId = x.rootDnaId; + evaluation.child1DnaId = x.child1DnaId; + evaluation.child2DnaId = x.child2DnaId; + evaluation.child3DnaId = x.child3DnaId; + evaluation.child4DnaId = x.child4DnaId; + }) + .catch(); evaluation.step = "PREPARE_DOC_V1"; evaluation.type = requestBody.type == "EXPERT" ? "EXPERT" : "SPECIAL_EXPERT"; evaluation.fullName = requestBody.fullName; diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 4b4f911..ae46f30 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -76,8 +76,7 @@ export class ReoportController { .andWhere(yearInBE && yearInBE != null ? "YEAR(createdAt) = :year" : "1=1", { year: yearInBE, }) - .andWhere("evaluation.orgRootId = :rootId", { rootId: rootId }) - // .andWhere("evaluation.rootDnaId = :rootId", { rootId: rootId }) + .andWhere("evaluation.rootDnaId = :rootId", { rootId: rootId }) .andWhere("evaluation.step = :step", { step: "DONE" }) .getMany(); diff --git a/src/entities/Evaluation.ts b/src/entities/Evaluation.ts index d6fb4c8..0d7c953 100644 --- a/src/entities/Evaluation.ts +++ b/src/entities/Evaluation.ts @@ -526,6 +526,34 @@ export class CreateEvaluationExpertise { @Column() oc?: string | null; + + @Column() + citizenId?: string | null; + + @Column() + prefix?: string | null; + + @Column() + fullName?: string | null; + + @Column() + position?: string | null; + + @Column() + salary?: string | null; + + @Column() + positionLevel?: string | null; + + @Column() + posNo?: string | null; + + @Column() + birthDate?: string | null; + + @Column() + govAge?: string | null; + } export type UpdateEvaluation = Partial;