|
@@ -293,20 +293,17 @@ public class StudentRegistrationController extends BaseController {
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
-
|
|
|
- String[] headerArr = {"学员编号", "学员姓名", "性别", "联系电话", "年级班级", "选报声部1", "选报声部2", "是否服从调剂", "乐器准备方式"};
|
|
|
- String[] bodyArr = {"userId", "userName", "gender ? '男' : '女'", "phone", "currentGrade", "subjectFirstName", "subjectSecondName", "isAllowAdjust ? '是' : '否'", "kitPurchaseMethod"};
|
|
|
- List<String> headerList = Arrays.asList(headerArr);
|
|
|
- List<String> bodyList = Arrays.asList(bodyArr);
|
|
|
-
|
|
|
+ HSSFWorkbook workbook = null;
|
|
|
if (musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER)) {
|
|
|
- headerList.add("系统意向");
|
|
|
- bodyList.add("cloudTeacherMethod");
|
|
|
+ String[] header = {"学员编号", "学员姓名", "性别", "联系电话", "年级班级", "选报声部1", "选报声部2", "是否服从调剂", "乐器准备方式", "系统意向"};
|
|
|
+ String[] body = {"userId", "userName", "gender ? '男' : '女'", "phone", "currentGrade", "subjectFirstName", "subjectSecondName", "isAllowAdjust ? '是' : '否'", "kitPurchaseMethod", "cloudTeacherMethod"};
|
|
|
+ workbook = POIUtil.exportExcel(header, body, studentPreRegistration.getRows());
|
|
|
+ } else {
|
|
|
+ String[] header = {"学员编号", "学员姓名", "性别", "联系电话", "年级班级", "选报声部1", "选报声部2", "是否服从调剂", "乐器准备方式"};
|
|
|
+ String[] body = {"userId", "userName", "gender ? '男' : '女'", "phone", "currentGrade", "subjectFirstName", "subjectSecondName", "isAllowAdjust ? '是' : '否'", "kitPurchaseMethod"};
|
|
|
+ workbook = POIUtil.exportExcel(header, body, studentPreRegistration.getRows());
|
|
|
}
|
|
|
- String[] header = headerList.toArray(new String[headerList.size()]);
|
|
|
- String[] body = bodyList.toArray(new String[bodyList.size()]);
|
|
|
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPreRegistration.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=pre-register-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
response.flushBuffer();
|