Klimafaktoren

This commit is contained in:
Moritz Utcke
2025-04-07 23:55:42 -04:00
parent 1970a105a9
commit 176f1c08ad
4 changed files with 54 additions and 3 deletions

View File

@@ -2,7 +2,8 @@ import { AufnahmeClient, ObjektClient, VerbrauchsausweisGewerbeClient } from "#c
import { getKlimafaktoren } from "#lib/Klimafaktoren.js";
import { getHeizwertfaktor } from "#lib/server/Heizwertfaktor.js";
import moment from "moment";
import bauwerkskatalog from "./bauwerkskatalog.json" assert { type: "json" }
import bauwerkskatalog from "./bauwerkskatalog.json" with { type: "json" }
import { getKlimafaktorenServer } from "#lib/server/klimafaktoren.js";
function vergleichsWertNichtWohngebaeude(ausweis: VerbrauchsausweisGewerbeClient, aufnahme: AufnahmeClient) {
let tekWerte = new Array(8).fill(0);
@@ -85,7 +86,7 @@ export async function endEnergieVerbrauchVerbrauchsausweisGewerbe_2016(ausweis:
}];
try {
const response = await getKlimafaktoren(ausweis.startdatum, objekt.plz)
const response = await getKlimafaktorenServer(objekt.plz as string, moment(ausweis.startdatum).toDate(), moment(ausweis.startdatum).add(2, "years").toDate())
if (response) {
klimafaktoren = response