added special Excel import case for BRV/BRE, NSW by BSMD in INFO class
This commit is contained in:
parent
0d0cbe1949
commit
cb1ff8a533
@ -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>7</ApplicationRevision>
|
<ApplicationRevision>8</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.2.7</ApplicationVersion>
|
<ApplicationVersion>7.2.2.8</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@ -83,7 +83,7 @@ namespace ENI2.Excel
|
|||||||
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
||||||
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
||||||
{ if (ScanINFO(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanINFO(message, messageCore, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
||||||
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
||||||
@ -1117,7 +1117,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#region INFO
|
#region INFO
|
||||||
|
|
||||||
private static bool ScanINFO(Message infoMessage, ExcelReader reader)
|
private static bool ScanINFO(Message infoMessage, MessageCore core, ExcelReader reader)
|
||||||
{
|
{
|
||||||
if (infoMessage.Elements.Count == 0)
|
if (infoMessage.Elements.Count == 0)
|
||||||
{
|
{
|
||||||
@ -1142,7 +1142,26 @@ namespace ENI2.Excel
|
|||||||
if (!portArea.IsNullOrEmpty() && DBManager.Instance.GetPortAreaDict().ContainsKey(portArea))
|
if (!portArea.IsNullOrEmpty() && DBManager.Instance.GetPortAreaDict().ContainsKey(portArea))
|
||||||
info.PortArea = portArea;
|
info.PortArea = portArea;
|
||||||
else
|
else
|
||||||
info.PortArea = "";
|
info.PortArea = "";
|
||||||
|
|
||||||
|
// März 2024: Spezialfall für Abrechnungsabteilung Bremenports: Feld wird markiert (falls genügend Platz)
|
||||||
|
// falls das Schiff nach DEBRE oder DEBHV geht:
|
||||||
|
|
||||||
|
if (core.PoC.Equals("DEBRE") || core.PoC.Equals("DEBRV"))
|
||||||
|
{
|
||||||
|
if (info.SpecialRequirementsOfShipAtBerth == null)
|
||||||
|
{
|
||||||
|
info.SpecialRequirementsOfShipAtBerth = "NSW by BSMD";
|
||||||
|
}
|
||||||
|
else if (info.SpecialRequirementsOfShipAtBerth.Length <= 241) // we have enough space
|
||||||
|
{
|
||||||
|
if (info.SpecialRequirementsOfShipAtBerth.Length > 0) // if there is text already add a separator
|
||||||
|
{
|
||||||
|
info.SpecialRequirementsOfShipAtBerth += " | ";
|
||||||
|
}
|
||||||
|
info.SpecialRequirementsOfShipAtBerth += "NSW by BSMD";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,7 +93,7 @@ namespace ENI2.Excel
|
|||||||
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && notificationClasses.Contains(Message.NotificationClass.HAZD))
|
||||||
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanHAZD(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
if ((message.MessageNotificationClass == Message.NotificationClass.INFO) && notificationClasses.Contains(Message.NotificationClass.INFO))
|
||||||
{ if (ScanINFO(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanINFO(message, messageCore, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
if ((message.MessageNotificationClass == Message.NotificationClass.LADG) && notificationClasses.Contains(Message.NotificationClass.LADG))
|
||||||
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
{ if (ScanLADG(message, reader)) ExcelReader.SaveMessage(message); continue; }
|
||||||
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
if ((message.MessageNotificationClass == Message.NotificationClass.MDH) && notificationClasses.Contains(Message.NotificationClass.MDH))
|
||||||
@ -943,7 +943,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
#region INFO
|
#region INFO
|
||||||
|
|
||||||
private static bool ScanINFO(Message infoMessage, ExcelReader reader)
|
private static bool ScanINFO(Message infoMessage, MessageCore core, ExcelReader reader)
|
||||||
{
|
{
|
||||||
if (infoMessage.Elements.Count == 0)
|
if (infoMessage.Elements.Count == 0)
|
||||||
{
|
{
|
||||||
@ -970,6 +970,25 @@ namespace ENI2.Excel
|
|||||||
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
|
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
|
||||||
info.FumigatedBulkCargo = (byte)((fumigatedBulkCargo ?? false) ? 1 : 0);
|
info.FumigatedBulkCargo = (byte)((fumigatedBulkCargo ?? false) ? 1 : 0);
|
||||||
|
|
||||||
|
// März 2024: Spezialfall für Abrechnungsabteilung Bremenports: Feld wird markiert (falls genügend Platz)
|
||||||
|
// falls das Schiff nach DEBRE oder DEBHV geht:
|
||||||
|
|
||||||
|
if(core.PoC.Equals("DEBRE") || core.PoC.Equals("DEBRV"))
|
||||||
|
{
|
||||||
|
if(info.SpecialRequirementsOfShipAtBerth == null)
|
||||||
|
{
|
||||||
|
info.SpecialRequirementsOfShipAtBerth = "NSW by BSMD";
|
||||||
|
}
|
||||||
|
else if(info.SpecialRequirementsOfShipAtBerth.Length <= 241) // we have enough space
|
||||||
|
{
|
||||||
|
if(info.SpecialRequirementsOfShipAtBerth.Length > 0) // if there is text already add a separator
|
||||||
|
{
|
||||||
|
info.SpecialRequirementsOfShipAtBerth += " | ";
|
||||||
|
}
|
||||||
|
info.SpecialRequirementsOfShipAtBerth += "NSW by BSMD";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user