|
|
|
@ -102,7 +102,7 @@ public class DailyReportImp implements DailyReport {
|
|
|
|
|
List<JSONObject> kpiList =new ArrayList<>();
|
|
|
|
|
List<JSONObject> prizeAmountAndBdTypeList = financialBDPrizeLogMapper.findBdPrizeAmountMonth(DateUtils.truncate(dt, Calendar.DATE),DateUtils.truncate(DateUtils.addDays(dt,1), Calendar.DATE),DateUtils.truncate(dt, Calendar.MONTH));
|
|
|
|
|
List<JSONObject> prizeAmountAndBdTypeListYesterDay = financialBDPrizeLogMapper.findBdPrizeAmountMonth(DateUtils.truncate(DateUtils.addDays(dt,-1), Calendar.DATE),DateUtils.truncate(dt, Calendar.DATE),DateUtils.truncate(DateUtils.addDays(dt,-1), Calendar.MONTH));
|
|
|
|
|
List<JSONObject> clientsAmount = clientMapper.createClientsByGroup(DateUtils.truncate(DateUtils.addDays(dt,-1), Calendar.DATE),DateUtils.truncate(dt, Calendar.DATE));
|
|
|
|
|
List<JSONObject> clientsAmount = clientMapper.createClientsByGroup(DateUtils.truncate(dt, Calendar.DATE),DateUtils.truncate(DateUtils.addDays(dt,1), Calendar.DATE),DateUtils.truncate(dt, Calendar.MONTH));
|
|
|
|
|
//BD团队总KPI
|
|
|
|
|
BigDecimal total_kpi_amount = BigDecimal.ZERO;
|
|
|
|
|
//BD团队当月总销售额
|
|
|
|
@ -128,7 +128,7 @@ public class DailyReportImp implements DailyReport {
|
|
|
|
|
kpi.put("kpi_percent", p.getBigDecimal("month_amount").divide(kpi_amount,4,BigDecimal.ROUND_HALF_DOWN).multiply(BigDecimal.valueOf(100)).toString().substring(0,5)+"%");
|
|
|
|
|
for(JSONObject clientAmount :clientsAmount ){
|
|
|
|
|
if(clientAmount.getString("bd_group").equals(kpi.getString("bd_group"))){
|
|
|
|
|
kpi.put("clients_history",clientAmount.getIntValue("clients_history"));
|
|
|
|
|
kpi.put("clients_month",clientAmount.getIntValue("clients_month"));
|
|
|
|
|
kpi.put("clients_yesterday",clientAmount.getIntValue("clients_yesterday"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|