|
@ -119,13 +119,13 @@ public class QuestionnaireController { |
|
|
return JsonResponse.newInstance().ok(submit); |
|
|
return JsonResponse.newInstance().ok(submit); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "用户是否提交了当前类型的问卷", notes = "") |
|
|
@ApiOperation(value = "导出问卷记录", notes = "") |
|
|
@RequestMapping(value = "/export", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|
|
@RequestMapping(value = "/export", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
|
|
public void export(@ApiParam @Validated QuestionnaireDto.Export export, HttpServletResponse response) throws Exception{ |
|
|
public void export(@ApiParam @Validated QuestionnaireDto.Export export, HttpServletResponse response) throws Exception{ |
|
|
log.info("用户是否提交了当前类型的问卷{}", export); |
|
|
log.info("导出问卷记录{}", export); |
|
|
// 未添加时间条件
|
|
|
// 未添加时间条件
|
|
|
Workbook workbook = questionnaireService.export(export); |
|
|
Workbook workbook = questionnaireService.export(export); |
|
|
log.info("用户是否提交了当前类型的问卷结束"); |
|
|
log.info("导出问卷记录结束"); |
|
|
String fileName = "山西省缺血性脑卒中数据汇总表"+ DateUtil.format(new Date(), "yyyyMMddHHmmss") +".xlsx"; |
|
|
String fileName = "山西省缺血性脑卒中数据汇总表"+ DateUtil.format(new Date(), "yyyyMMddHHmmss") +".xlsx"; |
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CharsetUtil.UTF_8)); |
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CharsetUtil.UTF_8)); |
|
|
workbook.write(response.getOutputStream()); |
|
|
workbook.write(response.getOutputStream()); |
|
|