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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
305 additions
and
419 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
;
package
com
.
glsk
.
service
;
import
com.glsk.compute.fullupdatedata.MerchantStatic
;
import
com.glsk.compute.fullupdatedata.QuerySql
;
import
com.glsk.compute.fullupdatedata.QuerySql
;
import
com.glsk.util.DateUtils
;
import
com.glsk.util.MysqlUtils
;
import
com.glsk.util.MysqlUtils
;
import
com.glsk.vo.*
;
import
com.glsk.vo.BusinessType
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.glsk.vo.ReqRet
;
import
org.apache.logging.log4j.LogManager
;
import
com.glsk.vo.ResponseDTO
;
import
org.apache.logging.log4j.Logger
;
import
com.glsk.vo.TalentAnalysisIndicatorType
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -25,16 +24,15 @@ import java.util.stream.Collectors;
...
@@ -25,16 +24,15 @@ import java.util.stream.Collectors;
*/
*/
@Service
@Service
@Transactional
@Transactional
@Slf4j
public
class
TalentAnalysisService
{
public
class
TalentAnalysisService
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
TalentAnalysisService
.
class
);
/**
/**
* 全部页面--获取基础数据
* 全部页面--获取基础数据
*
*
/
*/
public
ReqRet
.
TalentAnalysisBasicDataRet
getBasicData
(
ReqRet
.
TalentAnalysisBasicDataReq
req
)
throws
Exception
{
public
ReqRet
.
TalentAnalysisBasicDataRet
getBasicData
(
ReqRet
.
TalentAnalysisBasicDataReq
req
)
throws
Exception
{
log
ger
.
info
(
"获取基础数据:"
+
req
);
log
.
info
(
"获取基础数据:{}"
,
req
);
ReqRet
.
TalentAnalysisBasicDataRet
ret
=
new
ReqRet
.
TalentAnalysisBasicDataRet
();
ReqRet
.
TalentAnalysisBasicDataRet
ret
=
new
ReqRet
.
TalentAnalysisBasicDataRet
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
...
@@ -50,50 +48,50 @@ public class TalentAnalysisService {
...
@@ -50,50 +48,50 @@ public class TalentAnalysisService {
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
String
businesstype
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','entry_datexxxxxx')"
;
"and config_name in ('"
+
businesstype
+
"','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
whereentry_datexxxxxx
=
""
;
String
whereentry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_datexxxxxx"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_datexxxxxx"
))
{
whereentry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
whereentry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
whereentry_datexxxxxx
=
whereentry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
whereentry_datexxxxxx
=
whereentry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
//获取sql
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisBasicData01
(
wherebusinesstypexxxxxx
,
whereentry_datexxxxxx
,
connInsert
);
String
sql01
=
QuerySql
.
getTalentAnalysisBasicData01
(
wherebusinesstypexxxxxx
,
whereentry_datexxxxxx
,
connInsert
);
System
.
out
.
println
(
"获取基础数据sql01="
+
sql01
);
log
.
info
(
"获取基础数据sql01 = {}"
,
sql01
);
//预编译
//预编译
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
...
@@ -104,7 +102,7 @@ public class TalentAnalysisService {
...
@@ -104,7 +102,7 @@ public class TalentAnalysisService {
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
ResponseDTO
.
TalentAnalysisBasicDataList
data
=
new
ResponseDTO
.
TalentAnalysisBasicDataList
();
ResponseDTO
.
TalentAnalysisBasicDataList
data
=
new
ResponseDTO
.
TalentAnalysisBasicDataList
();
data
.
setActivePersonnelTotalNum
(
rs
.
getInt
(
"activePersonnelTotalNum"
));
//在职人员总数
data
.
setActivePersonnelTotalNum
(
rs
.
getInt
(
"activePersonnelTotalNum"
));
//在职人员总数
data
.
setNewEmployeeTotalNum
(
rs
.
getInt
(
"newEmployeeTotalNum"
));
data
.
setNewEmployeeTotalNum
(
rs
.
getInt
(
"newEmployeeTotalNum"
));
data
.
setCurrentActivePersonnelNum
(
rs
.
getInt
(
"currentActivePersonnelNum"
));
data
.
setCurrentActivePersonnelNum
(
rs
.
getInt
(
"currentActivePersonnelNum"
));
...
@@ -115,23 +113,9 @@ public class TalentAnalysisService {
...
@@ -115,23 +113,9 @@ public class TalentAnalysisService {
}
}
// // 关闭结果集、Statement和连接
// rs.close();
// configrs.close();
// //关闭PreparedStatement
// st.close();
// configst.close();
// //关闭连接
// connInsert.close();
// connQuery02.close();
ret
.
setCode
(
0
);
ret
.
setCode
(
0
);
ret
.
setMessage
(
"success"
);
ret
.
setMessage
(
"success"
);
ret
.
setList
(
lists
);
ret
.
setList
(
lists
);
return
ret
;
return
ret
;
}
finally
{
}
finally
{
// 逆序关闭所有资源
// 逆序关闭所有资源
...
@@ -145,24 +129,22 @@ public class TalentAnalysisService {
...
@@ -145,24 +129,22 @@ 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
{
// 获取sql
private
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
getTalentAnalysisSummaryRetentionAnalysisSiling
(
Connection
connInsert
,
Connection
connQuery02
,
String
wherebusinesstypexxxxxx
,
String
user_idxxxxxx
,
String
wherezz_statusxxxxxx
,
String
entry_datexxxxxx
)
throws
Exception
{
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis01
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
log
.
info
(
"人才分析汇总留存分析_司龄={}"
,
sql01
);
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis01
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_司龄="
+
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
ResponseDTO
.
CompanyTenureAnalysisList
data
=
new
ResponseDTO
.
CompanyTenureAnalysisList
();
ResponseDTO
.
CompanyTenureAnalysisList
data
=
new
ResponseDTO
.
CompanyTenureAnalysisList
();
data
.
setSiling
(
rs
.
getString
(
"siling"
));
//在职人员总数
data
.
setSiling
(
rs
.
getString
(
"siling"
));
//在职人员总数
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
...
@@ -178,22 +160,23 @@ public class TalentAnalysisService {
...
@@ -178,22 +160,23 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis02
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis02
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_性别="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析_性别={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
ResponseDTO
.
GenderAnalysisList
data
=
new
ResponseDTO
.
GenderAnalysisList
();
ResponseDTO
.
GenderAnalysisList
data
=
new
ResponseDTO
.
GenderAnalysisList
();
data
.
setGender
(
rs
.
getString
(
"gender"
));
data
.
setGender
(
rs
.
getString
(
"gender"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
...
@@ -209,22 +192,23 @@ public class TalentAnalysisService {
...
@@ -209,22 +192,23 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis03
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis03
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_年龄="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析_年龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
ResponseDTO
.
AgeAnalysisList
data
=
new
ResponseDTO
.
AgeAnalysisList
();
ResponseDTO
.
AgeAnalysisList
data
=
new
ResponseDTO
.
AgeAnalysisList
();
data
.
setAge
(
rs
.
getString
(
"age"
));
data
.
setAge
(
rs
.
getString
(
"age"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
...
@@ -239,11 +223,12 @@ public class TalentAnalysisService {
...
@@ -239,11 +223,12 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis04
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis04
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_学历="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析_学历={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
...
@@ -251,11 +236,11 @@ public class TalentAnalysisService {
...
@@ -251,11 +236,11 @@ public class TalentAnalysisService {
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
ResponseDTO
.
AcademicQualificationAnalysisList
data
=
new
ResponseDTO
.
AcademicQualificationAnalysisList
();
ResponseDTO
.
AcademicQualificationAnalysisList
data
=
new
ResponseDTO
.
AcademicQualificationAnalysisList
();
data
.
setXueli
(
rs
.
getString
(
"xueli"
));
data
.
setXueli
(
rs
.
getString
(
"xueli"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
data
.
setRatio
(
rs
.
getDouble
(
"ratio"
));
...
@@ -271,11 +256,12 @@ public class TalentAnalysisService {
...
@@ -271,11 +256,12 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis05
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysis05
(
wherebusinesstypexxxxxx
,
connInsert
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析_离职原因="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析_离职原因={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
...
@@ -283,11 +269,11 @@ public class TalentAnalysisService {
...
@@ -283,11 +269,11 @@ public class TalentAnalysisService {
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
List
<
ResponseDTO
.
ResignEmployeelList
>
LizhiList
=
new
ArrayList
<>();
List
<
ResponseDTO
.
ResignEmployeelList
>
LizhiList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
ResponseDTO
.
ResignEmployeelList
data
=
new
ResponseDTO
.
ResignEmployeelList
();
ResponseDTO
.
ResignEmployeelList
data
=
new
ResponseDTO
.
ResignEmployeelList
();
data
.
setResignReason
(
rs
.
getString
(
"change_reason"
));
//在职人员总数
data
.
setResignReason
(
rs
.
getString
(
"change_reason"
));
//在职人员总数
data
.
setNum
(
rs
.
getInt
(
"num"
));
data
.
setNum
(
rs
.
getInt
(
"num"
));
...
@@ -325,7 +311,7 @@ public class TalentAnalysisService {
...
@@ -325,7 +311,7 @@ public class TalentAnalysisService {
public
ReqRet
.
SummaryRetentionAnalysisRet
getSummaryRetentionAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
public
ReqRet
.
SummaryRetentionAnalysisRet
getSummaryRetentionAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
Connection
connQuery02
=
null
;
...
@@ -337,65 +323,62 @@ public class TalentAnalysisService {
...
@@ -337,65 +323,62 @@ public class TalentAnalysisService {
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
String
businesstype
=
""
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
}
else
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
// 执行查询并获取结果
// 执行查询并获取结果
configrs
=
configst
.
executeQuery
();
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
String
user_idxxxxxx
=
""
;
String
user_idxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
// 司龄
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
data
.
setXueliList
(
xueliList
);
data
.
setXueliList
(
xueliList
);
...
@@ -438,17 +421,17 @@ public class TalentAnalysisService {
...
@@ -438,17 +421,17 @@ 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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail01
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail01
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_司龄="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析详情_司龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
...
@@ -456,7 +439,7 @@ public class TalentAnalysisService {
...
@@ -456,7 +439,7 @@ public class TalentAnalysisService {
}
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
// // 关闭结果集、Statement和连接
// // 关闭结果集、Statement和连接
...
@@ -468,17 +451,18 @@ public class TalentAnalysisService {
...
@@ -468,17 +451,18 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail02
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail02
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_性别="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析详情_性别={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
...
@@ -486,7 +470,7 @@ public class TalentAnalysisService {
...
@@ -486,7 +470,7 @@ public class TalentAnalysisService {
}
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffStrs
=
"and user_id in "
+
staffListStr
;
// // 关闭结果集、Statement和连接
// // 关闭结果集、Statement和连接
...
@@ -498,18 +482,19 @@ public class TalentAnalysisService {
...
@@ -498,18 +482,19 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail03
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail03
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_年龄="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析详情_年龄={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
...
@@ -517,7 +502,7 @@ public class TalentAnalysisService {
...
@@ -517,7 +502,7 @@ public class TalentAnalysisService {
}
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
// // 关闭结果集、Statement和连接
// // 关闭结果集、Statement和连接
...
@@ -529,18 +514,19 @@ public class TalentAnalysisService {
...
@@ -529,18 +514,19 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail04
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail04
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_学历="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析详情_学历={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
...
@@ -548,7 +534,7 @@ public class TalentAnalysisService {
...
@@ -548,7 +534,7 @@ public class TalentAnalysisService {
}
}
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffStrs
=
"and user_id in "
+
staffListStr
;
// // 关闭结果集、Statement和连接
// // 关闭结果集、Statement和连接
...
@@ -560,18 +546,19 @@ public class TalentAnalysisService {
...
@@ -560,18 +546,19 @@ public class TalentAnalysisService {
closeResources
(
rs
,
st
);
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
//获取sql
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail05
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
String
sql01
=
QuerySql
.
getTalentAnalysisSummaryRetentionAnalysisDetail05
(
wherebusinesstypexxxxxx
,
indicatorName
,
connInsert
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
System
.
out
.
println
(
"人才分析汇总留存分析详情_离职原因="
+
sql01
);
log
.
info
(
"人才分析汇总留存分析详情_离职原因={}"
,
sql01
);
PreparedStatement
st
=
null
;
PreparedStatement
st
=
null
;
ResultSet
rs
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
st
=
connQuery02
.
prepareStatement
(
sql01
);
st
=
connQuery02
.
prepareStatement
(
sql01
);
rs
=
st
.
executeQuery
();
rs
=
st
.
executeQuery
();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
ArrayList
<
String
>
staffList
=
new
ArrayList
<>();
// 遍历结果集
// 遍历结果集
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
...
@@ -580,7 +567,7 @@ public class TalentAnalysisService {
...
@@ -580,7 +567,7 @@ public class TalentAnalysisService {
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffListStr
=
staffList
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
"','"
,
"('"
,
"')"
));
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
String
staffStrs
=
"and user_id in "
+
staffListStr
+
""
;
// // 关闭结果集、Statement和连接
// // 关闭结果集、Statement和连接
...
@@ -595,11 +582,10 @@ public class TalentAnalysisService {
...
@@ -595,11 +582,10 @@ public class TalentAnalysisService {
}
}
public
ReqRet
.
SummaryRetentionAnalysisRet
getSummaryRetentionAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
public
ReqRet
.
SummaryRetentionAnalysisRet
getSummaryRetentionAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
Connection
connQuery02
=
null
;
PreparedStatement
configst
=
null
;
PreparedStatement
configst
=
null
;
...
@@ -611,91 +597,85 @@ public class TalentAnalysisService {
...
@@ -611,91 +597,85 @@ public class TalentAnalysisService {
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
String
businesstype
=
""
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
}
else
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
String
andUserId
=
""
;
String
andUserId
=
""
;
String
entry_datexxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
// 司龄
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
())
{
switch
(
req
.
getIndicatorType
()){
case
xueli:
case
xueli:
data
.
setSilingList
(
silingList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setGenderList
(
genderList
);
...
@@ -721,7 +701,6 @@ public class TalentAnalysisService {
...
@@ -721,7 +701,6 @@ public class TalentAnalysisService {
}
}
lists
.
add
(
data
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setCode
(
0
);
...
@@ -739,11 +718,10 @@ public class TalentAnalysisService {
...
@@ -739,11 +718,10 @@ public class TalentAnalysisService {
}
}
public
ReqRet
.
SummaryRetentionAnalysisRet
getCurrentActivePersonnelAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
public
ReqRet
.
SummaryRetentionAnalysisRet
getCurrentActivePersonnelAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
Connection
connQuery02
=
null
;
...
@@ -755,68 +733,66 @@ public class TalentAnalysisService {
...
@@ -755,68 +733,66 @@ public class TalentAnalysisService {
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
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')"
;
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
String
user_idxxxxxx
=
""
;
String
user_idxxxxxx
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
// 司龄
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
data
.
setXueliList
(
xueliList
);
data
.
setXueliList
(
xueliList
);
...
@@ -848,7 +824,7 @@ public class TalentAnalysisService {
...
@@ -848,7 +824,7 @@ public class TalentAnalysisService {
public
ReqRet
.
SummaryRetentionAnalysisRet
getCurrentActivePersonnelAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
public
ReqRet
.
SummaryRetentionAnalysisRet
getCurrentActivePersonnelAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
ReqRet
.
SummaryRetentionAnalysisRet
ret
=
new
ReqRet
.
SummaryRetentionAnalysisRet
();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
List
<
ResponseDTO
.
SummaryRetentionAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
ResponseDTO
.
SummaryRetentionAnalysisList
data
=
new
ResponseDTO
.
SummaryRetentionAnalysisList
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
Connection
connQuery02
=
null
;
PreparedStatement
configst
=
null
;
PreparedStatement
configst
=
null
;
...
@@ -859,95 +835,89 @@ public class TalentAnalysisService {
...
@@ -859,95 +835,89 @@ public class TalentAnalysisService {
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
String
businesstype
=
""
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
}
else
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
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')"
;
"and config_name in ('"
+
businesstype
+
"','zaizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
String
andUserId
=
""
;
String
andUserId
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
// 司龄
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
())
{
switch
(
req
.
getIndicatorType
())
{
case
xueli:
case
xueli:
data
.
setSilingList
(
silingList
);
data
.
setSilingList
(
silingList
);
data
.
setGenderList
(
genderList
);
data
.
setGenderList
(
genderList
);
...
@@ -973,7 +943,6 @@ public class TalentAnalysisService {
...
@@ -973,7 +943,6 @@ public class TalentAnalysisService {
}
}
lists
.
add
(
data
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setCode
(
0
);
...
@@ -991,12 +960,10 @@ public class TalentAnalysisService {
...
@@ -991,12 +960,10 @@ public class TalentAnalysisService {
}
}
public
ReqRet
.
ResignEmployeelAnalysisRet
getResignEmployeelAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
public
ReqRet
.
ResignEmployeelAnalysisRet
getResignEmployeelAnalysis
(
ReqRet
.
SummaryRetentionAnalysisReq
req
)
throws
Exception
{
ReqRet
.
ResignEmployeelAnalysisRet
ret
=
new
ReqRet
.
ResignEmployeelAnalysisRet
();
ReqRet
.
ResignEmployeelAnalysisRet
ret
=
new
ReqRet
.
ResignEmployeelAnalysisRet
();
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
lists
=
new
ArrayList
<>();
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
Connection
connQuery02
=
null
;
...
@@ -1008,75 +975,70 @@ public class TalentAnalysisService {
...
@@ -1008,75 +975,70 @@ public class TalentAnalysisService {
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
String
businesstype
=
""
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
}
else
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
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')"
;
"and config_name in ('"
+
businesstype
+
"','lizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
(
);
configrs
=
configst
.
executeQuery
(
);
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
String
user_idxxxxxx
=
""
;
String
user_idxxxxxx
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
// 离职原因
// 离职原因
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
user_idxxxxxx
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
data
.
setResignReasonList
(
resignReasonList
);
data
.
setResignReasonList
(
resignReasonList
);
...
@@ -1108,7 +1070,7 @@ public class TalentAnalysisService {
...
@@ -1108,7 +1070,7 @@ public class TalentAnalysisService {
public
ReqRet
.
ResignEmployeelAnalysisRet
getResignEmployeelAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
public
ReqRet
.
ResignEmployeelAnalysisRet
getResignEmployeelAnalysisDetail
(
ReqRet
.
SummaryRetentionAnalysisDetailReq
req
)
throws
Exception
{
ReqRet
.
ResignEmployeelAnalysisRet
ret
=
new
ReqRet
.
ResignEmployeelAnalysisRet
();
ReqRet
.
ResignEmployeelAnalysisRet
ret
=
new
ReqRet
.
ResignEmployeelAnalysisRet
();
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
lists
=
new
ArrayList
<>();
List
<
ResponseDTO
.
ResignEmployeelAnalysisList
>
lists
=
new
ArrayList
<>();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
ResponseDTO
.
ResignEmployeelAnalysisList
data
=
new
ResponseDTO
.
ResignEmployeelAnalysisList
();
Connection
connInsert
=
null
;
Connection
connInsert
=
null
;
Connection
connQuery02
=
null
;
Connection
connQuery02
=
null
;
...
@@ -1120,73 +1082,71 @@ public class TalentAnalysisService {
...
@@ -1120,73 +1082,71 @@ public class TalentAnalysisService {
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
connQuery02
=
MysqlUtils
.
getConnection
(
"scrm_account"
);
// 确保req.getBusinessType()不为null
// 确保req.getBusinessType()不为null
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()==
null
||
req
.
getEndDay
()==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()==
null
)
{
if
(
req
.
getBusinessType
()
==
null
||
req
.
getStartDay
()
==
null
||
req
.
getEndDay
()
==
null
||
req
.
getIndicatorType
()
==
null
||
req
.
getIndicatorName
()
==
null
)
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
ret
.
setMessage
(
"BusinessType、StartDay、EndDay、IndicatorType、IndicatorName不能为null"
);
return
ret
;
return
ret
;
}
}
String
businesstype
=
""
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
()))
{
String
businesstype
=
""
;
businesstype
=
"talentAnalysisBI_businesstype_all"
;
if
(
BusinessType
.
all
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_all"
;
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
}
else
if
(
BusinessType
.
yanbao
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_yanbao"
;
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
}
else
if
(
BusinessType
.
quanyi
.
equals
(
req
.
getBusinessType
())){
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
()))
{
businesstype
=
"talentAnalysisBI_businesstype_quanyi"
;
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
if
(
BusinessType
.
qinggai
.
equals
(
req
.
getBusinessType
())){
}
else
{
businesstype
=
"talentAnalysisBI_businesstype_qinggai"
;
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
}
}
String
configSql
=
"select config_name,config_context from business_analysis_config where deleted_flag='N' \n"
+
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')"
;
"and config_name in ('"
+
businesstype
+
"','lizhizz_status','entry_datexxxxxx')"
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherebusinesstypexxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
wherezz_statusxxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
String
entry_datexxxxxx
=
""
;
configst
=
connInsert
.
prepareStatement
(
configSql
);
configst
=
connInsert
.
prepareStatement
(
configSql
);
configrs
=
configst
.
executeQuery
();
configrs
=
configst
.
executeQuery
();
while
(
configrs
.
next
())
{
while
(
configrs
.
next
())
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"talentAnalysisBI_businesstype"
))
{
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
wherebusinesstypexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"zz_status"
))
{
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
wherezz_statusxxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
if
(
configrs
.
getString
(
"config_name"
).
contains
(
"entry_date"
))
{
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
entry_datexxxxxx
=
configrs
.
getString
(
"config_context"
);
}
}
}
}
String
andUserId
=
""
;
String
andUserId
=
""
;
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
entry_datexxxxxx
=
entry_datexxxxxx
.
replace
(
"startDayxxxxxx"
,
req
.
getStartDay
()).
replace
(
"endDayxxxxxx"
,
req
.
getEndDay
());
// String[] UserIds=null;
// String[] UserIds=null;
if
(
TalentAnalysisIndicatorType
.
resignReason
.
equals
(
req
.
getIndicatorType
()))
{
if
(
TalentAnalysisIndicatorType
.
resignReason
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 离职原因
//如果选择的是 离职原因
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisLizhiUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisLizhiUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
siling
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 司龄
//如果选择的是 司龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysisSilingUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
gender
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 性别
//如果选择的是 性别
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissGenderUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
age
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 年龄
//如果选择的是 年龄
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissAgeUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
}
else
if
(
TalentAnalysisIndicatorType
.
xueli
.
equals
(
req
.
getIndicatorType
()))
{
//如果选择的是 学历
//如果选择的是 学历
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
andUserId
=
getTalentAnalysisSummaryRetentionAnalysissXueliUserId
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
req
.
getIndicatorName
(),
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
}
else
{
}
else
{
ret
.
setCode
(-
1
);
ret
.
setCode
(-
1
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
ret
.
setMessage
(
"BusinessType有误,请检查"
);
return
ret
;
return
ret
;
...
@@ -1196,25 +1156,24 @@ public class TalentAnalysisService {
...
@@ -1196,25 +1156,24 @@ public class TalentAnalysisService {
// int num = Integer.parseInt(UserIds[1]);
// int num = Integer.parseInt(UserIds[1]);
// 离职原因
// 离职原因
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
List
<
ResponseDTO
.
ResignEmployeelList
>
resignReasonList
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisLizhi
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 司龄
// 司龄
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
List
<
ResponseDTO
.
CompanyTenureAnalysisList
>
silingList
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisSiling
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 性别
// 性别
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
List
<
ResponseDTO
.
GenderAnalysisList
>
genderList
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisGender
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 年龄
// 年龄
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
List
<
ResponseDTO
.
AgeAnalysisList
>
ageList
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisAge
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
// 学历
// 学历
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
List
<
ResponseDTO
.
AcademicQualificationAnalysisList
>
xueliList
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
=
getTalentAnalysisSummaryRetentionAnalysisXueliList
(
connInsert
,
connQuery02
,
wherebusinesstypexxxxxx
,
andUserId
,
wherezz_statusxxxxxx
,
entry_datexxxxxx
);
switch
(
req
.
getIndicatorType
())
{
switch
(
req
.
getIndicatorType
())
{
case
resignReason:
case
resignReason:
data
.
setXueliList
(
xueliList
);
data
.
setXueliList
(
xueliList
);
data
.
setSilingList
(
silingList
);
data
.
setSilingList
(
silingList
);
...
@@ -1250,9 +1209,6 @@ public class TalentAnalysisService {
...
@@ -1250,9 +1209,6 @@ public class TalentAnalysisService {
}
}
lists
.
add
(
data
);
lists
.
add
(
data
);
ret
.
setCode
(
0
);
ret
.
setCode
(
0
);
...
...
src/main/java/com/glsk/vo/ReqRet.java
View file @
921bf04
...
@@ -2,6 +2,8 @@ package com.glsk.vo;
...
@@ -2,6 +2,8 @@ package com.glsk.vo;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.ToString
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.sql.Date
;
import
java.sql.Date
;
...
@@ -788,7 +790,7 @@ public class ReqRet {
...
@@ -788,7 +790,7 @@ public class ReqRet {
public
static
class
OutputAndMernumReq
implements
Serializable
{
public
static
class
OutputAndMernumReq
implements
Serializable
{
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// private String itemname;
// private String itemname;
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"yanbao"
)
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"yanbao"
)
private
BusinessType
business_type
;
private
BusinessType
business_type
;
...
@@ -1056,7 +1058,7 @@ public class ReqRet {
...
@@ -1056,7 +1058,7 @@ public class ReqRet {
public
static
class
MerRankingReq
implements
Serializable
{
public
static
class
MerRankingReq
implements
Serializable
{
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// @ApiModelProperty(notes = "项目名称,例如:赛力斯" , example="赛力斯")
// private String itemname;
// private String itemname;
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"yanbao"
)
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"yanbao"
)
private
BusinessType
business_type
;
private
BusinessType
business_type
;
...
@@ -1306,6 +1308,8 @@ public class ReqRet {
...
@@ -1306,6 +1308,8 @@ public class ReqRet {
/*人才分析*/
/*人才分析*/
//获取基础数据
//获取基础数据
@Data
@ToString
public
static
class
TalentAnalysisBasicDataReq
implements
Serializable
{
public
static
class
TalentAnalysisBasicDataReq
implements
Serializable
{
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"all"
)
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
,
example
=
"all"
)
private
BusinessType
businessType
;
private
BusinessType
businessType
;
...
@@ -1324,84 +1328,10 @@ public class ReqRet {
...
@@ -1324,84 +1328,10 @@ public class ReqRet {
String
staffName
;
String
staffName
;
@ApiModelProperty
(
notes
=
"员工手机"
,
required
=
true
,
example
=
"13112341524"
)
@ApiModelProperty
(
notes
=
"员工手机"
,
required
=
true
,
example
=
"13112341524"
)
String
staffPhone
;
String
staffPhone
;
@ApiModelProperty
(
notes
=
"角色"
,
required
=
true
,
example
=
"1"
)
@Override
Integer
role
;
public
String
toString
()
{
@ApiModelProperty
(
notes
=
"门店ids"
,
required
=
true
,
example
=
"1"
)
return
"TalentAnalysisBasicDataReq{"
+
List
<
Integer
>
merchantIds
;
"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
;
}
}
}
//汇总留存分析
//汇总留存分析
...
@@ -1593,7 +1523,7 @@ public class ReqRet {
...
@@ -1593,7 +1523,7 @@ public class ReqRet {
/*人才分析*/
/*人才分析*/
//获取基础数据
//获取基础数据
public
static
class
TalentAnalysisBasicDataRet
{
public
static
class
TalentAnalysisBasicDataRet
{
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
...
@@ -1626,7 +1556,7 @@ public class ReqRet {
...
@@ -1626,7 +1556,7 @@ public class ReqRet {
public
void
setList
(
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
list
)
{
public
void
setList
(
List
<
ResponseDTO
.
TalentAnalysisBasicDataList
>
list
)
{
this
.
list
=
list
;
this
.
list
=
list
;
}
}
}
}
//汇总留存分析
//汇总留存分析
public
static
class
SummaryRetentionAnalysisRet
{
public
static
class
SummaryRetentionAnalysisRet
{
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
@ApiModelProperty
(
notes
=
"返回编码,0-正常,1-错误"
)
...
...
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