Commit bd397644 by jianan

agms团队寿险数据问题6

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