Commit 7ce454ef by jianan

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

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