Example #1
0
 public OrderVO getOrderVO(TbBizOrderBO bo) {
   OrderVO vo = new OrderVO();
   vo.setOrderid(bo.getOrderId());
   vo.setTravelDate(bo.getTravelDate().toString());
   vo.setContactName(bo.getContactPersonName());
   vo.setContactNumber(bo.getContactNumber());
   vo.setContactEmail(bo.getContactEmail());
   vo.setContactGender(bo.getContactPersonGenderCd());
   vo.setcTime(bo.getCreateTime());
   vo.setPrice(bo.getPrice());
   vo.setStatus(bo.getOrderStatusCd());
   vo.setType(bo.getTourTypeCd());
   vo.setUserId(bo.getCreateUser().getUserId());
   vo.setNumOfAdult(bo.getAdultsCount());
   vo.setNumOfChild(bo.getChildrenCount());
   vo.setRemarks(bo.getRemarks());
   if (bo.getPayments().size() != 0) {
     System.out.println(bo.getPayments().iterator().next().getPaymentId());
     vo.setPaymentExist(true);
   } else {
     vo.setPaymentExist(false);
   }
   DetailVO dvo = getDetailVO(bo.getRouteDetail());
   vo.setDetail(dvo);
   TbBizRouteBO oneroute = bo.getRouteDetail().getRoute();
   RouteVO route = new RouteVO();
   route.setRouteid(oneroute.getRouteId());
   route.setName(oneroute.getRouteName());
   route.setDes(oneroute.getDescription());
   dvo.setInfo(route);
   return vo;
 }
Example #2
0
 public DetailVO getDetailVO(TbBizRouteDetailBO detail) {
   DetailVO detailVO = new DetailVO();
   detailVO.setId(detail.getDetailId());
   detailVO.setLimit(detail.getTourGroupLimit());
   detailVO.setPrice(detail.getPrice());
   detailVO.setVehiclename(detail.getVehicle().getBrand());
   detailVO.setLaunchday(detail.getDayOfWeek());
   detailVO.setsTimes(detail.getStartTime());
   detailVO.seteTimes(detail.getEndTime());
   detailVO.setNumber(detail.getVehicle().getPersons());
   return detailVO;
 }