ENI 6.1.1, Korrekturen

This commit is contained in:
Daniel Schick 2021-04-19 04:54:16 +00:00
parent ebf8a2976f
commit 094079986c
7 changed files with 18 additions and 15 deletions

View File

@ -762,7 +762,7 @@ namespace ENI2
{ {
SEC sec = secMessage.Elements[0] as SEC; SEC sec = secMessage.Elements[0] as SEC;
NOA_NOD noanod = noanodMessage.Elements[0] as NOA_NOD; NOA_NOD noanod = noanodMessage.Elements[0] as NOA_NOD;
if(sec.LastTenPortFacilitesCalled.Count > 0) if((sec.LastTenPortFacilitesCalled.Count > 0) && (!sec.SECSimplification ?? false))
{ {
if((sec.LastTenPortFacilitesCalled[0].PortFacilityPortLoCode == null) || !sec.LastTenPortFacilitesCalled[0].PortFacilityPortLoCode.Equals(noanod.LastPort)) if((sec.LastTenPortFacilitesCalled[0].PortFacilityPortLoCode == null) || !sec.LastTenPortFacilitesCalled[0].PortFacilityPortLoCode.Equals(noanod.LastPort))
{ {
@ -770,7 +770,10 @@ namespace ENI2
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if(sec.LastTenPortFacilitesCalled[0].PortFacilityDateOfDeparture != (noanod.ETDFromLastPort ?? DateTime.Now).Date) DateTime comparison;
if (noanod.ETDFromLastPort.HasValue) comparison = noanod.ETDFromLastPort.Value.ToLocalTime().Date;
else comparison = DateTime.Now.Date;
if(sec.LastTenPortFacilitesCalled[0].PortFacilityDateOfDeparture != comparison)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "SEC last port departure doesn't match NOANOD ETDFromLastPort", null, "Last port departure mismatch", null, "SEC"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "SEC last port departure doesn't match NOANOD ETDFromLastPort", null, "Last port departure mismatch", null, "SEC");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;

View File

@ -34,7 +34,7 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>6.1.1.%2a</ApplicationVersion> <ApplicationVersion>6.1.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -69,7 +69,7 @@
<SignAssembly>true</SignAssembly> <SignAssembly>true</SignAssembly>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<AssemblyOriginatorKeyFile>ENI2_3_TemporaryKey.pfx</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\logo_schwarz.ico</ApplicationIcon> <ApplicationIcon>Resources\logo_schwarz.ico</ApplicationIcon>

Binary file not shown.

View File

@ -103,7 +103,7 @@ namespace bsmd.database
if (this.ATAPortOfCall.HasValue) if (this.ATAPortOfCall.HasValue)
{ {
if ((this.ATAPortOfCall.Value > DateTime.Now.AddDays(14)) || (this.ATAPortOfCall.Value < DateTime.Now.AddDays(-14))) if ((this.ATAPortOfCall.Value > DateTime.Now.AddDays(14)) || (this.ATAPortOfCall.Value < DateTime.Now.AddDays(-14)))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "ATA implausible", this.ATAPortOfCall.Value.ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "ATA implausible", this.ATAPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
} }

View File

@ -103,7 +103,7 @@ namespace bsmd.database
if(this.ATDPortOfCall.HasValue) if(this.ATDPortOfCall.HasValue)
{ {
if((this.ATDPortOfCall.Value > DateTime.Now.AddDays(14)) || (this.ATDPortOfCall.Value < DateTime.Now.AddDays(-14))) if((this.ATDPortOfCall.Value > DateTime.Now.AddDays(14)) || (this.ATDPortOfCall.Value < DateTime.Now.AddDays(-14)))
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "ATD implausible", this.ATDPortOfCall.Value.ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "ATD implausible", this.ATDPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
} }

View File

@ -258,24 +258,24 @@ namespace bsmd.database
{ {
if(this.ETDFromPortOfCall.HasValue && this.ETAToPortOfCall.HasValue && if(this.ETDFromPortOfCall.HasValue && this.ETAToPortOfCall.HasValue &&
(this.ETDFromPortOfCall < this.ETAToPortOfCall)) (this.ETDFromPortOfCall < this.ETAToPortOfCall))
errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromPortOfCall implausible", this.ETDFromPortOfCall.ToString(), this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromPortOfCall implausible", this.ETDFromPortOfCall?.ToLocalTime().ToString(), this.Title, null, this.Tablename));
// 8.11.20 Validierung gegen ETA /ETD in der Vergangenheit // 8.11.20 Validierung gegen ETA /ETD in der Vergangenheit
if(this.ETAToPortOfCall < DateTime.Now) if(this.ETAToPortOfCall < DateTime.Now)
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
if(this.ETDFromLastPort < DateTime.Now.AddDays(-14)) if(this.ETDFromLastPort < DateTime.Now.AddDays(-14))
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
if ((this.ETDFromPortOfCall < DateTime.Now.AddDays(-14)) || (this.ETDFromPortOfCall > DateTime.Now.AddDays(14))) if ((this.ETDFromPortOfCall < DateTime.Now.AddDays(-14)) || (this.ETDFromPortOfCall > DateTime.Now.AddDays(14)))
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromPortOfCall: might be implausible", this.ETDFromPortOfCall.Value.ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromPortOfCall: might be implausible", this.ETDFromPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
if ((this.ETAToNextPort < DateTime.Now) || (this.ETAToNextPort > DateTime.Now.AddDays(14))) if ((this.ETAToNextPort < DateTime.Now) || (this.ETAToNextPort > DateTime.Now.AddDays(14)))
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToNextPort: might be implausible", this.ETAToNextPort.Value.ToString(), this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToNextPort: might be implausible", this.ETAToNextPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
if (this.CallPurposes.IsNullOrEmpty()) if (this.CallPurposes.IsNullOrEmpty())
@ -297,7 +297,7 @@ namespace bsmd.database
{ {
if (this.ETDFromKielCanal.HasValue && this.ETAToKielCanal.HasValue && if (this.ETDFromKielCanal.HasValue && this.ETAToKielCanal.HasValue &&
(this.ETDFromKielCanal < this.ETAToKielCanal)) (this.ETDFromKielCanal < this.ETAToKielCanal))
errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromKielCanal implausible", this.ETDFromKielCanal.ToString(), this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromKielCanal implausible", this.ETDFromKielCanal.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
} }
if((this.LastPort?.Equals("ZZUKN") == false) && !this.ETDFromLastPort.HasValue) if((this.LastPort?.Equals("ZZUKN") == false) && !this.ETDFromLastPort.HasValue)

View File

@ -36,9 +36,9 @@ namespace bsmd.email
{ {
this.pop3Client = new Pop3Client(); this.pop3Client = new Pop3Client();
bool useSSL = false; // abhängig vom PORT setzen!!! //bool useSSL = false; // abhängig vom PORT setzen!!!
if (Properties.Settings.Default.POP3Port != 110) //if (Properties.Settings.Default.POP3Port != 110)
useSSL = true; bool useSSL = true;
this.pop3Client.Connect(Properties.Settings.Default.POP3Server, Properties.Settings.Default.POP3Port, useSSL, this.pop3Client.Connect(Properties.Settings.Default.POP3Server, Properties.Settings.Default.POP3Port, useSSL,
60000, 60000, new System.Net.Security.RemoteCertificateValidationCallback(ValidateServerCertificate)); 60000, 60000, new System.Net.Security.RemoteCertificateValidationCallback(ValidateServerCertificate));