diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index 438eb469..a1a13762 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -7567,6 +7567,34 @@ export class OrganizationController extends Controller { order: { isDeputy: "DESC", DEPARTMENT_CODE: "ASC", orgRootName: "ASC" }, select: ["orgRootName"], }); + const child1 = await this.child1Repository.find({ + where: { + orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, + }, + order: { orgChild1Order: "ASC" }, + select: ["orgChild1Name"], + }); + const child2 = await this.child2Repository.find({ + where: { + orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, + }, + order: { orgChild2Order: "ASC" }, + select: ["orgChild2Name"], + }); + const child3 = await this.child3Repository.find({ + where: { + orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, + }, + order: { orgChild3Order: "ASC" }, + select: ["orgChild3Name"], + }); + const child4 = await this.child4Repository.find({ + where: { + orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, + }, + order: { orgChild4Order: "ASC" }, + select: ["orgChild4Name"], + }); const hospital = await this.child1Repository.find({ where: [ { @@ -7590,6 +7618,10 @@ export class OrganizationController extends Controller { }); return new HttpSuccess({ root: root.map((x) => x.orgRootName), + child1: child1.map((x) => x.orgChild1Name), + child2: child2.map((x) => x.orgChild2Name), + child3: child3.map((x) => x.orgChild3Name), + child4: child4.map((x) => x.orgChild4Name), hospital: hospital.map((x) => x.orgChild1Name), posTypeNameOrder: posType.map((x) => x.posTypeName), posLevelNameOrder: posLevel.map((x) => x.posLevelName),