diff --git a/GWMS.Data/Controllers/GWMSController.cs b/GWMS.Data/Controllers/GWMSController.cs
index 281044f..4fd2f17 100644
--- a/GWMS.Data/Controllers/GWMSController.cs
+++ b/GWMS.Data/Controllers/GWMSController.cs
@@ -35,6 +35,8 @@ namespace GWMS.Data.Controllers
private void CreateSimData(int numDays, int stepMin, int maxHourRate)
{
+ // disattivazione per sicurezza
+#if false
ResetController();
// generazione dati casuale
Random rnd = new Random();
@@ -130,6 +132,7 @@ namespace GWMS.Data.Controllers
Log.Error($"Eccezione in salvataggio Orders{Environment.NewLine}{exc}");
}
}
+#endif
}
#endregion Private Methods
diff --git a/GWMS.Data/DatabaseModels/PlantDetailModel.cs b/GWMS.Data/DatabaseModels/PlantDetailModel.cs
index f7ef280..46761cb 100644
--- a/GWMS.Data/DatabaseModels/PlantDetailModel.cs
+++ b/GWMS.Data/DatabaseModels/PlantDetailModel.cs
@@ -28,18 +28,19 @@ namespace GWMS.Data.DatabaseModels
public double LevelMax { get; set; } = 9999;
- public double LevelAct { get; set; } = 0;
- public double PressMax { get; set; } = 9999;
+ public double LevelReorder { get; set; } = 0;
- public double PressAct { get; set; } = 0;
+ //public double PressMax { get; set; } = 9999;
- public double PressBHMax { get; set; } = 9999;
+ //public double PressAct { get; set; } = 0;
- public double PressBHAct { get; set; } = 0;
+ //public double PressBHMax { get; set; } = 9999;
- public double PressBLMax { get; set; } = 9999;
+ //public double PressBHAct { get; set; } = 0;
- public double PressBLAct { get; set; } = 0;
+ //public double PressBLMax { get; set; } = 9999;
+
+ //public double PressBLAct { get; set; } = 0;
#endregion Public Properties
}
diff --git a/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.Designer.cs b/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.Designer.cs
new file mode 100644
index 0000000..a8519db
--- /dev/null
+++ b/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.Designer.cs
@@ -0,0 +1,868 @@
+//
+using System;
+using GWMS.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace GWMS.Data.Migrations
+{
+ [DbContext(typeof(GWMSContext))]
+ [Migration("20210806134012_PlantData_AddLevelReoder")]
+ partial class PlantData_AddLevelReoder
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("Relational:MaxIdentifierLength", 64)
+ .HasAnnotation("ProductVersion", "5.0.7");
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.AnKeyValModel", b =>
+ {
+ b.Property("KeyName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("Descript")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)")
+ .HasComment("Descrizione dell'item");
+
+ b.Property("ValFloat")
+ .HasColumnType("int");
+
+ b.Property("ValInt")
+ .HasColumnType("int");
+
+ b.Property("ValString")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("KeyName");
+
+ b.ToTable("AnKeyVal");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.ConfigModel", b =>
+ {
+ b.Property("KeyName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("Note")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("Val")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("ValStd")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("Valore di default/riferimento per la variabile");
+
+ b.HasKey("KeyName");
+
+ b.ToTable("Config");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.ItemModel", b =>
+ {
+ b.Property("ItemId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("ItemCode")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("ItemDesc")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("ItemType")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("UM")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.HasKey("ItemId");
+
+ b.ToTable("Items");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.ListValModel", b =>
+ {
+ b.Property("TabName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("TabName");
+
+ b.Property("FieldName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("FieldName");
+
+ b.Property("Val")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("Val");
+
+ b.Property("Descript")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)")
+ .HasColumnName("Descript");
+
+ b.Property("Ordinal")
+ .HasColumnType("int")
+ .HasColumnName("Ordinal");
+
+ b.HasKey("TabName", "FieldName", "Val");
+
+ b.ToTable("ListVal");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.OrderModel", b =>
+ {
+ b.Property("OrderId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("DtETA")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DtExecEnd")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DtExecStart")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DtOrder")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ExecutionQty")
+ .HasColumnType("double");
+
+ b.Property("OrderCode")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("OrderDesc")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("OrderQty")
+ .HasColumnType("double");
+
+ b.Property("PlantId")
+ .HasColumnType("int");
+
+ b.Property("SupplierId")
+ .HasColumnType("int");
+
+ b.Property("TransporterId")
+ .HasColumnType("int");
+
+ b.HasKey("OrderId");
+
+ b.HasIndex("PlantId");
+
+ b.HasIndex("SupplierId");
+
+ b.HasIndex("TransporterId");
+
+ b.ToTable("Order");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantDetailModel", b =>
+ {
+ b.Property("PlantId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("LevelMax")
+ .HasColumnType("double");
+
+ b.Property("LevelReorder")
+ .HasColumnType("double");
+
+ b.Property("PlantCode")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("PlantDesc")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("PlantId");
+
+ b.ToTable("PlantDetail");
+
+ b.HasData(
+ new
+ {
+ PlantId = 1,
+ LevelMax = 26000.0,
+ LevelReorder = 15000.0,
+ PlantCode = "PIZ03",
+ PlantDesc = "Collecchio"
+ },
+ new
+ {
+ PlantId = 2,
+ LevelMax = 28000.0,
+ LevelReorder = 15000.0,
+ PlantCode = "PIZ04",
+ PlantDesc = "Noceto"
+ },
+ new
+ {
+ PlantId = 3,
+ LevelMax = 24000.0,
+ LevelReorder = 15000.0,
+ PlantCode = "PIZ05",
+ PlantDesc = "Baganzola"
+ },
+ new
+ {
+ PlantId = 4,
+ LevelMax = 26000.0,
+ LevelReorder = 15000.0,
+ PlantCode = "PIZ08",
+ PlantDesc = "Pilastrello"
+ });
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
+ {
+ b.Property("PlantDataId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("DtEvent")
+ .HasColumnType("datetime(6)");
+
+ b.Property("FluxType")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("PlantId")
+ .HasColumnType("int");
+
+ b.Property("ValNumber")
+ .HasColumnType("double");
+
+ b.Property("ValString")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("PlantDataId");
+
+ b.HasIndex("PlantId");
+
+ b.ToTable("PlantLog");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantStatusModel", b =>
+ {
+ b.Property("PlantId")
+ .HasColumnType("int");
+
+ b.Property("FluxType")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("DtEvent")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ValNumber")
+ .HasColumnType("double");
+
+ b.Property("ValString")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("PlantId", "FluxType");
+
+ b.ToTable("PlantStatus");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.RebootLogModel", b =>
+ {
+ b.Property("RecordId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("DtEvent")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Item")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("Payload")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("RecordId");
+
+ b.ToTable("RebootLog");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.SupplierModel", b =>
+ {
+ b.Property("SupplierId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("SupplierCode")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("SupplierDesc")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("SupplierId");
+
+ b.ToTable("Supplier");
+
+ b.HasData(
+ new
+ {
+ SupplierId = 1,
+ SupplierCode = "LIQUIGAS",
+ SupplierDesc = "Liquigas"
+ },
+ new
+ {
+ SupplierId = 2,
+ SupplierCode = "VULKANGAS",
+ SupplierDesc = "Vulkangas"
+ });
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.TransporterModel", b =>
+ {
+ b.Property("TransporterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("PositionLatitude")
+ .HasColumnType("double");
+
+ b.Property("PositionLongitude")
+ .HasColumnType("double");
+
+ b.Property("PositionUpdated")
+ .HasColumnType("datetime(6)");
+
+ b.Property("TransporterCode")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("TransporterDesc")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.HasKey("TransporterId");
+
+ b.ToTable("Transporter");
+
+ b.HasData(
+ new
+ {
+ TransporterId = 1,
+ PositionLatitude = 0.0,
+ PositionLongitude = 0.0,
+ PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521),
+ TransporterCode = "LEVO",
+ TransporterDesc = "Levorato"
+ },
+ new
+ {
+ TransporterId = 2,
+ PositionLatitude = 0.0,
+ PositionLongitude = 0.0,
+ PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901),
+ TransporterCode = "TRAF",
+ TransporterDesc = "Traffik"
+ });
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.UserModel", b =>
+ {
+ b.Property("UserId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AuthKey")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("Email")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("Firstname")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("IsActive")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Lang")
+ .HasMaxLength(10)
+ .HasColumnType("varchar(10)");
+
+ b.Property("Lastname")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("Livello")
+ .HasColumnType("int");
+
+ b.Property("MaskPlantId")
+ .HasColumnType("int");
+
+ b.Property("MaskSupplierId")
+ .HasColumnType("int");
+
+ b.Property("MaskTranspId")
+ .HasColumnType("int");
+
+ b.Property("SaltPasswd")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("UserName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.HasKey("UserId");
+
+ b.ToTable("Users");
+
+ b.HasData(
+ new
+ {
+ UserId = 1,
+ AuthKey = "th1sIsTh3R1vrOfThNgt98",
+ Email = "samuele@steamware.net",
+ Firstname = "Samuele",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Locatelli",
+ Livello = 1,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "samuele.locatelli"
+ },
+ new
+ {
+ UserId = 2,
+ AuthKey = "th1sIsTh3R1vrOfThNgt91",
+ Email = "giancarlo@steamware.net",
+ Firstname = "Giancarlo",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Rottoli",
+ Livello = 1,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "giancarlo.rottoli"
+ },
+ new
+ {
+ UserId = 3,
+ AuthKey = "th1sIsTh3R1vrOfThNgt93",
+ Email = "info@steamware.net",
+ Firstname = "Steamware",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Admin",
+ Livello = 1,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "steamw.admin"
+ },
+ new
+ {
+ UserId = 4,
+ AuthKey = "th1sIsTh3R1vrOfThNgt97",
+ Email = "a.pizzaferri@pizzaferripetroli.it",
+ Firstname = "Angelo",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Pizzaferri",
+ Livello = 2,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "angelo.pizzaferri"
+ },
+ new
+ {
+ UserId = 5,
+ AuthKey = "th1sIsTh3R1vrOfThNgt99",
+ Email = "andrei.valeanu@winnlab.it",
+ Firstname = "Andrei",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Valeanu",
+ Livello = 2,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "andrei.valeanu"
+ },
+ new
+ {
+ UserId = 6,
+ AuthKey = "th1sIsTh3R1vrOfThNgt92",
+ Email = "info@steamware.net",
+ Firstname = "User",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "LIQUIGAS",
+ Livello = 4,
+ MaskPlantId = 0,
+ MaskSupplierId = 1,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "liquigas.user01"
+ },
+ new
+ {
+ UserId = 7,
+ AuthKey = "th1sIsTh3R1vrOfThNgt94",
+ Email = "info@steamware.net",
+ Firstname = "User",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "VULKANGAS",
+ Livello = 4,
+ MaskPlantId = 0,
+ MaskSupplierId = 2,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "vulkangas.user01"
+ },
+ new
+ {
+ UserId = 8,
+ AuthKey = "th1sIsTh3R1vrOfThNgt95",
+ Email = "info@steamware.net",
+ Firstname = "User",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "LEVORATO",
+ Livello = 4,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 1,
+ SaltPasswd = "",
+ UserName = "levorato.user01"
+ },
+ new
+ {
+ UserId = 9,
+ AuthKey = "th1sIsTh3R1vrOfThNgt96",
+ Email = "info@steamware.net",
+ Firstname = "User",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "TRAFFIK",
+ Livello = 4,
+ MaskPlantId = 0,
+ MaskSupplierId = 0,
+ MaskTranspId = 2,
+ SaltPasswd = "",
+ UserName = "traffik.user01"
+ },
+ new
+ {
+ UserId = 10,
+ AuthKey = "th1sIsTh3R1vrOfThNgt96",
+ Email = "info@steamware.net",
+ Firstname = "Stazione",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Collecchio",
+ Livello = 3,
+ MaskPlantId = 1,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "piz03.user01"
+ },
+ new
+ {
+ UserId = 11,
+ AuthKey = "th1sIsTh3R1vrOfThNgt96",
+ Email = "info@steamware.net",
+ Firstname = "Stazione",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Noceto",
+ Livello = 3,
+ MaskPlantId = 2,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "piz04.user01"
+ },
+ new
+ {
+ UserId = 12,
+ AuthKey = "th1sIsTh3R1vrOfThNgt96",
+ Email = "info@steamware.net",
+ Firstname = "Stazione",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Baganzola",
+ Livello = 3,
+ MaskPlantId = 3,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "piz05.user01"
+ },
+ new
+ {
+ UserId = 13,
+ AuthKey = "th1sIsTh3R1vrOfThNgt96",
+ Email = "info@steamware.net",
+ Firstname = "Stazione",
+ IsActive = true,
+ Lang = "IT",
+ Lastname = "Pilastrello",
+ Livello = 3,
+ MaskPlantId = 4,
+ MaskSupplierId = 0,
+ MaskTranspId = 0,
+ SaltPasswd = "",
+ UserName = "piz08.user01"
+ });
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.WeekPlanModel", b =>
+ {
+ b.Property("WeekPlanId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("DayNum")
+ .HasColumnType("int");
+
+ b.Property("DeliveryHour")
+ .HasColumnType("int");
+
+ b.Property("Note")
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("PlantId")
+ .HasColumnType("int");
+
+ b.Property("SupplierId")
+ .HasColumnType("int");
+
+ b.Property("TransporterId")
+ .HasColumnType("int");
+
+ b.HasKey("WeekPlanId");
+
+ b.HasIndex("PlantId");
+
+ b.HasIndex("SupplierId");
+
+ b.HasIndex("TransporterId");
+
+ b.ToTable("WeekPlan");
+
+ b.HasData(
+ new
+ {
+ WeekPlanId = 1,
+ DayNum = 1,
+ DeliveryHour = 20,
+ Note = "18K",
+ PlantId = 2,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 2,
+ DayNum = 2,
+ DeliveryHour = 20,
+ Note = "18K",
+ PlantId = 2,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 3,
+ DayNum = 3,
+ DeliveryHour = 20,
+ Note = "18K",
+ PlantId = 2,
+ SupplierId = 1,
+ TransporterId = 2
+ },
+ new
+ {
+ WeekPlanId = 4,
+ DayNum = 4,
+ DeliveryHour = 15,
+ Note = "9K",
+ PlantId = 2,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 5,
+ DayNum = 4,
+ DeliveryHour = 20,
+ Note = "18K",
+ PlantId = 2,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 6,
+ DayNum = 6,
+ DeliveryHour = 20,
+ Note = "18K",
+ PlantId = 2,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 7,
+ DayNum = 2,
+ DeliveryHour = 14,
+ Note = "3K",
+ PlantId = 3,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 8,
+ DayNum = 2,
+ DeliveryHour = 15,
+ Note = "15K",
+ PlantId = 4,
+ SupplierId = 1,
+ TransporterId = 1
+ },
+ new
+ {
+ WeekPlanId = 9,
+ DayNum = 2,
+ DeliveryHour = 17,
+ Note = "18K",
+ PlantId = 1,
+ SupplierId = 2,
+ TransporterId = 2
+ });
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.OrderModel", b =>
+ {
+ b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
+ .WithMany()
+ .HasForeignKey("PlantId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("GWMS.Data.DatabaseModels.SupplierModel", "Supplier")
+ .WithMany()
+ .HasForeignKey("SupplierId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("GWMS.Data.DatabaseModels.TransporterModel", "Transporter")
+ .WithMany()
+ .HasForeignKey("TransporterId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Plant");
+
+ b.Navigation("Supplier");
+
+ b.Navigation("Transporter");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
+ {
+ b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
+ .WithMany()
+ .HasForeignKey("PlantId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Plant");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantStatusModel", b =>
+ {
+ b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
+ .WithMany()
+ .HasForeignKey("PlantId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Plant");
+ });
+
+ modelBuilder.Entity("GWMS.Data.DatabaseModels.WeekPlanModel", b =>
+ {
+ b.HasOne("GWMS.Data.DatabaseModels.PlantDetailModel", "Plant")
+ .WithMany()
+ .HasForeignKey("PlantId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("GWMS.Data.DatabaseModels.SupplierModel", "Supplier")
+ .WithMany()
+ .HasForeignKey("SupplierId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("GWMS.Data.DatabaseModels.TransporterModel", "Transporter")
+ .WithMany()
+ .HasForeignKey("TransporterId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Plant");
+
+ b.Navigation("Supplier");
+
+ b.Navigation("Transporter");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.cs b/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.cs
new file mode 100644
index 0000000..239600c
--- /dev/null
+++ b/GWMS.Data/Migrations/20210806134012_PlantData_AddLevelReoder.cs
@@ -0,0 +1,174 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace GWMS.Data.Migrations
+{
+ public partial class PlantData_AddLevelReoder : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "LevelAct",
+ table: "PlantDetail");
+
+ migrationBuilder.DropColumn(
+ name: "PressAct",
+ table: "PlantDetail");
+
+ migrationBuilder.DropColumn(
+ name: "PressBHAct",
+ table: "PlantDetail");
+
+ migrationBuilder.DropColumn(
+ name: "PressBHMax",
+ table: "PlantDetail");
+
+ migrationBuilder.DropColumn(
+ name: "PressBLAct",
+ table: "PlantDetail");
+
+ migrationBuilder.DropColumn(
+ name: "PressBLMax",
+ table: "PlantDetail");
+
+ migrationBuilder.RenameColumn(
+ name: "PressMax",
+ table: "PlantDetail",
+ newName: "LevelReorder");
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 1,
+ columns: new[] { "LevelMax", "LevelReorder" },
+ values: new object[] { 26000.0, 15000.0 });
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 2,
+ column: "LevelReorder",
+ value: 15000.0);
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 3,
+ column: "LevelReorder",
+ value: 15000.0);
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 4,
+ columns: new[] { "LevelMax", "LevelReorder" },
+ values: new object[] { 26000.0, 15000.0 });
+
+ migrationBuilder.UpdateData(
+ table: "Transporter",
+ keyColumn: "TransporterId",
+ keyValue: 1,
+ column: "PositionUpdated",
+ value: new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521));
+
+ migrationBuilder.UpdateData(
+ table: "Transporter",
+ keyColumn: "TransporterId",
+ keyValue: 2,
+ column: "PositionUpdated",
+ value: new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901));
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "LevelReorder",
+ table: "PlantDetail",
+ newName: "PressMax");
+
+ migrationBuilder.AddColumn(
+ name: "LevelAct",
+ table: "PlantDetail",
+ type: "double",
+ nullable: false,
+ defaultValue: 0.0);
+
+ migrationBuilder.AddColumn(
+ name: "PressAct",
+ table: "PlantDetail",
+ type: "double",
+ nullable: false,
+ defaultValue: 0.0);
+
+ migrationBuilder.AddColumn(
+ name: "PressBHAct",
+ table: "PlantDetail",
+ type: "double",
+ nullable: false,
+ defaultValue: 0.0);
+
+ migrationBuilder.AddColumn(
+ name: "PressBHMax",
+ table: "PlantDetail",
+ type: "double",
+ nullable: false,
+ defaultValue: 0.0);
+
+ migrationBuilder.AddColumn(
+ name: "PressBLAct",
+ table: "PlantDetail",
+ type: "double",
+ nullable: false,
+ defaultValue: 0.0);
+
+ migrationBuilder.AddColumn(
+ name: "PressBLMax",
+ table: "PlantDetail",
+ type: "double",
+ nullable: false,
+ defaultValue: 0.0);
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 1,
+ columns: new[] { "LevelMax", "PressBHMax", "PressBLMax", "PressMax" },
+ values: new object[] { 28000.0, 270.0, 270.0, 19.0 });
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 2,
+ columns: new[] { "PressBHMax", "PressBLMax", "PressMax" },
+ values: new object[] { 270.0, 270.0, 19.0 });
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 3,
+ columns: new[] { "PressBHMax", "PressBLMax", "PressMax" },
+ values: new object[] { 270.0, 270.0, 19.0 });
+
+ migrationBuilder.UpdateData(
+ table: "PlantDetail",
+ keyColumn: "PlantId",
+ keyValue: 4,
+ columns: new[] { "LevelMax", "PressBHMax", "PressBLMax", "PressMax" },
+ values: new object[] { 24000.0, 270.0, 270.0, 19.0 });
+
+ migrationBuilder.UpdateData(
+ table: "Transporter",
+ keyColumn: "TransporterId",
+ keyValue: 1,
+ column: "PositionUpdated",
+ value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3264));
+
+ migrationBuilder.UpdateData(
+ table: "Transporter",
+ keyColumn: "TransporterId",
+ keyValue: 2,
+ column: "PositionUpdated",
+ value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3842));
+ }
+ }
+}
diff --git a/GWMS.Data/Migrations/GWMSContextModelSnapshot.cs b/GWMS.Data/Migrations/GWMSContextModelSnapshot.cs
index b5e50dd..ad32f55 100644
--- a/GWMS.Data/Migrations/GWMSContextModelSnapshot.cs
+++ b/GWMS.Data/Migrations/GWMSContextModelSnapshot.cs
@@ -183,10 +183,10 @@ namespace GWMS.Data.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("int");
- b.Property("LevelAct")
+ b.Property("LevelMax")
.HasColumnType("double");
- b.Property("LevelMax")
+ b.Property("LevelReorder")
.HasColumnType("double");
b.Property("PlantCode")
@@ -197,24 +197,6 @@ namespace GWMS.Data.Migrations
.HasMaxLength(250)
.HasColumnType("varchar(250)");
- b.Property("PressAct")
- .HasColumnType("double");
-
- b.Property("PressBHAct")
- .HasColumnType("double");
-
- b.Property("PressBHMax")
- .HasColumnType("double");
-
- b.Property("PressBLAct")
- .HasColumnType("double");
-
- b.Property("PressBLMax")
- .HasColumnType("double");
-
- b.Property("PressMax")
- .HasColumnType("double");
-
b.HasKey("PlantId");
b.ToTable("PlantDetail");
@@ -223,58 +205,34 @@ namespace GWMS.Data.Migrations
new
{
PlantId = 1,
- LevelAct = 0.0,
- LevelMax = 28000.0,
+ LevelMax = 26000.0,
+ LevelReorder = 15000.0,
PlantCode = "PIZ03",
- PlantDesc = "Collecchio",
- PressAct = 0.0,
- PressBHAct = 0.0,
- PressBHMax = 270.0,
- PressBLAct = 0.0,
- PressBLMax = 270.0,
- PressMax = 19.0
+ PlantDesc = "Collecchio"
},
new
{
PlantId = 2,
- LevelAct = 0.0,
LevelMax = 28000.0,
+ LevelReorder = 15000.0,
PlantCode = "PIZ04",
- PlantDesc = "Noceto",
- PressAct = 0.0,
- PressBHAct = 0.0,
- PressBHMax = 270.0,
- PressBLAct = 0.0,
- PressBLMax = 270.0,
- PressMax = 19.0
+ PlantDesc = "Noceto"
},
new
{
PlantId = 3,
- LevelAct = 0.0,
LevelMax = 24000.0,
+ LevelReorder = 15000.0,
PlantCode = "PIZ05",
- PlantDesc = "Baganzola",
- PressAct = 0.0,
- PressBHAct = 0.0,
- PressBHMax = 270.0,
- PressBLAct = 0.0,
- PressBLMax = 270.0,
- PressMax = 19.0
+ PlantDesc = "Baganzola"
},
new
{
PlantId = 4,
- LevelAct = 0.0,
- LevelMax = 24000.0,
+ LevelMax = 26000.0,
+ LevelReorder = 15000.0,
PlantCode = "PIZ08",
- PlantDesc = "Pilastrello",
- PressAct = 0.0,
- PressBHAct = 0.0,
- PressBHMax = 270.0,
- PressBLAct = 0.0,
- PressBLMax = 270.0,
- PressMax = 19.0
+ PlantDesc = "Pilastrello"
});
});
@@ -420,7 +378,7 @@ namespace GWMS.Data.Migrations
TransporterId = 1,
PositionLatitude = 0.0,
PositionLongitude = 0.0,
- PositionUpdated = new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3264),
+ PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521),
TransporterCode = "LEVO",
TransporterDesc = "Levorato"
},
@@ -429,7 +387,7 @@ namespace GWMS.Data.Migrations
TransporterId = 2,
PositionLatitude = 0.0,
PositionLongitude = 0.0,
- PositionUpdated = new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3842),
+ PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901),
TransporterCode = "TRAF",
TransporterDesc = "Traffik"
});
diff --git a/GWMS.Data/ModelBuilderExtensions.cs b/GWMS.Data/ModelBuilderExtensions.cs
index 8399ed5..fb434ac 100644
--- a/GWMS.Data/ModelBuilderExtensions.cs
+++ b/GWMS.Data/ModelBuilderExtensions.cs
@@ -37,10 +37,14 @@ namespace GWMS.Data
// inizializzazione dei valori di default x Plant
modelBuilder.Entity().HasData(
- new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
- new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
- new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
- new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }
+ new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 26000, LevelReorder = 15000 },
+ new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, LevelReorder = 15000 },
+ new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, LevelReorder = 15000 },
+ new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, LevelReorder = 15000 }
+ // new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
+ //new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
+ //new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
+ //new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }
);
// inizializzazione dei valori di default x Fornitori
diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj
index 8d340b4..ff44f18 100644
--- a/GWMS.UI/GWMS.UI.csproj
+++ b/GWMS.UI/GWMS.UI.csproj
@@ -2,7 +2,7 @@
net5.0
- 1.0.2108.0612
+ 1.0.2108.0616
95c9f021-52d1-4390-a670-5810b7b777b0
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index d77176f..a79c8f8 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
GWMS - Gas Warehouse Management System
- Versione: 1.0.2108.0612
+ Versione: 1.0.2108.0616
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 2a65a1d..a20a180 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-1.0.2108.0612
+1.0.2108.0616
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 8c31316..cb7a311 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.0.2108.0612
+ 1.0.2108.0616
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html
false