Fehlerkorrekturen ENI 7.0, Zwischenversion 7.0.0.7

This commit is contained in:
Daniel Schick 2022-03-10 08:40:13 +01:00
parent 0dbc688f8d
commit 958f236ac0
16 changed files with 45 additions and 54 deletions

View File

@ -210,7 +210,7 @@ namespace ENI2
} }
}; };
detailControl.RequestReload += DetailControl_RequestReload; detailControl.RequestReload += DetailControl_RequestReload;
detailControl.NotificationClassChanged += DetailControl_NotificationClassChanged; detailControl.NotificationClassChanged += DetailControl_NotificationClassChanged;
detailControl.ResetControlCache += DetailControl_ResetControlCache; detailControl.ResetControlCache += DetailControl_ResetControlCache;
detailControl.RequestValidate += DetailControl_RequestValidate; detailControl.RequestValidate += DetailControl_RequestValidate;
@ -1042,28 +1042,28 @@ namespace ENI2
{ {
if(this._errorListDialog == null) if(this._errorListDialog == null)
{ {
this._errorListDialog = new ErrorListDialog(); this._errorListDialog = new ErrorListDialog();
this._errorListDialog.Closed += (o, e) => this._errorListDialog = null; this._errorListDialog.Closed += (o, e) => this._errorListDialog = null;
this._errorListDialog.Loaded += (o, e) => this._errorListDialog.RefreshVisible = true; this._errorListDialog.Loaded += (o, e) => this._errorListDialog.RefreshVisible = true;
this._errorListDialog.ErrorSelected += _errorListDialog_ErrorSelected; this._errorListDialog.ErrorSelected += _errorListDialog_ErrorSelected;
this._errorListDialog.RefreshClicked += _errorListDialog_RefreshClicked; this._errorListDialog.RefreshClicked += _errorListDialog_RefreshClicked;
this._errorListDialog.Show(); this._errorListDialog.Show();
} }
this._errorListDialog.Errors = vErrors; this._errorListDialog.Errors = vErrors;
} }
if (vViolations.Count > 0) if (vViolations.Count > 0)
{ {
if(this._violationListDialog == null) if(this._violationListDialog == null)
{ {
this._violationListDialog = new ViolationListDialog(); this._violationListDialog = new ViolationListDialog();
this._violationListDialog.Closed += (o, e) => this._violationListDialog = null; this._violationListDialog.Closed += (o, e) => this._violationListDialog = null;
this._violationListDialog.Loaded += (o, e) => this._violationListDialog.RefreshVisible = true; this._violationListDialog.Loaded += (o, e) => this._violationListDialog.RefreshVisible = true;
this._violationListDialog.ViolationSelected += _errorListDialog_ErrorSelected; this._violationListDialog.ViolationSelected += _errorListDialog_ErrorSelected;
this._violationListDialog.RefreshClicked += _errorListDialog_RefreshClicked; this._violationListDialog.RefreshClicked += _errorListDialog_RefreshClicked;
this._violationListDialog.Show(); this._violationListDialog.Show();
} }
_violationListDialog.Violations = vViolations; _violationListDialog.Violations = vViolations;
} }
if((vErrors.Count == 0) && (vViolations.Count == 0)) if((vErrors.Count == 0) && (vViolations.Count == 0))

View File

@ -707,7 +707,7 @@ namespace ENI2.DetailViewControls
private void buttonValidate_Click(object sender, RoutedEventArgs e) private void buttonValidate_Click(object sender, RoutedEventArgs e)
{ {
this.OnRequestValidate(); this.OnRequestValidate();
} }
/// <summary> /// <summary>
@ -743,7 +743,7 @@ namespace ENI2.DetailViewControls
else else
{ {
MessageBox.Show(importResultText, "Import failed", MessageBoxButton.OK, MessageBoxImage.Error); MessageBox.Show(importResultText, "Import failed", MessageBoxButton.OK, MessageBoxImage.Error);
} }
} }
} }
} }

View File

@ -36,8 +36,8 @@
<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>6</ApplicationRevision> <ApplicationRevision>7</ApplicationRevision>
<ApplicationVersion>7.0.0.6</ApplicationVersion> <ApplicationVersion>7.0.0.7</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -8,7 +8,7 @@
xmlns:p="clr-namespace:ENI2.Properties" xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d" mc:Ignorable="d"
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_red.ico"> Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_red.ico" Topmost="True">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="*" />

View File

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ENI2.EditControls" xmlns:local="clr-namespace:ENI2.EditControls"
xmlns:p="clr-namespace:ENI2.Properties" xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d" mc:Ignorable="d"
Title="{x:Static p:Resources.textVisitTransitId}" Height="236" Width="300" WindowStyle="SingleBorderWindow" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded"> Title="{x:Static p:Resources.textVisitTransitId}" Height="236" Width="300" WindowStyle="SingleBorderWindow" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded" Topmost="True">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="110"></ColumnDefinition> <ColumnDefinition Width="110"></ColumnDefinition>

View File

@ -8,7 +8,7 @@
xmlns:p="clr-namespace:ENI2.Properties" xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d" mc:Ignorable="d"
Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico"> Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Topmost="True">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="*" />

View File

@ -470,8 +470,8 @@ namespace ENI2.Excel
ibcPosition.Flashpoint_CEL = reader.ReadText(ibc_flash); ibcPosition.Flashpoint_CEL = reader.ReadText(ibc_flash);
if (!ibcPosition.Flashpoint_CEL.IsNullOrEmpty()) if (!ibcPosition.Flashpoint_CEL.IsNullOrEmpty())
{ {
if (ibcPosition.Flashpoint_CEL != "-") if (ibcPosition.Flashpoint_CEL != "-")
{ {
if (double.TryParse(ibcPosition.Flashpoint_CEL, out double flashval)) if (double.TryParse(ibcPosition.Flashpoint_CEL, out double flashval))
{ {
if (flashval > 60) ibcPosition.FlashpointInformation = 1; // GT60CEL if (flashval > 60) ibcPosition.FlashpointInformation = 1; // GT60CEL

View File

@ -505,7 +505,7 @@ namespace ENI2.Excel
{ {
string ibc_productName = string.Format("{1}.IBC.ProductName_{0}", i + 1, className); string ibc_productName = string.Format("{1}.IBC.ProductName_{0}", i + 1, className);
string ibc_pollutionCategory = string.Format("{1}.IBC.PollutionCategory_{0}", i + 1, className); string ibc_pollutionCategory = string.Format("{1}.IBC.PollutionCategory_{0}", i + 1, className);
string ibc_flash = string.Format("{1}.IBC.Flashpoint_CEL_{0}", i + 1, className); string ibc_flash = string.Format("{1}.IBC.FlashpointInformation_{0}", i + 1, className);
string ibc_quantity = string.Format("{1}.IBC.Quantity_KGM_{0}", i + 1, className); string ibc_quantity = string.Format("{1}.IBC.Quantity_KGM_{0}", i + 1, className);
string ibc_stowagePosition = string.Format("{1}.IBC.StowagePosition_{0}", i + 1, className); string ibc_stowagePosition = string.Format("{1}.IBC.StowagePosition_{0}", i + 1, className);
string ibc_portOfLoading = string.Format("{1}.IBC.PortOfLoading_{0}", i + 1, className); string ibc_portOfLoading = string.Format("{1}.IBC.PortOfLoading_{0}", i + 1, className);
@ -525,7 +525,12 @@ namespace ENI2.Excel
case 3: WriteText(ibc_pollutionCategory, "OS"); break; case 3: WriteText(ibc_pollutionCategory, "OS"); break;
} }
} }
WriteText(ibc_flash, ibcPosition.Flashpoint_CEL);
if (ibcPosition.FlashpointInformation == 0) // == "NF"
WriteText(ibc_flash, "-");
else
WriteText(ibc_flash, ibcPosition.Flashpoint_CEL);
if (ibcPosition.Quantity_KGM.HasValue) if (ibcPosition.Quantity_KGM.HasValue)
WriteNumber(ibc_quantity, ibcPosition.Quantity_KGM.Value); WriteNumber(ibc_quantity, ibcPosition.Quantity_KGM.Value);
WriteText(ibc_stowagePosition, ibcPosition.StowagePosition); WriteText(ibc_stowagePosition, ibcPosition.StowagePosition);

View File

@ -131,10 +131,13 @@ namespace SendNSWMessageService
if (message.InternalStatus != Message.BSMDStatus.TOSEND) continue; if (message.InternalStatus != Message.BSMDStatus.TOSEND) continue;
// "Virtuelle" Meldeklassen (bisher: DK) werden hier nicht versendet! // "Virtuelle" Meldeklassen (bisher: DK) werden hier nicht versendet!
if ((message.MessageNotificationClass == Message.NotificationClass.STO) || if (message.MessageNotificationClass == Message.NotificationClass.STO) continue;
(message.MessageNotificationClass == Message.NotificationClass.CREWD) ||
(message.MessageNotificationClass == Message.NotificationClass.PASD)) /* muss zum Go Live wieder einkommentiert werden, da CREWD und PASD vorerst nicht versendet werden
if((message.MessageNotificationClass == Message.NotificationClass.CREWD) ||
(message.MessageNotificationClass == Message.NotificationClass.PASD))
continue; continue;
*/
if ((message.MessageNotificationClass == Message.NotificationClass.VISIT) || if ((message.MessageNotificationClass == Message.NotificationClass.VISIT) ||
(message.MessageNotificationClass == Message.NotificationClass.TRANSIT)) (message.MessageNotificationClass == Message.NotificationClass.TRANSIT))

View File

@ -628,6 +628,8 @@ namespace bsmd.database
case NotificationClass.SERV: case NotificationClass.SERV:
case NotificationClass.WAS: case NotificationClass.WAS:
case NotificationClass.TOWD: case NotificationClass.TOWD:
case NotificationClass.HAZD:
case NotificationClass.WAS_RCPT:
if (isTransit) result = false; if (isTransit) result = false;
break; break;
case NotificationClass.VISIT: case NotificationClass.VISIT:

View File

@ -26,7 +26,7 @@ namespace bsmd.database
[MaxLength(70)] [MaxLength(70)]
[ENI2Validation] [ENI2Validation]
[Validation(ValidationCode.STRING_MAXLEN, 70)] [Validation(ValidationCode.STRING_MAXLEN, 70)]
public string TreatmentFacilityProviderName { get; set; } public string TreatmentFacilityProviderName { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -130,8 +130,7 @@ namespace bsmd.database
public DateTime? LastWasteDisposalDate { get; set; } public DateTime? LastWasteDisposalDate { get; set; }
[Obsolete] [Obsolete]
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation] [ENI2Validation]
public byte? WasteDisposalDelivery { get; set; } public byte? WasteDisposalDelivery { get; set; }
@ -463,26 +462,18 @@ namespace bsmd.database
errors.Add(RuleEngine.CreateError(ValidationCode.POSITION_COUNT, string.Format("Waste {0}", missingType), null, this.Title, null, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.POSITION_COUNT, string.Format("Waste {0}", missingType), null, this.Title, null, this.Tablename));
} }
// Extravalidierung für "0" Meldung (5.3.21) // Extravalidierung für "0" Meldung (5.3.21)
double totalSludgeRetained = 0;
double totalWC = 0; double totalWC = 0;
double totalWAR = 0; double totalWAR = 0;
double totalWAGTNP = 0; double totalWAGTNP = 0;
double totalWDA = 0; double totalWDA = 0;
foreach(Waste w in this.Waste) foreach(Waste w in this.Waste)
{ {
if (w.WasteType == 1100) totalSludgeRetained += w.WasteAmountRetained_MTQ ?? 0;
if (w.WasteType == 1300) totalSludgeRetained += w.WasteAmountRetained_MTQ ?? 0;
totalWC += w.WasteCapacity_MTQ ?? 0; totalWC += w.WasteCapacity_MTQ ?? 0;
totalWAR += w.WasteAmountRetained_MTQ ?? 0; totalWAR += w.WasteAmountRetained_MTQ ?? 0;
totalWAGTNP += w.WasteAmountGeneratedTillNextPort_MTQ ?? 0; totalWAGTNP += w.WasteAmountGeneratedTillNextPort_MTQ ?? 0;
totalWDA += w.WasteDisposalAmount_MTQ ?? 0; totalWDA += w.WasteDisposalAmount_MTQ ?? 0;
}
if(totalSludgeRetained == 0)
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste amount retained on board for types 1100 'sludge' and 1300 'oil-others' = 0", null, this.Title, null, this.Tablename));
} }
if(totalWC == 0) if(totalWC == 0)
{ {

View File

@ -25,12 +25,15 @@ namespace bsmd.database
#region Properties #region Properties
[MaxLength(20)] [MaxLength(20)]
[ENI2Validation]
public string IdentificationNumber { get; set; } public string IdentificationNumber { get; set; }
[MaxLength(70)] [MaxLength(70)]
[ENI2Validation]
public string PortReceptionFacilityName { get; set; } public string PortReceptionFacilityName { get; set; }
[MaxLength(70)] [MaxLength(70)]
[ENI2Validation]
public string PortReceptionFacilityProviderName { get; set; } public string PortReceptionFacilityProviderName { get; set; }
public ObservableCollection<WasteReceived> WasteReceived { get; private set; } = new ObservableCollection<WasteReceived>(); public ObservableCollection<WasteReceived> WasteReceived { get; private set; } = new ObservableCollection<WasteReceived>();
@ -331,6 +334,11 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations) public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{ {
foreach(TreatmentFacilityProvider tfp in this.TreatmentFacilityProvider)
{
RuleEngine.ValidateProperties(tfp, errors, violations);
}
foreach (WasteReceived wasteReceived in this.WasteReceived) foreach (WasteReceived wasteReceived in this.WasteReceived)
{ {
RuleEngine.ValidateProperties(wasteReceived, errors, violations); RuleEngine.ValidateProperties(wasteReceived, errors, violations);

View File

@ -117,8 +117,7 @@ namespace bsmd.database
public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; } public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; }
[Obsolete] [Obsolete]
[ENI2Validation] [ENI2Validation]
[Validation(ValidationCode.NOT_NULL)]
public double? WasteDisposedAtLastPort_MTQ { get; set; } public double? WasteDisposedAtLastPort_MTQ { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

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

View File

@ -1585,24 +1585,7 @@ namespace bsmd.hisnord
items1.Add(hn_crewtype); items1.Add(hn_crewtype);
} }
} }
} }
if (message.MessageNotificationClass == Message.NotificationClass.CREW)
{
if (message.Reset)
{
items1ChoiceType.Add(Items1ChoiceType.RESET_CREWA);
items1.Add(ytype.Y);
}
else
{
if (message.Elements.Count > 0)
{
}
}
}
#endregion #endregion