aktueller Stand 2.4.11.*
This commit is contained in:
parent
4e11c5125b
commit
bd4b5b4d39
Binary file not shown.
@ -53,3 +53,146 @@
|
|||||||
29.07.2015 21:50:40 PACKETSIZE: 500
|
29.07.2015 21:50:40 PACKETSIZE: 500
|
||||||
29.07.2015 21:50:40 Tiles: 1
|
29.07.2015 21:50:40 Tiles: 1
|
||||||
29.07.2015 21:50:40 No more Answers
|
29.07.2015 21:50:40 No more Answers
|
||||||
|
-----------------------------
|
||||||
|
14.11.2015 11:21:58 Client started
|
||||||
|
-----------------------------
|
||||||
|
14.11.2015 11:22:00 FileName: IMP\20151114112145-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
14.11.2015 11:22:00 FileSize: 26555(25,93 kB)
|
||||||
|
-----------------------------
|
||||||
|
14.11.2015 11:22:01 No more Answers
|
||||||
|
14.11.2015 11:22:01 20151114112145-5d584c6f-8988-4925-98d1-32016c996525.xml(26555) - XML file doesnt fit Schema
|
||||||
|
14.11.2015 11:22:01 XML Document has Error:truecvc-complex-type.2.4.j: The content of element 'Wastes' is not complete. 'Waste' is expected to occur a minimum of '9' times. '8' more instances are required to satisfy this constraint.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 09:18:45 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 09:18:46 No more Answers
|
||||||
|
15.11.2015 09:18:47 FileName: IMP\20151115091838-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 09:18:47 FileSize: 26398(25,78 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 09:18:48 20151115091838-5d584c6f-8988-4925-98d1-32016c996525.xml(26398) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 09:18:48 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:32:55 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:32:56 FileName: IMP\20151115113248-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 11:32:56 FileSize: 25915(25,31 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:32:57 20151115113248-5d584c6f-8988-4925-98d1-32016c996525.xml(25915) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 11:32:57 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
15.11.2015 11:32:57 No more Answers
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:39:13 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:39:14 FileName: IMP\20151115113912-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 11:39:14 FileSize: 25915(25,31 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:39:15 No more Answers
|
||||||
|
15.11.2015 11:39:15 20151115113912-5d584c6f-8988-4925-98d1-32016c996525.xml(25915) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 11:39:15 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:57:17 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:57:19 No more Answers
|
||||||
|
15.11.2015 11:57:19 FileName: IMP\20151115115712-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 11:57:19 FileSize: 25864(25,26 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 11:57:20 20151115115712-5d584c6f-8988-4925-98d1-32016c996525.xml(25864) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 11:57:20 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 12:00:13 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 12:00:14 FileName: IMP\20151115120010-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 12:00:14 FileSize: 25915(25,31 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 12:00:15 No more Answers
|
||||||
|
15.11.2015 12:00:15 20151115120010-5d584c6f-8988-4925-98d1-32016c996525.xml(25915) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 12:00:15 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 12:03:04 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 12:03:05 FileName: IMP\20151115120302-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 12:03:05 FileSize: 26075(25,46 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 12:03:06 No more Answers
|
||||||
|
15.11.2015 12:03:06 20151115120302-5d584c6f-8988-4925-98d1-32016c996525.xml(26075) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 12:03:06 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 14:35:51 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 14:35:52 FileName: IMP\20151115143549-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 14:35:52 FileSize: 26075(25,46 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 14:35:54 No more Answers
|
||||||
|
15.11.2015 14:35:54 20151115143549-5d584c6f-8988-4925-98d1-32016c996525.xml(26075) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 14:35:54 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 14:38:52 Client started
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 14:38:53 FileName: IMP\20151115143851-5d584c6f-8988-4925-98d1-32016c996525.xml
|
||||||
|
15.11.2015 14:38:53 FileSize: 26075(25,46 kB)
|
||||||
|
-----------------------------
|
||||||
|
15.11.2015 14:38:54 No more Answers
|
||||||
|
15.11.2015 14:38:54 20151115143851-5d584c6f-8988-4925-98d1-32016c996525.xml(26075) - XML file doesnt fit Schema
|
||||||
|
15.11.2015 14:38:54 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:49:57 Client started
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:49:59 No more Answers
|
||||||
|
17.11.2015 07:50:00 FileName: IMP\20151117074953-a6b24c0d-ef7f-4742-852e-512e2b192391.xml
|
||||||
|
17.11.2015 07:50:00 FileSize: 28641(27,97 kB)
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:50:01 20151117074953-a6b24c0d-ef7f-4742-852e-512e2b192391.xml(28641) - XML file doesnt fit Schema
|
||||||
|
17.11.2015 07:50:01 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if ((count(NoHazmatOnBoard) eq 1) or (count(HazmatCargoManifestOnBoard) eq 0)) then empty(GeneralCargo/LoadUnit/LocationOnBoard) and empty(GeneralCargo/LoadUnit/PortOfLoadingLocode) and empty(GeneralCargo/LoadUnit/PortOfDischargeLocode) and empty(GeneralCargo/LoadUnit/DGList) else GeneralCargo/LoadUnit and GeneralCargo/LoadUnit/LocationOnBoard and GeneralCargo/LoadUnit/PortOfLoadingLocode and GeneralCargo/LoadUnit/PortOfDischargeLocode and GeneralCargo/LoadUnit/DGList') for element 'conveyance' with type 'conveyance' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:51:31 Client started
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:51:33 FileName: IMP\20151117075126-a6b24c0d-ef7f-4742-852e-512e2b192391.xml
|
||||||
|
17.11.2015 07:51:33 FileSize: 28641(27,97 kB)
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:51:35 20151117075126-a6b24c0d-ef7f-4742-852e-512e2b192391.xml(28641) - XML file doesnt fit Schema
|
||||||
|
17.11.2015 07:51:35 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if ((count(NoHazmatOnBoard) eq 1) or (count(HazmatCargoManifestOnBoard) eq 0)) then empty(GeneralCargo/LoadUnit/LocationOnBoard) and empty(GeneralCargo/LoadUnit/PortOfLoadingLocode) and empty(GeneralCargo/LoadUnit/PortOfDischargeLocode) and empty(GeneralCargo/LoadUnit/DGList) else GeneralCargo/LoadUnit and GeneralCargo/LoadUnit/LocationOnBoard and GeneralCargo/LoadUnit/PortOfLoadingLocode and GeneralCargo/LoadUnit/PortOfDischargeLocode and GeneralCargo/LoadUnit/DGList') for element 'conveyance' with type 'conveyance' did not succeed.
|
||||||
|
17.11.2015 07:51:36 No more Answers
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:58:00 Client started
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:58:02 No more Answers
|
||||||
|
17.11.2015 07:58:02 FileName: IMP\20151117075757-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml
|
||||||
|
17.11.2015 07:58:02 FileSize: 29644(28,95 kB)
|
||||||
|
-----------------------------
|
||||||
|
17.11.2015 07:58:03 20151117075757-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml(29644) - XML file doesnt fit Schema
|
||||||
|
17.11.2015 07:58:03 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (ends-with(@WasteType,'OTHERS') or starts-with(@WasteType,'CARGO')) then WasteDescription else empty(WasteDescription)') for element 'Waste' with type 'waste' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:24:57 Client started
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:24:58 FileName: IMP\20151118072449-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml
|
||||||
|
18.11.2015 07:24:58 FileSize: 29484(28,79 kB)
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:24:59 20151118072449-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml(29484) - XML file doesnt fit Schema
|
||||||
|
18.11.2015 07:24:59 No more Answers
|
||||||
|
18.11.2015 07:24:59 XML Document has Error:truecvc-attribute.3: The value '0' of attribute 'Index' on element 'LastPort' is not valid with respect to its type, 'posint-type'.
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:29:26 Client started
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:29:27 No more Answers
|
||||||
|
18.11.2015 07:29:27 FileName: IMP\20151118072922-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml
|
||||||
|
18.11.2015 07:29:27 FileSize: 29485(28,79 kB)
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:29:28 20151118072922-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml(29485) - XML file doesnt fit Schema
|
||||||
|
18.11.2015 07:29:28 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (Tanker eq 'Y') then TankerDetails else empty(TankerDetails)') for element 'Pre72H' with type 'pre72' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:39:49 Client started
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:39:50 No more Answers
|
||||||
|
18.11.2015 07:39:50 FileName: IMP\20151118073943-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml
|
||||||
|
18.11.2015 07:39:50 FileSize: 29295(28,61 kB)
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:39:51 20151118073943-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml(29295) - XML file doesnt fit Schema
|
||||||
|
18.11.2015 07:39:51 XML Document has Error:truecvc-assertion.3.13.4.1: Assertion evaluation ('if (Tanker eq 'Y') then TankerDetails else empty(TankerDetails)') for element 'Pre72H' with type 'pre72' did not succeed.
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:43:29 Client started
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:43:30 FileName: IMP\20151118074325-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml
|
||||||
|
18.11.2015 07:43:30 FileSize: 29295(28,61 kB)
|
||||||
|
-----------------------------
|
||||||
|
18.11.2015 07:43:31 20151118074325-ad8761c2-bfbe-4afc-a9f5-004ab739ebd2.xml(28,61 kB) - Transfer successful
|
||||||
|
18.11.2015 07:43:31 No more Answers
|
||||||
|
|||||||
@ -136,7 +136,6 @@ namespace SendNSWMessageService
|
|||||||
(message.MessageNotificationClass == Message.NotificationClass.TIEFD) ||
|
(message.MessageNotificationClass == Message.NotificationClass.TIEFD) ||
|
||||||
(message.MessageNotificationClass == Message.NotificationClass.NAME) ||
|
(message.MessageNotificationClass == Message.NotificationClass.NAME) ||
|
||||||
(message.MessageNotificationClass == Message.NotificationClass.INFO) ||
|
(message.MessageNotificationClass == Message.NotificationClass.INFO) ||
|
||||||
(message.MessageNotificationClass == Message.NotificationClass.POBD) ||
|
|
||||||
(message.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
(message.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
||||||
(message.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
(message.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
||||||
(message.MessageNotificationClass == Message.NotificationClass.LADG) ||
|
(message.MessageNotificationClass == Message.NotificationClass.LADG) ||
|
||||||
@ -167,6 +166,7 @@ namespace SendNSWMessageService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ATD wird nur gesendet, wenn weniger als 60 Minuten in der Zukunft
|
// ATD wird nur gesendet, wenn weniger als 60 Minuten in der Zukunft
|
||||||
|
// und auch nicht älter als eine Woche
|
||||||
if(message.MessageNotificationClass == Message.NotificationClass.ATD)
|
if(message.MessageNotificationClass == Message.NotificationClass.ATD)
|
||||||
{
|
{
|
||||||
if (message.Elements.Count > 0)
|
if (message.Elements.Count > 0)
|
||||||
@ -174,13 +174,24 @@ namespace SendNSWMessageService
|
|||||||
bsmd.database.ATD atd = message.Elements[0] as bsmd.database.ATD;
|
bsmd.database.ATD atd = message.Elements[0] as bsmd.database.ATD;
|
||||||
if (!atd.ATDPortOfCall.HasValue) continue;
|
if (!atd.ATDPortOfCall.HasValue) continue;
|
||||||
if ((atd.ATDPortOfCall.Value - DateTime.UtcNow).TotalMinutes > 60) continue;
|
if ((atd.ATDPortOfCall.Value - DateTime.UtcNow).TotalMinutes > 60) continue;
|
||||||
|
if ((DateTime.UtcNow - atd.ATDPortOfCall.Value).TotalDays > 7) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ATA älter als eine Woche wird auch nicht versendet
|
||||||
|
if(message.MessageNotificationClass == Message.NotificationClass.ATA)
|
||||||
|
{
|
||||||
|
if(message.Elements.Count > 0)
|
||||||
|
{
|
||||||
|
bsmd.database.ATA ata = message.Elements[0] as bsmd.database.ATA;
|
||||||
|
if (!ata.ATAPortOfCall.HasValue) continue;
|
||||||
|
if ((DateTime.UtcNow - ata.ATAPortOfCall.Value).TotalDays > 7) continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (message.InternalStatus != Message.BSMDStatus.CONFIRMED)
|
if ((message.InternalStatus != Message.BSMDStatus.CONFIRMED) &&
|
||||||
//(message.InternalStatus == Message.BSMDStatus.PREPARE) ||
|
(message.InternalStatus != Message.BSMDStatus.SENT))
|
||||||
//(message.InternalStatus == Message.BSMDStatus.TOSEND))
|
|
||||||
{
|
{
|
||||||
if (message.HIS == Message.NSWProvider.UNDEFINED)
|
if (message.HIS == Message.NSWProvider.UNDEFINED)
|
||||||
message.HIS = core.InitialHIS;
|
message.HIS = core.InitialHIS;
|
||||||
@ -246,11 +257,14 @@ namespace SendNSWMessageService
|
|||||||
_log.ErrorFormat("SENDING message {0}: {1}", message.Id.ToString(), ex.Message);
|
_log.ErrorFormat("SENDING message {0}: {1}", message.Id.ToString(), ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toSendMessageList.Count > 0)
|
if (toSendMessageList.Count > 0)
|
||||||
{
|
{
|
||||||
core.BSMDStatusInternal = MessageCore.BSMDStatus.SENT;
|
core.BSMDStatusInternal = MessageCore.BSMDStatus.SENT;
|
||||||
DBManager.Instance.Save(core);
|
} else {
|
||||||
|
core.BSMDStatusInternal = MessageCore.BSMDStatus.PREPARE;
|
||||||
}
|
}
|
||||||
|
DBManager.Instance.Save(core);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,8 +67,33 @@ namespace bsmd.database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum NotificationClass
|
public enum NotificationClass
|
||||||
{
|
{
|
||||||
VISIT, TRANSIT, NOA_NOD, ATA, ATD, SEC, POBA, POBD, NAME, TIEFA, TIEFD,
|
VISIT, // 0
|
||||||
BKRA, BKRD, STAT, LADG, INFO, SERV, PRE72H, MDH, WAS, CREW, PAS, BPOL, TOWA, TOWD, HAZA, HAZD
|
TRANSIT, // 1
|
||||||
|
NOA_NOD, // 2
|
||||||
|
ATA,
|
||||||
|
ATD,
|
||||||
|
SEC, // 5
|
||||||
|
POBA,
|
||||||
|
POBD,
|
||||||
|
NAME,
|
||||||
|
TIEFA,
|
||||||
|
TIEFD, // 10
|
||||||
|
BKRA,
|
||||||
|
BKRD,
|
||||||
|
STAT,
|
||||||
|
LADG,
|
||||||
|
INFO, // 15
|
||||||
|
SERV,
|
||||||
|
PRE72H,
|
||||||
|
MDH,
|
||||||
|
WAS,
|
||||||
|
CREW, // 20
|
||||||
|
PAS,
|
||||||
|
BPOL,
|
||||||
|
TOWA,
|
||||||
|
TOWD,
|
||||||
|
HAZA, // 25
|
||||||
|
HAZD
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum MessageStatus
|
public enum MessageStatus
|
||||||
|
|||||||
@ -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.7")]
|
[assembly: AssemblyInformationalVersion("2.4.11")]
|
||||||
[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("")]
|
||||||
@ -1,9 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
[assembly: AssemblyVersion("2.4.11.*")]
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.4.7.*")]
|
|
||||||
// wenn das nicht auskommentiert wird erhalten wir eine Warnung
|
|
||||||
// [assembly: AssemblyFileVersion("1.0.0.*")]
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ namespace bsmd.dbh
|
|||||||
object item = null;
|
object item = null;
|
||||||
string senderReference = message.Id.Value.ToString("N");
|
string senderReference = message.Id.Value.ToString("N");
|
||||||
|
|
||||||
ItemChoiceType2 itemChoiceType2 = ItemChoiceType2.Visit; // ?
|
ItemChoiceType2 itemChoiceType2 = ItemChoiceType2.Visit;
|
||||||
|
|
||||||
switch (message.MessageNotificationClass)
|
switch (message.MessageNotificationClass)
|
||||||
{
|
{
|
||||||
@ -99,6 +99,7 @@ namespace bsmd.dbh
|
|||||||
{
|
{
|
||||||
RootTransit rootTransit = new RootTransit();
|
RootTransit rootTransit = new RootTransit();
|
||||||
rootType = RootType.TRANSIT;
|
rootType = RootType.TRANSIT;
|
||||||
|
itemChoiceType2 = ItemChoiceType2.Transit;
|
||||||
|
|
||||||
if (message.MessageCore.IMO != null)
|
if (message.MessageCore.IMO != null)
|
||||||
{
|
{
|
||||||
@ -137,44 +138,49 @@ namespace bsmd.dbh
|
|||||||
rootNoaNod.LastPort = noa_nod.LastPort;
|
rootNoaNod.LastPort = noa_nod.LastPort;
|
||||||
rootNoaNod.NextPort = noa_nod.NextPort;
|
rootNoaNod.NextPort = noa_nod.NextPort;
|
||||||
|
|
||||||
int numItems = 2 + noa_nod.CallPurposes.Count;
|
List<ItemsChoiceType> choiceList = new List<ItemsChoiceType>();
|
||||||
|
List<object> choices = new List<object>();
|
||||||
ItemsChoiceType[] choiceArray = new ItemsChoiceType[numItems];
|
|
||||||
object[] choices = new object[numItems];
|
|
||||||
|
|
||||||
|
if (message.MessageCore.IsTransit)
|
||||||
|
{
|
||||||
if (noa_nod.ETAToKielCanal.HasValue)
|
if (noa_nod.ETAToKielCanal.HasValue)
|
||||||
{
|
{
|
||||||
choiceArray[0] = ItemsChoiceType.ETAToKielCanal;
|
choiceList.Add(ItemsChoiceType.ETAToKielCanal);
|
||||||
choices[0] = noa_nod.ETAToKielCanal.Value;
|
choices.Add(noa_nod.ETAToKielCanal.Value);
|
||||||
}
|
|
||||||
if (noa_nod.ETAToPortOfCall.HasValue)
|
|
||||||
{
|
|
||||||
choiceArray[0] = ItemsChoiceType.ETAToPortOfCall;
|
|
||||||
choices[0] = noa_nod.ETAToPortOfCall.Value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noa_nod.ETDFromKielCanal.HasValue)
|
if (noa_nod.ETDFromKielCanal.HasValue)
|
||||||
{
|
{
|
||||||
choiceArray[1] = ItemsChoiceType.ETDFromKielCanal;
|
choiceList.Add(ItemsChoiceType.ETDFromKielCanal);
|
||||||
choices[1] = noa_nod.ETDFromKielCanal.Value;
|
choices.Add(noa_nod.ETDFromKielCanal.Value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (noa_nod.ETAToPortOfCall.HasValue)
|
||||||
|
{
|
||||||
|
choiceList.Add(ItemsChoiceType.ETAToPortOfCall);
|
||||||
|
choices.Add(noa_nod.ETAToPortOfCall.Value);
|
||||||
|
}
|
||||||
|
|
||||||
if (noa_nod.ETDFromPortOfCall.HasValue)
|
if (noa_nod.ETDFromPortOfCall.HasValue)
|
||||||
{
|
{
|
||||||
choiceArray[1] = ItemsChoiceType.ETDFromPortOfCall;
|
choiceList.Add(ItemsChoiceType.ETDFromPortOfCall);
|
||||||
choices[1] = noa_nod.ETDFromPortOfCall.Value;
|
choices.Add(noa_nod.ETDFromPortOfCall.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < noa_nod.CallPurposes.Count; i++)
|
for (int i = 0; i < noa_nod.CallPurposes.Count; i++)
|
||||||
{
|
{
|
||||||
|
choiceList.Add(ItemsChoiceType.CallPurpose);
|
||||||
choiceArray[i + 2] = ItemsChoiceType.CallPurpose;
|
|
||||||
RootNOA_NODCallPurpose rnncp = new RootNOA_NODCallPurpose();
|
RootNOA_NODCallPurpose rnncp = new RootNOA_NODCallPurpose();
|
||||||
rnncp.CallPurposeCode = noa_nod.CallPurposes[i].CallPurposeCode;
|
rnncp.CallPurposeCode = noa_nod.CallPurposes[i].CallPurposeCode;
|
||||||
rnncp.CallPurposeDescription = noa_nod.CallPurposes[i].CallPurposeDescription;
|
rnncp.CallPurposeDescription = noa_nod.CallPurposes[i].CallPurposeDescription;
|
||||||
choices[i+2] = rnncp;
|
choices.Add(rnncp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootNoaNod.Items = choices;
|
rootNoaNod.Items = choices.ToArray();
|
||||||
rootNoaNod.ItemsElementName = choiceArray;
|
rootNoaNod.ItemsElementName = choiceList.ToArray();
|
||||||
|
|
||||||
item = rootNoaNod;
|
item = rootNoaNod;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,7 +135,7 @@ namespace bsmd.herberg.FormService
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_log.ErrorFormat("Exception reading formBody: {0}", ex.ToString());
|
_log.ErrorFormat("Exception reading body of form {0}: {1}", dataSet.formGuid, ex.ToString());
|
||||||
successfulGet = false;
|
successfulGet = false;
|
||||||
}
|
}
|
||||||
if (successfulGet && formResponse.success)
|
if (successfulGet && formResponse.success)
|
||||||
|
|||||||
@ -48,9 +48,13 @@ namespace bsmd.herberg.FormService
|
|||||||
// nur zum debuggen
|
// nur zum debuggen
|
||||||
for (int n = 0; n < formResponse.formDatasets[i].formData.Length; n++)
|
for (int n = 0; n < formResponse.formDatasets[i].formData.Length; n++)
|
||||||
{
|
{
|
||||||
|
_log.Debug(formResponse.formDatasets[i].formData[n].name);
|
||||||
|
_log.Debug(formResponse.formDatasets[i].formData[n].value);
|
||||||
|
|
||||||
if (formResponse.formDatasets[i].formData[n].name.Contains("Transmission"))
|
if (formResponse.formDatasets[i].formData[n].name.Contains("Transmission"))
|
||||||
{
|
{
|
||||||
_log.Info("foundit");
|
_log.Info("foundit");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,6 +85,7 @@ namespace bsmd.herberg.FormService
|
|||||||
{
|
{
|
||||||
case "REGISTRATION_TYPE":
|
case "REGISTRATION_TYPE":
|
||||||
_log.InfoFormat("REGISTRATION_TYPE: {0}", formData.value);
|
_log.InfoFormat("REGISTRATION_TYPE: {0}", formData.value);
|
||||||
|
aMessageCore.IsTransit = formData.value.Equals("Transit"); // !!!
|
||||||
break;
|
break;
|
||||||
case "REPORT_TYPE":
|
case "REPORT_TYPE":
|
||||||
|
|
||||||
@ -329,11 +334,20 @@ namespace bsmd.herberg.FormService
|
|||||||
noa_nod.CallPurposes.Add(cp);
|
noa_nod.CallPurposes.Add(cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subvDict.ContainsKey("CallPurposeCode")) cp.CallPurposeCode = Int32.Parse(subvDict["CallPurposeCode"]);
|
|
||||||
if (subvDict.ContainsKey("CallPurposeDescription")) cp.CallPurposeDescription = subvDict["CallPurposeDescription"];
|
if (subvDict.ContainsKey("CallPurposeDescription")) cp.CallPurposeDescription = subvDict["CallPurposeDescription"];
|
||||||
|
|
||||||
|
// Code ist Pflichtfeld, daher wird ein Eintrag nur bei vorhandenem Code gespeichert
|
||||||
|
if (subvDict.ContainsKey("CallPurposeCode"))
|
||||||
|
{
|
||||||
|
cp.CallPurposeCode = Int32.Parse(subvDict["CallPurposeCode"]);
|
||||||
saveMessages.Add(cp);
|
saveMessages.Add(cp);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
noa_nod.CallPurposes.Remove(cp);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1025,8 +1039,16 @@ namespace bsmd.herberg.FormService
|
|||||||
if (((waste.WasteType ?? 0) == 9) && waste.WasteDescription.IsNullOrEmpty())
|
if (((waste.WasteType ?? 0) == 9) && waste.WasteDescription.IsNullOrEmpty())
|
||||||
waste.WasteDescription = "-";
|
waste.WasteDescription = "-";
|
||||||
|
|
||||||
|
if (waste.WasteType.HasValue)
|
||||||
|
{
|
||||||
saveMessages.Add(waste);
|
saveMessages.Add(waste);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// wenn nichtmal der WasteType gesetzt ist verwenden wir lieber den default und speichern das nicht
|
||||||
|
was.Waste.Remove(waste);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fehlende Waste Meldungen als "leer" hinzufügen, der Identifier muss dann zur Kennzeichnung leer sein
|
// fehlende Waste Meldungen als "leer" hinzufügen, der Identifier muss dann zur Kennzeichnung leer sein
|
||||||
// falls später vom Schiff als Update korrigierte Werte kommen.
|
// falls später vom Schiff als Update korrigierte Werte kommen.
|
||||||
@ -1196,7 +1218,6 @@ namespace bsmd.herberg.FormService
|
|||||||
// if (vDict.ContainsKey("TransitKielCanal")) aMessageCore.IsTransit = vDict["TransitKielCanal"].Equals("Y");
|
// if (vDict.ContainsKey("TransitKielCanal")) aMessageCore.IsTransit = vDict["TransitKielCanal"].Equals("Y");
|
||||||
if (vDict.ContainsKey("ETAPortOfCall")) aMessageCore.ETA = Extensions.TryParseDateTime(vDict["ETAPortOfCall"]);
|
if (vDict.ContainsKey("ETAPortOfCall")) aMessageCore.ETA = Extensions.TryParseDateTime(vDict["ETAPortOfCall"]);
|
||||||
if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]);
|
if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]);
|
||||||
aMessageCore.IsTransit = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endregion
|
#endregion
|
||||||
@ -1206,7 +1227,6 @@ namespace bsmd.herberg.FormService
|
|||||||
{
|
{
|
||||||
theMessage.MessageNotificationClass = Message.NotificationClass.TRANSIT;
|
theMessage.MessageNotificationClass = Message.NotificationClass.TRANSIT;
|
||||||
if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]);
|
if (vDict.ContainsKey("ETAKielCanal")) aMessageCore.ETAKielCanal = Extensions.TryParseDateTime(vDict["ETAKielCanal"]);
|
||||||
aMessageCore.IsTransit = true;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -86,16 +86,18 @@ namespace bsmd.hisnord
|
|||||||
|
|
||||||
#region NSW message area
|
#region NSW message area
|
||||||
|
|
||||||
|
Message visitTransitHeader = null;
|
||||||
|
|
||||||
foreach (Message message in messages)
|
foreach (Message message in messages)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (message.MessageNotificationClass)
|
switch (message.MessageNotificationClass)
|
||||||
{
|
{
|
||||||
case Message.NotificationClass.VISIT:
|
case Message.NotificationClass.VISIT:
|
||||||
|
if (!messages[0].MessageCore.IsTransit) visitTransitHeader = message;
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.TRANSIT:
|
case Message.NotificationClass.TRANSIT:
|
||||||
|
if (messages[0].MessageCore.IsTransit) visitTransitHeader = message;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#region ATA/ATD
|
#region ATA/ATD
|
||||||
@ -258,9 +260,13 @@ namespace bsmd.hisnord
|
|||||||
break;
|
break;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region HAZ
|
||||||
|
|
||||||
case Message.NotificationClass.HAZA:
|
case Message.NotificationClass.HAZA:
|
||||||
case Message.NotificationClass.HAZD:
|
case Message.NotificationClass.HAZD:
|
||||||
// abh. von LADG!
|
// abh. von LADG!
|
||||||
|
{
|
||||||
|
if (message.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
HAZ haz = message.Elements[0] as HAZ;
|
HAZ haz = message.Elements[0] as HAZ;
|
||||||
|
|
||||||
@ -551,11 +557,15 @@ namespace bsmd.hisnord
|
|||||||
// HACK! Die erste "vorhandene" Liste. Dieses Format hier setzt voraus dass man immer nur einen Listentyp
|
// HACK! Die erste "vorhandene" Liste. Dieses Format hier setzt voraus dass man immer nur einen Listentyp
|
||||||
// haben kann, das steht aber nirgends im NSW
|
// haben kann, das steht aber nirgends im NSW
|
||||||
// alles andere wird bis zur Klärung hier erst einmal ignoriert
|
// alles andere wird bis zur Klärung hier erst einmal ignoriert
|
||||||
|
if(dgList.Count > 0)
|
||||||
_nsw.conveyance.GeneralCargo[0].DGList = (object[])dgList[0]; //.ToArray();
|
_nsw.conveyance.GeneralCargo[0].DGList = (object[])dgList[0]; //.ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region INFO
|
#region INFO
|
||||||
case Message.NotificationClass.INFO:
|
case Message.NotificationClass.INFO:
|
||||||
INFO info = message.Elements[0] as INFO;
|
INFO info = message.Elements[0] as INFO;
|
||||||
@ -610,10 +620,14 @@ namespace bsmd.hisnord
|
|||||||
mdh _mdh = new mdh();
|
mdh _mdh = new mdh();
|
||||||
if (mdh.AwareOfFurtherInfections.HasValue)
|
if (mdh.AwareOfFurtherInfections.HasValue)
|
||||||
_mdh.AwareOfConditionsForFurtherInfections = mdh.AwareOfFurtherInfections.Value ? yorntype.Y : yorntype.N;
|
_mdh.AwareOfConditionsForFurtherInfections = mdh.AwareOfFurtherInfections.Value ? yorntype.Y : yorntype.N;
|
||||||
|
|
||||||
|
if (mdh.InfectedAreaDate.HasValue && !mdh.InfectedAreaPort.IsNullOrEmpty())
|
||||||
|
{
|
||||||
_mdh.InfectedArea = new infectedarea();
|
_mdh.InfectedArea = new infectedarea();
|
||||||
if (mdh.InfectedAreaDate.HasValue)
|
if (mdh.InfectedAreaDate.HasValue)
|
||||||
_mdh.InfectedArea.InfectedAreaDate = mdh.InfectedAreaDate.Value;
|
_mdh.InfectedArea.InfectedAreaDate = mdh.InfectedAreaDate.Value;
|
||||||
_mdh.InfectedArea.InfectedAreaPort = mdh.InfectedAreaPort;
|
_mdh.InfectedArea.InfectedAreaPort = mdh.InfectedAreaPort;
|
||||||
|
}
|
||||||
if (mdh.InfectedAreaVisited.HasValue)
|
if (mdh.InfectedAreaVisited.HasValue)
|
||||||
_mdh.InfectedAreaVisited = mdh.InfectedAreaVisited.Value ? yorntype.Y : yorntype.N;
|
_mdh.InfectedAreaVisited = mdh.InfectedAreaVisited.Value ? yorntype.Y : yorntype.N;
|
||||||
if (mdh.MedicalConsulted.HasValue)
|
if (mdh.MedicalConsulted.HasValue)
|
||||||
@ -632,7 +646,7 @@ namespace bsmd.hisnord
|
|||||||
for (int i = 0; i < mdh.PortOfCallLast30Days.Count; i++)
|
for (int i = 0; i < mdh.PortOfCallLast30Days.Count; i++)
|
||||||
{
|
{
|
||||||
_mdh.PortsOfCallLast30Days[i] = new portofcallmdh();
|
_mdh.PortsOfCallLast30Days[i] = new portofcallmdh();
|
||||||
_mdh.PortsOfCallLast30Days[i].Index = i.ToString();
|
_mdh.PortsOfCallLast30Days[i].Index = (i+1).ToString(); // POSINT = 1-basiert
|
||||||
if (mdh.PortOfCallLast30Days[i].CrewJoinedShip.Count > 0)
|
if (mdh.PortOfCallLast30Days[i].CrewJoinedShip.Count > 0)
|
||||||
{
|
{
|
||||||
_mdh.PortsOfCallLast30Days[i].PortOfCallLast30DaysCrewJoinedShip = new string[mdh.PortOfCallLast30Days[i].CrewJoinedShip.Count];
|
_mdh.PortsOfCallLast30Days[i].PortOfCallLast30DaysCrewJoinedShip = new string[mdh.PortOfCallLast30Days[i].CrewJoinedShip.Count];
|
||||||
@ -652,11 +666,14 @@ namespace bsmd.hisnord
|
|||||||
_mdh.SanitaryControlReinspectionRequired = mdh.SanitaryControlReinspectionRequired.Value ? yorntype.Y : yorntype.N;
|
_mdh.SanitaryControlReinspectionRequired = mdh.SanitaryControlReinspectionRequired.Value ? yorntype.Y : yorntype.N;
|
||||||
if (mdh.SanitaryMeasuresApplied.HasValue)
|
if (mdh.SanitaryMeasuresApplied.HasValue)
|
||||||
_mdh.SanitaryMeasuresApplied = mdh.SanitaryMeasuresApplied.Value ? yorntype.Y : yorntype.N;
|
_mdh.SanitaryMeasuresApplied = mdh.SanitaryMeasuresApplied.Value ? yorntype.Y : yorntype.N;
|
||||||
|
if (mdh.SanitaryMeasuresDate.HasValue && !mdh.SanitaryMeasuresLocation.IsNullOrEmpty() && !mdh.SanitaryMeasuresType.IsNullOrEmpty())
|
||||||
|
{
|
||||||
_mdh.SanitaryMeasuresDetails = new sanitarydetails();
|
_mdh.SanitaryMeasuresDetails = new sanitarydetails();
|
||||||
if (mdh.SanitaryMeasuresDate.HasValue)
|
if (mdh.SanitaryMeasuresDate.HasValue)
|
||||||
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresDate = mdh.SanitaryMeasuresDate.Value;
|
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresDate = mdh.SanitaryMeasuresDate.Value;
|
||||||
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresLocation = mdh.SanitaryMeasuresLocation;
|
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresLocation = mdh.SanitaryMeasuresLocation;
|
||||||
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresType = mdh.SanitaryMeasuresType;
|
_mdh.SanitaryMeasuresDetails.SanitaryMeasuresType = mdh.SanitaryMeasuresType;
|
||||||
|
}
|
||||||
if (mdh.SickAnimalOrPetOnBoard.HasValue)
|
if (mdh.SickAnimalOrPetOnBoard.HasValue)
|
||||||
_mdh.SickAnimalOrPetOnBoard = mdh.SickAnimalOrPetOnBoard.Value ? yorntype.Y : yorntype.N;
|
_mdh.SickAnimalOrPetOnBoard = mdh.SickAnimalOrPetOnBoard.Value ? yorntype.Y : yorntype.N;
|
||||||
if (mdh.SickPersonsOnBoard.HasValue)
|
if (mdh.SickPersonsOnBoard.HasValue)
|
||||||
@ -836,8 +853,11 @@ namespace bsmd.hisnord
|
|||||||
if (pre72h.PlannedPeriodOfStay_HUR.HasValue)
|
if (pre72h.PlannedPeriodOfStay_HUR.HasValue)
|
||||||
_nsw.conveyance.Pre72H.PlannedPeriodOfStay_HUR = (float)pre72h.PlannedPeriodOfStay_HUR.Value;
|
_nsw.conveyance.Pre72H.PlannedPeriodOfStay_HUR = (float)pre72h.PlannedPeriodOfStay_HUR.Value;
|
||||||
_nsw.conveyance.Pre72H.PlannedWorks = pre72h.PlannedWorks;
|
_nsw.conveyance.Pre72H.PlannedWorks = pre72h.PlannedWorks;
|
||||||
if (pre72h.Tanker.HasValue)
|
|
||||||
_nsw.conveyance.Pre72H.Tanker = pre72h.Tanker.Value ? yorntype.Y : yorntype.N;
|
_nsw.conveyance.Pre72H.Tanker = (pre72h.Tanker ?? false) ? yorntype.Y : yorntype.N;
|
||||||
|
|
||||||
|
if (pre72h.Tanker ?? false)
|
||||||
|
{
|
||||||
_nsw.conveyance.Pre72H.TankerDetails = new tankerdetails();
|
_nsw.conveyance.Pre72H.TankerDetails = new tankerdetails();
|
||||||
if (pre72h.ConditionCargoBallastTanks.HasValue)
|
if (pre72h.ConditionCargoBallastTanks.HasValue)
|
||||||
_nsw.conveyance.Pre72H.TankerDetails.ConditionCargoBallastTanks = (cargoconditiontype)pre72h.ConditionCargoBallastTanks.Value;
|
_nsw.conveyance.Pre72H.TankerDetails.ConditionCargoBallastTanks = (cargoconditiontype)pre72h.ConditionCargoBallastTanks.Value;
|
||||||
@ -847,6 +867,11 @@ namespace bsmd.hisnord
|
|||||||
if (pre72h.VolumeOfCargo.HasValue)
|
if (pre72h.VolumeOfCargo.HasValue)
|
||||||
_nsw.conveyance.Pre72H.TankerDetails.VolumeOfCargo_TNE = (float)pre72h.VolumeOfCargo.Value;
|
_nsw.conveyance.Pre72H.TankerDetails.VolumeOfCargo_TNE = (float)pre72h.VolumeOfCargo.Value;
|
||||||
_nsw.conveyance.Pre72H.TankerDetails.VolumeOfCargo_TNESpecified = pre72h.VolumeOfCargo.HasValue;
|
_nsw.conveyance.Pre72H.TankerDetails.VolumeOfCargo_TNESpecified = pre72h.VolumeOfCargo.HasValue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_nsw.conveyance.Pre72H.TankerDetails = null;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -893,7 +918,7 @@ namespace bsmd.hisnord
|
|||||||
for (int i = 0; i < sec.LastTenPortFacilitesCalled.Count; i++)
|
for (int i = 0; i < sec.LastTenPortFacilitesCalled.Count; i++)
|
||||||
{
|
{
|
||||||
_sec.Last10Ports[i] = new last10port();
|
_sec.Last10Ports[i] = new last10port();
|
||||||
_sec.Last10Ports[i].Index = i.ToString();
|
_sec.Last10Ports[i].Index = (i+1).ToString();
|
||||||
if (sec.LastTenPortFacilitesCalled[i].PortFacilityDateOfArrival.HasValue)
|
if (sec.LastTenPortFacilitesCalled[i].PortFacilityDateOfArrival.HasValue)
|
||||||
_sec.Last10Ports[i].PortFacilityDateOfArrival = sec.LastTenPortFacilitesCalled[i].PortFacilityDateOfArrival.Value;
|
_sec.Last10Ports[i].PortFacilityDateOfArrival = sec.LastTenPortFacilitesCalled[i].PortFacilityDateOfArrival.Value;
|
||||||
if (sec.LastTenPortFacilitesCalled[i].PortFacilityDateOfDeparture.HasValue)
|
if (sec.LastTenPortFacilitesCalled[i].PortFacilityDateOfDeparture.HasValue)
|
||||||
@ -1111,7 +1136,12 @@ namespace bsmd.hisnord
|
|||||||
for (int i = 0; i < was.Waste.Count; i++)
|
for (int i = 0; i < was.Waste.Count; i++)
|
||||||
{
|
{
|
||||||
waste _aWaste = new waste();
|
waste _aWaste = new waste();
|
||||||
|
string tempWasteType = was.Waste[i].WasteTypeDisplay ?? "";
|
||||||
|
// im Gegensatz zu Spec gibt überfl. Description einen Parse-Fehler :(
|
||||||
|
if (tempWasteType.Equals("WASTE_OILS-OTHERS") || tempWasteType.Equals("GARBAGE-OTHER") || tempWasteType.Equals("CARGO-RESIDUES") || tempWasteType.Equals("CARGO-ASSOSIATED_WASTE"))
|
||||||
_aWaste.WasteDescription = was.Waste[i].WasteDescription;
|
_aWaste.WasteDescription = was.Waste[i].WasteDescription;
|
||||||
|
else
|
||||||
|
_aWaste.WasteDescription = null;
|
||||||
_aWaste.WasteDetails = new wastedetails();
|
_aWaste.WasteDetails = new wastedetails();
|
||||||
_aWaste.WasteDetails.WasteAmountGeneratedTillNextPort_MTQSpecified = was.Waste[i].WasteAmountGeneratedTillNextPort_MTQ.HasValue;
|
_aWaste.WasteDetails.WasteAmountGeneratedTillNextPort_MTQSpecified = was.Waste[i].WasteAmountGeneratedTillNextPort_MTQ.HasValue;
|
||||||
if (was.Waste[i].WasteAmountGeneratedTillNextPort_MTQ.HasValue)
|
if (was.Waste[i].WasteAmountGeneratedTillNextPort_MTQ.HasValue)
|
||||||
@ -1126,7 +1156,7 @@ namespace bsmd.hisnord
|
|||||||
if (was.Waste[i].WasteDisposalAmount_MTQ.HasValue)
|
if (was.Waste[i].WasteDisposalAmount_MTQ.HasValue)
|
||||||
_aWaste.WasteDisposalAmount_MTQ = (float)was.Waste[i].WasteDisposalAmount_MTQ.Value;
|
_aWaste.WasteDisposalAmount_MTQ = (float)was.Waste[i].WasteDisposalAmount_MTQ.Value;
|
||||||
if (was.Waste[i].WasteType.HasValue)
|
if (was.Waste[i].WasteType.HasValue)
|
||||||
_aWaste.WasteType = (wastetype)was.Waste[i].WasteType.Value;
|
_aWaste.WasteType = (wastetype)(was.Waste[i].WasteType.Value - 1); // im XSD scheint das 0-basiert zu sein (falsch?)
|
||||||
_waste.Wastes[i] = _aWaste;
|
_waste.Wastes[i] = _aWaste;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1156,6 +1186,27 @@ namespace bsmd.hisnord
|
|||||||
#region send message and store result
|
#region send message and store result
|
||||||
|
|
||||||
transmitter.result theResult = transmitter.UseHisNordTransmitter(filePath);
|
transmitter.result theResult = transmitter.UseHisNordTransmitter(filePath);
|
||||||
|
if (theResult != null)
|
||||||
|
{
|
||||||
|
_log.InfoFormat("Result: Code {0} Detail {1} Message {2}", theResult.code, theResult.detail, theResult.message);
|
||||||
|
|
||||||
|
if (visitTransitHeader != null)
|
||||||
|
{
|
||||||
|
if (theResult.code > 0)
|
||||||
|
{
|
||||||
|
MessageError error = new MessageError();
|
||||||
|
error.MessageHeaderId = visitTransitHeader.Id.Value;
|
||||||
|
error.ErrorCode = theResult.code;
|
||||||
|
|
||||||
|
if ((theResult.detail != null) && (theResult.detail.Length > 255))
|
||||||
|
error.ErrorText = theResult.detail.Substring(0, 255);
|
||||||
|
else
|
||||||
|
error.ErrorText = theResult.detail;
|
||||||
|
|
||||||
|
DBManager.Instance.Save(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ namespace bsmd.hisnord
|
|||||||
{
|
{
|
||||||
Process process = new Process();
|
Process process = new Process();
|
||||||
process.StartInfo.FileName = Properties.Settings.Default.Transmitter;
|
process.StartInfo.FileName = Properties.Settings.Default.Transmitter;
|
||||||
|
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(Properties.Settings.Default.Transmitter);
|
||||||
process.StartInfo.RedirectStandardError = true;
|
process.StartInfo.RedirectStandardError = true;
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
process.StartInfo.RedirectStandardOutput = true;
|
||||||
process.StartInfo.RedirectStandardInput = false;
|
process.StartInfo.RedirectStandardInput = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user