3.0.12 Korrekturen HIS Nord und Dakosy
This commit is contained in:
parent
28f66f3191
commit
0ae6ec8605
Binary file not shown.
@ -87,7 +87,7 @@ namespace SendNSWMessageService
|
||||
|
||||
if (core.InitialHIS == Message.NSWProvider.DUDR)
|
||||
{
|
||||
// Rostocker: wir senden alle Nachrichten auf einmal
|
||||
// HIS-NORD: alles auf einmal
|
||||
sendSucceeded = bsmd.hisnord.Request.Send(messages);
|
||||
|
||||
if (!sendSucceeded) core.BSMDStatusInternal = MessageCore.BSMDStatus.FAILURE;
|
||||
@ -133,9 +133,13 @@ namespace SendNSWMessageService
|
||||
|
||||
foreach (Message message in messages)
|
||||
{
|
||||
// Eine Nachricht mit dem Status "Suspended / Zurückgestellt" wird so lange nicht
|
||||
// versendet, bis im ENI der Status wieder explizit zurückgesetzt wird (16.4.16)
|
||||
if (message.InternalStatus == Message.BSMDStatus.SUSPENDED) continue;
|
||||
|
||||
// Wenn das ein Transit ist, werden nicht erforderliche Meldeklassen übersprungen
|
||||
if (core.IsTransit)
|
||||
{
|
||||
{
|
||||
if ((message.MessageNotificationClass == Message.NotificationClass.BKRD) ||
|
||||
(message.MessageNotificationClass == Message.NotificationClass.PRE72H) ||
|
||||
(message.MessageNotificationClass == Message.NotificationClass.TIEFD) ||
|
||||
@ -153,47 +157,7 @@ namespace SendNSWMessageService
|
||||
// Visit/Transit Meldeklassen werden nicht erneut übertragen
|
||||
if ((message.MessageNotificationClass == Message.NotificationClass.VISIT) ||
|
||||
(message.MessageNotificationClass == Message.NotificationClass.TRANSIT))
|
||||
continue;
|
||||
/*
|
||||
// Wenn kein Gefahrgut gemeldet ist soll die Meldeklasse gar nicht gesendet werden
|
||||
if((message.MessageNotificationClass == Message.NotificationClass.HAZA) ||
|
||||
(message.MessageNotificationClass == Message.NotificationClass.HAZD))
|
||||
{
|
||||
if (message.Elements.Count > 0)
|
||||
{
|
||||
HAZ haz = message.Elements[0] as HAZ;
|
||||
if (haz != null)
|
||||
{
|
||||
if (haz.NoDPGOnBoardOnArrival ?? false) continue;
|
||||
if (haz.TransmissionType != "EU-NOAD") continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ATD wird nur gesendet, wenn weniger als 60 Minuten in der Zukunft
|
||||
// und auch nicht älter als eine Woche
|
||||
if(message.MessageNotificationClass == Message.NotificationClass.ATD)
|
||||
{
|
||||
if (message.Elements.Count > 0)
|
||||
{
|
||||
bsmd.database.ATD atd = message.Elements[0] as bsmd.database.ATD;
|
||||
if (!atd.ATDPortOfCall.HasValue) continue;
|
||||
if ((atd.ATDPortOfCall.Value - DateTime.UtcNow).TotalMinutes > 60) continue;
|
||||
if ((DateTime.UtcNow - atd.ATDPortOfCall.Value).TotalDays > 7) continue;
|
||||
}
|
||||
}
|
||||
|
||||
// ATA älter als eine Woche wird auch nicht versendet
|
||||
if(message.MessageNotificationClass == Message.NotificationClass.ATA)
|
||||
{
|
||||
if(message.Elements.Count > 0)
|
||||
{
|
||||
bsmd.database.ATA ata = message.Elements[0] as bsmd.database.ATA;
|
||||
if (!ata.ATAPortOfCall.HasValue) continue;
|
||||
if ((DateTime.UtcNow - ata.ATAPortOfCall.Value).TotalDays > 7) continue;
|
||||
}
|
||||
}
|
||||
*/
|
||||
continue;
|
||||
|
||||
if ((message.InternalStatus != Message.BSMDStatus.CONFIRMED) &&
|
||||
(message.InternalStatus != Message.BSMDStatus.SENT))
|
||||
@ -224,20 +188,20 @@ namespace SendNSWMessageService
|
||||
|
||||
// switch über passendes HIS / Schnittstelle
|
||||
switch (message.HIS)
|
||||
{
|
||||
// TODO: Das muss wieder entfernt werden wenn 3.0 funktional geht
|
||||
{
|
||||
case Message.NSWProvider.DBH:
|
||||
case Message.NSWProvider.DBH_TEST:
|
||||
sendSucceeded = bsmd.dbh.Request.SendMessage(message, (message.HIS == Message.NSWProvider.DBH_TEST));
|
||||
if (!sendSucceeded)
|
||||
message.InternalStatus = Message.BSMDStatus.SEND_FAILED;
|
||||
break;
|
||||
/*
|
||||
|
||||
case Message.NSWProvider.DAKOSY:
|
||||
sendSucceeded = bsmd.dakosy.Request.Send(message);
|
||||
case Message.NSWProvider.DAKOSY_TEST:
|
||||
sendSucceeded = bsmd.dakosy.Request.Send(message, true);
|
||||
if (!sendSucceeded) message.InternalStatus = Message.BSMDStatus.SEND_FAILED;
|
||||
break;
|
||||
*/
|
||||
break;
|
||||
|
||||
default:
|
||||
_log.WarnFormat("Initial HIS not specified for message {0}", message.Id);
|
||||
break;
|
||||
|
||||
@ -31,6 +31,9 @@
|
||||
<setting name="SendEMailSubject" serializeAs="String">
|
||||
<value>Reference Excel Sheet</value>
|
||||
</setting>
|
||||
<setting name="TestMode" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</bsmd.ExcelReadService.Properties.Settings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
@ -66,64 +66,77 @@ namespace bsmd.ExcelReadService
|
||||
try
|
||||
{
|
||||
string messageId = "";
|
||||
string attachmentLocalPath = "";
|
||||
string attachmentLocalPath = null;
|
||||
string mailSender = "";
|
||||
|
||||
using (BSMDPopClient bsmdPopClient = new BSMDPopClient())
|
||||
{
|
||||
// if (!bsmdPopClient.IsConnected)
|
||||
//{
|
||||
// _log.Error("cannot connect to pop3 server, aborting!");
|
||||
// this.Stop();
|
||||
//}
|
||||
|
||||
// --- BEGIN ------------ TEST
|
||||
|
||||
ExcelReader er = new ExcelReader(@"E:\work\bsmd\nsw\Source\bsmd.ExcelReadService\2016_01_08_BMSD - EUNoAD Tool Rev 3.0_mit Testdaten.xls");
|
||||
string amsg;
|
||||
MessageCore aCore;
|
||||
bool aReadResult = Util.ProcessSheet(er, out amsg, out aCore);
|
||||
er.Dispose();
|
||||
|
||||
// --- END --------------- TEST
|
||||
|
||||
// check and download next e-Mail, saving attachment
|
||||
while (bsmdPopClient.ReceiveSingleMail(out attachmentLocalPath, out messageId, out mailSender))
|
||||
if (!bsmdPopClient.IsConnected)
|
||||
{
|
||||
_log.Error("cannot connect to pop3 server!");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
bool readResult;
|
||||
string readMessage = "";
|
||||
MessageCore messageCore = null;
|
||||
|
||||
// try to read/import attachment
|
||||
using(ExcelReader reader = new ExcelReader(attachmentLocalPath))
|
||||
// --- BEGIN ------------ TEST
|
||||
|
||||
/*
|
||||
ExcelReader er = new ExcelReader(@"E:\work\bsmd\nsw\Source\bsmd.ExcelReadService\2016_01_08_BMSD - EUNoAD Tool Rev 3.0_mit Testdaten.xls");
|
||||
string amsg;
|
||||
MessageCore aCore;
|
||||
bool aReadResult = Util.ProcessSheet(er, out amsg, out aCore);
|
||||
er.Dispose();
|
||||
*/
|
||||
|
||||
// --- END --------------- TEST
|
||||
|
||||
// check and download next e-Mail, saving attachment
|
||||
while (bsmdPopClient.ReceiveSingleMail(out attachmentLocalPath, out messageId, out mailSender))
|
||||
{
|
||||
readResult = Util.ProcessSheet(reader, out readMessage, out messageCore);
|
||||
if(!readResult)
|
||||
_log.Error("Excel sheet could not be interpreted");
|
||||
|
||||
bool readResult;
|
||||
string readMessage = "";
|
||||
MessageCore messageCore = null;
|
||||
|
||||
if (attachmentLocalPath == null)
|
||||
{
|
||||
_log.WarnFormat("incoming E-Mail did not contain an Excel attachment!");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// try to read/import attachment
|
||||
using (ExcelReader reader = new ExcelReader(attachmentLocalPath))
|
||||
{
|
||||
readResult = Util.ProcessSheet(reader, out readMessage, out messageCore);
|
||||
if (!readResult)
|
||||
_log.Error("Excel sheet could not be interpreted");
|
||||
}
|
||||
|
||||
// TODO: Quittung / set messagecore to createreport and let reportGenerator create a reply?
|
||||
|
||||
// create a reply sheet (template + scanned highlighted content for verification
|
||||
|
||||
string confirmationExcelFilePath = Util.CreateConfirmationSheet(messageCore);
|
||||
List<string> sendItems = new List<string>();
|
||||
sendItems.Add(confirmationExcelFilePath);
|
||||
// send reply sheet back to sender
|
||||
BSMDMail.SendNSWReportWithAttachments(Properties.Settings.Default.SendEMailSubject, sendItems);
|
||||
|
||||
// remove e-Mail
|
||||
_log.InfoFormat("deleting mail with messageId {0}", messageId);
|
||||
_log.InfoFormat("mail delete {0}", bsmdPopClient.DeleteMessageByMessageId(messageId) ? "successful" : "failed");
|
||||
|
||||
// remove attachment
|
||||
_log.InfoFormat("removing local file {0}", attachmentLocalPath);
|
||||
|
||||
if(!Properties.Settings.Default.TestMode)
|
||||
File.Delete(attachmentLocalPath);
|
||||
}
|
||||
|
||||
attachmentLocalPath = null;
|
||||
}
|
||||
|
||||
// TODO: Quittung / set messagecore to createreport and let reportGenerator create a reply?
|
||||
|
||||
// create a reply sheet (template + scanned highlighted content for verification
|
||||
|
||||
string confirmationExcelFilePath = Util.CreateConfirmationSheet(messageCore);
|
||||
List<string> sendItems = new List<string>();
|
||||
sendItems.Add(confirmationExcelFilePath);
|
||||
// send reply sheet back to sender
|
||||
BSMDMail.SendNSWReportWithAttachments(Properties.Settings.Default.SendEMailSubject, sendItems);
|
||||
|
||||
// remove e-Mail
|
||||
_log.InfoFormat("deleting mail with messageId {0}", messageId);
|
||||
_log.InfoFormat("mail delete {0}", bsmdPopClient.DeleteMessageByMessageId(messageId) ? "successful" : "failed");
|
||||
|
||||
// remove attachment
|
||||
_log.InfoFormat("removing local file {0}", attachmentLocalPath);
|
||||
// File.Delete(attachmentLocalPath);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,9 +148,8 @@ namespace bsmd.ExcelReadService
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.EventLog.WriteEntry("ReportService stopped: DB connection failed", EventLogEntryType.Error);
|
||||
this.Stop();
|
||||
{
|
||||
_log.Error("DB Connection failure");
|
||||
}
|
||||
|
||||
lock (this._timerlock)
|
||||
|
||||
@ -85,5 +85,14 @@ namespace bsmd.ExcelReadService.Properties {
|
||||
return ((string)(this["SendEMailSubject"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool TestMode {
|
||||
get {
|
||||
return ((bool)(this["TestMode"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,5 +23,8 @@
|
||||
<Setting Name="SendEMailSubject" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">Reference Excel Sheet</Value>
|
||||
</Setting>
|
||||
<Setting Name="TestMode" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -23,7 +23,7 @@ namespace bsmd.dakosy
|
||||
|
||||
#region send single message
|
||||
|
||||
public static bool Send(Message aMessage)
|
||||
public static bool Send(Message aMessage, bool useTestSystem)
|
||||
{
|
||||
bool retval = true;
|
||||
try
|
||||
@ -776,11 +776,10 @@ namespace bsmd.dakosy
|
||||
|
||||
// call sftp client to send
|
||||
sftp.Put(fileName,
|
||||
Properties.Settings.Default.TestMode ?
|
||||
Properties.Settings.Default.RemoteTestIncomingDir : Properties.Settings.Default.RemoteProdIncomingDir);
|
||||
useTestSystem ? Properties.Settings.Default.RemoteTestIncomingDir : Properties.Settings.Default.RemoteProdIncomingDir);
|
||||
|
||||
// remove sent file if not test mode
|
||||
if (!Properties.Settings.Default.TestMode)
|
||||
if (!useTestSystem)
|
||||
File.Delete(fileName);
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
||||
@ -142,7 +142,8 @@ namespace bsmd.database
|
||||
SEND_FAILED,
|
||||
CONFIRMED,
|
||||
VIOLATION,
|
||||
ERROR,
|
||||
ERROR,
|
||||
SUSPENDED = 8
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -154,7 +155,9 @@ namespace bsmd.database
|
||||
DBH,
|
||||
DAKOSY,
|
||||
DUDR,
|
||||
DBH_TEST
|
||||
DBH_TEST,
|
||||
DAKOSY_TEST,
|
||||
DUDR_TEST
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -42,8 +42,8 @@ namespace bsmd.database
|
||||
|
||||
scmd.Parameters.AddWithValue("@MHID", this.MessageHeaderId);
|
||||
scmd.Parameters.AddWithValue("@VC", this.ErrorCode);
|
||||
scmd.Parameters.AddWithValue("@VT", this.ErrorText);
|
||||
scmd.Parameters.AddWithValue("@DEL", this.Deleted ? 1 : 0);
|
||||
scmd.Parameters.AddWithValue("@VT", this.ErrorText ?? "");
|
||||
scmd.Parameters.AddWithValue("@DEL", this.Deleted ? 1 : 0);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.9")]
|
||||
[assembly: AssemblyInformationalVersion("3.0.12")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.0.9.*")]
|
||||
[assembly: AssemblyVersion("3.0.12.*")]
|
||||
|
||||
|
||||
@ -23,6 +23,10 @@ namespace bsmd.database
|
||||
/// <returns>true falls Nachricht versendet werden soll</returns>
|
||||
public static bool ShouldSendMessage(Message message)
|
||||
{
|
||||
// zurückgestellte Nachrichten werden ignoriert. Das kann ggf. ein Problem werden, wenn die
|
||||
// Nachricht bei HIS-Nord ein wesentlicher Bestandteil ist. -> muss beobachtet werden
|
||||
|
||||
if (message.InternalStatus == Message.BSMDStatus.SUSPENDED) return false;
|
||||
|
||||
// Wenn das ein Transit ist, werden nicht erforderliche Meldeklassen übersprungen
|
||||
if (message.MessageCore.IsTransit)
|
||||
|
||||
@ -391,7 +391,19 @@ namespace bsmd.hisnord
|
||||
// abweichende Einträge hier eine Überschreibung verursachen
|
||||
|
||||
if (!imdgPosition.StowagePosition.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].LocationOnBoard = imdgPosition.StowagePosition;
|
||||
_nsw.conveyance.GeneralCargo[0].Item = imdgPosition.StowagePosition;
|
||||
else
|
||||
{
|
||||
if(!imdgPosition.Bay.IsNullOrEmpty() || !imdgPosition.Row.IsNullOrEmpty() || !imdgPosition.Tier.IsNullOrEmpty())
|
||||
{
|
||||
stowagepositionbayrowtier spbr = new stowagepositionbayrowtier();
|
||||
spbr.Bay = imdgPosition.Bay;
|
||||
spbr.Row = imdgPosition.Row;
|
||||
spbr.Tier = imdgPosition.Tier;
|
||||
_nsw.conveyance.GeneralCargo[0].Item = spbr;
|
||||
}
|
||||
}
|
||||
|
||||
if (!imdgPosition.PortOfLoading.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = imdgPosition.PortOfLoading;
|
||||
if (!imdgPosition.PortOfDischarge.IsNullOrEmpty())
|
||||
@ -431,9 +443,10 @@ namespace bsmd.hisnord
|
||||
if (ibcPosition.SpecRef15_19.HasValue)
|
||||
pi.SpecRef15_19 = ibcPosition.SpecRef15_19.Value ? yorntype.Y : yorntype.N;
|
||||
pi.Remarks = ibcPosition.Remarks;
|
||||
|
||||
|
||||
if (!ibcPosition.StowagePosition.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].LocationOnBoard = ibcPosition.StowagePosition;
|
||||
_nsw.conveyance.GeneralCargo[0].Item = ibcPosition.StowagePosition;
|
||||
|
||||
if (!ibcPosition.PortOfLoading.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = ibcPosition.PortOfLoading;
|
||||
if (!ibcPosition.PortOfDischarge.IsNullOrEmpty())
|
||||
@ -468,7 +481,8 @@ namespace bsmd.hisnord
|
||||
pi.Remarks = igcPosition.Remarks;
|
||||
|
||||
if (!igcPosition.StowagePosition.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].LocationOnBoard = igcPosition.StowagePosition;
|
||||
_nsw.conveyance.GeneralCargo[0].Item = igcPosition.StowagePosition;
|
||||
|
||||
if (!igcPosition.PortOfLoading.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = igcPosition.PortOfLoading;
|
||||
if (!igcPosition.PortOfDischarge.IsNullOrEmpty())
|
||||
@ -502,9 +516,10 @@ namespace bsmd.hisnord
|
||||
if (imsbcPosition.Quantity_KGM.HasValue)
|
||||
pi.NetMassKGM = (float)imsbcPosition.Quantity_KGM.Value;
|
||||
pi.Remarks = imsbcPosition.Remarks;
|
||||
|
||||
|
||||
if (!imsbcPosition.StowagePosition.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].LocationOnBoard = imsbcPosition.StowagePosition;
|
||||
_nsw.conveyance.GeneralCargo[0].Item = imsbcPosition.StowagePosition;
|
||||
|
||||
if (!imsbcPosition.PortOfLoading.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = imsbcPosition.PortOfLoading;
|
||||
if (!imsbcPosition.PortOfDischarge.IsNullOrEmpty())
|
||||
@ -540,7 +555,8 @@ namespace bsmd.hisnord
|
||||
pi.Remarks = marpolPosition.Remarks;
|
||||
|
||||
if (!marpolPosition.StowagePosition.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].LocationOnBoard = marpolPosition.StowagePosition;
|
||||
_nsw.conveyance.GeneralCargo[0].Item = marpolPosition.StowagePosition;
|
||||
|
||||
if (!marpolPosition.PortOfLoading.IsNullOrEmpty())
|
||||
_nsw.conveyance.GeneralCargo[0].PortOfLoadingLocode = marpolPosition.PortOfLoading;
|
||||
if (!marpolPosition.PortOfDischarge.IsNullOrEmpty())
|
||||
@ -625,13 +641,18 @@ namespace bsmd.hisnord
|
||||
if (mdh.AwareOfFurtherInfections.HasValue)
|
||||
_mdh.AwareOfConditionsForFurtherInfections = mdh.AwareOfFurtherInfections.Value ? yorntype.Y : yorntype.N;
|
||||
|
||||
if (mdh.InfectedAreaDate.HasValue && !mdh.InfectedAreaPort.IsNullOrEmpty())
|
||||
if (mdh.InfectedAreas.Count > 0)
|
||||
{
|
||||
_mdh.InfectedArea = new infectedarea();
|
||||
if (mdh.InfectedAreaDate.HasValue)
|
||||
_mdh.InfectedArea.InfectedAreaDate = mdh.InfectedAreaDate.Value;
|
||||
_mdh.InfectedArea.InfectedAreaPort = mdh.InfectedAreaPort;
|
||||
_mdh.InfectedAreas = new infectedarea[mdh.InfectedAreas.Count];
|
||||
for (int i = 0; i < mdh.InfectedAreas.Count; i++)
|
||||
{
|
||||
_mdh.InfectedAreas[i] = new infectedarea();
|
||||
if (mdh.InfectedAreas[i].InfectedAreaDate.HasValue)
|
||||
_mdh.InfectedAreas[i].InfectedAreaDate = mdh.InfectedAreas[i].InfectedAreaDate.Value;
|
||||
_mdh.InfectedAreas[i].InfectedAreaPort = mdh.InfectedAreas[i].InfectedAreaPort;
|
||||
}
|
||||
}
|
||||
|
||||
if (mdh.InfectedAreaVisited.HasValue)
|
||||
_mdh.InfectedAreaVisited = mdh.InfectedAreaVisited.Value ? yorntype.Y : yorntype.N;
|
||||
if (mdh.MedicalConsulted.HasValue)
|
||||
@ -670,13 +691,18 @@ namespace bsmd.hisnord
|
||||
_mdh.SanitaryControlReinspectionRequired = mdh.SanitaryControlReinspectionRequired.Value ? yorntype.Y : yorntype.N;
|
||||
if (mdh.SanitaryMeasuresApplied.HasValue)
|
||||
_mdh.SanitaryMeasuresApplied = mdh.SanitaryMeasuresApplied.Value ? yorntype.Y : yorntype.N;
|
||||
if (mdh.SanitaryMeasuresDate.HasValue && !mdh.SanitaryMeasuresLocation.IsNullOrEmpty() && !mdh.SanitaryMeasuresType.IsNullOrEmpty())
|
||||
|
||||
if (mdh.SanitaryMeasuresDetails.Count > 0)
|
||||
{
|
||||
_mdh.SanitaryMeasuresDetails = new sanitarydetails();
|
||||
if (mdh.SanitaryMeasuresDate.HasValue)
|
||||
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresDate = mdh.SanitaryMeasuresDate.Value;
|
||||
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresLocation = mdh.SanitaryMeasuresLocation;
|
||||
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresType = mdh.SanitaryMeasuresType;
|
||||
_mdh.SanitaryMeasuresDetails = new sanitarydetail[mdh.SanitaryMeasuresDetails.Count];
|
||||
for (int i = 0; i < mdh.SanitaryMeasuresDetails.Count; i++)
|
||||
{
|
||||
_mdh.SanitaryMeasuresDetails[i] = new sanitarydetail();
|
||||
if (mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate.HasValue)
|
||||
_mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate = mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate.Value;
|
||||
_mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresLocation = mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresLocation;
|
||||
_mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresType = mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresType;
|
||||
}
|
||||
}
|
||||
if (mdh.SickAnimalOrPetOnBoard.HasValue)
|
||||
_mdh.SickAnimalOrPetOnBoard = mdh.SickAnimalOrPetOnBoard.Value ? yorntype.Y : yorntype.N;
|
||||
@ -684,9 +710,14 @@ namespace bsmd.hisnord
|
||||
_mdh.SickPersonOnBoard = mdh.SickPersonsOnBoard.Value ? yorntype.Y : yorntype.N;
|
||||
|
||||
_mdh.StowawaysDetected = (mdh.StowawaysDetected ?? false) ? yorntype.Y : yorntype.N;
|
||||
if(_mdh.StowawaysDetected == yorntype.Y)
|
||||
_mdh.StowawayJoiningLocation = mdh.StowawaysJoiningLocation;
|
||||
|
||||
if ((_mdh.StowawaysDetected == yorntype.Y) && (mdh.StowawaysJoiningLocations.Count > 0))
|
||||
{
|
||||
_mdh.StowawayJoiningLocations = new string[mdh.StowawaysJoiningLocations.Count];
|
||||
for (int i = 0; i < mdh.StowawaysJoiningLocations.Count; i++)
|
||||
{
|
||||
_mdh.StowawayJoiningLocations[i] = mdh.StowawaysJoiningLocations[i].StowawayJoiningLocation;
|
||||
}
|
||||
}
|
||||
if (mdh.SuspisionInfectiousNature.HasValue)
|
||||
_mdh.SuspisionInfectiousNature = mdh.SuspisionInfectiousNature.Value ? yorntype.Y : yorntype.N;
|
||||
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
Spezialitäten bei HIS Nord (Stand 25.7.15)
|
||||
Spezialitäten bei HIS Nord (Stand 17.4.16)
|
||||
|
||||
Generell: Die Datenvorlage (XSD) wird per xsd.exe /classes aus den einzelnen Quelldateien generiert. Wir bekommen XSD 1.1 geliefert
|
||||
(Java-Implementierung auf der Gegenseite), wofür es unter .NET keine Unterstützung gibt. Ich habe mich so beholfen, alle "ASSERT"s aus
|
||||
dem XSD einfach zu löschen, damit funktioniert dann die Konvertierung. Allerdings verlieren wir dann die Validierung bei der Erzeugung.
|
||||
-> Assert Prüfungen müssen in der zukünftigen Benutzerschnittstelle implementiert werden
|
||||
|
||||
- "transmitter" wird verwendet um die erzeugten Daten an D&D zu schicken
|
||||
- eine Rückmeldung erfolgt direkt über das Transmitter-Tool (Verstoß gegen XSD) oder über Email an den Meldenden, das passiert
|
||||
|
||||
Loading…
Reference in New Issue
Block a user