|
@@ -444,6 +444,20 @@ public class PersonDeviceRelationController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("create_time","desc"));
|
|
|
|
|
|
+ //为公司管理员
|
|
|
+ boolean is_admin = userService.hasRole(subject,"ADMIN");
|
|
|
+ if(is_admin){
|
|
|
+ String userCompanyId = user.getCompanyId();
|
|
|
+
|
|
|
+ List<DeviceInfo> deviceInfoList = deviceInfoService.findByCompanyId(userCompanyId);
|
|
|
+ List<String> deviceIdList = new ArrayList<String>();
|
|
|
+ for (DeviceInfo deviceInfo:deviceInfoList) {
|
|
|
+ deviceIdList.add(deviceInfo.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ searchParams.put("deviceIdList",deviceIdList);
|
|
|
+ }
|
|
|
+
|
|
|
//searchParams.put("companyId",user.getCompanyId());
|
|
|
|
|
|
Page<DeviceInfo> page = deviceInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|