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
bb182e2e
Commit
bb182e2e
authored
May 20, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agms团队寿险数据问题7
parent
bd397644
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
19 deletions
+10
-19
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsDashboardServiceImpl.java
+7
-16
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsSalesInfo.java
+3
-3
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsDashboardServiceImpl.java
View file @
bb182e2e
...
...
@@ -134,16 +134,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
// 1.根据Agent_id当前经纪人的佣金明细
List
<
Achieve
>
achieveList
=
this
.
queryN22
(
category
,
type
,
time
);
// 2.筛选结果集
if
(
"life"
.
equals
(
category
))
{
if
(
"t"
.
equals
(
type
))
{
achieveList
=
achieveList
.
stream
()
.
filter
((
Achieve
i
)
->
"寿险团队"
.
equals
(
i
.
getRolegrouptype
()))
.
collect
(
Collectors
.
toList
());
}
}
// 3.组装返回报文
// 2.组装返回报文
List
<
StatisticsSalesInfo
>
infoList
=
new
ArrayList
<>();
StatisticsSalesInfo
info
=
null
;
for
(
Achieve
achieve
:
achieveList
)
{
...
...
@@ -151,15 +142,15 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
info
=
new
StatisticsSalesInfo
();
info
.
setPieces
(
achieve
.
getSucNumber
());
info
.
setFyp
(
Double
.
toString
(
achieve
.
getFYP
()));
info
.
setFyc
(
Double
.
toString
(
achieve
.
getFYC
()
));
info
.
setFyc
(
achieve
.
getFYC
(
));
info
.
setTypeName
(
achieve
.
getDescription
());
infoList
.
add
(
info
);
}
//
4
.计算件均保费
//
3
.计算件均保费
agmsDashboardDALService
.
getUnitPremium
(
infoList
);
//
5
.排序
//
4
.排序
infoList
.
sort
(
Comparator
.
comparing
(
StatisticsSalesInfo:
:
getFyc
).
reversed
());
return
infoList
;
...
...
@@ -295,7 +286,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
StatisticsSalesInfo
statisticsSalesInfo
=
new
StatisticsSalesInfo
();
List
<
StatisticsSalesInfo
>
statisticsSalesInfos
=
new
ArrayList
<>();
String
unitPremium
=
"0"
;
d
ouble
fyp
=
0
D
,
fyc
=
0
D
;
D
ouble
fyp
=
0
D
,
fyc
=
0
D
;
Integer
pieces
=
0
;
// List<StatisticsSalesInfo> statisticsSalesInfosLife = agmsDashboardDALService.statisticsSalesEG(type,time);
...
...
@@ -307,14 +298,14 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
if
(
statisticsSalesInfosLife
.
size
()
>
0
){
for
(
StatisticsSalesInfo
item
:
statisticsSalesInfosLife
){
fyp
+=
Double
.
parseDouble
(
item
.
getFyp
());
fyc
+=
Double
.
parseDouble
(
item
.
getFyc
()
);
fyc
+=
item
.
getFyc
(
);
pieces
+=
item
.
getPieces
();
}
if
(
pieces
!=
0
){
unitPremium
=
BigDecimal
.
valueOf
(
fyp
/
pieces
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
();
}
}
statisticsSalesInfo
.
setFyc
(
new
DecimalFormat
(
"0.00"
).
format
(
fyc
));
statisticsSalesInfo
.
setFyc
(
Double
.
parseDouble
(
new
DecimalFormat
(
"0.00"
).
format
(
fyc
)
));
statisticsSalesInfo
.
setFyp
(
new
DecimalFormat
(
"0.00"
).
format
(
fyp
));
statisticsSalesInfo
.
setPieces
(
pieces
);
statisticsSalesInfo
.
setUnitPremium
(
unitPremium
);
...
...
yd-api/src/main/java/com/yd/api/agms/vo/dashboard/StatisticsSalesInfo.java
View file @
bb182e2e
...
...
@@ -4,7 +4,7 @@ public class StatisticsSalesInfo {
private
String
typeName
;
private
Long
typeId
;
private
String
fyp
;
private
String
fyc
;
private
Double
fyc
;
private
Double
api
;
private
Integer
pieces
;
private
String
unitPremium
;
...
...
@@ -33,11 +33,11 @@ public class StatisticsSalesInfo {
this
.
fyp
=
fyp
;
}
public
String
getFyc
()
{
public
Double
getFyc
()
{
return
fyc
;
}
public
void
setFyc
(
String
fyc
)
{
public
void
setFyc
(
Double
fyc
)
{
this
.
fyc
=
fyc
;
}
...
...
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