mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ordenes trabajo
This commit is contained in:
@ -35,28 +35,28 @@ class OrdenTrabajoDateEntity extends Entity
|
||||
protected $datamap = [];
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $casts = [
|
||||
"fecha_entrada_at" => "?datetime",
|
||||
"fecha_entrega_at" => "?datetime",
|
||||
"fecha_entrega_change_at" => "?datetime",
|
||||
"fecha_entrega_real_at" => "?datetime",
|
||||
"fecha_entrega_real_warning" => "?bool",
|
||||
"fecha_impresion_at" => "?datetime",
|
||||
"fecha_encuadernado_at" => "?datetime",
|
||||
"fecha_externo_at" => "?datetime",
|
||||
"fecha_entrega_warning" => "?bool",
|
||||
"fecha_entrega_warning_revised" => "?bool",
|
||||
"pendiente_ferro_at" => "?datetime",
|
||||
"ferro_en_cliente_at" => "?datetime",
|
||||
"ferro_ok_at" => "?datetime",
|
||||
"interior_bn_at" => "?datetime",
|
||||
"interior_color_at" => "?datetime",
|
||||
"preparacion_interiores_at" => "?datetime",
|
||||
"cubierta_at" => "?datetime",
|
||||
"plastificado_at" => "?datetime",
|
||||
"encuadernacion_at" => "?datetime",
|
||||
"corte_at" => "?datetime",
|
||||
"embalaje_at" => "?datetime",
|
||||
"envio_at" => "?datetime",
|
||||
"entrada_manipulado_at" => "?datetime"
|
||||
// "fecha_entrada_at" => "?datetime",
|
||||
// "fecha_entrega_at" => "?datetime",
|
||||
// "fecha_entrega_change_at" => "?datetime",
|
||||
// "fecha_entrega_real_at" => "?datetime",
|
||||
// "fecha_entrega_real_warning" => "?bool",
|
||||
// "fecha_impresion_at" => "?datetime",
|
||||
// "fecha_encuadernado_at" => "?datetime",
|
||||
// "fecha_externo_at" => "?datetime",
|
||||
// "fecha_entrega_warning" => "?bool",
|
||||
// "fecha_entrega_warning_revised" => "?bool",
|
||||
// "pendiente_ferro_at" => "?datetime",
|
||||
// "ferro_en_cliente_at" => "?datetime",
|
||||
// "ferro_ok_at" => "?datetime",
|
||||
// "interior_bn_at" => "?datetime",
|
||||
// "interior_color_at" => "?datetime",
|
||||
// "preparacion_interiores_at" => "?datetime",
|
||||
// "cubierta_at" => "?datetime",
|
||||
// "plastificado_at" => "?datetime",
|
||||
// "encuadernacion_at" => "?datetime",
|
||||
// "corte_at" => "?datetime",
|
||||
// "embalaje_at" => "?datetime",
|
||||
// "envio_at" => "?datetime",
|
||||
// "entrada_manipulado_at" => "?datetime"
|
||||
];
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ use App\Database\Migrations\OrdenTrabajoDatesTable;
|
||||
use App\Entities\Pedidos\PedidoEntity;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoDate;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoTarea;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoUser;
|
||||
use App\Models\Pedidos\PedidoModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
@ -17,23 +18,41 @@ class OrdenTrabajoEntity extends Entity
|
||||
"pedido_id" => null,
|
||||
"user_created_id" => null,
|
||||
"user_updated_id" => null,
|
||||
"fecha_entrega_warning" => false,
|
||||
"fecha_entrega_warning_revised" => false,
|
||||
"total_tirada" => null,
|
||||
"total_precio" => null,
|
||||
"tipo_entrada" => "out",
|
||||
"progreso" => 0.00,
|
||||
"estado" => "I",
|
||||
"comentarios" => null,
|
||||
"revisar_formato" => false,
|
||||
"revisar_lomo" => false,
|
||||
"revisar_solapa" => false,
|
||||
"revisar_isbn" => false,
|
||||
"revisar_codigo_barras" => false,
|
||||
"realizar_imposicion" => false,
|
||||
"enviar_impresion" => false,
|
||||
];
|
||||
protected $casts = [
|
||||
"pedido_id" => "integer",
|
||||
"user_created_id" => "integer",
|
||||
"user_updated_id" => "?integer",
|
||||
"fecha_entrega_warning" => "bool",
|
||||
"fecha_entrega_warning_revised" => "bool",
|
||||
"total_tirada" => "float",
|
||||
"total_precio" => "float",
|
||||
"tipo_entrada" => "string",
|
||||
"progreso" => "float",
|
||||
"estado" => "string",
|
||||
"comentarios" => "string",
|
||||
"revisar_formato" => "bool",
|
||||
"revisar_lomo" => "bool",
|
||||
"revisar_solapa" => "bool",
|
||||
"revisar_isbn" => "bool",
|
||||
"revisar_codigo_barras" => "bool",
|
||||
"realizar_imposicion" => "bool",
|
||||
"enviar_impresion" => "bool",
|
||||
];
|
||||
|
||||
|
||||
@ -64,9 +83,10 @@ class OrdenTrabajoEntity extends Entity
|
||||
}
|
||||
public function users(): ?OrdenTrabajoUserEntity
|
||||
{
|
||||
return null;
|
||||
// return $m->find($this->attributes["id"])
|
||||
$m = model(OrdenTrabajoUser::class);
|
||||
return $m->find($this->attributes["id"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Almacena en la tabla `orden_trabajo_dates` las fechas correspondientes del pedido.
|
||||
* Se almacenan en una tabla externa porque puede haber modificaciones de estas fechas
|
||||
|
||||
@ -3,10 +3,14 @@
|
||||
namespace App\Entities\Produccion;
|
||||
|
||||
use App\Entities\Configuracion\Maquina;
|
||||
use App\Entities\Presupuestos\PresupuestoAcabadosEntity;
|
||||
use App\Entities\Presupuestos\PresupuestoLineaEntity;
|
||||
use App\Entities\Presupuestos\PresupuestoManipuladosEntity;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
use App\Models\Presupuestos\PresupuestoLineaModel;
|
||||
use App\Models\Presupuestos\PresupuestoManipuladosModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class OrdenTrabajoTareaEntity extends Entity
|
||||
@ -21,6 +25,7 @@ class OrdenTrabajoTareaEntity extends Entity
|
||||
"imposicion_id" => null,
|
||||
"tiempo_estimado" => null,
|
||||
"tiempo_real" => null,
|
||||
"comment" => null,
|
||||
];
|
||||
protected $datamap = [];
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
@ -33,7 +38,8 @@ class OrdenTrabajoTareaEntity extends Entity
|
||||
"maquina_id" => "?integer",
|
||||
"imposicion_id" => "?integer",
|
||||
"tiempo_estimado" => "?float",
|
||||
"tiempo_real" => "?float"
|
||||
"tiempo_real" => "?float",
|
||||
"comment" => "?string"
|
||||
];
|
||||
|
||||
/**
|
||||
@ -85,4 +91,15 @@ class OrdenTrabajoTareaEntity extends Entity
|
||||
{
|
||||
return $this->presupuesto_linea()->maquina();
|
||||
}
|
||||
/**
|
||||
* Devuelve el presupuesto acabado origen de esta tarea
|
||||
*
|
||||
* @return PresupuestoAcabadosEntity
|
||||
*/
|
||||
public function presupuesto_acabado() : PresupuestoAcabadosEntity
|
||||
{
|
||||
$m = model(PresupuestoAcabadosModel::class);
|
||||
return $m->find($this->attributes["presupuesto_linea_id"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,4 +9,31 @@ class OrdenTrabajoUserEntity extends Entity
|
||||
protected $datamap = [];
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $casts = [];
|
||||
protected $attributes = [
|
||||
"orden_trabajo_id"=> null,
|
||||
"user_created_id"=> null,
|
||||
"user_update_id"=> null,
|
||||
"inaplazable_revised_change_user_id"=> null,
|
||||
"ferro_disponible_hecho_user_id"=> null,
|
||||
"ferro_disponible_ok_user_id"=> null,
|
||||
"ferro_entregado_user_id"=> null,
|
||||
"pendiente_ferro_user_id"=> null,
|
||||
"ferro_en_cliente_user_id"=> null,
|
||||
"ferro_ok_user_id"=> null,
|
||||
"interior_bn_user_id"=> null,
|
||||
"interior_color_user_id"=> null,
|
||||
"preparacion_interior_user_id"=> null,
|
||||
"cubierta_user_id"=> null,
|
||||
"plastificado_user_id"=> null,
|
||||
"encuadernacion_user_id"=> null,
|
||||
"corte_user_id"=> null,
|
||||
"embalaje_user_id"=> null,
|
||||
"entrada_manipulado_user_id"=> null,
|
||||
"pre_formato_user_id"=> null,
|
||||
"pre_lomo_user_id"=> null,
|
||||
"pre_solapa_user_id"=> null,
|
||||
"pre_codbarras_user_id"=> null,
|
||||
"pre_imposicion_user_id"=> null,
|
||||
"pre_imprimir_user_id" => null
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user