mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix bugs sk-7
This commit is contained in:
@ -176,9 +176,9 @@ class ProductionService extends BaseService
|
||||
$this->storeOrdenTrabajoTareas();
|
||||
$this->storeOrdenTrabajoAcabadoTareas();
|
||||
$this->storeOrdenTrabajoManipuladoTareas();
|
||||
$this->storeOrdenTrabajoPreimpresionTareas();
|
||||
// $this->storeOrdenTrabajoPreimpresionTareas();
|
||||
$this->storeOrdenTrabajoEncuadernacionTareas();
|
||||
$this->storeOrdenTrabajoExtraTareas();
|
||||
// $this->storeOrdenTrabajoExtraTareas();
|
||||
}
|
||||
public function resetAllTareas(): BaseResult|bool
|
||||
{
|
||||
@ -208,8 +208,8 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden"] = $p_linea_maquina->orden_planning ?? 0;
|
||||
$ot_tareas["maquina_id"] = $p_linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$ot_tareas["tiempo_estimado"] = $p_linea->horas_maquina;
|
||||
$ot_tareas["tiempo_real"] = $p_linea->horas_maquina; //? Tiempo real se inserta manual?
|
||||
$ot_tareas["tiempo_estimado"] = $p_linea->horas_maquina*3600;
|
||||
$ot_tareas["tiempo_real"] = $p_linea->horas_maquina*3600; //? Tiempo real se inserta manual?
|
||||
$insert_query_result = $this->otTarea->insert($ot_tareas);
|
||||
$ot_tareas = [];
|
||||
$this->storeTareaCorte($p_linea);
|
||||
@ -226,8 +226,8 @@ class ProductionService extends BaseService
|
||||
'nombre' => 'Corte',
|
||||
'maquina_id' => $this->defaultMaquinaCorte->id,
|
||||
'orden' => $this->defaultMaquinaCorte->orden_planning,
|
||||
'tiempo_estimado' => $pLinea->rotativa_tiempo_corte,
|
||||
'tiempo_real' => $pLinea->rotativa_tiempo_corte
|
||||
'tiempo_estimado' => $pLinea->rotativa_tiempo_corte*60,
|
||||
'tiempo_real' => $pLinea->rotativa_tiempo_corte*60
|
||||
]);
|
||||
$otCorte = $this->otTarea->find($tareaId);
|
||||
}
|
||||
@ -245,7 +245,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_acabado_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 0;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 100;
|
||||
$ot_tareas["maquina_id"] = $linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
@ -254,6 +254,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_acabado_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
|
||||
$ot_tareas["orden"] = 100;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
}
|
||||
}
|
||||
@ -270,7 +271,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_manipulado_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 0;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 100;
|
||||
$ot_tareas["maquina_id"] = $linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
@ -279,6 +280,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_manipulado_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
|
||||
$ot_tareas["orden"] = 100;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
}
|
||||
}
|
||||
@ -295,7 +297,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_preimpresion_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 0;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 100;
|
||||
$ot_tareas["maquina_id"] = $linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
@ -304,6 +306,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_preimpresion_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
|
||||
$ot_tareas["orden"] = 100;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
}
|
||||
}
|
||||
@ -320,7 +323,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_encuadernado_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 0;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 110;
|
||||
$ot_tareas["maquina_id"] = $linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
@ -329,6 +332,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_encuadernado_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
|
||||
$ot_tareas["orden"] = 110;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
}
|
||||
}
|
||||
@ -345,7 +349,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
|
||||
$ot_tareas["presupuesto_extra_id"] = $p_linea->id;
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 0;
|
||||
$ot_tareas["maquina_id"] = $linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
@ -711,6 +715,10 @@ class ProductionService extends BaseService
|
||||
|
||||
public function updateOrdenTrabajoTarea($tarea_id, $data): bool
|
||||
{
|
||||
if(isset($data['maquina_id'])){
|
||||
$maquina = model(MaquinaModel::class)->find($data['maquina_id']);
|
||||
$data['orden'] = $maquina->orden_planning;
|
||||
}
|
||||
return $this->otTarea->update($tarea_id, $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user