Commit 8b9a3f3c by yao.xiao

解决bug

parent ac886406
......@@ -1580,10 +1580,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
//查询其团队天,周,月总分
HashMap<String,BigDecimal> totalStatistics = mktLeadsAssignedTrackDALService.totalStatisticsForTeam(practitionerIds);
//总分除以人数得到均分
Double scoreDayAverage = getScoreAverage(totalStatistics.get("scoreToday"),practitionerNum);
Double scoreWeekAverage= getScoreAverage(totalStatistics.get("scoreWeek"),practitionerNum);
Double scoreMonthAverage= getScoreAverage(totalStatistics.get("scoreMonth"),practitionerNum);
Double scoreDayAverage = 0D;
Double scoreWeekAverage= 0D;
Double scoreMonthAverage= 0D;
if (totalStatistics != null){
//总分除以人数得到均分
scoreDayAverage = getScoreAverage(totalStatistics.get("scoreToday"),practitionerNum);
scoreWeekAverage= getScoreAverage(totalStatistics.get("scoreWeek"),practitionerNum);
scoreMonthAverage= getScoreAverage(totalStatistics.get("scoreMonth"),practitionerNum);
}
//计算此团队一周增加的商机数 ag_mkt_leads_assigneds
Integer opportunitiesNum = mktLeadsAssignedsDALService.countPractitionerIdsAndThisWeek(practitionerIds);
......@@ -1603,15 +1608,17 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
responseVO.setScoreWeekAverage(scoreWeekAverage);
responseVO.setScoreMonthAverage(scoreMonthAverage);
responseVO.setOpportunitiesNum(opportunitiesNum);
responseVO.setPremiumMonth(CommonUtil.isNullOrZero(performanceForecast.get("totalFYPMonth"))?0:performanceForecast.get("totalFYPMonth").doubleValue());
responseVO.setCommissionMonth(CommonUtil.isNullOrZero(performanceForecast.get("totalFYCMonth"))?0:performanceForecast.get("totalFYCMonth").doubleValue());
responseVO.setPiecesMonth(CommonUtil.isNullOrZero(performanceForecast.get("totalPiecesMonth"))?0:performanceForecast.get("totalPiecesMonth").doubleValue());
responseVO.setPremiumQuarter(CommonUtil.isNullOrZero(performanceForecast.get("totalFYPQuarter"))?0:performanceForecast.get("totalFYPQuarter").doubleValue());
responseVO.setCommissionQuarter(CommonUtil.isNullOrZero(performanceForecast.get("totalFYCQuarter"))?0:performanceForecast.get("totalFYCQuarter").doubleValue());
responseVO.setPiecesQuarter(CommonUtil.isNullOrZero(performanceForecast.get("totalPiecesQuarter"))?0:performanceForecast.get("totalPiecesQuarter").doubleValue());
responseVO.setPremiumYear(CommonUtil.isNullOrZero(performanceForecast.get("totalFYPYear"))?0:performanceForecast.get("totalFYPYear").doubleValue());
responseVO.setCommissionYear(CommonUtil.isNullOrZero(performanceForecast.get("totalFYCYear"))?0:performanceForecast.get("totalFYCYear").doubleValue());
responseVO.setPiecesYear(CommonUtil.isNullOrZero(performanceForecast.get("totalPiecesYear"))?0:performanceForecast.get("totalPiecesYear").doubleValue());
if (performanceForecast != null){
responseVO.setPremiumMonth(CommonUtil.isNullOrZero(performanceForecast.get("totalFYPMonth"))?0:performanceForecast.get("totalFYPMonth").doubleValue());
responseVO.setCommissionMonth(CommonUtil.isNullOrZero(performanceForecast.get("totalFYCMonth"))?0:performanceForecast.get("totalFYCMonth").doubleValue());
responseVO.setPiecesMonth(CommonUtil.isNullOrZero(performanceForecast.get("totalPiecesMonth"))?0:performanceForecast.get("totalPiecesMonth").doubleValue());
responseVO.setPremiumQuarter(CommonUtil.isNullOrZero(performanceForecast.get("totalFYPQuarter"))?0:performanceForecast.get("totalFYPQuarter").doubleValue());
responseVO.setCommissionQuarter(CommonUtil.isNullOrZero(performanceForecast.get("totalFYCQuarter"))?0:performanceForecast.get("totalFYCQuarter").doubleValue());
responseVO.setPiecesQuarter(CommonUtil.isNullOrZero(performanceForecast.get("totalPiecesQuarter"))?0:performanceForecast.get("totalPiecesQuarter").doubleValue());
responseVO.setPremiumYear(CommonUtil.isNullOrZero(performanceForecast.get("totalFYPYear"))?0:performanceForecast.get("totalFYPYear").doubleValue());
responseVO.setCommissionYear(CommonUtil.isNullOrZero(performanceForecast.get("totalFYCYear"))?0:performanceForecast.get("totalFYCYear").doubleValue());
responseVO.setPiecesYear(CommonUtil.isNullOrZero(performanceForecast.get("totalPiecesYear"))?0:performanceForecast.get("totalPiecesYear").doubleValue());
}
responseVO.setAchievementRateYear(CommonUtil.isNullOrZero(achievementRateMap.get("achievementRateYear"))?0D: achievementRateMap.get("achievementRateYear"));
responseVO.setAchievementRateQuarter(CommonUtil.isNullOrZero(achievementRateMap.get("achievementRateQuarter"))?0D:achievementRateMap.get("achievementRateQuarter"));
responseVO.setAchievementRateMonth(CommonUtil.isNullOrZero(achievementRateMap.get("achievementRateMonth"))?0D:achievementRateMap.get("achievementRateMonth"));
......
......@@ -25,39 +25,39 @@ public class TeamActionsAverageQueryResponseVO {
/**
* 月保费
*/
private Double premiumMonth;
private Double premiumMonth = 0D;
/**
* 月佣金
*/
private Double commissionMonth;
private Double commissionMonth = 0D;
/**
* 月件数
*/
private Double piecesMonth;
private Double piecesMonth = 0D;
/**
* 季度保费
*/
private Double premiumQuarter;
private Double premiumQuarter = 0D;
/**
* 季度佣金
*/
private Double commissionQuarter;
private Double commissionQuarter = 0D;
/**
* 季度件数
*/
private Double piecesQuarter;
private Double piecesQuarter = 0D;
/**
* 年保费
*/
private Double premiumYear;
private Double premiumYear = 0D;
/**
* 年佣金
*/
private Double commissionYear;
private Double commissionYear = 0D;
/**
* 年件数
*/
private Double piecesYear;
private Double piecesYear = 0D;
/**
* 年完成率
*/
......
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