From f41d6171f95eb4c5f8c6a5fb5339d80f69eb132d Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Sat, 31 Oct 2015 15:03:40 +0000 Subject: [PATCH] Version 2.4.3 Halloween --- Stundensheet.xlsx | Bin 18164 -> 18339 bytes .../SendNSWMessageService/NSWSendService.cs | 48 +++++++- .../bsmd.ReportGenerator/ReportService.cs | 5 +- .../SFTPService.cs | 4 + .../bsmd.database/PortOfCallLast30Days.cs | 7 +- .../Properties/AssemblyProductInfo.cs | 2 +- .../Properties/AssemblyProjectInfo.cs | 2 +- nsw/Source/bsmd.dbh/Request.cs | 17 ++- .../bsmd.herberg.FormService/FormService.cs | 5 +- nsw/Source/bsmd.herberg.FormService/Util.cs | 112 ++++++++++++++++-- 10 files changed, 181 insertions(+), 21 deletions(-) diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index 226f0584ca30a7019466d62f467cd0b6b0166176..74e3b04a2575c0241139ee744e217410549f4c11 100644 GIT binary patch delta 8151 zcmZvBWl$Vl*DdZ6oFTXccb8y;Gq?l~E=A48qEg?asX8x({N~!o z>*b@HuC}QgeDAJ@(a(P(H@no$z1z;CB--;`2F=HI6S5Burl#hW7q2`#Z{|CuQqp@* zo&8InB!XIB2U2=3+6nI+UBYwKfSozl#fQK1{w<=96f}|P=?_ysDf5DS7d!GhQZ|o0 z{h1#>*ZxhIx;dUY&&xBEDcU^V_6k^Ck`P*U3<$jbG5V13aQv6`_Ikqi@9pR1gX8^n z|57IMgrAWKQh&^T;KvtL@Sf_ep1@_85O+7LLxIK5=Z}j&H-Tl{qN%Rs zX}&+688^o|_uh10KD@h_+uS?9YV;Rre{_EecvMkiAsuT=KjN<4?V{>@`q2DzcBwX- zNpj}lQ!;V!RMgxNx9D@x^pNm(*ITOPUG2hlRp#hoChi(w&g!-7bK&bP=6W?d>T_{1 zydU6`@?*a8TG$4-(72itFrYLQH|EIhGp`&-^d1a(Gz2whTJ1>KYEeyjc#WrEzvKiA zg=6<5Lm#DRODRs*2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diff --git a/nsw/Source/SendNSWMessageService/NSWSendService.cs b/nsw/Source/SendNSWMessageService/NSWSendService.cs index 6832d697..5c138aaf 100644 --- a/nsw/Source/SendNSWMessageService/NSWSendService.cs +++ b/nsw/Source/SendNSWMessageService/NSWSendService.cs @@ -35,8 +35,14 @@ namespace SendNSWMessageService this.EventLog.Source = this.ServiceName; this.EventLog.Log = "Application"; this.Init(args); - this.EventLog.WriteEntry("NSW Send Service started.", EventLogEntryType.Information); - _log.Info("NSW Send Service started"); + + System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); + FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); + string version = fvi.FileVersion; + + this.EventLog.WriteEntry("NSW Send Service started", EventLogEntryType.Information); + _log.InfoFormat("NSW Send Service started. v.{0}", version); + this.DoOnce(); } @@ -128,11 +134,47 @@ namespace SendNSWMessageService (message.MessageNotificationClass == Message.NotificationClass.TIEFD) || (message.MessageNotificationClass == Message.NotificationClass.NAME) || (message.MessageNotificationClass == Message.NotificationClass.INFO) || - (message.MessageNotificationClass == Message.NotificationClass.POBD)) + (message.MessageNotificationClass == Message.NotificationClass.POBD) || + (message.MessageNotificationClass == Message.NotificationClass.ATA) || + (message.MessageNotificationClass == Message.NotificationClass.ATD) || + (message.MessageNotificationClass == Message.NotificationClass.LADG) || + (message.MessageNotificationClass == Message.NotificationClass.SERV) || + (message.MessageNotificationClass == Message.NotificationClass.WAS) || + (message.MessageNotificationClass == Message.NotificationClass.TOWD)) continue; } + // 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; + } + } + } + + // ATD wird nur gesendet, wenn weniger als 60 Minuten in der Zukunft + 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 (message.InternalStatus != Message.BSMDStatus.CONFIRMED) //(message.InternalStatus == Message.BSMDStatus.PREPARE) || //(message.InternalStatus == Message.BSMDStatus.TOSEND)) diff --git a/nsw/Source/bsmd.ReportGenerator/ReportService.cs b/nsw/Source/bsmd.ReportGenerator/ReportService.cs index 84f44deb..90834295 100644 --- a/nsw/Source/bsmd.ReportGenerator/ReportService.cs +++ b/nsw/Source/bsmd.ReportGenerator/ReportService.cs @@ -33,7 +33,10 @@ namespace bsmd.ReportGenerator this.EventLog.Log = "Application"; this.Init(args); this.EventLog.WriteEntry("Report Service started.", EventLogEntryType.Information); - _log.Info("Report Service started."); + System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); + FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); + string version = fvi.FileVersion; + _log.InfoFormat("Report Service started. v.{0}", version); this.DoOnce(); } diff --git a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs index 838df08f..14d76a30 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs +++ b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs @@ -38,6 +38,10 @@ namespace bsmd.dakosy.ResponseService this.EventLog.Log = "Application"; this.Init(args); this.EventLog.WriteEntry("NSW SFTP Response Service started.", EventLogEntryType.Information); + System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); + FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); + string version = fvi.FileVersion; + _log.InfoFormat("Dakosy SFTP Response Service started. v.{0}", version); this._timer_Elapsed(null, null); } diff --git a/nsw/Source/bsmd.database/PortOfCallLast30Days.cs b/nsw/Source/bsmd.database/PortOfCallLast30Days.cs index 939a961d..32e55845 100644 --- a/nsw/Source/bsmd.database/PortOfCallLast30Days.cs +++ b/nsw/Source/bsmd.database/PortOfCallLast30Days.cs @@ -145,9 +145,12 @@ namespace bsmd.database if((this.PortOfCallLast30DaysCrewMembersJoined ?? false) && (this.CrewJoinedShip.Count == 0)) RuleEngine.CreateViolation(ValidationCode.V767, "Joined crew members", null); - foreach (PortOfCallLast30DaysCrewJoinedShip poc30Crew in this.CrewJoinedShip) + if (this.PortOfCallLast30DaysCrewMembersJoined ?? false) { - RuleEngine.ValidateProperties(poc30Crew, errors); + foreach (PortOfCallLast30DaysCrewJoinedShip poc30Crew in this.CrewJoinedShip) + { + RuleEngine.ValidateProperties(poc30Crew, errors); + } } } diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index 4bcc7b1c..d684ec1b 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs @@ -2,6 +2,6 @@ [assembly: AssemblyCompany("Informatikbüro Daniel Schick")] [assembly: AssemblyProduct("BSMD NSW interface")] -[assembly: AssemblyInformationalVersion("2.4.1")] +[assembly: AssemblyInformationalVersion("2.4.3")] [assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")] [assembly: AssemblyTrademark("")] \ No newline at end of file diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs index 844680c7..1ce61e7d 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs @@ -4,6 +4,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.4.1.*")] +[assembly: AssemblyVersion("2.4.3.*")] // wenn das nicht auskommentiert wird erhalten wir eine Warnung // [assembly: AssemblyFileVersion("1.0.0.*")] diff --git a/nsw/Source/bsmd.dbh/Request.cs b/nsw/Source/bsmd.dbh/Request.cs index b3e20734..2b8cb6b3 100644 --- a/nsw/Source/bsmd.dbh/Request.cs +++ b/nsw/Source/bsmd.dbh/Request.cs @@ -564,6 +564,7 @@ namespace bsmd.dbh rootInfo.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth; if(info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty()) { + _log.Info("dbh INFO send: SpecialRequirementsOfShipAtBerth is empty."); // Name des Agenten eintragen } rootInfo.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip; @@ -760,16 +761,19 @@ namespace bsmd.dbh rootWAS.ItemsElementName[0] = ItemsChoiceType3.ConfirmationOfCorrectness; rootWAS.Items[0] = was.ConfirmationOfCorrectness ?? false ? RootWASConfirmationOfCorrectness.Y : RootWASConfirmationOfCorrectness.N; + rootWAS.ItemsElementName[1] = ItemsChoiceType3.LastWasteDisposalDate; if (was.LastWasteDisposalDate.HasValue) rootWAS.Items[1] = was.LastWasteDisposalDate.Value; + rootWAS.ItemsElementName[2] = ItemsChoiceType3.LastWasteDisposalPort; - rootWAS.Items[2] = was.LastWasteDisposalPort; - - rootWAS.ItemsElementName[2] = ItemsChoiceType3.WasteDisposalServiceProviderName; + rootWAS.Items[2] = was.LastWasteDisposalPort; + + rootWAS.ItemsElementName[3] = ItemsChoiceType3.WasteDisposalDelivery; if (was.WasteDisposalDelivery.HasValue) rootWAS.Items[3] = (RootWASWasteDisposalDelivery)was.WasteDisposalDelivery.Value; + rootWAS.ItemsElementName[4] = ItemsChoiceType3.WasteDisposalServiceProviderName; if (was.WasteDisposalServiceProvider.Count > 0) { @@ -799,7 +803,7 @@ namespace bsmd.dbh { rww.WasteDescription = was.Waste[j-5].WasteDescription; if (was.Waste[j - 5].WasteType.HasValue) - rww.WasteType = (RootWASWasteWasteType)was.Waste[j - 5].WasteType.Value; + rww.WasteType = (RootWASWasteWasteType) (was.Waste[j - 5].WasteType.Value - 1); // im generierten Code ist das 0-basiert if (was.Waste[j - 5].WasteDisposalAmount_MTQ.HasValue) rww.WasteDisposalAmount_MTQ = (float)was.Waste[j - 5].WasteDisposalAmount_MTQ.Value; rww.WasteDetails = new RootWASWasteWasteDetails(); @@ -1391,7 +1395,10 @@ namespace bsmd.dbh } catch (Exception ex) { - _log.ErrorFormat("exception on message send: {0}", ex.Message); + _log.ErrorFormat("Exception on dbh message send: {0}", ex.Message); + if (ex.InnerException != null) + _log.ErrorFormat("Inner exception: {0}", ex.InnerException.Message); + returnval = false; } diff --git a/nsw/Source/bsmd.herberg.FormService/FormService.cs b/nsw/Source/bsmd.herberg.FormService/FormService.cs index f27f5920..74def239 100644 --- a/nsw/Source/bsmd.herberg.FormService/FormService.cs +++ b/nsw/Source/bsmd.herberg.FormService/FormService.cs @@ -35,7 +35,10 @@ namespace bsmd.herberg.FormService this.EventLog.Log = "Application"; this.Init(args); this.EventLog.WriteEntry("FormService started.", EventLogEntryType.Information); - this._log.Info("Starting EU-NOAD FormService."); + System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); + FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); + string version = fvi.FileVersion; + this._log.InfoFormat("Starting EU-NOAD FormService. v.{0}", version); this.DoOnce(); } diff --git a/nsw/Source/bsmd.herberg.FormService/Util.cs b/nsw/Source/bsmd.herberg.FormService/Util.cs index cb2d208a..2e739d4d 100644 --- a/nsw/Source/bsmd.herberg.FormService/Util.cs +++ b/nsw/Source/bsmd.herberg.FormService/Util.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; +using System.Text.RegularExpressions; using log4net; using bsmd.database; @@ -39,13 +40,22 @@ namespace bsmd.herberg.FormService //for (int i = 0; i < formResponse.formDatasets.Length; i++) if(formResponse.formDatasets.Length > 0) // wir verarbeiten nur das "neueste" form dataset - { + { int i = formResponse.formDatasets.Length - 1; - // Daten werden nur aktualisiert, wenn die form ein anderes (=neueres) Rev. Date hat - if (aMessageCore.HerbergRevDate.HasValue && (formResponse.formDatasets[i].revisionDate == aMessageCore.HerbergRevDate.Value)) - return; + // nur zum debuggen + for (int n = 0; n < formResponse.formDatasets[i].formData.Length; n++) + { + if (formResponse.formDatasets[i].formData[n].name.Contains("Transmission")) + { + _log.Info("foundit"); + } + } + + // Daten werden nur aktualisiert, wenn die form ein anderes (=neueres) Rev. Date hat + if (aMessageCore.HerbergRevDate.HasValue && (formResponse.formDatasets[i].revisionDate == aMessageCore.HerbergRevDate.Value)) + return; if (aMessageCore.ReportStatus != MessageCore.ReportStatusEnum.COMPLETE) aMessageCore.ReportStatus = MessageCore.ReportStatusEnum.HE_REVISION; @@ -588,9 +598,11 @@ namespace bsmd.herberg.FormService #region BKRA case "BKRA": { + Dictionary keysInMessage = new Dictionary(); foreach (int key in nDict.Keys) { Dictionary bDict = nDict[key]; + keysInMessage.Add(key.ToString(), key.ToString()); BRKA bkra = theMessage.GetSublistElementWithIdentifier(key.ToString()) as BRKA; if (bkra == null) { @@ -611,7 +623,19 @@ namespace bsmd.herberg.FormService _log.ErrorFormat("Error reading BKRA fields: {0}", ex.Message); } saveMessages.Add(bkra); - } + } + + // check for missing messages (passenger deleted in EU-NOAD) + foreach (BRKA bkra in theMessage.Elements) + { + if (!keysInMessage.ContainsKey(bkra.Identifier)) + { + _log.InfoFormat("BRKA {0}, Ident {1} not found in EU-NOAD message, removing!", + bkra.BunkerFuelType ?? "", bkra.Identifier); + DBManager.Instance.Delete(bkra); + } + } + } break; #endregion @@ -619,9 +643,11 @@ namespace bsmd.herberg.FormService #region SERV case "SERV": { + Dictionary keysInMessage = new Dictionary(); foreach (int key in nDict.Keys) { Dictionary pDict = nDict[key]; + keysInMessage.Add(key.ToString(), key.ToString()); SERV serv = theMessage.GetSublistElementWithIdentifier(key.ToString()) as SERV; if (serv == null) { @@ -644,6 +670,16 @@ namespace bsmd.herberg.FormService saveMessages.Add(serv); } + // check for missing messages (passenger deleted in EU-NOAD) + foreach (SERV serv in theMessage.Elements) + { + if (!keysInMessage.ContainsKey(serv.Identifier)) + { + _log.InfoFormat("SERV {0}, Ident {1} not found in EU-NOAD message, removing!", + serv.ServiceName ?? "", serv.Identifier); + DBManager.Instance.Delete(serv); + } + } } break; #endregion @@ -701,9 +737,11 @@ namespace bsmd.herberg.FormService #region BKRD case "BKRD": { + Dictionary keysInMessage = new Dictionary(); foreach (int key in nDict.Keys) { Dictionary bDict = nDict[key]; + keysInMessage.Add(key.ToString(), key.ToString()); BRKD bkrd = theMessage.GetSublistElementWithIdentifier(key.ToString()) as BRKD; if (bkrd == null) { @@ -726,6 +764,18 @@ namespace bsmd.herberg.FormService saveMessages.Add(bkrd); } + + // check for missing messages (passenger deleted in EU-NOAD) + foreach (BRKD brkd in theMessage.Elements) + { + if (!keysInMessage.ContainsKey(brkd.Identifier)) + { + _log.InfoFormat("BRKD {0}, Ident {1} not found in EU-NOAD message, removing!", + brkd.BunkerFuelType ?? "", brkd.Identifier); + DBManager.Instance.Delete(brkd); + } + } + } break; #endregion @@ -749,9 +799,18 @@ namespace bsmd.herberg.FormService 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("SpecialRequirementsOfShipAtBerth")) info.SpecialRequirementsOfShipAtBerth = vDict["SpecialRequirementsOfShipAtBerth"]; - else info.SpecialRequirementsOfShipAtBerth = aMessageCore.Customer.Name; + if (info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty()) + info.SpecialRequirementsOfShipAtBerth = aMessageCore.Customer.Name; + else + { + if((aMessageCore.Customer != null) && (aMessageCore.Customer.Name != null)) + info.SpecialRequirementsOfShipAtBerth = string.Format("{0} - Agent: {1}", info.SpecialRequirementsOfShipAtBerth, aMessageCore.Customer.Name); + } 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") && !vDict["FumigatedBulkCargo"].IsNullOrEmpty()) + info.FumigatedBulkCargo = (byte)Enum.Parse(typeof(Enums.FumigatedBulkCargo), vDict["FumigatedBulkCargo"]); + else + info.FumigatedBulkCargo = (byte) Enums.FumigatedBulkCargo.N; } catch(Exception ex) { @@ -801,9 +860,11 @@ namespace bsmd.herberg.FormService #region LADG case "LADG": { + Dictionary keysInMessage = new Dictionary(); foreach (int key in nDict.Keys) { Dictionary lDict = nDict[key]; + keysInMessage.Add(key.ToString(), key.ToString()); LADG ladg = theMessage.GetSublistElementWithIdentifier(key.ToString()) as LADG; if (ladg == null) { @@ -820,6 +881,17 @@ namespace bsmd.herberg.FormService saveMessages.Add(ladg); } + + // check for missing messages (passenger deleted in EU-NOAD) + foreach (LADG ladg in theMessage.Elements) + { + if (!keysInMessage.ContainsKey(ladg.Identifier)) + { + _log.InfoFormat("LADG {0}, Ident {1} not found in EU-NOAD message, removing!", + ladg.CargoCodeNST ?? "", ladg.Identifier); + DBManager.Instance.Delete(ladg); + } + } } break; #endregion @@ -936,6 +1008,14 @@ namespace bsmd.herberg.FormService if (wDict.ContainsKey("WasteDisposalCountryCode") && wDict.ContainsKey("WasteDisposalPortCode")) waste.WasteDisposalPort = wDict["WasteDisposalCountryCode"] + wDict["WasteDisposalPortCode"]; + // Wenn das Feld leer ist mit "-" entwerten + if (((waste.WasteType ?? 0) == 3) && waste.WasteDescription.IsNullOrEmpty()) + waste.WasteDescription = "-"; + if (((waste.WasteType ?? 0) == 8) && waste.WasteDescription.IsNullOrEmpty()) + waste.WasteDescription = "-"; + if (((waste.WasteType ?? 0) == 9) && waste.WasteDescription.IsNullOrEmpty()) + waste.WasteDescription = "-"; + saveMessages.Add(waste); } @@ -1051,6 +1131,20 @@ namespace bsmd.herberg.FormService poc.PortFacilityGISISCode = poc.PortFacilityGISISCode.Substring(0, 4); } + // sanitize GISIS code + if (poc.PortFacilityGISISCode.IsNullOrEmpty()) + { + poc.PortFacilityGISISCode = "0000"; + } + else { + Regex rgx = new Regex("[0-9]{4}"); + if (!rgx.IsMatch(poc.PortFacilityGISISCode)) + { + _log.WarnFormat("PortFacilityGISISCode invalid: {0}, replacing with 0000", poc.PortFacilityGISISCode); + poc.PortFacilityGISISCode = "0000"; + } + } + if (sDict.ContainsKey("ShipToShipActivityLocationName")) { sts.ShipToShipActivityLocationName = sDict["ShipToShipActivityLocationName"]; changedStS = true; } if (sDict.ContainsKey("ShipToShipActivityLocationLoCode") && sDict.ContainsKey("ShipToShipActivityCountryCode") && (sDict["ShipToShipActivityLocationLoCode"].Length < 4)) { @@ -1262,6 +1356,10 @@ namespace bsmd.herberg.FormService if (vDict.ContainsKey("DPGClassificationIBC")) haz.DPGClassificationIMDG = vDict["DPGClassificationIBC"].Equals("1"); if (vDict.ContainsKey("DPGClassificationIMSBC")) haz.DPGClassificationIMDG = vDict["DPGClassificationIMSBC"].Equals("1"); if (vDict.ContainsKey("DPGClassificationMARPOL_ANNEX_I")) haz.DPGClassificationIMDG = vDict["DPGClassificationMARPOL_ANNEX_I"].Equals("1"); + if (vDict.ContainsKey("TransmissionType")) + { + _log.DebugFormat("TransmissionType: {0}", vDict["TransmissionType"]); + } Dictionary> subDict = null; if (groupedRowVals.ContainsKey("HAZ.IMDG"))