fix: API 응답 파싱 오류 수정 및 에러 처리 개선
주요 변경사항: - 창고 관리 API 응답 구조와 DTO 불일치 수정 - WarehouseLocationDto에 code, manager_phone 필드 추가 - RemoteDataSource에서 API 응답을 DTO 구조에 맞게 변환 - 회사 관리 API 응답 파싱 오류 수정 - CompanyResponse의 필수 필드를 nullable로 변경 - PaginatedResponse 구조 매핑 로직 개선 - 에러 처리 및 로깅 개선 - Service Layer에 상세 에러 로깅 추가 - Controller에서 에러 타입별 처리 - 새로운 유틸리티 추가 - ResponseInterceptor: API 응답 정규화 - DebugLogger: 디버깅 도구 - HealthCheckService: 서버 상태 확인 - 문서화 - API 통합 테스트 가이드 - 에러 분석 보고서 - 리팩토링 계획서
This commit is contained in:
@@ -52,7 +52,8 @@ _$UpdateEquipmentRequestImpl _$$UpdateEquipmentRequestImplFromJson(
|
||||
? null
|
||||
: DateTime.parse(json['purchaseDate'] as String),
|
||||
purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
|
||||
status: json['status'] as String?,
|
||||
status: _$JsonConverterFromJson<String, String>(
|
||||
json['status'], const EquipmentStatusJsonConverter().fromJson),
|
||||
currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
|
||||
currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
|
||||
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
|
||||
@@ -77,7 +78,8 @@ Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
|
||||
'barcode': instance.barcode,
|
||||
'purchaseDate': instance.purchaseDate?.toIso8601String(),
|
||||
'purchasePrice': instance.purchasePrice,
|
||||
'status': instance.status,
|
||||
'status': _$JsonConverterToJson<String, String>(
|
||||
instance.status, const EquipmentStatusJsonConverter().toJson),
|
||||
'currentCompanyId': instance.currentCompanyId,
|
||||
'currentBranchId': instance.currentBranchId,
|
||||
'warehouseLocationId': instance.warehouseLocationId,
|
||||
@@ -85,3 +87,15 @@ Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
|
||||
'nextInspectionDate': instance.nextInspectionDate?.toIso8601String(),
|
||||
'remark': instance.remark,
|
||||
};
|
||||
|
||||
Value? _$JsonConverterFromJson<Json, Value>(
|
||||
Object? json,
|
||||
Value? Function(Json json) fromJson,
|
||||
) =>
|
||||
json == null ? null : fromJson(json as Json);
|
||||
|
||||
Json? _$JsonConverterToJson<Json, Value>(
|
||||
Value? value,
|
||||
Json? Function(Value value) toJson,
|
||||
) =>
|
||||
value == null ? null : toJson(value);
|
||||
|
||||
Reference in New Issue
Block a user