Commit 9965868b by jianan

我的团队寿险数据统计N22问题1

parent dd5b0306
...@@ -316,15 +316,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -316,15 +316,18 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
// 获取本人的数据 // 获取本人的数据
BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("name", name); BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("name", name);
List<PractitionerRankInfo> list = (List<PractitionerRankInfo>) CollectionUtils.select(rankInfoList, predicate); List<PractitionerRankInfo> list = (List<PractitionerRankInfo>) CollectionUtils.select(rankInfoList, predicate);
PractitionerRankInfo info = list.get(0); PractitionerRankInfo info = null;
info.setPractitionerId(practitionerBasicInfo.getPractitionerId()); if (CollectionUtils.isNotEmpty(list)) {
info = list.get(0);
info.setPractitionerId(practitionerBasicInfo.getPractitionerId());
}
// 排序---1-保费,2-佣金,3-件数 // 排序---1-保费,2-佣金,3-件数
if(2 == type){ if (2 == type) {
rankInfoList.sort(Comparator.comparingDouble(PractitionerRankInfo::getFyc).reversed()); rankInfoList.sort(Comparator.comparingDouble(PractitionerRankInfo::getFyc).reversed());
}else if(3 == type){ } else if (3 == type) {
rankInfoList.sort(Comparator.comparingInt(PractitionerRankInfo::getCount).reversed()); rankInfoList.sort(Comparator.comparingInt(PractitionerRankInfo::getCount).reversed());
}else{ } else {
rankInfoList.sort(Comparator.comparingDouble(PractitionerRankInfo::getFyp).reversed()); rankInfoList.sort(Comparator.comparingDouble(PractitionerRankInfo::getFyp).reversed());
} }
// 集合元素过多,只获取排序后的前10个元素 // 集合元素过多,只获取排序后的前10个元素
...@@ -337,7 +340,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -337,7 +340,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
System.out.println(subList.size()); System.out.println(subList.size());
subList.add(info); if (null != info) {
subList.add(info);
}
return subList; return subList;
} }
...@@ -2610,6 +2615,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2610,6 +2615,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
throw new Exception("N22查询我管的人错误"); throw new Exception("N22查询我管的人错误");
} }
List<MyStaff> staffArray = myStaffSearchResponseVO.getResponseBody().getStaffArray(); List<MyStaff> staffArray = myStaffSearchResponseVO.getResponseBody().getStaffArray();
if (myStaffSearchResponseVO.getResponseBody() == null || CollectionUtils.isEmpty(myStaffSearchResponseVO.getResponseBody().getStaffArray())) {
throw new Exception("N22查询我管的人错误");
}
List<String> nameList = new ArrayList<>(); List<String> nameList = new ArrayList<>();
for (MyStaff myStaff : staffArray) { for (MyStaff myStaff : staffArray) {
nameList.add(myStaff.getManage_StaffName()); nameList.add(myStaff.getManage_StaffName());
...@@ -2619,6 +2627,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2619,6 +2627,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
for(AclPractitioner item : practitionerList){ for(AclPractitioner item : practitionerList){
nameList.add(item.getName()); nameList.add(item.getName());
} }
System.out.println(nameList);
// 3.通过姓名查询手机号 // 3.通过姓名查询手机号
List<PractitionerInfo> practitionerInfoList = aclPractitionerDALService.findPractitionerInfoByNameList(nameList); List<PractitionerInfo> practitionerInfoList = aclPractitionerDALService.findPractitionerInfoByNameList(nameList);
...@@ -2650,6 +2659,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2650,6 +2659,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<Achieve> achieveList = searchStaffAchievementResponseVO.getResponseBody().getAchieveList(); List<Achieve> achieveList = searchStaffAchievementResponseVO.getResponseBody().getAchieveList();
// 5.交集 // 5.交集
List<Achieve> intersection = achieveList.stream().filter(item -> nameList.contains(item.getDescription())).collect(toList()); List<Achieve> intersection = achieveList.stream().filter(item -> nameList.contains(item.getDescription())).collect(toList());
System.out.println("看看交集");
System.out.println(intersection);
// 6.组装 // 6.组装
List<SubordinateSystemMemberInfoE> subordinateSystemMemberInfoEList = new ArrayList<>(); List<SubordinateSystemMemberInfoE> subordinateSystemMemberInfoEList = new ArrayList<>();
......
package com.yd.rmi.n22.salary.pojo; package com.yd.rmi.n22.salary.pojo;
import lombok.Data;
@Data
public class Achieve { public class Achieve {
private String ID; private String ID;
...@@ -14,47 +17,4 @@ public class Achieve { ...@@ -14,47 +17,4 @@ public class Achieve {
private int SucNumber; private int SucNumber;
private Double StandardPREMIUM; private Double StandardPREMIUM;
public void setID(String ID){
this.ID = ID;
}
public String getID(){
return this.ID;
}
public void setDescription(String Description){
this.Description = Description;
}
public String getDescription(){
return this.Description;
}
public void setSearchType(String SearchType){
this.SearchType = SearchType;
}
public String getSearchType(){
return this.SearchType;
}
public void setFYC(Double FYC){
this.FYC = FYC;
}
public Double getFYC(){
return this.FYC;
}
public void setFYP(Double FYP){
this.FYP = FYP;
}
public Double getFYP(){
return this.FYP;
}
public void setSucNumber(int SucNumber){
this.SucNumber = SucNumber;
}
public int getSucNumber(){
return this.SucNumber;
}
public void setStandardPREMIUM(Double StandardPREMIUM){
this.StandardPREMIUM = StandardPREMIUM;
}
public Double getStandardPREMIUM(){
return this.StandardPREMIUM;
}
} }
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