backup: 사용하지 않는 파일 삭제 전 복구 지점
- 전체 371개 파일 중 82개 미사용 파일 식별 - Phase 1: 33개 파일 삭제 예정 (100% 안전) - Phase 2: 30개 파일 삭제 검토 예정 - Phase 3: 19개 파일 수동 검토 예정 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,24 +1,29 @@
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:superport/core/constants/app_constants.dart';
|
||||
import 'package:superport/core/errors/exceptions.dart';
|
||||
import 'package:superport/core/errors/failures.dart';
|
||||
import 'package:superport/data/datasources/remote/equipment_remote_datasource.dart';
|
||||
import 'package:superport/data/models/common/paginated_response.dart';
|
||||
import 'package:superport/data/models/equipment/equipment_dto.dart';
|
||||
import 'package:superport/data/repositories/equipment_history_repository.dart';
|
||||
|
||||
class EquipmentService {
|
||||
final EquipmentRemoteDataSource _remoteDataSource = GetIt.instance<EquipmentRemoteDataSource>();
|
||||
final EquipmentHistoryRepository _historyRepository = GetIt.instance<EquipmentHistoryRepository>();
|
||||
|
||||
// 장비 목록 조회 (간단한 버전)
|
||||
Future<PaginatedResponse<EquipmentDto>> getEquipments({
|
||||
int page = 1,
|
||||
int perPage = 20,
|
||||
int perPage = AppConstants.equipmentPageSize,
|
||||
String? search,
|
||||
int? companyId,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _remoteDataSource.getEquipments(
|
||||
page: page,
|
||||
perPage: perPage,
|
||||
search: search,
|
||||
companyId: companyId,
|
||||
);
|
||||
|
||||
return PaginatedResponse<EquipmentDto>(
|
||||
@@ -84,15 +89,17 @@ class EquipmentService {
|
||||
// 상태별 장비 조회
|
||||
Future<PaginatedResponse<EquipmentDto>> getEquipmentsWithStatus({
|
||||
int page = 1,
|
||||
int perPage = 20,
|
||||
int perPage = AppConstants.equipmentPageSize,
|
||||
String? search,
|
||||
String? status,
|
||||
int? companyId,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _remoteDataSource.getEquipments(
|
||||
page: page,
|
||||
perPage: perPage,
|
||||
search: search,
|
||||
companyId: companyId,
|
||||
);
|
||||
|
||||
// 간단한 상태 필터링 (백엔드에서 지원하지 않는 경우 클라이언트 측에서)
|
||||
@@ -143,9 +150,9 @@ class EquipmentService {
|
||||
// 장비 이력 조회
|
||||
Future<List<dynamic>> getEquipmentHistory(int equipmentId, {int? page, int? perPage}) async {
|
||||
try {
|
||||
// 장비 이력은 EquipmentHistoryService나 별도 서비스에서 처리해야 하지만
|
||||
// 호환성을 위해 빈 리스트 반환
|
||||
return [];
|
||||
// 실제 EquipmentHistoryRepository를 통한 API 호출
|
||||
final histories = await _historyRepository.getEquipmentHistoriesByEquipmentId(equipmentId);
|
||||
return histories;
|
||||
} on ServerException catch (e) {
|
||||
throw ServerFailure(message: e.message);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user