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
5fcc0fbe
Commit
5fcc0fbe
authored
May 20, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agms团队寿险数据问题3
parent
0b781d5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
11 deletions
+55
-11
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsDashboardServiceImpl.java
+55
-11
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsDashboardServiceImpl.java
View file @
5fcc0fbe
...
...
@@ -40,6 +40,10 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
@Autowired
private
SystemConfigService
systemConfigService
;
private
static
List
<
String
>
organizationIdList
=
new
ArrayList
<>();
private
static
List
<
String
>
frIdList
=
new
ArrayList
<>();;
private
static
List
<
String
>
groupIdList
=
new
ArrayList
<>();;
@Override
public
StatisticsPEPResponseVO
statisticsPEP
(
StatisticsPEPRequestVO
requestVO
)
{
//AGMS -- Dashboard查询 PEP活动管理
...
...
@@ -174,11 +178,14 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
SearchStaffAchievementResponseVO
searchStaffAchievementResponseVO
=
null
;
List
<
Achieve
>
achieveList
=
new
ArrayList
<>();
// 1.根据查询时间范围获取查询开始时间和结束时间
// 1.获取机构id
this
.
getGroupIdByThisInterface
();
// 2.根据查询时间范围获取查询开始时间和结束时间
String
startTime
;
String
endTime
;
if
(
"d"
.
equals
(
time
))
{
endTime
=
startTime
=
CommonUtil
.
dateParseString
(
new
Date
(),
"yyyy-MM-dd"
);
endTime
=
startTime
=
CommonUtil
.
dateParseString
(
new
Date
(),
"yyyy-MM-dd"
);
}
else
if
(
"w"
.
equals
(
time
))
{
startTime
=
CommonUtil
.
getWeekStart
();
...
...
@@ -203,12 +210,9 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
if
(
"life"
.
equals
(
category
))
{
if
(
"b"
.
equals
(
type
))
{
searchStaffAchievementRequestBody
.
setIsdown
(
"1"
);
String
organizationIds
=
systemConfigService
.
getSingleConfigValue
(
"N22_Organization_ID"
);
// 循环查分公司
for
(
String
organizationId
:
organizationIds
.
split
(
","
))
{
for
(
String
organizationId
:
organizationIdList
)
{
searchStaffAchievementRequestBody
.
setSearchtype
(
"3"
);
searchStaffAchievementRequestBody
.
setOrganization_id
(
organizationId
);
...
...
@@ -216,9 +220,8 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
List
<
Achieve
>
achieves
=
n22SalaryService
.
searchStaffAchievementGetAchieveList
(
searchStaffAchievementResponseVO
);
achieveList
.
addAll
(
achieves
);
}
String
FRIds
=
systemConfigService
.
getSingleConfigValue
(
"N22_FR_ID"
);
// 循环查渠道机构
for
(
String
FRId
:
FRIds
.
split
(
","
))
{
for
(
String
FRId
:
frIdList
)
{
searchStaffAchievementRequestBody
.
setSearchtype
(
"2"
);
searchStaffAchievementRequestBody
.
setRolegroup_id
(
FRId
);
...
...
@@ -226,12 +229,19 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
List
<
Achieve
>
achieves
=
n22SalaryService
.
searchStaffAchievementGetAchieveList
(
searchStaffAchievementResponseVO
);
achieveList
.
addAll
(
achieves
);
}
}
else
{
// 查团队
searchStaffAchievementRequestBody
.
setSearchtype
(
"2"
);
searchStaffAchievementRequestBody
.
setIsdown
(
"0"
);
searchStaffAchievementRequestBody
.
setIsdown
(
"1"
);
// 循环查
for
(
String
groupId
:
groupIdList
)
{
searchStaffAchievementRequestBody
.
setRolegroup_id
(
groupId
);
searchStaffAchievementResponseVO
=
n22SalaryService
.
searchStaffAchievement
(
searchStaffAchievementRequestBody
);
achieveList
=
n22SalaryService
.
searchStaffAchievementGetAchieveList
(
searchStaffAchievementResponseVO
);
searchStaffAchievementResponseVO
=
n22SalaryService
.
searchStaffAchievement
(
searchStaffAchievementRequestBody
);
List
<
Achieve
>
achieves
=
n22SalaryService
.
searchStaffAchievementGetAchieveList
(
searchStaffAchievementResponseVO
);
achieveList
.
addAll
(
achieves
);
}
}
}
else
if
(
"all"
.
equals
(
category
))
{
searchStaffAchievementRequestBody
.
setOrganization_id
(
"HX6ZCQ"
);
...
...
@@ -246,6 +256,40 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
}
/**
* 用业绩接口的返回报文筛选出所有团队组id
*
* @return
* @throws Exception
*/
private
void
getGroupIdByThisInterface
()
throws
Exception
{
String
curDay
=
CommonUtil
.
dateParseString
(
new
Date
(),
"yyyy-MM-dd"
);
// 组装参数
SearchStaffAchievementRequestBody
searchStaffAchievementRequestBody
=
new
SearchStaffAchievementRequestBody
();
searchStaffAchievementRequestBody
.
setIssuedatestart
(
curDay
);
searchStaffAchievementRequestBody
.
setIssuedateend
(
curDay
);
searchStaffAchievementRequestBody
.
setPolicystatus
(
"201"
);
searchStaffAchievementRequestBody
.
setSearchtype
(
"2"
);
searchStaffAchievementRequestBody
.
setIsdown
(
"0"
);
// 调接口
SearchStaffAchievementResponseVO
searchStaffAchievementResponseVO
=
n22SalaryService
.
searchStaffAchievement
(
searchStaffAchievementRequestBody
);
List
<
Achieve
>
achieveList
=
n22SalaryService
.
searchStaffAchievementGetAchieveList
(
searchStaffAchievementResponseVO
);
for
(
Achieve
item
:
achieveList
)
{
if
(
"二级机构"
.
equals
(
item
.
getRolegrouptype
()))
{
organizationIdList
.
add
(
item
.
getID
());
}
if
(
"渠道机构"
.
equals
(
item
.
getRolegrouptype
()))
{
frIdList
.
add
(
item
.
getID
());
}
if
(
"寿险团队"
.
equals
(
item
.
getRolegrouptype
()))
{
groupIdList
.
add
(
item
.
getID
());
}
}
}
/**
* dashBoard -- 寿险+产险销售统计
* @param type 类型
* @param 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