|
@@ -614,7 +614,7 @@ public class CompetitionLogicImpl implements CompetitionLogic {
|
|
|
@Override
|
|
|
public String getExcelPath(List<ParticipantVO> participantVOS) throws IOException {
|
|
|
// 文件存储位置
|
|
|
- String savePath="D:\\excel1\\";
|
|
|
+ String savePath="/var/www/download/excel";
|
|
|
|
|
|
File savefile = new File(savePath);
|
|
|
if (!savefile.exists()) {
|
|
@@ -623,14 +623,14 @@ public class CompetitionLogicImpl implements CompetitionLogic {
|
|
|
//赛段名称
|
|
|
String fileName = participantVOS.get(0).getContestName();
|
|
|
|
|
|
- for (ParticipantVO participantVO : participantVOS) {
|
|
|
- participantVO.setTeachers(participantVO.getTeachers());
|
|
|
- }
|
|
|
+// for (ParticipantVO participantVO : participantVOS) {
|
|
|
+// participantVO.setTeachers(participantVO.getTeachers());
|
|
|
+// }
|
|
|
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(fileName,fileName), ParticipantVO.class, participantVOS);
|
|
|
FileOutputStream fos = new FileOutputStream(savePath +"/"+ fileName + ".xls");
|
|
|
workbook.write(fos);
|
|
|
fos.close();
|
|
|
- return savePath + fileName + ".xls";
|
|
|
+ return "/download/excel/" + fileName + ".xls";
|
|
|
}
|
|
|
|
|
|
}
|