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
ffacb08d
Commit
ffacb08d
authored
Oct 20, 2023
by
刘鑫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出文件
parent
69da8f77
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
416 additions
and
42 deletions
+416
-42
QuestionnaireCtrl.java
src/main/java/com/tiptimes/ctrl/QuestionnaireCtrl.java
+26
-0
QuestionnaireDao.java
src/main/java/com/tiptimes/dao/QuestionnaireDao.java
+51
-0
PerformanceSummary.java
src/main/java/com/tiptimes/model/PerformanceSummary.java
+13
-1
QuestionnaireService.java
src/main/java/com/tiptimes/service/QuestionnaireService.java
+4
-0
QuestionnaireServiceImpl.java
...a/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
+136
-40
Questionnaire.xml
src/main/resources/mapper/Questionnaire.xml
+186
-1
No files found.
src/main/java/com/tiptimes/ctrl/QuestionnaireCtrl.java
View file @
ffacb08d
...
...
@@ -562,6 +562,32 @@ public class QuestionnaireCtrl {
return
map
;
}
@RequestMapping
({
"/selectPerformanceList"
})
@ResponseBody
public
Map
<
String
,
Object
>
selectPerformanceList
(
@RequestBody
PerformanceSummary
performanceSummary
){
Map
<
String
,
Object
>
map
=
new
HashMap
();
map
.
put
(
"result"
,
true
);
map
.
put
(
"msg"
,
""
);
Map
<
String
,
Object
>
data
=
new
HashMap
();
List
<
PerformanceSummary
>
performanceSummaryList
=
questionnaireService
.
selectPerformanceList
(
performanceSummary
);
if
(!
performanceSummaryList
.
isEmpty
())
{
for
(
PerformanceSummary
summary
:
performanceSummaryList
)
{
float
totalScore
=
summary
.
getBasicIndicators
()+
summary
.
getGuideIndicators
()+
summary
.
getRewardIndicators
();
summary
.
setTotalScore
(
totalScore
);
}
data
.
put
(
"performanceSummaryList"
,
performanceSummaryList
);
}
map
.
put
(
"data"
,
data
);
return
map
;
}
/**
* 2022年10月新增加功能问卷管理-审批页面根据基础指标、引导指标和奖励指标导出所有空间的数据
*
...
...
src/main/java/com/tiptimes/dao/QuestionnaireDao.java
View file @
ffacb08d
...
...
@@ -91,6 +91,11 @@ public interface QuestionnaireDao {
List
<
PerformanceSummary
>
selectPerformanceSummaryListNew
(
PerformanceSummary
performanceSummary
);
List
<
PerformanceSummary
>
selectPerformanceList
(
PerformanceSummary
performanceSummary
);
List
<
FullTimeWorkPerson
>
selectFullTimeWorkPersonList
(
@Param
(
"recordId"
)
String
recordId
);
List
<
SiteCondition
>
selectSiteConditionList
();
...
...
@@ -133,6 +138,12 @@ public interface QuestionnaireDao {
List
<
PerformanceSummaryTotal
>
queryGuideAndRewardIndexListNew
(
@Param
(
"qnYear"
)
Integer
qnYear
);
List
<
PerformanceSummary
>
queryGuideAndRewardList
(
@Param
(
"qnYear"
)
Integer
qnYear
);
List
<
PerformanceSummary
>
queryGuideAndReward
(
@Param
(
"qnYear"
)
Integer
qnYear
,
@Param
(
"recordId"
)
Integer
recordId
);
List
<
PerformanceSummary
>
queryRewardReward
(
@Param
(
"qnYear"
)
Integer
qnYear
,
@Param
(
"recordId"
)
Integer
recordId
);
Integer
updateAnswerScore
(
Answer
answer
);
List
<
Review
>
selectAnswerByStatus
(
@Param
(
"recordId"
)
Long
recordId
);
...
...
@@ -188,6 +199,20 @@ public interface QuestionnaireDao {
@Param
(
"id20"
)
Integer
id20
);
List
<
IncubatedEnterprises
>
selectIncubatedEnterprisesListFour
(
@Param
(
"qnYear"
)
Integer
qnYear
,
@Param
(
"createId"
)
String
createId
,
@Param
(
"id16"
)
Integer
id16
,
@Param
(
"id17"
)
Integer
id17
,
@Param
(
"id18"
)
Integer
id18
,
@Param
(
"id19"
)
Integer
id19
,
@Param
(
"id20"
)
Integer
id20
);
List
<
EmploymentSituation
>
selectEmploymentSituationListNew
(
@Param
(
"qnYear"
)
Integer
qnYear
,
@Param
(
"createId"
)
String
createId
,
...
...
@@ -235,6 +260,32 @@ public interface QuestionnaireDao {
);
List
<
SigningMentors
>
selectSigningMentorsListSeven
(
@Param
(
"qnYear"
)
Integer
qnYear
,
@Param
(
"createId"
)
String
createId
,
@Param
(
"id35"
)
Integer
id35
,
@Param
(
"id36"
)
Integer
id36
,
@Param
(
"id37"
)
Integer
id37
,
@Param
(
"id38"
)
Integer
id38
,
@Param
(
"id39"
)
Integer
id39
,
@Param
(
"id40"
)
Integer
id40
,
@Param
(
"id41"
)
Integer
id41
,
@Param
(
"id42"
)
Integer
id42
,
@Param
(
"id43"
)
Integer
id43
,
@Param
(
"id44"
)
Integer
id44
,
@Param
(
"id45"
)
Integer
id45
,
@Param
(
"id46"
)
Integer
id46
,
@Param
(
"id47"
)
Integer
id47
,
@Param
(
"id48"
)
Integer
id48
,
@Param
(
"id49"
)
Integer
id49
,
@Param
(
"id50"
)
Integer
id50
,
@Param
(
"id51"
)
Integer
id51
);
List
<
OrganizationActivity
>
selectOrganizationActivityListNew
(
@Param
(
"qnYear"
)
Integer
qnYear
,
@Param
(
"createId"
)
String
createId
,
...
...
src/main/java/com/tiptimes/model/PerformanceSummary.java
View file @
ffacb08d
...
...
@@ -28,6 +28,17 @@ public class PerformanceSummary {
private
String
sorting
;
//排序使用 - desc 默认 --asc 升
private
Integer
recordId
;
public
Integer
getRecordId
()
{
return
recordId
;
}
public
void
setRecordId
(
Integer
recordId
)
{
this
.
recordId
=
recordId
;
}
public
String
getOptinName
()
{
return
optinName
;
}
...
...
@@ -88,13 +99,14 @@ public class PerformanceSummary {
'}'
;
}
public
PerformanceSummary
(
String
optinName
,
float
basicIndicators
,
float
guideIndicators
,
float
rewardIndicators
,
float
totalScore
,
String
sorting
)
{
public
PerformanceSummary
(
String
optinName
,
float
basicIndicators
,
float
guideIndicators
,
float
rewardIndicators
,
float
totalScore
,
String
sorting
,
int
recordId
)
{
this
.
optinName
=
optinName
;
this
.
basicIndicators
=
basicIndicators
;
this
.
guideIndicators
=
guideIndicators
;
this
.
rewardIndicators
=
rewardIndicators
;
this
.
totalScore
=
totalScore
;
this
.
sorting
=
sorting
;
this
.
recordId
=
recordId
;
}
public
PerformanceSummary
()
{
...
...
src/main/java/com/tiptimes/service/QuestionnaireService.java
View file @
ffacb08d
...
...
@@ -116,6 +116,10 @@ public interface QuestionnaireService {
List
<
PerformanceSummary
>
selectPerformanceSummaryListNew
(
PerformanceSummary
performanceSummary
);
List
<
PerformanceSummary
>
selectPerformanceList
(
PerformanceSummary
performanceSummary
);
void
exportFullTimeWorkPerson
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
index
,
String
recordId
);
void
exportPerformanceSummary
(
HttpServletRequest
request
,
HttpServletResponse
response
);
...
...
src/main/java/com/tiptimes/service/impl/QuestionnaireServiceImpl.java
View file @
ffacb08d
...
...
@@ -219,6 +219,11 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
return
questionnaireDao
.
selectPerformanceSummaryListNew
(
performanceSummary
);
}
@Override
public
List
<
PerformanceSummary
>
selectPerformanceList
(
PerformanceSummary
performanceSummary
)
{
return
questionnaireDao
.
selectPerformanceList
(
performanceSummary
);
}
/**
* 2022年10月新增加功能问卷管理-审批页面根据基础指标、引导指标和奖励指标导出所有空间的数据
*
...
...
@@ -931,45 +936,66 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
String
fileName_a
=
"绩效汇总表"
;
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
new
String
((
fileName_a
).
getBytes
(
"gb2312"
),
"ISO-8859-1"
)
+
".xlsx"
);
//查询引导指标和奖励指标数据
List
<
PerformanceSummaryTotal
>
summaryList
=
questionnaireDao
.
queryGuideAndRewardIndexListNew
(
qnYear
);
if
(
summaryList
!=
null
)
{
for
(
int
i
=
0
;
i
<
summaryList
.
size
();
i
++)
{
//excel生成序号
summaryList
.
get
(
i
).
setIndex
(
i
+
1
);
//计算引导指标和奖励指标分数
float
guideIndexScore
=
summaryList
.
get
(
i
).
getGuideIndexOne
()
+
summaryList
.
get
(
i
).
getGuideIndexTwo
()
+
summaryList
.
get
(
i
).
getGuideIndexThree
()
+
summaryList
.
get
(
i
).
getGuideIndexFour
()
+
summaryList
.
get
(
i
).
getGuideIndexFive
()
+
summaryList
.
get
(
i
).
getGuideIndexSix
()
+
summaryList
.
get
(
i
).
getGuideIndexSeven
()
+
summaryList
.
get
(
i
).
getGuideIndexEight
()
+
summaryList
.
get
(
i
).
getGuideIndexNine
()
+
summaryList
.
get
(
i
).
getGuideIndexTen
()
+
summaryList
.
get
(
i
).
getGuideIndexEleven
()
+
summaryList
.
get
(
i
).
getGuideIndexTwelve
()
+
summaryList
.
get
(
i
).
getGuideIndexThirteen
();
if
(
guideIndexScore
>=
50.0
)
{
summaryList
.
get
(
i
).
setGuideIndexScore
(
50
);
}
else
{
summaryList
.
get
(
i
).
setGuideIndexScore
(
guideIndexScore
);
}
//计算奖励指标分数
float
rewardIndexScore
=
summaryList
.
get
(
i
).
getRewardIndexOne
()
+
summaryList
.
get
(
i
).
getRewardIndexTwo
()
+
summaryList
.
get
(
i
).
getRewardIndexThree
()
+
summaryList
.
get
(
i
).
getRewardIndexFour
()
+
summaryList
.
get
(
i
).
getRewardIndexFive
();
if
(
rewardIndexScore
>=
10.0
)
{
summaryList
.
get
(
i
).
setRewardIndexScore
(
10
);
}
else
{
summaryList
.
get
(
i
).
setRewardIndexScore
(
rewardIndexScore
);
}
//总分数
float
totalScore
=
summaryList
.
get
(
i
).
getBasisIndexScore
()
+
summaryList
.
get
(
i
).
getGuideIndexScore
()
+
summaryList
.
get
(
i
).
getRewardIndexScore
();
summaryList
.
get
(
i
).
setTotalScore
(
totalScore
);
List
<
PerformanceSummaryTotal
>
list
=
new
ArrayList
<>();
List
<
PerformanceSummary
>
performanceSummaries
=
questionnaireDao
.
queryGuideAndRewardList
(
qnYear
);
int
index
=
1
;
for
(
PerformanceSummary
performanceSummary
:
performanceSummaries
)
{
PerformanceSummaryTotal
performanceSummaryTotal
=
new
PerformanceSummaryTotal
();
performanceSummaryTotal
.
setIndex
(
index
);
//引导指标分数
performanceSummaryTotal
.
setGuideIndexScore
(
performanceSummary
.
getGuideIndicators
());
//基础指标分数
performanceSummaryTotal
.
setBasisIndexScore
(
performanceSummary
.
getBasicIndicators
());
//奖励
performanceSummaryTotal
.
setRewardIndexScore
(
performanceSummary
.
getRewardIndicators
());
float
total
=
performanceSummary
.
getRewardIndicators
()+
performanceSummary
.
getBasicIndicators
()+
performanceSummary
.
getGuideIndicators
();
//总分
performanceSummaryTotal
.
setTotalScore
(
total
);
List
<
PerformanceSummary
>
guideList
=
questionnaireDao
.
queryGuideAndReward
(
qnYear
,
performanceSummary
.
getRecordId
());
List
<
PerformanceSummary
>
rewardList
=
questionnaireDao
.
queryRewardReward
(
qnYear
,
performanceSummary
.
getRecordId
());
performanceSummaryTotal
.
setGuideIndexOne
(
guideList
.
get
(
0
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexTwo
(
guideList
.
get
(
1
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexThree
(
guideList
.
get
(
2
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexFour
(
guideList
.
get
(
3
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexFive
(
guideList
.
get
(
4
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexSix
(
guideList
.
get
(
5
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexSeven
(
guideList
.
get
(
6
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexEight
(
guideList
.
get
(
7
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexNine
(
guideList
.
get
(
8
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexTen
(
guideList
.
get
(
9
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexEleven
(
guideList
.
get
(
10
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexTwelve
(
guideList
.
get
(
11
).
getGuideIndicators
());
performanceSummaryTotal
.
setGuideIndexThirteen
(
guideList
.
get
(
12
).
getGuideIndicators
());
performanceSummaryTotal
.
setRewardIndexOne
(
rewardList
.
get
(
0
).
getRewardIndicators
());
performanceSummaryTotal
.
setRewardIndexTwo
(
rewardList
.
get
(
1
).
getRewardIndicators
());
performanceSummaryTotal
.
setRewardIndexThree
(
rewardList
.
get
(
2
).
getRewardIndicators
());
performanceSummaryTotal
.
setRewardIndexFour
(
rewardList
.
get
(
3
).
getRewardIndicators
());
performanceSummaryTotal
.
setRewardIndexFive
(
rewardList
.
get
(
4
).
getRewardIndicators
());
performanceSummaryTotal
.
setSpaceName
(
performanceSummary
.
getCreateBy
());
performanceSummaryTotal
.
setBasisIndexOne
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexTwo
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexThree
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexFour
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexFive
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexSix
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexSeven
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexEight
(
"通过"
);
performanceSummaryTotal
.
setBasisIndexNine
(
"通过"
);
index
++;
list
.
add
(
performanceSummaryTotal
);
}
//生成excel
EasyExcel
.
write
(
response
.
getOutputStream
(),
PerformanceSummaryTotal
.
class
).
sheet
(
"绩效汇总表"
).
registerWriteHandler
(
horizontalCellStyleStrategy
)
.
registerWriteHandler
(
new
SimpleColumnWidthStyleStrategy
(
30
))
.
doWrite
(
summaryL
ist
);
.
doWrite
(
l
ist
);
response
.
flushBuffer
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -2073,7 +2099,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
String
fileName_dd
=
"引导指标四"
;
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
new
String
((
fileName_dd
).
getBytes
(
"gb2312"
),
"ISO-8859-1"
)
+
".xlsx"
);
//查询数据
List
<
IncubatedEnterprises
>
leadingIndicatorFoureList
=
questionnaireDao
.
selectIncubatedEnterprisesList
New
(
qnYear
,
createId
,
id16
,
id17
,
id18
,
id19
,
id20
);
List
<
IncubatedEnterprises
>
leadingIndicatorFoureList
=
questionnaireDao
.
selectIncubatedEnterprisesList
Four
(
qnYear
,
createId
,
id16
,
id17
,
id18
,
id19
,
id20
);
if
(
leadingIndicatorFoureList
!=
null
)
{
for
(
int
i
=
0
;
i
<
leadingIndicatorFoureList
.
size
();
i
++)
{
//excel生成序号
...
...
@@ -2263,18 +2289,83 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
String
fileName_ff
=
"引导指标七"
;
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
new
String
((
fileName_ff
).
getBytes
(
"gb2312"
),
"ISO-8859-1"
)
+
".xlsx"
);
//查询数据
List
<
SigningMentors
>
leadingIndicatorSixList
=
questionnaireDao
.
selectSigningMentorsList
New
(
qnYear
,
createId
,
id35
,
id36
,
id37
,
id38
,
id39
,
id40
,
id41
,
id42
,
id43
,
id44
,
id45
,
id46
,
id47
,
id48
,
id49
,
id50
,
id51
);
List
<
SigningMentors
>
leadingIndicatorSixList
=
questionnaireDao
.
selectSigningMentorsList
Seven
(
qnYear
,
createId
,
id35
,
id36
,
id37
,
id38
,
id39
,
id40
,
id41
,
id42
,
id43
,
id44
,
id45
,
id46
,
id47
,
id48
,
id49
,
id50
,
id51
);
if
(
leadingIndicatorSixList
!=
null
)
{
for
(
int
i
=
0
;
i
<
leadingIndicatorSixList
.
size
();
i
++)
{
//excel生成序号
leadingIndicatorSixList
.
get
(
i
).
setIndex
(
i
+
1
);
}
List
<
SigningMentors
>
list
=
new
ArrayList
<>();
for
(
SigningMentors
item
:
leadingIndicatorSixList
)
{
// 拆分字段的逗号分隔值
String
[]
mentorName
=
item
.
getMentorName
().
split
(
","
);
String
[]
gender
=
item
.
getGender
().
split
(
","
);
String
[]
record
=
item
.
getRecord
().
split
(
","
);
String
[]
phoneNumber
=
item
.
getPhoneNumber
().
split
(
","
);
String
[]
unit
=
item
.
getUnit
().
split
(
","
);
String
[]
position
=
item
.
getPosition
().
split
(
","
);
String
[]
theTitle
=
item
.
getTheTitle
().
split
(
","
);
String
[]
signingDate
=
item
.
getSigningDate
().
split
(
","
);
String
[]
contractTime
=
item
.
getContractTime
().
split
(
","
);
String
[]
coachingCategory
=
item
.
getCoachingCategory
().
split
(
","
);
String
[]
coaching
=
item
.
getCoaching
().
split
(
","
);
String
[]
participated
=
item
.
getParticipated
().
split
(
","
);
String
[]
contestantYear
=
item
.
getContestantYear
().
split
(
","
);
String
[]
guideTrack
=
item
.
getGuideTrack
().
split
(
","
);
String
[]
isMaterials
=
item
.
getIsMaterials
().
split
(
","
);
String
[]
mentor
=
item
.
getMentor
().
split
(
","
);
String
[]
isSupporting
=
item
.
getIsSupporting
().
split
(
","
);
int
[]
maxLen
=
{
mentorName
.
length
,
gender
.
length
,
record
.
length
,
phoneNumber
.
length
,
unit
.
length
,
position
.
length
,
theTitle
.
length
,
signingDate
.
length
,
contractTime
.
length
,
coachingCategory
.
length
,
coaching
.
length
,
participated
.
length
,
contestantYear
.
length
,
guideTrack
.
length
,
isMaterials
.
length
,
mentor
.
length
,
isSupporting
.
length
};
int
maxDataCount
=
max
(
maxLen
);
// 处理每个拆分后的数据项
for
(
int
i
=
0
;
i
<
maxDataCount
;
i
++)
{
SigningMentors
row
=
new
SigningMentors
();
row
.
setIndex
(
item
.
getIndex
());
row
.
setSpaceName
(
item
.
getSpaceName
());
row
.
setMentorName
(
getSplitValue
(
mentorName
,
i
));
row
.
setGender
(
getSplitValue
(
gender
,
i
));
row
.
setRecord
(
getSplitValue
(
record
,
i
));
row
.
setPhoneNumber
(
getSplitValue
(
phoneNumber
,
i
));
row
.
setUnit
(
getSplitValue
(
unit
,
i
));
row
.
setPosition
(
getSplitValue
(
position
,
i
));
row
.
setTheTitle
(
getSplitValue
(
theTitle
,
i
));
row
.
setSigningDate
(
getSplitValue
(
signingDate
,
i
));
row
.
setContractTime
(
getSplitValue
(
contractTime
,
i
));
row
.
setCoachingCategory
(
getSplitValue
(
coachingCategory
,
i
));
row
.
setCoaching
(
getSplitValue
(
coaching
,
i
));
row
.
setParticipated
(
getSplitValue
(
participated
,
i
));
row
.
setContestantYear
(
getSplitValue
(
contestantYear
,
i
));
row
.
setGuideTrack
(
getSplitValue
(
guideTrack
,
i
));
row
.
setIsMaterials
(
getSplitValue
(
isMaterials
,
i
));
row
.
setMentor
(
getSplitValue
(
mentor
,
i
));
row
.
setIsSupporting
(
getSplitValue
(
isSupporting
,
i
));
list
.
add
(
row
);
}
}
//生成excel
EasyExcel
.
write
(
response
.
getOutputStream
(),
SigningMentors
.
class
).
sheet
(
"引导指标七"
).
registerWriteHandler
(
horizontalCellStyleStrategy
)
.
registerWriteHandler
(
new
SimpleColumnWidthStyleStrategy
(
30
))
.
registerWriteHandler
(
new
ExcelFillCellMergeStrategy
(
mergeRowIndex
,
mergeColumnIndex
))
.
doWrite
(
l
eadingIndicatorSixL
ist
);
.
doWrite
(
list
);
response
.
flushBuffer
();
}
break
;
...
...
@@ -2709,7 +2800,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
//奖励指标4-奖励指标5
//奖励指标3
//导出文件名称
String
fileName_u
=
"奖励指标四"
;
String
fileName_u
=
"奖励指标四
、五
"
;
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
new
String
((
fileName_u
).
getBytes
(
"gb2312"
),
"ISO-8859-1"
)
+
".xlsx"
);
//查询数据
List
<
SpaceAndIncubation
>
spaceAndIncubationList
=
questionnaireDao
.
selectSpaceAndIncubationListNew
(
qnYear
,
createId
,
id97
,
id98
);
...
...
@@ -2821,9 +2912,14 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
// 查询上报记录id
Integer
aId
=
questionnaireDao
.
queryReport
(
createId
,
questionnaireUuid
);
String
questionIds
=
questionnaireDao
.
selectGroupById
(
saveQuestionByGroup
.
getGroupId
());
String
[]
split
=
questionIds
.
split
(
","
);
int
questionId
=
0
;
for
(
String
s
:
split
)
{
questionId
=
questionId
+
Integer
.
parseInt
(
s
);
}
try
{
for
(
String
s
:
questionIds
.
split
(
","
))
{
questionnaireDao
.
saveQuestionByGroup
(
Integer
.
parseInt
(
s
)
,
questionnaireDao
.
saveQuestionByGroup
(
questionId
,
aId
,
saveQuestionByGroup
.
getRemark
(),
saveQuestionByGroup
.
getStatus
(),
saveQuestionByGroup
.
getScore
(),
saveQuestionByGroup
.
getGroupId
());
}
...
...
@@ -3015,7 +3111,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
// 判断条件
List
<
String
[]>
resultList
=
new
ArrayList
<>();
for
(
String
[]
row
:
result
)
{
if
(
"是"
.
equals
(
row
[
15
])
&&
"是"
.
equals
(
row
[
11
]))
{
if
(
"是"
.
equals
(
row
[
15
])
||
"是"
.
equals
(
row
[
11
]))
{
resultList
.
add
(
row
);
}
}
...
...
src/main/resources/mapper/Questionnaire.xml
View file @
ffacb08d
...
...
@@ -1866,7 +1866,7 @@
AND qn_year = #{qnYear}
</if>
</where>
GROUP BY
t_answer.`group`,
t_record.create_by
GROUP BY t_record.create_by
) as queation
WHERE queation.isWhetherSpace IS NOT NULL
ORDER BY spaceName;
...
...
@@ -1880,6 +1880,191 @@
SELECT t_questionnaire.id FROM t_questionnaire
WHERE t_questionnaire.qn_year = #{qnYear}))
</select>
<select
id=
"selectPerformanceList"
resultType=
"com.tiptimes.model.PerformanceSummary"
>
SELECT tr.qn_year as qnYear,
tr.create_by as createBy,
tre.record_id as recordId,
CASE
WHEN tr.process_status = 2 THEN
0
WHEN tr.process_status = 3 THEN
30
ELSE 0
END AS basicIndicators,
CASE
WHEN SUM( CASE WHEN tre.approval_status = 2 THEN tre.score ELSE 0 END) > 50 THEN
50
ELSE SUM( CASE WHEN tre.approval_status = 2 THEN tre.score ELSE 0 END)
END AS guideIndicators,
CASE
WHEN SUM( CASE WHEN tre.approval_status = 3 THEN tre.score ELSE 0 END) > 10 THEN
10
ELSE SUM(CASE WHEN tre.approval_status = 3 THEN tre.score ELSE 0 END)
END AS rewardIndicators
FROM t_record tr
LEFT JOIN t_review tre ON tre.record_id = tr.id
WHERE tre.approval_status IN (1, 2, 3)
AND tr.process_status = '3'
<if
test=
"qnYear == null or qnYear == ''"
>
<!-- 年份 -->
AND tr.qn_year = YEAR(NOW())
</if>
<if
test=
"qnYear != null and qnYear != ''"
>
<!-- 年份 -->
AND tr.qn_year = #{qnYear}
</if>
<if
test=
"createBy != null and createBy != ''"
>
and tr.create_by like concat('%', #{createBy},'%')
</if>
GROUP BY tr.qn_year,
tr.create_by
ORDER BY tr.id ASC
</select>
<select
id=
"queryGuideAndRewardList"
resultType=
"com.tiptimes.model.PerformanceSummary"
>
SELECT tr.qn_year as qnYear,
tr.create_by as createBy,
tre.record_id as recordId,
CASE
WHEN tr.process_status = 2 THEN
0
WHEN tr.process_status = 3 THEN
30
ELSE 0
END AS basicIndicators,
CASE
WHEN SUM(CASE WHEN tre.approval_status = 2 THEN tre.score ELSE 0 END) > 50 THEN
50
ELSE SUM( CASE WHEN tre.approval_status = 2 THEN tre.score ELSE 0 END)
END AS guideIndicators,
CASE
WHEN SUM(CASE WHEN tre.approval_status = 3 THEN tre.score ELSE 0 END) > 10 THEN
10
ELSE SUM(CASE WHEN tre.approval_status = 3 THEN tre.score ELSE 0 END)
END AS rewardIndicators
FROM t_record tr
LEFT JOIN t_review tre ON tre.record_id = tr.id
WHERE tre.approval_status IN (1, 2, 3)
AND tr.process_status = '3'
<if
test=
"qnYear != null and qnYear != ''"
>
<!-- 年份 -->
AND tr.qn_year = #{qnYear}
</if>
GROUP BY tr.qn_year,
tr.create_by
ORDER BY tr.id ASC
</select>
<select
id=
"queryGuideAndReward"
resultType=
"com.tiptimes.model.PerformanceSummary"
>
SELECT
tr.qn_year AS qnYear,
tr.create_by AS createBy,
tre.record_id AS record_id,
tre.score as guideIndicators
FROM
t_record tr
LEFT JOIN t_review tre ON tre.record_id = tr.id
WHERE
tre.approval_status = 2
AND tr.process_status = '3'
AND tr.qn_year = #{qnYear}
AND tre.record_id = #{recordId}
GROUP BY
tre.group_id
ORDER BY
tr.id ASC
</select>
<select
id=
"queryRewardReward"
resultType=
"com.tiptimes.model.PerformanceSummary"
>
SELECT
tr.qn_year AS qnYear,
tr.create_by AS createBy,
tre.record_id AS record_id,
tre.score as rewardIndicators
FROM
t_record tr
LEFT JOIN t_review tre ON tre.record_id = tr.id
WHERE
tre.approval_status = 3
AND tr.process_status = '3'
AND tr.qn_year = #{qnYear}
AND tre.record_id = #{recordId}
GROUP BY
tre.group_id
ORDER BY
tr.id ASC
</select>
<select
id=
"selectSigningMentorsListSeven"
resultType=
"com.tiptimes.model.exportDTO.SigningMentors"
>
SELECT *
FROM (
SELECT t_answer.`group`,
t_record.create_by as spaceName,
MAX(IF(options_id = #{id35}, `value`, NULL)) as mentorName,
MAX(IF(options_id = #{id36}, `value`, NULL)) as gender,
MAX(IF(options_id = #{id37}, `value`, NULL)) as record,
MAX(IF(options_id = #{id38}, `value`, NULL)) as phoneNumber,
MAX(IF(options_id = #{id39}, `value`, NULL)) as unit,
MAX(IF(options_id = #{id40}, `value`, NULL)) as position,
MAX(IF(options_id = #{id41}, `value`, NULL)) as theTitle,
MAX(IF(options_id = #{id42}, `value`, NULL)) as signingDate,
MAX(IF(options_id = #{id43}, `value`, NULL)) as contractTime,
MAX(IF(options_id = #{id44}, `value`, NULL)) as coachingCategory,
MAX(IF(options_id = #{id45}, `value`, NULL)) as coaching,
MAX(IF(options_id = #{id46}, `value`, NULL)) as participated,
MAX(IF(options_id = #{id47}, `value`, NULL)) as contestantYear,
MAX(IF(options_id = #{id48}, `value`, NULL)) as guideTrack,
MAX(IF(options_id = #{id49}, `value`, NULL)) as isMaterials,
MAX(IF(options_id = #{id50}, `value`, NULL)) as mentor,
MAX(IF(options_id = #{id51}, `value`, NULL)) as isSupporting
FROM t_answer
LEFT JOIN t_record
ON t_record.id = t_answer.record_id
<where>
t_record.process_status = 3 and t_answer.`group`=17
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
</if>
<if
test=
"qnYear == null or qnYear == ''"
>
<!-- 年份 -->
AND qn_year = YEAR(NOW())
</if>
<if
test=
"qnYear != null and qnYear != ''"
>
<!-- 年份 -->
AND qn_year = #{qnYear}
</if>
</where>
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.mentorName IS NOT NULL
ORDER BY spaceName
</select>
<select
id=
"selectIncubatedEnterprisesListFour"
resultType=
"com.tiptimes.model.exportDTO.IncubatedEnterprises"
>
SELECT *
FROM (
SELECT t_answer.`group`,
t_record.create_by as spaceName,
MAX(IF(options_id = #{id16}, `value`, NULL)) as enterpriseName,
MAX(IF(options_id = #{id17}, `value`, NULL)) as isSubmitScreenshot,
MAX(IF(options_id = #{id18}, `value`, NULL)) as isSubmitCertificate,
MAX(IF(options_id = #{id19}, `value`, NULL)) as isSubmitIncubation,
MAX(IF(options_id = #{id20}, `value`, NULL)) as isEntryYear
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id
<where>
t_record.process_status = 3 and t_answer.`group`=14
<if
test=
"createId != null and createId != ''"
>
AND create_id = #{createId}
</if>
<if
test=
"qnYear == null or qnYear == ''"
>
<!-- 年份 -->
AND qn_year = YEAR(NOW())
</if>
<if
test=
"qnYear != null and qnYear != ''"
>
<!-- 年份 -->
AND qn_year = #{qnYear}
</if>
</where>
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.enterpriseName IS NOT NULL
ORDER BY spaceName
</select>
<!-- <select id="queryArray" resultType="java.lang.Integer">-->
<!-- SELECT t_options.id FROM t_options-->
...
...
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