集成 获取用户设备的作业列表/删除作业列表/添加作业区域
This commit is contained in:
@@ -1,20 +1,37 @@
|
||||
import '../../data/models/device_add_path_point_model.dart';
|
||||
import '../../data/models/device_work_area_param_model.dart';
|
||||
import '../repositories/path_repository.dart';
|
||||
|
||||
abstract class GeneratePathUseCase {
|
||||
Future<List<DeviceAddPathPointModel>> execute(List<DeviceAddPathPointModel> coordinates);
|
||||
Future<List<DeviceAddPathPointModel>> execute({
|
||||
required ReferencePoint reference,
|
||||
required int heading,
|
||||
required OuterBoundary outer,
|
||||
required List<HoleBoundary> holes,
|
||||
required int workType,
|
||||
});
|
||||
}
|
||||
|
||||
class GeneratePathUseCaseImpl implements GeneratePathUseCase {
|
||||
final PathRepository _repository;
|
||||
|
||||
GeneratePathUseCaseImpl(this._repository);
|
||||
|
||||
//完成路径的生成
|
||||
@override
|
||||
Future<List<DeviceAddPathPointModel>> execute(List<DeviceAddPathPointModel> coordinates) async {
|
||||
return await _repository.generatePath(coordinates);
|
||||
Future<List<DeviceAddPathPointModel>> execute({
|
||||
required ReferencePoint reference,
|
||||
required int heading,
|
||||
required OuterBoundary outer,
|
||||
required List<HoleBoundary> holes,
|
||||
required int workType,
|
||||
}) async {
|
||||
return await _repository.generatePath(
|
||||
reference: reference,
|
||||
heading: heading,
|
||||
outer: outer,
|
||||
holes: holes,
|
||||
workType: workType,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user