diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index 73dffa1e..cce8987d 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/Zugang_BSMD-Server-Bux_DanielSchick_20150222.txt b/Zugang_BSMD-Server-Bux_DanielSchick_20150222.txt index 623821f5..717389af 100644 --- a/Zugang_BSMD-Server-Bux_DanielSchick_20150222.txt +++ b/Zugang_BSMD-Server-Bux_DanielSchick_20150222.txt @@ -20,3 +20,5 @@ SMSPLASH01 [Dashface-Server], 192.168.2.5, vorher: www.schiffsmelder.com:41625 für alle Server: User: Administrator PW: $chegVAN99! +hallo12345 + diff --git a/nsw/HIS-NORD/Nutzervertrag_BSMD.docx b/nsw/HIS-NORD/Nutzervertrag_BSMD.docx new file mode 100644 index 00000000..f7431b57 Binary files /dev/null and b/nsw/HIS-NORD/Nutzervertrag_BSMD.docx differ diff --git a/nsw/Source/CrewPasCSVTool/CrewPasCSVTool.csproj b/nsw/Source/CrewPasCSVTool/CrewPasCSVTool.csproj index 6eb6798d..00b10641 100644 --- a/nsw/Source/CrewPasCSVTool/CrewPasCSVTool.csproj +++ b/nsw/Source/CrewPasCSVTool/CrewPasCSVTool.csproj @@ -75,7 +75,9 @@ - + + Designer + diff --git a/nsw/Source/SendNSWMessageService.sln b/nsw/Source/SendNSWMessageService.sln index c169f75d..b6814230 100644 --- a/nsw/Source/SendNSWMessageService.sln +++ b/nsw/Source/SendNSWMessageService.sln @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.database", "bsmd.datab EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.dakosy", "bsmd.dakosy\bsmd.dakosy.csproj", "{6255F8C4-B0B5-4E77-860E-10EBCD7B368F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.hisnord", "bsmd.hisnord\bsmd.hisnord.csproj", "{E7E48971-E879-4E6A-B316-70AC0A6F4C95}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,6 +35,10 @@ Global {6255F8C4-B0B5-4E77-860E-10EBCD7B368F}.Debug|Any CPU.Build.0 = Debug|Any CPU {6255F8C4-B0B5-4E77-860E-10EBCD7B368F}.Release|Any CPU.ActiveCfg = Release|Any CPU {6255F8C4-B0B5-4E77-860E-10EBCD7B368F}.Release|Any CPU.Build.0 = Release|Any CPU + {E7E48971-E879-4E6A-B316-70AC0A6F4C95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7E48971-E879-4E6A-B316-70AC0A6F4C95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7E48971-E879-4E6A-B316-70AC0A6F4C95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7E48971-E879-4E6A-B316-70AC0A6F4C95}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/nsw/Source/SendNSWMessageService/NSWSendService.cs b/nsw/Source/SendNSWMessageService/NSWSendService.cs index 7cfdf391..4c0a887c 100644 --- a/nsw/Source/SendNSWMessageService/NSWSendService.cs +++ b/nsw/Source/SendNSWMessageService/NSWSendService.cs @@ -120,7 +120,9 @@ namespace SendNSWMessageService _log.InfoFormat("Sending {0} message to {1}", message.MessageNotificationClass.ToString(), message.HIS.ToString()); - bool sendSucceeded = false; + bool sendSucceeded = false; + + // switch über passendes HIS / Schnittstelle switch (message.HIS) { @@ -129,7 +131,7 @@ namespace SendNSWMessageService if (!sendSucceeded) { message.InternalStatus = Message.BSMDStatus.SEND_FAILED; - } + } break; case Message.NSWProvider.DAKOSY: sendSucceeded = bsmd.dakosy.Request.Send(message); @@ -146,6 +148,14 @@ namespace SendNSWMessageService if (sendSucceeded) { + // alte Fehlerliste entfernen (die Antwort kann praktisch noch nicht da sein) + // vor dem Versenden zu entfernen halte ich für doof, wenn das Versenden scheitert + + foreach (MessageError messageError in message.ErrorList) + DBManager.Instance.Delete(messageError); + foreach (MessageViolation messageViolation in message.ViolationList) + DBManager.Instance.Delete(messageViolation); + _log.Info("send successful, saving message."); message.InternalStatus = Message.BSMDStatus.SENT; message.SentAt = DateTime.Now; @@ -166,6 +176,7 @@ namespace SendNSWMessageService } else { + _log.Fatal("database connection failure, stopping service"); this.EventLog.WriteEntry("NSW Send Service stopped: DB connection failed", EventLogEntryType.Error); this.Stop(); } diff --git a/nsw/Source/bsmd.ExcelReadService.sln b/nsw/Source/bsmd.ExcelReadService.sln new file mode 100644 index 00000000..525cef08 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.ExcelReadService", "bsmd.ExcelReadService\bsmd.ExcelReadService.csproj", "{9475E638-DCFB-49E8-BD4E-3513D106C82A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.database", "bsmd.database\bsmd.database.csproj", "{19945AF2-379B-46A5-B27A-303B5EC1D557}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.email", "bsmd.email\bsmd.email.csproj", "{4B48A8AD-926D-4E0C-BEB3-59E040928137}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9475E638-DCFB-49E8-BD4E-3513D106C82A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9475E638-DCFB-49E8-BD4E-3513D106C82A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9475E638-DCFB-49E8-BD4E-3513D106C82A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9475E638-DCFB-49E8-BD4E-3513D106C82A}.Release|Any CPU.Build.0 = Release|Any CPU + {19945AF2-379B-46A5-B27A-303B5EC1D557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19945AF2-379B-46A5-B27A-303B5EC1D557}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19945AF2-379B-46A5-B27A-303B5EC1D557}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19945AF2-379B-46A5-B27A-303B5EC1D557}.Release|Any CPU.Build.0 = Release|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/nsw/Source/bsmd.ExcelReadService/App.config b/nsw/Source/bsmd.ExcelReadService/App.config new file mode 100644 index 00000000..cec102d4 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/App.config @@ -0,0 +1,33 @@ + + + + +
+ + + + + + + + + replace me! + + + E:\temp\SietasSheets + + + + + + + + + + + + 300 + + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReadService.Designer.cs b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.Designer.cs new file mode 100644 index 00000000..ec00cdc8 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.Designer.cs @@ -0,0 +1,40 @@ +namespace bsmd.ExcelReadService +{ + partial class ExcelReadService + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + // + // ExcelReadService + // + this.ServiceName = "ExcelReadService"; + + } + + #endregion + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs new file mode 100644 index 00000000..d816d079 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Linq; +using System.IO; +using System.ServiceProcess; +using System.Text; +using System.Threading.Tasks; +using System.Timers; + +using log4net; + +using bsmd.database; +using bsmd.email; + + +namespace bsmd.ExcelReadService +{ + + public partial class ExcelReadService : ServiceBase + { + private Timer _timer; + private object _timerlock = new object(); + private bool processRunning = false; + private ILog _log = LogManager.GetLogger(typeof(ExcelReadService)); + + public ExcelReadService() + { + Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory); + InitializeComponent(); + } + + protected override void OnStart(string[] args) + { + this.EventLog.Source = this.ServiceName; + this.EventLog.Log = "Application"; + this.Init(args); + this.EventLog.WriteEntry("EU-NOAD Excel Read Service started.", EventLogEntryType.Information); + this.DoOnce(); + } + + private void Init(string[] args) + { + this._timer = new Timer(); + this._timer.Interval = Properties.Settings.Default.SleepSeconds * 1000; + this._timer.Elapsed += _timer_Elapsed; + this._timer.Enabled = true; + } + + private void _timer_Elapsed(object sender, ElapsedEventArgs e) + { + lock (this._timerlock) + { + if (this.processRunning) return; + else this.processRunning = true; + } + + if (DBManager.Instance.Connect(Properties.Settings.Default.ConnectionString)) + { + + try + { + string messageId = ""; + string attachmentLocalPath = ""; + string mailSender = ""; + + using (BSMDPopClient bsmdPopClient = new BSMDPopClient()) + { + if (!bsmdPopClient.IsConnected) + { + _log.Error("cannot connect to pop3 server, aborting!"); + this.Stop(); + } + + // check and download next e-Mail, saving attachment + while (bsmdPopClient.ReceiveSingleMail(out attachmentLocalPath, out messageId, out mailSender)) + { + + bool readResult; + string readMessage = ""; + MessageCore messageCore = null; + + // 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"); + } + + // set messagecore to createreport and let reportGenerator create a reply + + // 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); + + } + } + + DBManager.Instance.Disconnect(); + } + catch (Exception ex) + { + _log.ErrorFormat("Exception occurred: {0}", ex.ToString()); + } + } + else + { + this.EventLog.WriteEntry("ReportService stopped: DB connection failed", EventLogEntryType.Error); + this.Stop(); + } + + lock (this._timerlock) + { + this.processRunning = false; + } + + } + + protected override void OnStop() + { + } + + internal void DoOnce() + { + this._timer_Elapsed(null, null); + } + + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReadService.resx b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.resx new file mode 100644 index 00000000..34987b22 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReadService.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs b/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs new file mode 100644 index 00000000..b61dbeb1 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs @@ -0,0 +1,57 @@ +// +// Class: ExcelReader +// Current CLR: 4.0.30319.34209 +// System: Microsoft Visual Studio 10.0 +// Author: dani +// Created: 6/15/2015 10:03:40 PM +// +// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; + +using log4net; + +using Excel.Core; +using Excel; + +namespace bsmd.ExcelReadService +{ + public class ExcelReader : IDisposable + { + private IExcelDataReader dataReader; + private ILog _log = LogManager.GetLogger(typeof(ExcelReader)); + + public ExcelReader(string filePath) + { + using (FileStream fs = File.Open(filePath, FileMode.Open, FileAccess.Read)) + { + if (filePath.EndsWith(".xls", StringComparison.InvariantCultureIgnoreCase)) + dataReader = ExcelReaderFactory.CreateBinaryReader(fs); + else if (filePath.EndsWith(".xlsx", StringComparison.InvariantCultureIgnoreCase)) + dataReader = ExcelReaderFactory.CreateOpenXmlReader(fs); + else + throw new ArgumentException(string.Format("saved file {0} is not an excel file", filePath)); + } + } + + public object GetCell(string workSheetName, int row, int col) + { + this.dataReader.IsFirstRowAsColumnNames = false; + DataSet dataSet = dataReader.AsDataSet(); + DataTable workSheet = dataSet.Tables[workSheetName]; + + var cellValue = workSheet.Rows[row][col]; + + return cellValue; + } + + public void Dispose() + { + if (this.dataReader != null) + this.dataReader.Dispose(); + } + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/Program.cs b/nsw/Source/bsmd.ExcelReadService/Program.cs new file mode 100644 index 00000000..fbddd2c1 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/Program.cs @@ -0,0 +1,29 @@ +using System.Diagnostics; +using System.ServiceProcess; + +namespace bsmd.ExcelReadService +{ + static class Program + { + /// + /// The main entry point for the application. + /// + static void Main() + { + ServiceBase[] ServicesToRun; + + log4net.Config.XmlConfigurator.Configure(); + + ServicesToRun = new ServiceBase[] { new ExcelReadService() }; + + if (Debugger.IsAttached) + { + ((ExcelReadService)ServicesToRun[0]).DoOnce(); + } + else + { + ServiceBase.Run(ServicesToRun); + } + } + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.Designer.cs b/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.Designer.cs new file mode 100644 index 00000000..f02870a3 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.Designer.cs @@ -0,0 +1,58 @@ +namespace bsmd.ExcelReadService +{ + partial class ProjectInstaller + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller(); + this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller(); + // + // serviceProcessInstaller1 + // + this.serviceProcessInstaller1.Password = null; + this.serviceProcessInstaller1.Username = null; + // + // serviceInstaller1 + // + this.serviceInstaller1.Description = "Receives and processes Excel reports send via e-mail"; + this.serviceInstaller1.DisplayName = "EU-NOAD Excel Report Service"; + this.serviceInstaller1.ServiceName = "ExcelReadService"; + // + // ProjectInstaller + // + this.Installers.AddRange(new System.Configuration.Install.Installer[] { + this.serviceProcessInstaller1, + this.serviceInstaller1}); + + } + + #endregion + + private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; + private System.ServiceProcess.ServiceInstaller serviceInstaller1; + } +} \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.cs b/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.cs new file mode 100644 index 00000000..780f1030 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration.Install; +using System.Linq; +using System.Threading.Tasks; + +namespace bsmd.ExcelReadService +{ + [RunInstaller(true)] + public partial class ProjectInstaller : System.Configuration.Install.Installer + { + public ProjectInstaller() + { + InitializeComponent(); + } + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.resx b/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.resx new file mode 100644 index 00000000..f3cbaaba --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/ProjectInstaller.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 196, 17 + + + False + + \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/Properties/AssemblyInfo.cs b/nsw/Source/bsmd.ExcelReadService/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..45c61223 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("bsmd.ExcelReadService")] +[assembly: AssemblyDescription("Imports Sietas Style Excel Sheets into NSW DB")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("eda620d4-a872-4c8c-8d4e-6bdd447ee386")] \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs new file mode 100644 index 00000000..f1e91ac4 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.Designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace bsmd.ExcelReadService.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("replace me!")] + public string ConnectionString { + get { + return ((string)(this["ConnectionString"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("E:\\temp\\SietasSheets")] + public string ArchiveFolder { + get { + return ((string)(this["ArchiveFolder"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string POP3Server { + get { + return ((string)(this["POP3Server"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string POP3User { + get { + return ((string)(this["POP3User"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string POP3Password { + get { + return ((string)(this["POP3Password"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("300")] + public int SleepSeconds { + get { + return ((int)(this["SleepSeconds"])); + } + } + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings new file mode 100644 index 00000000..c0ea01a8 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/Properties/Settings.settings @@ -0,0 +1,24 @@ + + + + + + replace me! + + + E:\temp\SietasSheets + + + + + + + + + + + + 300 + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/Util.cs b/nsw/Source/bsmd.ExcelReadService/Util.cs new file mode 100644 index 00000000..cb9eb148 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/Util.cs @@ -0,0 +1,86 @@ +// +// Class: Util +// Current CLR: 4.0.30319.34209 +// System: Microsoft Visual Studio 10.0 +// Author: dani +// Created: 6/17/2015 7:12:38 AM +// +// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved. + +using System; +using System.Collections.Generic; +using log4net; +using bsmd.database; + +namespace bsmd.ExcelReadService +{ + public class Util + { + private static ILog _log = LogManager.GetLogger(typeof(Util)); + + public static bool ProcessSheet(ExcelReader reader, out string readMessage, out MessageCore messageCore) + { + readMessage = "ok"; + messageCore = Util.LookupMessageCore(reader); + + // start parsing fields + string sheetVersion = reader.GetCell("Portcall", 2, 1) as string; + messageCore.SietasSheetVersion = sheetVersion; + + DBManager.Instance.Save(messageCore); + + + + return true; + } + + /// + /// Check with cell values if this message core is already in our DB + /// + private static MessageCore LookupMessageCore(ExcelReader reader) + { + // lookup using field values + double imoDouble = (double) reader.GetCell("SHIP", 13, 6); + string imo = Convert.ToInt32(imoDouble).ToString(); + + string etaDateString = reader.GetCell("Portcall", 16, 8).ToString(); + string etaTime = reader.GetCell("Portcall", 16, 10).ToString(); + DateTime dt = Util.ConstructDate(etaDateString, etaTime); + string poc = reader.GetCell("Portcall", 16, 1) as string; + + MessageCore result = null; + + if (DBManager.Instance.GetMessageCoreByShipInfos(imo, dt, poc) == null) + { + result = new MessageCore(); + + result.IMO = imo; + result.ReportStatus = MessageCore.ReportStatusEnum.COMPLETE; + result.Portname = poc; + result.ETA = dt; + if (result.IMO.Length > 7) + { + _log.WarnFormat("IMO {0} is longer than 7 chars, truncating!", result.IMO); + result.IMO = result.IMO.Substring(0, 7); + } + DBManager.Instance.Save(result); + } + + + return result; + } + + private static DateTime ConstructDate(string etaDateString, string etaTime) + { + DateTime result = DateTime.Now; + if (DateTime.TryParse(etaDateString, out result)) + { + TimeSpan sp; + if (TimeSpan.TryParse(etaTime, out sp)) + result += sp; + } + return result; + } + + } +} diff --git a/nsw/Source/bsmd.ExcelReadService/bsmd.ExcelReadService.csproj b/nsw/Source/bsmd.ExcelReadService/bsmd.ExcelReadService.csproj new file mode 100644 index 00000000..c848f3c5 --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/bsmd.ExcelReadService.csproj @@ -0,0 +1,124 @@ + + + + + Debug + AnyCPU + {9475E638-DCFB-49E8-BD4E-3513D106C82A} + WinExe + Properties + bsmd.ExcelReadService + bsmd.ExcelReadService + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\ExcelDataReader.2.1.2.3\lib\net45\Excel.dll + + + ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll + + + ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll + + + + + + + + + + + + + + + Properties\AssemblyProductInfo.cs + + + Properties\AssemblyProjectInfo.cs + + + Properties\AssemblyProjectKeyInfo.cs + + + + Component + + + ExcelReadService.cs + + + + Component + + + ProjectInstaller.cs + + + + True + True + Settings.settings + + + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + ExcelReadService.cs + + + ProjectInstaller.cs + + + + + {19945af2-379b-46a5-b27a-303b5ec1d557} + bsmd.database + + + {4b48a8ad-926d-4e0c-beb3-59e040928137} + bsmd.email + + + + + + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.ExcelReadService/packages.config b/nsw/Source/bsmd.ExcelReadService/packages.config new file mode 100644 index 00000000..ae748cde --- /dev/null +++ b/nsw/Source/bsmd.ExcelReadService/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.ReportGenerator.sln b/nsw/Source/bsmd.ReportGenerator.sln index 674c9d41..39d64eeb 100644 --- a/nsw/Source/bsmd.ReportGenerator.sln +++ b/nsw/Source/bsmd.ReportGenerator.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.ReportGenerator", "bsm EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.database", "bsmd.database\bsmd.database.csproj", "{19945AF2-379B-46A5-B27A-303B5EC1D557}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.email", "bsmd.email\bsmd.email.csproj", "{4B48A8AD-926D-4E0C-BEB3-59E040928137}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {19945AF2-379B-46A5-B27A-303B5EC1D557}.Debug|Any CPU.Build.0 = Debug|Any CPU {19945AF2-379B-46A5-B27A-303B5EC1D557}.Release|Any CPU.ActiveCfg = Release|Any CPU {19945AF2-379B-46A5-B27A-303B5EC1D557}.Release|Any CPU.Build.0 = Release|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B48A8AD-926D-4E0C-BEB3-59E040928137}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs index 2e2c65d9..b58b8e46 100644 --- a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs +++ b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs @@ -26,7 +26,8 @@ namespace bsmd.ReportGenerator #region create document - public static Document CreateDocument(string title, string subject, string author) + public static Document CreateDocument(string title, string subject, string author, + Dictionary coverInfos) { // Create a new MigraDoc document Document document = new Document(); @@ -36,7 +37,7 @@ namespace bsmd.ReportGenerator BSMDDocument.DefineStyles(document); - BSMDDocument.DefineCover(document); + BSMDDocument.DefineCover(document, coverInfos); BSMDDocument.DefineContentSection(document); //TableOfContents.DefineTableOfContents(document); @@ -136,7 +137,7 @@ namespace bsmd.ReportGenerator /// /// Defines the cover page. /// - public static void DefineCover(Document document) + public static void DefineCover(Document document, Dictionary coverInfos) { Section section = document.AddSection(); @@ -150,10 +151,16 @@ namespace bsmd.ReportGenerator paragraph.Format.Font.Size = 16; paragraph.Format.Font.Color = Colors.DarkRed; paragraph.Format.SpaceBefore = "8cm"; - paragraph.Format.SpaceAfter = "3cm"; - + paragraph = section.AddParagraph("Rendering date: "); + paragraph.Format.SpaceAfter = "2cm"; paragraph.AddDateField(); + + paragraph = section.AddParagraph(); + paragraph.Format.Font.Size = 14; + foreach (string key in coverInfos.Keys) + paragraph.AddText(string.Format("{0}:\t\t{1}\n", key, coverInfos[key])); + } #endregion @@ -193,17 +200,27 @@ namespace bsmd.ReportGenerator public static void AddNSWMessageParagraph(Document document, IMessageParagraph messageParagraph) { - Paragraph paragraph = document.LastSection.AddParagraph(messageParagraph.Title, "Heading2"); + document.LastSection.AddParagraph(messageParagraph.Title, "Heading2"); + document.LastSection.AddParagraph(messageParagraph.Subtitle, "Heading3"); if (messageParagraph.MessageText != null) // 1:n message (CREW, PAS,..) BSMDDocument.AddActualTableParagraph(document, messageParagraph.MessageText, false); if (messageParagraph.ChildParagraphs != null) { - foreach (IMessageParagraph childParagraph in messageParagraph.ChildParagraphs) - { - BSMDDocument.AddActualTableParagraph(document, childParagraph.MessageText, true); - } + // TODO: Adäquate Tabellendarstellung designen + + //if (messageParagraph.ShowChildrenAsTable) + //{ + + //} + //else + //{ + foreach (IMessageParagraph childParagraph in messageParagraph.ChildParagraphs) + { + BSMDDocument.AddActualTableParagraph(document, childParagraph.MessageText, true); + } + //} } } diff --git a/nsw/Source/bsmd.ReportGenerator/ReportService.cs b/nsw/Source/bsmd.ReportGenerator/ReportService.cs index 91db0eee..d445c6c2 100644 --- a/nsw/Source/bsmd.ReportGenerator/ReportService.cs +++ b/nsw/Source/bsmd.ReportGenerator/ReportService.cs @@ -1,20 +1,16 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Diagnostics; using System.IO; -using System.Linq; using System.ServiceProcess; -using System.Text; -using System.Threading.Tasks; using System.Timers; -using MigraDoc; -using MigraDoc.DocumentObjectModel; using log4net; +using MigraDoc.DocumentObjectModel; + using bsmd.database; +using bsmd.email; namespace bsmd.ReportGenerator { @@ -38,6 +34,7 @@ namespace bsmd.ReportGenerator this.EventLog.Log = "Application"; this.Init(args); this.EventLog.WriteEntry("Report Service started.", EventLogEntryType.Information); + _log.Info("Report Service started."); this.DoOnce(); } @@ -63,17 +60,38 @@ namespace bsmd.ReportGenerator try { // load all messages with report flag set - List reportCores = DBManager.Instance.GetMessageCoresByStatus(MessageCore.BSMDStatus.CREATE_RECEIVE_RECEIPT); + List reportCores = DBManager.Instance.GetMessageCoresByReportStatus(MessageCore.ReportStatusEnum.COMPLETE); // create report documents for each of the messages foreach (MessageCore reportCore in reportCores) { List messages = DBManager.Instance.GetMessagesForCore(reportCore); + Dictionary coverInfos = new Dictionary(); + // Schiffsname aus der STAT meldung fischen + foreach (Message msg in messages) + { + if (msg.MessageNotificationClass == Message.NotificationClass.STAT) + { + if (msg.Elements.Count > 0) + { + STAT stat = msg.Elements[0] as STAT; + if (stat != null) + { + coverInfos.Add("Ship", stat.ShipName); + } + } + } + } + coverInfos.Add("IMO", reportCore.IMO); + DateTime eta = reportCore.ETA ?? (reportCore.ETAKielCanal ?? new DateTime(0)); + coverInfos.Add("ETA", eta.ToString()); + coverInfos.Add("Port", reportCore.Portname); + Document migraDocument = BSMDDocument.CreateDocument( string.Format("NSW Eingangsdatenübersicht für IMO {0}, ETA {1}", reportCore.IMO, reportCore.ETA), "NSW Meldung", - Properties.Settings.Default.ReportAuthor); + Properties.Settings.Default.ReportAuthor, coverInfos); // print header area (with message core data) @@ -88,10 +106,11 @@ namespace bsmd.ReportGenerator reportCore.Id); BSMDDocument.RenderDocument(migraDocument, fullPath); _log.InfoFormat("Document created for MessageCoreId {0}, IMO {1}", reportCore.Id, reportCore.IMO); - BSMDMail.SendNSWReportAsAttachment(reportCore, fullPath); + string subject = string.Format("NSW message report for {0}", reportCore.IMO); + BSMDMail.SendNSWReportAsAttachment(subject, fullPath); - // reset status on core message (get ready to prepare) - reportCore.BSMDStatusInternal = MessageCore.BSMDStatus.PREPARE; + // reset report status + reportCore.ReportStatus = MessageCore.ReportStatusEnum.NONE; DBManager.Instance.Save(reportCore); } @@ -117,6 +136,7 @@ namespace bsmd.ReportGenerator protected override void OnStop() { + _log.Info("Report Service stopping."); } internal void DoOnce() diff --git a/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj b/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj index 689db809..efdd7e32 100644 --- a/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj +++ b/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj @@ -79,7 +79,6 @@ Properties\AssemblyProjectKeyInfo.cs - Component @@ -122,6 +121,10 @@ {19945af2-379b-46a5-b27a-303b5ec1d557} bsmd.database + + {4b48a8ad-926d-4e0c-beb3-59e040928137} + bsmd.email + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 196, 17 + + + False + + \ No newline at end of file diff --git a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs index 6eaed67c..ba2e7d39 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs +++ b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.Designer.cs @@ -25,7 +25,9 @@ namespace bsmd.dakosy.ResponseService.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("replace me!")] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=192.168.2.5\\SQLEXPRESS;Initial Catalog=nsw;Integrated Security=False;" + + "User ID=dfuser;Password=dfpasswd;Connect Timeout=15;Encrypt=False;TrustServerCer" + + "tificate=False")] public string ConnectionString { get { return ((string)(this["ConnectionString"])); @@ -34,5 +36,17 @@ namespace bsmd.dakosy.ResponseService.Properties { this["ConnectionString"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("300")] + public int SleepSeconds { + get { + return ((int)(this["SleepSeconds"])); + } + set { + this["SleepSeconds"] = value; + } + } } } diff --git a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings index 20558eb5..f5efa586 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings +++ b/nsw/Source/bsmd.dakosy.ResponseService/Properties/Settings.settings @@ -3,7 +3,10 @@ - replace me! + Data Source=192.168.2.5\SQLEXPRESS;Initial Catalog=nsw;Integrated Security=False;User ID=dfuser;Password=dfpasswd;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False + + + 300 \ No newline at end of file diff --git a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.Designer.cs b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.Designer.cs index 9de4dd43..d53bdaaa 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.Designer.cs +++ b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.Designer.cs @@ -28,8 +28,11 @@ /// private void InitializeComponent() { - components = new System.ComponentModel.Container(); - this.ServiceName = "Service1"; + // + // SFTPService + // + this.ServiceName = "Dakosy response service"; + } #endregion diff --git a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs index 1cc94176..838df08f 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs +++ b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.cs @@ -35,15 +35,10 @@ namespace bsmd.dakosy.ResponseService protected override void OnStart(string[] args) { this.EventLog.Source = this.ServiceName; - this.EventLog.Log = "Application"; - this.EventLog.BeginInit(); - if (!EventLog.SourceExists(this.EventLog.Source, this.EventLog.Log)) - EventLog.CreateEventSource(this.EventLog.Source, this.EventLog.Log); - this.EventLog.EndInit(); - + this.EventLog.Log = "Application"; this.Init(args); - this.EventLog.WriteEntry("NSW SFTP Response Service started.", EventLogEntryType.Information); + this._timer_Elapsed(null, null); } protected override void OnStop() @@ -54,7 +49,7 @@ namespace bsmd.dakosy.ResponseService public void Init(string[] args) { this._timer = new Timer(); - this._timer.Interval = 600000; // 10 Min, TODO: Settings + this._timer.Interval = Properties.Settings.Default.SleepSeconds * 1000; this._timer.Elapsed += _timer_Elapsed; this._timer.Enabled = true; @@ -68,27 +63,13 @@ namespace bsmd.dakosy.ResponseService { if (this.processRunning) return; else this.processRunning = true; - } - - string localDir = ""; // TBD + } if (DBManager.Instance.Connect(Properties.Settings.Default.ConnectionString)) { try { - - // SFTP verbindung öffnen und alle Dateien herunterladen - sftp.GetAll(localDir); - - - // lokale Dateien verarbeiten - foreach(string inputFile in Directory.GetFiles(localDir)) - { - if (!Response.Read(inputFile)) - _log.ErrorFormat("Error reading input file {0}", inputFile); - else - File.Delete(inputFile); // alternativ: move to archive folder - } + Response.ReadAll(); } catch (Exception ex) diff --git a/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.resx b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.resx new file mode 100644 index 00000000..34987b22 --- /dev/null +++ b/nsw/Source/bsmd.dakosy.ResponseService/SFTPService.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/nsw/Source/bsmd.dakosy.ResponseService/bsmd.dakosy.ResponseService.csproj b/nsw/Source/bsmd.dakosy.ResponseService/bsmd.dakosy.ResponseService.csproj index 28efda7d..33a50e22 100644 --- a/nsw/Source/bsmd.dakosy.ResponseService/bsmd.dakosy.ResponseService.csproj +++ b/nsw/Source/bsmd.dakosy.ResponseService/bsmd.dakosy.ResponseService.csproj @@ -42,7 +42,9 @@ ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll + + @@ -60,6 +62,12 @@ Properties\AssemblyProjectKeyInfo.cs + + Component + + + ProjectInstaller.cs + True True @@ -77,6 +85,7 @@ + SettingsSingleFileGenerator @@ -93,6 +102,14 @@ bsmd.database + + + ProjectInstaller.cs + + + SFTPService.cs + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.email/packages.config b/nsw/Source/bsmd.email/packages.config new file mode 100644 index 00000000..065ed4a3 --- /dev/null +++ b/nsw/Source/bsmd.email/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.herberg.FormService/Enums.cs b/nsw/Source/bsmd.herberg.FormService/Enums.cs index 47b9650e..2f53ada2 100644 --- a/nsw/Source/bsmd.herberg.FormService/Enums.cs +++ b/nsw/Source/bsmd.herberg.FormService/Enums.cs @@ -154,5 +154,16 @@ namespace bsmd.herberg.FormService return null; } + public static byte? ParseGender(string val) + { + if (val.Equals("MALE")) return 0; + if (val.Equals("M")) return 0; + if (val.Equals("FEMALE")) return 1; + if (val.Equals("F")) return 1; + if (val.Equals("OTHER")) return 2; + if (val.Equals("O")) return 2; + return null; + } + } } diff --git a/nsw/Source/bsmd.herberg.FormService/FormService.cs b/nsw/Source/bsmd.herberg.FormService/FormService.cs index acc9f6e2..4a235bba 100644 --- a/nsw/Source/bsmd.herberg.FormService/FormService.cs +++ b/nsw/Source/bsmd.herberg.FormService/FormService.cs @@ -144,7 +144,9 @@ namespace bsmd.herberg.FormService aMessageCore = new MessageCore(); aMessageCore.HerbergFormGuid = new Guid(formBody.formGuid); // aMessageCore.HerbergFormTemplateGuid = formResponse. - aMessageCore.IMO = formResponse.imoNumber.ToString(); + aMessageCore.IMO = formResponse.imoNumber.ToString(); + aMessageCore.ReportStatus = MessageCore.ReportStatusEnum.COMPLETE; + aMessageCore.BSMDStatusInternal = MessageCore.BSMDStatus.PREPARE; if (aMessageCore.IMO.Length > 7) { diff --git a/nsw/Source/bsmd.herberg.FormService/Util.cs b/nsw/Source/bsmd.herberg.FormService/Util.cs index 43f021e9..8a84f017 100644 --- a/nsw/Source/bsmd.herberg.FormService/Util.cs +++ b/nsw/Source/bsmd.herberg.FormService/Util.cs @@ -38,9 +38,19 @@ 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; + + if (aMessageCore.ReportStatus != MessageCore.ReportStatusEnum.COMPLETE) + aMessageCore.ReportStatus = MessageCore.ReportStatusEnum.HE_REVISION; + + aMessageCore.HerbergRevDate = formResponse.formDatasets[i].revisionDate; + Dictionary> groupedVals = new Dictionary>(); Dictionary>> groupedRowVals = new Dictionary>>(); @@ -61,6 +71,11 @@ namespace bsmd.herberg.FormService _log.InfoFormat("REGISTRATION_TYPE: {0}", formData.value); break; case "REPORT_TYPE": + + if ((aMessageCore.HerbergReportType != formData.value) && + (aMessageCore.ReportStatus != MessageCore.ReportStatusEnum.COMPLETE)) + aMessageCore.ReportStatus = MessageCore.ReportStatusEnum.HE_REPORTTYPE; + aMessageCore.HerbergReportType = formData.value; if (aMessageCore.HerbergReportType.Equals("Pre-Departure Notification Update") || aMessageCore.HerbergReportType.Equals("Departure Notification Update")) @@ -187,7 +202,7 @@ namespace bsmd.herberg.FormService { try { - if (vDict.ContainsKey("ATAPortOfCall")) ata.ATAPortOfCall = Extensions.TryParse(vDict["ATAPortOfCall"]); + if (vDict.ContainsKey("ATAPortOfCall")) ata.ATAPortOfCall = Extensions.TryParseDateTime(vDict["ATAPortOfCall"]); } catch (Exception ex) { @@ -214,7 +229,7 @@ namespace bsmd.herberg.FormService { try { - if (vDict.ContainsKey("ATDPortOfCall")) atd.ATDPortOfCall = Extensions.TryParse(vDict["ATDPortOfCall"]); + if (vDict.ContainsKey("ATDPortOfCall")) atd.ATDPortOfCall = Extensions.TryParseDateTime(vDict["ATDPortOfCall"]); } catch (Exception ex) { @@ -269,14 +284,14 @@ namespace bsmd.herberg.FormService try { // if (vDict.ContainsKey("CallPurposeCode")) noa_nod.CallPurposeCode = Int32.Parse(vDict["CallPurposeCode"]); - if (vDict.ContainsKey("ETAToNextPort")) noa_nod.ETAToNextPort = Extensions.TryParse(vDict["ETAToNextPort"]); - if (vDict.ContainsKey("ETDFromLastPort")) noa_nod.ETDFromLastPort = Extensions.TryParse(vDict["ETDFromLastPort"]); - if (vDict.ContainsKey("ETAToPortOfCall")) noa_nod.ETAToPortOfCall = Extensions.TryParse(vDict["ETAToPortOfCall"]); - if (vDict.ContainsKey("ETDFromPortOfCall")) noa_nod.ETDFromPortOfCall = Extensions.TryParse(vDict["ETDFromPortOfCall"]); + if (vDict.ContainsKey("ETAToNextPort")) noa_nod.ETAToNextPort = Extensions.TryParseDateTime(vDict["ETAToNextPort"]); + if (vDict.ContainsKey("ETDFromLastPort")) noa_nod.ETDFromLastPort = Extensions.TryParseDateTime(vDict["ETDFromLastPort"]); + if (vDict.ContainsKey("ETAToPortOfCall")) noa_nod.ETAToPortOfCall = Extensions.TryParseDateTime(vDict["ETAToPortOfCall"]); + if (vDict.ContainsKey("ETDFromPortOfCall")) noa_nod.ETDFromPortOfCall = Extensions.TryParseDateTime(vDict["ETDFromPortOfCall"]); // if (vDict.ContainsKey("CallPurposeDescription")) noa_nod.CallPurposeDescription = vDict["CallPurposeDescription"]; // if(vDict.ContainsKey("CountryOfNextPort")) noa_nod. nicht relevant - if (vDict.ContainsKey("ETAToKielCanal")) noa_nod.ETAToKielCanal = Extensions.TryParse(vDict["ETAToKielCanal"]); - if (vDict.ContainsKey("ETDFromKielCanal")) noa_nod.ETDFromKielCanal = Extensions.TryParse(vDict["ETDFromKielCanal"]); + if (vDict.ContainsKey("ETAToKielCanal")) noa_nod.ETAToKielCanal = Extensions.TryParseDateTime(vDict["ETAToKielCanal"]); + if (vDict.ContainsKey("ETDFromKielCanal")) noa_nod.ETDFromKielCanal = Extensions.TryParseDateTime(vDict["ETDFromKielCanal"]); if (vDict.ContainsKey("CountryCodeOfLastPort") && vDict.ContainsKey("LastPortCode")) noa_nod.LastPort = vDict["CountryCodeOfLastPort"] + vDict["LastPortCode"]; if (vDict.ContainsKey("CountryCodeOfNextPort") && vDict.ContainsKey("NextPortCode")) @@ -330,8 +345,8 @@ namespace bsmd.herberg.FormService if (vDict.ContainsKey("MMSINumber")) stat.MMSINumber = vDict["MMSINumber"]; if (vDict.ContainsKey("Flag")) stat.Flag = vDict["Flag"]; if (vDict.ContainsKey("ShipType")) stat.ShipType = vDict["ShipType"]; - if (vDict.ContainsKey("LengthOverall_MTR")) stat.LengthOverall_MTR = Double.Parse(vDict["LengthOverall_MTR"], NumberFormatInfo.InvariantInfo); - if (vDict.ContainsKey("Beam_MTR")) stat.Beam_MTR = Double.Parse(vDict["Beam_MTR"], NumberFormatInfo.InvariantInfo); + if (vDict.ContainsKey("LengthOverall_MTR")) stat.LengthOverall_MTR = Extensions.TryParseDouble(vDict["LengthOverall_MTR"]); + if (vDict.ContainsKey("Beam_MTR")) stat.Beam_MTR = Extensions.TryParseDouble(vDict["Beam_MTR"]); if (vDict.ContainsKey("GrossTonnage")) stat.GrossTonnage = Int32.Parse(vDict["GrossTonnage"]); // if (vDict.ContainsKey("PortNameOfRegistry")) stat.PortOfRegistry = vDict["PortNameOfRegistry"]; // existiert nicht if (vDict.ContainsKey("InmarsatCallNumber")) stat.InmarsatCallNumber = vDict["InmarsatCallNumber"]; @@ -386,17 +401,17 @@ namespace bsmd.herberg.FormService if (vDict.ContainsKey("SanitaryMeasuresApplied")) mdh.SanitaryMeasuresApplied = vDict["SanitaryMeasuresApplied"].Equals("Y"); if (vDict.ContainsKey("SanitaryMeasuresType")) mdh.SanitaryMeasuresType = vDict["SanitaryMeasuresType"]; if (vDict.ContainsKey("SanitaryMeasuresLocation")) mdh.SanitaryMeasuresLocation = vDict["SanitaryMeasuresLocation"]; - if (vDict.ContainsKey("SanitaryMeasuresDate")) mdh.SanitaryMeasuresDate = Extensions.TryParse(vDict["SanitaryMeasuresDate"]); + if (vDict.ContainsKey("SanitaryMeasuresDate")) mdh.SanitaryMeasuresDate = Extensions.TryParseDateTime(vDict["SanitaryMeasuresDate"]); if (vDict.ContainsKey("StowawaysDetected")) mdh.StowawaysDetected = vDict["StowawaysDetected"].Equals("Y"); if (vDict.ContainsKey("StowawaysJoiningLocation")) mdh.StowawaysJoiningLocation = vDict["StowawaysJoiningLocation"]; if (vDict.ContainsKey("SickAnimalOrPetOnBoard")) mdh.SickAnimalOrPetOnBoard = vDict["SickAnimalOrPetOnBoard"].Equals("Y"); if (vDict.ContainsKey("ValidSanitaryControlExemptionOrCertificateOnBoard")) mdh.ValidSanitaryControlExemptionOrCertificateOnBoard = vDict["ValidSanitaryControlExemptionOrCertificateOnBoard"].Equals("Y"); if (vDict.ContainsKey("SanitaryControlCertPlaceOfIssue")) mdh.PlaceOfIssue = vDict["SanitaryControlCertPlaceOfIssue"]; - if (vDict.ContainsKey("SanitaryControlCertDateOfIssue")) mdh.DateOfIssue = Extensions.TryParse(vDict["SanitaryControlCertDateOfIssue"]); + if (vDict.ContainsKey("SanitaryControlCertDateOfIssue")) mdh.DateOfIssue = Extensions.TryParseDateTime(vDict["SanitaryControlCertDateOfIssue"]); if (vDict.ContainsKey("SanitaryControlReinspectionRequired")) mdh.SanitaryControlReinspectionRequired = vDict["SanitaryControlReinspectionRequired"].Equals("Y"); if (vDict.ContainsKey("InfectedAreaVisited")) mdh.InfectedAreaVisited = vDict["InfectedAreaVisited"].Equals("Y"); if (vDict.ContainsKey("InfectedAreaPort")) mdh.InfectedAreaPort = vDict["InfectedAreaPort"]; - if (vDict.ContainsKey("InfectedAreaDate")) mdh.InfectedAreaDate = Extensions.TryParse(vDict["InfectedAreaDate"]); + if (vDict.ContainsKey("InfectedAreaDate")) mdh.InfectedAreaDate = Extensions.TryParseDateTime(vDict["InfectedAreaDate"]); // sublisten foreach (int key in nDict.Keys) @@ -411,7 +426,7 @@ namespace bsmd.herberg.FormService poc30.MDH = mdh; } - if (pDict.ContainsKey("PortOfCallLast30DaysDateOfDeparture")) poc30.PortOfCallLast30DaysDateOfDeparture = Extensions.TryParse(pDict["PortOfCallLast30DaysDateOfDeparture"]); + if (pDict.ContainsKey("PortOfCallLast30DaysDateOfDeparture")) poc30.PortOfCallLast30DaysDateOfDeparture = Extensions.TryParseDateTime(pDict["PortOfCallLast30DaysDateOfDeparture"]); if (pDict.ContainsKey("PortOfCallLast30DaysCrewMembersJoined")) poc30.PortOfCallLast30DaysCrewMembersJoined = pDict["PortOfCallLast30DaysCrewMembersJoined"].Equals("Y"); if (pDict.ContainsKey("PortOfCallLast30DaysPortCode") && pDict.ContainsKey("PortOfCallLast30DaysCountryCode")) poc30.PortOfCallLast30DaysLocode = pDict["PortOfCallLast30DaysCountryCode"] + pDict["PortOfCallLast30DaysPortCode"]; @@ -540,7 +555,7 @@ namespace bsmd.herberg.FormService } if (ppDict.ContainsKey("PortOfItineraryName")) poi.PortOfItineraryName = ppDict["PortOfItineraryName"]; - if (ppDict.ContainsKey("PortOfItineraryETA")) poi.PortOfItineraryETA = Extensions.TryParse(ppDict["PortOfItineraryETA"]); + if (ppDict.ContainsKey("PortOfItineraryETA")) poi.PortOfItineraryETA = Extensions.TryParseDateTime(ppDict["PortOfItineraryETA"]); saveMessages.Add(poi); } @@ -573,7 +588,7 @@ namespace bsmd.herberg.FormService try { if (bDict.ContainsKey("BunkerFuelType")) bkra.BunkerFuelType = bDict["BunkerFuelType"]; - if (bDict.ContainsKey("BunkerFuelQuantity_TNE")) bkra.BunkerFuelQuantity_TNE = Double.Parse(bDict["BunkerFuelQuantity_TNE"], NumberFormatInfo.InvariantInfo); + if (bDict.ContainsKey("BunkerFuelQuantity_TNE")) bkra.BunkerFuelQuantity_TNE = Extensions.TryParseDouble(bDict["BunkerFuelQuantity_TNE"]); } catch (Exception ex) { @@ -637,8 +652,8 @@ namespace bsmd.herberg.FormService if (pDict.ContainsKey("CrewMemberLastName")) crew.CrewMemberLastName = pDict["CrewMemberLastName"]; if (pDict.ContainsKey("CrewMemberFirstName")) crew.CrewMemberFirstName = pDict["CrewMemberFirstName"]; if (pDict.ContainsKey("CrewMemberPlaceOfBirth")) crew.CrewMemberPlaceOfBirth = pDict["CrewMemberPlaceOfBirth"]; - if (pDict.ContainsKey("CrewMemberDateOfBirth")) crew.CrewMemberDateOfBirth = Extensions.TryParse(pDict["CrewMemberDateOfBirth"]); - if (pDict.ContainsKey("CrewMemberGender")) crew.CrewMemberGender = (byte)Enum.Parse(typeof(Enums.PassengerGender), pDict["CrewMemberGender"], true); + if (pDict.ContainsKey("CrewMemberDateOfBirth")) crew.CrewMemberDateOfBirth = Extensions.TryParseDateTime(pDict["CrewMemberDateOfBirth"]); + if (pDict.ContainsKey("CrewMemberGender")) crew.CrewMemberGender = Enums.ParseGender(pDict["CrewMemberGender"]); if (pDict.ContainsKey("CrewMemberNationalityCode")) crew.CrewMemberNationality = pDict["CrewMemberNationalityCode"]; if (pDict.ContainsKey("CrewMemberIdentityDocumentType")) crew.CrewMemberIdentityDocumentType = (byte)Enum.Parse(typeof(Enums.PassengerIdentityDocumentType), pDict["CrewMemberIdentityDocumentType"], true); if (pDict.ContainsKey("CrewMemberIdentityDocumentId")) crew.CrewMemberIdentityDocumentId = pDict["CrewMemberIdentityDocumentId"]; @@ -675,7 +690,7 @@ namespace bsmd.herberg.FormService try { if (bDict.ContainsKey("BunkerFuelType")) bkrd.BunkerFuelType = bDict["BunkerFuelType"]; - if (bDict.ContainsKey("BunkerFuelQuantity_TNE")) bkrd.BunkerFuelQuantity_TNE = Double.Parse(bDict["BunkerFuelQuantity_TNE"], NumberFormatInfo.InvariantInfo); + if (bDict.ContainsKey("BunkerFuelQuantity_TNE")) bkrd.BunkerFuelQuantity_TNE = Extensions.TryParseDouble(bDict["BunkerFuelQuantity_TNE"]); } catch (Exception ex) { @@ -739,11 +754,11 @@ namespace bsmd.herberg.FormService 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("NatureOfCargo")) pre72h.NatureOfCargo = vDict["NatureOfCargo"]; - if (vDict.ContainsKey("VolumeOfCargo_TNE")) pre72h.VolumeOfCargo = Double.Parse(vDict["VolumeOfCargo_TNE"], NumberFormatInfo.InvariantInfo); + if (vDict.ContainsKey("VolumeOfCargo_TNE")) pre72h.VolumeOfCargo = Extensions.TryParseDouble(vDict["VolumeOfCargo_TNE"]); if (vDict.ContainsKey("PlannedOperations")) pre72h.PlannedOperations = vDict["PlannedOperations"]; if (vDict.ContainsKey("PlannedWorks")) pre72h.PlannedWorks = vDict["PlannedWorks"]; - if (vDict.ContainsKey("DateOfLastExpandedInspection")) pre72h.DateOfLastExpandedInspection = Extensions.TryParse(vDict["DateOfLastExpandedInspection"]); - if (vDict.ContainsKey("PlannedPeriodOfStay_HUR")) pre72h.PlannedPeriodOfStay_HUR = Double.Parse(vDict["PlannedPeriodOfStay_HUR"], NumberFormatInfo.InvariantInfo); + if (vDict.ContainsKey("DateOfLastExpandedInspection")) pre72h.DateOfLastExpandedInspection = Extensions.TryParseDateTime(vDict["DateOfLastExpandedInspection"]); + if (vDict.ContainsKey("PlannedPeriodOfStay_HUR")) pre72h.PlannedPeriodOfStay_HUR = Extensions.TryParseDouble(vDict["PlannedPeriodOfStay_HUR"]); } catch (Exception ex) { @@ -769,7 +784,7 @@ namespace bsmd.herberg.FormService theMessage.MessageNotificationClass = Message.NotificationClass.LADG; theMessage.Elements.Add(ladg); } - if (lDict.ContainsKey("CargoGrossQuantity_TNE")) ladg.CargoGrossQuantity_TNE = Double.Parse(lDict["CargoGrossQuantity_TNE"], NumberFormatInfo.InvariantInfo); + if (lDict.ContainsKey("CargoGrossQuantity_TNE")) ladg.CargoGrossQuantity_TNE = Extensions.TryParseDouble(lDict["CargoGrossQuantity_TNE"]); if (lDict.ContainsKey("CargoNumberOfItems")) ladg.CargoNumberOfItems = Int32.Parse(lDict["CargoNumberOfItems"]); if (lDict.ContainsKey("CargoCodeNST")) ladg.CargoCodeNST = lDict["CargoCodeNST"]; if (lDict.ContainsKey("CargoHandlingType")) ladg.CargoHandlingType = (byte) Enum.Parse(typeof(Enums.CargoHandlingType), lDict["CargoHandlingType"]); @@ -800,8 +815,8 @@ namespace bsmd.herberg.FormService if (pDict.ContainsKey("PassengerLastName")) pas.PassengerLastName = pDict["PassengerLastName"]; if (pDict.ContainsKey("PassengerFirstName")) pas.PassengerFirstName = pDict["PassengerFirstName"]; if (pDict.ContainsKey("PassengerPlaceOfBirth")) pas.PassengerPlaceOfBirth = pDict["PassengerPlaceOfBirth"]; - if (pDict.ContainsKey("PassengerDateOfBirth")) pas.PassengerDateOfBirth = Extensions.TryParse(pDict["PassengerDateOfBirth"]); - if (pDict.ContainsKey("PassengerGender")) pas.PassengerGender = (byte)Enum.Parse(typeof(Enums.PassengerGender), pDict["PassengerGender"], true); + if (pDict.ContainsKey("PassengerDateOfBirth")) pas.PassengerDateOfBirth = Extensions.TryParseDateTime(pDict["PassengerDateOfBirth"]); + if (pDict.ContainsKey("PassengerGender")) pas.PassengerGender = Enums.ParseGender(pDict["PassengerGender"]); if (pDict.ContainsKey("PassengerNationalityCode")) pas.PassengerNationality = pDict["PassengerNationalityCode"]; if (pDict.ContainsKey("PassengerIdentityDocumentType")) pas.PassengerIdentityDocumentType = (byte)Enum.Parse(typeof(Enums.PassengerIdentityDocumentType), pDict["PassengerIdentityDocumentType"], true); if (pDict.ContainsKey("PassengerIdentityDocumentId")) pas.PassengerIdentityDocumentId = pDict["PassengerIdentityDocumentId"]; @@ -840,7 +855,7 @@ namespace bsmd.herberg.FormService try { if (vDict.ContainsKey("WasteDisposalValidExemption")) was.WasteDisposalValidExemption = vDict["WasteDisposalValidExemption"].Equals("Y"); - if (vDict.ContainsKey("LastWasteDisposalDate")) was.LastWasteDisposalDate = Extensions.TryParse(vDict["LastWasteDisposalDate"]); + if (vDict.ContainsKey("LastWasteDisposalDate")) was.LastWasteDisposalDate = Extensions.TryParseDateTime(vDict["LastWasteDisposalDate"]); if (vDict.ContainsKey("LastWasteDisposalPortCode") && vDict.ContainsKey("LastWasteDisposalCountryCode")) was.LastWasteDisposalPort = vDict["LastWasteDisposalCountryCode"] + vDict["LastWasteDisposalPortCode"]; @@ -859,13 +874,13 @@ namespace bsmd.herberg.FormService was.Waste.Add(waste); } - if (wDict.ContainsKey("WasteAmountGeneratedTillNextPort_MTQ")) waste.WasteAmountGeneratedTillNextPort_MTQ = Double.Parse(wDict["WasteAmountGeneratedTillNextPort_MTQ"], NumberFormatInfo.InvariantInfo); - if (wDict.ContainsKey("WasteAmountRetained_MTQ")) waste.WasteAmountRetained_MTQ = Double.Parse(wDict["WasteAmountRetained_MTQ"], NumberFormatInfo.InvariantInfo); - if (wDict.ContainsKey("WasteCapacity_MTQ")) waste.WasteCapacity_MTQ = Double.Parse(wDict["WasteCapacity_MTQ"], NumberFormatInfo.InvariantInfo); - if (wDict.ContainsKey("WasteDisposalAmount_MTQ")) waste.WasteDisposalAmount_MTQ = Double.Parse(wDict["WasteDisposalAmount_MTQ"], NumberFormatInfo.InvariantInfo); - if(wDict.ContainsKey("WasteDescription")) waste.WasteDescription = wDict["WasteDescription"]; - if(wDict.ContainsKey("WasteType")) waste.WasteType = Enums.ParseWasteType(wDict["WasteType"]); - if(wDict.ContainsKey("WasteDisposalPort")) waste.WasteDisposalPort = wDict["WasteDisposalPort"]; + if (wDict.ContainsKey("WasteAmountGeneratedTillNextPort_MTQ")) waste.WasteAmountGeneratedTillNextPort_MTQ = Extensions.TryParseDouble(wDict["WasteAmountGeneratedTillNextPort_MTQ"]); + if (wDict.ContainsKey("WasteAmountRetained_MTQ")) waste.WasteAmountRetained_MTQ = Extensions.TryParseDouble(wDict["WasteAmountRetained_MTQ"]); + if (wDict.ContainsKey("WasteCapacity_MTQ")) waste.WasteCapacity_MTQ = Extensions.TryParseDouble(wDict["WasteCapacity_MTQ"]); + if (wDict.ContainsKey("WasteDisposalAmount_MTQ")) waste.WasteDisposalAmount_MTQ = Extensions.TryParseDouble(wDict["WasteDisposalAmount_MTQ"]); + if (wDict.ContainsKey("WasteDescription")) waste.WasteDescription = wDict["WasteDescription"]; + if (wDict.ContainsKey("WasteType")) waste.WasteType = Enums.ParseWasteType(wDict["WasteType"]); + if (wDict.ContainsKey("WasteDisposalPort")) waste.WasteDisposalPort = wDict["WasteDisposalPort"]; saveMessages.Add(waste); } @@ -925,7 +940,7 @@ namespace bsmd.herberg.FormService if (vDict.ContainsKey("ISSCType")) sec.ISSCType = (byte)Enum.Parse(typeof(Enums.ISSCType), vDict["ISSCType"], true); if (vDict.ContainsKey("ISSCIssuerType")) sec.ISSCIssuerType = (byte)Enum.Parse(typeof(Enums.ISSCIssuerType), vDict["ISSCIssuerType"], true); if (vDict.ContainsKey("ISSCIssuerName")) sec.ISSCIssuerName = vDict["ISSCIssuerName"]; - if (vDict.ContainsKey("ISSCDateOfExpiration")) sec.ISSCDateOfExpiration = Extensions.TryParse(vDict["ISSCDateOfExpiration"]); + if (vDict.ContainsKey("ISSCDateOfExpiration")) sec.ISSCDateOfExpiration = Extensions.TryParseDateTime(vDict["ISSCDateOfExpiration"]); if (vDict.ContainsKey("ApprovedSecurityPlanOnBoard")) sec.ApprovedSecurityPlanOnBoard = vDict["ApprovedSecurityPlanOnBoard"].Equals("Y"); if (vDict.ContainsKey("CurrentShipSecurityLevel")) sec.CurrentShipSecurityLevel = Byte.Parse(vDict["CurrentShipSecurityLevel"]); if (vDict.ContainsKey("CurrentShipSecurityLevel ")) sec.CurrentShipSecurityLevel = Byte.Parse(vDict["CurrentShipSecurityLevel "]); @@ -965,8 +980,8 @@ namespace bsmd.herberg.FormService poc.PortFacilityPortLoCode = sDict["PortFacilityPortCountryCode"] + sDict["PortFacilityPortLoCode"]; changedPfC = true; } - if (sDict.ContainsKey("PortFacilityDateOfArrival")) { poc.PortFacilityDateOfArrival = Extensions.TryParse(sDict["PortFacilityDateOfArrival"]); changedPfC = true; } - if (sDict.ContainsKey("PortFacilityDateOfDeparture")) { poc.PortFacilityDateOfDeparture = Extensions.TryParse(sDict["PortFacilityDateOfDeparture"]); changedPfC = true; } + if (sDict.ContainsKey("PortFacilityDateOfArrival")) { poc.PortFacilityDateOfArrival = Extensions.TryParseDateTime(sDict["PortFacilityDateOfArrival"]); changedPfC = true; } + if (sDict.ContainsKey("PortFacilityDateOfDeparture")) { poc.PortFacilityDateOfDeparture = Extensions.TryParseDateTime(sDict["PortFacilityDateOfDeparture"]); changedPfC = true; } if (sDict.ContainsKey("PortFacilityShipSecurityLevel")) { poc.PortFacilityShipSecurityLevel = Byte.Parse(sDict["PortFacilityShipSecurityLevel"]); changedPfC = true; } if (sDict.ContainsKey("PortFacilitySecurityMattersToReport")) { poc.PortFacilitySecurityMattersToReport = sDict["PortFacilitySecurityMattersToReport"]; changedPfC = true; } if (sDict.ContainsKey("PortFacilityGISISCode")) @@ -984,8 +999,8 @@ namespace bsmd.herberg.FormService } if (sDict.ContainsKey("ShipToShipActivityLocationCoordinatesLatitude")) { sts.ShipToShipActivityLocationCoordinatesLatitude = Int32.Parse(sDict["ShipToShipActivityLocationCoordinatesLatitude"]); changedStS = true; } if (sDict.ContainsKey("ShipToShipActivityLocationCoordinatesLongitude")) { sts.ShipToShipActivityLocationCoordinatesLongitude = Int32.Parse(sDict["ShipToShipActivityLocationCoordinatesLongitude"]); changedStS = true; } - if (sDict.ContainsKey("ShipToShipActivityDateFrom")) { sts.ShipToShipActivityDateFrom = Extensions.TryParse(sDict["ShipToShipActivityDateFrom"]); changedStS = true; } - if (sDict.ContainsKey("ShipToShipActivityDateTo")) { sts.ShipToShipActivityDateTo = Extensions.TryParse(sDict["ShipToShipActivityDateTo"]); changedStS = true; } + if (sDict.ContainsKey("ShipToShipActivityDateFrom")) { sts.ShipToShipActivityDateFrom = Extensions.TryParseDateTime(sDict["ShipToShipActivityDateFrom"]); changedStS = true; } + if (sDict.ContainsKey("ShipToShipActivityDateTo")) { sts.ShipToShipActivityDateTo = Extensions.TryParseDateTime(sDict["ShipToShipActivityDateTo"]); changedStS = true; } if (sDict.ContainsKey("ShipToShipActivityType")) { sts.ShipToShipActivityType = sDict["ShipToShipActivityType"]; changedStS = true; } if (sDict.ContainsKey("ShipToShipActivitySecurityMattersToReport")) { sts.ShipToShipActivitySecurityMattersToReport = sDict["ShipToShipActivitySecurityMattersToReport"]; changedStS = true; } @@ -1009,8 +1024,8 @@ namespace bsmd.herberg.FormService if (vDict.ContainsKey("PortNameOfCall")) aMessageCore.Portname = vDict["PortNameOfCall"]; if (vDict.ContainsKey("PortOfCall")) aMessageCore.PoC = "DE" + vDict["PortOfCall"]; if (vDict.ContainsKey("TransitKielCanal")) aMessageCore.IsTransit = vDict["TransitKielCanal"].Equals("Y"); - if (vDict.ContainsKey("ETAPortOfCall")) aMessageCore.ETA = Extensions.TryParse(vDict["ETAPortOfCall"]); - if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParse(vDict["ETAKielCanal"]); + if (vDict.ContainsKey("ETAPortOfCall")) aMessageCore.ETA = Extensions.TryParseDateTime(vDict["ETAPortOfCall"]); + if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]); } break; #endregion @@ -1019,7 +1034,7 @@ namespace bsmd.herberg.FormService case "Transit": { theMessage.MessageNotificationClass = Message.NotificationClass.TRANSIT; - if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParse(vDict["ETAKielCanal"]); + if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]); } break; #endregion @@ -1040,9 +1055,9 @@ namespace bsmd.herberg.FormService } try { - if (pDict.ContainsKey("TowageOnArrivalBeam_MTR")) towa.TowageOnArrivalBeam_MTR = Double.Parse(pDict["TowageOnArrivalBeam_MTR"], NumberFormatInfo.InvariantInfo); - if (pDict.ContainsKey("TowageOnArrivalDraught_DMT")) towa.TowageOnArrivalDraught_DMT = Double.Parse(pDict["TowageOnArrivalDraught_DMT"], NumberFormatInfo.InvariantInfo); - if (pDict.ContainsKey("TowageOnArrivalLengthOverall_MTR")) towa.TowageOnArrivalLengthOverall_MTR = Double.Parse(pDict["TowageOnArrivalLengthOverall_MTR"], NumberFormatInfo.InvariantInfo); + if (pDict.ContainsKey("TowageOnArrivalBeam_MTR")) towa.TowageOnArrivalBeam_MTR = Extensions.TryParseDouble(pDict["TowageOnArrivalBeam_MTR"]); + if (pDict.ContainsKey("TowageOnArrivalDraught_DMT")) towa.TowageOnArrivalDraught_DMT = Extensions.TryParseDouble(pDict["TowageOnArrivalDraught_DMT"]); + if (pDict.ContainsKey("TowageOnArrivalLengthOverall_MTR")) towa.TowageOnArrivalLengthOverall_MTR = Extensions.TryParseDouble(pDict["TowageOnArrivalLengthOverall_MTR"]); if (pDict.ContainsKey("TowageOnArrivalGrossTonnage")) towa.TowageOnArrivalGrossTonnage = Int32.Parse(pDict["TowageOnArrivalGrossTonnage"]); if (pDict.ContainsKey("TowageOnArrivalOperatorCountry")) towa.TowageOnArrivalOperatorCountry = pDict["TowageOnArrivalOperatorCountry"]; if (pDict.ContainsKey("TowageOnArrivalPurposeOfCall")) towa.TowageOnArrivalPurposeOfCall = pDict["TowageOnArrivalPurposeOfCall"]; @@ -1082,9 +1097,9 @@ namespace bsmd.herberg.FormService } try { - if (pDict.ContainsKey("TowageOnDepartureBeam_MTR")) towd.TowageOnDepartureBeam_MTR = Double.Parse(pDict["TowageOnDepartureBeam_MTR"], NumberFormatInfo.InvariantInfo); - if (pDict.ContainsKey("TowageOnDepartureDraught_DMT")) towd.TowageOnDepartureDraught_DMT = Double.Parse(pDict["TowageOnDepartureDraught_DMT"], NumberFormatInfo.InvariantInfo); - if (pDict.ContainsKey("TowageOnDepartureLengthOverall_MTR")) towd.TowageOnDepartureLengthOverall_MTR = Double.Parse(pDict["TowageOnDepartureLengthOverall_MTR"], NumberFormatInfo.InvariantInfo); + if (pDict.ContainsKey("TowageOnDepartureBeam_MTR")) towd.TowageOnDepartureBeam_MTR = Extensions.TryParseDouble(pDict["TowageOnDepartureBeam_MTR"]); + if (pDict.ContainsKey("TowageOnDepartureDraught_DMT")) towd.TowageOnDepartureDraught_DMT = Extensions.TryParseDouble(pDict["TowageOnDepartureDraught_DMT"]); + if (pDict.ContainsKey("TowageOnDepartureLengthOverall_MTR")) towd.TowageOnDepartureLengthOverall_MTR = Extensions.TryParseDouble(pDict["TowageOnDepartureLengthOverall_MTR"]); if (pDict.ContainsKey("TowageOnDepartureOperatorCountry")) towd.TowageOnDepartureOperatorCountry = pDict["TowageOnDepartureOperatorCountry"]; if (pDict.ContainsKey("TowageOnDepartureName")) towd.TowageOnDepartureName = pDict["TowageOnDepartureName"]; if (pDict.ContainsKey("TowageOnDepartureFlag")) towd.TowageOnDepartureFlag = pDict["TowageOnDepartureFlag"]; @@ -1122,7 +1137,7 @@ namespace bsmd.herberg.FormService { try { - if (vDict.ContainsKey("DraughtUponArrival_DMT")) tiefa.DraughtUponArrival_DMT = Double.Parse(vDict["DraughtUponArrival_DMT"], NumberFormatInfo.InvariantInfo); + if (vDict.ContainsKey("DraughtUponArrival_DMT")) tiefa.DraughtUponArrival_DMT = Extensions.TryParseDouble(vDict["DraughtUponArrival_DMT"]); } catch (Exception ex) { @@ -1149,7 +1164,7 @@ namespace bsmd.herberg.FormService { try { - if (vDict.ContainsKey("DraughtUponDeparture_DMT")) tiefd.DraughtUponDeparture_DMT = Double.Parse(vDict["DraughtUponDeparture_DMT"], NumberFormatInfo.InvariantInfo); + if (vDict.ContainsKey("DraughtUponDeparture_DMT")) tiefd.DraughtUponDeparture_DMT = Extensions.TryParseDouble(vDict["DraughtUponDeparture_DMT"]); } catch (Exception ex) { @@ -1209,15 +1224,15 @@ namespace bsmd.herberg.FormService if (aDict.ContainsKey("IMOClass")) imdgPosition.IMOClass = aDict["IMOClass"]; if (aDict.ContainsKey("CompatibilityGroup")) imdgPosition.CompatibilityGroup = aDict["CompatibilityGroup"]; if (aDict.ContainsKey("TechnicalName")) imdgPosition.TechnicalName = aDict["TechnicalName"]; - if (aDict.ContainsKey("NetExplosiveMass_KGM")) imdgPosition.NetExplosiveMass_KGM = Double.Parse(aDict["NetExplosiveMass_KGM"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("NetExplosiveMass_KGM")) imdgPosition.NetExplosiveMass_KGM = Extensions.TryParseDouble(aDict["NetExplosiveMass_KGM"]); if (aDict.ContainsKey("Flashpoint_CEL")) imdgPosition.Flashpoint_CEL = aDict["Flashpoint_CEL"]; if (aDict.ContainsKey("Class7NuclideName")) imdgPosition.Class7NuclideName = aDict["Class7NuclideName"]; - if (aDict.ContainsKey("Class7MaxActivity_BQL")) imdgPosition.Class7MaxActivity_BQL = Double.Parse(aDict["Class7MaxActivity_BQL"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("Class7MaxActivity_BQL")) imdgPosition.Class7MaxActivity_BQL = Extensions.TryParseDouble(aDict["Class7MaxActivity_BQL"]); if (aDict.ContainsKey("Class7Category")) imdgPosition.Class7Category = Int32.Parse(aDict["Class7Category"], NumberFormatInfo.InvariantInfo); - if (aDict.ContainsKey("Class7TransportIndex")) imdgPosition.Class7TransportIndex = Double.Parse(aDict["Class7TransportIndex"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("Class7TransportIndex")) imdgPosition.Class7TransportIndex = Extensions.TryParseDouble(aDict["Class7TransportIndex"]); if (aDict.ContainsKey("Class7CSI")) imdgPosition.Class7CSI = Int32.Parse(aDict["Class7CSI"]); - if (aDict.ContainsKey("ControlTemperature_CEL")) imdgPosition.ControlTemperature_CEL = Double.Parse(aDict["ControlTemperature_CEL"], NumberFormatInfo.InvariantInfo); - if (aDict.ContainsKey("EmergencyTemperature_CEL")) imdgPosition.EmergencyTemperature_CEL = Double.Parse(aDict["EmergencyTemperature_CEL"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("ControlTemperature_CEL")) imdgPosition.ControlTemperature_CEL = Extensions.TryParseDouble(aDict["ControlTemperature_CEL"]); + if (aDict.ContainsKey("EmergencyTemperature_CEL")) imdgPosition.EmergencyTemperature_CEL = Extensions.TryParseDouble(aDict["EmergencyTemperature_CEL"]); if (aDict.ContainsKey("SubsidiaryRisk")) { if (imdgPosition.SubsidiaryRiskList.Count == 0) @@ -1235,9 +1250,9 @@ namespace bsmd.herberg.FormService if (aDict.ContainsKey("PackageType")) imdgPosition.PackageType = aDict["PackageType"]; if (aDict.ContainsKey("LimitedQuantities")) imdgPosition.LimitedQuantities = aDict["LimitedQuantities"].Equals("Y"); if (aDict.ContainsKey("ExceptedQuantities")) imdgPosition.ExceptedQuantities = aDict["ExceptedQuantities"].Equals("Y"); - if (aDict.ContainsKey("NetQuantity_KGM")) imdgPosition.NetQuantity_KGM = Double.Parse(aDict["NetQuantity_KGM"], NumberFormatInfo.InvariantInfo); - if (aDict.ContainsKey("GrossQuantity_KGM")) imdgPosition.GrossQuantity_KGM = Double.Parse(aDict["GrossQuantity_KGM"], NumberFormatInfo.InvariantInfo); - if (aDict.ContainsKey("Volume_MTQ")) imdgPosition.Volume_MTQ = Double.Parse(aDict["Volume_MTQ"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("NetQuantity_KGM")) imdgPosition.NetQuantity_KGM = Extensions.TryParseDouble(aDict["NetQuantity_KGM"]); + if (aDict.ContainsKey("GrossQuantity_KGM")) imdgPosition.GrossQuantity_KGM = Extensions.TryParseDouble(aDict["GrossQuantity_KGM"]); + if (aDict.ContainsKey("Volume_MTQ")) imdgPosition.Volume_MTQ = Extensions.TryParseDouble(aDict["Volume_MTQ"]); if (aDict.ContainsKey("GeneralCargoIBC")) imdgPosition.GeneralCargoIBC = aDict["GeneralCargoIBC"].Equals("Y"); if (aDict.ContainsKey("ContainerNumber")) imdgPosition.ContainerNumber = aDict["ContainerNumber"]; if (aDict.ContainsKey("VehicleLicenseNumber")) imdgPosition.VehicleLicenseNumber = aDict["VehicleLicenseNumber"]; @@ -1275,7 +1290,7 @@ namespace bsmd.herberg.FormService if (aDict.ContainsKey("PollutionCategory")) ibcPosition.PollutionCategory = (byte)Enum.Parse(typeof(Enums.PollutionCategory), aDict["PollutionCategory"], true); if (aDict.ContainsKey("Hazards")) ibcPosition.Hazards = Enums.ParseHazardType(aDict["Hazards"]); if (aDict.ContainsKey("FlashpointInformation")) ibcPosition.FlashpointInformation = Enums.ParseFlashpointInformation(aDict["FlashpointInformation"]); - if (aDict.ContainsKey("Quantity_KGM")) ibcPosition.Quantity_KGM = Double.Parse(aDict["Quantity_KGM"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("Quantity_KGM")) ibcPosition.Quantity_KGM = Extensions.TryParseDouble(aDict["Quantity_KGM"]); if (aDict.ContainsKey("StowagePosition")) ibcPosition.StowagePosition = aDict["StowagePosition"]; if (aDict.ContainsKey("PortCodeOfLoading") && aDict.ContainsKey("CountryCodeOfLoading")) ibcPosition.PortOfLoading = aDict["CountryCodeOfLoading"] + aDict["PortCodeOfLoading"]; @@ -1310,7 +1325,7 @@ namespace bsmd.herberg.FormService if (aDict.ContainsKey("UNNumber")) igcPosition.UNNumber = aDict["UNNumber"]; if (aDict.ContainsKey("IMOClass")) igcPosition.IMOClass = aDict["IMOClass"]; if (aDict.ContainsKey("ProductName")) igcPosition.ProductName = aDict["ProductName"]; - if (aDict.ContainsKey("Quantity_KGM")) igcPosition.Quantity_KGM = Double.Parse(aDict["Quantity_KGM"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("Quantity_KGM")) igcPosition.Quantity_KGM = Extensions.TryParseDouble(aDict["Quantity_KGM"]); if (aDict.ContainsKey("StowagePosition")) igcPosition.StowagePosition = aDict["StowagePosition"]; if (aDict.ContainsKey("PortCodeOfLoading") && aDict.ContainsKey("CountryCodeOfLoading")) igcPosition.PortOfLoading = aDict["CountryCodeOfLoading"] + aDict["PortCodeOfLoading"]; @@ -1347,7 +1362,7 @@ namespace bsmd.herberg.FormService if (aDict.ContainsKey("MHB")) imsbcPosition.MHB = aDict["MHB"].Equals("Y"); if (aDict.ContainsKey("UNNumber")) imsbcPosition.UNNumber = aDict["UNNumber"]; if (aDict.ContainsKey("IMOClass")) imsbcPosition.IMOClass = aDict["IMOClass"]; - if (aDict.ContainsKey("Quantity_KGM")) imsbcPosition.Quantity_KGM = Double.Parse(aDict["Quantity_KGM"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("Quantity_KGM")) imsbcPosition.Quantity_KGM = Extensions.TryParseDouble(aDict["Quantity_KGM"]); if (aDict.ContainsKey("StowagePosition")) imsbcPosition.StowagePosition = aDict["StowagePosition"]; if (aDict.ContainsKey("PortCodeOfLoading") && aDict.ContainsKey("CountryCodeOfLoading")) imsbcPosition.PortOfLoading = aDict["CountryCodeOfLoading"] + aDict["PortCodeOfLoading"]; @@ -1382,7 +1397,7 @@ namespace bsmd.herberg.FormService if (aDict.ContainsKey("Name")) marpolPosition.Name = aDict["Name"]; if (aDict.ContainsKey("FlashpointInformation")) marpolPosition.FlashpointInformation = Enums.ParseFlashpointInformation(aDict["FlashpointInformation"]); if (aDict.ContainsKey("Flashpoint_CEL")) marpolPosition.Flashpoint_CEL = aDict["Flashpoint_CEL"]; - if (aDict.ContainsKey("Quantity_KGM")) marpolPosition.Quantity_KGM = Double.Parse(aDict["Quantity_KGM"], NumberFormatInfo.InvariantInfo); + if (aDict.ContainsKey("Quantity_KGM")) marpolPosition.Quantity_KGM = Extensions.TryParseDouble(aDict["Quantity_KGM"]); if (aDict.ContainsKey("StowagePosition")) marpolPosition.StowagePosition = aDict["StowagePosition"]; if (aDict.ContainsKey("PortCodeOfLoading") && aDict.ContainsKey("CountryCodeOfLoading")) marpolPosition.PortOfLoading = aDict["CountryCodeOfLoading"] + aDict["PortCodeOfLoading"]; @@ -1425,12 +1440,9 @@ namespace bsmd.herberg.FormService foreach (DatabaseEntity saveEntity in saveMessages) DBManager.Instance.Save(saveEntity); } - } + } - if (aMessageCore.BSMDStatusInternal == MessageCore.BSMDStatus.UNDEFINED) - aMessageCore.BSMDStatusInternal = MessageCore.BSMDStatus.CREATE_RECEIVE_RECEIPT; - - DBManager.Instance.Save(aMessageCore); // warum? + DBManager.Instance.Save(aMessageCore); } } diff --git a/nsw/Source/bsmd.hisnord/Properties/AssemblyInfo.cs b/nsw/Source/bsmd.hisnord/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..484448b3 --- /dev/null +++ b/nsw/Source/bsmd.hisnord/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("bsmd.hisnord")] +[assembly: AssemblyDescription("Classes to connect to DuD NSW Service (HIS-Nord)")] +[assembly: AssemblyCulture("")] + diff --git a/nsw/Source/bsmd.hisnord/bsmd.hisnord.csproj b/nsw/Source/bsmd.hisnord/bsmd.hisnord.csproj new file mode 100644 index 00000000..e867207d --- /dev/null +++ b/nsw/Source/bsmd.hisnord/bsmd.hisnord.csproj @@ -0,0 +1,67 @@ + + + + + Debug + AnyCPU + {E7E48971-E879-4E6A-B316-70AC0A6F4C95} + Library + Properties + bsmd.hisnord + bsmd.hisnord + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + + + ..\bsmdKey.snk + + + + + + + + + + + + + Properties\AssemblyProductInfo.cs + + + Properties\AssemblyProjectInfo.cs + + + Properties\AssemblyProjectKeyInfo.cs + + + + + + \ No newline at end of file diff --git a/nsw/Source/bsmd.hisnord/packages.config b/nsw/Source/bsmd.hisnord/packages.config new file mode 100644 index 00000000..981a91a1 --- /dev/null +++ b/nsw/Source/bsmd.hisnord/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/nsw/Source/packages/repositories.config b/nsw/Source/packages/repositories.config index 88a14c6e..47b257c1 100644 --- a/nsw/Source/packages/repositories.config +++ b/nsw/Source/packages/repositories.config @@ -5,7 +5,10 @@ + + + \ No newline at end of file diff --git a/nsw/dakosy/DAKOSY_SFTP-Parameter.pdf b/nsw/dakosy/DAKOSY_SFTP-Parameter.pdf new file mode 100644 index 00000000..5d05a928 Binary files /dev/null and b/nsw/dakosy/DAKOSY_SFTP-Parameter.pdf differ diff --git a/nsw/dakosy/Erläut. zur Erstellung Excel-Datei_eDeclaration V. 1.0.pdf b/nsw/dakosy/Erläut. zur Erstellung Excel-Datei_eDeclaration V. 1.0.pdf new file mode 100644 index 00000000..6b934801 Binary files /dev/null and b/nsw/dakosy/Erläut. zur Erstellung Excel-Datei_eDeclaration V. 1.0.pdf differ diff --git a/nsw/dakosy/Nutzerhandbuch eDeclaration V. 1.0.pdf b/nsw/dakosy/Nutzerhandbuch eDeclaration V. 1.0.pdf new file mode 100644 index 00000000..2e1a3e52 Binary files /dev/null and b/nsw/dakosy/Nutzerhandbuch eDeclaration V. 1.0.pdf differ diff --git a/nsw/dakosy/SFTP_Password.pdf b/nsw/dakosy/SFTP_Password.pdf new file mode 100644 index 00000000..3bfc48ab Binary files /dev/null and b/nsw/dakosy/SFTP_Password.pdf differ diff --git a/nsw/dbh/Fehlermeldungen.txt b/nsw/dbh/Fehlermeldungen.txt new file mode 100644 index 00000000..d85341c3 --- /dev/null +++ b/nsw/dbh/Fehlermeldungen.txt @@ -0,0 +1,54 @@ + +MDH + +ERROR +XSD +org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'SanitaryMeasuresDate'. One of '{SanitaryMeasuresType}' is expected. +org.xml.sax.SAXParseException; cvc-minLength-valid: Value '' with length = '0' is n + +ERROR +XSD +org.xml.sax.SAXParseException; cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_StowawaysJoiningLocationMDHRoot'. +org.xml.sax.SAXParseException; cvc-type.3.1.3: The value '' of element 'S + + +SEC + +XSD +org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'ValidISSCOnBoard'. One of '{ReportingParty, SECSimplification, CSOLastName}' is expected. + + +HAZA + +ERROR +XSD +org.xml.sax.SAXParseException; cvc-complex-type.2.4.b: The content of element 'HAZA' is not complete. One of '{DPGOnArrival}' is expected. + +WAS + +ERROR +XSD +org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'Waste'. One of '{ReportingParty, WasteDisposalValidExemption, LastWasteDisposalPort}' is expected. +org.xml.sax.SAXParseException; cvc-complex-type.2.4. + + +Dep loading for CREW: 294ms +Dep loading for NAME: 254ms +Dep loading for STAT: 259ms +Dep loading for WAS: 457ms +Dep loading for INFO: 827ms +Dep loading for HAZA: 5045ms +Dep loading for POBD: 914ms +Dep loading for ATD: 903ms +Dep loading for BKRA: 911ms +Dep loading for TIEFD: 911ms +Dep loading for PRE72H: 1034ms +Dep loading for TIEFA: 785ms +Dep loading for VISIT: 241ms +Dep loading for POBA: 407ms +Dep loading for BKRD: 400ms +Dep loading for MDH: 764ms +Dep loading for NOA_NOD: 653ms +Dep loading for SEC: 762ms +Dep loading for LADG: 367ms +Dep loading for BPOL: 368ms \ No newline at end of file diff --git a/server.txt b/server.txt index 64e0ee65..8ec40ce8 100644 --- a/server.txt +++ b/server.txt @@ -21,4 +21,9 @@ PW: baffi1234! NSW Test E-Mail Account: nsw@textbausteine.net -PW: J#4elkj!..DF \ No newline at end of file +PW: J#4elkj!..DF + +NSW Excel E-Mail Account (Test): +excel@textbausteine.net +lKLK!.435Dsd +pop3.strato.de