- Updated docs and inventory files - Added new architecture docs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
283 lines
12 KiB
Markdown
283 lines
12 KiB
Markdown
# PROXIMA-ACCION.md - ERP Transportistas
|
|
|
|
**Ultima Actualizacion:** 2026-01-27
|
|
**Sistema:** SIMCO v4.0.0
|
|
**Estado del Proyecto:** 32% completado | DDL 100% | Docs 100% | Backend 15% | Frontend 0%
|
|
|
|
---
|
|
|
|
## Estado Actual (2026-01-27)
|
|
|
|
### DOCUMENTACION COMPLETA
|
|
|
|
La fase de documentacion funcional y tecnica ha sido completada exitosamente:
|
|
|
|
| Fase | Estado | Entregables |
|
|
|------|--------|-------------|
|
|
| Fase 2: Modulos Criticos (P0) | COMPLETO | 10 modulos especificados |
|
|
| Fase 3: Modulos Secundarios | COMPLETO | 7 modulos especificados |
|
|
| Fase 4: Arquitectura | COMPLETO | Flujo E2E, integraciones, RBAC, KPIs |
|
|
| Fase 5: Matrices | COMPLETO | 4 matrices de trazabilidad |
|
|
| Fase 6: Validacion | COMPLETO | PROJECT-STATUS actualizado |
|
|
| Fase 7: Gaps GPS/Dispatch | COMPLETO | ANALISIS-GAPS.md |
|
|
| Fase 8: Planes Implementacion | COMPLETO | PLAN-COPIA-GPS/DISPATCH, ROADMAP |
|
|
|
|
### Tarea Activa: TASK-007
|
|
|
|
| Entregable | Estado | Ubicacion |
|
|
|------------|--------|-----------|
|
|
| ANALISIS-GAPS.md | COMPLETO | orchestration/tareas/2026-01-27/TASK-007-.../ |
|
|
| INTEGRACION-GPS-PROVIDERS.md | COMPLETO | docs/30-integraciones/ |
|
|
| README.md (Despacho) | COMPLETO | docs/02-definicion-modulos/MAI-005-despacho/ |
|
|
| SINCRONIZACION-OFFLINE.md | COMPLETO | docs/10-arquitectura/ |
|
|
| ARQUITECTURA-GPS.md | COMPLETO | docs/10-arquitectura/ |
|
|
| PLAN-COPIA-GPS.md | COMPLETO | orchestration/tareas/2026-01-27/TASK-007-.../ |
|
|
| PLAN-COPIA-DISPATCH.md | COMPLETO | orchestration/tareas/2026-01-27/TASK-007-.../ |
|
|
| ROADMAP-IMPLEMENTACION.md | COMPLETO | orchestration/tareas/2026-01-27/TASK-007-.../ |
|
|
|
|
### Progreso General
|
|
|
|
| Capa | Progreso | Notas |
|
|
|------|----------|-------|
|
|
| DDL | 100% | 8 schemas, ~58 tablas |
|
|
| Documentacion Funcional | 100% | 18 modulos, 69 US, 403 SP |
|
|
| Documentacion Tecnica | 100% | Arquitectura, RBAC, KPIs, matrices, integraciones |
|
|
| Backend | 15% | Entities base copiadas, modulos GPS/Dispatch pendientes |
|
|
| Frontend | 0% | Pendiente |
|
|
|
|
### Metricas de Documentacion Actualizadas
|
|
|
|
| Metrica | Valor Anterior | Valor Actual |
|
|
|---------|----------------|--------------|
|
|
| Modulos especificados | 18/20 | 20/20 |
|
|
| User Stories | 54 | 69 (+15 GPS/Dispatch/Offline) |
|
|
| Story Points | 325 | 403 (+78) |
|
|
| Requerimientos funcionales | 78 | 93 (+15) |
|
|
| KPIs definidos | 17 | 17 |
|
|
| Roles RBAC | 16 | 16 |
|
|
| Integraciones documentadas | 5 | 8 (+3: GPS providers, WhatsApp, Offline) |
|
|
|
|
---
|
|
|
|
## Proximas Acciones
|
|
|
|
### P0 - Inmediato: Sprint 1-2 (36h)
|
|
|
|
#### Sprint 1: Modulo GPS Backend (16h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 1 | Crear estructura carpetas backend/src/modules/gps/ | 0.5h | PENDIENTE |
|
|
| 2 | Copiar entities GPS de erp-mecanicas-diesel | 1.0h | PENDIENTE |
|
|
| 3 | Adaptar entities (FK fleet.unidades, schema tracking) | 2.0h | PENDIENTE |
|
|
| 4 | Crear DDL: dispositivos_gps, eventos_geocerca, segmentos_ruta | 1.5h | PENDIENTE |
|
|
| 5 | Ejecutar migraciones DDL en PostgreSQL | 0.5h | PENDIENTE |
|
|
| 6 | Copiar y adaptar services GPS | 2.5h | PENDIENTE |
|
|
| 7 | Copiar y adaptar controllers GPS | 1.5h | PENDIENTE |
|
|
| 8 | Registrar GpsModule en app.module.ts | 0.5h | PENDIENTE |
|
|
| 9 | Build y lint del backend | 1.0h | PENDIENTE |
|
|
| 10 | Tests unitarios basicos GPS | 3.0h | PENDIENTE |
|
|
|
|
**Referencia:** `PLAN-COPIA-GPS.md`
|
|
|
|
#### Sprint 2: Modulo Dispatch Backend (20h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 11 | Crear estructura carpetas backend/src/modules/dispatch/ | 0.5h | PENDIENTE |
|
|
| 12 | Crear DDL schema despacho completo | 2.0h | PENDIENTE |
|
|
| 13 | Crear DDL tablas fleet.certificaciones_operador y turnos_operador | 1.0h | PENDIENTE |
|
|
| 14 | Ejecutar migraciones DDL | 0.5h | PENDIENTE |
|
|
| 15 | Copiar entities Dispatch | 1.0h | PENDIENTE |
|
|
| 16 | Renombrar TechnicianSkill -> OperadorCertificacion | 1.0h | PENDIENTE |
|
|
| 17 | Renombrar TechnicianShift -> TurnoOperador | 1.0h | PENDIENTE |
|
|
| 18 | Adaptar entities (incident -> viaje, FK a transport.viajes) | 2.0h | PENDIENTE |
|
|
| 19 | Copiar services Dispatch | 1.0h | PENDIENTE |
|
|
| 20 | Adaptar algoritmo scoring para transporte | 4.0h | PENDIENTE |
|
|
| 21 | Copiar y adaptar controllers Dispatch | 1.5h | PENDIENTE |
|
|
| 22 | Build, lint y tests | 4.0h | PENDIENTE |
|
|
|
|
**Referencia:** `PLAN-COPIA-DISPATCH.md`
|
|
|
|
---
|
|
|
|
### P1 - Corto Plazo: Sprint 3-5 (44h)
|
|
|
|
#### Sprint 3: Integracion GPS-Dispatch (12h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 23 | Inyectar GpsDeviceService en DispatchService | 1.0h | PENDIENTE |
|
|
| 24 | Obtener posicion real en suggestBestAssignment | 2.0h | PENDIENTE |
|
|
| 25 | Verificar geocerca origen en asignacion | 2.0h | PENDIENTE |
|
|
| 26 | Sincronizar UnitStatus con ultima posicion GPS | 2.0h | PENDIENTE |
|
|
| 27 | Calcular distancia ruta real (no lineal) | 2.0h | PENDIENTE |
|
|
| 28 | Tests de integracion GPS-Dispatch | 3.0h | PENDIENTE |
|
|
|
|
#### Sprint 4: Modo Offline Basico (24h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 29 | Disenar arquitectura sync queue | 2.0h | PENDIENTE |
|
|
| 30 | Crear entidad OfflineQueue | 2.0h | PENDIENTE |
|
|
| 31 | Implementar OfflineStorageService | 4.0h | PENDIENTE |
|
|
| 32 | Implementar SyncService con cola prioritaria | 4.0h | PENDIENTE |
|
|
| 33 | Crear endpoints de sincronizacion | 2.0h | PENDIENTE |
|
|
| 34 | Implementar deteccion de conectividad | 2.0h | PENDIENTE |
|
|
| 35 | Implementar resolucion de conflictos | 4.0h | PENDIENTE |
|
|
| 36 | Tests offline | 4.0h | PENDIENTE |
|
|
|
|
#### Sprint 5: WhatsApp Templates (8h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 37 | Disenar templates segun WHATSAPP-TEMPLATES.yml | 2.0h | PENDIENTE |
|
|
| 38 | Registrar templates en Meta Business | 1.0h | PENDIENTE |
|
|
| 39 | Crear WhatsAppNotificationService | 2.0h | PENDIENTE |
|
|
| 40 | Integrar con escalamientos Dispatch | 1.5h | PENDIENTE |
|
|
| 41 | Tests de notificaciones | 1.5h | PENDIENTE |
|
|
|
|
---
|
|
|
|
### P2 - Mediano Plazo: Sprint 6-8 (68h)
|
|
|
|
#### Sprint 6: Frontend Dashboard Despacho (20h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 42 | Crear pagina DespachoPage con layout | 2.0h | PENDIENTE |
|
|
| 43 | Integrar mapa Leaflet | 3.0h | PENDIENTE |
|
|
| 44 | Mostrar unidades en mapa con markers por estado | 2.0h | PENDIENTE |
|
|
| 45 | Mostrar geocercas en mapa | 2.0h | PENDIENTE |
|
|
| 46 | Panel lateral viajes pendientes | 3.0h | PENDIENTE |
|
|
| 47 | Modal asignacion con sugerencias | 3.0h | PENDIENTE |
|
|
| 48 | WebSocket para actualizaciones tiempo real | 3.0h | PENDIENTE |
|
|
| 49 | Tests E2E basicos | 2.0h | PENDIENTE |
|
|
|
|
#### Sprint 7: Frontend Mapa Tracking (16h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 50 | Crear pagina TrackingPage | 2.0h | PENDIENTE |
|
|
| 51 | Mostrar ruta planeada en mapa | 2.0h | PENDIENTE |
|
|
| 52 | Mostrar ruta recorrida (polyline) | 2.0h | PENDIENTE |
|
|
| 53 | Animacion posicion actual | 2.0h | PENDIENTE |
|
|
| 54 | Panel timeline eventos viaje | 2.0h | PENDIENTE |
|
|
| 55 | ETA dinamico con barra progreso | 2.0h | PENDIENTE |
|
|
| 56 | WebSocket posiciones | 2.0h | PENDIENTE |
|
|
| 57 | Tests | 2.0h | PENDIENTE |
|
|
|
|
#### Sprint 8: App Conductor con Offline (32h)
|
|
|
|
| # | Tarea | Esfuerzo | Estado |
|
|
|---|-------|----------|--------|
|
|
| 58 | Setup React Native / Expo | 4.0h | PENDIENTE |
|
|
| 59 | Pantalla login offline-first | 3.0h | PENDIENTE |
|
|
| 60 | Pantalla viaje actual | 4.0h | PENDIENTE |
|
|
| 61 | Captura eventos (llegada, salida, etc) | 4.0h | PENDIENTE |
|
|
| 62 | Captura POD con camara | 4.0h | PENDIENTE |
|
|
| 63 | GPS background tracking | 4.0h | PENDIENTE |
|
|
| 64 | SQLite local storage | 3.0h | PENDIENTE |
|
|
| 65 | Sincronizacion con cola | 4.0h | PENDIENTE |
|
|
| 66 | Tests en dispositivo | 2.0h | PENDIENTE |
|
|
|
|
---
|
|
|
|
## Modulos del Sistema - Estado Actualizado
|
|
|
|
### Fase 1 - MAI (Inicial)
|
|
|
|
| Codigo | Nombre | DDL | Docs | Backend | Frontend |
|
|
|--------|--------|:---:|:----:|:-------:|:--------:|
|
|
| MAI-001 | Fundamentos | - | - | COMPLETO | - |
|
|
| MAI-002 | Clientes y Tarifas | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-003 | Ordenes de Transporte | COMPLETO | COMPLETO | 10% | 0% |
|
|
| MAI-004 | Planeacion TMS | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-005 | Despacho | COMPLETO | COMPLETO | 0% -> S2 | 0% -> S6 |
|
|
| MAI-006 | Tracking (GPS) | COMPLETO | COMPLETO | 5% -> S1 | 0% -> S7 |
|
|
| MAI-007 | POD y Cierre | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-008 | Incidencias | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-009 | Facturacion Transporte | COMPLETO | COMPLETO | 15% | 0% |
|
|
| MAI-010 | Liquidaciones | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-011 | Gestion de Flota | COMPLETO | COMPLETO | 10% | 0% |
|
|
| MAI-012 | Combustible y Gastos | COMPLETO | COMPLETO | 20% | 0% |
|
|
| MAI-013 | Mantenimiento Flota | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-014 | Carriers (Terceros) | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAI-015 | Portal Cliente | COMPLETO | COMPLETO | 0% | 0% |
|
|
|
|
### Fase 2 - MAE (Extendido)
|
|
|
|
| Codigo | Nombre | DDL | Docs | Backend | Frontend |
|
|
|--------|--------|:---:|:----:|:-------:|:--------:|
|
|
| MAE-016 | Carta Porte CFDI | COMPLETO | COMPLETO | 10% | 0% |
|
|
| MAE-017 | HOS y Bitacora | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAE-018 | Reportes y KPIs | COMPLETO | COMPLETO | 0% | 0% |
|
|
| MAE-019 | Modo Offline | NUEVO | COMPLETO | 0% -> S4 | 0% -> S8 |
|
|
| MAE-020 | Integracion WhatsApp | NUEVO | COMPLETO | 0% -> S5 | - |
|
|
|
|
### Fase 3 - MAA (Avanzado)
|
|
|
|
| Codigo | Nombre | DDL | Docs | Backend | Frontend |
|
|
|--------|--------|:---:|:----:|:-------:|:--------:|
|
|
| MAA-021 | Optimizacion Rutas | - | - | 0% | 0% |
|
|
| MAA-022 | Integraciones EDI | - | - | 0% | 0% |
|
|
|
|
---
|
|
|
|
## Calendario de Sprints
|
|
|
|
| Sprint | Fecha Inicio | Fecha Fin | Modulo Principal | Horas |
|
|
|--------|--------------|-----------|------------------|-------|
|
|
| S1 | 2026-01-28 | 2026-01-31 | GPS Backend | 16 |
|
|
| S2 | 2026-02-03 | 2026-02-07 | Dispatch Backend | 20 |
|
|
| S3 | 2026-02-10 | 2026-02-12 | Integracion GPS-Dispatch | 12 |
|
|
| S4 | 2026-02-13 | 2026-02-19 | Offline Basico | 24 |
|
|
| S5 | 2026-02-20 | 2026-02-21 | WhatsApp Templates | 8 |
|
|
| S6 | 2026-02-24 | 2026-02-28 | Dashboard Despacho | 20 |
|
|
| S7 | 2026-03-03 | 2026-03-05 | Mapa Tracking | 16 |
|
|
| S8 | 2026-03-06 | 2026-03-14 | App Conductor | 32 |
|
|
|
|
**Total:** 148 horas de desarrollo
|
|
|
|
---
|
|
|
|
## Archivos de Referencia
|
|
|
|
| Recurso | Ubicacion |
|
|
|---------|-----------|
|
|
| PROJECT-STATUS.md | `PROJECT-STATUS.md` |
|
|
| TASK-007 Documentos | `orchestration/tareas/2026-01-27/TASK-007-integracion-definiciones-gps-core/` |
|
|
| PLAN-COPIA-GPS.md | `orchestration/tareas/2026-01-27/TASK-007-integracion-definiciones-gps-core/PLAN-COPIA-GPS.md` |
|
|
| PLAN-COPIA-DISPATCH.md | `orchestration/tareas/2026-01-27/TASK-007-integracion-definiciones-gps-core/PLAN-COPIA-DISPATCH.md` |
|
|
| ROADMAP-IMPLEMENTACION.md | `orchestration/tareas/2026-01-27/TASK-007-integracion-definiciones-gps-core/ROADMAP-IMPLEMENTACION.md` |
|
|
| Requerimientos | `docs/03-requerimientos/REQ-GIRO-TRANSPORTISTA.md` |
|
|
| Modulos | `docs/02-definicion-modulos/` |
|
|
| Arquitectura | `docs/10-arquitectura/FLUJO-PRINCIPAL-TRANSPORTE.md` |
|
|
| GPS Multi-Provider | `docs/30-integraciones/INTEGRACION-GPS-PROVIDERS.md` |
|
|
| Dispatch Center | `docs/02-definicion-modulos/MAI-005-despacho/README.md` |
|
|
| Offline Sync | `docs/10-arquitectura/SINCRONIZACION-OFFLINE.md` |
|
|
| Arquitectura GPS | `docs/10-arquitectura/ARQUITECTURA-GPS.md` |
|
|
| Arquitectura Dispatch | `docs/10-arquitectura/ARQUITECTURA-DISPATCH.md` |
|
|
| Frontend Docs | `docs/20-frontend/README.md` |
|
|
| RBAC | `docs/40-estandares/MATRIZ-RBAC-TRANSPORTISTAS.yml` |
|
|
| KPIs | `docs/40-estandares/ESPECIFICACION-KPIS.yml` |
|
|
| Matrices | `orchestration/matrices/` |
|
|
| DDL | `database/ddl/` |
|
|
|
|
---
|
|
|
|
## Historial de Cambios
|
|
|
|
| Fecha | Cambio |
|
|
|-------|--------|
|
|
| 2026-01-27 | Agregados planes de implementacion GPS/Dispatch/Offline (TASK-007) |
|
|
| 2026-01-27 | Actualizado metricas: 69 US, 403 SP, 20 modulos |
|
|
| 2026-01-27 | Agregado calendario de sprints S1-S8 |
|
|
| 2026-01-27 | Documentacion completa (Fase 2-6): 18 modulos, 54 US, arquitectura, matrices |
|
|
| 2026-01-27 | Correccion porcentajes tras auditoria |
|
|
| 2026-01-25 | Creacion inicial |
|
|
|
|
---
|
|
|
|
*Sistema SIMCO v4.0.0 - ERP Transportistas*
|