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
7ce454ef
Commit
7ce454ef
authored
Dec 03, 2020
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
普通经纪人/辅导人看不到战队的业绩
parent
000dabd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
41 deletions
+40
-41
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+40
-41
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
7ce454ef
...
...
@@ -2387,50 +2387,49 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
SubordinateSystemMemberQueryResponseVO
responseVO
=
new
SubordinateSystemMemberQueryResponseVO
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
if
(
practitionerId
!=
null
){
List
<
AclPractitionerSubordinateSystem
>
subordinateSystemList
=
aclPractitionerSubordinateSystemDALService
.
findByOwner
(
practitionerId
);
if
(!
subordinateSystemList
.
isEmpty
()
&&
subordinateSystemList
.
get
(
0
)
!=
null
){
AclPractitionerSubordinateSystem
subordinateSystem
=
subordinateSystemList
.
get
(
0
);
Long
subordinateSystemId
=
subordinateSystem
.
getId
()
;
Integer
time
=
requestVO
.
getTime
()
;
time
=
(
time
==
null
)
?
1
:
time
;
String
mobileNo
=
aclPractitionerDALService
.
findMobileNoByPractitionerId
(
practitionerId
);
double
fypSum
=
0
D
,
fycSum
=
0
D
;
int
countSum
=
0
;
SubordinateSystemStatisticInfo
statisticInfo
=
new
SubordinateSystemStatisticInfo
();
Map
<
String
,
SubordinateSystemMemberInfo
>
memberInfoMap
=
new
HashMap
<>(
);
//银盾保险在线
getMemberInfoForOnLine
(
memberInfoMap
,
practitionerId
,
time
);
//eGolden
getMemberInfoForEGolden
(
memberInfoMap
,
practitionerId
,
time
);
//查询出来的结果按照fyp进行排序
List
<
SubordinateSystemMemberInfo
>
memberInfoList
=
new
ArrayList
<>(
memberInfoMap
.
values
()
);
memberInfoList
.
sort
(
Comparator
.
comparingDouble
(
SubordinateSystemMemberInfo:
:
getFyp
)
);
Collections
.
reverse
(
memberInfoList
);
for
(
SubordinateSystemMemberInfo
item
:
memberInfoList
){
fypSum
+=
item
.
getFyp
(
);
fycSum
+=
item
.
getFyc
(
);
countSum
+=
item
.
getCount
(
);
}
statisticInfo
.
setCount
(
countSum
);
statisticInfo
.
setFyc
(
CommonUtil
.
doubleFormat
(
fycSum
,
2
)
);
statisticInfo
.
setFyp
(
CommonUtil
.
doubleFormat
(
fypSum
,
2
));
// 判断当前经纪人是否为团队长
int
count
=
aclPractitionerDALService
.
isTeamLeader
(
practitionerId
);
if
(
count
>
0
)
{
Integer
time
=
requestVO
.
getTime
(
);
time
=
(
time
==
null
)
?
1
:
time
;
String
mobileNo
=
aclPractitionerDALService
.
findMobileNoByPractitionerId
(
practitionerId
);
double
fypSum
=
0
D
,
fycSum
=
0
D
;
int
countSum
=
0
;
SubordinateSystemStatisticInfo
statisticInfo
=
new
SubordinateSystemStatisticInfo
()
;
Map
<
String
,
SubordinateSystemMemberInfo
>
memberInfoMap
=
new
HashMap
<>(
);
//银盾保险在线
getMemberInfoForOnLine
(
memberInfoMap
,
practitionerId
,
time
)
;
//eGolden
getMemberInfoForEGolden
(
memberInfoMap
,
practitionerId
,
time
);
//查询出来的结果按照fyp进行排序
List
<
SubordinateSystemMemberInfo
>
memberInfoList
=
new
ArrayList
<>(
memberInfoMap
.
values
()
);
memberInfoList
.
sort
(
Comparator
.
comparingDouble
(
SubordinateSystemMemberInfo:
:
getFyp
));
Collections
.
reverse
(
memberInfoList
);
for
(
SubordinateSystemMemberInfo
item
:
memberInfoList
){
fypSum
+=
item
.
getFyp
(
);
fycSum
+=
item
.
getFyc
(
);
countSum
+=
item
.
getCount
(
);
}
statisticInfo
.
setCount
(
countSum
);
statisticInfo
.
setFyc
(
CommonUtil
.
doubleFormat
(
fycSum
,
2
)
);
statisticInfo
.
setFyp
(
CommonUtil
.
doubleFormat
(
fypSum
,
2
)
);
// 判断当前经纪人是否为团队长
int
count
=
aclPractitionerDALService
.
isTeamLeader
(
practitionerId
);
if
(
count
>
0
)
{
List
<
AclPractitionerSubordinateSystem
>
subordinateSystemList
=
aclPractitionerSubordinateSystemDALService
.
findByOwner
(
practitionerId
);
if
(
CollectionUtils
.
isNotEmpty
(
subordinateSystemList
))
{
AclPractitionerSubordinateSystem
subordinateSystem
=
subordinateSystemList
.
get
(
0
);
Long
subordinateSystemId
=
subordinateSystem
.
getId
();
statisticInfo
.
setCompletionRate
(
getCompletionRate
(
null
,
subordinateSystemId
,
fycSum
,
time
));
responseVO
.
setId
(
subordinateSystemId
);
responseVO
.
setSubordinateSystemName
(
subordinateSystem
.
getName
());
responseVO
.
setContactName
(
subordinateSystem
.
getContactName
());
responseVO
.
setContactNo
(
subordinateSystem
.
getContactNo
());
responseVO
.
setRemark
(
subordinateSystem
.
getRemark
());
}
responseVO
.
setSubordinateSystemName
(
subordinateSystem
.
getName
());
responseVO
.
setContactName
(
subordinateSystem
.
getContactName
());
responseVO
.
setContactNo
(
subordinateSystem
.
getContactNo
());
responseVO
.
setRemark
(
subordinateSystem
.
getRemark
());
responseVO
.
setStatisticInfo
(
statisticInfo
);
responseVO
.
setMemberInfoList
(
memberInfoList
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830017"
)));
}
responseVO
.
setStatisticInfo
(
statisticInfo
);
responseVO
.
setMemberInfoList
(
memberInfoList
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
else
{
String
[]
params
=
{
"practitionerId"
};
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"610001"
,
params
)));
...
...
@@ -2547,7 +2546,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
/**
* 银盾在线查询体系中的成员信息
* @param memberInfoMap 成员类型
* @param
subordinateSystemId 体系i
d
* @param
practitionerI
d
* @param time 时间
*/
private
void
getMemberInfoForOnLine
(
Map
<
String
,
SubordinateSystemMemberInfo
>
memberInfoMap
,
Long
practitionerId
,
Integer
time
)
{
...
...
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