mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
imposiciones
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Services;
|
||||
|
||||
use App\Entities\Clientes\ClienteEntity;
|
||||
use App\Entities\Configuracion\Imposicion;
|
||||
use App\Entities\Pedidos\PedidoEntity;
|
||||
use App\Entities\Presupuestos\PresupuestoEntity;
|
||||
use App\Entities\Presupuestos\PresupuestoLineaEntity;
|
||||
@ -414,9 +415,12 @@ class ProductionService extends BaseService
|
||||
"orden_trabajo_tareas.maquina_id as maquina_tarea",
|
||||
"lg_maquinas.nombre as maquina_nombre",
|
||||
"lg_imposiciones.id as imposicion_id",
|
||||
"CONCAT(lg_imposiciones.ancho,'x',lg_imposiciones.alto,'_',COALESCE(lg_imposiciones.unidades,'NULL'),'_',COALESCE(lg_imposiciones.orientacion,'NULL'),'_',COALESCE(lg_imposiciones.etiqueta,'')) as imposicion_name",
|
||||
"orden_trabajo_tareas.tiempo_estimado",
|
||||
"orden_trabajo_tareas.tiempo_real",
|
||||
"orden_trabajo_tareas.comment",
|
||||
"orden_trabajo_tareas.presupuesto_linea_id",
|
||||
"presupuesto_linea.tipo",
|
||||
|
||||
])
|
||||
->join("orden_trabajo_tareas", "orden_trabajo_tareas.orden_trabajo_id = ordenes_trabajo.id", "left")
|
||||
@ -657,39 +661,53 @@ class ProductionService extends BaseService
|
||||
"linea_impresion" => $this->presupuesto->presupuestoLineaImpresion(),
|
||||
"linea_cubierta" => $this->presupuesto->presupuestoLineaCubierta(),
|
||||
"peso_unidad" => $logistica_data["peso_unidad"],
|
||||
"peso_pedido" => $logistica_data["peso_pedido"]
|
||||
"peso_pedido" => $logistica_data["peso_pedido"],
|
||||
"imposicion" => $this->getImposicionTareaImpresion()
|
||||
];
|
||||
}
|
||||
public function getTareaImpresionSobreCubierta(): array
|
||||
public function getImposicionTareaImpresion(): ?Imposicion
|
||||
{
|
||||
$imposicion = null;
|
||||
$impresionInteriorBnImposicion = $this->getTareaImpresionInteriorBn()?->imposicion();
|
||||
$impresionInteriorColorImposicion = $this->getTareaImpresionInteriorColor()?->imposicion();
|
||||
if($impresionInteriorBnImposicion){
|
||||
$imposicion = $impresionInteriorBnImposicion;
|
||||
}
|
||||
if($impresionInteriorColorImposicion){
|
||||
$imposicion = $impresionInteriorColorImposicion;
|
||||
}
|
||||
return $imposicion;
|
||||
}
|
||||
public function getTareaImpresionSobreCubierta(): ?OrdenTrabajoTareaEntity
|
||||
{
|
||||
$q = $this->otTarea->select('orden_trabajo_tareas.*')
|
||||
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||
->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id)
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_sobrecubierta"])->findAll();
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_sobrecubierta"])->first();
|
||||
return $q;
|
||||
}
|
||||
public function getTareaImpresionCubierta(): array
|
||||
public function getTareaImpresionCubierta(): ?OrdenTrabajoTareaEntity
|
||||
{
|
||||
$q = $this->otTarea->select('orden_trabajo_tareas.*')
|
||||
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||
->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id)
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_cubierta"])->findAll();
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_cubierta"])->first();
|
||||
return $q;
|
||||
}
|
||||
public function getTareaImpresionInteriorBn(): array
|
||||
public function getTareaImpresionInteriorBn(): ?OrdenTrabajoTareaEntity
|
||||
{
|
||||
$q = $this->otTarea->select('orden_trabajo_tareas.*')
|
||||
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||
->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id)
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_rot_bn", "lp_bn", "lp_bnhq"])->findAll();
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_rot_bn", "lp_bn", "lp_bnhq"])->first();
|
||||
return $q;
|
||||
}
|
||||
public function getTareaImpresionInteriorColor(): array
|
||||
public function getTareaImpresionInteriorColor(): ?OrdenTrabajoTareaEntity
|
||||
{
|
||||
$q = $this->otTarea->select('orden_trabajo_tareas.*')
|
||||
->join("presupuesto_linea", "presupuesto_linea.id = orden_trabajo_tareas.presupuesto_linea_id", "left")
|
||||
->where("orden_trabajo_tareas.orden_trabajo_id", $this->ot->id)
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_rot_color", "lp_color", "lp_colorhq"])->findAll();
|
||||
->whereIn("presupuesto_linea.tipo", ["lp_rot_color", "lp_color", "lp_colorhq"])->first();
|
||||
return $q;
|
||||
}
|
||||
public function getPresupuestoLineaImpresion() {}
|
||||
|
||||
Reference in New Issue
Block a user