|
|
@@ -32,7 +32,7 @@ public class ExcelPoiUtils {
|
|
|
/**
|
|
|
* 将 List<Map<String,Object>> 类型的数据导出为 Excel
|
|
|
*/
|
|
|
- public static String createExcel(List<Map<String, Object>> mapList, String filename, String title) {
|
|
|
+ public static String createExcel(List<Map<String, Object>> mapList, String filename, String title,String dirName) {
|
|
|
//获取数据源的 key, 用于获取列数及设置标题
|
|
|
Map<String, Object> map = mapList.get(0);
|
|
|
Set<String> stringSet = map.keySet();
|
|
|
@@ -125,7 +125,7 @@ public class ExcelPoiUtils {
|
|
|
// bytes = os.toByteArray();
|
|
|
// 判断路径是否存在 类型 + 年月+ 日期
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
- String returnPath = title + "/" + currentDate.getYear()
|
|
|
+ String returnPath = dirName + "/" + currentDate.getYear()
|
|
|
+ "-" + currentDate.getMonthValue() + "/" + currentDate.getDayOfMonth();
|
|
|
String dirPath = ConfigStatic.getExcelFolder() + "/" + returnPath;
|
|
|
File dir = new File(dirPath);
|