|
@@ -246,26 +246,28 @@ public class OtcTradeOrderController {
|
|
|
List<VoyageRespVO> voyageRespVOList = BeanUtils.toBean(voyageList, VoyageRespVO.class);
|
|
List<VoyageRespVO> voyageRespVOList = BeanUtils.toBean(voyageList, VoyageRespVO.class);
|
|
|
Map<Long, VoyageRespVO> voyageRespVoMap = CollectionUtils.convertMap(voyageRespVOList, VoyageRespVO::getId);
|
|
Map<Long, VoyageRespVO> voyageRespVoMap = CollectionUtils.convertMap(voyageRespVOList, VoyageRespVO::getId);
|
|
|
|
|
|
|
|
- list.forEach(item -> {
|
|
|
|
|
- MapUtils.findAndThen(shipMap, item.getShipId(), ship -> item.setShipName(ship.getName()));
|
|
|
|
|
- MapUtils.findAndThen(countryMap, item.getId(), item::setCountryList);
|
|
|
|
|
- MapUtils.findAndThen(roomModelMap, item.getId(), item::setRoomModelList);
|
|
|
|
|
- MapUtils.findAndThen(orderTotalVoMap, item.getId(), totalVO -> {
|
|
|
|
|
- item.setSummary(totalVO);
|
|
|
|
|
- item.setPersonStat(totalVO.getAdultTotalNum() + "大" + (totalVO.getChildTotalNum() + totalVO.getBabyTotalNum()) + "小");
|
|
|
|
|
|
|
+ if (!list.isEmpty()) {
|
|
|
|
|
+ list.forEach(item -> {
|
|
|
|
|
+ MapUtils.findAndThen(shipMap, item.getShipId(), ship -> item.setShipName(ship.getName()));
|
|
|
|
|
+ MapUtils.findAndThen(countryMap, item.getId(), item::setCountryList);
|
|
|
|
|
+ MapUtils.findAndThen(roomModelMap, item.getId(), item::setRoomModelList);
|
|
|
|
|
+ MapUtils.findAndThen(orderTotalVoMap, item.getId(), totalVO -> {
|
|
|
|
|
+ item.setSummary(totalVO);
|
|
|
|
|
+ item.setPersonStat(totalVO.getAdultTotalNum() + "大" + (totalVO.getChildTotalNum() + totalVO.getBabyTotalNum()) + "小");
|
|
|
|
|
+ });
|
|
|
|
|
+ MapUtils.findAndThen(voyageRespVoMap, item.getVoyageId(), item::setVoyage);
|
|
|
|
|
+ if (item.getVisitors() != null && !item.getVisitors().isEmpty()) {
|
|
|
|
|
+ item.setTotalPerson(item.getVisitors().size());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ item.setTotalPerson(0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Map<String, List<TradeOrderRoomModelVO>> roomDesc = item.getRoomModelList().stream().collect(Collectors.groupingBy(p -> p.getRoomModelName() + "(" + p.getFloor() + "F)"));
|
|
|
|
|
+ AtomicReference<String> roomDescStr = new AtomicReference<>("");
|
|
|
|
|
+ roomDesc.forEach((key, value) -> roomDescStr.set(roomDescStr.get() + " " + value.size() + "*" + key));
|
|
|
|
|
+ item.setRoomModelDetails(roomDescStr.get().trim());
|
|
|
});
|
|
});
|
|
|
- MapUtils.findAndThen(voyageRespVoMap, item.getVoyageId(), item::setVoyage);
|
|
|
|
|
- if (item.getVisitors() != null && !item.getVisitors().isEmpty()) {
|
|
|
|
|
- item.setTotalPerson(item.getVisitors().size());
|
|
|
|
|
- } else {
|
|
|
|
|
- item.setTotalPerson(0);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- Map<String, List<TradeOrderRoomModelVO>> roomDesc = item.getRoomModelList().stream().collect(Collectors.groupingBy(p -> p.getRoomModelName() + "(" + p.getFloor()+"F)"));
|
|
|
|
|
- AtomicReference<String> roomDescStr = new AtomicReference<>("");
|
|
|
|
|
- roomDesc.forEach((key, value) -> roomDescStr.set( roomDescStr.get()+" "+ value.size() +"*"+key ));
|
|
|
|
|
- item.setRoomModelDetails(roomDescStr.get().trim());
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
return success(page);
|
|
return success(page);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -279,7 +281,6 @@ public class OtcTradeOrderController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
@PostMapping("/window/paidOrderList")
|
|
@PostMapping("/window/paidOrderList")
|
|
|
@Operation(summary = "win-已支付订单列表[分页]", description = "根据条件查询订单列表")
|
|
@Operation(summary = "win-已支付订单列表[分页]", description = "根据条件查询订单列表")
|
|
|
@OperateLog(type = API)
|
|
@OperateLog(type = API)
|