|
@@ -2490,12 +2490,23 @@ public class ExportServiceImpl implements ExportService {
|
|
|
List<FeeFlagNumDto> feeFlagNumDtos = studentPaymentRouteOrderDao.queryCountFeeFlagNum(orderNoList);
|
|
|
feeFlagMap = feeFlagNumDtos.stream().collect(Collectors.toMap(FeeFlagNumDto::getOrderNo, Function.identity()));
|
|
|
}
|
|
|
+ //获取商城订单商品信息
|
|
|
+ List<String> goodsJsonList = studentPaymentOrderExportDtos.stream().map(e -> e.getGoodsJson()).collect(Collectors.toList());
|
|
|
+ goodsJsonList.removeAll(Collections.singleton(null));
|
|
|
+ Set<String> productIdList = new HashSet<>();
|
|
|
+ for (String goodsJson : goodsJsonList) {
|
|
|
+ List<JSONObject> orderItemList = JSONObject.parseArray(JSONObject.parseObject(goodsJson).getString("orderItemList"), JSONObject.class);
|
|
|
+ productIdList.addAll(orderItemList.stream().map(e -> e.get("productId").toString()).collect(Collectors.toSet()));
|
|
|
+ }
|
|
|
+ List<String> categoryNames = sellOrderDao.getMallProductCategory("mall_dev");
|
|
|
+ Map<Long,String> productCategoryMap = MapUtil.convertMybatisMap(sellOrderDao.getMallProductMap(productIdList,"mall_dev"));
|
|
|
for (StudentPaymentOrderMallExportDto basicOrder : studentPaymentOrderExportDtos) {
|
|
|
basicOrder.getUser().setUsername(studentNameMap.get(basicOrder.getUserId()));
|
|
|
basicOrder.setUserOrganName(userOrganNameMap.get(basicOrder.getOrganId()));
|
|
|
//计算手续费
|
|
|
this.calcPlatformFee(basicOrder, serviceChargeMap, orderCountMap, tenantConfig, feeFlagMap);
|
|
|
-
|
|
|
+ //解析json
|
|
|
+ this.parseGoodsJson(basicOrder,categoryNames,productCategoryMap);
|
|
|
String paymentChannel = "";
|
|
|
if (basicOrder.getPaymentChannel() == null) {
|
|
|
} else if (basicOrder.getPaymentChannel().equals("YQPAY")) {
|
|
@@ -2510,7 +2521,14 @@ public class ExportServiceImpl implements ExportService {
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
- HSSFWorkbook workbook = getHSSFWorkbook(studentPaymentOrderExportDtos, ExportEnum.MALL_ROUTE_ORDER_LIST);
|
|
|
+ Map<String, String> headMap = getExportMap(new ExportDto(ExportEnum.MALL_ROUTE_ORDER_LIST));
|
|
|
+ for (int j = 0; j < categoryNames.size(); j++) {
|
|
|
+ int num = j + 1;
|
|
|
+ headMap.put(categoryNames.get(j),"category"+ num);
|
|
|
+ }
|
|
|
+ String[] header = headMap.keySet().toArray(new String[headMap.keySet().size()]);
|
|
|
+ String[] body = headMap.values().toArray(new String[headMap.keySet().size()]);
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos);
|
|
|
exportManagerDownload(workbook, managerDownload);
|
|
|
}
|
|
|
|