Nuevos archivos de analisis: - MATRIZ-COHERENCIA-DDL-BACKEND.yml: Coherencia 28% global - transport: 0% (6 tablas, 0 entities) - fleet: 0% (5 tablas, 0 entities) - fuel: 100% (5 tablas, 5 entities) - billing: 100% (6 tablas, 6 entities) - MAPEO-RF-GIRO-A-MODULOS.yml: 68 RF mapeados - 35% con documentacion - P0 urgente: MAI-007, MAI-004, MAI-005, MAI-002 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
528 lines
15 KiB
YAML
528 lines
15 KiB
YAML
# MATRIZ-COHERENCIA-DDL-BACKEND.yml - ERP Transportistas
|
|
# Sistema SIMCO v4.0.0
|
|
# Analisis de coherencia entre DDL y Backend
|
|
# Creado: 2026-01-27 (Fase 1 Auditoria)
|
|
|
|
version: "1.0.0"
|
|
created: "2026-01-27"
|
|
updated: "2026-01-27"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# RESUMEN EJECUTIVO
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
resumen:
|
|
total_tablas_ddl: 53
|
|
total_entities_especializadas: 44
|
|
entities_heredadas: 109
|
|
gap_entities_faltantes: 42
|
|
coherencia_porcentaje: "21%"
|
|
estado: "INCOHERENTE - Requiere implementacion urgente"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# DETALLE POR SCHEMA
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
schemas:
|
|
|
|
transport:
|
|
ddl_file: "01-transport-schema-ddl.sql"
|
|
tablas_ddl: 6
|
|
tablas:
|
|
- nombre: ordenes_transporte
|
|
entity_esperada: OrdenTransporte
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-003
|
|
|
|
- nombre: embarques
|
|
entity_esperada: Embarque
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-003
|
|
|
|
- nombre: viajes
|
|
entity_esperada: Viaje
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-004
|
|
|
|
- nombre: paradas_viaje
|
|
entity_esperada: ParadaViaje
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-004
|
|
|
|
- nombre: pod
|
|
entity_esperada: POD
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-007
|
|
|
|
- nombre: incidencias
|
|
entity_esperada: Incidencia
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-008
|
|
|
|
resumen:
|
|
implementadas: 0
|
|
faltantes: 6
|
|
coherencia: "0%"
|
|
|
|
fleet:
|
|
ddl_file: "02-fleet-schema-ddl.sql"
|
|
tablas_ddl: 5
|
|
tablas:
|
|
- nombre: unidades
|
|
entity_esperada: Unidad
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-011
|
|
|
|
- nombre: remolques
|
|
entity_esperada: Remolque
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-011
|
|
|
|
- nombre: operadores
|
|
entity_esperada: Operador
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P0
|
|
modulo: MAI-011
|
|
|
|
- nombre: documentos_flota
|
|
entity_esperada: DocumentoFlota
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-011
|
|
|
|
- nombre: asignaciones
|
|
entity_esperada: AsignacionFlota
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-011
|
|
|
|
resumen:
|
|
implementadas: 0
|
|
faltantes: 5
|
|
coherencia: "0%"
|
|
|
|
tracking:
|
|
ddl_file: "03-tracking-schema-ddl.sql"
|
|
tablas_ddl: 6
|
|
tablas:
|
|
- nombre: posiciones_gps
|
|
entity_esperada: PosicionGPS
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-006
|
|
|
|
- nombre: eventos
|
|
entity_esperada: EventoTracking
|
|
entity_existente: "tracking/entities (2 basicas)"
|
|
estado: PARCIAL
|
|
prioridad: P1
|
|
modulo: MAI-006
|
|
|
|
- nombre: geocercas
|
|
entity_esperada: Geocerca
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-006
|
|
|
|
- nombre: alertas
|
|
entity_esperada: AlertaTracking
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-006
|
|
|
|
- nombre: reglas_alerta
|
|
entity_esperada: ReglaAlerta
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-006
|
|
|
|
- nombre: eta_calculado
|
|
entity_esperada: ETACalculado
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-006
|
|
|
|
resumen:
|
|
implementadas: 1
|
|
faltantes: 5
|
|
coherencia: "17%"
|
|
|
|
fuel:
|
|
ddl_file: "04-fuel-schema-ddl.sql"
|
|
tablas_ddl: 5
|
|
tablas:
|
|
- nombre: cargas_combustible
|
|
entity_esperada: CargaCombustible
|
|
entity_existente: "combustible-gastos/carga-combustible.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-012
|
|
|
|
- nombre: cruces_peaje
|
|
entity_esperada: CrucePeaje
|
|
entity_existente: "combustible-gastos/cruce-peaje.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-012
|
|
|
|
- nombre: gastos_viaje
|
|
entity_esperada: GastoViaje
|
|
entity_existente: "combustible-gastos/gasto-viaje.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-012
|
|
|
|
- nombre: anticipos_viaticos
|
|
entity_esperada: AnticipoViatico
|
|
entity_existente: "combustible-gastos/anticipo-viatico.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-012
|
|
|
|
- nombre: control_rendimiento
|
|
entity_esperada: ControlRendimiento
|
|
entity_existente: "combustible-gastos/control-rendimiento.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-012
|
|
|
|
resumen:
|
|
implementadas: 5
|
|
faltantes: 0
|
|
coherencia: "100%"
|
|
|
|
maintenance:
|
|
ddl_file: "05-maintenance-schema-ddl.sql"
|
|
tablas_ddl: 5
|
|
tablas:
|
|
- nombre: planes_mantenimiento
|
|
entity_esperada: PlanMantenimiento
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-013
|
|
|
|
- nombre: programacion_mantenimiento
|
|
entity_esperada: ProgramacionMantenimiento
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-013
|
|
|
|
- nombre: ordenes_trabajo
|
|
entity_esperada: OrdenTrabajo
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-013
|
|
|
|
- nombre: lineas_orden_trabajo
|
|
entity_esperada: LineaOrdenTrabajo
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-013
|
|
|
|
- nombre: checklist_items
|
|
entity_esperada: ChecklistItem
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-013
|
|
|
|
resumen:
|
|
implementadas: 0
|
|
faltantes: 5
|
|
coherencia: "0%"
|
|
|
|
carriers:
|
|
ddl_file: "06-carriers-schema-ddl.sql"
|
|
tablas_ddl: 6
|
|
tablas:
|
|
- nombre: carriers
|
|
entity_esperada: Carrier
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-014
|
|
|
|
- nombre: documentos_carrier
|
|
entity_esperada: DocumentoCarrier
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-014
|
|
|
|
- nombre: unidades_carrier
|
|
entity_esperada: UnidadCarrier
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-014
|
|
|
|
- nombre: operadores_carrier
|
|
entity_esperada: OperadorCarrier
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-014
|
|
|
|
- nombre: asignaciones_carrier
|
|
entity_esperada: AsignacionCarrier
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-014
|
|
|
|
- nombre: scorecard
|
|
entity_esperada: ScorecardCarrier
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAI-014
|
|
|
|
resumen:
|
|
implementadas: 0
|
|
faltantes: 6
|
|
coherencia: "0%"
|
|
|
|
billing:
|
|
ddl_file: "07-billing-transport-ddl.sql"
|
|
tablas_ddl: 6
|
|
tablas:
|
|
- nombre: lanes
|
|
entity_esperada: Lane
|
|
entity_existente: "tarifas-transporte/lane.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-009
|
|
|
|
- nombre: tarifas
|
|
entity_esperada: Tarifa
|
|
entity_existente: "tarifas-transporte/tarifa.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-009
|
|
|
|
- nombre: recargos_catalogo
|
|
entity_esperada: RecargoCatalogo
|
|
entity_existente: "tarifas-transporte/recargo-catalogo.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-009
|
|
|
|
- nombre: facturas_transporte
|
|
entity_esperada: FacturaTransporte
|
|
entity_existente: "tarifas-transporte/factura-transporte.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-009
|
|
|
|
- nombre: lineas_factura
|
|
entity_esperada: LineaFactura
|
|
entity_existente: "tarifas-transporte/linea-factura.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-009
|
|
|
|
- nombre: fuel_surcharge
|
|
entity_esperada: FuelSurcharge
|
|
entity_existente: "tarifas-transporte/fuel-surcharge.entity.ts"
|
|
estado: IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAI-009
|
|
|
|
resumen:
|
|
implementadas: 6
|
|
faltantes: 0
|
|
coherencia: "100%"
|
|
|
|
compliance:
|
|
ddl_file: "08-compliance-schema-ddl.sql"
|
|
tablas_ddl: 8
|
|
tablas:
|
|
- nombre: cartas_porte
|
|
entity_esperada: CartaPorte
|
|
entity_existente: "carta-porte/entities (7 basicas)"
|
|
estado: PARCIAL
|
|
prioridad: P1
|
|
modulo: MAE-016
|
|
|
|
- nombre: ubicaciones_carta_porte
|
|
entity_esperada: UbicacionCartaPorte
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAE-016
|
|
|
|
- nombre: mercancias_carta_porte
|
|
entity_esperada: MercanciaCartaPorte
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAE-016
|
|
|
|
- nombre: figuras_transporte
|
|
entity_esperada: FiguraTransporte
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAE-016
|
|
|
|
- nombre: autotransporte_carta_porte
|
|
entity_esperada: AutotransporteCartaPorte
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P1
|
|
modulo: MAE-016
|
|
|
|
- nombre: hos_logs
|
|
entity_esperada: HOSLog
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P3
|
|
modulo: MAE-017
|
|
|
|
- nombre: hos_resumen_diario
|
|
entity_esperada: HOSResumenDiario
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P3
|
|
modulo: MAE-017
|
|
|
|
- nombre: inspecciones_pre_viaje
|
|
entity_esperada: InspeccionPreViaje
|
|
entity_existente: null
|
|
estado: NO_IMPLEMENTADA
|
|
prioridad: P2
|
|
modulo: MAE-017
|
|
|
|
resumen:
|
|
implementadas: 1
|
|
faltantes: 7
|
|
coherencia: "13%"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# RESUMEN CONSOLIDADO
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
consolidado:
|
|
por_schema:
|
|
- schema: transport
|
|
tablas: 6
|
|
implementadas: 0
|
|
coherencia: "0%"
|
|
prioridad: P0
|
|
|
|
- schema: fleet
|
|
tablas: 5
|
|
implementadas: 0
|
|
coherencia: "0%"
|
|
prioridad: P0
|
|
|
|
- schema: tracking
|
|
tablas: 6
|
|
implementadas: 1
|
|
coherencia: "17%"
|
|
prioridad: P1
|
|
|
|
- schema: fuel
|
|
tablas: 5
|
|
implementadas: 5
|
|
coherencia: "100%"
|
|
prioridad: P2
|
|
|
|
- schema: maintenance
|
|
tablas: 5
|
|
implementadas: 0
|
|
coherencia: "0%"
|
|
prioridad: P2
|
|
|
|
- schema: carriers
|
|
tablas: 6
|
|
implementadas: 0
|
|
coherencia: "0%"
|
|
prioridad: P2
|
|
|
|
- schema: billing
|
|
tablas: 6
|
|
implementadas: 6
|
|
coherencia: "100%"
|
|
prioridad: P1
|
|
|
|
- schema: compliance
|
|
tablas: 8
|
|
implementadas: 1
|
|
coherencia: "13%"
|
|
prioridad: P1
|
|
|
|
totales:
|
|
tablas_ddl: 47
|
|
entities_implementadas: 13
|
|
entities_parciales: 2
|
|
entities_faltantes: 32
|
|
coherencia_global: "28%"
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# PLAN DE ACCION
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
plan_accion:
|
|
P0_urgente:
|
|
descripcion: "Entities criticas para workflow principal"
|
|
schemas: [transport, fleet]
|
|
entities_requeridas: 11
|
|
justificacion: |
|
|
Sin estas entities no se puede implementar el flujo:
|
|
OT -> Planeacion -> Despacho -> Viaje -> POD -> Facturacion
|
|
|
|
P1_corto_plazo:
|
|
descripcion: "Entities para visibilidad y compliance"
|
|
schemas: [tracking, compliance]
|
|
entities_requeridas: 12
|
|
justificacion: |
|
|
Tracking es diferenciador de mercado.
|
|
Compliance (Carta Porte) es obligacion fiscal.
|
|
|
|
P2_mediano_plazo:
|
|
descripcion: "Entities de optimizacion"
|
|
schemas: [maintenance, carriers]
|
|
entities_requeridas: 11
|
|
justificacion: |
|
|
Mantenimiento para disponibilidad de flota.
|
|
Carriers para escalabilidad.
|
|
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
# NOTAS
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
|
|
notas:
|
|
- "fuel y billing estan 100% coherentes (11 entities implementadas)"
|
|
- "transport y fleet estan al 0% - CRITICO para el negocio"
|
|
- "Se requieren ~32 entities nuevas especializadas"
|
|
- "Las entities genericas existentes (Product, SalesOrder, etc.) NO sirven para el giro"
|