| | |
| | | FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.VERTICAL).build(); |
| | | |
| | | // 写入数据 |
| | | excelWriter.fill(map, writeSheet); |
| | | listMap.forEach((k, v) -> excelWriter.fill(new FillWrapper(k, v), fillConfig, writeSheet)); |
| | | if (null != map && map.size() > 0) { |
| | | excelWriter.fill(map, writeSheet); |
| | | } |
| | | if (null != listMap && listMap.size() > 0) { |
| | | listMap.forEach((k, v) -> excelWriter.fill(new FillWrapper(k, v), fillConfig, writeSheet)); |
| | | } |
| | | |
| | | // 结束写入 |
| | | excelWriter.finish(); |
| | |
| | | if (!StringHelper.isEmpty(code)) { |
| | | map.put("title", dirService.selectNameByCode(code)); |
| | | list.remove(list.size() - 1); |
| | | } |
| | | if (null != code) { |
| | | for (CountEntity ce : list) { |
| | | ce.setM2("count".equals(ce.getM2()) ? ce.getCount() + "个" : ("area".equals(ce.getM2()) ? ce.getM3() : ce.getLen() + "千米")); |
| | | } |