接入设备故障告警和场站实时任务进度
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import '../entities/device_entity.dart';
|
||||
import '../repositories/device_repository.dart';
|
||||
|
||||
/// 获取真实场站设备,供绑定和指令目标选择使用。
|
||||
class GetSiteDevicesUseCase {
|
||||
const GetSiteDevicesUseCase(this.repository);
|
||||
|
||||
final DeviceRepository repository;
|
||||
|
||||
Future<List<DeviceEntity>> call(int siteId) {
|
||||
if (siteId <= 0) throw ArgumentError('请先选择场站');
|
||||
return repository.getSiteDevices(siteId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user