Commit 706b7cfc authored by 熊海's avatar 熊海

修改导出excel格式问题,excel表格sheet顺序问题

parent a6945ca2
...@@ -518,35 +518,35 @@ public class QuestionnaireServiceImpl implements QuestionnaireService { ...@@ -518,35 +518,35 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build(); ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build();
//查询数据 //查询数据
List<EntrepreneurshipProject> entrepreneurshipProjectList = questionnaireDao.selectEntrepreneurshipProjectList(); List<EntrepreneurshipCourses> entrepreneurshipCoursesList5 = questionnaireDao.selectEntrepreneurshipCoursesList();
if (entrepreneurshipProjectList != null) { if (entrepreneurshipCoursesList5 != null) {
for(int i = 0; i < entrepreneurshipProjectList.size();i++){ for(int i = 0; i < entrepreneurshipCoursesList5.size();i++){
//excel生成序号 //excel生成序号
entrepreneurshipProjectList.get(i).setIndex(i+1); entrepreneurshipCoursesList5.get(i).setIndex(i+1);
} }
//生成excel WriteSheet writeSheet1=EasyExcel.writerSheet(0,"开设创新创业课程情况")
WriteSheet writeSheet0=EasyExcel.writerSheet(0,"申报成功高校众创空间联盟发布的创新创业研究课题信息") .head(EntrepreneurshipCourses.class)
.head(EntrepreneurshipProject.class)
.registerWriteHandler(horizontalCellStyleStrategy) .registerWriteHandler(horizontalCellStyleStrategy)
.registerWriteHandler(new SimpleColumnWidthStyleStrategy(30)) .registerWriteHandler(new SimpleColumnWidthStyleStrategy(30))
.registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex,mergeColumeIndex)) .registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex,mergeColumeIndex))
.build(); .build();
excelWriter.write(entrepreneurshipProjectList,writeSheet0); excelWriter.write(entrepreneurshipCoursesList5,writeSheet1);
} }
//查询数据 //查询数据
List<EntrepreneurshipCourses> entrepreneurshipCoursesList5 = questionnaireDao.selectEntrepreneurshipCoursesList(); List<EntrepreneurshipProject> entrepreneurshipProjectList = questionnaireDao.selectEntrepreneurshipProjectList();
if (entrepreneurshipCoursesList5 != null) { if (entrepreneurshipProjectList != null) {
for(int i = 0; i < entrepreneurshipCoursesList5.size();i++){ for(int i = 0; i < entrepreneurshipProjectList.size();i++){
//excel生成序号 //excel生成序号
entrepreneurshipCoursesList5.get(i).setIndex(i+1); entrepreneurshipProjectList.get(i).setIndex(i+1);
} }
WriteSheet writeSheet1=EasyExcel.writerSheet(1,"开设创新创业课程情况") //生成excel
.head(EntrepreneurshipCourses.class) WriteSheet writeSheet0=EasyExcel.writerSheet(1,"申报成功高校众创空间联盟发布的创新创业研究课题信息")
.head(EntrepreneurshipProject.class)
.registerWriteHandler(horizontalCellStyleStrategy) .registerWriteHandler(horizontalCellStyleStrategy)
.registerWriteHandler(new SimpleColumnWidthStyleStrategy(30)) .registerWriteHandler(new SimpleColumnWidthStyleStrategy(30))
.registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex,mergeColumeIndex)) .registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex,mergeColumeIndex))
.build(); .build();
excelWriter.write(entrepreneurshipCoursesList5,writeSheet1); excelWriter.write(entrepreneurshipProjectList,writeSheet0);
} }
excelWriter.finish(); excelWriter.finish();
response.flushBuffer(); response.flushBuffer();
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.area IS NOT NULL WHERE queation.area IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标2 众创空间配备专职工作人员情况--> <!-- 问卷管理-基础指标2 众创空间配备专职工作人员情况-->
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
<!--</if>--> <!--</if>-->
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.name IS NOT NULL WHERE queation.name IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标3 入孵企业情况--> <!-- 问卷管理-基础指标3 入孵企业情况-->
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.enterpriseName IS NOT NULL WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标4 新增就业情况--> <!-- 问卷管理-基础指标4 新增就业情况-->
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.enterpriseName IS NOT NULL WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标5 开设创新创业课程情况--> <!-- 问卷管理-基础指标5 开设创新创业课程情况-->
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.courseName IS NOT NULL WHERE queation.courseName IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标6 签约创业导师情况--> <!-- 问卷管理-基础指标6 签约创业导师情况-->
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.mentorName IS NOT NULL WHERE queation.mentorName IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标7 组织双创活动情况--> <!-- 问卷管理-基础指标7 组织双创活动情况-->
...@@ -373,7 +373,7 @@ ...@@ -373,7 +373,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.activityTime IS NOT NULL WHERE queation.activityTime IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标8 参赛情况--> <!-- 问卷管理-基础指标8 参赛情况-->
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.eventName IS NOT NULL WHERE queation.eventName IS NOT NULL ORDER BY spaceName
</select> </select>
<!-- 问卷管理-基础指标9 2021年创新创业工作经费(万元)--> <!-- 问卷管理-基础指标9 2021年创新创业工作经费(万元)-->
...@@ -403,7 +403,7 @@ ...@@ -403,7 +403,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.funding IS NOT NULL; WHERE queation.funding IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-引导指标6 申报成功高校众创空间联盟发布的创新创业研究课题信息--> <!-- 问卷管理-引导指标6 申报成功高校众创空间联盟发布的创新创业研究课题信息-->
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.issueNumber IS NOT NULL; WHERE queation.issueNumber IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-引导指标9 在孵企业销售收入或累计合同额情况 --> <!-- 问卷管理-引导指标9 在孵企业销售收入或累计合同额情况 -->
...@@ -435,7 +435,7 @@ ...@@ -435,7 +435,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.enterpriseName IS NOT NULL; WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-引导指标10 本评估周期实现股权或债权融资情况(含股东增资或股东借款) --> <!-- 问卷管理-引导指标10 本评估周期实现股权或债权融资情况(含股东增资或股东借款) -->
...@@ -452,7 +452,7 @@ ...@@ -452,7 +452,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.financingEnterpriseName IS NOT NULL; WHERE queation.financingEnterpriseName IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-引导指标11 主办或承办市级及以上级别路演、双创周活动 --> <!-- 问卷管理-引导指标11 主办或承办市级及以上级别路演、双创周活动 -->
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.activitiesName IS NOT NULL; WHERE queation.activitiesName IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-引导指标12 在孵企业在OTC高校板挂牌情况 --> <!-- 问卷管理-引导指标12 在孵企业在OTC高校板挂牌情况 -->
...@@ -483,7 +483,7 @@ ...@@ -483,7 +483,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.activitiesName IS NOT NULL; WHERE queation.activitiesName IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-引导指标13 在孵企业新增知识产权(包括专利、软著等) --> <!-- 问卷管理-引导指标13 在孵企业新增知识产权(包括专利、软著等) -->
...@@ -501,7 +501,7 @@ ...@@ -501,7 +501,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.enterpriseName IS NOT NULL; WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-奖励指标1 获得“互联网+”大赛全国赛事奖项情况 --> <!-- 问卷管理-奖励指标1 获得“互联网+”大赛全国赛事奖项情况 -->
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.track IS NOT NULL; WHERE queation.track IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-奖励指标2 获得创客马拉松大赛及市教委组织的其他双创大赛奖项情况 --> <!-- 问卷管理-奖励指标2 获得创客马拉松大赛及市教委组织的其他双创大赛奖项情况 -->
...@@ -538,7 +538,7 @@ ...@@ -538,7 +538,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.eventName IS NOT NULL; WHERE queation.eventName IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-奖励指标3 入选天津市创业拔尖项目情况 --> <!-- 问卷管理-奖励指标3 入选天津市创业拔尖项目情况 -->
...@@ -555,7 +555,7 @@ ...@@ -555,7 +555,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.theYear IS NOT NULL; WHERE queation.theYear IS NOT NULL ORDER BY spaceName;
</select> </select>
<!-- 问卷管理-奖励指标4 是否为国家级备案众创空间/是否为国家创业孵化示范基地 --> <!-- 问卷管理-奖励指标4 是否为国家级备案众创空间/是否为国家创业孵化示范基地 -->
...@@ -570,7 +570,7 @@ ...@@ -570,7 +570,7 @@
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3 LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by GROUP BY t_answer.`group`,t_record.create_by
) as queation ) as queation
WHERE queation.isWhetherSpace IS NOT NULL; WHERE queation.isWhetherSpace IS NOT NULL ORDER BY spaceName;
</select> </select>
<!--更新问题表的分数,汇总统计使用--> <!--更新问题表的分数,汇总统计使用-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment