|
@@ -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
|
|
@@ -131,6 +133,24 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
return succeed(replacementInstrumentActivity);
|
|
|
}
|
|
|
|
|
|
+// @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')")
|
|
@@ -157,11 +177,6 @@ public class ReplacementInstrumentActivityController extends BaseController {
|
|
|
throw new BizException("没有可导出的记录");
|
|
|
}
|
|
|
for (ReplacementInstrumentActivityStatDto row : pageList.getRows()) {
|
|
|
- if (row.getQuestionResult().substring(0, 1).equals("1")) {
|
|
|
- row.setHasYesFirstAnswer("是");
|
|
|
- } else {
|
|
|
- row.setHasYesFirstAnswer("否");
|
|
|
- }
|
|
|
if(row.getInstrumentsId() == null){
|
|
|
row.setHasInstrumentsId("否");
|
|
|
}else {
|
|
@@ -172,8 +187,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");
|