Understanding Shifts
PROD-SYS operates on a three-shift schedule:| Shift | Hours | Operational Date Logic |
|---|---|---|
| T1 | 07:00 - 15:00 | Same calendar day |
| T2 | 15:00 - 23:00 | Same calendar day |
| T3 | 23:00 - 07:00 | Spans two calendar days, assigned to start date |
The fecha operativa represents the business day. For T3 (overnight shift), it’s the date when the shift started, not when it ends.
Opening a Shift Log
Navigate to Producción → Bitácora de Turno.Check System Status
The system detects the current shift based on server time. You’ll see:
- Current time and date
- Calculated shift (T1, T2, or T3)
- Operational date
Verify No Active Log
Only one shift log can be open at a time. If a log is already active, you’ll see the dashboard instead.
Open New Log
Click Abrir Bitácora. The system:
- Auto-fills your username as inspector
- Sets turno and fecha_operativa
- Flags if opened outside normal shift hours (fuera_de_horario)
- Creates the log with estado “ABIERTA”
Process Dashboard Overview
The dashboard shows real-time status for all processes:Status Indicators
- ⚪ Sin datos: No data recorded yet
- 🟡 Esperando Calidad: Quality samples required before production can be logged
- 🟡 Esperando Producción: Production records needed
- 🟡 Parcial: Some data recorded, more needed
- 🔴 Revisión: Quality rejections or incidents detected
- 🟢 Completo: All required data recorded, process ready for closure
Process Card Information
Each card displays:- Process name and ID
- Current status with icon
- Next action required
- Total production quantity (with unit)
- Quality validation status
- Last update time
- Allowed actions
Recording Process Data
Click on any process card to open the process detail view.For Operational Processes
Load Planning Data
The system automatically loads planned orders for this shift from the weekly planning (if configured).
Record Quality Samples
Enter quality control measurements:Required: Minimum samples per shift (varies by process)For each sample:
- Parameter name (e.g., “Ancho”, “Espesor”)
- Measured value with unit
- Result: “Cumple”, “Rechazo”, “No cumple”, “En espera”
Record Production
After quality validation, log production:For each machine/order combination:
- Select the production order
- Choose the machine
- Enter quantity produced (in process unit)
- Record waste (merma_kg) if applicable
Add Observations
Include operational notes:
- Setup changes
- Material issues
- Performance notes
- Handover information for next shift
For Non-Operational Processes
If a process didn’t run during the shift:Provide Reason
Enter the reason:
- “Mantenimiento programado”
- “Falta de materia prima”
- “Sin órdenes asignadas”
- “Parada por falla”
Special Process Workflows
Extrusor PP (Process 1)
Includes additional structured data:- Muestras estructuradas: Detailed quality metrics specific to extrusion
- Parámetros operativos: Machine settings (temperature zones, pressure, RPM)
- Mezcla: Raw material blend composition with batch numbers
- Incidentes: Inline incident reporting
parametros JSON field of registros_trabajo.
Telares (Process 2)
Supports batch consumption tracking:- Select input batches (lotes) consumed by each machine
- System records consumo_lote_telar entries
- Links upstream production (Extrusor PP) to weaving process
Laminado (Process 3)
Generates output batches with custom format:- Batch code:
{input_lote_code}-L{correlativo} - Tracks lamination date and operator
- Links input fabric batches to finished laminated rolls
Quality Validation Rules
Process-Specific Parameters
Each process defines valid quality parameters in its contract (seeProcessRegistry):
Validation Logic
The system checks:- Parameter name matches process contract
- Value is numeric and within tolerance (if defined)
- Unit matches expected unit
- Minimum sample count is met
Quality Rejections
If a sample result is “Rechazo”, “No cumple”, or “En espera”:- Process status becomes ”🔴 Revisión”
- Observations become mandatory (min 10 characters)
- Shift log will require review approval before closing
Production Recording
Línea de Ejecución
The system creates or updates a línea_ejecucion record for each:- Production order
- Process
- Machine
Registro de Trabajo
For each production entry:Update vs. Insert
The system uses upsert logic:- If a registro_trabajo exists for this línea + bitácora + máquina: UPDATE
- Otherwise: INSERT
Incident Reporting
Incidents can be logged inline during process recording or separately via Producción → Incidentes.Identify Incident
During production, note any:
- Equipment failures
- Quality deviations
- Safety events
- Material defects
Record in Process or Separately
- Extrusor PP: Use the incidents section in the process form
- Other processes: Navigate to Incidentes module
Provide Details
- Short title (e.g., “Motor bearing failure”)
- Severity: Baja, Media, Alta
- Full description of the problem
- Link to línea_ejecucion if applicable
Closure Workflow
Closure Readiness Check
The dashboard shows “Finalizar y Cerrar Turno” button when:- All processes are in ”🟢 Completo” or ”🔴 Revisión” status
- No processes have outstanding data requirements
- Personal assignments exist for all active processes
Verify Personnel Assignments
The system validates that processes with activity have assigned personnel for the shift.
Check Time Tracking
For each process:
- Tiempo programado: Standard shift duration (480 min)
- Total paros: Sum of all recorded downtime
- Tiempo efectivo: Must be positive
Review Integrity Checklist
A modal shows:
- Production summary by process
- Quality validation status
- Revision flags (if any)
Provide Justification (if needed)
If any process is in “Revisión”:
- Observations are mandatory
- Explain rejections, incidents, or deviations
- Min 10 characters required
Confirm Irreversible Closure
- Check the confirmation box: “Entiendo que este acto es irreversible”
- Click Confirmar Cierre Irreversible
States After Closure
- CERRADA: Clean closure, no issues detected
- REVISION: Closure with quality rejections or incidents requiring supervisor review
Authorization Rules
- Inspector (owner): Can close their own shift log
- Administrador: Can close any shift log
- Supervisor: Can close any shift log
- Operador: Cannot close shift logs
Data Inheritance from Previous Shift
PROD-SYS supports “last shift” data loading:Review Inherited Data
The system loads:
- Parámetros operativos (machine settings)
- Mezcla (material blend)
Real-Time Dashboard
The header shows operational context:- Turno: Current shift (T1, T2, T3)
- Fecha Operativa: Business date
- Inspector: Who opened the log
- Estado: ABIERTA, CERRADA, REVISION
- Live clock: Server time
Process Grid
Sorted by process ID (1-9), each card shows:- Status icon and label
- Next required action
- Total production
- Quality status
- Last update timestamp
- Clickable to drill into detail
Best Practices
Open the shift log at the start of your shift to capture accurate timestamps
Record quality samples before starting production to validate process stability
Enter observations throughout the shift, not just at closing
Mark non-operational processes early to avoid closure warnings
Review all process cards before attempting closure
Provide detailed justifications for any quality rejections
Troubleshooting
Cannot Open Shift Log
Error: “Ya existe una bitácora abierta”- Another log is currently open
- Check if previous shift forgot to close
- Supervisor/Admin can force close previous log
Cannot Save Process Data
Error: “No se puede registrar producción hasta validar calidad”- Quality validation is required first
- Enter minimum samples for the process
- All samples must have results
Cannot Close Shift
Error: “El proceso X tiene actividad pero no cuenta con personal asignado”- Assign personnel to the process for this shift
- Navigate to Administración → Personal
- Ensure grupo de trabajo has this process enabled
- Recorded downtime exceeds shift duration
- Review paro records in the process
- Correct any data entry errors
Process Shows “Esperando Calidad”
- Minimum sample count not met
- Check process contract for muestrasMinTurno value
- Enter additional quality samples
Audit Trail
All shift log operations are audited:- Open: Timestamp, inspector, shift, fecha_operativa
- Process updates: Before/after data snapshots
- Status changes: ABIERTA → CERRADA/REVISION
- Closure justifications: Full text of observations
- Authorization: Username of closer (may differ from inspector)
Integration Points
Planning Service
If configured, shift logs inherit planned orders:- System queries
planningService.getPlanningForShift(fecha, turno, proceso) - Pre-populates expected orders
- Operators confirm or adjust actual production
Batch Generation
Production recorded in shift logs automatically generates batches (lotes):- One batch per order + bitácora combination
- Format:
{codigo_orden}-{correlativo} - Estado: “activo”
- Linked to traceability chain
Time Tracking
Downtime (paros) recorded during the shift:- Linked to bitácora + proceso
- Summed for effective time calculation
- Must not exceed programmed time
Related Topics
- Production Orders - Orders being executed
- Incidents - Reporting and managing production incidents
- Quality Batches - Output batch generation
- Traceability - Following production through shifts