feat: V/R 유지보수 시스템 전환 및 대시보드 테이블 형태 완성
- V/R 시스템 완전 전환: WARRANTY/CONTRACT/INSPECTION → V(방문)/R(원격) - 유지보수 대시보드 카드 → StandardDataTable 테이블 형태 전환 - "조회중..." 문제 해결: 백엔드 직접 필드 사용 (equipment_model, company_name) - MaintenanceDto 신규 필드 추가: company_id, company_name, equipment_serial, equipment_model - preloadEquipmentData 비활성화로 불필요한 equipment-history API 호출 제거 - CO-STAR 프레임워크 적용 및 CLAUDE.md v3.0 업데이트 - Flutter Analyze ERROR: 0 유지, 100% shadcn_ui 컴플라이언스 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
25
lib/data/repositories/maintenance_stats_repository.dart
Normal file
25
lib/data/repositories/maintenance_stats_repository.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:superport/data/models/maintenance_stats_dto.dart';
|
||||
|
||||
/// 유지보수 통계 데이터 리포지토리
|
||||
/// 기존 maintenance API를 활용하여 대시보드 통계를 계산합니다.
|
||||
abstract class MaintenanceStatsRepository {
|
||||
/// 유지보수 대시보드 통계 조회
|
||||
/// 60일내, 30일내, 7일내, 만료된 계약 등의 통계를 계산합니다.
|
||||
Future<MaintenanceStatsDto> getMaintenanceStats();
|
||||
|
||||
/// 특정 기간별 만료 예정 계약 통계
|
||||
/// [days] 일 내 만료 예정 계약 수를 반환합니다.
|
||||
Future<int> getExpiringContractsCount({required int days});
|
||||
|
||||
/// 계약 타입별 통계
|
||||
/// WARRANTY, CONTRACT, INSPECTION 별 계약 수를 반환합니다.
|
||||
Future<Map<String, int>> getContractsByType();
|
||||
|
||||
/// 만료된 계약 통계
|
||||
/// 현재 기준으로 만료된 계약 수를 반환합니다.
|
||||
Future<int> getExpiredContractsCount();
|
||||
|
||||
/// 전체 활성 계약 수
|
||||
/// 삭제되지 않은 활성 계약의 총 개수를 반환합니다.
|
||||
Future<int> getActiveContractsCount();
|
||||
}
|
||||
Reference in New Issue
Block a user