mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add check horas planning plana
This commit is contained in:
@ -329,6 +329,8 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre;
|
||||
$ot_tareas["orden"] = $linea_maquina->orden_planning ?? 110;
|
||||
$ot_tareas["maquina_id"] = $linea_maquina->id;
|
||||
$ot_tareas["tiempo_estimado"] = $p_linea->tiempo;
|
||||
$ot_tareas["tiempo_real"] = $p_linea->tiempo;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
$ot_tareas = [];
|
||||
@ -336,6 +338,8 @@ 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["tiempo_estimado"] = $p_linea->tiempo;
|
||||
$ot_tareas["tiempo_real"] = $p_linea->tiempo;
|
||||
$ot_tareas["orden"] = 110;
|
||||
$this->otTarea->insert($ot_tareas);
|
||||
}
|
||||
@ -443,13 +447,8 @@ class ProductionService extends BaseService
|
||||
"lg_papel_formato.ancho as papel_ancho",
|
||||
"lg_papel_formato.alto as papel_alto",
|
||||
"presupuesto_linea.rotativa_metros_total as metros",
|
||||
// "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_ancho') as maquina_ancho",
|
||||
// "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_alto') as maquina_alto",
|
||||
"lg_papel_impresion.nombre as papel_impresion",
|
||||
"presupuesto_linea.gramaje as papel_gramaje",
|
||||
|
||||
|
||||
|
||||
])
|
||||
->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left")
|
||||
->join("orden_trabajo_dates", "orden_trabajo_dates.orden_trabajo_id = ordenes_trabajo.id", "left")
|
||||
@ -460,11 +459,12 @@ class ProductionService extends BaseService
|
||||
->join("lg_papel_impresion", "lg_papel_impresion.id = presupuesto_linea.papel_impresion_id", "left")
|
||||
->join("lg_maquinas as lgmp", "lgmp.id = presupuesto_linea.maquina_id", "left")
|
||||
->join("lg_imposiciones", "lg_imposiciones.id = orden_trabajo_tareas.imposicion_id", "left")
|
||||
// ->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id)
|
||||
->whereIn("presupuesto_linea.tipo", $this->TIPOS_ROTATIVA)
|
||||
->where('lg_maquinas.is_rotativa', true)
|
||||
->where("orden_trabajo_tareas.deleted_at", null)
|
||||
->orderBy("orden_trabajo_tareas.orden", "ASC");
|
||||
->orderBy("orden_trabajo_tareas.orden", "ASC")
|
||||
->groupBy('ordenes_trabajo.id');
|
||||
|
||||
return $q;
|
||||
}
|
||||
/**
|
||||
@ -488,9 +488,7 @@ class ProductionService extends BaseService
|
||||
// "JSON_EXTRACT(presupuesto_linea.formas,'$.maquina_alto') as maquina_alto",
|
||||
"lg_papel_impresion.nombre as papel_impresion",
|
||||
"presupuesto_linea.gramaje as papel_gramaje",
|
||||
|
||||
|
||||
|
||||
"SUM(orden_trabajo_tareas.tiempo_real) as tiempo_real_sum"
|
||||
])
|
||||
->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left")
|
||||
->join("orden_trabajo_dates", "orden_trabajo_dates.orden_trabajo_id = ordenes_trabajo.id", "left")
|
||||
@ -505,7 +503,9 @@ class ProductionService extends BaseService
|
||||
->whereIn("presupuesto_linea.tipo", $this->TIPOS_PLANA)
|
||||
->where('lg_maquinas.is_rotativa', false)
|
||||
->where("orden_trabajo_tareas.deleted_at", null)
|
||||
->orderBy("orden_trabajo_tareas.orden", "ASC");
|
||||
->orderBy("orden_trabajo_tareas.orden", "ASC")
|
||||
->groupBy('ordenes_trabajo.id');
|
||||
|
||||
return $q;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user