|
|
|
@ -71,6 +71,8 @@ public class CommonOpt { |
|
|
|
@Autowired |
|
|
|
private UserBuildingRelationMapperExt userBuildingRelationMapperExt; |
|
|
|
@Autowired |
|
|
|
private LevelMapperExt levelMapperExt; |
|
|
|
@Autowired |
|
|
|
private DeviceRawdataRealtimeMapperExt deviceRawdataRealtimeMapperExt; |
|
|
|
@Autowired |
|
|
|
private DeviceInfoMapperExt deviceInfoMapperExt; |
|
|
|
@ -253,6 +255,20 @@ public class CommonOpt { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public List<Long> getBindLevelBuildingIdList(Long userId) { |
|
|
|
Integer levelManager = basicUserMapperExt.checkLevelManager(userId); |
|
|
|
if (levelManager > 0) { |
|
|
|
return null;//null表示不限制, sql里面判定bindedBuildingList=null的话,就不限制楼宇
|
|
|
|
} else { |
|
|
|
List<Long> bindedBuildingList = levelMapperExt.getBoundBuilding(userId); |
|
|
|
if (CollectionUtils.isEmpty(bindedBuildingList)) { |
|
|
|
return Collections.singletonList(-1L);//-1的话,表示没有绑定
|
|
|
|
} else { |
|
|
|
return bindedBuildingList; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public List<String> getPreDay(int days) { |
|
|
|
// 日本时区
|
|
|
|
ZoneId JST = Constants.ZONE_TOKYO; |
|
|
|
|