...
|
...
|
@@ -1180,13 +1180,15 @@ public class XmlToMapDemo { |
|
|
String SEDR = (String) metamap.get("SNDR");
|
|
|
logger.info(SEDR);
|
|
|
|
|
|
List<Map> event = (List<Map>) map.get("ArrivalEvent");
|
|
|
Map LogisticsTransportManifest = (Map) map.get("LogisticsTransportManifest");
|
|
|
List<Map> event = (List<Map>) LogisticsTransportManifest.get("ArrivalEvent");
|
|
|
for (Map everyEvent : event){
|
|
|
String ScheduledArrivalOccurrenceDateTime = (String) everyEvent.get("ScheduledArrivalOccurrenceDateTime");
|
|
|
String FirstArrivalCountryID = ((Map) everyEvent.get("OccurrenceArrivalLocation")).get("FirstArrivalCountryID").toString();
|
|
|
|
|
|
Object AssociatedTransportCargoList = everyEvent.get("AssociatedTransportCargo");
|
|
|
if (AssociatedTransportCargoList.getClass().equals("java.util.ArrayList")){ //这里是为了判断 只发一票装载的情况,实际上上面event节点也要这样判断返回的是LIST还是MAP
|
|
|
|
|
|
if (AssociatedTransportCargoList.getClass().getName().equals("java.util.ArrayList")){ //这里是为了判断 只发一票装载的情况,实际上上面event节点也要这样判断返回的是LIST还是MAP
|
|
|
List<Map> AssociatedTransportCargo = (List<Map>) everyEvent.get("AssociatedTransportCargo");
|
|
|
for(Map AssociatedTransportCargoMap : AssociatedTransportCargo){
|
|
|
String uldType = AssociatedTransportCargoMap.get("TypeCode").toString();
|
...
|
...
|
@@ -1194,14 +1196,15 @@ public class XmlToMapDemo { |
|
|
String PositioningEvent_OccurrencePositioningLocation_ID = ((Map)(((Map)(((Map) AssociatedTransportCargoMap.get("UtilizedUnitLoadTransportEquipment")).get("PositioningEvent"))).get("OccurrencePositioningLocation"))).get("ID").toString();
|
|
|
|
|
|
Object IncludedMasterConsignmentList = AssociatedTransportCargoMap.get("IncludedMasterConsignment");
|
|
|
if (IncludedMasterConsignmentList.getClass().equals("java.util.ArrayList")){
|
|
|
if (IncludedMasterConsignmentList.getClass().getName().equals("java.util.ArrayList")){
|
|
|
|
|
|
}else if (IncludedMasterConsignmentList.getClass().equals("java.util.Map")){ //这里为MAP代表一个板里面装一件货
|
|
|
}else if (IncludedMasterConsignmentList.getClass().getName().equals("java.util.HashMap")){ //这里为MAP代表一个板里面装一件货
|
|
|
Map IncludedMasterConsignmentMap = (Map)IncludedMasterConsignmentList;
|
|
|
String awbNumber = ((Map)IncludedMasterConsignmentMap.get("TransportContractDocument")).get("ID").toString();
|
|
|
logger.info(awbNumber);
|
|
|
}
|
|
|
}
|
|
|
}else if (AssociatedTransportCargoList.getClass().equals("java.util.Map")){//是MAP单取下面节点就行,只发一票装载 报文中是一个航班,一个板箱,一个运单
|
|
|
}else if (AssociatedTransportCargoList.getClass().getName().equals("java.util.HashMap")){//是MAP单取下面节点就行,只发一票装载 报文中是一个航班,一个板箱,一个运单
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
|