对接路径规划的列表(根据场站的下的)
优化无人机机场的监控视频的显示视频流畅度提升80% 添加首页tcp指示灯的机器状态信息展示功能。(暂不支持在此页面上设备的切换显示)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import 'package:fpdart/fpdart.dart';
|
||||
import '../../data/models/work_record_entity.dart';
|
||||
import '../../domain/errors/device_failure.dart';
|
||||
import '../../domain/repositories/path_repository.dart';
|
||||
|
||||
class GetWorkRecordsBySiteIdUseCase {
|
||||
final PathRepository repository;
|
||||
|
||||
GetWorkRecordsBySiteIdUseCase(this.repository);
|
||||
|
||||
Future<Either<DeviceFailure, List<WorkRecordEntity>>> call(int siteId) async {
|
||||
try {
|
||||
final result = await repository.getWorkRecordsBySiteId(siteId: siteId);
|
||||
return Right(result);
|
||||
} catch (e) {
|
||||
return Left(DeviceFailure.networkError(message: e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user