|
|
|
@ -67,10 +67,11 @@ public class DashboardController {
|
|
|
|
|
@ManagerMapping("/top_trade_partners")
|
|
|
|
|
public List<JSONObject> topTradePartners(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
|
|
|
|
|
@RequestParam(defaultValue = "10") int limit) {
|
|
|
|
|
|
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
|
orgManager.checkOrg(manager, params);
|
|
|
|
|
params.put("limit", limit);
|
|
|
|
|
return dashboardService.getTopTradePartners(params);
|
|
|
|
|
return dashboardService.getTopTradePartnersNew(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/rank_trade_partners")
|
|
|
|
@ -79,11 +80,11 @@ public class DashboardController {
|
|
|
|
|
orgManager.checkOrg(manager, params);
|
|
|
|
|
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
|
|
|
|
|
params.put("bd_group", manager.getString("manager_id"));
|
|
|
|
|
if (analysis.getGroup_bd()>0){
|
|
|
|
|
if (analysis.getGroup_bd() > 0){
|
|
|
|
|
params.put("bd_group_bd", analysis.getGroup_bd());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return dashboardService.getTopTradePartners(params);
|
|
|
|
|
return dashboardService.getTopTradePartnersNew(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/trade_in_hours")
|
|
|
|
|