Version 5.0.8: Zahlreiche Kleinigkeiten modifiziert und korrigiert, abgel. Zertifikat ENI2, System-Error bei Visit-Id Beantragung.

This commit is contained in:
Daniel Schick 2018-05-11 10:46:22 +00:00
parent ad56f89ffe
commit 2d912cfba3
18 changed files with 108 additions and 29 deletions

View File

@ -213,7 +213,7 @@ namespace ENI2
MessageCore existingCore = null;
if (newCore.IsDK && newCore.VisitId.IsNullOrEmpty() && newCore.TransitId.IsNullOrEmpty())
if (!newCore.IsDK && newCore.VisitId.IsNullOrEmpty() && newCore.TransitId.IsNullOrEmpty())
{
// deutsche Häfen fordern eine Visit-Id an, für DK erfolgt hier nur die Anlage eines Datensatzes
newCore.BSMDStatusInternal = MessageCore.BSMDStatus.TOSEND;

View File

@ -80,7 +80,7 @@
<CheckBox Name="checkBoxSickAnimalsOrPets" IsChecked="{Binding SickAnimalOrPetOnBoard}" Grid.Row="12" Grid.Column="1" VerticalAlignment="Center"/>
<CheckBox Name="checkBoxSanitaryControlExemption" IsChecked="{Binding ValidSanitaryControlExemptionOrCertificateOnBoard}" Grid.Row="13" Grid.Column="1" VerticalAlignment="Center"/>
<TextBox Name="textBoxPlaceOfIssue" Grid.Row="14" Grid.Column="1" MaxLength="100" Text="{Binding PlaceOfIssue}" Margin="2" />
<DatePicker Name="datePickerDateOfIssue" Grid.Row="14" Grid.Column="3" SelectedDate="{Binding DateOfIssue}" Margin="2" ContextMenu="{DynamicResource ClearContextMenu}" />
<DatePicker Name="datePickerDateOfIssue" Grid.Row="14" Grid.Column="3" SelectedDate="{Binding DateOfIssue, Mode=TwoWay}" Margin="2" ContextMenu="{DynamicResource ClearContextMenu}" />
<CheckBox Name="checkBoxReinspectionSanitary" IsChecked="{Binding SanitaryControlReinspectionRequired}" Grid.Row="15" Grid.Column="1" VerticalAlignment="Center"/>
</Grid>
</ScrollViewer>

View File

@ -232,6 +232,7 @@ namespace ENI2.DetailViewControls
this.RegisterIntegerUpDownChange(this.integerUpDownNumberOfIllPersons, Message.NotificationClass.MDH);
this.RegisterTextboxChange(this.textBoxPlaceOfIssue, Message.NotificationClass.MDH);
this.RegisterTextboxChange(this.textBoxStowawaysJoiningLocation, Message.NotificationClass.MDH);
this.RegisterDatePickerChange(this.datePickerDateOfIssue, Message.NotificationClass.MDH);
}

View File

@ -690,6 +690,7 @@ namespace ENI2.DetailViewControls
for (int i = 0; i < this.dataGridMessages.SelectedItems.Count; i++)
{
Message selectedMessage = this.dataGridMessages.SelectedItems[i] as Message;
selectedMessage.LastStatus = selectedMessage.InternalStatus;
selectedMessage.InternalStatus = Message.BSMDStatus.REPORT;
selectedMessage.ReportingPartyId = App.UserId; // wichtig damit der Richtige(!) die Mail mit dem PDF bekommt
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedMessage);

View File

@ -24,10 +24,10 @@
<DataGridTextColumn Header="{x:Static p:Resources.textName}" Binding="{Binding TowageOnArrivalName}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textPurposeOfCall}" Binding="{Binding TowageOnArrivalPurposeOfCall}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textFlag}" Binding="{Binding TowageOnArrivalFlag}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textDraughtInDecimetre}" Binding="{Binding TowageOnArrivalDraught_DMT}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textDraughtInDecimetre}" Binding="{Binding TowageOnArrivalDraught_DMT, StringFormat={}{0:N1}}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textGrossTonnage}" Binding="{Binding TowageOnArrivalGrossTonnage}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textLengthOverAll}" Binding="{Binding TowageOnArrivalLengthOverall_MTR}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textBeamOverAll}" Binding="{Binding TowageOnArrivalBeam_MTR}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textLengthOverAll}" Binding="{Binding TowageOnArrivalLengthOverall_MTR, StringFormat={}{0:N2}}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textBeamOverAll}" Binding="{Binding TowageOnArrivalBeam_MTR, StringFormat={}{0:N2}}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textRemarks}" Binding="{Binding TowageOnArrivalRemarks}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textCompanyName}" Binding="{Binding TowageOnArrivalOperatorCompanyName}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textStreetNumber}" Binding="{Binding TowageOnArrivalOperatorStreetNameAndNumber}" IsReadOnly="True" Width="Auto" />
@ -48,9 +48,9 @@
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
<DataGridTextColumn Header="{x:Static p:Resources.textName}" Binding="{Binding TowageOnDepartureName}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textFlag}" Binding="{Binding TowageOnDepartureFlag}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textDraughtInDecimetre}" Binding="{Binding TowageOnDepartureDraught_DMT}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textLengthOverAll}" Binding="{Binding TowageOnDepartureLengthOverall_MTR}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textBeamOverAll}" Binding="{Binding TowageOnDepartureBeam_MTR}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textDraughtInDecimetre}" Binding="{Binding TowageOnDepartureDraught_DMT, StringFormat={}{0:N1}}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textLengthOverAll}" Binding="{Binding TowageOnDepartureLengthOverall_MTR, StringFormat={}{0:N2}}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textBeamOverAll}" Binding="{Binding TowageOnDepartureBeam_MTR, StringFormat={}{0:N2}}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textRemarks}" Binding="{Binding TowageOnDepartureRemarks}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textCompanyName}" Binding="{Binding TowageOnDepartureOperatorCompanyName}" IsReadOnly="True" Width="Auto" />
<DataGridTextColumn Header="{x:Static p:Resources.textStreetNumber}" Binding="{Binding TowageOnDepartureOperatorStreetNameAndNumber}" IsReadOnly="True" Width="Auto" />

View File

@ -36,7 +36,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>5.0.7.%2a</ApplicationVersion>
<ApplicationVersion>5.0.8.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
@ -84,10 +84,10 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>C907F4E529D2646C3EAECBF9ACA831CCC99069A8</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>DBBB0891995CB133BFEBAA82DFB101EE9701C465</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>ENI2_TemporaryKey.pfx</ManifestKeyFile>
<ManifestKeyFile>ENI2_1_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
@ -614,6 +614,7 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="ENI2_1_TemporaryKey.pfx" />
<None Include="Service References\LockingServiceReference\ENI2.LockingServiceReference.CoreLock.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>

Binary file not shown.

View File

@ -126,6 +126,7 @@ namespace ENI2.EditControls
{
this.doubleUpDownIMO.IsEnabled = false;
this.locodePoC.LocodeValue = newVisitId.Substring(0, 5);
this.locodePoC.IsEnabled = false;
}
else
{

Binary file not shown.

View File

@ -541,7 +541,15 @@ namespace bsmd.ExcelReadService
if (ibcPosition.Flashpoint_CEL == "-")
aReadState = ExcelReader.ReadState.FAIL;
else
{
aReadState = ExcelReader.ReadState.OK;
double flashval = 0;
if (double.TryParse(ibcPosition.Flashpoint_CEL, out flashval))
{
if (flashval > 60) ibcPosition.FlashpointInformation = 1; // GT60CEL
else ibcPosition.FlashpointInformation = 2; // LE60CEL
}
}
}
reader.Conf.ConfirmText(ibc_flash, ibcPosition.Flashpoint_CEL, aReadState);
ibcPosition.Quantity_KGM = (int ?) reader.ReadNumber(ibc_quantity);
@ -867,9 +875,19 @@ namespace bsmd.ExcelReadService
if (!ibcPosition.Flashpoint_CEL.IsNullOrEmpty())
{
if (ibcPosition.Flashpoint_CEL == "-")
{
aReadState = ExcelReader.ReadState.FAIL;
}
else
{
aReadState = ExcelReader.ReadState.OK;
double flashval = 0;
if (double.TryParse(ibcPosition.Flashpoint_CEL, out flashval))
{
if (flashval > 60) ibcPosition.FlashpointInformation = 1; // GT60CEL
else ibcPosition.FlashpointInformation = 2; // LE60CEL
}
}
}
reader.Conf.ConfirmText(ibc_flash, ibcPosition.Flashpoint_CEL, aReadState);
ibcPosition.Quantity_KGM = (int?)reader.ReadNumber(ibc_quantity);

View File

@ -2,6 +2,7 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>

View File

@ -243,7 +243,7 @@ namespace bsmd.ReportGenerator
{
if ((aMessage.MessageNotificationClass != Message.NotificationClass.VISIT) && (aMessage.MessageNotificationClass != Message.NotificationClass.TRANSIT))
reportMessages.Add(aMessage);
aMessage.InternalStatus = Message.BSMDStatus.PREPARE;
aMessage.InternalStatus = aMessage.LastStatus.HasValue ? aMessage.LastStatus.Value : Message.BSMDStatus.PREPARE;
DBManager.Instance.Save(aMessage);
sb.Append(aMessage.MessageNotificationClassDisplay);
sb.Append("_");

View File

@ -256,6 +256,11 @@ namespace bsmd.database
/// </summary>
public BSMDStatus InternalStatus { get; set; }
/// <summary>
/// Vorheriger Status (z.B. für nach der Report-Generierung), wird nicht immer gesetzt
/// </summary>
public BSMDStatus? LastStatus { get; set; }
/// <summary>
/// Erweiterte Erläuterung für Status(-wechsel) zur Darstellung im ENI
/// </summary>
@ -404,6 +409,7 @@ namespace bsmd.database
cmd.Parameters.AddWithNullableValue("@REPORTINGPARTYID", this.reportingPartyId);
cmd.Parameters.AddWithValue("@BSMDSTATUS", this.InternalStatus);
cmd.Parameters.AddWithNullableValue("@LASTSTATUS", this.LastStatus);
cmd.Parameters.AddWithValue("@HIS", this.HIS);
cmd.Parameters.AddWithNullableValue("@CREATEDBY", this.CreatedBy);
cmd.Parameters.AddWithNullableValue("@CHANGEDBY", this.ChangedBy);
@ -415,8 +421,8 @@ namespace bsmd.database
{
this.CreateId();
cmd.Parameters.AddWithValue("@ID", this.Id);
string query = string.Format("INSERT INTO {0} (Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, CreatedBy, ChangedBy, StatusInfo, SendSuccess, SentBy) " +
"VALUES (@ID, @CLIENTREQUESTID, @MESSAGECOREID, @MESSAGEID, @SENTAT, @RECEIVEDAT, @REQUESTEDAT, @NOTIFICATIONCLASS, @RESET, @CANCEL, @STATUS, @REPORTINGPARTYID, @BSMDSTATUS, @HIS, @CREATEDBY, @CHANGEDBY, @STATUSINFO, @SENDSUCCESS, @SENTBY)",
string query = string.Format("INSERT INTO {0} (Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, Reset, Cancel, Status, ReportingPartyId, BSMDStatus, LastStatus, HIS, CreatedBy, ChangedBy, StatusInfo, SendSuccess, SentBy) " +
"VALUES (@ID, @CLIENTREQUESTID, @MESSAGECOREID, @MESSAGEID, @SENTAT, @RECEIVEDAT, @REQUESTEDAT, @NOTIFICATIONCLASS, @RESET, @CANCEL, @STATUS, @REPORTINGPARTYID, @BSMDSTATUS, @LASTSTATUS, @HIS, @CREATEDBY, @CHANGEDBY, @STATUSINFO, @SENDSUCCESS, @SENTBY)",
this.Tablename);
cmd.CommandText = query;
}
@ -424,7 +430,7 @@ namespace bsmd.database
{
cmd.Parameters.AddWithValue("@ID", this.Id);
cmd.CommandText = string.Format("UPDATE {0} SET ClientRequestId = @CLIENTREQUESTID, MessageId = @MESSAGEID, SentAt = @SENTAT, ReceivedAt = @RECEIVEDAT, RequestedAt = @REQUESTEDAT, " +
"NotificationClass = @NOTIFICATIONCLASS, Reset = @RESET, Cancel = @CANCEL, Status = @STATUS, ReportingPartyId = @REPORTINGPARTYID, BSMDStatus = @BSMDSTATUS, HIS = @HIS, " +
"NotificationClass = @NOTIFICATIONCLASS, Reset = @RESET, Cancel = @CANCEL, Status = @STATUS, ReportingPartyId = @REPORTINGPARTYID, BSMDStatus = @BSMDSTATUS, LastStatus = @LASTSTATUS, HIS = @HIS, " +
"CreatedBy = @CREATEDBY, ChangedBy = @CHANGEDBY, StatusInfo = @STATUSINFO, SendSuccess = @SENDSUCCESS, SentBy = @SENTBY WHERE Id = @ID", this.Tablename);
}
}
@ -433,7 +439,7 @@ namespace bsmd.database
public override void PrepareLoadCommand(IDbCommand cmd, LoadFilter filter, params object[] criteria )
{
string query = string.Format("SELECT Id, ClientRequestId, MessageCoreId, MessageId, SentAt, ReceivedAt, RequestedAt, NotificationClass, " +
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, HIS, Created, CreatedBy, ChangedBy, Changed, StatusInfo, SendSuccess, SentBy FROM {0} ", this.Tablename);
"Reset, Cancel, Status, ReportingPartyId, BSMDStatus, LastStatus, HIS, Created, CreatedBy, ChangedBy, Changed, StatusInfo, SendSuccess, SentBy FROM {0} ", this.Tablename);
switch (filter)
{
@ -513,14 +519,15 @@ namespace bsmd.database
if (!reader.IsDBNull(10)) msg.Status = (MessageStatus)Enum.ToObject(typeof(MessageStatus), reader.GetByte(10));
if (!reader.IsDBNull(11)) msg.reportingPartyId = reader.GetGuid(11);
if (!reader.IsDBNull(12)) msg.InternalStatus = (BSMDStatus)Enum.ToObject(typeof(BSMDStatus), reader.GetByte(12));
if (!reader.IsDBNull(13)) msg.HIS = (NSWProvider)Enum.ToObject(typeof(NSWProvider), reader.GetByte(13));
if (!reader.IsDBNull(14)) msg.created = reader.GetDateTime(14);
if (!reader.IsDBNull(15)) msg.CreatedBy = reader.GetString(15);
if (!reader.IsDBNull(16)) msg.ChangedBy = reader.GetString(16);
if (!reader.IsDBNull(17)) msg.changed = reader.GetDateTime(17);
if (!reader.IsDBNull(18)) msg.StatusInfo = reader.GetString(18);
if (!reader.IsDBNull(19)) msg.SendSuccess = reader.GetBoolean(19);
if (!reader.IsDBNull(20)) msg.SentBy = reader.GetString(20);
if (!reader.IsDBNull(13)) msg.LastStatus = (BSMDStatus)Enum.ToObject(typeof(BSMDStatus), reader.GetByte(13));
if (!reader.IsDBNull(14)) msg.HIS = (NSWProvider)Enum.ToObject(typeof(NSWProvider), reader.GetByte(14));
if (!reader.IsDBNull(15)) msg.created = reader.GetDateTime(15);
if (!reader.IsDBNull(16)) msg.CreatedBy = reader.GetString(16);
if (!reader.IsDBNull(17)) msg.ChangedBy = reader.GetString(17);
if (!reader.IsDBNull(18)) msg.changed = reader.GetDateTime(18);
if (!reader.IsDBNull(19)) msg.StatusInfo = reader.GetString(19);
if (!reader.IsDBNull(20)) msg.SendSuccess = reader.GetBoolean(20);
if (!reader.IsDBNull(21)) msg.SentBy = reader.GetString(21);
result.Add(msg);
}
reader.Close();

View File

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

View File

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

View File

@ -92,6 +92,20 @@ namespace bsmd.hisnord
DBManager.Instance.Save(refMessage);
}
}
else
{
if (systemError.Meldetype.Equals("REQUEST_ID"))
{
// Request gescheitert
Message refMessage = DBManager.Instance.GetMessage(aCore, aCore.IsTransit ? Message.NotificationClass.TRANSIT : Message.NotificationClass.VISIT);
if (refMessage != null)
{
refMessage.InternalStatus = Message.BSMDStatus.SEND_FAILED;
systemError.MessageHeaderId = refMessage.Id;
DBManager.Instance.Save(refMessage);
}
}
}
_log.WarnFormat("SystemError received for Core [{0}], IMO {1} ETA {2}: {3} Class {4}", aCore.Id, aCore.IMO, aCore.ETADisplay, systemError.ErrorMessage, Enum.GetName(typeof(Message.NotificationClass), notificationClass));
@ -145,6 +159,13 @@ namespace bsmd.hisnord
nswResponse.Status,
(core.Cancelled ?? false) ? "YES" : "NO"
);
if((nswResponse.Status == "ACCEPTED") && ((core.Cancelled == false) == true))
{
core.BSMDStatusInternal = MessageCore.BSMDStatus.RESPONDED;
_log.InfoFormat("Core cancel confirmed for {0}", core.DisplayId);
}
if ((nswResponse.Status == "REJECTED") && ((core.Cancelled ?? false) == true))
{
core.Cancelled = false; // CANCEL fehlgeschlagen

View File

@ -0,0 +1,28 @@
namespace bsmd.status.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
public sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

Binary file not shown.