Commit b6e1c697 by kasmi

Fix horrible code of rabab

parent b019e930
......@@ -204,7 +204,7 @@ public static final String customerKey = "univairmer.tours"; // Univairmer*/
from(nmrOrDirect + EP_SEARCH).routeId(EP_SEARCH).setExchangePattern(ExchangePattern.InOut)
.log("Contacting search webservice !!!!! ${body}").choice()
// 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() {
......
......@@ -185,15 +185,17 @@ public class ParserQuotesresponse extends TeldarParsers {
}
int travellerCount=0;
List<Integer> childrenAges = new ArrayList<Integer>();
Child child = new Child();
//Child child = new Child();
for (int ch = 0; ch < roomOffer.getChildrenCount(); ch++) {
if (child.getAge()<2) {
Traveller traveller = new Traveller(PaxType.INFANT, Byte.parseByte("10"));
//if (child.getAge()<2)
{
Traveller traveller = new Traveller(PaxType.CHILD, Byte.parseByte("10"));
traveller.setId(Integer.toString(++travellerCount));
traveller.setClassification(PaxType.INFANT);
// traveller.setClassification(PaxType.CHILD);
trs.add(traveller);
childrenAges.add(10);
}
......@@ -216,7 +218,7 @@ public class ParserQuotesresponse extends TeldarParsers {
roomProduct.getOccupancy2().setChildAge(childrenAges);
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
.parseByte("" + roomOffer.getAdultsCount() + roomOffer.getChildrenCount()));
}
......
......@@ -43,7 +43,7 @@ public class GetHotelDetailsRequest extends TeldarServices {
customeridentification.setPassword(TeldarRouteBuilder.password);
customeridentification.setCustomerKey(TeldarRouteBuilder.customerKey);
gethoteldetails.setLanguage("EN");
gethoteldetails.setLanguage("FR");
gethoteldetails.setIdentification(customeridentification);
HotelCode hotelcode = new HotelCode();
......
......@@ -70,7 +70,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat
destinationcriteria.setHotel(hotel );
avaCriteria.setDestinationCriteria(destinationcriteria);
hotelavailability.setLanguage("EN");
hotelavailability.setLanguage("FR");
avaCriteria.setCheckIn(hotelstay.getCheckin().toString());
avaCriteria.setCheckOut(hotelstay.getCheckout().toString());
......@@ -96,7 +96,7 @@ public HotelAvailability getList(HotelStay hotelstay) throws ParseException, Dat
if (traveller.getClassification() == PaxType.ADULT)
nbreOfAdult++;
//else if (traveller.getClassification() == PaxType.CHILD)
else if (traveller.getClassification() == PaxType.INFANT)
else if (traveller.getClassification() == PaxType.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