Estructura _definitions/: - _INDEX.yml: Indice de catalogos - MODULES-CATALOG.md: 42 modulos (22 heredados + 20 propios) - ENTITIES-CATALOG.md: ~153 entities por schema - SERVICES-CATALOG.md: ~80 services documentados - DATABASE-SCHEMA.md: 8 schemas con DDL detallado Estructura _quick/: - QUICK-INDEX.yml: Navegacion rapida - QUICK-MODULES.yml: Estado de modulos - QUICK-DATABASE.yml: Resumen de BD - QUICK-API.yml: Endpoints principales Orchestration: - HERENCIA-ERP-CORE.md: Documentacion de herencia - directivas/README.md: Directivas locales - trazas/README.md: Sistema de trazas Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
196 lines
5.0 KiB
Markdown
196 lines
5.0 KiB
Markdown
# SERVICES-CATALOG.md - ERP Transportistas
|
|
|
|
**Version:** 1.0.0
|
|
**Fecha:** 2026-01-26
|
|
**Total Services:** ~80 (50 heredados + 30 propios)
|
|
|
|
---
|
|
|
|
## Resumen
|
|
|
|
| Categoria | Services | Estado |
|
|
|-----------|----------|--------|
|
|
| Heredados erp-core | ~50 | 100% disponibles |
|
|
| Propios transporte | ~30 | 40% implementados |
|
|
|
|
---
|
|
|
|
## Services Heredados (erp-core)
|
|
|
|
### Auth & Users
|
|
- AuthService
|
|
- UsersService
|
|
- RolesService
|
|
- PermissionsService
|
|
- SessionsService
|
|
|
|
### Tenancy
|
|
- TenantsService
|
|
- CompaniesService
|
|
- BranchesService
|
|
|
|
### Core
|
|
- CatalogsService
|
|
- SettingsService
|
|
- AuditService
|
|
- NotificationsService
|
|
|
|
### Financial
|
|
- FinancialService
|
|
- InvoicesService
|
|
- PaymentsService
|
|
- AccountingService
|
|
|
|
### Partners
|
|
- PartnersService
|
|
- CustomersService
|
|
- SuppliersService
|
|
|
|
### AI/Intelligence
|
|
- AIService
|
|
- WhatsAppService
|
|
- MCPService
|
|
|
|
---
|
|
|
|
## Services Propios - Transporte
|
|
|
|
### OrdenesTransporteService (MAI-003)
|
|
- **Path:** `backend/src/modules/ordenes-transporte/services/`
|
|
- **Estado:** 40% implementado
|
|
- **Metodos:**
|
|
- `create(dto)` - Crear OT
|
|
- `findAll(filters)` - Listar OTs
|
|
- `findById(id)` - Obtener OT
|
|
- `update(id, dto)` - Actualizar OT
|
|
- `delete(id)` - Eliminar OT
|
|
- `changeStatus(id, status)` - Cambiar estado
|
|
- `assignToViaje(otId, viajeId)` - Asignar a viaje
|
|
|
|
### ViajesService (MAI-004, MAI-005)
|
|
- **Path:** `backend/src/modules/viajes/services/`
|
|
- **Estado:** Pendiente
|
|
- **Metodos:**
|
|
- `create(dto)` - Crear viaje
|
|
- `planificar(viajeId, recursos)` - Planificar recursos
|
|
- `despachar(viajeId, checklist)` - Liberar viaje
|
|
- `cerrar(viajeId, pod)` - Cerrar con POD
|
|
|
|
### TrackingService (MAI-006)
|
|
- **Path:** `backend/src/modules/tracking/services/`
|
|
- **Estado:** 20% implementado
|
|
- **Metodos:**
|
|
- `registrarEvento(dto)` - Registrar posicion GPS
|
|
- `getUltimaPosicion(unidadId)` - Ultima ubicacion
|
|
- `getHistorial(viajeId)` - Historial de eventos
|
|
- `calcularETA(viajeId)` - ETA dinamico
|
|
- `verificarGeocercas(lat, lng)` - Check geocercas
|
|
- `generarAlerta(tipo, datos)` - Crear alerta
|
|
|
|
### FlotaService (MAI-011)
|
|
- **Path:** `backend/src/modules/gestion-flota/services/`
|
|
- **Estado:** 40% implementado
|
|
- **Metodos:**
|
|
- `getUnidades(filters)` - Listar unidades
|
|
- `getOperadores(filters)` - Listar operadores
|
|
- `getDisponibilidad(fecha)` - Recursos disponibles
|
|
- `asignarOperador(unidadId, operadorId)` - Asignar
|
|
- `verificarDocumentos(recursoId)` - Validar vigencia
|
|
|
|
### CombustibleService (MAI-012)
|
|
- **Path:** `backend/src/modules/combustible-gastos/services/`
|
|
- **Estado:** 50% implementado
|
|
- **Metodos:**
|
|
- `registrarCarga(dto)` - Registrar carga combustible
|
|
- `registrarPeaje(dto)` - Registrar cruce peaje
|
|
- `registrarGasto(dto)` - Registrar gasto
|
|
- `generarAnticipo(operadorId, monto)` - Crear anticipo
|
|
- `calcularRendimiento(unidadId, periodo)` - km/litro
|
|
- `detectarAnomalias(viajeId)` - Alertas fraude
|
|
|
|
### FacturacionTransporteService (MAI-009)
|
|
- **Path:** `backend/src/modules/facturacion-transporte/services/`
|
|
- **Estado:** 30% implementado
|
|
- **Metodos:**
|
|
- `calcularTarifa(lane, peso, volumen)` - Calcular precio
|
|
- `aplicarRecargos(facturaId, recargos)` - Agregar recargos
|
|
- `generarFactura(viajeId)` - Crear factura
|
|
- `calcularFuelSurcharge(fecha)` - Recargo combustible
|
|
|
|
### CartaPorteService (MAE-016)
|
|
- **Path:** `backend/src/modules/carta-porte/services/`
|
|
- **Estado:** Pendiente
|
|
- **Metodos:**
|
|
- `generarComplemento(viajeId)` - Crear XML
|
|
- `validarDatos(dto)` - Validar requeridos
|
|
- `timbrar(cartaPorteId)` - Enviar a PAC
|
|
- `generarPDF(cartaPorteId)` - PDF para impresion
|
|
- `cancelar(cartaPorteId, motivo)` - Cancelar CFDI
|
|
|
|
### MantenimientoService (MAI-013)
|
|
- **Path:** `backend/src/modules/mantenimiento/services/`
|
|
- **Estado:** Pendiente
|
|
- **Metodos:**
|
|
- `crearOrdenTrabajo(dto)` - Crear OT manto
|
|
- `programarPreventivo(unidadId)` - Programar
|
|
- `registrarRefaccion(otId, refaccion)` - Agregar parte
|
|
- `getProximosMantenimientos()` - Alertas vencimiento
|
|
|
|
### CarriersService (MAI-014)
|
|
- **Path:** `backend/src/modules/carriers/services/`
|
|
- **Estado:** Pendiente
|
|
- **Metodos:**
|
|
- `registrarCarrier(dto)` - Alta tercero
|
|
- `validarDocumentos(carrierId)` - Verificar vigencia
|
|
- `calcularScorecard(carrierId)` - Evaluar desempeno
|
|
- `asignarViaje(carrierId, viajeId)` - Subcontratar
|
|
|
|
---
|
|
|
|
## Integraciones Externas
|
|
|
|
### GPSIntegrationService
|
|
- **Estado:** Planificado
|
|
- **Proveedores:**
|
|
- Geotab
|
|
- Samsara
|
|
- Omnitracs
|
|
- **Metodos:**
|
|
- `conectar(proveedor, credentials)`
|
|
- `getPosicion(deviceId)`
|
|
- `getEventos(desde, hasta)`
|
|
|
|
### PACIntegrationService
|
|
- **Estado:** Planificado
|
|
- **Proveedores:**
|
|
- Finkok
|
|
- Facturama
|
|
- SW Sapien
|
|
- **Metodos:**
|
|
- `timbrar(xml)`
|
|
- `cancelar(uuid, motivo)`
|
|
- `getStatus(uuid)`
|
|
|
|
### MapasService
|
|
- **Estado:** Planificado
|
|
- **Proveedores:**
|
|
- Google Maps
|
|
- HERE
|
|
- Mapbox
|
|
- **Metodos:**
|
|
- `geocodificar(direccion)`
|
|
- `calcularRuta(origen, destino)`
|
|
- `getDistanciaTiempo(puntos)`
|
|
|
|
---
|
|
|
|
## Referencias
|
|
|
|
- Backend: `backend/src/modules/`
|
|
- Entities: `ENTITIES-CATALOG.md`
|
|
- API: `_quick/QUICK-API.yml`
|
|
|
|
---
|
|
|
|
*Ultima actualizacion: 2026-01-26*
|