commit
This commit is contained in:
+5
-7
@@ -310,16 +310,14 @@ public class ActivityCommonController {
|
||||
sql.setVar("cnd", "and u.unionid='" + unionId + "'");
|
||||
}
|
||||
|
||||
List<Record> list = activitySchoolApplyService.list(sql);
|
||||
List<NutMap> list = activitySchoolApplyService.listMap(sql);
|
||||
String activityName = list.get(0).getString("activityName");
|
||||
|
||||
List<ActivitySchoolApply> excels = new ArrayList<>();
|
||||
|
||||
list.forEach(z -> {
|
||||
ActivitySchoolApply schoolApply = z.toPojo(ActivitySchoolApply.class);
|
||||
String s = schoolApply.getIdentity().stream().map(personType::getName).collect(Collectors.toList()).toString();
|
||||
schoolApply.setSf(s);
|
||||
excels.add(schoolApply);
|
||||
List<String> identity = Json.fromJsonAsList(String.class, z.getString("identity"));
|
||||
String s = identity.stream().map(personType::getName).collect(Collectors.toList()).toString();
|
||||
z.addv("sf", s);
|
||||
});
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("小队名称", "team", 20));
|
||||
@@ -334,7 +332,7 @@ public class ActivityCommonController {
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String((activityName + "报名表.xls").getBytes("utf-8"), "ISO8859-1"));
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), exportEntities, excels);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), exportEntities, list);
|
||||
workbook.write(response.getOutputStream());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user