forked from jappel/leistungsbilanz-ts
Add Linear XLSX initial import
This commit is contained in:
parent
c633e78cd4
commit
bfdd048269
20 changed files with 932 additions and 85 deletions
|
|
@ -10,10 +10,6 @@ import type {
|
|||
ProtectionDeviceType,
|
||||
RcdType,
|
||||
} from "../shared/constants/protection-device";
|
||||
import type {
|
||||
ExternalCsvConfiguration,
|
||||
ExternalCsvDialect,
|
||||
} from "../external-model/csv/external-csv-contracts";
|
||||
import type { ExternalModelConfiguration } from "../external-model/configuration/external-model-configuration";
|
||||
|
||||
export interface ExternalModelConfigurationSnapshotDto {
|
||||
|
|
@ -22,44 +18,7 @@ export interface ExternalModelConfigurationSnapshotDto {
|
|||
configuration: ExternalModelConfiguration;
|
||||
}
|
||||
|
||||
export interface ExternalCsvConfigurationSnapshotDto {
|
||||
id: string;
|
||||
projectId: string;
|
||||
configurationVersion: number;
|
||||
configuration: ExternalCsvConfiguration;
|
||||
}
|
||||
|
||||
export interface ExternalCsvPreviewObjectDto {
|
||||
rowNumber: number;
|
||||
ifcGuid: string;
|
||||
roomNumber: string;
|
||||
roomName: string;
|
||||
familyAndType: string;
|
||||
selectionMarker: string;
|
||||
circuitIdentifier: string;
|
||||
power: string;
|
||||
quantity: string | null;
|
||||
additionalSourceValues: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ExternalCsvPreviewDto {
|
||||
fileName: string;
|
||||
byteLength: number;
|
||||
sha256: string;
|
||||
dialect: ExternalCsvDialect;
|
||||
headerRowNumber: number;
|
||||
headerColumns: string[];
|
||||
rowCount: number;
|
||||
objectCount: number;
|
||||
passthroughCount: number;
|
||||
nonEmptyPassthroughCount: number;
|
||||
suspectObjectCount: number;
|
||||
objects: ExternalCsvPreviewObjectDto[];
|
||||
suspectRowNumbers: number[];
|
||||
}
|
||||
|
||||
export interface ExternalInitialImportPlanDto {
|
||||
configurationVersion: number;
|
||||
fileName: string;
|
||||
sha256: string;
|
||||
byteLength: number;
|
||||
|
|
@ -68,6 +27,7 @@ export interface ExternalInitialImportPlanDto {
|
|||
passthroughCount: number;
|
||||
suspectObjectCount: number;
|
||||
suspectRowNumbers: number[];
|
||||
warnings: string[];
|
||||
sourceRooms: Array<{
|
||||
sourceRoomKey: string;
|
||||
roomNumber: string;
|
||||
|
|
@ -81,9 +41,9 @@ export interface ExternalInitialImportPlanDto {
|
|||
familyAndType: string;
|
||||
objectCount: number;
|
||||
classified: boolean;
|
||||
category: string | null;
|
||||
connectionKind: string | null;
|
||||
internalDeviceType: string | null;
|
||||
deviceTypeId: string | null;
|
||||
deviceTypeName: string | null;
|
||||
quantityRule: "one" | "socketCount" | null;
|
||||
}>;
|
||||
issueCounts: {
|
||||
unknownFamilyAndType: number;
|
||||
|
|
@ -91,24 +51,7 @@ export interface ExternalInitialImportPlanDto {
|
|||
invalidQuantity: number;
|
||||
missingRoom: number;
|
||||
};
|
||||
objects: Array<{
|
||||
ifcGuid: string;
|
||||
sourceRoomKey: string | null;
|
||||
sourceValues: ExternalCsvPreviewObjectDto;
|
||||
suggestedPlanningValues: {
|
||||
displayName: string | null;
|
||||
internalDeviceType: string | null;
|
||||
category: CircuitGroupCategory | null;
|
||||
connectionKind: string | null;
|
||||
effectiveQuantity: number;
|
||||
powerPerUnitW: number | null;
|
||||
simultaneityFactor: number;
|
||||
cosPhi: number | null;
|
||||
costGroup: string | null;
|
||||
remark: string | null;
|
||||
};
|
||||
issues: string[];
|
||||
}>;
|
||||
objects: Array<{ worksharingId: string; ifcGuid: string | null; sourceRoomKey: string | null; sourceValues: { familyAndType: string }; suggestedPlanningValues: { simultaneityFactor: number; effectiveQuantity: number }; issues: string[] }>;
|
||||
existing: {
|
||||
floors: Array<{ id: string; name: string; sortOrder: number }>;
|
||||
rooms: Array<{
|
||||
|
|
@ -135,11 +78,12 @@ export interface ExternalInitialImportPlanDto {
|
|||
|
||||
export interface ApplyExternalInitialImportInput {
|
||||
expectedRevision: number;
|
||||
expectedConfigurationVersion: number;
|
||||
expectedSha256: string;
|
||||
fileName: string;
|
||||
contentBase64: string;
|
||||
sourceName: string;
|
||||
configuration: ExternalModelConfiguration;
|
||||
objectsWithoutRoomDefaultDistributionBoardId: string | null;
|
||||
roomDecisions: Array<{
|
||||
sourceRoomKey: string;
|
||||
roomId: string | null;
|
||||
|
|
@ -151,6 +95,14 @@ export interface ApplyExternalInitialImportInput {
|
|||
}>;
|
||||
}
|
||||
|
||||
export interface ExternalInitialImportStatusDto {
|
||||
imported: boolean;
|
||||
sourceName: string | null;
|
||||
objectCount: number;
|
||||
importedAtIso: string | null;
|
||||
fileName: string | null;
|
||||
}
|
||||
|
||||
export interface ExternalInitialImportResultDto extends ProjectCommandResultDto {
|
||||
import: {
|
||||
sourceId: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue