Merge remote-tracking branch 'origin/develop'

master
james.zhao 6 years ago
commit f8b8658bfd

@ -102,7 +102,7 @@ public class DailyReportImp implements DailyReport {
List<JSONObject> kpiList =new ArrayList<>(); 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> 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> 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 //BD团队总KPI
BigDecimal total_kpi_amount = BigDecimal.ZERO; BigDecimal total_kpi_amount = BigDecimal.ZERO;
//BD团队当月总销售额 //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)+"%"); 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 ){ for(JSONObject clientAmount :clientsAmount ){
if(clientAmount.getString("bd_group").equals(kpi.getString("bd_group"))){ 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")); kpi.put("clients_yesterday",clientAmount.getIntValue("clients_yesterday"));
} }
} }

@ -119,5 +119,5 @@ public interface ClientMapper {
@Select("select client_id from sys_clients where parent_client_id=#{parent_client_id}") @Select("select client_id from sys_clients where parent_client_id=#{parent_client_id}")
List<Integer> childClientId(@Param("parent_client_id") int parent_client_id); List<Integer> childClientId(@Param("parent_client_id") int parent_client_id);
List<JSONObject> createClientsByGroup(@Param("start_date") Date start_date,@Param("end_date") Date end_date); List<JSONObject> createClientsByGroup(@Param("start_date") Date start_date,@Param("end_date") Date end_date,@Param("start_date_month") Date start_date_month);
} }

@ -553,7 +553,7 @@
fbc.bd_name, fbc.bd_name,
fbc.bd_group, fbc.bd_group,
fbc.bd_type, fbc.bd_type,
count( * ) clients_history count( * ) clients_month
FROM FROM
sys_clients sc sys_clients sc
INNER JOIN sys_client_bd d ON sc.client_id = d.client_id INNER JOIN sys_client_bd d ON sc.client_id = d.client_id
@ -561,7 +561,7 @@
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group
WHERE WHERE
sc.org_id = 1 sc.org_id = 1
AND sc.create_time &lt; #{start_date} AND sc.create_time &gt;= #{start_date_month}
AND d.is_valid = 1 AND d.is_valid = 1
AND c.bd_group IS NOT NULL AND c.bd_group IS NOT NULL
AND d.start_date &lt;= now( ) AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date &gt; now( ) AND d.start_date &lt;= now( ) AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date &gt; now( )

@ -183,7 +183,7 @@
</div> </div>
<div class="weui-panel"> <div class="weui-panel">
<div class="weui-panel__hd">昨日开户数(历史开户数)</div> <div class="weui-panel__hd">昨日开户数(当月开户数)</div>
<div class="weui-panel__ft"> <div class="weui-panel__ft">
<div class="weui-media-box weui-media-box_small-appmsg"> <div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells"> <div class="weui-cells">
@ -192,7 +192,7 @@
<div class="weui-cell__hd weui-flex__item" <div class="weui-cell__hd weui-flex__item"
th:text="${kpi.group_name}"></div> th:text="${kpi.group_name}"></div>
<div class="weui-cell__ft weui-flex__item" <div class="weui-cell__ft weui-flex__item"
th:text="${kpi.clients_yesterday}+'('+${kpi.clients_history}+')'"></div> th:text="${kpi.clients_yesterday}+'('+${kpi.clients_month}+')'"></div>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save