+ Dokument mit Belegkette und GAEB-Import X/P/D 81–86 (0.28.0)
Some checks failed
Prüfung / tests (push) Has been cancelled
Prüfung / container (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
Claude
2026-10-22 08:00:31 +00:00
parent 58cf2ae682
commit 1c42265a28
18 changed files with 1262 additions and 36 deletions

View File

@@ -7,7 +7,7 @@ import { type Pool, transaktion } from "./db.js";
import type { Einstellungen } from "./einstellungen.js";
import { werName } from "./anmeldung.js";
import { artikelNach, nurLeistungen, rechneLeistung, stammSaetze, vorlagen } from "./leistungen-daten.js";
import { leseGaeb } from "../domain/gaeb.js";
import { leseGaebDatei } from "../domain/gaeb.js";
import type { Mengenvorlage } from "../domain/mengenvorlagen.js";
const IdParam = z.object({ id: z.string().min(1).max(80) });
@@ -68,7 +68,7 @@ export function registriereStammdaten(app: FastifyInstance, pool: Pool, einstell
app.post("/api/leistungen/gaeb", async (req, reply) => {
const q = z.object({ dateiname: z.string().trim().min(1).max(200), text: z.string().min(1).max(30_000_000), ordner: z.string().trim().max(200).optional() }).parse(req.body ?? {});
let lv;
try { lv = leseGaeb(q.text); } catch (e) { return reply.status(400).send({ fehler: (e as Error).message }); }
try { lv = leseGaebDatei(q.text, q.dateiname); } catch (e) { return reply.status(400).send({ fehler: (e as Error).message }); }
const r = await transaktion(pool, wer(req), async (c) => {
const da = (await c.query("select id, nummer, gruppe from mengenvorlage where art = 'muster' and herkunft = 'gaeb'")).rows;
const nach = new Map(da.map((x) => [`${x.gruppe}|${x.nummer}`, x.id as string]));