Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
appletBusinessAnalysis
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 921bf04a
authored
Dec 02, 2025
by
张富康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
格式化代码
1 parent
57f51c48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
825 additions
and
939 deletions
src/main/java/com/glsk/service/TalentAnalysisService.java
src/main/java/com/glsk/vo/ReqRet.java
src/main/java/com/glsk/service/TalentAnalysisService.java
View file @
921bf04
package
com
.
glsk
.
service
;
import
com.glsk.compute.fullupdatedata.MerchantStatic
;
import
com.glsk.compute.fullupdatedata.QuerySql
;
import
com.glsk.util.DateUtils
;
import
com.glsk.util.MysqlUtils
;
import
com.glsk.vo.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
com.glsk.vo.BusinessType
;
import
com.glsk.vo.ReqRet
;
import
com.glsk.vo.ResponseDTO
;
import
com.glsk.vo.TalentAnalysisIndicatorType
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -25,16 +24,15 @@ import java.util.stream.Collectors;
*/
@Service
@Transactional
@Slf4j
public
class
TalentAnalysisService
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
TalentAnalysisService
.
class
);
/**
* 全部页面--获取基础数据
*
*
/
*/
public
ReqRet
.
TalentAnalysisBasicDataRet
getBasicData
(
ReqRet
.
TalentAnalysisBasicDataReq
req
)
throws
Exception
{
log
ger
.
info
(
"获取基础数据:"
+
req
);
log
.
info
(
"获取基础数据:{}"
,
req
);
ReqRet
.
TalentAnalysisBasicDataRet
ret
=
new
ReqRet
.
TalentAnalysisBasicDataRet
();
Connection
connInsert
=
null
;
...
...
@@ -45,94 +43,80 @@ public class TalentAnalysisService {
ResultSet
rs
=
null
;
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
whereentry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_datexxxxxx"
)){
whereentry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
whereentry_datexxxxxx
=
whereentry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisBasicData01
(
wherebusinesstypexxxxxx
,
whereentry_datexxxxxx
,
connInsert
);
System
.
out
.
println
(
"获取基础数据sql01="
+
sql01
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
//预编译
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
String
businesstype
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
whereentry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_datexxxxxx"
))
{
whereentry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
whereentry_datexxxxxx
=
whereentry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
lists
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
TalentAnalysisBasicDataList
data
=
new
ResponseDTO
.
TalentAnalysisBasicDataList
();
data
.
setActivePersonnelTotalNum
(
rs
.
getInt
(
"activePersonnelTotalNum"
));
//在职人员总数
data
.
setNewEmployeeTotalNum
(
rs
.
getInt
(
"newEmployeeTotalNum"
));
data
.
setCurrentActivePersonnelNum
(
rs
.
getInt
(
"currentActivePersonnelNum"
));
data
.
setResignEmployeelTotalNum
(
rs
.
getInt
(
"resignEmployeelTotalNum"
));
data
.
setRetentionRate
(
rs
.
getDouble
(
"retentionRate"
));
data
.
setResignRate
(
rs
.
getDouble
(
"resignRate"
));
lists
.
add
(
data
);
}
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisBasicData01
(
wherebusinesstypexxxxxx
,
whereentry_datexxxxxx
,
connInsert
);
log
.
info
(
"获取基础数据sql01 = {}"
,
sql01
);
// // 关闭结果集、Statement和连接
// rs.close();
// configrs.close();
// //关闭PreparedStatement
// st.close();
// configst.close();
// //关闭连接
// connInsert.close();
// connQuery02.close();
//预编译
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
lists
=
new
ArrayList
<>();
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
TalentAnalysisBasicDataList
data
=
new
ResponseDTO
.
TalentAnalysisBasicDataList
();
data
.
setActivePersonnelTotalNum
(
rs
.
getInt
(
"activePersonnelTotalNum"
));
//在职人员总数
data
.
setNewEmployeeTotalNum
(
rs
.
getInt
(
"newEmployeeTotalNum"
));
data
.
setCurrentActivePersonnelNum
(
rs
.
getInt
(
"currentActivePersonnelNum"
));
data
.
setResignEmployeelTotalNum
(
rs
.
getInt
(
"resignEmployeelTotalNum"
));
data
.
setRetentionRate
(
rs
.
getDouble
(
"retentionRate"
));
data
.
setResignRate
(
rs
.
getDouble
(
"resignRate"
));
lists
.
add
(
data
);
}
return
ret
;
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
return
ret
;
}
finally
{
// 逆序关闭所有资源
closeQuietly
(
configrs
);
...
...
@@ -145,160 +129,162 @@ public class TalentAnalysisService {
}
private
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisSiling
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisSiling
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis01
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_司龄="
+
sql01
);
// 获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis01
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析_司龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
CompanyTenureAnalysisList
data
=
new
ResponseDTO
.
CompanyTenureAnalysisList
();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
CompanyTenureAnalysisList
data
=
new
ResponseDTO
.
CompanyTenureAnalysisList
();
data
.
setSiling
(
rs
.
getString
(
"siling"
));
//在职人员总数
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
silingList
.
add
(
data
);
}
data
.
setSiling
(
rs
.
getString
(
"siling"
));
//在职人员总数
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
silingList
.
add
(
data
);
}
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
silingList
;
return
silingList
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
List
<
ResponseDTO
.
GenderAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisGender
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
List
<
ResponseDTO
.
GenderAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisGender
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis02
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_性别="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis02
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析_性别={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
GenderAnalysisList
data
=
new
ResponseDTO
.
GenderAnalysisList
();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
GenderAnalysisList
data
=
new
ResponseDTO
.
GenderAnalysisList
();
data
.
setGender
(
rs
.
getString
(
"gender"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
genderList
.
add
(
data
);
}
data
.
setGender
(
rs
.
getString
(
"gender"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
genderList
.
add
(
data
);
}
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
genderList
;
return
genderList
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
List
<
ResponseDTO
.
AgeAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisAge
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
List
<
ResponseDTO
.
AgeAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisAge
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis03
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_年龄="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis03
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析_年龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
AgeAnalysisList
data
=
new
ResponseDTO
.
AgeAnalysisList
();
data
.
setAge
(
rs
.
getString
(
"age"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
ageList
.
add
(
data
);
}
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
AgeAnalysisList
data
=
new
ResponseDTO
.
AgeAnalysisList
();
data
.
setAge
(
rs
.
getString
(
"age"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
ageList
.
add
(
data
);
}
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
ageList
;
return
ageList
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis04
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_学历="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis04
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析_学历={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
AcademicQualificationAnalysisList
data
=
new
ResponseDTO
.
AcademicQualificationAnalysisList
();
data
.
setXueli
(
rs
.
getString
(
"xueli"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
xueliList
.
add
(
data
);
}
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
AcademicQualificationAnalysisList
data
=
new
ResponseDTO
.
AcademicQualificationAnalysisList
();
data
.
setXueli
(
rs
.
getString
(
"xueli"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
xueliList
.
add
(
data
);
}
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
xueliList
;
return
xueliList
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
List
<
ResponseDTO
.
ResignEmployeelList
>
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
List
<
ResponseDTO
.
ResignEmployeelList
>
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis05
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_离职原因="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis05
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析_离职原因={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
ResignEmployeelList
>
LizhiList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
ResignEmployeelList
>
LizhiList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
ResignEmployeelList
data
=
new
ResponseDTO
.
ResignEmployeelList
();
// 遍历结果集
while
(
rs
.
next
())
{
ResponseDTO
.
ResignEmployeelList
data
=
new
ResponseDTO
.
ResignEmployeelList
();
data
.
setResignReason
(
rs
.
getString
(
"change_reason"
));
//在职人员总数
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
LizhiList
.
add
(
data
);
}
// 关闭结果集、Statement和连接
data
.
setResignReason
(
rs
.
getString
(
"change_reason"
));
//在职人员总数
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
LizhiList
.
add
(
data
);
}
// 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
LizhiList
;
return
LizhiList
;
}
finally
{
closeResources
(
rs
,
st
);
}
...
...
@@ -325,7 +311,7 @@ public class TalentAnalysisService {
public
ReqRet
.
SummaryRetentionAnalysisRet
getSummaryRetentionAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
...
...
@@ -333,88 +319,85 @@ public class TalentAnalysisService {
ResultSet
configrs
=
null
;
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
// 执行查询并获取结果
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
)){
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
}
String
user_idxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
// 执行查询并获取结果
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
lists
.
add
(
data
);
String
user_idxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
//关闭连接
connInsert
.
close
();
connQuery02
.
close
();
//关闭连接
connInsert
.
close
();
connQuery02
.
close
();
return
ret
;
return
ret
;
}
finally
{
// 逆序关闭所有资源
...
...
@@ -438,149 +421,153 @@ public class TalentAnalysisService {
}
private
String
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
String
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail01
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_司龄="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail01
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析详情_司龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
staffStrs
;
return
staffStrs
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
String
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
String
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail02
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_性别="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail02
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析详情_性别={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
;
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
staffStrs
;
return
staffStrs
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
String
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
String
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail03
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_年龄="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail03
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析详情_年龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
staffStrs
;
return
staffStrs
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
String
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
String
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail04
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_学历="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail04
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析详情_学历={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
;
// // 关闭结果集、Statement和连接
// rs.close();
// //关闭PreparedStatement
// st.close();
return
staffStrs
;
return
staffStrs
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
private
String
getTalentAnalysisSummaryRetentionAnalysisLizhiUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
private
String
getTalentAnalysisSummaryRetentionAnalysisLizhiUserId
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
indicatorName
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail05
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_离职原因="
+
sql01
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail05
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析详情_离职原因={}"
,
sql01
);
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
// 遍历结果集
while
(
rs
.
next
())
{
staffList
.
add
(
rs
.
getString
(
"user_id"
));
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
// // 关闭结果集、Statement和连接
...
...
@@ -588,18 +575,17 @@ public class TalentAnalysisService {
// //关闭PreparedStatement
// st.close();
// return new String[]{staffStrs, String.valueOf(staffList.size())};
return
staffStrs
;
return
staffStrs
;
}
finally
{
closeResources
(
rs
,
st
);
}
}
public
ReqRet
.
SummaryRetentionAnalysisRet
getSummaryRetentionAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
PreparedStatement
configst
=
null
;
...
...
@@ -607,129 +593,122 @@ public class TalentAnalysisService {
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
}
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
}
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
)){
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
String
andUserId
=
""
;
String
entry_datexxxxxx
=
""
;
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
String
andUserId
=
""
;
String
entry_datexxxxxx
=
""
;
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
()){
case
xueli:
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
siling:
data
.
setXueliList
(
xueliList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
gender:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setAgeList
(
ageList
);
break
;
case
age:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
break
;
default
:
break
;
}
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
())
{
case
xueli:
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
siling:
data
.
setXueliList
(
xueliList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
gender:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setAgeList
(
ageList
);
break
;
case
age:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
break
;
default
:
break
;
}
lists
.
add
(
data
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
return
ret
;
return
ret
;
}
finally
{
closeQuietly
(
configrs
);
closeQuietly
(
configst
);
...
...
@@ -739,11 +718,10 @@ public class TalentAnalysisService {
}
public
ReqRet
.
SummaryRetentionAnalysisRet
getCurrentActivePersonnelAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
...
...
@@ -751,91 +729,89 @@ public class TalentAnalysisService {
ResultSet
configrs
=
null
;
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status','entry_datexxxxxx')"
;
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
)){
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
)){
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
String
user_idxxxxxx
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
}
// 司龄
String
user_idxxxxxx
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
lists
.
add
(
data
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
// //关闭连接
// connInsert.close();
// connQuery02.close();
return
ret
;
return
ret
;
}
finally
{
// 逆序关闭所有资源
closeQuietly
(
configrs
);
...
...
@@ -848,139 +824,132 @@ public class TalentAnalysisService {
public
ReqRet
.
SummaryRetentionAnalysisRet
getCurrentActivePersonnelAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
PreparedStatement
configst
=
null
;
ResultSet
configrs
=
null
;
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
)){
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
)){
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
String
andUserId
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
())){
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
String
andUserId
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
()){
case
xueli:
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
siling:
data
.
setXueliList
(
xueliList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
gender:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setAgeList
(
ageList
);
break
;
case
age:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
break
;
default
:
break
;
}
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
())
{
case
xueli:
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
siling:
data
.
setXueliList
(
xueliList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
gender:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setAgeList
(
ageList
);
break
;
case
age:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
break
;
default
:
break
;
}
lists
.
add
(
data
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
return
ret
;
return
ret
;
}
finally
{
// 逆序关闭所有资源
closeQuietly
(
configrs
);
...
...
@@ -991,12 +960,10 @@ public class TalentAnalysisService {
}
public
ReqRet
.
ResignEmployeelAnalysisRet
getResignEmployeelAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
ReqRet
.
ResignEmployeelAnalysisRet
ret
=
new
ReqRet
.
ResignEmployeelAnalysisRet
();
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
...
...
@@ -1004,98 +971,93 @@ public class TalentAnalysisService {
ResultSet
configrs
=
null
;
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','lizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
(
);
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
)){
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
)){
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
}
}
String
user_idxxxxxx
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','lizhizz_status','entry_datexxxxxx')"
;
// 离职原因
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
lists
.
add
(
data
);
String
user_idxxxxxx
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
// 离职原因
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
// //关闭连接
// connInsert.close();
// connQuery02.close();
return
ret
;
return
ret
;
}
finally
{
// 逆序关闭所有资源
closeQuietly
(
configrs
);
...
...
@@ -1108,7 +1070,7 @@ public class TalentAnalysisService {
public
ReqRet
.
ResignEmployeelAnalysisRet
getResignEmployeelAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
ReqRet
.
ResignEmployeelAnalysisRet
ret
=
new
ReqRet
.
ResignEmployeelAnalysisRet
();
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
...
...
@@ -1116,151 +1078,145 @@ public class TalentAnalysisService {
ResultSet
configrs
=
null
;
try
{
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','lizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
connInsert
=
MysqlUtils
.
getConnection
(
"insert"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
}
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
)){
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
)){
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
)){
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','lizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
String
andUserId
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
String
andUserId
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
// String[] UserIds=null;
if
(
TalentAnalysisIndicatorType
.
resignReason
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 离职原因
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisLizhiUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
if
(
TalentAnalysisIndicatorType
.
resignReason
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 离职原因
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisLizhiUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
}
// andUserId=UserIds[0];
// int num = Integer.parseInt(UserIds[1]);
// 离职原因
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
()){
case
resignReason:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
xueli:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
siling:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
gender:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setAgeList
(
ageList
);
break
;
case
age:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
break
;
default
:
break
;
}
// 离职原因
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
())
{
case
resignReason:
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
xueli:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
siling:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setGenderList
(
genderList
);
data
.
setAgeList
(
ageList
);
break
;
case
gender:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setAgeList
(
ageList
);
break
;
case
age:
data
.
setResignReasonList
(
resignReasonList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
break
;
default
:
break
;
}
lists
.
add
(
data
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
return
ret
;
return
ret
;
}
finally
{
// 逆序关闭所有资源
closeQuietly
(
configrs
);
...
...
src/main/java/com/glsk/vo/ReqRet.java
View file @
921bf04
...
...
@@ -2,6 +2,8 @@ package com.glsk.vo;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.ToString
;
import
java.io.Serializable
;
import
java.sql.Date
;
...
...
@@ -788,7 +790,7 @@ public class ReqRet {
public
static
class
OutputAndMernumReq
implements
Serializable
{
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// private String itemname;
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"yanbao"
)
private
BusinessType
business_type
;
...
...
@@ -1056,7 +1058,7 @@ public class ReqRet {
public
static
class
MerRankingReq
implements
Serializable
{
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// private String itemname;
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"yanbao"
)
private
BusinessType
business_type
;
...
...
@@ -1306,6 +1308,8 @@ public class ReqRet {
/*人才分析*/
//获取基础数据
@Data
@ToString
public
static
class
TalentAnalysisBasicDataReq
implements
Serializable
{
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"all"
)
private
BusinessType
businessType
;
...
...
@@ -1324,84 +1328,10 @@ public class ReqRet {
String
staffName
;
@ApiModelProperty
(
notes
=
"员工手机"
,
required
=
true
,
example
=
"13112341524"
)
String
staffPhone
;
@Override
public
String
toString
()
{
return
"TalentAnalysisBasicDataReq{"
+
"businessType="
+
businessType
+
", queryType="
+
queryType
+
", startDay='"
+
startDay
+
'\''
+
", endDay='"
+
endDay
+
'\''
+
", jobName="
+
jobName
+
", staffId='"
+
staffId
+
'\''
+
", staffName='"
+
staffName
+
'\''
+
", staffPhone='"
+
staffPhone
+
'\''
+
'}'
;
}
public
BusinessType
getBusinessType
()
{
return
businessType
;
}
public
void
setBusinessType
(
BusinessType
businessType
)
{
this
.
businessType
=
businessType
;
}
public
QueryType
getQueryType
()
{
return
queryType
;
}
public
void
setQueryType
(
QueryType
queryType
)
{
this
.
queryType
=
queryType
;
}
public
String
getStartDay
()
{
return
startDay
;
}
public
void
setStartDay
(
String
startDay
)
{
this
.
startDay
=
startDay
;
}
public
String
getEndDay
()
{
return
endDay
;
}
public
void
setEndDay
(
String
endDay
)
{
this
.
endDay
=
endDay
;
}
public
JobNameEnum
getJobName
()
{
return
jobName
;
}
public
void
setJobName
(
JobNameEnum
jobName
)
{
this
.
jobName
=
jobName
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getStaffPhone
()
{
return
staffPhone
;
}
public
void
setStaffPhone
(
String
staffPhone
)
{
this
.
staffPhone
=
staffPhone
;
}
@ApiModelProperty
(
notes
=
"角色"
,
required
=
true
,
example
=
"1"
)
Integer
role
;
@ApiModelProperty
(
notes
=
"门店ids"
,
required
=
true
,
example
=
"1"
)
List
<
Integer
>
merchantIds
;
}
//汇总留存分析
...
...
@@ -1593,7 +1523,7 @@ public class ReqRet {
/*人才分析*/
/*人才分析*/
//获取基础数据
public
static
class
TalentAnalysisBasicDataRet
{
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
...
...
@@ -1603,54 +1533,54 @@ public class ReqRet {
@ApiModelProperty
(
notes
=
"数据集合"
)
private
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
list
;
public
int
getCode
()
{
return
code
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
getList
()
{
return
list
;
}
public
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
list
)
{
this
.
list
=
list
;
public
void
setList
(
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
list
)
{
this
.
list
=
list
;
}
}
}
//汇总留存分析
public
static
class
SummaryRetentionAnalysisRet
{
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
private
int
code
;
@ApiModelProperty
(
notes
=
"返回说明"
)
private
String
message
;
@ApiModelProperty
(
notes
=
"数据集合"
)
private
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
list
;
public
int
getCode
()
{
return
code
;
}
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
private
int
code
;
@ApiModelProperty
(
notes
=
"返回说明"
)
private
String
message
;
@ApiModelProperty
(
notes
=
"数据集合"
)
private
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
list
;
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
int
getCode
(
)
{
return
code
;
}
public
String
getMessage
(
)
{
return
messag
e
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
cod
e
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
getList
()
{
return
list
;
...
...
@@ -1663,28 +1593,28 @@ public class ReqRet {
//汇总留存分析
public
static
class
ResignEmployeelAnalysisRet
{
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
private
int
code
;
@ApiModelProperty
(
notes
=
"返回说明"
)
private
String
message
;
@ApiModelProperty
(
notes
=
"数据集合"
)
private
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
list
;
public
int
getCode
()
{
return
code
;
}
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
private
int
code
;
@ApiModelProperty
(
notes
=
"返回说明"
)
private
String
message
;
@ApiModelProperty
(
notes
=
"数据集合"
)
private
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
list
;
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
int
getCode
(
)
{
return
code
;
}
public
String
getMessage
(
)
{
return
messag
e
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
cod
e
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
getList
()
{
return
list
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment