adapt architecture, added new prototype for WF-200

This commit is contained in:
2025-11-14 14:06:03 +01:00
parent 7488bc19b1
commit 4eeb92f939
5 changed files with 264 additions and 88 deletions

View File

@@ -168,11 +168,32 @@ results = Table(
Column("bedarf_sequenz", sql.Integer, nullable=False),
Column("vorlage", sql.Boolean, nullable=False),
Column("wf_id", sql.Integer, nullable=False),
Column("best_menge", sql.Integer, nullable=False),
Column("best_menge", sql.Integer, nullable=True),
Column("freigabe_auto", sql.Boolean, nullable=False),
)
results_schema_map: PolarsSchema = {
"id": pl.UInt32,
"bedarf_nr": pl.UInt32,
"bedarf_sequenz": pl.UInt32,
"vorlage": pl.Boolean,
"wf_id": pl.UInt16,
"best_menge": pl.UInt32,
"freigabe_auto": pl.Boolean,
}
map_to_result: dict[str, str] = {
"BEDARFNR": "bedarf_nr",
"BEDP_SEQUENZ": "bedarf_sequenz",
}
raw_data_query_schema_map: PolarsSchema = {
"BEDARFNR": pl.UInt32,
"BEDP_SEQUENZ": pl.UInt32,
"BEDP_TITELNR": pl.UInt32,
"BEDP_MAN": pl.UInt8,
"BEDP_MENGE_BEDARF_VM": pl.UInt32,
"MELDENUMMER": pl.UInt8,
"MENGE_VORMERKER": pl.UInt32,
}

View File

@@ -1,5 +1,6 @@
from __future__ import annotations
import enum
from dataclasses import dataclass
from typing import TypeAlias
@@ -7,3 +8,8 @@ import polars as pl
PolarsSchema: TypeAlias = dict[str, type[pl.DataType]]
PolarsNullValues: TypeAlias = dict[str, str]
class Freigabe(enum.Enum):
WF_100 = False
WF_200 = False