no message
This commit is contained in:
parent
cd416a4ebb
commit
890a63c8e9
1 changed files with 75 additions and 74 deletions
|
|
@ -311,86 +311,90 @@ export class OrganizationController extends Controller {
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
const orgRootIds = orgRootData.map((orgRoot) => orgRoot.id) || null;
|
const orgRootIds = orgRootData.map((orgRoot) => orgRoot.id) || null;
|
||||||
const orgChild1Data = orgRootIds && orgRootIds.length > 0
|
const orgChild1Data =
|
||||||
? await AppDataSource.getRepository(OrgChild1)
|
orgRootIds && orgRootIds.length > 0
|
||||||
.createQueryBuilder("orgChild1")
|
? await AppDataSource.getRepository(OrgChild1)
|
||||||
.where("orgChild1.orgRootId IN (:...ids)", { ids: orgRootIds })
|
.createQueryBuilder("orgChild1")
|
||||||
.select([
|
.where("orgChild1.orgRootId IN (:...ids)", { ids: orgRootIds })
|
||||||
"orgChild1.id",
|
.select([
|
||||||
"orgChild1.orgChild1Name",
|
"orgChild1.id",
|
||||||
"orgChild1.orgChild1ShortName",
|
"orgChild1.orgChild1Name",
|
||||||
"orgChild1.orgChild1Code",
|
"orgChild1.orgChild1ShortName",
|
||||||
"orgChild1.orgChild1Order",
|
"orgChild1.orgChild1Code",
|
||||||
"orgChild1.orgChild1PhoneEx",
|
"orgChild1.orgChild1Order",
|
||||||
"orgChild1.orgChild1PhoneIn",
|
"orgChild1.orgChild1PhoneEx",
|
||||||
"orgChild1.orgChild1Fax",
|
"orgChild1.orgChild1PhoneIn",
|
||||||
"orgChild1.orgRootId",
|
"orgChild1.orgChild1Fax",
|
||||||
])
|
"orgChild1.orgRootId",
|
||||||
.getMany()
|
])
|
||||||
:[];
|
.getMany()
|
||||||
|
: [];
|
||||||
|
|
||||||
const orgChild1Ids = orgChild1Data.map((orgChild1) => orgChild1.id) || null;
|
const orgChild1Ids = orgChild1Data.map((orgChild1) => orgChild1.id) || null;
|
||||||
const orgChild2Data = orgChild1Ids && orgChild1Ids.length > 0
|
const orgChild2Data =
|
||||||
? await AppDataSource.getRepository(OrgChild2)
|
orgChild1Ids && orgChild1Ids.length > 0
|
||||||
.createQueryBuilder("orgChild2")
|
? await AppDataSource.getRepository(OrgChild2)
|
||||||
.where("orgChild2.orgChild1Id IN (:...ids)", { ids: orgChild1Ids })
|
.createQueryBuilder("orgChild2")
|
||||||
.select([
|
.where("orgChild2.orgChild1Id IN (:...ids)", { ids: orgChild1Ids })
|
||||||
"orgChild2.id",
|
.select([
|
||||||
"orgChild2.orgChild2Name",
|
"orgChild2.id",
|
||||||
"orgChild2.orgChild2ShortName",
|
"orgChild2.orgChild2Name",
|
||||||
"orgChild2.orgChild2Code",
|
"orgChild2.orgChild2ShortName",
|
||||||
"orgChild2.orgChild2Order",
|
"orgChild2.orgChild2Code",
|
||||||
"orgChild2.orgChild2PhoneEx",
|
"orgChild2.orgChild2Order",
|
||||||
"orgChild2.orgChild2PhoneIn",
|
"orgChild2.orgChild2PhoneEx",
|
||||||
"orgChild2.orgChild2Fax",
|
"orgChild2.orgChild2PhoneIn",
|
||||||
"orgChild2.orgRootId",
|
"orgChild2.orgChild2Fax",
|
||||||
|
"orgChild2.orgRootId",
|
||||||
|
|
||||||
"orgChild2.orgChild1Id",
|
"orgChild2.orgChild1Id",
|
||||||
])
|
])
|
||||||
.getMany()
|
.getMany()
|
||||||
:[];
|
: [];
|
||||||
|
|
||||||
const orgChild2Ids = orgChild2Data.map((orgChild2) => orgChild2.id) || null;
|
const orgChild2Ids = orgChild2Data.map((orgChild2) => orgChild2.id) || null;
|
||||||
const orgChild3Data = orgChild2Ids && orgChild2Ids.length > 0
|
const orgChild3Data =
|
||||||
? await AppDataSource.getRepository(OrgChild3)
|
orgChild2Ids && orgChild2Ids.length > 0
|
||||||
.createQueryBuilder("orgChild3")
|
? await AppDataSource.getRepository(OrgChild3)
|
||||||
.where("orgChild3.orgChild2Id IN (:...ids)", { ids: orgChild2Ids })
|
.createQueryBuilder("orgChild3")
|
||||||
.select([
|
.where("orgChild3.orgChild2Id IN (:...ids)", { ids: orgChild2Ids })
|
||||||
"orgChild3.id",
|
.select([
|
||||||
"orgChild3.orgChild3Name",
|
"orgChild3.id",
|
||||||
"orgChild3.orgChild3ShortName",
|
"orgChild3.orgChild3Name",
|
||||||
"orgChild3.orgChild3Code",
|
"orgChild3.orgChild3ShortName",
|
||||||
"orgChild3.orgChild3Order",
|
"orgChild3.orgChild3Code",
|
||||||
"orgChild3.orgChild3PhoneEx",
|
"orgChild3.orgChild3Order",
|
||||||
"orgChild3.orgChild3PhoneIn",
|
"orgChild3.orgChild3PhoneEx",
|
||||||
"orgChild3.orgChild3Fax",
|
"orgChild3.orgChild3PhoneIn",
|
||||||
"orgChild3.orgRootId",
|
"orgChild3.orgChild3Fax",
|
||||||
|
"orgChild3.orgRootId",
|
||||||
|
|
||||||
"orgChild3.orgChild2Id",
|
"orgChild3.orgChild2Id",
|
||||||
])
|
])
|
||||||
.getMany()
|
.getMany()
|
||||||
:[];
|
: [];
|
||||||
|
|
||||||
const orgChild3Ids = orgChild3Data.map((orgChild3) => orgChild3.id) || null;
|
const orgChild3Ids = orgChild3Data.map((orgChild3) => orgChild3.id) || null;
|
||||||
const orgChild4Data = orgChild3Ids && orgChild3Ids.length > 0
|
const orgChild4Data =
|
||||||
? await AppDataSource.getRepository(OrgChild4)
|
orgChild3Ids && orgChild3Ids.length > 0
|
||||||
.createQueryBuilder("orgChild4")
|
? await AppDataSource.getRepository(OrgChild4)
|
||||||
.where("orgChild4.orgChild3Id IN (:...ids)", { ids: orgChild3Ids })
|
.createQueryBuilder("orgChild4")
|
||||||
.select([
|
.where("orgChild4.orgChild3Id IN (:...ids)", { ids: orgChild3Ids })
|
||||||
"orgChild4.id",
|
.select([
|
||||||
"orgChild4.orgChild4Name",
|
"orgChild4.id",
|
||||||
"orgChild4.orgChild4ShortName",
|
"orgChild4.orgChild4Name",
|
||||||
"orgChild4.orgChild4Code",
|
"orgChild4.orgChild4ShortName",
|
||||||
"orgChild4.orgChild4Order",
|
"orgChild4.orgChild4Code",
|
||||||
"orgChild4.orgChild4PhoneEx",
|
"orgChild4.orgChild4Order",
|
||||||
"orgChild4.orgChild4PhoneIn",
|
"orgChild4.orgChild4PhoneEx",
|
||||||
"orgChild4.orgChild4Fax",
|
"orgChild4.orgChild4PhoneIn",
|
||||||
"orgChild4.orgRootId",
|
"orgChild4.orgChild4Fax",
|
||||||
|
"orgChild4.orgRootId",
|
||||||
|
|
||||||
"orgChild4.orgChild3Id",
|
"orgChild4.orgChild3Id",
|
||||||
])
|
])
|
||||||
.getMany()
|
.getMany()
|
||||||
:[];
|
: [];
|
||||||
|
|
||||||
const formattedData = orgRootData.map((orgRoot) => {
|
const formattedData = orgRootData.map((orgRoot) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -523,6 +527,3 @@ export class OrganizationController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function ANY(arg0: OrgRevision[]): string | import("typeorm").FindOperator<string> | undefined {
|
|
||||||
throw new Error("Function not implemented.");
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue