Korrekturen, Version 2.4.6
This commit is contained in:
parent
f41d6171f9
commit
7506fb74b7
Binary file not shown.
10
nsw/Source/SQL/Update_2.0_To_2.4.sql
Normal file
10
nsw/Source/SQL/Update_2.0_To_2.4.sql
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
PRINT N'Updating MessageCore..';
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[MessageCore] ADD [DefaultReportingPartyId] UNIQUEIDENTIFIER NULL;
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[HAZA] ADD [TransmissionType] NVARCHAR (50) NULL;
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[HAZD] ADD [TransmissionType] NVARCHAR (50) NULL;
|
||||||
|
GO
|
||||||
@ -110,6 +110,8 @@ namespace SendNSWMessageService
|
|||||||
_log.Debug("Visit/Transit not found, SENDING VISIT/TRANSIT message");
|
_log.Debug("Visit/Transit not found, SENDING VISIT/TRANSIT message");
|
||||||
if (message.HIS == Message.NSWProvider.UNDEFINED)
|
if (message.HIS == Message.NSWProvider.UNDEFINED)
|
||||||
message.HIS = core.InitialHIS;
|
message.HIS = core.InitialHIS;
|
||||||
|
if (core.DefaultReportingPartyId.HasValue)
|
||||||
|
message.ReportingPartyId = core.DefaultReportingPartyId;
|
||||||
toSendMessageList.Add(message);
|
toSendMessageList.Add(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,6 +161,7 @@ namespace SendNSWMessageService
|
|||||||
if (haz != null)
|
if (haz != null)
|
||||||
{
|
{
|
||||||
if (haz.NoDPGOnBoardOnArrival ?? false) continue;
|
if (haz.NoDPGOnBoardOnArrival ?? false) continue;
|
||||||
|
if (haz.TransmissionType != "EU-NOAD") continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,6 +184,8 @@ namespace SendNSWMessageService
|
|||||||
{
|
{
|
||||||
if (message.HIS == Message.NSWProvider.UNDEFINED)
|
if (message.HIS == Message.NSWProvider.UNDEFINED)
|
||||||
message.HIS = core.InitialHIS;
|
message.HIS = core.InitialHIS;
|
||||||
|
if (core.DefaultReportingPartyId.HasValue)
|
||||||
|
message.ReportingPartyId = core.DefaultReportingPartyId;
|
||||||
|
|
||||||
toSendMessageList.Add(message);
|
toSendMessageList.Add(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,7 @@ namespace bsmd.database
|
|||||||
private List<IGCPosition> igcPositions = new List<IGCPosition>();
|
private List<IGCPosition> igcPositions = new List<IGCPosition>();
|
||||||
private List<IMSBCPosition> imsbcPositions = new List<IMSBCPosition>();
|
private List<IMSBCPosition> imsbcPositions = new List<IMSBCPosition>();
|
||||||
private List<MARPOL_Annex_I_Position> marpolPositions = new List<MARPOL_Annex_I_Position>();
|
private List<MARPOL_Annex_I_Position> marpolPositions = new List<MARPOL_Annex_I_Position>();
|
||||||
|
private bool _isDeparture;
|
||||||
|
|
||||||
public HAZ()
|
public HAZ()
|
||||||
{
|
{
|
||||||
@ -66,8 +67,21 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public List<MARPOL_Annex_I_Position> MARPOLPositions { get { return this.marpolPositions; } }
|
public List<MARPOL_Annex_I_Position> MARPOLPositions { get { return this.marpolPositions; } }
|
||||||
|
|
||||||
|
// selektor HAZA / HAZD
|
||||||
[ShowReport]
|
[ShowReport]
|
||||||
public bool IsDeparture { get; set; } // selektor HAZA / HAZD
|
public bool IsDeparture { get { return this._isDeparture; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._isDeparture = value;
|
||||||
|
this.tablename = this._isDeparture ? "[dbo].[HAZD]" : "[dbo].[HAZA]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// No NSW field! Set to determine whether HAZ info should be reported to the NSW
|
||||||
|
/// </summary>
|
||||||
|
[ShowReport]
|
||||||
|
public string TransmissionType { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -86,21 +100,40 @@ namespace bsmd.database
|
|||||||
scmd.Parameters.AddWithNullableValue("@P7", this.DPGClassificationIBC);
|
scmd.Parameters.AddWithNullableValue("@P7", this.DPGClassificationIBC);
|
||||||
scmd.Parameters.AddWithNullableValue("@P8", this.DPGClassificationIMSBC);
|
scmd.Parameters.AddWithNullableValue("@P8", this.DPGClassificationIMSBC);
|
||||||
scmd.Parameters.AddWithNullableValue("@P9", this.DPGClassificationMARPOL_ANNEX_I);
|
scmd.Parameters.AddWithNullableValue("@P9", this.DPGClassificationMARPOL_ANNEX_I);
|
||||||
|
scmd.Parameters.AddWithNullableValue("@P10", this.TransmissionType);
|
||||||
|
|
||||||
if (this.IsNew)
|
if (this.IsNew)
|
||||||
{
|
{
|
||||||
this.CreateId();
|
this.CreateId();
|
||||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||||
|
if (IsDeparture)
|
||||||
|
{
|
||||||
|
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, NoDPGOnBoardOnDeparture, DPGManifestOnBoardOnDeparture, " +
|
||||||
|
"INFShipClass, DPGClassificationIMDG, DPGClassificationIGC, DPGClassificationIBC, DPGClassificationIMSBC, " +
|
||||||
|
"DPGClassificationMARPOL_ANNEX_I, TransmissionType) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)", this.Tablename);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, NoDPGOnBoardOnArrival, DPGManifestOnBoardOnArrival, " +
|
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, NoDPGOnBoardOnArrival, DPGManifestOnBoardOnArrival, " +
|
||||||
"INFShipClass, DPGClassificationIMDG, DPGClassificationIGC, DPGClassificationIBC, DPGClassificationIMSBC, " +
|
"INFShipClass, DPGClassificationIMDG, DPGClassificationIGC, DPGClassificationIBC, DPGClassificationIMSBC, " +
|
||||||
"DPGClassificationMARPOL_ANNEX_I) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9)", this.Tablename);
|
"DPGClassificationMARPOL_ANNEX_I, TransmissionType) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)", this.Tablename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||||
|
if (IsDeparture)
|
||||||
|
{
|
||||||
|
scmd.CommandText = string.Format("UPDATE {0} SET NODPGOnBoardOnDeparture = @P2, DPGManifestOnBoardOnDeparture = @P3, " +
|
||||||
|
"INFShipClass = @P4, DPGClassificationIMDG = @P5, DPGClassificationIGC = @P6, DPGClassificationIBC = @P7, " +
|
||||||
|
"DPGClassificationIMSBC = @P8, DPGClassificationMARPOL_ANNEX_I = @P9, TransmissionType = @P10 WHERE Id = @ID", this.Tablename);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
scmd.CommandText = string.Format("UPDATE {0} SET NODPGOnBoardOnArrival = @P2, DPGManifestOnBoardOnArrival = @P3, " +
|
scmd.CommandText = string.Format("UPDATE {0} SET NODPGOnBoardOnArrival = @P2, DPGManifestOnBoardOnArrival = @P3, " +
|
||||||
"INFShipClass = @P4, DPGClassificationIMDG = @P5, DPGClassificationIGC = @P6, DPGClassificationIBC = @P7, " +
|
"INFShipClass = @P4, DPGClassificationIMDG = @P5, DPGClassificationIGC = @P6, DPGClassificationIBC = @P7, " +
|
||||||
"DPGClassificationIMSBC = @P8, DPGClassificationMARPOL_ANNEX_I = @P9 WHERE Id = @ID", this.Tablename);
|
"DPGClassificationIMSBC = @P8, DPGClassificationMARPOL_ANNEX_I = @P9, TransmissionType = @P10 WHERE Id = @ID", this.Tablename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +141,14 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
string query = string.Format("SELECT Id, NoDPGOnBoardOnArrival, DPGManifestOnBoardOnArrival, INFShipClass, " +
|
string query = string.Format("SELECT Id, NoDPGOnBoardOnArrival, DPGManifestOnBoardOnArrival, INFShipClass, " +
|
||||||
"DPGClassificationIMDG, DPGClassificationIGC, DPGClassificationIBC, DPGClassificationIMSBC, " +
|
"DPGClassificationIMDG, DPGClassificationIGC, DPGClassificationIBC, DPGClassificationIMSBC, " +
|
||||||
"DPGClassificationMARPOL_ANNEX_I FROM {0} ", this.Tablename);
|
"DPGClassificationMARPOL_ANNEX_I, TransmissionType FROM {0} ", this.Tablename);
|
||||||
|
|
||||||
|
if (this.IsDeparture)
|
||||||
|
{
|
||||||
|
query = string.Format("SELECT Id, NoDPGOnBoardOnDeparture, DPGManifestOnBoardOnDeparture, INFShipClass, " +
|
||||||
|
"DPGClassificationIMDG, DPGClassificationIGC, DPGClassificationIBC, DPGClassificationIMSBC, " +
|
||||||
|
"DPGClassificationMARPOL_ANNEX_I, TransmissionType FROM {0} ", this.Tablename);
|
||||||
|
}
|
||||||
|
|
||||||
switch (filter)
|
switch (filter)
|
||||||
{
|
{
|
||||||
@ -142,6 +182,7 @@ namespace bsmd.database
|
|||||||
if (!reader.IsDBNull(6)) haz.DPGClassificationIBC = reader.GetBoolean(6);
|
if (!reader.IsDBNull(6)) haz.DPGClassificationIBC = reader.GetBoolean(6);
|
||||||
if (!reader.IsDBNull(7)) haz.DPGClassificationIMSBC = reader.GetBoolean(7);
|
if (!reader.IsDBNull(7)) haz.DPGClassificationIMSBC = reader.GetBoolean(7);
|
||||||
if (!reader.IsDBNull(8)) haz.DPGClassificationMARPOL_ANNEX_I = reader.GetBoolean(8);
|
if (!reader.IsDBNull(8)) haz.DPGClassificationMARPOL_ANNEX_I = reader.GetBoolean(8);
|
||||||
|
if (!reader.IsDBNull(9)) haz.TransmissionType = reader.GetString(9);
|
||||||
|
|
||||||
result.Add(haz);
|
result.Add(haz);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -138,14 +138,14 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||||
{
|
{
|
||||||
bool locationOK = (!this.PortFacilityPortLoCode.IsNullOrEmpty()) ||
|
bool locationInsufficient = (this.PortFacilityPortLoCode.IsNullOrEmpty()) &&
|
||||||
(!this.PortFacilityPortName.IsNullOrEmpty() && !this.PortFacilityPortCountry.IsNullOrEmpty());
|
(this.PortFacilityPortName.IsNullOrEmpty() || this.PortFacilityPortCountry.IsNullOrEmpty());
|
||||||
|
|
||||||
if (!locationOK)
|
if (locationInsufficient)
|
||||||
{
|
{
|
||||||
string val = string.Format("LoCode:{0} Port:{1} Country:{2}", this.PortFacilityPortLoCode ?? "", this.PortFacilityPortName ?? "",
|
string val = string.Format("LoCode:{0} Port:{1} Country:{2}", this.PortFacilityPortLoCode ?? "", this.PortFacilityPortName ?? "",
|
||||||
this.PortFacilityPortCountry ?? "");
|
this.PortFacilityPortCountry ?? "");
|
||||||
RuleEngine.CreateViolation(ValidationCode.V703, "Either LoCode or Country + Name must be given", val);
|
RuleEngine.CreateViolation(ValidationCode.V703, "Last 10 Port facilities: Either LoCode or Country + Name must be given", val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -270,10 +270,10 @@ namespace bsmd.database
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((this.NonAccidentalDeathsDuringVoyage ?? false) && ((this.NonAccidentalDeathsDuringVoyageCount ?? 0) == 0))
|
if ((this.NonAccidentalDeathsDuringVoyage ?? false) && ((this.NonAccidentalDeathsDuringVoyageCount ?? 0) == 0))
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V761, "NonAccidentalDeathsDuringVoyageCount missing", null));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.V761, "NonAccidentalDeathsDuringVoyageCount missing", null));
|
||||||
|
|
||||||
if((this.NumberOfIllPersonsHigherThanExpected ?? false) && ((this.NumberOfIllPersons ?? 0) == 0))
|
if ((this.NumberOfIllPersonsHigherThanExpected ?? false) && ((this.NumberOfIllPersons ?? 0) == 0))
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V762, "Number of ill persons missing", null));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.V762, "Number of ill persons missing", null));
|
||||||
|
|
||||||
if ((this.SanitaryMeasuresApplied ?? false) && (
|
if ((this.SanitaryMeasuresApplied ?? false) && (
|
||||||
@ -293,6 +293,9 @@ namespace bsmd.database
|
|||||||
(!this.InfectedAreaDate.HasValue || this.InfectedAreaPort.IsNullOrEmpty()))
|
(!this.InfectedAreaDate.HasValue || this.InfectedAreaPort.IsNullOrEmpty()))
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V766, "Infected area date or port missing", null));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.V766, "Infected area date or port missing", null));
|
||||||
|
|
||||||
|
if (this.portOfCallLast30Days.Count == 0)
|
||||||
|
{
|
||||||
|
errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, "Port of Call last 30 day list is EMPTY", null));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (PortOfCallLast30Days poc30d in this.portOfCallLast30Days)
|
foreach (PortOfCallLast30Days poc30d in this.portOfCallLast30Days)
|
||||||
@ -301,6 +304,7 @@ namespace bsmd.database
|
|||||||
poc30d.Validate(errors, violations);
|
poc30d.Validate(errors, violations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -212,6 +212,11 @@ namespace bsmd.database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public List<MessageViolation> ViolationList { get { return this.violationList; } }
|
public List<MessageViolation> ViolationList { get { return this.violationList; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property to overwrite reporting party in certain circumstances (other melder meldet)
|
||||||
|
/// </summary>
|
||||||
|
public Guid? ReportingPartyId { get { return this.reportingPartyId; } set { this.reportingPartyId = value; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDatabaseEntity implementation
|
#region IDatabaseEntity implementation
|
||||||
|
|||||||
@ -99,6 +99,8 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public string SietasSheetVersion { get; set; }
|
public string SietasSheetVersion { get; set; }
|
||||||
|
|
||||||
|
public Guid? DefaultReportingPartyId { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region DatabaseEntity implementation
|
#region DatabaseEntity implementation
|
||||||
@ -142,6 +144,7 @@ namespace bsmd.database
|
|||||||
scmd.Parameters.AddWithValue("@P22", this.ReportStatus);
|
scmd.Parameters.AddWithValue("@P22", this.ReportStatus);
|
||||||
scmd.Parameters.AddWithNullableValue("@P23", this.SietasSheetVersion);
|
scmd.Parameters.AddWithNullableValue("@P23", this.SietasSheetVersion);
|
||||||
scmd.Parameters.AddWithValue("@P24", this.Incoming ? 1 : 0);
|
scmd.Parameters.AddWithValue("@P24", this.Incoming ? 1 : 0);
|
||||||
|
scmd.Parameters.AddWithNullableValue("@P25", this.DefaultReportingPartyId);
|
||||||
|
|
||||||
if (this.IsNew)
|
if (this.IsNew)
|
||||||
{
|
{
|
||||||
@ -150,9 +153,9 @@ namespace bsmd.database
|
|||||||
string query = string.Format("INSERT INTO {0} (Id, VisitId, TransitId, IMO, ENI, PoC, Portname, ETA, CustomerId, " +
|
string query = string.Format("INSERT INTO {0} (Id, VisitId, TransitId, IMO, ENI, PoC, Portname, ETA, CustomerId, " +
|
||||||
"Previous, Next, IsTransit, Wetris_zz_56_datensatz_id, BSMDStatus, InitialHIS, HerbergFormGuid, " +
|
"Previous, Next, IsTransit, Wetris_zz_56_datensatz_id, BSMDStatus, InitialHIS, HerbergFormGuid, " +
|
||||||
"HerbergFormTemplateGuid, HerbergReportType, HerbergEmailcontactReportingVessel, HerbergEmail24HrsContact, " +
|
"HerbergFormTemplateGuid, HerbergReportType, HerbergEmailcontactReportingVessel, HerbergEmail24HrsContact, " +
|
||||||
"ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming) VALUES " +
|
"ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming, DefaultReportingPartyId) VALUES " +
|
||||||
"(@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, " +
|
"(@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, " +
|
||||||
"@P18, @P19, @P20, @P21, @P22, @P23, @P24)",
|
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25)",
|
||||||
this.Tablename);
|
this.Tablename);
|
||||||
scmd.CommandText = query;
|
scmd.CommandText = query;
|
||||||
}
|
}
|
||||||
@ -164,7 +167,7 @@ namespace bsmd.database
|
|||||||
"Wetris_zz_56_datensatz_id = @P12, BSMDStatus = @P13, InitialHIS = @P14, HerbergFormGuid = @P15, " +
|
"Wetris_zz_56_datensatz_id = @P12, BSMDStatus = @P13, InitialHIS = @P14, HerbergFormGuid = @P15, " +
|
||||||
"HerbergFormTemplateGuid = @P16, HerbergReportType = @P17, HerbergEmailContactReportingVessel = @P18, " +
|
"HerbergFormTemplateGuid = @P16, HerbergReportType = @P17, HerbergEmailContactReportingVessel = @P18, " +
|
||||||
"HerbergEmail24HrsContact = @P19, ETAKielCanal = @P20, HerbergRevDate = @P21, ReportStatus = @P22, " +
|
"HerbergEmail24HrsContact = @P19, ETAKielCanal = @P20, HerbergRevDate = @P21, ReportStatus = @P22, " +
|
||||||
"SietasSheetVersion = @P23, Incoming = @P24 WHERE Id = @ID", this.Tablename);
|
"SietasSheetVersion = @P23, Incoming = @P24, DefaultReportingPartyId = @P25 WHERE Id = @ID", this.Tablename);
|
||||||
scmd.CommandText = query;
|
scmd.CommandText = query;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,7 +177,8 @@ namespace bsmd.database
|
|||||||
string query = string.Format("SELECT Id, VisitId, TransitId, IMO, ENI, PoC, Portname, " +
|
string query = string.Format("SELECT Id, VisitId, TransitId, IMO, ENI, PoC, Portname, " +
|
||||||
"ETA, CustomerId, Previous, Next, IsTransit, Wetris_zz_56_datensatz_id, BSMDStatus, InitialHIS, " +
|
"ETA, CustomerId, Previous, Next, IsTransit, Wetris_zz_56_datensatz_id, BSMDStatus, InitialHIS, " +
|
||||||
"HerbergFormGuid, HerbergFormTemplateGuid, HerbergReportType, HerbergEmailContactReportingVessel, " +
|
"HerbergFormGuid, HerbergFormTemplateGuid, HerbergReportType, HerbergEmailContactReportingVessel, " +
|
||||||
"HerbergEmail24HrsContact, ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming FROM {0} ",
|
"HerbergEmail24HrsContact, ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming, " +
|
||||||
|
"DefaultReportingPartyId FROM {0} ",
|
||||||
this.Tablename);
|
this.Tablename);
|
||||||
|
|
||||||
switch (filter)
|
switch (filter)
|
||||||
@ -256,6 +260,7 @@ namespace bsmd.database
|
|||||||
if (!reader.IsDBNull(22)) core.ReportStatus = (ReportStatusEnum) Enum.ToObject(typeof(ReportStatusEnum), reader.GetByte(22));
|
if (!reader.IsDBNull(22)) core.ReportStatus = (ReportStatusEnum) Enum.ToObject(typeof(ReportStatusEnum), reader.GetByte(22));
|
||||||
if (!reader.IsDBNull(23)) core.SietasSheetVersion = reader.GetString(23);
|
if (!reader.IsDBNull(23)) core.SietasSheetVersion = reader.GetString(23);
|
||||||
if (!reader.IsDBNull(24)) core.Incoming = reader.GetBoolean(24);
|
if (!reader.IsDBNull(24)) core.Incoming = reader.GetBoolean(24);
|
||||||
|
if (!reader.IsDBNull(25)) core.DefaultReportingPartyId = reader.GetGuid(25);
|
||||||
|
|
||||||
result.Add(core);
|
result.Add(core);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||||
[assembly: AssemblyInformationalVersion("2.4.3")]
|
[assembly: AssemblyInformationalVersion("2.4.6")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")]
|
[assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
@ -4,6 +4,6 @@
|
|||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.4.3.*")]
|
[assembly: AssemblyVersion("2.4.6.*")]
|
||||||
// wenn das nicht auskommentiert wird erhalten wir eine Warnung
|
// wenn das nicht auskommentiert wird erhalten wir eine Warnung
|
||||||
// [assembly: AssemblyFileVersion("1.0.0.*")]
|
// [assembly: AssemblyFileVersion("1.0.0.*")]
|
||||||
|
|||||||
@ -139,14 +139,13 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
|
|
||||||
// check violation 701
|
// check violation 701
|
||||||
|
bool locationInsufficient = (this.ShipToShipActivityLocationLoCode.IsNullOrEmpty()) &&
|
||||||
|
(!this.ShipToShipActivityLocationCoordinatesLatitude.HasValue || !this.ShipToShipActivityLocationCoordinatesLongitude.HasValue);
|
||||||
|
|
||||||
bool locationOK = !this.ShipToShipActivityLocationName.IsNullOrEmpty() ||
|
if (locationInsufficient)
|
||||||
!this.ShipToShipActivityLocationLoCode.IsNullOrEmpty() ||
|
{
|
||||||
(this.ShipToShipActivityLocationCoordinatesLatitude.HasValue &&
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.V701, "Ship To Ship: Either LoCode or Coordinates must be given", null));
|
||||||
this.ShipToShipActivityLocationCoordinatesLongitude.HasValue);
|
}
|
||||||
|
|
||||||
if (!locationOK)
|
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V701, "Either LoCode, Name or Coordinates must be given", null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -570,6 +570,8 @@ namespace bsmd.dbh
|
|||||||
rootInfo.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip;
|
rootInfo.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip;
|
||||||
if (info.FumigatedBulkCargo.HasValue)
|
if (info.FumigatedBulkCargo.HasValue)
|
||||||
rootInfo.FumigatedBulkCargo = (info.FumigatedBulkCargo.Value == 0) ? RootINFOFumigatedBulkCargo.Y : RootINFOFumigatedBulkCargo.N;
|
rootInfo.FumigatedBulkCargo = (info.FumigatedBulkCargo.Value == 0) ? RootINFOFumigatedBulkCargo.Y : RootINFOFumigatedBulkCargo.N;
|
||||||
|
else
|
||||||
|
rootInfo.FumigatedBulkCargo = RootINFOFumigatedBulkCargo.N;
|
||||||
rootInfo.DeadWeightSummer_TNESpecified = info.DeplacementSummerDraught_TNE.HasValue;
|
rootInfo.DeadWeightSummer_TNESpecified = info.DeplacementSummerDraught_TNE.HasValue;
|
||||||
if (info.DeplacementSummerDraught_TNE.HasValue)
|
if (info.DeplacementSummerDraught_TNE.HasValue)
|
||||||
rootInfo.DeadWeightSummer_TNE = (float) info.DeplacementSummerDraught_TNE.Value;
|
rootInfo.DeadWeightSummer_TNE = (float) info.DeplacementSummerDraught_TNE.Value;
|
||||||
|
|||||||
@ -32,6 +32,7 @@ namespace bsmd.herberg.FormService
|
|||||||
if (repDict[key].Name.Equals("BSMD"))
|
if (repDict[key].Name.Equals("BSMD"))
|
||||||
{
|
{
|
||||||
bsmdParty = repDict[key];
|
bsmdParty = repDict[key];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,7 +153,10 @@ namespace bsmd.herberg.FormService
|
|||||||
|
|
||||||
List<DatabaseEntity> saveMessages = new List<DatabaseEntity>(); // 1:n messages
|
List<DatabaseEntity> saveMessages = new List<DatabaseEntity>(); // 1:n messages
|
||||||
|
|
||||||
foreach (string groupMessageType in groupedVals.Keys)
|
List<string> groupedValsKeyList = new List<string>(groupedVals.Keys);
|
||||||
|
groupedValsKeyList.Sort(); // "AGENT" now at the beginning!
|
||||||
|
|
||||||
|
foreach (string groupMessageType in groupedValsKeyList)
|
||||||
{
|
{
|
||||||
string messageType = groupMessageType;
|
string messageType = groupMessageType;
|
||||||
|
|
||||||
@ -803,14 +807,19 @@ namespace bsmd.herberg.FormService
|
|||||||
info.SpecialRequirementsOfShipAtBerth = aMessageCore.Customer.Name;
|
info.SpecialRequirementsOfShipAtBerth = aMessageCore.Customer.Name;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((aMessageCore.Customer != null) && (aMessageCore.Customer.Name != null))
|
if((aMessageCore.Customer != null) && (aMessageCore.Customer.Name != null) && !info.SpecialRequirementsOfShipAtBerth.Contains("- Agent: "))
|
||||||
info.SpecialRequirementsOfShipAtBerth = string.Format("{0} - Agent: {1}", info.SpecialRequirementsOfShipAtBerth, aMessageCore.Customer.Name);
|
info.SpecialRequirementsOfShipAtBerth = string.Format("{0} - Agent: {1}", info.SpecialRequirementsOfShipAtBerth, aMessageCore.Customer.Name);
|
||||||
}
|
}
|
||||||
if (vDict.ContainsKey("ConstructionCharacteristicsOfShip")) info.ConstructionCharacteristicsOfShip = vDict["ConstructionCharacteristicsOfShip"];
|
if (vDict.ContainsKey("ConstructionCharacteristicsOfShip")) info.ConstructionCharacteristicsOfShip = vDict["ConstructionCharacteristicsOfShip"];
|
||||||
if (vDict.ContainsKey("FumigatedBulkCargo") && !vDict["FumigatedBulkCargo"].IsNullOrEmpty())
|
if (vDict.ContainsKey("FumigatedBulkCargo") && !vDict["FumigatedBulkCargo"].IsNullOrEmpty())
|
||||||
|
{
|
||||||
info.FumigatedBulkCargo = (byte)Enum.Parse(typeof(Enums.FumigatedBulkCargo), vDict["FumigatedBulkCargo"]);
|
info.FumigatedBulkCargo = (byte)Enum.Parse(typeof(Enums.FumigatedBulkCargo), vDict["FumigatedBulkCargo"]);
|
||||||
|
_log.DebugFormat("FumigatedBulkCargo {0} parsed to {1}", vDict["FumigatedBulkCargo"], info.FumigatedBulkCargo);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
info.FumigatedBulkCargo = (byte) Enums.FumigatedBulkCargo.N;
|
{
|
||||||
|
info.FumigatedBulkCargo = (byte)Enums.FumigatedBulkCargo.N;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
@ -1135,6 +1144,8 @@ namespace bsmd.herberg.FormService
|
|||||||
if (poc.PortFacilityGISISCode.IsNullOrEmpty())
|
if (poc.PortFacilityGISISCode.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
poc.PortFacilityGISISCode = "0000";
|
poc.PortFacilityGISISCode = "0000";
|
||||||
|
if (poc.PortFacilitySecurityMattersToReport.IsNullOrEmpty()) poc.PortFacilitySecurityMattersToReport = string.Format("Remark: GISIS-Code not reported");
|
||||||
|
else poc.PortFacilitySecurityMattersToReport = string.Format("{0} - Remark: GISIS-Code not reported", poc.PortFacilitySecurityMattersToReport);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Regex rgx = new Regex("[0-9]{4}");
|
Regex rgx = new Regex("[0-9]{4}");
|
||||||
@ -1142,6 +1153,8 @@ namespace bsmd.herberg.FormService
|
|||||||
{
|
{
|
||||||
_log.WarnFormat("PortFacilityGISISCode invalid: {0}, replacing with 0000", poc.PortFacilityGISISCode);
|
_log.WarnFormat("PortFacilityGISISCode invalid: {0}, replacing with 0000", poc.PortFacilityGISISCode);
|
||||||
poc.PortFacilityGISISCode = "0000";
|
poc.PortFacilityGISISCode = "0000";
|
||||||
|
if (poc.PortFacilitySecurityMattersToReport.IsNullOrEmpty()) poc.PortFacilitySecurityMattersToReport = string.Format("Remark: Reported GISIS-Code: {0}", sDict["PortFacilityGISISCode"] ?? "");
|
||||||
|
else poc.PortFacilitySecurityMattersToReport = string.Format("{0} - Remark: Reported GISIS-Code: {1}", poc.PortFacilitySecurityMattersToReport, sDict["PortFacilityGISISCode"] ?? "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1348,6 +1361,7 @@ namespace bsmd.herberg.FormService
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (vDict.ContainsKey("TransmissionType")) haz.TransmissionType = vDict["TransmissionType"];
|
||||||
if (vDict.ContainsKey("NoDPGOnBoard")) haz.NoDPGOnBoardOnArrival = vDict["NoDPGOnBoard"].Equals("Y");
|
if (vDict.ContainsKey("NoDPGOnBoard")) haz.NoDPGOnBoardOnArrival = vDict["NoDPGOnBoard"].Equals("Y");
|
||||||
if (vDict.ContainsKey("DPGManifestOnBoard")) haz.DPGManifestOnBoardOnArrival = vDict["DPGManifestOnBoard"].Equals("Y");
|
if (vDict.ContainsKey("DPGManifestOnBoard")) haz.DPGManifestOnBoardOnArrival = vDict["DPGManifestOnBoard"].Equals("Y");
|
||||||
if (vDict.ContainsKey("INFShipClass")) haz.INFShipClass = (byte)Enum.Parse(typeof(Enums.INFShipClass), vDict["INFShipClass"], true);
|
if (vDict.ContainsKey("INFShipClass")) haz.INFShipClass = (byte)Enum.Parse(typeof(Enums.INFShipClass), vDict["INFShipClass"], true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user