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;