/** * AvanceObraService - Gestión de Avances de Obra * * Gestiona el registro y aprobación de avances físicos de obra. * Incluye workflow de captura -> revisión -> aprobación. * * @module Progress */ import { Repository } from 'typeorm'; import { BaseService, ServiceContext, PaginatedResult } from '../../../shared/services/base.service'; import { AvanceObra, AdvanceStatus } from '../entities/avance-obra.entity'; import { FotoAvance } from '../entities/foto-avance.entity'; export interface CreateAvanceDto { loteId?: string; departamentoId?: string; conceptoId: string; captureDate: Date; quantityExecuted: number; percentageExecuted?: number; notes?: string; } export interface AddFotoDto { fileUrl: string; fileName?: string; fileSize?: number; mimeType?: string; description?: string; location?: { lat: number; lng: number; }; } export interface AvanceFilters { loteId?: string; departamentoId?: string; conceptoId?: string; status?: AdvanceStatus; dateFrom?: Date; dateTo?: Date; } export declare class AvanceObraService extends BaseService { private readonly fotoRepository; constructor(repository: Repository, fotoRepository: Repository); /** * Crear nuevo avance (captura) */ createAvance(ctx: ServiceContext, data: CreateAvanceDto): Promise; /** * Obtener avances por lote */ findByLote(ctx: ServiceContext, loteId: string, page?: number, limit?: number): Promise>; /** * Obtener avances por departamento */ findByDepartamento(ctx: ServiceContext, departamentoId: string, page?: number, limit?: number): Promise>; /** * Obtener avances con filtros */ findWithFilters(ctx: ServiceContext, filters: AvanceFilters, page?: number, limit?: number): Promise>; /** * Obtener avance con fotos */ findWithFotos(ctx: ServiceContext, id: string): Promise; /** * Agregar foto al avance */ addFoto(ctx: ServiceContext, avanceId: string, data: AddFotoDto): Promise; /** * Revisar avance */ review(ctx: ServiceContext, avanceId: string): Promise; /** * Aprobar avance */ approve(ctx: ServiceContext, avanceId: string): Promise; /** * Rechazar avance */ reject(ctx: ServiceContext, avanceId: string, reason: string): Promise; /** * Calcular avance acumulado por concepto */ getAccumulatedProgress(ctx: ServiceContext, loteId?: string, departamentoId?: string): Promise; } interface ConceptProgress { conceptoId: string; totalQuantity: number; avgPercentage: number; } export {}; //# sourceMappingURL=avance-obra.service.d.ts.map