Commit 7ce454ef by jianan

普通经纪人/辅导人看不到战队的业绩

parent 000dabd2
...@@ -2387,50 +2387,49 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2387,50 +2387,49 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
SubordinateSystemMemberQueryResponseVO responseVO = new SubordinateSystemMemberQueryResponseVO(); SubordinateSystemMemberQueryResponseVO responseVO = new SubordinateSystemMemberQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
if(practitionerId != null){ if(practitionerId != null){
List<AclPractitionerSubordinateSystem> subordinateSystemList = aclPractitionerSubordinateSystemDALService.findByOwner(practitionerId); Integer time = requestVO.getTime();
if(!subordinateSystemList.isEmpty() && subordinateSystemList.get(0) != null){ time = (time == null) ? 1 : time;
AclPractitionerSubordinateSystem subordinateSystem = subordinateSystemList.get(0); String mobileNo = aclPractitionerDALService.findMobileNoByPractitionerId(practitionerId);
Long subordinateSystemId = subordinateSystem.getId(); double fypSum = 0D,fycSum = 0D;
Integer time = requestVO.getTime(); int countSum = 0;
time = (time == null) ? 1 : time; SubordinateSystemStatisticInfo statisticInfo = new SubordinateSystemStatisticInfo();
String mobileNo = aclPractitionerDALService.findMobileNoByPractitionerId(practitionerId); Map<String,SubordinateSystemMemberInfo> memberInfoMap = new HashMap<>();
double fypSum = 0D,fycSum = 0D; //银盾保险在线
int countSum = 0; getMemberInfoForOnLine(memberInfoMap,practitionerId,time);
SubordinateSystemStatisticInfo statisticInfo = new SubordinateSystemStatisticInfo(); //eGolden
Map<String,SubordinateSystemMemberInfo> memberInfoMap = new HashMap<>(); getMemberInfoForEGolden(memberInfoMap,practitionerId,time);
//银盾保险在线 //查询出来的结果按照fyp进行排序
getMemberInfoForOnLine(memberInfoMap,practitionerId,time); List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values());
//eGolden memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp));
getMemberInfoForEGolden(memberInfoMap,practitionerId,time); Collections.reverse(memberInfoList);
//查询出来的结果按照fyp进行排序 for(SubordinateSystemMemberInfo item : memberInfoList){
List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values()); fypSum += item.getFyp();
memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp)); fycSum += item.getFyc();
Collections.reverse(memberInfoList); countSum += item.getCount();
for(SubordinateSystemMemberInfo item : memberInfoList){ }
fypSum += item.getFyp(); statisticInfo.setCount(countSum);
fycSum += item.getFyc(); statisticInfo.setFyc(CommonUtil.doubleFormat(fycSum,2));
countSum += item.getCount(); statisticInfo.setFyp(CommonUtil.doubleFormat(fypSum,2));
}
statisticInfo.setCount(countSum); // 判断当前经纪人是否为团队长
statisticInfo.setFyc(CommonUtil.doubleFormat(fycSum,2)); int count = aclPractitionerDALService.isTeamLeader(practitionerId);
statisticInfo.setFyp(CommonUtil.doubleFormat(fypSum,2)); if (count > 0) {
List<AclPractitionerSubordinateSystem> subordinateSystemList = aclPractitionerSubordinateSystemDALService.findByOwner(practitionerId);
// 判断当前经纪人是否为团队长 if (CollectionUtils.isNotEmpty(subordinateSystemList)) {
int count = aclPractitionerDALService.isTeamLeader(practitionerId); AclPractitionerSubordinateSystem subordinateSystem = subordinateSystemList.get(0);
if (count > 0) { Long subordinateSystemId = subordinateSystem.getId();
statisticInfo.setCompletionRate(getCompletionRate(null,subordinateSystemId,fycSum,time)); statisticInfo.setCompletionRate(getCompletionRate(null,subordinateSystemId,fycSum,time));
responseVO.setId(subordinateSystemId); responseVO.setId(subordinateSystemId);
responseVO.setSubordinateSystemName(subordinateSystem.getName());
responseVO.setContactName(subordinateSystem.getContactName());
responseVO.setContactNo(subordinateSystem.getContactNo());
responseVO.setRemark(subordinateSystem.getRemark());
} }
responseVO.setSubordinateSystemName(subordinateSystem.getName());
responseVO.setContactName(subordinateSystem.getContactName());
responseVO.setContactNo(subordinateSystem.getContactNo());
responseVO.setRemark(subordinateSystem.getRemark());
responseVO.setStatisticInfo(statisticInfo);
responseVO.setMemberInfoList(memberInfoList);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
}else{
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830017")));
} }
responseVO.setStatisticInfo(statisticInfo);
responseVO.setMemberInfoList(memberInfoList);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
}else{ }else{
String[] params = {"practitionerId"}; String[] params = {"practitionerId"};
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610001", params))); responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610001", params)));
...@@ -2547,7 +2546,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2547,7 +2546,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
/** /**
* 银盾在线查询体系中的成员信息 * 银盾在线查询体系中的成员信息
* @param memberInfoMap 成员类型 * @param memberInfoMap 成员类型
* @param subordinateSystemId 体系id * @param practitionerId
* @param time 时间 * @param time 时间
*/ */
private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) { private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) {
......
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