| | |
| | | orderInfo.setUserName(appUser.getName()); |
| | | orderInfo.setPhone(appUser.getPhone()); |
| | | } |
| | | orderInfo.setOrderType(order.getOrderType() == 1 ? "服务" : (StringUtils.isNotEmpty(order.getExpressJson()) ? "单品-快递配送" : "单品-自提")); |
| | | orderInfo.setOrderType(order.getOrderType() == 1 ? "服务" : (StringUtils.isNotEmpty(order.getAddressJson()) ? "单品-快递配送" : "单品-上门自提")); |
| | | Shop shop = shopClient.getShopById(order.getShopId()).getData(); |
| | | if(null != shop){ |
| | | orderInfo.setShopName(shop.getName()); |
| | |
| | | } |
| | | if(order.getOrderType() == 1){ |
| | | List<TechnicianSubscribe> technicianSubscribes = technicianSubscribeClient.getTechnicianSubscribeList(order.getId()).getData(); |
| | | Set<Integer> collect = technicianSubscribes.stream().map(TechnicianSubscribe::getTechnicianId).collect(Collectors.toSet()); |
| | | List<Technician> data = technicianClient.getTechnicianByIds(collect).getData(); |
| | | orderInfo.setTechnicianName(data.stream().map(Technician::getName).collect(Collectors.joining(","))); |
| | | if(technicianSubscribes.size() > 0){ |
| | | Set<Integer> collect = technicianSubscribes.stream().map(TechnicianSubscribe::getTechnicianId).collect(Collectors.toSet()); |
| | | List<Technician> data = technicianClient.getTechnicianByIds(collect).getData(); |
| | | orderInfo.setTechnicianName(data.stream().map(Technician::getName).collect(Collectors.joining(","))); |
| | | } |
| | | } |
| | | List<ShopBalanceStatement> data = shopBalanceStatementClient.getShopBalanceStatementList(Arrays.asList(1, 2, 3), order.getId()).getData(); |
| | | BigDecimal reduce = data.stream().map(ShopBalanceStatement::getVariableAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |