3.3.11: Korrekturen für gemeldete Fehler, neues Formblatt, etc pp
This commit is contained in:
parent
dc0a79bd1d
commit
9719252300
Binary file not shown.
BIN
nsw/BSMD-Formblatt.xlsx
Normal file
BIN
nsw/BSMD-Formblatt.xlsx
Normal file
Binary file not shown.
Binary file not shown.
@ -276,6 +276,23 @@ namespace bsmd.ExcelReadService
|
||||
return result;
|
||||
}
|
||||
|
||||
internal byte? ReadPackingGroup(string lookup)
|
||||
{
|
||||
string val = this.ReadText(lookup);
|
||||
byte? result = null;
|
||||
|
||||
if(val!= null)
|
||||
{
|
||||
if (val == "I") result = 1;
|
||||
if (val == "II") result = 2;
|
||||
if (val == "III") result = 3;
|
||||
if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0;
|
||||
|
||||
this.Conf.ConfirmText(lookup, val, result.HasValue ? ReadState.OK : ReadState.WARN);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal byte? ReadConditionTanks(string lookup)
|
||||
{
|
||||
string val = this.ReadText(lookup);
|
||||
@ -457,10 +474,13 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
CultureInfo provider = CultureInfo.InvariantCulture;
|
||||
string dateString = val.ToString();
|
||||
string format = "HHmm";
|
||||
DateTime tmpDate;
|
||||
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out tmpDate))
|
||||
result = tmpDate;
|
||||
if (!dateString.Contains(":"))
|
||||
{
|
||||
string format = "HHmm";
|
||||
DateTime tmpDate;
|
||||
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out tmpDate))
|
||||
result = tmpDate;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -482,10 +502,13 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
CultureInfo provider = CultureInfo.InvariantCulture;
|
||||
string dateString = val.ToString();
|
||||
string format = "HHmm";
|
||||
DateTime tmpDate;
|
||||
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out tmpDate))
|
||||
result = tmpDate;
|
||||
if (!dateString.Contains(":"))
|
||||
{
|
||||
string format = "HHmm";
|
||||
DateTime tmpDate;
|
||||
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out tmpDate))
|
||||
result = tmpDate;
|
||||
}
|
||||
}
|
||||
|
||||
if (result != null)
|
||||
|
||||
@ -448,7 +448,7 @@ namespace bsmd.ExcelReadService
|
||||
reader.Conf.ConfirmText(imdg_properShippingName, imdgPosition.ProperShippingName, imdgPosition.ProperShippingName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
|
||||
imdgPosition.IMOClass = reader.ReadText(imdg_imoClass);
|
||||
reader.Conf.ConfirmText(imdg_imoClass, imdgPosition.IMOClass, imdgPosition.IMOClass.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
|
||||
imdgPosition.PackingGroup = (byte?) reader.ReadNumber(imdg_packingGroup);
|
||||
imdgPosition.PackingGroup = reader.ReadPackingGroup(imdg_packingGroup);
|
||||
imdgPosition.MarinePollutant = reader.ReadBoolean(imdg_marinePollutant);
|
||||
imdgPosition.Flashpoint_CEL = reader.ReadText(imdg_flashpoint);
|
||||
reader.Conf.ConfirmText(imdg_flashpoint, imdgPosition.Flashpoint_CEL, imdgPosition.Flashpoint_CEL.IsNullOrEmpty() ? ExcelReader.ReadState.NONE : ExcelReader.ReadState.OK);
|
||||
@ -724,7 +724,7 @@ namespace bsmd.ExcelReadService
|
||||
reader.Conf.ConfirmText(imdg_properShippingName, imdgPosition.ProperShippingName, imdgPosition.ProperShippingName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
|
||||
imdgPosition.IMOClass = reader.ReadText(imdg_imoClass);
|
||||
reader.Conf.ConfirmText(imdg_imoClass, imdgPosition.IMOClass, imdgPosition.IMOClass.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
|
||||
imdgPosition.PackingGroup = (byte?)reader.ReadNumber(imdg_packingGroup);
|
||||
imdgPosition.PackingGroup = reader.ReadPackingGroup(imdg_packingGroup);
|
||||
imdgPosition.MarinePollutant = reader.ReadBoolean(imdg_marinePollutant);
|
||||
imdgPosition.Flashpoint_CEL = reader.ReadText(imdg_flashpoint);
|
||||
reader.Conf.ConfirmText(imdg_flashpoint, imdgPosition.Flashpoint_CEL, imdgPosition.Flashpoint_CEL.IsNullOrEmpty() ? ExcelReader.ReadState.NONE : ExcelReader.ReadState.OK);
|
||||
@ -1214,11 +1214,13 @@ namespace bsmd.ExcelReadService
|
||||
{
|
||||
if (reader.Mode == ExcelReader.CountryMode.DE)
|
||||
{
|
||||
if ((i == 3) || (i == 8) || (i == 9)) waste.WasteDescription = "-";
|
||||
waste.WasteDescription = "-";
|
||||
}
|
||||
else
|
||||
else if (reader.Mode == ExcelReader.CountryMode.DK)
|
||||
{
|
||||
waste.WasteDescription = "-";
|
||||
if (i == 6) waste.WasteDescription = "Domestic wastes";
|
||||
if (i == 9) waste.WasteDescription = "Operational waste";
|
||||
}
|
||||
}
|
||||
reader.Conf.ConfirmText(wasteDescription, waste.WasteDescription, waste.WasteDescription.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
|
||||
@ -1230,9 +1232,21 @@ namespace bsmd.ExcelReadService
|
||||
if (waste.WasteDisposalPort.IsNullOrEmpty()) waste.WasteDisposalPort = "ZZUKN";
|
||||
reader.Conf.ConfirmText(wastePort, waste.WasteDisposalPort, waste.WasteDisposalPort.Equals("ZZUKN") ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
|
||||
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumberDefaultZero(amountGen);
|
||||
waste.WasteDisposedAtLastPort_MTQ = reader.ReadNumber(wasteDis);
|
||||
waste.WasteDisposedAtLastPort_MTQ = reader.ReadNumberDefaultZero(wasteDis);
|
||||
|
||||
}
|
||||
|
||||
if ((reader.Mode == ExcelReader.CountryMode.DE) &&
|
||||
((i == 6) || (i == 8) || (i == 9)))
|
||||
{
|
||||
waste.WasteDescription = "-";
|
||||
waste.WasteDisposalAmount_MTQ = 0;
|
||||
waste.WasteCapacity_MTQ = 0;
|
||||
waste.WasteAmountRetained_MTQ = 0;
|
||||
waste.WasteDisposalPort = "ZZUKN";
|
||||
waste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
@ -1504,6 +1518,7 @@ namespace bsmd.ExcelReadService
|
||||
string s2sLongitude = string.Format("SEC.ShipToShipActivityLocationCoordinatesLongitude_{0}", i);
|
||||
string s2sFromDate = string.Format("SEC.ShipToShipActivityDateFrom_{0}", i);
|
||||
string s2sToDate = string.Format("SEC.ShipToShipActivityDateTo_{0}", i);
|
||||
string s2sSec = string.Format("SEC.ShipToShipActivitySecurityMattersToReport_{0}", i);
|
||||
string s2sActivityString = string.Format("SEC.ShipToShipActivityType_{0}", i);
|
||||
|
||||
|
||||
@ -1536,6 +1551,8 @@ namespace bsmd.ExcelReadService
|
||||
s2sActivity.ShipToShipActivityDateTo = reader.ReadDate(s2sToDate);
|
||||
s2sActivity.ShipToShipActivityType = reader.ReadText(s2sActivityString);
|
||||
reader.Conf.ConfirmText(s2sActivityString, s2sActivity.ShipToShipActivityType, ExcelReader.ReadState.OK);
|
||||
s2sActivity.ShipToShipActivitySecurityMattersToReport = reader.ReadText(s2sSec);
|
||||
reader.Conf.ConfirmText(s2sSec, s2sActivity.ShipToShipActivitySecurityMattersToReport, s2sActivity.ShipToShipActivitySecurityMattersToReport.IsNullOrEmpty() ? ExcelReader.ReadState.NONE : ExcelReader.ReadState.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@ -2202,7 +2219,9 @@ namespace bsmd.ExcelReadService
|
||||
imo = reader.ReadText("Visit.IMONumber");
|
||||
reader.Conf.ConfirmText("Visit.IMONumber", imo, ExcelReader.ReadState.OK);
|
||||
eta = reader.ReadDateTime("NOA_NOD.ETADateToPortOfCall", "NOA_NOD.ETATimeToPortOfCall");
|
||||
}
|
||||
result.HerbergReportType = reader.ReadText("ReferenceNumber");
|
||||
reader.Conf.ConfirmText("ReferenceNumber", result.HerbergReportType, result.HerbergReportType.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
// lookup poc, imo, eta
|
||||
@ -2281,8 +2300,11 @@ namespace bsmd.ExcelReadService
|
||||
if(result != null)
|
||||
{
|
||||
_log.InfoFormat("Core [{3}] found for IMO {0}, ETA {1}, Poc {2}", imo, eta, poc, result.Id);
|
||||
}
|
||||
}
|
||||
|
||||
result.HerbergReportType = reader.ReadText("ReferenceNumber");
|
||||
reader.Conf.ConfirmText("ReferenceNumber", result.HerbergReportType, result.HerbergReportType.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
|
||||
}
|
||||
}
|
||||
|
||||
reader.Conf.ConfirmText("Visit.PortOfCall", poc, ExcelReader.ReadState.OK);
|
||||
reader.Conf.ConfirmText("Visit.PortOfCall_DK", poc, ExcelReader.ReadState.OK);
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.3.10")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyInformationalVersion("3.3.11")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.3.10.*")]
|
||||
[assembly: AssemblyVersion("3.3.11.*")]
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ namespace bsmd.database
|
||||
"CurrentShipSecurityLevel, PortFacilityOfArrival, GeneralDescriptionOfCargo, CSOFax, MatterToReport, " +
|
||||
"KielCanalPassagePlanned, KielCanalPassagePlannedIncomming, KielCanalPassagePlannedOutgoing) " +
|
||||
"VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, " +
|
||||
"@P17, @P18, @P19 )", this.Tablename);
|
||||
"@P17, @P18, @P19, @P20, @P21, @P22 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
4
nsw/Source/bsmd.herberg.FormService/packages.config
Normal file
4
nsw/Source/bsmd.herberg.FormService/packages.config
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.7" targetFramework="net45" />
|
||||
</packages>
|
||||
Loading…
Reference in New Issue
Block a user