Merge branch 'release/eni_7.2.5'

This commit is contained in:
Daniel Schick 2024-11-07 14:36:54 +01:00
commit 10b4500fb3
26 changed files with 79 additions and 58 deletions

View File

@ -12,7 +12,7 @@
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
<applicationSettings>
<ENI2.Properties.Settings>
@ -36,7 +36,7 @@
<userSettings>
<ENI2.Properties.Settings>
<setting name="MainWindowPlacement" serializeAs="String">
<value />
<value/>
</setting>
</ENI2.Properties.Settings>
</userSettings>

View File

@ -750,7 +750,7 @@ namespace ENI2
vViolations.AddRange(violations);
}
#region 12.11.18 / 6.3.21 / 23.5.22: globale Plausi-Prüfungen
#region 12.11.18 / 6.3.21 / 23.5.22 / 26.10.24: globale Plausi-Prüfungen
Message crewaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA);
Message crewdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD);
@ -764,6 +764,8 @@ namespace ENI2
Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT);
Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS);
Message servMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SERV);
Message statMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.STAT);
Message pre72hMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PRE72H);
#region CREW / PAS Count Plausibility
@ -1117,6 +1119,20 @@ namespace ENI2
#endregion
#region Tanker validation STAT/PRE72H
if ((statMessage.Elements[0] is STAT stat) && (pre72hMessage.Elements[0] is PRE72H pre72h))
{
if((pre72h.Tanker ?? false) != (stat.IsTanker ?? false))
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.LIST_EMPTY, "Tanker: Please check PRE72H / STAT", null, "PRE72H / STAT", null, "STAT");
mv.MessageGroupName = Properties.Resources.textPortNotification;
vViolations.Add(mv);
}
}
#endregion
#endregion
foreach (MessageError me in vErrors)

View File

@ -14,6 +14,7 @@ using System.IO;
using System;
using Microsoft.Win32;
using System.Diagnostics;
using System.Threading.Tasks;
namespace ENI2.DetailViewControls
{
@ -178,7 +179,7 @@ namespace ENI2.DetailViewControls
#region init WSDP provider
InitTemplates();
await InitTemplates();
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
@ -188,7 +189,7 @@ namespace ENI2.DetailViewControls
#region Waste receipt grid event handler
private void DataGridWasteReceipt_CreateRequested()
private async void DataGridWasteReceipt_CreateRequested()
{
EditWasteReceiptDialog epd = new EditWasteReceiptDialog();
epd.WAS_RCPT = new WAS_RCPT();
@ -219,7 +220,8 @@ namespace ENI2.DetailViewControls
this.dataGridWasteReceived.ItemsSource = null;
dataGridWasteReceipt_SelectionChanged(this, null);
}
InitTemplates(); // templates might have changed in the dialog
await InitTemplates(); // templates might have changed in the dialog
}
private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj)
@ -238,7 +240,7 @@ namespace ENI2.DetailViewControls
}
}
private void DataGridWasteReceipt_EditRequested(DatabaseEntity obj)
private async void DataGridWasteReceipt_EditRequested(DatabaseEntity obj)
{
EditWasteReceiptDialog epd = new EditWasteReceiptDialog();
epd.WAS_RCPT = obj as WAS_RCPT;
@ -265,7 +267,7 @@ namespace ENI2.DetailViewControls
this.dataGridWasteReceipt.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
dataGridWasteReceipt_SelectionChanged(this, null);
InitTemplates(); // templates might have changed in the dialog
await InitTemplates(); // templates might have changed in the dialog
}
private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e)
@ -596,9 +598,10 @@ namespace ENI2.DetailViewControls
#endregion
#region Waste disposal Service Provider templates event handler
private async void InitTemplates()
private async Task InitTemplates()
{
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
_wsdpTemplates.Sort();

View File

@ -30,14 +30,14 @@
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>http://192.168.2.24/eni2.publish/</InstallUrl>
<SupportUrl>http://www.textbausteine.net/</SupportUrl>
<ProductName>ENI 2</ProductName>
<ProductName>ENI</ProductName>
<PublisherName>Informatikbüro Daniel Schick</PublisherName>
<SuiteName>NSW</SuiteName>
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>7.2.4.6</ApplicationVersion>
<ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>7.2.5.3</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -38,11 +38,11 @@
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Margin="2" Grid.ColumnSpan="2" Width="auto" MaxLength="99" TextWrapping="Wrap" />
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999" />
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
<enictrl:LocodeControl Grid.Row="5" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" LocodeSource="SSN" />
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" />
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" />

View File

@ -26,7 +26,7 @@
<ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
<TextBox Name="textBoxDescription" Grid.Row="1" Margin="2" Grid.Column="1" Width="auto" MaxLength="99" TextWrapping="Wrap" />
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountReceived" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/>
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountReceived" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
</Grid>
</enictrl:EditWindowBase>

View File

@ -101,7 +101,7 @@ namespace ENI2.Report
string migraTempFile = string.Format("{1}\\{0}.mdddl", filenameCore, Path.GetDirectoryName(filename));
MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, migraTempFile);
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true);
PdfDocumentRenderer renderer = new PdfDocumentRenderer();
renderer.Document = document;
renderer.RenderDocument();
@ -1250,8 +1250,9 @@ namespace ENI2.Report
private static void CreateWAS_RCPTTable(Document document, Message message)
{
foreach (WAS_RCPT was_rpct in message.Elements)
for (int i = 0; i < message.Elements.Count; i++)
{
WAS_RCPT was_rpct = (WAS_RCPT)message.Elements[i];
document.LastSection.AddParagraph("");
Table table = AddGrayTable(document);

View File

@ -40,8 +40,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.17" targetFramework="net48" />
<package id="log4net" version="3.0.1" targetFramework="net48" />
</packages>

View File

@ -40,8 +40,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
@ -52,8 +52,8 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WinSCPnet, Version=1.15.0.14955, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf, processorArchitecture=MSIL">
<HintPath>..\packages\WinSCP.6.3.4\lib\net40\WinSCPnet.dll</HintPath>
<Reference Include="WinSCPnet, Version=1.15.0.14991, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf, processorArchitecture=MSIL">
<HintPath>..\packages\WinSCP.6.3.5\lib\net40\WinSCPnet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -93,12 +93,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\WinSCP.6.3.4\build\WinSCP.targets" Condition="Exists('..\packages\WinSCP.6.3.4\build\WinSCP.targets')" />
<Import Project="..\packages\WinSCP.6.3.5\build\WinSCP.targets" Condition="Exists('..\packages\WinSCP.6.3.5\build\WinSCP.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\WinSCP.6.3.4\build\WinSCP.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WinSCP.6.3.4\build\WinSCP.targets'))" />
<Error Condition="!Exists('..\packages\WinSCP.6.3.5\build\WinSCP.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WinSCP.6.3.5\build\WinSCP.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.17" targetFramework="net48" />
<package id="WinSCP" version="6.3.4" targetFramework="net48" />
<package id="log4net" version="3.0.1" targetFramework="net48" />
<package id="WinSCP" version="6.3.5" targetFramework="net48" />
</packages>

View File

@ -191,7 +191,7 @@ namespace bsmd.dakosy
RemovalOperationResult removalResult = session.RemoveFiles(remoteDir + "/*.*");
if ((removalResult.IsSuccess) && (removalResult.Removals.Count > 0))
{
_log.InfoFormat("Removed {0} downloaded files on remote host", removalResult.Removals);
_log.InfoFormat("Removed {0} downloaded file(s) on remote host", removalResult.Removals.Count);
}
if (!removalResult.IsSuccess)
{

View File

@ -510,9 +510,9 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if ((this.NoDPGOnBoardOnArrival ?? false) && this.MessageHeader.InternalStatus == Message.BSMDStatus.TOSEND)
if (!(this.NoDPGOnBoardOnArrival ?? true) && !this.HasPositions)
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set!", null, this.Title, null, this.Tablename));
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set", null, this.Title, null, this.Tablename));
}
if((NoDPGOnBoardOnArrival ?? false) && this.HasPositions)

View File

@ -62,7 +62,8 @@ namespace bsmd.database
}
else
{
_log.ErrorFormat("trying to deque a message from telemetry that we don't know about. Provider: {0} MessageId: {1}",
// this can happen if the service gets re-started and not all sent messages have yet been received
_log.WarnFormat("trying to deque a message from telemetry that we don't know about. Provider: {0} MessageId: {1}",
provider.ToString(), message.Id.Value);
}
}

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("7.2.4")]
[assembly: AssemblyInformationalVersion("7.2.5")]
[assembly: AssemblyCopyright("Copyright © 2014-2024 schick Informatik")]
[assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("7.2.4.*")]
[assembly: AssemblyVersion("7.2.5.*")]

View File

@ -254,17 +254,17 @@ namespace bsmd.database
if (!this.HasValidWasteCode)
violations.Add(RuleEngine.CreateViolation(ValidationCode.V784, "WasteCode", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteDisposalAmount_MTQ > 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteDisposalAmount_MTQ >= 10000)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteCapacity_MTQ > 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste capacity", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteCapacity_MTQ >= 10000)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste capacity too high", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteAmountRetained_MTQ > 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste amount retained", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteAmountRetained_MTQ >= 10000)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste amount retained too high", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteAmountGeneratedTillNextPort_MTQ > 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated till next port", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteAmountGeneratedTillNextPort_MTQ >= 10000)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste generated till next port too high", null, this.Title, this.Identifier, this.Tablename));
if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename));

View File

@ -136,8 +136,8 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if (this.AmountWasteReceived_MTQ > 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too big", null, this.Title, this.Identifier, this.Tablename));
if (this.AmountWasteReceived_MTQ >= 10000)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
}
#endregion

View File

@ -38,8 +38,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.17" targetFramework="net48" />
<package id="log4net" version="3.0.1" targetFramework="net48" />
</packages>

View File

@ -38,8 +38,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.17" targetFramework="net48" />
<package id="log4net" version="3.0.1" targetFramework="net48" />
</packages>

View File

@ -38,8 +38,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.17" targetFramework="net48" />
<package id="log4net" version="3.0.1" targetFramework="net48" />
</packages>

Binary file not shown.