Commit bd397644 by jianan

agms团队寿险数据问题6

parent 3893fffb
......@@ -6,11 +6,9 @@ import com.yd.api.agms.vo.dashboard.*;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.agms.dashboard.StatisticsOpportunityInfo;
import com.yd.dal.entity.agms.dashboard.StatisticsPEPInfo;
import com.yd.dal.entity.customer.practitioner.PractitionerRankInfo;
import com.yd.dal.entity.meta.MdDropOptions;
import com.yd.dal.service.agms.AgmsDashboardDALService;
import com.yd.dal.service.meta.MdDropOptionsDALService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.rmi.n22.salary.pojo.Achieve;
import com.yd.rmi.n22.salary.pojo.SearchStaffAchievementRequestBody;
import com.yd.rmi.n22.salary.pojo.SearchStaffAchievementResponseVO;
......@@ -37,12 +35,6 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
private MdDropOptionsDALService mdDropOptionsDALService;
@Autowired
private N22SalaryService n22SalaryService;
@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) {
......@@ -178,10 +170,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
SearchStaffAchievementResponseVO searchStaffAchievementResponseVO = null;
List<Achieve> resultList = new ArrayList<>();
// 1.获取机构id
this.getGroupIdByThisInterface();
// 2.根据查询时间范围获取查询开始时间和结束时间
// 1.根据查询时间范围获取查询开始时间和结束时间
String startTime;
String endTime;
if ("d".equals(time)) {
......@@ -215,6 +204,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
searchStaffAchievementRequestBody.setIsdown("1");
// 循环查分公司
List<String> organizationIdList = this.getGroupIdByThisInterface("二级机构");
for (String organizationId : organizationIdList) {
searchStaffAchievementRequestBody.setSearchtype("3");
searchStaffAchievementRequestBody.setOrganization_id(organizationId);
......@@ -224,6 +214,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
achieveList.addAll(achieves);
}
// 循环查渠道机构
List<String> frIdList = this.getGroupIdByThisInterface("渠道机构");
for (String FRId : frIdList) {
searchStaffAchievementRequestBody.setSearchtype("2");
searchStaffAchievementRequestBody.setRolegroup_id(FRId);
......@@ -242,6 +233,7 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
searchStaffAchievementRequestBody.setSearchtype("2");
searchStaffAchievementRequestBody.setIsdown("1");
// 循环查
List<String> groupIdList = this.getGroupIdByThisInterface("寿险团队");
for (String groupId : groupIdList) {
searchStaffAchievementRequestBody.setRolegroup_id(groupId);
......@@ -266,14 +258,12 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
/**
* 用业绩接口的返回报文筛选出所有团队组id
*
* @param groupType 可填二级机构,渠道机构,寿险团队
* @return
* @throws Exception
*/
private void getGroupIdByThisInterface() throws Exception {
organizationIdList.clear();
frIdList.clear();
groupIdList.clear();
private List<String> getGroupIdByThisInterface(String groupType) throws Exception {
List<String> list = new ArrayList<>();
String curDay = CommonUtil.dateParseString(new Date(),"yyyy-MM-dd");
// 组装参数
......@@ -288,17 +278,11 @@ public class AgmsDashboardServiceImpl implements AgmsDashboardService {
List<Achieve> achieveList = n22SalaryService.searchStaffAchievementGetAchieveList(searchStaffAchievementResponseVO);
for (Achieve item : achieveList) {
if ("二级机构".equals(item.getRolegrouptype())) {
organizationIdList.add(item.getID());
if (groupType.equals(item.getRolegrouptype())) {
list.add(item.getID());
}
if ("渠道机构".equals(item.getRolegrouptype())) {
frIdList.add(item.getID());
}
if ("寿险团队".equals(item.getRolegrouptype())) {
groupIdList.add(item.getID());
}
}
return list;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment