diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java index 245d3a6..3bac775 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java @@ -2079,6 +2079,9 @@ public class OrderStatService { public Workbook trafficStatisticsOfEachSandStationExport(String stm, String etm, String tm, Integer invoice_type, Integer sale_type) { Record data = trafficStatisticsOfEachSandStation(stm, etm, tm, invoice_type, sale_type); List list = data.get("data"); + List hj_children = new ArrayList<>(); + hj_children.add(list.get(list.size() - 1).set("customer_type_name", "合计")); + list.get(list.size() - 1).set("children", hj_children); List sups = data.get("supermarket"); Workbook wb = new XSSFWorkbook(); @@ -2134,7 +2137,7 @@ public class OrderStatService { row = sheet.createRow(rowcnt++); List children = sales.get("children"); - row.createCell(0).setCellValue(1); + row.createCell(0).setCellValue(i + 1); row.createCell(1).setCellValue(sales.getStr("customer_type_name")); if (children == null) { @@ -2149,7 +2152,7 @@ public class OrderStatService { Record record = children.get(c); a = 0; - row.createCell(a++).setCellValue(c + 1); + row.createCell(a++).setCellValue(i + 1); row.createCell(a++).setCellValue(record.getStr("customer_type_name")); row.createCell(a++).setCellValue(record.getStr("customer_name")); row.createCell(a++).setCellValue(DataUtil.getDefaultByRecord(record, "prepay_total_amount")); @@ -2165,6 +2168,7 @@ public class OrderStatService { } if (startrow + children.size() - 1 > startrow) { + sheet.addMergedRegion(new CellRangeAddress(startrow, startrow + children.size() - 1, 0, 0)); sheet.addMergedRegion(new CellRangeAddress(startrow, startrow + children.size() - 1, 1, 1)); } }