4.1 wvds-amed-cafm — CAFM-Extension

Zweck

Die Extension wvds-amed-cafm ist die Benutzeroberfläche für die Bestandsführung. Sie zeigt Technische Plätze, Equipment und elektrische Anschlüsse aus ENIVERSCAFM und erlaubt deren Verwaltung über den Gateway.Service. Die drei Topics (CAFM-TP, CAFM-OBJ, CAFM-EMR) bilden die drei Perspektiven ab, die bisher in AMED, LD/ENIVERS und TecDB getrennt waren.

Views

CAFM-TP — Technische Plätze

View Form Beschreibung
TP-Übersicht TechPlace.wfm Standorthierarchie als Baumansicht: org.branchorg.siteorg.locationasset.item (TP). Filtermöglichkeit nach Branch, Status, Disziplin.
TP-Detail TechPlaceDetail.wfm Einzelansicht eines Technischen Platzes mit: Stammdaten, installiertem Equipment (item_installation), Property-Grid aus property_schema, Status-Timeline.

Gateway-Endpunkte:

Methode Route Beschreibung
GET /api/v1/cafm/org/tree?branch={id} Standorthierarchie als verschachtelter Baum
GET /api/v1/cafm/tp/{id} TP-Stammdaten inkl. Properties (JSON)
GET /api/v1/cafm/tp/{id}/installations Installierte Equipments am TP
POST /api/v1/cafm/tp Neuen TP anlegen (Status planned)
PATCH /api/v1/cafm/tp/{id} TP-Daten ändern (z.B. Status-Wechsel)

Pascal-Units:

Unit Verantwortung
Cafm.TechPlace.pas TP-Übersicht: Baumdarstellung, Filter, Suchleiste
Cafm.TechPlaceDetail.pas TP-Detail: Property-Grid-Rendering, Status-Lifecycle

WP-Abhängigkeiten:

WP Inhalt (Backend) Freigeschaltete UI-Funktion
CAFM-TP 01 org.location Standorthierarchie Baumansicht in TP-Übersicht
CAFM-TP 02 asset.item TP-Grundstruktur TP-Knoten im Baum, TP-Detail (Stammdaten)
CAFM-TP 03 property_schema Metadaten-Modell Property-Grid in TP-Detail
CAFM-TP 04 trg_regen_type_views DDL-Trigger Typisierte Views (keine UI-Änderung, Backend-only)
CAFM-TP 05 TP-Status-Lifecycle Status-Timeline in TP-Detail
CAFM-TP 06 Greenfield-Workflow „Neuen TP anlegen“-Dialog (POST)
CAFM-TP 07 AMED APPMASTER Migration Bestandsdaten sichtbar in TP-Übersicht

CAFM-OBJ — Equipment / Objekte

View Form Beschreibung
OBJ-Liste Objects.wfm Equipment-Liste mit Typ-Filter (item_type), Status-Filter, Freitextsuche. Gruppierung nach Disziplin (Mechanik, Elektrik, Rohrleitung) über type_code.
OBJ-Detail ObjectDetail.wfm Einzelansicht eines Equipments: Stammdaten, aktuelle Installation (welcher TP?), Installationshistorie, Property-Grid, zugeordnete Prüfregeln (Cross-Ref PIMS).

Gateway-Endpunkte:

Methode Route Beschreibung
GET /api/v1/cafm/obj?type={code}&status={s} Equipment-Liste mit Filtern
GET /api/v1/cafm/obj/{id} Equipment-Stammdaten inkl. Properties
GET /api/v1/cafm/obj/{id}/history Installationshistorie (item_installation)
POST /api/v1/cafm/obj/{id}/install Equipment an TP installieren
POST /api/v1/cafm/obj/{id}/deinstall Equipment von TP deinstallieren

Pascal-Units:

Unit Verantwortung
Cafm.Objects.pas OBJ-Liste: Typ/Status-Filter, Disziplin-Gruppierung
Cafm.ObjectDetail.pas OBJ-Detail: Installation/Deinstallation, Historien-Timeline

WP-Abhängigkeiten:

WP Inhalt (Backend) Freigeschaltete UI-Funktion
CAFM-OBJ 01 item_installation Tabelle Aktuelle Installation in OBJ-Detail
CAFM-OBJ 02 Equipment-Lifecycle, Tausch-Protokoll Historien-Timeline, Tausch-Dialog
CAFM-OBJ 03 item_type Erweiterung (instrument, safety, piping) Neue Typ-Filter in OBJ-Liste
CAFM-OBJ 04 AMED MOTORMASTER Migration Motoren sichtbar in OBJ-Liste
CAFM-OBJ 05 AMED EZAMASTER + AVI_Equip Migration EZA-Geräte sichtbar in OBJ-Liste
CAFM-OBJ 06 TecDB EAV → JSON (piping) Rohrleitungsobjekte in OBJ-Liste
CAFM-OBJ 07 Validierungsabfragen Migrations-Report in Dashboard

CAFM-EMR — Elektrische Anschlüsse / KV

View Form Beschreibung
EMR-Übersicht Emr.wfm EMR-Stellen und Kraftverteiler-Zuordnungen (asset.electrical_connection). Baumansicht: KV → Abgang → EMR-Stelle → Equipment. Anzeige der Disziplin-Brücke Mechanik ↔ Elektrik.

Gateway-Endpunkte:

Methode Route Beschreibung
GET /api/v1/cafm/emr?kv={kv_number} EMR-Stellen eines Kraftverteilers
GET /api/v1/cafm/emr/{id} EMR-Stelle Detail (inkl. zugeordnetes Equipment)
GET /api/v1/cafm/emr/bridge?item={id} Disziplin-Brücke: Elektrik ↔ Mechanik für Item

Pascal-Unit:

Unit Verantwortung
Cafm.Emr.pas EMR-Übersicht: KV-Baum, Disziplin-Brücke, Suchfunktion

WP-Abhängigkeiten:

WP Inhalt (Backend) Freigeschaltete UI-Funktion
CAFM-EMR 01 asset.electrical_connection Tabelle KV-Baum in EMR-Übersicht
CAFM-EMR 02 EMR-Stelle als item_number Standard EMR-Stellen mit normalisierter Nummer sichtbar
CAFM-EMR 03 KV-Nummern und Schaltschrank-Zuordnung KV-Hierarchie im Baum
CAFM-EMR 04 LD ENIVERS BESTAND Migration Legacy-EMR-Daten sichtbar
CAFM-EMR 05 Disziplin-Brücke JOIN Views Brücke Mechanik ↔ Elektrik aktiv

TreeView-Struktur

Der TreeView amedCafmExplorer in der Activity-Bar-Sidebar bietet die Navigation:

amedCafmExplorer
├── Technische Plätze              → öffnet TechPlace.wfm
│   ├── [Betrieb 1]
│   │   ├── [Gebäude A]
│   │   │   ├── [Raum 101]
│   │   │   │   └── [TP-001]       → öffnet TechPlaceDetail.wfm
│   │   │   └── [Raum 102]
│   │   └── [Gebäude B]
│   └── [Betrieb 2]
├── Equipment                      → öffnet Objects.wfm
│   ├── Mechanik (type: mechanic)
│   ├── Elektrik (type: electric)
│   ├── Instrumentierung (type: instrument)
│   └── Rohrleitungen (type: piping)
└── EMR-Stellen                    → öffnet Emr.wfm
    ├── [KV-Nummer 1]
    │   └── [Abgang → EMR-Stelle]
    └── [KV-Nummer 2]

Verzeichnisstruktur

wvds-amed-cafm/
├── src-pas/
│   ├── extension.pas
│   ├── Cafm.Interop.pas
│   ├── Cafm.TechPlace.pas
│   ├── Cafm.TechPlaceDetail.pas
│   ├── Cafm.Objects.pas
│   ├── Cafm.ObjectDetail.pas
│   ├── Cafm.Emr.pas
│   ├── services/
│   │   ├── Services.Lifecycle.pas
│   │   └── Services.Gateway.pas
│   └── tree/
│       └── Tree.Cafm.pas
├── forms/
│   ├── TechPlace.wfm
│   ├── TechPlaceDetail.wfm
│   ├── Objects.wfm
│   ├── ObjectDetail.wfm
│   └── Emr.wfm
├── media/
│   └── icons/
│       ├── activity-bar.svg
│       └── cafm.svg
├── dist/
├── package.json
├── package.nls.json
├── package.nls.de.json
├── build.ps1
├── CLAUDE.md
└── .vscodeignore

package.json (Gerüst)

{
  "name": "wvds-amed-cafm",
  "displayName": "%extension.displayName%",
  "description": "%extension.description%",
  "version": "0.1.0",
  "publisher": "wvds",
  "engines": { "vscode": "^1.85.0" },
  "categories": ["Other"],
  "activationEvents": ["onStartupFinished"],
  "main": "./dist/extension.js",
  "contributes": {
    "viewsContainers": {
      "activitybar": [
        { "id": "amedCafm", "title": "%viewsContainer.title%", "icon": "media/icons/activity-bar.svg" }
      ]
    },
    "views": {
      "amedCafm": [
        { "id": "amedCafmExplorer", "name": "%views.explorer.name%" }
      ]
    },
    "commands": [
      { "command": "amed.cafm.openTechPlace",   "title": "%commands.openTechPlace.title%" },
      { "command": "amed.cafm.openObjects",      "title": "%commands.openObjects.title%" },
      { "command": "amed.cafm.openEmr",          "title": "%commands.openEmr.title%" },
      { "command": "amed.cafm.refreshExplorer",  "title": "%commands.refresh.title%", "icon": "$(refresh)" }
    ]
  }
}
Zuletzt geändert: den 06.03.2026 um 08:58