新增设备获取父类类别的id列表
This commit is contained in:
@ -28,4 +28,6 @@ public interface IEmsSiteService
|
||||
public List<SiteDeviceListVo> getAllDeviceList(String siteId);
|
||||
|
||||
public List<Map<String,Object>> getAllPcsInfo(String siteId);
|
||||
|
||||
public List<Map<String,Object>> getParentCategoryDeviceId(String siteId, String deviceCategory);
|
||||
}
|
||||
|
||||
@ -106,4 +106,16 @@ public class EmsSiteServiceImpl implements IEmsSiteService
|
||||
public List<Map<String, Object>> getAllPcsInfo(String siteId) {
|
||||
return emsDevicesMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.PCS.getCode());
|
||||
}
|
||||
|
||||
// 根据设备类别获取父类的设备id
|
||||
@Override
|
||||
public List<Map<String,Object>> getParentCategoryDeviceId(String siteId, String deviceCategory) {
|
||||
DeviceCategory category = DeviceCategory.fromCode(deviceCategory);
|
||||
if(category == null || category.getParentCategory() == null){
|
||||
return null;
|
||||
}
|
||||
String parentCategory = category.getParentCategory().getCode();
|
||||
List<Map<String,Object>> deviceIdList = emsDevicesMapper.getDeviceInfosBySiteIdAndCategory(siteId, parentCategory);
|
||||
return deviceIdList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user