各砂站运输量统计表导出的表格中添加合计行及解决序号问题
parent
17ef44914c
commit
3052061eb9
|
|
@ -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<Record> list = data.get("data");
|
||||
List<Record> 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<Record> sups = data.get("supermarket");
|
||||
Workbook wb = new XSSFWorkbook();
|
||||
|
||||
|
|
@ -2134,7 +2137,7 @@ public class OrderStatService {
|
|||
row = sheet.createRow(rowcnt++);
|
||||
List<Record> 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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue