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
4b3949e3
Commit
4b3949e3
authored
Nov 11, 2023
by
刘鑫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出
parent
03d9976a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
18 deletions
+74
-18
Group.java
src/main/java/com/tiptimes/model/Group.java
+13
-1
QuestionnaireServiceImpl.java
...a/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
+25
-4
Questionnaire.xml
src/main/resources/mapper/Questionnaire.xml
+36
-13
No files found.
src/main/java/com/tiptimes/model/Group.java
View file @
4b3949e3
...
@@ -39,10 +39,13 @@ public class Group {
...
@@ -39,10 +39,13 @@ public class Group {
private
int
relevance
;
private
int
relevance
;
private
int
maxPoint
;
public
Group
()
{
public
Group
()
{
}
}
public
Group
(
int
groupId
,
String
groupTitle
,
int
qnYear
,
int
groupType
,
String
questionId
,
int
questionnaireId
,
int
relevance
)
{
public
Group
(
int
groupId
,
String
groupTitle
,
int
qnYear
,
int
groupType
,
String
questionId
,
int
questionnaireId
,
int
relevance
,
int
maxPoint
)
{
this
.
groupId
=
groupId
;
this
.
groupId
=
groupId
;
this
.
groupTitle
=
groupTitle
;
this
.
groupTitle
=
groupTitle
;
this
.
qnYear
=
qnYear
;
this
.
qnYear
=
qnYear
;
...
@@ -50,6 +53,15 @@ public class Group {
...
@@ -50,6 +53,15 @@ public class Group {
this
.
questionId
=
questionId
;
this
.
questionId
=
questionId
;
this
.
questionnaireId
=
questionnaireId
;
this
.
questionnaireId
=
questionnaireId
;
this
.
relevance
=
relevance
;
this
.
relevance
=
relevance
;
this
.
maxPoint
=
maxPoint
;
}
public
int
getMaxPoint
()
{
return
maxPoint
;
}
public
void
setMaxPoint
(
int
maxPoint
)
{
this
.
maxPoint
=
maxPoint
;
}
}
public
int
getGroupId
()
{
public
int
getGroupId
()
{
...
...
src/main/java/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
View file @
4b3949e3
...
@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
org
.
apache
.
commons
.
lang
.
math
.
NumberUtils
.
max
;
import
static
org
.
apache
.
commons
.
lang
.
math
.
NumberUtils
.
max
;
...
@@ -1206,7 +1207,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -1206,7 +1207,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
newGroup
.
setQuestionId
(
ids
.
substring
(
0
,
ids
.
toString
().
length
()
-
1
));
newGroup
.
setQuestionId
(
ids
.
substring
(
0
,
ids
.
toString
().
length
()
-
1
));
newGroup
.
setQuestionnaireId
(
questionnaireId
);
newGroup
.
setQuestionnaireId
(
questionnaireId
);
newGroup
.
setRelevance
(
group
.
getRelevance
());
newGroup
.
setRelevance
(
group
.
getRelevance
());
newGroup
.
setMaxPoint
(
group
.
getMaxPoint
());
newGroups
.
add
(
newGroup
);
newGroups
.
add
(
newGroup
);
}
}
...
@@ -2129,16 +2130,22 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -2129,16 +2130,22 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
row
.
setIsSubmitCertificate
(
getSplitValue
(
isSubmitCertificates
,
i
));
row
.
setIsSubmitCertificate
(
getSplitValue
(
isSubmitCertificates
,
i
));
row
.
setIsSubmitIncubation
(
getSplitValue
(
isSubmitIncubations
,
i
));
row
.
setIsSubmitIncubation
(
getSplitValue
(
isSubmitIncubations
,
i
));
row
.
setIsEntryYear
(
getSplitValue
(
isEntryYears
,
i
));
row
.
setIsEntryYear
(
getSplitValue
(
isEntryYears
,
i
));
splitIncubatedEnterprisesList
.
add
(
row
);
splitIncubatedEnterprisesList
.
add
(
row
);
}
}
}
}
List
<
IncubatedEnterprises
>
finalList
=
new
ArrayList
<>();
for
(
IncubatedEnterprises
enterprise
:
splitIncubatedEnterprisesList
)
{
if
(
"是"
.
equals
(
enterprise
.
getIsEntryYear
()))
{
finalList
.
add
(
enterprise
);
}
}
//生成excel
//生成excel
EasyExcel
.
write
(
response
.
getOutputStream
(),
IncubatedEnterprises
.
class
).
sheet
(
"引导指标四"
).
EasyExcel
.
write
(
response
.
getOutputStream
(),
IncubatedEnterprises
.
class
).
sheet
(
"引导指标四"
).
registerWriteHandler
(
horizontalCellStyleStrategy
)
registerWriteHandler
(
horizontalCellStyleStrategy
)
.
registerWriteHandler
(
new
SimpleColumnWidthStyleStrategy
(
30
))
.
registerWriteHandler
(
new
SimpleColumnWidthStyleStrategy
(
30
))
.
registerWriteHandler
(
new
ExcelFillCellMergeStrategy
(
mergeRowIndex
,
mergeColumnIndex
))
.
registerWriteHandler
(
new
ExcelFillCellMergeStrategy
(
mergeRowIndex
,
mergeColumnIndex
))
.
doWrite
(
splitIncubatedEnterprises
List
);
.
doWrite
(
final
List
);
response
.
flushBuffer
();
response
.
flushBuffer
();
}
}
break
;
break
;
...
@@ -2364,12 +2371,26 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
...
@@ -2364,12 +2371,26 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
list
.
add
(
row
);
list
.
add
(
row
);
}
}
}
}
// 用于保存过滤结果
List
<
SigningMentors
>
finalList
=
new
ArrayList
<>();
for
(
SigningMentors
item
:
list
)
{
// 判断两个字段
if
(
"是"
.
equals
(
item
.
getParticipated
())
&&
"是"
.
equals
(
item
.
getMentor
()))
{
// 添加到结果列表
finalList
.
add
(
item
);
}
}
//生成excel
//生成excel
EasyExcel
.
write
(
response
.
getOutputStream
(),
SigningMentors
.
class
).
sheet
(
"引导指标七"
).
EasyExcel
.
write
(
response
.
getOutputStream
(),
SigningMentors
.
class
).
sheet
(
"引导指标七"
).
registerWriteHandler
(
horizontalCellStyleStrategy
)
registerWriteHandler
(
horizontalCellStyleStrategy
)
.
registerWriteHandler
(
new
SimpleColumnWidthStyleStrategy
(
30
))
.
registerWriteHandler
(
new
SimpleColumnWidthStyleStrategy
(
30
))
.
registerWriteHandler
(
new
ExcelFillCellMergeStrategy
(
mergeRowIndex
,
mergeColumnIndex
))
.
registerWriteHandler
(
new
ExcelFillCellMergeStrategy
(
mergeRowIndex
,
mergeColumnIndex
))
.
doWrite
(
l
ist
);
.
doWrite
(
finalL
ist
);
response
.
flushBuffer
();
response
.
flushBuffer
();
}
}
break
;
break
;
...
...
src/main/resources/mapper/Questionnaire.xml
View file @
4b3949e3
...
@@ -118,10 +118,12 @@
...
@@ -118,10 +118,12 @@
</select>
</select>
<insert
id=
"addQuestionsList"
parameterType=
"com.tiptimes.model.Group"
>
<insert
id=
"addQuestionsList"
parameterType=
"com.tiptimes.model.Group"
>
INSERT INTO t_group(group_title, qn_year, group_type, question_id, questionnaire_id,relevance)
INSERT INTO t_group(group_title, qn_year, group_type, question_id, questionnaire_id,relevance
,max_point
)
VALUES
VALUES
<foreach
collection=
"newGroups"
item=
"item"
separator=
","
>
<foreach
collection=
"newGroups"
item=
"item"
separator=
","
>
(#{item.groupTitle}, #{item.qnYear}, #{item.groupType}, #{item.questionId}, #{item.questionnaireId},#{item.relevance})
(#{item.groupTitle}, #{item.qnYear}, #{item.groupType}, #{item.questionId}, #{item.questionnaireId},#{item.relevance},
#{item.maxPoint}
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -1316,7 +1318,7 @@
...
@@ -1316,7 +1318,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=2
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1330,6 +1332,8 @@
...
@@ -1330,6 +1332,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
<!-- 问卷管理-基础指标2 众创空间配备专职工作人员情况(新)-->
<!-- 问卷管理-基础指标2 众创空间配备专职工作人员情况(新)-->
...
@@ -1347,7 +1351,7 @@
...
@@ -1347,7 +1351,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=3
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1361,6 +1365,8 @@
...
@@ -1361,6 +1365,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1378,7 +1384,7 @@
...
@@ -1378,7 +1384,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=4
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1392,6 +1398,8 @@
...
@@ -1392,6 +1398,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1408,7 +1416,7 @@
...
@@ -1408,7 +1416,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=5
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1422,6 +1430,8 @@
...
@@ -1422,6 +1430,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1444,7 +1454,7 @@
...
@@ -1444,7 +1454,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=6
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1458,6 +1468,8 @@
...
@@ -1458,6 +1468,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1488,7 +1500,7 @@
...
@@ -1488,7 +1500,7 @@
LEFT JOIN t_record
LEFT JOIN t_record
ON t_record.id = t_answer.record_id
ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=7
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1502,6 +1514,8 @@
...
@@ -1502,6 +1514,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1519,7 +1533,7 @@
...
@@ -1519,7 +1533,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=8
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1533,6 +1547,8 @@
...
@@ -1533,6 +1547,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1548,7 +1564,7 @@
...
@@ -1548,7 +1564,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=9
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1562,6 +1578,8 @@
...
@@ -1562,6 +1578,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
...
@@ -1575,7 +1593,7 @@
...
@@ -1575,7 +1593,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=10
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -1589,6 +1607,8 @@
...
@@ -1589,6 +1607,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName;
ORDER BY spaceName;
</select>
</select>
...
@@ -1999,7 +2019,7 @@
...
@@ -1999,7 +2019,7 @@
LEFT JOIN t_record
LEFT JOIN t_record
ON t_record.id = t_answer.record_id
ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=17
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -2013,6 +2033,7 @@
...
@@ -2013,6 +2033,7 @@
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
group by spaceName
ORDER BY spaceName
ORDER BY spaceName
</select>
</select>
<select
id=
"selectIncubatedEnterprisesListFour"
<select
id=
"selectIncubatedEnterprisesListFour"
...
@@ -2029,7 +2050,7 @@
...
@@ -2029,7 +2050,7 @@
FROM t_answer
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
<where>
t_record.process_status = 3
and t_answer.`group`=14
t_record.process_status = 3
<if
test=
"createId != null and createId != ''"
>
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
AND create_id = #{createId}
</if>
</if>
...
@@ -2043,6 +2064,8 @@
...
@@ -2043,6 +2064,8 @@
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
GROUP BY
spaceName
ORDER BY spaceName
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