Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王琮
platform
Commits
706b7cfc
Commit
706b7cfc
authored
Nov 25, 2022
by
熊海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出excel格式问题,excel表格sheet顺序问题
parent
a6945ca2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
34 deletions
+34
-34
QuestionnaireServiceImpl.java
...a/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
+15
-15
Questionnaire.xml
src/main/resources/mapper/Questionnaire.xml
+19
-19
No files found.
src/main/java/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
View file @
706b7cfc
...
@@ -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
<
Entrepreneurship
Project
>
entrepreneurshipProjectList
=
questionnaireDao
.
selectEntrepreneurshipProject
List
();
List
<
Entrepreneurship
Courses
>
entrepreneurshipCoursesList5
=
questionnaireDao
.
selectEntrepreneurshipCourses
List
();
if
(
entrepreneurship
ProjectList
!=
null
)
{
if
(
entrepreneurship
CoursesList5
!=
null
)
{
for
(
int
i
=
0
;
i
<
entrepreneurship
ProjectList
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
entrepreneurship
CoursesList5
.
size
();
i
++){
//excel生成序号
//excel生成序号
entrepreneurship
ProjectList
.
get
(
i
).
setIndex
(
i
+
1
);
entrepreneurship
CoursesList5
.
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
(
entrepreneurship
ProjectList
,
writeSheet0
);
excelWriter
.
write
(
entrepreneurship
CoursesList5
,
writeSheet1
);
}
}
//查询数据
//查询数据
List
<
Entrepreneurship
Courses
>
entrepreneurshipCoursesList5
=
questionnaireDao
.
selectEntrepreneurshipCourses
List
();
List
<
Entrepreneurship
Project
>
entrepreneurshipProjectList
=
questionnaireDao
.
selectEntrepreneurshipProject
List
();
if
(
entrepreneurship
CoursesList5
!=
null
)
{
if
(
entrepreneurship
ProjectList
!=
null
)
{
for
(
int
i
=
0
;
i
<
entrepreneurship
CoursesList5
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
entrepreneurship
ProjectList
.
size
();
i
++){
//excel生成序号
//excel生成序号
entrepreneurship
CoursesList5
.
get
(
i
).
setIndex
(
i
+
1
);
entrepreneurship
ProjectList
.
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
(
entrepreneurship
CoursesList5
,
writeSheet1
);
excelWriter
.
write
(
entrepreneurship
ProjectList
,
writeSheet0
);
}
}
excelWriter
.
finish
();
excelWriter
.
finish
();
response
.
flushBuffer
();
response
.
flushBuffer
();
...
...
src/main/resources/mapper/Questionnaire.xml
View file @
706b7cfc
...
@@ -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>
<!--更新问题表的分数,汇总统计使用-->
<!--更新问题表的分数,汇总统计使用-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment