Ausstellen
This commit is contained in:
@@ -129,7 +129,7 @@ export const GET = defineApiRoute({
|
||||
if (pdfDatenblatt) {
|
||||
const command = new PutObjectCommand({
|
||||
Bucket: "ibc-pdfs",
|
||||
Key: `ID_${ausweis.id}_Energieausweis.pdf`,
|
||||
Key: `ID_${ausweis.id}_Datenblatt.pdf`,
|
||||
Body: pdfDatenblatt,
|
||||
ACL: "private",
|
||||
});
|
||||
|
||||
@@ -122,32 +122,27 @@ export const GET = defineApiRoute({
|
||||
? "Energiebedarfsausweis"
|
||||
: "Energieverbrauchsausweis";
|
||||
|
||||
const body = `<Datenregistratur xmlns="http://energieausweis.dibt.de/WebServiceEnergie/DibtEnergieAusweisService">
|
||||
<doc>
|
||||
<root>
|
||||
<Authentifizierung>
|
||||
<Aussteller_ID_DIBT>${Aussteller_ID_DIBT}</Aussteller_ID_DIBT>
|
||||
<Aussteller_PWD_DIBT>${Aussteller_PWD_DIBT}</Aussteller_PWD_DIBT>
|
||||
</Authentifizierung>
|
||||
<EnEV-Nachweis>
|
||||
<Ausstellungsdatum>${Ausstellungsdatum}</Ausstellungsdatum>
|
||||
<Bundesland>${postleitzahl.bundesland}</Bundesland>
|
||||
<Postleitzahl>${postleitzahl.plz}</Postleitzahl>
|
||||
<Gesetzesgrundlage>${Gesetzesgrundlage}</Gesetzesgrundlage>
|
||||
</EnEV-Nachweis>
|
||||
<Energieausweis-Daten>
|
||||
<Gebaeudeart>${gebaeudeart}</Gebaeudeart>
|
||||
<Art>${art}</Art>
|
||||
<Neubau>${
|
||||
ausweis.ausstellgrund ===
|
||||
Enums.Ausstellgrund.Neubau
|
||||
? "1"
|
||||
: "0"
|
||||
}</Neubau>
|
||||
</Energieausweis-Daten>
|
||||
</root>
|
||||
</doc>
|
||||
</Datenregistratur>`;
|
||||
const requestPayload = {
|
||||
doc: {
|
||||
root: {
|
||||
Authentifizierung: {
|
||||
Aussteller_ID_DIBT: Aussteller_ID_DIBT,
|
||||
Aussteller_PWD_DIBT: Aussteller_PWD_DIBT,
|
||||
},
|
||||
'EnEV-Nachweis': {
|
||||
Ausstellungsdatum: Ausstellungsdatum,
|
||||
Bundesland: postleitzahl.bundesland,
|
||||
Postleitzahl: postleitzahl.plz,
|
||||
Gesetzesgrundlage: Gesetzesgrundlage,
|
||||
},
|
||||
'Energieausweis-Daten': {
|
||||
Gebaeudeart: gebaeudeart,
|
||||
Art: art,
|
||||
Neubau: ausweis.ausstellgrund === Enums.Ausstellgrund.Neubau ? "1" : "0",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return await new Promise(async (resolve, reject) => {
|
||||
soap.createClient(
|
||||
@@ -162,7 +157,7 @@ export const GET = defineApiRoute({
|
||||
}
|
||||
|
||||
client.Datenregistratur(
|
||||
body,
|
||||
requestPayload,
|
||||
async function (
|
||||
err: any,
|
||||
result: {
|
||||
|
||||
Reference in New Issue
Block a user