1,接收tcp推送消息和和接收tcp推送机器的状态推送消息。
2,集成选择作业列表中的一项接口。
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user