Commit b6e1c697 by kasmi

Fix horrible code of rabab

parent b019e930
...@@ -204,7 +204,7 @@ public static final String customerKey = "univairmer.tours"; // Univairmer*/ ...@@ -204,7 +204,7 @@ public static final String customerKey = "univairmer.tours"; // Univairmer*/
from(nmrOrDirect + EP_SEARCH).routeId(EP_SEARCH).setExchangePattern(ExchangePattern.InOut) from(nmrOrDirect + EP_SEARCH).routeId(EP_SEARCH).setExchangePattern(ExchangePattern.InOut)
.log("Contacting search webservice !!!!! ${body}").choice() .log("Contacting search webservice !!!!! ${body}").choice()
// stop if morocco // stop if morocco
.when(new JXPathExpression("in/body/trip/content[1]/hotel/address/country/code = 'ma'")).otherwise() .when(new JXPathExpression("in/body/trip/content[1]/hotel/address/country/code = ''")).otherwise()
.process(new Processor() { .process(new Processor() {
......
...@@ -185,15 +185,17 @@ public class ParserQuotesresponse extends TeldarParsers { ...@@ -185,15 +185,17 @@ public class ParserQuotesresponse extends TeldarParsers {
} }
int travellerCount=0; int travellerCount=0;
List<Integer> childrenAges = new ArrayList<Integer>(); List<Integer> childrenAges = new ArrayList<Integer>();
Child child = new Child(); //Child child = new Child();
for (int ch = 0; ch < roomOffer.getChildrenCount(); ch++) { for (int ch = 0; ch < roomOffer.getChildrenCount(); ch++) {
if (child.getAge()<2) { //if (child.getAge()<2)
Traveller traveller = new Traveller(PaxType.INFANT, Byte.parseByte("10")); {
Traveller traveller = new Traveller(PaxType.CHILD, Byte.parseByte("10"));
traveller.setId(Integer.toString(++travellerCount)); traveller.setId(Integer.toString(++travellerCount));
traveller.setClassification(PaxType.INFANT); // traveller.setClassification(PaxType.CHILD);
trs.add(traveller); trs.add(traveller);
childrenAges.add(10);
} }
...@@ -216,7 +218,7 @@ public class ParserQuotesresponse extends TeldarParsers { ...@@ -216,7 +218,7 @@ public class ParserQuotesresponse extends TeldarParsers {
roomProduct.getOccupancy2().setChildAge(childrenAges); roomProduct.getOccupancy2().setChildAge(childrenAges);
room = new Room(hermesRoomType, board, bedLayout, trs); room = new Room(hermesRoomType, board, bedLayout, trs);
logger.info("adultOffers" + roomOffer.getAdultsCount()); logger.info("adultOffers" + roomOffer.getAdultsCount()+" child "+roomOffer.getChildrenCount());
bedLayout = new BedLayout("db", "Double", Byte bedLayout = new BedLayout("db", "Double", Byte
.parseByte("" + roomOffer.getAdultsCount() + roomOffer.getChildrenCount())); .parseByte("" + roomOffer.getAdultsCount() + roomOffer.getChildrenCount()));
} }
......
...@@ -43,7 +43,7 @@ public class GetHotelDetailsRequest extends TeldarServices { ...@@ -43,7 +43,7 @@ public class GetHotelDetailsRequest extends TeldarServices {
customeridentification.setPassword(TeldarRouteBuilder.password); customeridentification.setPassword(TeldarRouteBuilder.password);
customeridentification.setCustomerKey(TeldarRouteBuilder.customerKey); customeridentification.setCustomerKey(TeldarRouteBuilder.customerKey);
gethoteldetails.setLanguage("EN"); gethoteldetails.setLanguage("FR");
gethoteldetails.setIdentification(customeridentification); gethoteldetails.setIdentification(customeridentification);
HotelCode hotelcode = new HotelCode(); HotelCode hotelcode = new HotelCode();
......
...@@ -70,7 +70,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat ...@@ -70,7 +70,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat
destinationcriteria.setHotel(hotel ); destinationcriteria.setHotel(hotel );
avaCriteria.setDestinationCriteria(destinationcriteria); avaCriteria.setDestinationCriteria(destinationcriteria);
hotelavailability.setLanguage("EN"); hotelavailability.setLanguage("FR");
avaCriteria.setCheckIn(hotelstay.getCheckin().toString()); avaCriteria.setCheckIn(hotelstay.getCheckin().toString());
avaCriteria.setCheckOut(hotelstay.getCheckout().toString()); avaCriteria.setCheckOut(hotelstay.getCheckout().toString());
...@@ -78,7 +78,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat ...@@ -78,7 +78,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat
Facility facility=new Facility(); Facility facility=new Facility();
facility.getCode(); facility.getCode();
facility.getValue(); facility.getValue();
RoomCriterias crit = new RoomCriterias(); RoomCriterias crit = new RoomCriterias();
...@@ -96,7 +96,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat ...@@ -96,7 +96,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat
if (traveller.getClassification() == PaxType.ADULT) if (traveller.getClassification() == PaxType.ADULT)
nbreOfAdult++; nbreOfAdult++;
//else if (traveller.getClassification() == PaxType.CHILD) //else if (traveller.getClassification() == PaxType.CHILD)
else if (traveller.getClassification() == PaxType.INFANT) else if (traveller.getClassification() == PaxType.CHILD)
{ {
Child child=new Child(); Child child=new Child();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment