This commit is contained in:
@jyuhsin
2024-12-30 13:51:07 +08:00
parent cff9a2fda4
commit b776b4ebe0
4 changed files with 13 additions and 5 deletions
@@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.export.ExcelExportService;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
@@ -731,7 +732,7 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
excelExportEntity.setHeight(20);
excelExportEntity.setWidth(20);
excelExportEntity.setType(2);
excelExportEntity.setExportImageType(2);
excelExportEntity.setExportImageType(1);
exportEntities.add(excelExportEntity);
List<String> loginnames = list.stream().map(v -> v.getString("loginname")).distinct().collect(Collectors.toList());
@@ -774,6 +775,13 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, dataList);
workbook.write(outputStream);
/*Workbook workbook = new XSSFWorkbook();
ExcelExportService service = new ExcelExportService();
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
service.createSheetForMap(workbook, exportParams, exportEntities, dataList);
workbook.write(outputStream);*/
// List<NutMap> result = new ArrayList<>();
// //查询这个福利下有哪些礼品
// WelfareProject welfareProject = dao().fetch(WelfareProject.class, projectId);