manometer
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
flowchart TD
|
||||
User[Benutzer]
|
||||
UI[Blazor Server UI\nDashboard / Standorte / Settings / Cockpit / Logs]
|
||||
Orch[ExportOrchestrationService]
|
||||
SiteExport[SiteExportService]
|
||||
Consolidated[ConsolidatedExportService]
|
||||
Hana[HanaQueryService]
|
||||
SapGateway[SapGatewayService]
|
||||
SapComposition[SapCompositionService]
|
||||
ManualExcel[ManualExcelImportService]
|
||||
Transform[TransformationCatalog + RecordTransformationService]
|
||||
Central[CentralSalesRecordService]
|
||||
Cockpit[ManagementCockpitService]
|
||||
Config[ConfigTransferService]
|
||||
Init[DatabaseInitializationService]
|
||||
Timer[TimerBackgroundService]
|
||||
Logs[AppEventLogService + ExportLogService]
|
||||
SQLite[(SQLite\ntrafag_exporter.db)]
|
||||
HANA[(SAP HANA)]
|
||||
SAP[(SAP Gateway / OData)]
|
||||
LocalFS[(Lokales Dateisystem)]
|
||||
SharePoint[(SharePoint)]
|
||||
|
||||
User --> UI
|
||||
UI --> Orch
|
||||
UI --> Cockpit
|
||||
UI --> Config
|
||||
UI --> Init
|
||||
|
||||
Timer --> Orch
|
||||
Orch --> SiteExport
|
||||
Orch --> Consolidated
|
||||
|
||||
SiteExport --> Hana
|
||||
SiteExport --> SapComposition
|
||||
SiteExport --> ManualExcel
|
||||
SiteExport --> Transform
|
||||
SiteExport --> Central
|
||||
SiteExport --> Logs
|
||||
|
||||
SapComposition --> SapGateway
|
||||
Consolidated --> LocalFS
|
||||
Consolidated --> SharePoint
|
||||
Cockpit --> SQLite
|
||||
Cockpit --> LocalFS
|
||||
Config --> SQLite
|
||||
Init --> SQLite
|
||||
Logs --> SQLite
|
||||
Central --> SQLite
|
||||
|
||||
Hana --> HANA
|
||||
SapGateway --> SAP
|
||||
ManualExcel --> LocalFS
|
||||
ManualExcel --> SharePoint
|
||||
SiteExport --> LocalFS
|
||||
SiteExport --> SharePoint
|
||||
SiteExport --> SQLite
|
||||
UI --> SQLite
|
||||
|
||||
classDef infra fill:#eef6ff,stroke:#336699,color:#102030;
|
||||
classDef app fill:#f7f2ff,stroke:#6f42c1,color:#201030;
|
||||
classDef ext fill:#eefaf0,stroke:#2d7a46,color:#102010;
|
||||
|
||||
class UI,Orch,SiteExport,Consolidated,Hana,SapGateway,SapComposition,ManualExcel,Transform,Central,Cockpit,Config,Init,Timer,Logs app;
|
||||
class SQLite,LocalFS infra;
|
||||
class HANA,SAP,SharePoint,User ext;
|
||||
@@ -0,0 +1,41 @@
|
||||
flowchart TD
|
||||
Start([Export gestartet])
|
||||
Decide{ConnectionKind}
|
||||
|
||||
Start --> Decide
|
||||
|
||||
Decide -->|HANA| H1[Zentrale HANA-Konfiguration laden]
|
||||
H1 --> H2[Optionale Standort-Credentials anwenden]
|
||||
H2 --> H3[Schema in HANA lesen]
|
||||
H3 --> H4[SalesRecord-Liste erzeugen]
|
||||
|
||||
Decide -->|SAP_GATEWAY| S1[Zentrale oder Override Service URL aufloesen]
|
||||
S1 --> S2[SAP Quellen laden]
|
||||
S2 --> S3[Joins anwenden]
|
||||
S3 --> S4[Feldmappings auf SalesRecord]
|
||||
|
||||
Decide -->|MANUAL_EXCEL| M1{ManualImportFilePath Typ}
|
||||
M1 -->|lokal / UNC| M2[Excel lokal lesen]
|
||||
M1 -->|SharePoint| M3[Excel via Graph temp herunterladen]
|
||||
M3 --> M4[Excel aus Temp-Datei lesen]
|
||||
M2 --> M5[SalesRecord-Liste erzeugen]
|
||||
M4 --> M5
|
||||
|
||||
H4 --> T[Transformationen anwenden]
|
||||
S4 --> T
|
||||
M5 --> T
|
||||
|
||||
T --> C1[CentralSalesRecords fuer Standort ersetzen]
|
||||
C1 --> E1{Standortdatei erzeugen?}
|
||||
|
||||
E1 -->|ja: HANA / SAP| E2[Excel-Datei lokal erzeugen]
|
||||
E1 -->|nein: MANUAL_EXCEL| E3[Eingangsdatei bleibt Referenz]
|
||||
|
||||
E2 --> SP{SharePoint konfiguriert?}
|
||||
E3 --> SP
|
||||
SP -->|ja| SP1[Datei nach SharePoint hochladen]
|
||||
SP -->|nein| L1[Kein Upload]
|
||||
|
||||
SP1 --> Log[ExportLog + AppEventLog schreiben]
|
||||
L1 --> Log
|
||||
Log --> Done([Export fertig])
|
||||
@@ -0,0 +1,184 @@
|
||||
erDiagram
|
||||
HANA_SERVERS ||--o{ SITES : "default for HANA source system"
|
||||
SITES ||--o{ CENTRAL_SALES_RECORDS : stores
|
||||
SITES ||--o{ EXPORT_LOGS : writes
|
||||
SITES ||--o{ APP_EVENT_LOGS : logs
|
||||
SITES ||--o{ SAP_SOURCE_DEFINITIONS : configures
|
||||
SITES ||--o{ SAP_JOIN_DEFINITIONS : configures
|
||||
SITES ||--o{ SAP_FIELD_MAPPINGS : configures
|
||||
|
||||
SOURCE_SYSTEM_DEFINITIONS {
|
||||
int Id PK
|
||||
string Code
|
||||
string DisplayName
|
||||
string ConnectionKind
|
||||
bool IsActive
|
||||
string CentralServiceUrl
|
||||
string CentralUsername
|
||||
string CentralPassword
|
||||
}
|
||||
|
||||
HANA_SERVERS {
|
||||
int Id PK
|
||||
string SourceSystem
|
||||
string Name
|
||||
string Host
|
||||
int Port
|
||||
string DatabaseName
|
||||
bool UseSsl
|
||||
bool ValidateCertificate
|
||||
string AdditionalParams
|
||||
}
|
||||
|
||||
SITES {
|
||||
int Id PK
|
||||
int HanaServerId FK
|
||||
string Schema
|
||||
string TSC
|
||||
string Land
|
||||
string SourceSystem
|
||||
string UsernameOverride
|
||||
string PasswordOverride
|
||||
string LocalExportFolderOverride
|
||||
string ManualImportFilePath
|
||||
datetime ManualImportLastUploadedAtUtc
|
||||
string SapServiceUrl
|
||||
string SapEntitySet
|
||||
string SapEntitySetsCache
|
||||
datetime SapEntitySetsRefreshedAtUtc
|
||||
bool IsActive
|
||||
}
|
||||
|
||||
SHARE_POINT_CONFIGS {
|
||||
int Id PK
|
||||
string SiteUrl
|
||||
string ExportFolder
|
||||
string CentralExportFolder
|
||||
string TenantId
|
||||
string ClientId
|
||||
string ClientSecret
|
||||
}
|
||||
|
||||
EXPORT_SETTINGS {
|
||||
int Id PK
|
||||
string DateFilter
|
||||
int TimerHour
|
||||
int TimerMinute
|
||||
bool TimerEnabled
|
||||
bool DebugLoggingEnabled
|
||||
string LocalSiteExportFolder
|
||||
string LocalConsolidatedExportFolder
|
||||
}
|
||||
|
||||
FIELD_TRANSFORMATION_RULES {
|
||||
int Id PK
|
||||
string SourceSystem
|
||||
string SourceField
|
||||
string TargetField
|
||||
string TransformationType
|
||||
string RuleScope
|
||||
string Argument
|
||||
int SortOrder
|
||||
bool IsActive
|
||||
}
|
||||
|
||||
SAP_SOURCE_DEFINITIONS {
|
||||
int Id PK
|
||||
int SiteId FK
|
||||
string Alias
|
||||
string EntitySet
|
||||
bool IsPrimary
|
||||
bool IsActive
|
||||
int SortOrder
|
||||
}
|
||||
|
||||
SAP_JOIN_DEFINITIONS {
|
||||
int Id PK
|
||||
int SiteId FK
|
||||
string LeftAlias
|
||||
string RightAlias
|
||||
string LeftKeys
|
||||
string RightKeys
|
||||
string JoinType
|
||||
bool IsActive
|
||||
int SortOrder
|
||||
}
|
||||
|
||||
SAP_FIELD_MAPPINGS {
|
||||
int Id PK
|
||||
int SiteId FK
|
||||
string TargetField
|
||||
string SourceExpression
|
||||
bool IsRequired
|
||||
bool IsActive
|
||||
int SortOrder
|
||||
}
|
||||
|
||||
CENTRAL_SALES_RECORDS {
|
||||
int Id PK
|
||||
datetime StoredAtUtc
|
||||
int SiteId FK
|
||||
string SourceSystem
|
||||
datetime ExtractionDate
|
||||
string Tsc
|
||||
string InvoiceNumber
|
||||
int PositionOnInvoice
|
||||
string Material
|
||||
string Name
|
||||
string ProductGroup
|
||||
decimal Quantity
|
||||
string SupplierNumber
|
||||
string SupplierName
|
||||
string SupplierCountry
|
||||
string CustomerNumber
|
||||
string CustomerName
|
||||
string CustomerCountry
|
||||
string CustomerIndustry
|
||||
decimal StandardCost
|
||||
string StandardCostCurrency
|
||||
string PurchaseOrderNumber
|
||||
decimal SalesPriceValue
|
||||
string SalesCurrency
|
||||
string Incoterms2020
|
||||
string SalesResponsibleEmployee
|
||||
datetime InvoiceDate
|
||||
datetime OrderDate
|
||||
string Land
|
||||
string DocumentType
|
||||
}
|
||||
|
||||
EXPORT_LOGS {
|
||||
int Id PK
|
||||
datetime Timestamp
|
||||
int SiteId FK
|
||||
string Land
|
||||
string TSC
|
||||
string Status
|
||||
int RowCount
|
||||
string ErrorMessage
|
||||
string FileName
|
||||
string FilePath
|
||||
double DurationSeconds
|
||||
}
|
||||
|
||||
APP_EVENT_LOGS {
|
||||
int Id PK
|
||||
datetime Timestamp
|
||||
string Level
|
||||
string Category
|
||||
int SiteId FK
|
||||
string Land
|
||||
string Message
|
||||
string Details
|
||||
}
|
||||
|
||||
CURRENCY_EXCHANGE_RATES {
|
||||
int Id PK
|
||||
string FromCurrency
|
||||
string ToCurrency
|
||||
decimal Rate
|
||||
datetime ValidFrom
|
||||
datetime ValidTo
|
||||
string Notes
|
||||
bool IsActive
|
||||
}
|
||||
Reference in New Issue
Block a user