Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
fd8c3139
Commit
fd8c3139
authored
Apr 13, 2022
by
wenyang
Committed by
akexiu
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.团队成员活动量得分排序【 1:天;2:周;3:月(不传默认2:周)】
2.团队业绩完成率统计根据该团队下经纪人设置的目标fyc计算
parent
d96d648b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
1 deletions
+53
-1
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+17
-1
yd-api/src/main/java/com/yd/api/practitioner/service/impl/ScheduleTrackServiceImpl.java
+26
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/sechedule/QueryPEPScoreRequestVO.java
+10
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
fd8c3139
...
@@ -3019,20 +3019,36 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
...
@@ -3019,20 +3019,36 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List
<
SubordinateSystemMemberInfo
>
memberInfoList
=
new
ArrayList
<>(
memberInfoMap
.
values
());
List
<
SubordinateSystemMemberInfo
>
memberInfoList
=
new
ArrayList
<>(
memberInfoMap
.
values
());
memberInfoList
.
sort
(
Comparator
.
comparingDouble
(
SubordinateSystemMemberInfo:
:
getFyp
));
memberInfoList
.
sort
(
Comparator
.
comparingDouble
(
SubordinateSystemMemberInfo:
:
getFyp
));
Collections
.
reverse
(
memberInfoList
);
Collections
.
reverse
(
memberInfoList
);
Double
targetFyc
=
0
D
;
//目标FYP
Double
targetFyp
=
0
D
;
//目标FYC,目标件数
Integer
targetCount
=
0
;
//目标件数
for
(
SubordinateSystemMemberInfo
item
:
memberInfoList
)
{
for
(
SubordinateSystemMemberInfo
item
:
memberInfoList
)
{
fypSum
+=
item
.
getFyp
();
fypSum
+=
item
.
getFyp
();
fycSum
+=
item
.
getFyc
();
fycSum
+=
item
.
getFyc
();
countSum
+=
item
.
getCount
();
countSum
+=
item
.
getCount
();
targetFyc
+=
item
.
getTargetFyc
();
targetFyp
+=
item
.
getTargetFyp
();
targetCount
+=
item
.
getTargetCount
();
}
}
statisticInfo
.
setCount
(
countSum
);
statisticInfo
.
setCount
(
countSum
);
statisticInfo
.
setFyc
(
CommonUtil
.
doubleFormat
(
fycSum
,
2
));
statisticInfo
.
setFyc
(
CommonUtil
.
doubleFormat
(
fycSum
,
2
));
statisticInfo
.
setFyp
(
CommonUtil
.
doubleFormat
(
fypSum
,
2
));
statisticInfo
.
setFyp
(
CommonUtil
.
doubleFormat
(
fypSum
,
2
));
statisticInfo
.
setTargetFyc
(
CommonUtil
.
doubleFormat
(
targetFyc
,
2
));
statisticInfo
.
setTargetFyp
(
CommonUtil
.
doubleFormat
(
targetFyp
,
2
));
statisticInfo
.
setTargetCount
(
targetCount
);
if
(
targetFyc
!=
null
&&
targetFyc
>
0
)
{
BigDecimal
fycBigDecimal
=
new
BigDecimal
(
fycSum
),
goalsBigDecimal
=
new
BigDecimal
(
targetFyc
);
statisticInfo
.
setCompletionRate
(
CommonUtil
.
doubleFormat
(
fycBigDecimal
.
divide
(
goalsBigDecimal
,
4
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()
*
100
,
2
));
}
else
{
statisticInfo
.
setCompletionRate
(
0
D
);
}
// 查看经纪人所在的体系
// 查看经纪人所在的体系
AclPractitionerSubordinateSystem
subordinateSystem
=
aclPractitionerSubordinateSystemDALService
.
findByPractitionerId
(
practitionerId
);
AclPractitionerSubordinateSystem
subordinateSystem
=
aclPractitionerSubordinateSystemDALService
.
findByPractitionerId
(
practitionerId
);
if
(
subordinateSystem
!=
null
)
{
if
(
subordinateSystem
!=
null
)
{
Long
subordinateSystemId
=
subordinateSystem
.
getId
();
Long
subordinateSystemId
=
subordinateSystem
.
getId
();
getCompletionRate
(
statisticInfo
,
null
,
subordinateSystemId
,
fycSum
,
time
);
//
getCompletionRate(statisticInfo,null, subordinateSystemId, fycSum, time);
responseVO
.
setId
(
subordinateSystemId
);
responseVO
.
setId
(
subordinateSystemId
);
responseVO
.
setSubordinateSystemName
(
subordinateSystem
.
getName
());
responseVO
.
setSubordinateSystemName
(
subordinateSystem
.
getName
());
responseVO
.
setContactName
(
subordinateSystem
.
getContactName
());
responseVO
.
setContactName
(
subordinateSystem
.
getContactName
());
...
...
yd-api/src/main/java/com/yd/api/practitioner/service/impl/ScheduleTrackServiceImpl.java
View file @
fd8c3139
...
@@ -348,6 +348,32 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
...
@@ -348,6 +348,32 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
// 计算团队平均分
// 计算团队平均分
Map
<
String
,
Object
>
average
=
this
.
computeTeamAverageScore
(
saleAndRecuit
,
practitionerIdList
.
size
());
Map
<
String
,
Object
>
average
=
this
.
computeTeamAverageScore
(
saleAndRecuit
,
practitionerIdList
.
size
());
//根据sortType排序显示【1:天;2:周;3:月(默认为2:周)】
Collections
.
sort
(
saleAndRecuit
,
new
Comparator
<
PersonalPEPScore
>()
{
@Override
public
int
compare
(
PersonalPEPScore
o1
,
PersonalPEPScore
o2
)
{
if
(
"1"
.
equals
(
requestVO
.
getSortType
())){
if
(
o1
!=
null
&&
o2
!=
null
)
{
return
o1
.
getDayScore
().
compareTo
(
o2
.
getDayScore
());
}
else
{
return
o1
==
null
?
1
:
-
1
;
}
}
else
if
(
"3"
.
equals
(
requestVO
.
getSortType
())){
if
(
o1
!=
null
&&
o2
!=
null
)
{
return
o1
.
getMonthScore
().
compareTo
(
o2
.
getMonthScore
());
}
else
{
return
o1
==
null
?
1
:
-
1
;
}
}
else
{
if
(
o1
!=
null
&&
o2
!=
null
)
{
return
o1
.
getWeekScore
().
compareTo
(
o2
.
getWeekScore
());
}
else
{
return
o1
==
null
?
1
:
-
1
;
}
}
}
});
resp
.
setPersonalList
(
saleAndRecuit
);
resp
.
setPersonalList
(
saleAndRecuit
);
resp
.
setAverage
(
average
);
resp
.
setAverage
(
average
);
for
(
PersonalPEPScore
s:
saleAndRecuit
)
{
for
(
PersonalPEPScore
s:
saleAndRecuit
)
{
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/sechedule/QueryPEPScoreRequestVO.java
View file @
fd8c3139
...
@@ -2,6 +2,7 @@ package com.yd.api.practitioner.vo.sechedule;
...
@@ -2,6 +2,7 @@ package com.yd.api.practitioner.vo.sechedule;
public
class
QueryPEPScoreRequestVO
{
public
class
QueryPEPScoreRequestVO
{
private
Long
practitionerId
;
private
Long
practitionerId
;
private
String
sortType
;
//1:天;2:周;3:月(默认为2:周)
public
Long
getPractitionerId
()
{
public
Long
getPractitionerId
()
{
return
practitionerId
;
return
practitionerId
;
...
@@ -10,4 +11,13 @@ public class QueryPEPScoreRequestVO {
...
@@ -10,4 +11,13 @@ public class QueryPEPScoreRequestVO {
public
void
setPractitionerId
(
Long
practitionerId
)
{
public
void
setPractitionerId
(
Long
practitionerId
)
{
this
.
practitionerId
=
practitionerId
;
this
.
practitionerId
=
practitionerId
;
}
}
public
String
getSortType
()
{
return
sortType
;
}
public
void
setSortType
(
String
sortType
)
{
this
.
sortType
=
sortType
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment