Posizione lavorazione
This commit is contained in:
28
TecniStamp/TecniStamp.Domain/CommessaPosizioneLavorazione.cs
Normal file
28
TecniStamp/TecniStamp.Domain/CommessaPosizioneLavorazione.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using TecniStamp.Domain.Base;
|
||||
|
||||
namespace TecniStamp.Domain;
|
||||
|
||||
public class CommessaPosizioneLavorazione : EntitaBase
|
||||
{
|
||||
[ForeignKey(nameof(CommessaPosizione))]
|
||||
public Guid? CommessaPosizioneId { get; set; }
|
||||
public CommessaPosizione CommessaPosizione { get; set; }
|
||||
|
||||
[ForeignKey(nameof(Lavorazione))]
|
||||
public Guid? LavorazioneId { get; set; }
|
||||
public Lavorazione Lavorazione { get; set; }
|
||||
|
||||
[ForeignKey(nameof(Macchinario))]
|
||||
public Guid? MacchinarioId { get; set; }
|
||||
public Macchinario Macchinario { get; set; }
|
||||
|
||||
public int PrimoTempoPresidiato { get; set; }
|
||||
public int TempoNonPresidiato { get; set; }
|
||||
public int SecondoTempoPresidiato { get; set; }
|
||||
|
||||
public bool Spostabile { get; set; }
|
||||
|
||||
public DateTime? DataInizioPrevista { get; set; }
|
||||
public DateTime? DataFinePrevista { get; set; }
|
||||
}
|
||||
@ -12,6 +12,7 @@ public class TecniStampDbContext : OAServiceContext
|
||||
public DbSet<Cliente> Cliente { get; set; }
|
||||
public DbSet<Commessa> Commessa { get; set; }
|
||||
public DbSet<CommessaPosizione> ComessaPosizione { get; set; }
|
||||
public DbSet<CommessaPosizioneLavorazione> CommessaPosizioneLavorazione { get; set; }
|
||||
public DbSet<ComuneIstat> ComuneIstat { get; set; }
|
||||
public DbSet<Feature> Feature { get; set; }
|
||||
public DbSet<Lavorazione> Lavorazione { get; set; }
|
||||
|
||||
1019
TecniStamp/TecniStamp.Infrastructure/Migrations/20260204074222_CommessaPosizioneLavorazione.Designer.cs
generated
Normal file
1019
TecniStamp/TecniStamp.Infrastructure/Migrations/20260204074222_CommessaPosizioneLavorazione.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace TecniStamp.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CommessaPosizioneLavorazione : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CommessaPosizioneLavorazione",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
CommessaPosizioneId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LavorazioneId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
MacchinarioId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
PrimoTempoPresidiato = table.Column<int>(type: "int", nullable: false),
|
||||
TempoNonPresidiato = table.Column<int>(type: "int", nullable: false),
|
||||
SecondoTempoPresidiato = table.Column<int>(type: "int", nullable: false),
|
||||
Spostabile = table.Column<bool>(type: "bit", nullable: false),
|
||||
DataInizioPrevista = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DataFinePrevista = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CommessaPosizioneLavorazione", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommessaPosizioneLavorazione_ComessaPosizione_CommessaPosizioneId",
|
||||
column: x => x.CommessaPosizioneId,
|
||||
principalTable: "ComessaPosizione",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_CommessaPosizioneLavorazione_Lavorazione_LavorazioneId",
|
||||
column: x => x.LavorazioneId,
|
||||
principalTable: "Lavorazione",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_CommessaPosizioneLavorazione_Macchinario_MacchinarioId",
|
||||
column: x => x.MacchinarioId,
|
||||
principalTable: "Macchinario",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_CommessaPosizioneLavorazione_Utente_IdUtenteCreazione",
|
||||
column: x => x.IdUtenteCreazione,
|
||||
principalTable: "Utente",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_CommessaPosizioneLavorazione_Utente_IdUtenteModifica",
|
||||
column: x => x.IdUtenteModifica,
|
||||
principalTable: "Utente",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommessaPosizioneLavorazione_CommessaPosizioneId",
|
||||
table: "CommessaPosizioneLavorazione",
|
||||
column: "CommessaPosizioneId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommessaPosizioneLavorazione_IdUtenteCreazione",
|
||||
table: "CommessaPosizioneLavorazione",
|
||||
column: "IdUtenteCreazione");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommessaPosizioneLavorazione_IdUtenteModifica",
|
||||
table: "CommessaPosizioneLavorazione",
|
||||
column: "IdUtenteModifica");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommessaPosizioneLavorazione_LavorazioneId",
|
||||
table: "CommessaPosizioneLavorazione",
|
||||
column: "LavorazioneId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CommessaPosizioneLavorazione_MacchinarioId",
|
||||
table: "CommessaPosizioneLavorazione",
|
||||
column: "MacchinarioId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CommessaPosizioneLavorazione");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -233,6 +233,69 @@ namespace TecniStamp.Infrastructure.Migrations
|
||||
b.ToTable("ComessaPosizione");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TecniStamp.Domain.CommessaPosizioneLavorazione", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CommessaPosizioneId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("DataCreazione")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DataFinePrevista")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DataInizioPrevista")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DataModifica")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("Eliminato")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid?>("IdUtenteCreazione")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("IdUtenteModifica")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("LavorazioneId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("MacchinarioId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("PrimoTempoPresidiato")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SecondoTempoPresidiato")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Spostabile")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("TempoNonPresidiato")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CommessaPosizioneId");
|
||||
|
||||
b.HasIndex("IdUtenteCreazione");
|
||||
|
||||
b.HasIndex("IdUtenteModifica");
|
||||
|
||||
b.HasIndex("LavorazioneId");
|
||||
|
||||
b.HasIndex("MacchinarioId");
|
||||
|
||||
b.ToTable("CommessaPosizioneLavorazione");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -723,6 +786,39 @@ namespace TecniStamp.Infrastructure.Migrations
|
||||
b.Navigation("UtenteModifica");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TecniStamp.Domain.CommessaPosizioneLavorazione", b =>
|
||||
{
|
||||
b.HasOne("TecniStamp.Domain.CommessaPosizione", "CommessaPosizione")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommessaPosizioneId");
|
||||
|
||||
b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdUtenteCreazione");
|
||||
|
||||
b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdUtenteModifica");
|
||||
|
||||
b.HasOne("TecniStamp.Domain.Lavorazione", "Lavorazione")
|
||||
.WithMany()
|
||||
.HasForeignKey("LavorazioneId");
|
||||
|
||||
b.HasOne("TecniStamp.Domain.Macchinario", "Macchinario")
|
||||
.WithMany()
|
||||
.HasForeignKey("MacchinarioId");
|
||||
|
||||
b.Navigation("CommessaPosizione");
|
||||
|
||||
b.Navigation("Lavorazione");
|
||||
|
||||
b.Navigation("Macchinario");
|
||||
|
||||
b.Navigation("UtenteCreazione");
|
||||
|
||||
b.Navigation("UtenteModifica");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
||||
{
|
||||
b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione")
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
using OAService.Service.Servizi.Implementazioni;
|
||||
using TecniStamp.Domain;
|
||||
using TecniStamp.Service.Interfaces;
|
||||
using TecniStamp.Service.Repository;
|
||||
|
||||
namespace TecniStamp.Service;
|
||||
|
||||
public class CommessaPosizioneLavorazioneService : TService<CommessaPosizioneLavorazione>, ICommessaPosizioneLavorazioneService
|
||||
{
|
||||
public CommessaPosizioneLavorazioneService(ITecniStampUnitOfWork unitOfWork) : base(unitOfWork)
|
||||
{
|
||||
}
|
||||
}
|
||||
13
TecniStamp/TecniStamp.Service/CommessaPosizioneService.cs
Normal file
13
TecniStamp/TecniStamp.Service/CommessaPosizioneService.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using OAService.Service.Servizi.Implementazioni;
|
||||
using TecniStamp.Domain;
|
||||
using TecniStamp.Service.Interfaces;
|
||||
using TecniStamp.Service.Repository;
|
||||
|
||||
namespace TecniStamp.Service;
|
||||
|
||||
public class CommessaPosizioneService : TService<CommessaPosizione>, ICommessaPosizioneService
|
||||
{
|
||||
public CommessaPosizioneService(ITecniStampUnitOfWork unitOfWork) : base(unitOfWork)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
using OAService.Service.Servizi.Interfacce;
|
||||
using TecniStamp.Domain;
|
||||
|
||||
namespace TecniStamp.Service.Interfaces;
|
||||
|
||||
public interface ICommessaPosizioneLavorazioneService : ITService<CommessaPosizioneLavorazione>
|
||||
{
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
using OAService.Service.Servizi.Interfacce;
|
||||
using TecniStamp.Domain;
|
||||
|
||||
namespace TecniStamp.Service.Interfaces;
|
||||
|
||||
public interface ICommessaPosizioneService : ITService<CommessaPosizione>
|
||||
{
|
||||
}
|
||||
@ -4,6 +4,8 @@ public interface IManagerService
|
||||
{
|
||||
IClienteService ClienteService { get; set; }
|
||||
ICommessaService CommessaService { get; set; }
|
||||
ICommessaPosizioneService CommessaPosizioneService { get; set; }
|
||||
ICommessaPosizioneLavorazioneService CommessaPosizioneLavorazioneService { get; set; }
|
||||
IFeatureService FeatureService { get; set; }
|
||||
IPermissionService PermissionService { get; set; }
|
||||
IRuoloService RuoloService{ get; set; }
|
||||
|
||||
@ -6,7 +6,7 @@ public class ManagerService : IManagerService
|
||||
{
|
||||
public ManagerService(IUserService userService, ISezioneService sezioneService, IPermissionService permissionService, IRuoloService ruoloService,
|
||||
IFeatureService featureService, IMacchinarioService macchinarioService, ICommessaService commessaService, ILavorazioneService lavorazioneService,
|
||||
IClienteService clienteService)
|
||||
IClienteService clienteService, ICommessaPosizioneService commessaPosizioneService, ICommessaPosizioneLavorazioneService commessaPosizioneLavorazioneService)
|
||||
{
|
||||
UtenteService = userService;
|
||||
SezioneService = sezioneService;
|
||||
@ -17,10 +17,14 @@ public class ManagerService : IManagerService
|
||||
CommessaService = commessaService;
|
||||
LavorazioneService = lavorazioneService;
|
||||
ClienteService = clienteService;
|
||||
CommessaPosizioneService = commessaPosizioneService;
|
||||
CommessaPosizioneLavorazioneService = commessaPosizioneLavorazioneService;
|
||||
}
|
||||
|
||||
public IClienteService ClienteService { get; set; }
|
||||
public ICommessaService CommessaService { get; set; }
|
||||
public ICommessaPosizioneService CommessaPosizioneService { get; set; }
|
||||
public ICommessaPosizioneLavorazioneService CommessaPosizioneLavorazioneService { get; set; }
|
||||
public IFeatureService FeatureService { get; set; }
|
||||
public IPermissionService PermissionService { get; set; }
|
||||
public IRuoloService RuoloService { get; set; }
|
||||
|
||||
@ -2,6 +2,21 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row g-5 mb-5">
|
||||
<div class="col-md-6"></div>
|
||||
<div class="col-md-2">
|
||||
<RadzenButton Icon="date_range"></RadzenButton>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Data ultima modifica</RadzenText>
|
||||
<RadzenLabel Text="@DateTime.Now.ToShortDateString()"></RadzenLabel>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Data ultima Check</RadzenText>
|
||||
<RadzenLabel Text="@DateTime.Now.ToShortDateString()"></RadzenLabel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-5">
|
||||
<div class="table-responsive">
|
||||
<RadzenDataGrid @ref="posizioniGrid" AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
||||
|
||||
Reference in New Issue
Block a user