mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add padre_id to select in planningPlanaQueryDatatable
This commit is contained in:
@ -486,6 +486,7 @@ class ProductionService extends BaseService
|
|||||||
"presupuestos.titulo as presupuesto_titulo",
|
"presupuestos.titulo as presupuesto_titulo",
|
||||||
"orden_trabajo_tareas.maquina_id",
|
"orden_trabajo_tareas.maquina_id",
|
||||||
"lg_maquinas.nombre as maquina_planning_nombre",
|
"lg_maquinas.nombre as maquina_planning_nombre",
|
||||||
|
"lg_maquinas.padre_id as padre_id",
|
||||||
"ordenes_trabajo.total_tirada as ot_tirada",
|
"ordenes_trabajo.total_tirada as ot_tirada",
|
||||||
"lg_papel_formato.ancho as papel_ancho",
|
"lg_papel_formato.ancho as papel_ancho",
|
||||||
"lg_papel_formato.alto as papel_alto",
|
"lg_papel_formato.alto as papel_alto",
|
||||||
@ -859,7 +860,6 @@ class ProductionService extends BaseService
|
|||||||
"lg_maquinas.nombre as name",
|
"lg_maquinas.nombre as name",
|
||||||
])
|
])
|
||||||
->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left")
|
->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")
|
|
||||||
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||||
->join("lg_maquinas", "lg_maquinas.id = orden_trabajo_tareas.maquina_id", "left")
|
->join("lg_maquinas", "lg_maquinas.id = orden_trabajo_tareas.maquina_id", "left")
|
||||||
->whereIn("presupuesto_linea.tipo", $this->TIPOS_PLANA)
|
->whereIn("presupuesto_linea.tipo", $this->TIPOS_PLANA)
|
||||||
@ -871,6 +871,26 @@ class ProductionService extends BaseService
|
|||||||
}
|
}
|
||||||
return $query->get()->getResultArray();
|
return $query->get()->getResultArray();
|
||||||
}
|
}
|
||||||
|
public function querySelectMaquinaPadrePlanningPlana($q)
|
||||||
|
{
|
||||||
|
$query = $this->otModel->builder()->select([
|
||||||
|
"mp.id as id",
|
||||||
|
"mp.nombre as name",
|
||||||
|
])
|
||||||
|
->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left")
|
||||||
|
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||||
|
->join("lg_maquinas", "lg_maquinas.id = orden_trabajo_tareas.maquina_id", "left")
|
||||||
|
->join("lg_maquinas mp", "mp.id = lg_maquinas.padre_id", "left")
|
||||||
|
->whereIn("presupuesto_linea.tipo", $this->TIPOS_PLANA)
|
||||||
|
->where('lg_maquinas.is_rotativa', false)
|
||||||
|
->where('mp.is_padre', 0)
|
||||||
|
->where("orden_trabajo_tareas.deleted_at", null)
|
||||||
|
->groupBy("mp.id");
|
||||||
|
if ($q) {
|
||||||
|
$query->like('lg_maquinas.nombre', $q);
|
||||||
|
}
|
||||||
|
return $query->get()->getResultArray();
|
||||||
|
}
|
||||||
public function querySelectPapelPlanningRot(string $q)
|
public function querySelectPapelPlanningRot(string $q)
|
||||||
{
|
{
|
||||||
$query = $this->otModel->builder()->select([
|
$query = $this->otModel->builder()->select([
|
||||||
|
|||||||
Reference in New Issue
Block a user