Add recursive distribution board load projection
This commit is contained in:
parent
855a04e655
commit
dfeb0e3cb6
11 changed files with 701 additions and 138 deletions
|
|
@ -19,6 +19,18 @@ export class DistributionBoardComponentRepository {
|
|||
);
|
||||
}
|
||||
|
||||
async listByCircuitLists(circuitListIds: string[]) {
|
||||
if (circuitListIds.length === 0) return [];
|
||||
return this.database
|
||||
.select()
|
||||
.from(distributionBoardComponents)
|
||||
.where(inArray(distributionBoardComponents.circuitListId, circuitListIds))
|
||||
.orderBy(
|
||||
asc(distributionBoardComponents.sortOrder),
|
||||
asc(distributionBoardComponents.id)
|
||||
);
|
||||
}
|
||||
|
||||
async listProtectionByComponentIds(componentIds: string[]) {
|
||||
if (componentIds.length === 0) {
|
||||
return [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue