重整多余的UI组件和未定功能的逻辑链路的修正
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import 'package:fpdart/fpdart.dart';
|
||||
import '../../../../core/error/failure.dart';
|
||||
import '../entities/work_history_record.dart';
|
||||
import '../repositories/work_history_repository.dart';
|
||||
|
||||
class LoadSiteWorkHistoryUseCase {
|
||||
LoadSiteWorkHistoryUseCase(this.repository);
|
||||
final WorkHistoryRepository repository;
|
||||
|
||||
Future<Either<Failure, WorkHistoryPage>> call({
|
||||
required int siteId,
|
||||
required int orgId,
|
||||
int pageNum = 1,
|
||||
int pageSize = 99999999,
|
||||
}) async {
|
||||
if (siteId <= 0 || orgId <= 0) return Left(Failure('请先选择有效场站和组织'));
|
||||
if (pageNum <= 0 || pageSize <= 0) return Left(Failure('分页参数无效'));
|
||||
return repository.load(
|
||||
siteId: siteId,
|
||||
orgId: orgId,
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user