1,接收tcp推送消息和和接收tcp推送机器的状态推送消息。

2,集成选择作业列表中的一项接口。
This commit is contained in:
2026-02-27 15:33:59 +08:00
parent 5170eeb4e7
commit f6167d3d51
11 changed files with 340 additions and 45 deletions

View File

@@ -0,0 +1,19 @@
// lib/features/devices/domain/usecases/select_work_record_usecase.dart
import 'package:fpdart/fpdart.dart';
import '../../domain/errors/device_failure.dart';
import '../../domain/repositories/path_repository.dart';
class SelectWorkRecordUseCase {
final PathRepository repository;
SelectWorkRecordUseCase(this.repository);
Future<Either<DeviceFailure, List<Map<String, dynamic>>>> call(String workName) async {
try {
final data = await repository.selectWorkRecordByName(workName: workName);
return Right(data);
} catch (e) {
return Left(DeviceFailure.networkError(message: e.toString()));
}
}
}