Commit b66c0f265ae9d36c87bb46f3abc5e155b61454dc

Authored by xp.Huang
1 parent 95482a9a

fix: 平台管理员首页统计

@@ -41,14 +41,14 @@ public class HomePageController extends BaseController { @@ -41,14 +41,14 @@ public class HomePageController extends BaseController {
41 @ApiOperation(value = "获取左侧顶部信息") 41 @ApiOperation(value = "获取左侧顶部信息")
42 public HomePageLeftTopDTO getLeftTopInfo() 42 public HomePageLeftTopDTO getLeftTopInfo()
43 throws ThingsboardException, ExecutionException, InterruptedException { 43 throws ThingsboardException, ExecutionException, InterruptedException {
  44 + String customerId = null != getCurrentUser().getCustomerId() ? getCurrentUser().getCustomerId().getId().toString():null;
44 return homePageService.getHomePageLeftTopInfo( 45 return homePageService.getHomePageLeftTopInfo(
45 getCurrentUser().isPtSysadmin(), 46 getCurrentUser().isPtSysadmin(),
46 getCurrentUser().isPtAdmin(), 47 getCurrentUser().isPtAdmin(),
47 getCurrentUser().isPtTenantAdmin(), 48 getCurrentUser().isPtTenantAdmin(),
48 getCurrentUser().isPtCommonTenant(), 49 getCurrentUser().isPtCommonTenant(),
49 getCurrentUser().getCurrentTenantId(), 50 getCurrentUser().getCurrentTenantId(),
50 - getCurrentUser().getCurrentUserId(),  
51 - getCurrentUser().getCustomerId().getId().toString()); 51 + getCurrentUser().getCurrentUserId(),customerId);
52 } 52 }
53 53
54 @GetMapping("right/overdue") 54 @GetMapping("right/overdue")
@@ -116,8 +116,7 @@ public class TkHomePageServiceImpl implements HomePageService { @@ -116,8 +116,7 @@ public class TkHomePageServiceImpl implements HomePageService {
116 todayBegin, todayEnd, currentTenantId, apiUsageState.getId(), messageInfo, alarm); 116 todayBegin, todayEnd, currentTenantId, apiUsageState.getId(), messageInfo, alarm);
117 117
118 }else { 118 }else {
119 - List<String> tbDevices = null;  
120 - List<BaseHomePageTop> alarmList = null; 119 + List<BaseHomePageTop> alarmList;
121 long startTs = todayBegin.toInstant(ZoneOffset.of("+8")).toEpochMilli(); 120 long startTs = todayBegin.toInstant(ZoneOffset.of("+8")).toEpochMilli();
122 if(isPtCommonTenant){ 121 if(isPtCommonTenant){
123 //查询所有组织id 122 //查询所有组织id