Version 2.4.0 Stand 18.10.15

This commit is contained in:
Daniel Schick 2015-10-18 05:45:00 +00:00
parent 646f356053
commit ab5e751720
23 changed files with 210 additions and 26 deletions

Binary file not shown.

View File

@ -117,9 +117,22 @@ namespace SendNSWMessageService
// nachträglich geändert werden. Ich denke hier muss in dashface ggf. der Status // nachträglich geändert werden. Ich denke hier muss in dashface ggf. der Status
// wieder auf PREPARE gesetzt werden // wieder auf PREPARE gesetzt werden
_log.Debug("Visit/Transit found, SENDING DATA messages"); _log.Debug("Visit/Transit found, SENDING DATA messages");
foreach (Message message in messages) foreach (Message message in messages)
{ {
// T // 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) ||
(message.MessageNotificationClass == Message.NotificationClass.NAME) ||
(message.MessageNotificationClass == Message.NotificationClass.INFO) ||
(message.MessageNotificationClass == Message.NotificationClass.POBD))
continue;
}
if (message.InternalStatus != Message.BSMDStatus.CONFIRMED) if (message.InternalStatus != Message.BSMDStatus.CONFIRMED)
//(message.InternalStatus == Message.BSMDStatus.PREPARE) || //(message.InternalStatus == Message.BSMDStatus.PREPARE) ||
//(message.InternalStatus == Message.BSMDStatus.TOSEND)) //(message.InternalStatus == Message.BSMDStatus.TOSEND))

View File

@ -0,0 +1,25 @@
//
// Class: ANSWMessageComparer
// Current CLR: 4.0.30319.34209
// System: Microsoft Visual Studio 10.0
// Author: dani
// Created: 8/30/2015 6:36:43 PM
//
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
using System;
using System.Collections.Generic;
using bsmd.database;
namespace bsmd.ReportGenerator
{
public class ANSWMessageComparer : IComparer<bsmd.database.Message>
{
public int Compare(Message x, Message y)
{
return Message.ANSWSortList.IndexOf(x.MessageNotificationClass).CompareTo(Message.ANSWSortList.IndexOf(y.MessageNotificationClass));
}
}
}

View File

@ -425,8 +425,8 @@ namespace bsmd.ReportGenerator
Row hRow = table.AddRow(); Row hRow = table.AddRow();
hRow.Cells[1].AddParagraph("handling type"); hRow.Cells[1].AddParagraph("handling type");
hRow.Cells[2].AddParagraph("Code (NST2007)"); hRow.Cells[2].AddParagraph("Code (NST2007)");
hRow.Cells[1].AddParagraph("Number of items"); hRow.Cells[3].AddParagraph("Number of items");
hRow.Cells[2].AddParagraph("Gross quantity (tons)"); hRow.Cells[4].AddParagraph("Gross quantity (tons)");
for (int i = 0; i < message.Elements.Count; i++) for (int i = 0; i < message.Elements.Count; i++)
{ {
@ -436,7 +436,7 @@ namespace bsmd.ReportGenerator
row.Cells[1].AddParagraph(ladg.CargoHandlingType.HasValue ? (ladg.CargoHandlingType.Value == 0) ? "Load" : "Discharge" : ""); row.Cells[1].AddParagraph(ladg.CargoHandlingType.HasValue ? (ladg.CargoHandlingType.Value == 0) ? "Load" : "Discharge" : "");
row.Cells[2].AddParagraph(ladg.CargoCodeNST ?? ""); row.Cells[2].AddParagraph(ladg.CargoCodeNST ?? "");
row.Cells[3].AddParagraph(ladg.CargoNumberOfItems.HasValue ? ladg.CargoNumberOfItems.Value.ToString() : ""); row.Cells[3].AddParagraph(ladg.CargoNumberOfItems.HasValue ? ladg.CargoNumberOfItems.Value.ToString() : "");
row.Cells[4].AddParagraph(ladg.CargoGrossQuantity_TNE.HasValue ? ladg.CargoGrossQuantity_TNE.Value.ToString() : ""); row.Cells[4].AddParagraph(ladg.CargoGrossQuantity_TNE.HasValue ? ladg.CargoGrossQuantity_TNE.Value.ToString("N2") : "");
} }
} }

View File

@ -25,7 +25,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.TIME_IMPLAUSIBLE)]
public DateTime? ATAPortOfCall { get; set; } public DateTime? ATAPortOfCall { get; set; }
#endregion #endregion

View File

@ -25,7 +25,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.TIME_IMPLAUSIBLE)]
public DateTime? ATDPortOfCall { get; set; } public DateTime? ATDPortOfCall { get; set; }
#endregion #endregion

View File

@ -132,8 +132,9 @@ namespace bsmd.database
foreach (PropertyInfo property in props) foreach (PropertyInfo property in props)
{ {
bool isDouble = (property.PropertyType == typeof(Nullable<double>));
object propValue = property.GetValue(this, null); object propValue = property.GetValue(this, null);
string value = (propValue == null) ? string.Empty : propValue.ToString(); string value = (propValue == null) ? string.Empty : (isDouble ? ((double) propValue).ToString("N2") : propValue.ToString());
string displayName = property.Name; string displayName = property.Name;
if(Attribute.IsDefined(property, typeof(ReportDisplayNameAttribute))) { if(Attribute.IsDefined(property, typeof(ReportDisplayNameAttribute))) {
ReportDisplayNameAttribute reportDisplayNameAttribute = Attribute.GetCustomAttribute(property, typeof(ReportDisplayNameAttribute)) ReportDisplayNameAttribute reportDisplayNameAttribute = Attribute.GetCustomAttribute(property, typeof(ReportDisplayNameAttribute))

View File

@ -31,9 +31,11 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)]
public bool? NoDPGOnBoardOnArrival { get; set; } public bool? NoDPGOnBoardOnArrival { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)]
public bool? DPGManifestOnBoardOnArrival { get; set; } public bool? DPGManifestOnBoardOnArrival { get; set; }
[ShowReport] [ShowReport]

View File

@ -43,7 +43,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
public string PortFacilitySecurityMattersToReport { get; set; } public string PortFacilitySecurityMattersToReport { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.GISIS)]
public string PortFacilityGISISCode { get; set; } public string PortFacilityGISISCode { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }
@ -138,11 +138,15 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations) public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{ {
bool locationOK = !this.PortFacilityPortLoCode.IsNullOrEmpty() || bool locationOK = (!this.PortFacilityPortLoCode.IsNullOrEmpty()) ||
(!this.PortFacilityPortName.IsNullOrEmpty() && !this.PortFacilityPortCountry.IsNullOrEmpty()); (!this.PortFacilityPortName.IsNullOrEmpty() && !this.PortFacilityPortCountry.IsNullOrEmpty());
if(!locationOK) if (!locationOK)
RuleEngine.CreateViolation(ValidationCode.V703, "Either LoCode or Country + Name must be given", null); {
string val = string.Format("LoCode:{0} Port:{1} Country:{2}", this.PortFacilityPortLoCode ?? "", this.PortFacilityPortName ?? "",
this.PortFacilityPortCountry ?? "");
RuleEngine.CreateViolation(ValidationCode.V703, "Either LoCode or Country + Name must be given", val);
}
} }
#endregion #endregion

View File

@ -40,7 +40,7 @@ namespace bsmd.database
{ {
get get
{ {
return "Persons on board on arrival"; return "Persons on board on departure";
} }
} }

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")] [assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[assembly: AssemblyProduct("BSMD NSW interface")] [assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("2.3.0")] [assembly: AssemblyInformationalVersion("2.4.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")] [assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@ -4,6 +4,6 @@
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.*")] [assembly: AssemblyVersion("2.4.0.*")]
// wenn das nicht auskommentiert wird erhalten wir eine Warnung // wenn das nicht auskommentiert wird erhalten wir eine Warnung
// [assembly: AssemblyFileVersion("1.0.0.*")] // [assembly: AssemblyFileVersion("1.0.0.*")]

View File

@ -236,6 +236,39 @@ namespace bsmd.database
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value)); errors.Add(RuleEngine.CreateError(validationCode, property.Name, value));
} }
break; break;
case ValidationCode.STRING_IMOCLASS:
{
Regex rgx = new Regex(@"[1-9]{1}(\.[1-9]{1})?");
if (!rgx.IsMatch(value)) errors.Add(RuleEngine.CreateError(validationCode, property.Name, value));
}
break;
case ValidationCode.STRING_UNNUMBER:
{
Regex rgx = new Regex("[0-9]{4}");
if (!rgx.IsMatch(value)) errors.Add(RuleEngine.CreateError(validationCode, property.Name, value));
}
break;
case ValidationCode.DRAUGHT_IMPLAUSIBLE:
{
double dVal = 0;
if (!Double.TryParse(value, out dVal) || dVal <= 0)
errors.Add(RuleEngine.CreateError(ValidationCode.DOUBLE_GT_ZERO, property.Name, value));
else
if ((dVal < 20) || (dVal > 150))
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value));
}
break;
case ValidationCode.TIME_IMPLAUSIBLE:
{
DateTime aTime;
if (value.Length == 0) errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, property.Name, value));
if (DateTime.TryParse(value, out aTime))
{
if ((aTime - DateTime.UtcNow).Minutes > 30)
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value));
}
}
break;
default: default:
break; break;
} }

View File

@ -50,12 +50,18 @@ namespace bsmd.database
public bool? ValidISSCOnBoard { get; set; } public bool? ValidISSCOnBoard { get; set; }
[ShowReport] [ShowReport]
public string ReasonsForNoValidISSC { get; set; } public string ReasonsForNoValidISSC { get; set; }
[ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
public byte? ISSCType { get; set; } public byte? ISSCType { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("ISSC type")]
public string ISSCTypeDisplay { get { return Util.GetISSCTypeDisplay(this.ISSCType); } }
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
public byte? ISSCIssuerType { get; set; } public byte? ISSCIssuerType { get; set; }
[ShowReport]
[ReportDisplayName("ISSC issuer type")]
public string ISSCIssuerTypeDisplay { get { return Util.GetISSCIssuerTypeDisplay(this.ISSCIssuerType); } }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
public string ISSCIssuerName { get; set; } public string ISSCIssuerName { get; set; }

View File

@ -24,7 +24,7 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)]
public double? DraughtUponArrival_DMT { get; set; } public double? DraughtUponArrival_DMT { get; set; }
public override string Subtitle public override string Subtitle

View File

@ -24,14 +24,14 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)]
public double? DraughtUponDeparture_DMT { get; set; } public double? DraughtUponDeparture_DMT { get; set; }
public override string Subtitle public override string Subtitle
{ {
get get
{ {
return "Draught at arrival notification"; return "Draught at departure notification";
} }
} }

View File

@ -64,5 +64,41 @@ namespace bsmd.database
} }
} }
public static string GetISSCTypeDisplay(byte? val)
{
if (val.HasValue)
{
switch(val)
{
case 0: return "FULL";
case 1: return "INTERIM";
default:
return "UNKNOWN";
}
}
else
{
return "Unknown";
}
}
public static string GetISSCIssuerTypeDisplay(byte? val)
{
if (val.HasValue)
{
switch (val)
{
case 0: return "ADMINISTRATION";
case 1: return "RSO";
default:
return "UNKNOWN";
}
}
else
{
return "Unknown";
}
}
} }
} }

View File

@ -29,6 +29,10 @@ namespace bsmd.database
TWO_DIGIT, TWO_DIGIT,
STRING_MAXLEN, STRING_MAXLEN,
STRING_EXACT_LEN, STRING_EXACT_LEN,
STRING_UNNUMBER = 23,
STRING_IMOCLASS = 24,
DRAUGHT_IMPLAUSIBLE = 25,
TIME_IMPLAUSIBLE = 26,
E121 = 121, E121 = 121,
E122 = 122, E122 = 122,
E123 = 123, E123 = 123,

View File

@ -201,5 +201,38 @@ namespace bsmd.database
#endregion #endregion
#region public convenience method
public List<Waste> AddRemainingWasteTypes()
{
List<Waste> result = new List<Waste>();
for (byte wType = 1; wType <= 9; wType++ )
{
bool wasteTypeFound = false;
foreach (Waste w in this.Waste)
{
if ((w.WasteType ?? 0) == wType)
wasteTypeFound = true;
}
if (!wasteTypeFound)
{
Waste newWaste = new Waste();
newWaste.WasteType = wType;
newWaste.WasteAmountGeneratedTillNextPort_MTQ = 0;
newWaste.WasteAmountRetained_MTQ = 0;
newWaste.WasteCapacity_MTQ = 0;
newWaste.WasteDisposalAmount_MTQ = 0;
newWaste.Identifier = "";
newWaste.WAS = this;
this.Waste.Add(newWaste);
result.Add(newWaste);
}
}
return result;
}
#endregion
} }
} }

View File

@ -689,6 +689,7 @@ namespace bsmd.dbh
rootMDH.Items[12] = mdh.SickAnimalOrPetOnBoard ?? false ? RootMDHSickAnimalOrPetOnBoard.Y : RootMDHSickAnimalOrPetOnBoard.N; rootMDH.Items[12] = mdh.SickAnimalOrPetOnBoard ?? false ? RootMDHSickAnimalOrPetOnBoard.Y : RootMDHSickAnimalOrPetOnBoard.N;
rootMDH.ItemsElementName[13] = ItemsChoiceType2.ValidSanitaryControlExemptionOrCertificateOnBoard; rootMDH.ItemsElementName[13] = ItemsChoiceType2.ValidSanitaryControlExemptionOrCertificateOnBoard;
rootMDH.Items[13] = mdh.ValidSanitaryControlExemptionOrCertificateOnBoard ?? false ? RootMDHValidSanitaryControlExemptionOrCertificateOnBoard.Y : RootMDHValidSanitaryControlExemptionOrCertificateOnBoard.N; rootMDH.Items[13] = mdh.ValidSanitaryControlExemptionOrCertificateOnBoard ?? false ? RootMDHValidSanitaryControlExemptionOrCertificateOnBoard.Y : RootMDHValidSanitaryControlExemptionOrCertificateOnBoard.N;
rootMDH.ItemsElementName[14] = ItemsChoiceType2.ValidSanitaryControlExemptionOrCertificate; rootMDH.ItemsElementName[14] = ItemsChoiceType2.ValidSanitaryControlExemptionOrCertificate;
RootMDHValidSanitaryControlExemptionOrCertificate cert = new RootMDHValidSanitaryControlExemptionOrCertificate(); RootMDHValidSanitaryControlExemptionOrCertificate cert = new RootMDHValidSanitaryControlExemptionOrCertificate();
rootMDH.Items[14] = cert; rootMDH.Items[14] = cert;
@ -696,13 +697,19 @@ namespace bsmd.dbh
cert.PlaceOfIssue = mdh.PlaceOfIssue; cert.PlaceOfIssue = mdh.PlaceOfIssue;
rootMDH.ItemsElementName[15] = ItemsChoiceType2.SanitaryControlReinspectionRequired; rootMDH.ItemsElementName[15] = ItemsChoiceType2.SanitaryControlReinspectionRequired;
rootMDH.Items[15] = mdh.SanitaryControlReinspectionRequired ?? false ? RootMDHSanitaryControlReinspectionRequired.Y : RootMDHSanitaryControlReinspectionRequired.N; rootMDH.Items[15] = mdh.SanitaryControlReinspectionRequired ?? false ? RootMDHSanitaryControlReinspectionRequired.Y : RootMDHSanitaryControlReinspectionRequired.N;
rootMDH.ItemsElementName[16] = ItemsChoiceType2.InfectedAreaVisited; rootMDH.ItemsElementName[16] = ItemsChoiceType2.InfectedAreaVisited;
rootMDH.Items[16] = mdh.InfectedAreaVisited ?? false ? RootMDHInfectedAreaVisited.Y : RootMDHInfectedAreaVisited.N; rootMDH.Items[16] = mdh.InfectedAreaVisited ?? false ? RootMDHInfectedAreaVisited.Y : RootMDHInfectedAreaVisited.N;
rootMDH.ItemsElementName[17] = ItemsChoiceType2.InfectedArea;
RootMDHInfectedArea infected = new RootMDHInfectedArea(); if (!mdh.InfectedAreaPort.IsNullOrEmpty() && mdh.InfectedAreaDate.HasValue)
rootMDH.Items[17] = infected; {
infected.InfectedAreaPort = mdh.InfectedAreaPort; rootMDH.ItemsElementName[17] = ItemsChoiceType2.InfectedArea;
if (mdh.InfectedAreaDate.HasValue) infected.InfectedAreaDate = mdh.InfectedAreaDate.Value; RootMDHInfectedArea infected = new RootMDHInfectedArea();
rootMDH.Items[17] = infected;
infected.InfectedAreaPort = mdh.InfectedAreaPort;
if (mdh.InfectedAreaDate.HasValue) infected.InfectedAreaDate = mdh.InfectedAreaDate.Value;
}
rootMDH.ItemsElementName[18] = ItemsChoiceType2.PortsOfCallLast30Days; rootMDH.ItemsElementName[18] = ItemsChoiceType2.PortsOfCallLast30Days;
RootMDHPortsOfCallLast30Days l30d = new RootMDHPortsOfCallLast30Days(); RootMDHPortsOfCallLast30Days l30d = new RootMDHPortsOfCallLast30Days();
rootMDH.Items[18] = l30d; rootMDH.Items[18] = l30d;

View File

@ -738,6 +738,7 @@ namespace bsmd.herberg.FormService
if (vDict.ContainsKey("ShippingArea")) info.ShippingArea = (byte) Enum.Parse(typeof(Enums.ShippingArea), vDict["ShippingArea"]); if (vDict.ContainsKey("ShippingArea")) info.ShippingArea = (byte) Enum.Parse(typeof(Enums.ShippingArea), vDict["ShippingArea"]);
if (vDict.ContainsKey("RequestedPositionInPortOfCall")) info.RequestedPositionInPortOfCall = vDict["RequestedPositionInPortOfCall"]; if (vDict.ContainsKey("RequestedPositionInPortOfCall")) info.RequestedPositionInPortOfCall = vDict["RequestedPositionInPortOfCall"];
if (vDict.ContainsKey("SpecialRequirementsOfShipAtBerth")) info.SpecialRequirementsOfShipAtBerth = vDict["SpecialRequirementsOfShipAtBerth"]; if (vDict.ContainsKey("SpecialRequirementsOfShipAtBerth")) info.SpecialRequirementsOfShipAtBerth = vDict["SpecialRequirementsOfShipAtBerth"];
else info.SpecialRequirementsOfShipAtBerth = aMessageCore.Customer.Name;
if (vDict.ContainsKey("ConstructionCharacteristicsOfShip")) info.ConstructionCharacteristicsOfShip = vDict["ConstructionCharacteristicsOfShip"]; if (vDict.ContainsKey("ConstructionCharacteristicsOfShip")) info.ConstructionCharacteristicsOfShip = vDict["ConstructionCharacteristicsOfShip"];
if (vDict.ContainsKey("FumigatedBulkCargo")) info.FumigatedBulkCargo = (byte)Enum.Parse(typeof(Enums.FumigatedBulkCargo), vDict["FumigatedBulkCargo"]); if (vDict.ContainsKey("FumigatedBulkCargo")) info.FumigatedBulkCargo = (byte)Enum.Parse(typeof(Enums.FumigatedBulkCargo), vDict["FumigatedBulkCargo"]);
} }
@ -767,6 +768,7 @@ namespace bsmd.herberg.FormService
try try
{ {
if (vDict.ContainsKey("Tanker")) pre72h.Tanker = vDict["Tanker"].Equals("Y"); if (vDict.ContainsKey("Tanker")) pre72h.Tanker = vDict["Tanker"].Equals("Y");
else pre72h.Tanker = false; // 18.10.15, vorläufig als default
if (vDict.ContainsKey("TankerHullConfiguration")) pre72h.TankerHullConfiguration = (byte)Enum.Parse(typeof(Enums.TankerHullConfiguration), vDict["TankerHullConfiguration"]); if (vDict.ContainsKey("TankerHullConfiguration")) pre72h.TankerHullConfiguration = (byte)Enum.Parse(typeof(Enums.TankerHullConfiguration), vDict["TankerHullConfiguration"]);
if (vDict.ContainsKey("ConditionCargoBallastTanks")) pre72h.ConditionCargoBallastTanks = (byte)Enum.Parse(typeof(Enums.ConditionCargoBallastTanks), vDict["ConditionCargoBallastTanks"]); if (vDict.ContainsKey("ConditionCargoBallastTanks")) pre72h.ConditionCargoBallastTanks = (byte)Enum.Parse(typeof(Enums.ConditionCargoBallastTanks), vDict["ConditionCargoBallastTanks"]);
if (vDict.ContainsKey("NatureOfCargo")) pre72h.NatureOfCargo = vDict["NatureOfCargo"]; if (vDict.ContainsKey("NatureOfCargo")) pre72h.NatureOfCargo = vDict["NatureOfCargo"];
@ -882,6 +884,18 @@ namespace bsmd.herberg.FormService
foreach(int key in nDict.Keys) { foreach(int key in nDict.Keys) {
Dictionary<string, string> wDict = nDict[key]; Dictionary<string, string> wDict = nDict[key];
Waste waste = was.GetSublistElementWithIdentifier(key.ToString()) as Waste; Waste waste = was.GetSublistElementWithIdentifier(key.ToString()) as Waste;
if (waste == null)
{
foreach (Waste existingWaste in was.Waste)
{
if ((existingWaste.WasteType ?? 0) == (Enums.ParseWasteType(wDict["WasteType"]) ?? 0))
{
waste = existingWaste;
break;
}
}
}
if (waste == null) if (waste == null)
{ {
waste = new Waste(); waste = new Waste();
@ -902,6 +916,10 @@ namespace bsmd.herberg.FormService
saveMessages.Add(waste); saveMessages.Add(waste);
} }
// fehlende Waste Meldungen als "leer" hinzufügen, der Identifier muss dann zur Kennzeichnung leer sein
// falls später vom Schiff als Update korrigierte Werte kommen.
saveMessages.AddRange(was.AddRemainingWasteTypes());
if (vDict.ContainsKey("WasteDisposalServiceProviderName")) if (vDict.ContainsKey("WasteDisposalServiceProviderName"))
{ {
WasteDisposalServiceProvider wdsp = null; WasteDisposalServiceProvider wdsp = null;
@ -1043,9 +1061,10 @@ namespace bsmd.herberg.FormService
theMessage.MessageNotificationClass = Message.NotificationClass.VISIT; theMessage.MessageNotificationClass = Message.NotificationClass.VISIT;
if (vDict.ContainsKey("PortNameOfCall")) aMessageCore.Portname = vDict["PortNameOfCall"]; if (vDict.ContainsKey("PortNameOfCall")) aMessageCore.Portname = vDict["PortNameOfCall"];
if (vDict.ContainsKey("PortOfCall")) aMessageCore.PoC = "DE" + vDict["PortOfCall"]; if (vDict.ContainsKey("PortOfCall")) aMessageCore.PoC = "DE" + vDict["PortOfCall"];
if (vDict.ContainsKey("TransitKielCanal")) aMessageCore.IsTransit = vDict["TransitKielCanal"].Equals("Y"); // if (vDict.ContainsKey("TransitKielCanal")) aMessageCore.IsTransit = vDict["TransitKielCanal"].Equals("Y");
if (vDict.ContainsKey("ETAPortOfCall")) aMessageCore.ETA = Extensions.TryParseDateTime(vDict["ETAPortOfCall"]); if (vDict.ContainsKey("ETAPortOfCall")) aMessageCore.ETA = Extensions.TryParseDateTime(vDict["ETAPortOfCall"]);
if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]); if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]);
aMessageCore.IsTransit = false;
} }
break; break;
#endregion #endregion
@ -1055,6 +1074,7 @@ namespace bsmd.herberg.FormService
{ {
theMessage.MessageNotificationClass = Message.NotificationClass.TRANSIT; theMessage.MessageNotificationClass = Message.NotificationClass.TRANSIT;
if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]); if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]);
aMessageCore.IsTransit = true;
} }
break; break;
#endregion #endregion

BIN
nsw/Stand_2015_09_29.docx Normal file

Binary file not shown.

View File

@ -17,7 +17,7 @@ Zugangsdaten NSW Server:
https://bscw.dlz-it.de/bscw/bscw.cgi https://bscw.dlz-it.de/bscw/bscw.cgi
Benutzer: mippel Benutzer: mippel
PW: baffi1234! PW: baffi1234!
PW: lkDDXd1321? PW: 34SsjjJJ::
NSW Test E-Mail Account: NSW Test E-Mail Account: