erp-transportistas-v2/docs/02-definicion-modulos/MAI-013-mantenimiento-flota/historias-usuario/US-MAI013-001.md
Adrian Flores Cortes ec43d9c6cd docs: Add Phase 3 secondary modules specifications (P1/P2/P3)
Modules documented:
- MAI-003 (OT): README, REQUERIMIENTOS, RESUMEN-EPICA, 10 US
- MAI-006 (Tracking): README, REQUERIMIENTOS, RESUMEN-EPICA
- MAI-008 (Incidencias): 3 US (18 SP)
- MAI-011 (Flota): README, REQUERIMIENTOS, RESUMEN-EPICA
- MAI-012 (Combustible): 3 US (18 SP)
- MAI-013 (Mantenimiento): 3 US (18 SP)
- MAI-014 (Carriers): 3 US (18 SP)
- MAI-015 (Portal): 3 US (18 SP)
- MAE-016 (Carta Porte): 10 US
- MAE-017 (HOS): 3 US (16 SP)
- MAE-018 (Reportes): 3 US (18 SP)

Phase 2+3 complete: 13 modules, 50+ User Stories

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 02:24:35 -06:00

178 lines
7.4 KiB
Markdown

# US-MAI013-001: Programar mantenimiento preventivo
**ID:** US-MAI013-001
**Modulo:** MAI-013 (Mantenimiento)
**Prioridad:** Alta
**Story Points:** 5
---
## Historia de Usuario
**Como** jefe de mantenimiento
**Quiero** programar mantenimientos preventivos automaticos
**Para** prevenir fallas y mantener la flota en optimas condiciones
---
## Criterios de Aceptacion
### CA-001: Definir plan por tipo de unidad
**Dado** que cada tipo de unidad tiene necesidades diferentes
**Cuando** configuro el plan de mantenimiento
**Entonces** especifico servicios por tipo (tracto, remolque, caja)
### CA-002: Triggers por km/horas/fecha
**Dado** que hay diferentes criterios de programacion
**Cuando** defino un servicio
**Entonces** puedo elegir trigger por km, horas motor o fecha
### CA-003: Generacion automatica de OT
**Dado** que una unidad alcanzo el umbral
**Cuando** el job diario verifica
**Entonces** se genera OT preventiva automaticamente
### CA-004: Notificacion anticipada
**Dado** que necesito planear recursos
**Cuando** una unidad esta cerca del umbral
**Entonces** recibo notificacion con anticipacion configurable
### CA-005: Calendario de mantenimientos
**Dado** que necesito vision de proximos servicios
**Cuando** consulto el calendario
**Entonces** veo todos los mantenimientos programados
---
## Mockup / UI
### Plan de Mantenimiento
```
+----------------------------------------------------------+
| PLANES DE MANTENIMIENTO [+ Nuevo] |
+----------------------------------------------------------+
| |
| Tipo unidad: [Tracto v] |
| |
| ------------------------------------------------------ |
| |
| SERVICIOS PROGRAMADOS |
| |
| | Servicio | Trigger | Intervalo | Alerta | |
| |-----------------|---------|-----------|---------| |
| | Cambio aceite | km | 15,000 km | 1,000km | |
| | Revision frenos | km | 30,000 km | 3,000km | |
| | Service mayor | km | 100,000km | 5,000km | |
| | Verificacion | fecha | 12 meses | 30 dias | |
| | Inspeccion NOM | fecha | 6 meses | 15 dias | |
| |
| [+ Agregar servicio] |
| |
+----------------------------------------------------------+
```
### Configurar Servicio
```
+----------------------------------------------------------+
| CONFIGURAR SERVICIO PREVENTIVO X |
+----------------------------------------------------------+
| |
| Nombre: [Cambio de aceite motor ] |
| Codigo: [SRV-ACEITE-001 ] |
| |
| Aplica a: |
| [x] Tracto |
| [ ] Remolque |
| [ ] Caja seca |
| [ ] Caja refrigerada |
| |
| ------------------------------------------------------ |
| |
| PROGRAMACION |
| |
| Tipo de trigger: |
| (o) Por kilometraje |
| ( ) Por horas motor |
| ( ) Por fecha |
| |
| Intervalo: [15,000 ] km |
| |
| Alerta anticipada: [1,000 ] km antes |
| |
| ------------------------------------------------------ |
| |
| RECURSOS ESTIMADOS |
| |
| Tiempo estimado: [2.5 ] horas |
| Costo estimado: [$2,500.00] |
| |
| Refacciones necesarias: |
| + Filtro aceite motor (1 pz) |
| + Aceite motor 15W40 (38 L) |
| + Filtro aire (1 pz) |
| [+ Agregar refaccion] |
| |
| [Cancelar] [Guardar] |
| |
+----------------------------------------------------------+
```
### Calendario de Mantenimientos
```
+----------------------------------------------------------+
| CALENDARIO DE MANTENIMIENTOS - Enero 2026 |
+----------------------------------------------------------+
| |
| [<] Semana anterior [Esta semana] [>] Siguiente |
| |
| ------------------------------------------------------ |
| |
| Lun 27 Mar 28 Mie 29 Jue 30 Vie 31 |
| -------- -------- -------- -------- -------- |
| T-1025 T-1032 T-1018 |
| Aceite Frenos Service |
| |
| T-1030 T-1022 |
| Verif. Llantas |
| |
| ------------------------------------------------------ |
| |
| PROXIMOS 7 DIAS |
| |
| | Fecha | Unidad | Servicio | km actuales | |
| |--------|---------|----------------|-------------| |
| | 27-ene | T-1025 | Cambio aceite | 14,850 km | |
| | 27-ene | T-1030 | Verificacion | Vence 28-ene| |
| | 28-ene | T-1032 | Rev. frenos | 29,200 km | |
| | 29-ene | T-1022 | Rotacion llant | 9,800 km | |
| | 31-ene | T-1018 | Service mayor | 99,100 km | |
| |
| [Generar OTs para la semana] |
| |
+----------------------------------------------------------+
```
---
## Notas Tecnicas
- Tabla: `maintenance.planes_mantenimiento`
- Tabla: `maintenance.servicios_programados`
- Job: `generate-preventive-ots.job.ts` (corre diario 6am)
- Notificaciones por email/push
---
## Definicion de Done
- [ ] CRUD de planes de mantenimiento
- [ ] Configuracion por tipo de unidad
- [ ] Triggers por km, horas, fecha
- [ ] Generacion automatica de OT
- [ ] Notificaciones anticipadas
- [ ] Calendario visual
- [ ] Tests de generacion automatica