设备列表不展示display_flg=1的数据
This commit is contained in:
@ -91,5 +91,8 @@ public interface EmsSiteSettingMapper
|
||||
*/
|
||||
public List<SiteDeviceListVo> getAllSiteDeviceList(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory);
|
||||
|
||||
|
||||
public List<SiteDeviceListVo> getAllSiteDeviceListNoDisp(@Param("siteId") String siteId, @Param("deviceCategory") String deviceCategory);
|
||||
|
||||
public List<String> getAllSiteId();
|
||||
}
|
||||
|
||||
@ -27,6 +27,8 @@ public interface IEmsSiteService
|
||||
|
||||
public List<SiteDeviceListVo> getAllDeviceList(String siteId, String deviceCategory);
|
||||
|
||||
public List<SiteDeviceListVo> getAllDeviceListNoDisp(String siteId, String deviceCategory);
|
||||
|
||||
public List<Map<String,Object>> getAllPcsInfo(String siteId);
|
||||
|
||||
public List<Map<String,Object>> getParentCategoryDeviceId(String siteId, String deviceCategory);
|
||||
|
||||
@ -99,6 +99,31 @@ public class EmsSiteServiceImpl implements IEmsSiteService
|
||||
return resultData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备列表
|
||||
*
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SiteDeviceListVo> getAllDeviceListNoDisp(String siteId, String deviceCategory) {
|
||||
List<SiteDeviceListVo> resultData = emsSiteMapper.getAllSiteDeviceListNoDisp(siteId, deviceCategory);
|
||||
if(resultData == null || resultData.size() == 0){
|
||||
return resultData;
|
||||
}
|
||||
for (SiteDeviceListVo siteDeviceListVo : resultData) {
|
||||
String clusterId = siteDeviceListVo.getDeviceId();
|
||||
String category = siteDeviceListVo.getDeviceCategory();
|
||||
if(DeviceCategory.CLUSTER.getCode().equals(category)){
|
||||
// 获取该stack下面有多少单体电池
|
||||
List<EmsBatteryData> batteryDataList = redisCache.getCacheList(RedisKeyConstants.BATTERY + siteId + "_" + clusterId);
|
||||
siteDeviceListVo.setBatteryNum(batteryDataList == null ? 0 : batteryDataList.size());
|
||||
}
|
||||
String categoryName = DeviceCategory.getInfoByCode(category);
|
||||
siteDeviceListVo.setCategoryName(categoryName);
|
||||
}
|
||||
return resultData;
|
||||
}
|
||||
/**
|
||||
* 根据site_id获取所有pcs
|
||||
* @param siteId
|
||||
|
||||
Reference in New Issue
Block a user