eason.qian 7 years ago
parent bacde16fea
commit ae88cf1a10

@ -11,6 +11,9 @@ import java.util.List;
*/
public interface DashboardService {
JSONObject getCommonAnalysis1(JSONObject params);
JSONObject getCommonAnalysis3(JSONObject params);
JSONObject getCommonAnalysis2(JSONObject params);
// JSONObject getCommonAnalysis(JSONObject params);

@ -65,9 +65,9 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
@Override
public JSONObject getCommonAnalysis1(JSONObject params) {
JSONObject res = transactionAnalysisMapper.getClientTransaction(params);
res.put("new_partners", clientAnalysisMapper.countNewClients(params));
res.put("total_partners", clientAnalysisMapper.countClients(params));
res.put("traded_partners", clientAnalysisMapper.countTradedPartners(params));
// res.put("new_partners", clientAnalysisMapper.countNewClients(params));
// res.put("total_partners", clientAnalysisMapper.countClients(params));
// res.put("traded_partners", clientAnalysisMapper.countTradedPartners(params));
// List<JSONObject> topOrders = transactionAnalysisMapper.getTopOrders(params, new PageBounds(1, 1, Order.formString("aud_fee.desc")));
// if (!topOrders.isEmpty()) {
// res.put("top_amount_order", topOrders.get(0));
@ -77,6 +77,16 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
// res.put("old_customers", transactionAnalysisMapper.countOldCustomers(params));
return res;
}
@Override
public JSONObject getCommonAnalysis3(JSONObject params) {
JSONObject res = new JSONObject();
res.put("new_partners", clientAnalysisMapper.countNewClients(params));
res.put("total_partners", clientAnalysisMapper.countClients(params));
res.put("traded_partners", clientAnalysisMapper.countTradedPartners(params));
return res;
}
@Override
public JSONObject getCommonAnalysis2(JSONObject params) {
JSONObject res = new JSONObject();

@ -36,6 +36,13 @@ public class DashboardController {
return dashboardService.getCommonAnalysis1(params);
}
@ManagerMapping("/common_analysis_3")
public JSONObject commonAnalysis3(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
orgManager.checkOrg(manager,params);
return dashboardService.getCommonAnalysis3(params);
}
@ManagerMapping("/common_analysis_2")
public JSONObject commonAnalysis2(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);

@ -124,11 +124,23 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul
function loadAnalysis() {
$http.get('/dashboard/system/common_analysis_1', {params: $scope.currentScale.params()}).then(function (resp) {
// $scope.analysis.new_partners = resp.data.new_partners;
// $scope.analysis.total_partners = resp.data.total_partners;
// $scope.analysis.traded_partners = resp.data.traded_partners;
$scope.analysis.trade_amount = resp.data.trade_amount;
$scope.analysis.trade_count = resp.data.trade_count;
// $scope.analysis.top_amount_order = resp.data.top_amount_order;
// $scope.analysis.trade_count = resp.data.trade_count;
// $scope.analysis.total_customers = resp.data.total_customers;
// $scope.analysis.new_customers = resp.data.total_customers-resp.data.old_customers;
// $scope.analysis.old_customers = resp.data.old_customers;
});
$http.get('/dashboard/system/common_analysis_3', {params: $scope.currentScale.params()}).then(function (resp) {
$scope.analysis.new_partners = resp.data.new_partners;
$scope.analysis.total_partners = resp.data.total_partners;
$scope.analysis.traded_partners = resp.data.traded_partners;
$scope.analysis.trade_amount = resp.data.trade_amount;
$scope.analysis.trade_count = resp.data.trade_count;
// $scope.analysis.top_amount_order = resp.data.top_amount_order;
// $scope.analysis.trade_count = resp.data.trade_count;
@ -136,6 +148,7 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul
// $scope.analysis.new_customers = resp.data.total_customers-resp.data.old_customers;
// $scope.analysis.old_customers = resp.data.old_customers;
});
$http.get('/dashboard/system/common_analysis_2', {params: $scope.currentScale.params()}).then(function (resp) {
// $scope.analysis.new_partners = resp.data.new_partners;
// $scope.analysis.total_partners = resp.data.total_partners;

Loading…
Cancel
Save