|
@@ -65,7 +65,7 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
Integer userId = null;
|
|
|
List<Integer> communityIds = null;
|
|
|
- if (loginUser.getType() == 4) userId = loginUser.getId();
|
|
|
+ if (loginUser.getRoleType() !=null && loginUser.getRoleType() == 4) userId = loginUser.getId();
|
|
|
if (orgId != null) communityIds = organizationMapper.findCommunityIds(orgId);
|
|
|
|
|
|
|
|
@@ -80,7 +80,7 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
Integer userId = null;
|
|
|
List<Integer> communityIds = null;
|
|
|
- if (loginUser.getType() == 4) userId = loginUser.getId();
|
|
|
+ if (loginUser.getRoleType() !=null && loginUser.getRoleType() == 4) userId = loginUser.getId();
|
|
|
if (orgId != null) communityIds = organizationMapper.findCommunityIds(orgId);
|
|
|
List<DeviceDto> list = deviceMapper.getList(loginUser.getSiteId(),userId,sysId,deviceTypeId,orgId,province,city,region,communityId,buildingId,deviceNo,clientName,locDesc,status,valveStatus,communityIds,sortColumn,sortOrder);
|
|
|
|
|
@@ -134,7 +134,7 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
Integer userId = null;
|
|
|
List<Integer> communityIds = null;
|
|
|
- if (loginUser.getType() == 4) userId = loginUser.getId();
|
|
|
+ if (loginUser.getRoleType() !=null && loginUser.getRoleType() == 4) userId = loginUser.getId();
|
|
|
if (orgId != null) communityIds = organizationMapper.findCommunityIds(orgId);
|
|
|
List<BuildingSelectInfoDto> list = deviceMapper.deviceAreaList(loginUser.getSiteId(),userId,sysId,deviceTypeId,orgId,province,city,region,communityId,buildingId,deviceNo,clientName,locDesc,status,valveStatus,communityIds);
|
|
|
return buildingService.areaList(list);
|