|
@@ -53,7 +53,9 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
@Autowired
|
|
|
private ReplacementInstrumentCooperationService replacementInstrumentCooperationService;
|
|
|
@Autowired
|
|
|
- private ReplacementInstrumentDao replacementInstrumentDao;
|
|
|
+ private QuestionnaireQuestionDao questionnaireQuestionDao;
|
|
|
+ @Autowired
|
|
|
+ private QuestionnaireUserResultDao questionnaireUserResultDao;
|
|
|
@Autowired
|
|
|
private SysConfigDao sysConfigDao;
|
|
|
@Autowired
|
|
@@ -133,6 +135,24 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "导出")
|
|
|
@RequestMapping("/export")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('questionnaireUserResult/export')")
|
|
|
+ public void questionnaireUserResultExport(ReplacementInstrumentActivityQueryInfo queryInfo, HttpServletResponse response) throws Exception {
|
|
|
+ List<String> questionColumn = questionnaireQuestionDao.findQuestionColumnList(queryInfo.getCooperationId());
|
|
|
+ if(questionColumn != null && questionColumn.size() > 0){
|
|
|
+ List<String> column = new ArrayList<>();
|
|
|
+ column.add("学员编号");
|
|
|
+ column.add("学员姓名");
|
|
|
+ column.add("手机号");
|
|
|
+ column.addAll(questionColumn);
|
|
|
+ String[] header = column.toArray(new String[column.size()]);
|
|
|
+// questionnaireUserResultDao.queryDetailPage()
|
|
|
+ }else {
|
|
|
+ throw new BizException("暂无可导出数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "导出")
|
|
|
+ @RequestMapping("/export")
|
|
|
@PreAuthorize("@pcs.hasPermissions('replacementInstrumentActivity/export')")
|
|
|
public void export(ReplacementInstrumentActivityQueryInfo queryInfo, HttpServletResponse response) throws Exception {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
@@ -172,8 +192,8 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
HSSFWorkbook workbook = null;
|
|
|
try {
|
|
|
- String[] header = {"分部", "合作单位编号", "合作单位", "学员编号", "学员姓名", "联系电话", "声部", "品牌", "型号", "是否参与市赛", "是否置换乐器"};
|
|
|
- String[] body = {"organName", "cooperationOrganId", "cooperationOrganName", "userId", "userName", "mobileNo", "subjectName", "brand", "specification","hasYesFirstAnswer","hasInstrumentsId"};
|
|
|
+ String[] header = {"分部", "合作单位编号", "合作单位", "学员编号", "学员姓名", "联系电话", "声部", "品牌", "型号", "是否置换乐器"};
|
|
|
+ String[] body = {"organName", "cooperationOrganId", "cooperationOrganName", "userId", "userName", "mobileNo", "subjectName", "brand", "specification","hasInstrumentsId"};
|
|
|
workbook = POIUtil.exportExcel(header, body, pageList.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=replacement-" + DateUtil.getDate(new Date()) + ".xls");
|