Korrekturen für das dbh Format (peinlich, dass mir das zuvor entgangen ist..)

This commit is contained in:
Daniel Schick 2022-12-14 11:58:18 +01:00
parent 964e2aa967
commit f0d3f5cbb1

View File

@ -29,7 +29,8 @@ namespace bsmd.dbh
root.SourceDocumentVersion = "7.1";
root.Timestamp = DateTime.Now;
root.Sender = Properties.Settings.Default.Sender;
root.SenderReference = message.Id.ToString();
root.SenderReference = message.Id.Value.ToString("N");
bsmd.database.ReportingParty reportingParty = DBManager.Instance.GetReportingPartyDict()[core.DefaultReportingPartyId.Value];
Request.ReportingParty rp = new Request.ReportingParty();
rp.RPCity = reportingParty.City;
@ -47,6 +48,26 @@ namespace bsmd.dbh
rp.RPType = (ReportingPartyRPType)reportingParty.ReportingPartyType.Value;
root.ReportingParty = rp;
if(!core.VisitId.IsNullOrEmpty())
{
root.Item = core.VisitId;
root.ItemElementName = ItemChoiceType2.VisitId;
}
if(!core.TransitId.IsNullOrEmpty())
{
root.Item = core.TransitId;
root.ItemElementName = ItemChoiceType2.TransitId;
}
if (message.Reset)
{
RootReportingClassesToReset rrctr = new RootReportingClassesToReset();
rrctr.ReportingClassToReset = new string[1];
rrctr.ReportingClassToReset[0] = message.MessageNotificationClassDisplay;
}
else
{
switch (message.MessageNotificationClass)
{
@ -1598,7 +1619,8 @@ namespace bsmd.dbh
RootWAS_RCPT rootWAS_RCPT = new RootWAS_RCPT();
rootWAS_RCPT.WasteDeliveryReceipt = new RootWAS_RCPTWasteDeliveryReceipt[message.Elements.Count];
for(int i = 0; i < message.Elements.Count; i++) {
for (int i = 0; i < message.Elements.Count; i++)
{
WAS_RCPT was_rcpt = message.Elements[i] as WAS_RCPT;
RootWAS_RCPTWasteDeliveryReceipt rwr = new RootWAS_RCPTWasteDeliveryReceipt();
@ -1636,6 +1658,7 @@ namespace bsmd.dbh
_log.WarnFormat("Message type {0} not (yet) supported for dbh", message.MessageNotificationClassDisplay);
break;
}
}
// serialize output structure to file