Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a344c71a41 | |||
| 16084755d4 | |||
| 677842f5e2 | |||
| e52c9f56fa | |||
| 871bec2cf3 | |||
| 0a5ea3ad64 | |||
| 11557de866 | |||
| 0a1fb88174 | |||
| 1b28ddd007 | |||
| 447c1d1d90 | |||
| 050637948a | |||
| 0497d6aaa5 | |||
| be56ae95c5 | |||
| c8603a2a34 | |||
| 3b2e8eefa4 | |||
| 06f2f7c9ea | |||
| 3908ee690d | |||
| a15279766f | |||
| 45e2ff00f0 | |||
| 2f27d2bd0b | |||
| 2ed39e6df0 | |||
| 49687fda7e | |||
| 3bb30bcbdd | |||
| 6c7a1a5cfa | |||
| 52595458c5 | |||
| 2428daedb4 | |||
| 7cd86f0036 | |||
| 259cba1dc8 | |||
| 08d0134f8c | |||
| 24e76181e6 | |||
| 70ce9ee91c | |||
| f9a66b1371 | |||
| 570e6bda06 | |||
| 9150004850 | |||
| 493407434e |
@@ -176,11 +176,25 @@ namespace GWMS.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<OrderModel> GetOrdersFilt(int PlantId, int SupplierId, int TransporterId, DateTime DtStart, DateTime DtEnd)
|
||||
public List<OrderModel> GetOrdersFilt(int PlantId, int SupplierId, int TransporterId, DateTime DtStart, DateTime DtEnd, bool ShowClosed)
|
||||
{
|
||||
var dbResult = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => (x.PlantId == PlantId || PlantId == 0) && (x.SupplierId == SupplierId || SupplierId == 0) && (x.TransporterId == TransporterId || TransporterId == 0) && (x.DtOrder >= DtStart && x.DtOrder <= DtEnd))
|
||||
.Where(x => (x.PlantId == PlantId || PlantId == 0) && (x.SupplierId == SupplierId || SupplierId == 0) && (x.TransporterId == TransporterId || TransporterId == 0) && (x.DtOrder >= DtStart && x.DtOrder <= DtEnd) && (x.ExecutionQty == 0 || ShowClosed))
|
||||
.Include(p => p.Plant)
|
||||
.Include(s => s.Supplier)
|
||||
.Include(t => t.Transporter)
|
||||
.OrderByDescending(x => x.DtOrder)
|
||||
.ToList();
|
||||
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<OrderModel> GetOrdersOpen(int PlantId)
|
||||
{
|
||||
var dbResult = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => (x.PlantId == PlantId || PlantId == 0) && (x.DtExecStart < x.DtOrder))
|
||||
.Include(p => p.Plant)
|
||||
.Include(s => s.Supplier)
|
||||
.Include(t => t.Transporter)
|
||||
@@ -319,6 +333,51 @@ namespace GWMS.Data.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Eliminazione di un ordine
|
||||
/// </summary>
|
||||
/// <param name="Item2Del"></param>
|
||||
/// <returns></returns>
|
||||
public bool OrderDelete(OrderModel Item2Del)
|
||||
{
|
||||
bool done = false;
|
||||
try
|
||||
{
|
||||
if (Item2Del != null)
|
||||
{
|
||||
dbCtx
|
||||
.DbSetOrders
|
||||
.Remove(Item2Del);
|
||||
dbCtx.SaveChanges();
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
return done;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunta in blocco di Ordini
|
||||
/// </summary>
|
||||
/// <param name="newItems"></param>
|
||||
/// <returns></returns>
|
||||
public bool OrderInsert(List<OrderModel> newItems)
|
||||
{
|
||||
bool done = false;
|
||||
try
|
||||
{
|
||||
dbCtx
|
||||
.DbSetOrders
|
||||
.AddRange(newItems);
|
||||
dbCtx.SaveChanges();
|
||||
done = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
return done;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna un Ordine
|
||||
/// </summary>
|
||||
@@ -335,6 +394,12 @@ namespace GWMS.Data.Controllers
|
||||
.FirstOrDefault();
|
||||
if (currData != null)
|
||||
{
|
||||
// se ho modificato data --> cambio codice ordine!
|
||||
if (!dbCtx.Entry(updItem).OriginalValues["DtOrder"].Equals(dbCtx.Entry(updItem).CurrentValues["DtOrder"]))
|
||||
{
|
||||
updItem.OrderCode = $"O{updItem.Plant.PlantCode}{updItem.DtOrder:yyMMddHHmm}";
|
||||
updItem.OrderDesc = $"Ordine {updItem.Plant.PlantDesc} - {updItem.DtOrder}";
|
||||
}
|
||||
dbCtx.Entry(updItem).State = EntityState.Modified;
|
||||
}
|
||||
else
|
||||
@@ -402,7 +467,7 @@ namespace GWMS.Data.Controllers
|
||||
|
||||
var rawOrderData = dbCtxMult
|
||||
.DbSetOrders
|
||||
.Where(x => x.PlantId == PlantId)
|
||||
.Where(x => x.PlantId == PlantId && x.ExecutionQty == 0)
|
||||
.OrderBy(x => x.DtOrder)
|
||||
.Take(maxRecords)
|
||||
.ToList();
|
||||
@@ -443,6 +508,8 @@ namespace GWMS.Data.Controllers
|
||||
PlantDesc = currPlant.PlantDesc,
|
||||
LevelAct = actLevel,
|
||||
LevelMax = currPlant.LevelMax,
|
||||
LevelReorder = currPlant.LevelReorder,
|
||||
OrderQtyStd = currPlant.OrderQtyStd,
|
||||
PressAct = PressAct,
|
||||
LevelTS = LevelTS,
|
||||
PressTS = PressTS,
|
||||
|
||||
@@ -21,6 +21,9 @@ namespace GWMS.Data.DTO
|
||||
public double LevelMax { get; set; } = 99999;
|
||||
|
||||
public double LevelAct { get; set; } = 0;
|
||||
public double LevelReorder { get; set; } = 0;
|
||||
public double OrderQtyStd { get; set; } = 0;
|
||||
|
||||
|
||||
public int LevelRatio
|
||||
{
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace GWMS.Data.DatabaseModels
|
||||
|
||||
public double ExecutionQty { get; set; } = 0;
|
||||
|
||||
public double LevelStart { get; set; } = 0;
|
||||
|
||||
public double LevelEnd { get; set; } = 1;
|
||||
|
||||
[ForeignKey("PlantId")]
|
||||
public virtual PlantDetailModel Plant { get; set; }
|
||||
|
||||
|
||||
@@ -26,11 +26,13 @@ namespace GWMS.Data.DatabaseModels
|
||||
[MaxLength(250)]
|
||||
public string PlantDesc { get; set; } = "";
|
||||
|
||||
public double LevelMax { get; set; } = 9999;
|
||||
public double LevelMax { get; set; } = 29999;
|
||||
|
||||
public double LevelReorder { get; set; } = 0;
|
||||
|
||||
//public double PressMax { get; set; } = 9999;
|
||||
public double OrderQtyStd { get; set; } = 1000;
|
||||
|
||||
//public double LastLevelMax { get; set; } = 0;
|
||||
|
||||
//public double PressAct { get; set; } = 0;
|
||||
|
||||
|
||||
@@ -0,0 +1,875 @@
|
||||
// <auto-generated />
|
||||
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("20210806162035_AddOrderDefQty")]
|
||||
partial class AddOrderDefQty
|
||||
{
|
||||
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<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasComment("Descrizione dell'item");
|
||||
|
||||
b.Property<int>("ValFloat")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ValInt")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("AnKeyVal");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("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<int>("ItemId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ItemCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("ItemDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("ItemType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("UM")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.HasKey("ItemId");
|
||||
|
||||
b.ToTable("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ListValModel", b =>
|
||||
{
|
||||
b.Property<string>("TabName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("TabName");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("FieldName");
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("Val");
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnName("Descript");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("Ordinal");
|
||||
|
||||
b.HasKey("TabName", "FieldName", "Val");
|
||||
|
||||
b.ToTable("ListVal");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtETA")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtExecEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtExecStart")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtOrder")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("ExecutionQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("OrderCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("OrderDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<double>("OrderQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("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<int>("PlantId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("LevelMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelReorder")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("OrderQtyStd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("PlantCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("PlantDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantId");
|
||||
|
||||
b.ToTable("PlantDetail");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
PlantId = 1,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 2,
|
||||
LevelMax = 28000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 3,
|
||||
LevelMax = 24000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 4,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantDataId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("FluxType")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("ValNumber")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantDataId");
|
||||
|
||||
b.HasIndex("PlantId");
|
||||
|
||||
b.ToTable("PlantLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantStatusModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("FluxType")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("ValNumber")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantId", "FluxType");
|
||||
|
||||
b.ToTable("PlantStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.RebootLogModel", b =>
|
||||
{
|
||||
b.Property<int>("RecordId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Item")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("RecordId");
|
||||
|
||||
b.ToTable("RebootLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.SupplierModel", b =>
|
||||
{
|
||||
b.Property<int>("SupplierId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplierCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("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<int>("TransporterId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("PositionLatitude")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PositionLongitude")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<DateTime>("PositionUpdated")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("TransporterCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("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, 18, 20, 35, 347, DateTimeKind.Local).AddTicks(1664),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
new
|
||||
{
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 8, 6, 18, 20, 35, 347, DateTimeKind.Local).AddTicks(2482),
|
||||
TransporterCode = "TRAF",
|
||||
TransporterDesc = "Traffik"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.UserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("AuthKey")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Lang")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("varchar(10)");
|
||||
|
||||
b.Property<string>("Lastname")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<int>("Livello")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaskPlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaskSupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaskTranspId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SaltPasswd")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("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<int>("WeekPlanId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DayNum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DeliveryHour")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
public partial class AddOrderDefQty : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "OrderQtyStd",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 1,
|
||||
column: "OrderQtyStd",
|
||||
value: 18000.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 2,
|
||||
column: "OrderQtyStd",
|
||||
value: 18000.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 3,
|
||||
column: "OrderQtyStd",
|
||||
value: 18000.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 4,
|
||||
column: "OrderQtyStd",
|
||||
value: 18000.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 6, 18, 20, 35, 347, DateTimeKind.Local).AddTicks(1664));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 6, 18, 20, 35, 347, DateTimeKind.Local).AddTicks(2482));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrderQtyStd",
|
||||
table: "PlantDetail");
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,881 @@
|
||||
// <auto-generated />
|
||||
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("20210809143652_OrderFillData")]
|
||||
partial class OrderFillData
|
||||
{
|
||||
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<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasComment("Descrizione dell'item");
|
||||
|
||||
b.Property<int>("ValFloat")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ValInt")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("KeyName");
|
||||
|
||||
b.ToTable("AnKeyVal");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("KeyName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("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<int>("ItemId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ItemCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("ItemDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("ItemType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("UM")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.HasKey("ItemId");
|
||||
|
||||
b.ToTable("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.ListValModel", b =>
|
||||
{
|
||||
b.Property<string>("TabName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("TabName");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("FieldName");
|
||||
|
||||
b.Property<string>("Val")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasColumnName("Val");
|
||||
|
||||
b.Property<string>("Descript")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)")
|
||||
.HasColumnName("Descript");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("Ordinal");
|
||||
|
||||
b.HasKey("TabName", "FieldName", "Val");
|
||||
|
||||
b.ToTable("ListVal");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtETA")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtExecEnd")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtExecStart")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("DtOrder")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("ExecutionQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelEnd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelStart")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("OrderCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("OrderDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<double>("OrderQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("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<int>("PlantId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("LevelMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelReorder")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("OrderQtyStd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("PlantCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("PlantDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantId");
|
||||
|
||||
b.ToTable("PlantDetail");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
PlantId = 1,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 2,
|
||||
LevelMax = 28000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 3,
|
||||
LevelMax = 24000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 4,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantDataId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("FluxType")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("ValNumber")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantDataId");
|
||||
|
||||
b.HasIndex("PlantId");
|
||||
|
||||
b.ToTable("PlantLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantStatusModel", b =>
|
||||
{
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("FluxType")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("ValNumber")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("ValString")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("PlantId", "FluxType");
|
||||
|
||||
b.ToTable("PlantStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.RebootLogModel", b =>
|
||||
{
|
||||
b.Property<int>("RecordId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Item")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.HasKey("RecordId");
|
||||
|
||||
b.ToTable("RebootLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.SupplierModel", b =>
|
||||
{
|
||||
b.Property<int>("SupplierId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplierCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("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<int>("TransporterId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("PositionLatitude")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PositionLongitude")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<DateTime>("PositionUpdated")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("TransporterCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("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, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9092),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
new
|
||||
{
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9470),
|
||||
TransporterCode = "TRAF",
|
||||
TransporterDesc = "Traffik"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.UserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("AuthKey")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Lang")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("varchar(10)");
|
||||
|
||||
b.Property<string>("Lastname")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<int>("Livello")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaskPlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaskSupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaskTranspId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SaltPasswd")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<string>("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<int>("WeekPlanId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DayNum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DeliveryHour")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<int>("PlantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
public partial class OrderFillData : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "LevelEnd",
|
||||
table: "Order",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "LevelStart",
|
||||
table: "Order",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9092));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9470));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LevelEnd",
|
||||
table: "Order");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LevelStart",
|
||||
table: "Order");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 6, 18, 20, 35, 347, DateTimeKind.Local).AddTicks(1664));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 6, 18, 20, 35, 347, DateTimeKind.Local).AddTicks(2482));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,6 +146,12 @@ namespace GWMS.Data.Migrations
|
||||
b.Property<double>("ExecutionQty")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelEnd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelStart")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("OrderCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
@@ -189,6 +195,9 @@ namespace GWMS.Data.Migrations
|
||||
b.Property<double>("LevelReorder")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("OrderQtyStd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("PlantCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
@@ -207,6 +216,7 @@ namespace GWMS.Data.Migrations
|
||||
PlantId = 1,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio"
|
||||
},
|
||||
@@ -215,6 +225,7 @@ namespace GWMS.Data.Migrations
|
||||
PlantId = 2,
|
||||
LevelMax = 28000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto"
|
||||
},
|
||||
@@ -223,6 +234,7 @@ namespace GWMS.Data.Migrations
|
||||
PlantId = 3,
|
||||
LevelMax = 24000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola"
|
||||
},
|
||||
@@ -231,6 +243,7 @@ namespace GWMS.Data.Migrations
|
||||
PlantId = 4,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello"
|
||||
});
|
||||
@@ -378,7 +391,7 @@ namespace GWMS.Data.Migrations
|
||||
TransporterId = 1,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521),
|
||||
PositionUpdated = new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9092),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
@@ -387,7 +400,7 @@ namespace GWMS.Data.Migrations
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901),
|
||||
PositionUpdated = new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9470),
|
||||
TransporterCode = "TRAF",
|
||||
TransporterDesc = "Traffik"
|
||||
});
|
||||
|
||||
@@ -37,10 +37,10 @@ namespace GWMS.Data
|
||||
|
||||
// inizializzazione dei valori di default x Plant
|
||||
modelBuilder.Entity<PlantDetailModel>().HasData(
|
||||
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, LevelReorder = 15000, OrderQtyStd = 9000 },
|
||||
new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, LevelReorder = 15000, OrderQtyStd = 18000 },
|
||||
new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, LevelReorder = 15000, OrderQtyStd = 9000 },
|
||||
new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, LevelReorder = 15000, OrderQtyStd = 9000 }
|
||||
// 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 },
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<div class="row">
|
||||
<div class="col-4 text-left">
|
||||
GWMS v.@version
|
||||
<div class="row px-1 text-light">
|
||||
<div class="col-5 pr-0 text-left">
|
||||
GWMS <span class="small">v.@version</span>
|
||||
</div>
|
||||
<div class="col-4 text-center text-secondary small">
|
||||
@adesso
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
powered by <a class="text-light" href="https://www.egalware.com/" target="_blank">Egalware <img height="16" src="img/LogoBlu.svg" /></a>
|
||||
<div class="col-7 pl-0 text-right">
|
||||
<span class="small">@adesso</span>
|
||||
<a class="text-light" href="https://www.egalware.com/" target="_blank">Egalware<img class="img-fluid" width="16" src="img/LogoBlu.svg" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="col-12 small">
|
||||
@if (totalCount > 0)
|
||||
{
|
||||
<Pagination>
|
||||
<Pagination Class="mb-0">
|
||||
<PaginationItem>
|
||||
<PaginationLink Clicked="@HandlePaginationItemClick" Page="1">
|
||||
<i class="fas fa-angle-double-left"></i>
|
||||
@@ -49,19 +49,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-3 small">
|
||||
<div class="col-12 col-lg-3">
|
||||
<div class="d-flex">
|
||||
<div class="p-2 flex-fill">
|
||||
<div class="p-1 flex-fill text-right">
|
||||
@if (!showLoading)
|
||||
{
|
||||
<span>@totalCount records</span>
|
||||
}
|
||||
</div>
|
||||
<div class="p-2 flex-fill text-right">
|
||||
<div class="p-1 flex-fill text-right small">
|
||||
@if (totalCount > 0)
|
||||
{
|
||||
<div class="input-group input-group-sm">
|
||||
row/pag:
|
||||
<select @bind="@PageSize" class="form-control form-control-sm">
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
|
||||
@inject MessageService AppMService
|
||||
@inject GWMSDataService DataService
|
||||
@inject NavigationManager NavManager
|
||||
@inject IConfiguration Configuration
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
@@ -17,15 +19,33 @@
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="col-12 col-lg-1">
|
||||
<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="col-12 col-lg-9 align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="col-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-qrcode" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText @bind-Value="@_currItem.OrderCode" class="form-control"></InputText>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pl-0">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><span class="fas fa-calendar" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
<DateEdit class="form-control" InputMode="DateInputMode.DateTime" @bind-Date="@_currItem.DtOrder" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pl-0">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-industry" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -37,42 +57,113 @@
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@*<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputDate id="DtEta" @bind-Value="_currItem.DtETA" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
<div class="col-3 pl-0">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-truck-moving" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputSelect @bind-Value="@_currItem.TransporterId" title="Trasportatore" class="form-control small">
|
||||
@foreach (var item in transpList)
|
||||
{
|
||||
<option value="@item.TransporterId">@item.TransporterCode | @item.TransporterDesc</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9 mt-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-comment-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)" />
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)"></InputText>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">note</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pl-0 mt-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Note
|
||||
<span class="fas fa-weight" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputNumber @bind-Value="@_currItem.OrderQty" class="form-control"></InputNumber>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">kg</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="mb-2">
|
||||
<button type="button" class="btn btn-outline-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
<div class="row">
|
||||
<div class="col-8 pr-0">
|
||||
<button type="button" class="btn btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
<div class="mt-2">
|
||||
<button type="button" class="btn btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" class="btn btn btn-danger btn-block h-100" value="Delete" @onclick="deleteRecord" title="Delete"><i class="fas fa-trash"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (editAll)
|
||||
{
|
||||
<div class="row mt-2">
|
||||
<div class="col-12 col-lg-1">
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><span class="fas fa-calendar" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
<DateEdit class="form-control" InputMode="DateInputMode.DateTime" @bind-Date="@_currItem.DtExecStart" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">inizio carico</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><span class="fas fa-calendar" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
<DateEdit class="form-control" InputMode="DateInputMode.DateTime" @bind-Date="@_currItem.DtExecEnd" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">fine carico</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pl-0">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-weight" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputNumber @bind-Value="@_currItem.ExecutionQty" class="form-control"></InputNumber>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">kg</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,6 +171,7 @@
|
||||
@code {
|
||||
|
||||
private List<SupplierModel> suppList;
|
||||
private List<TransporterModel> transpList;
|
||||
|
||||
protected OrderModel _currItem = new OrderModel();
|
||||
protected int _supplierId { get; set; } = 0;
|
||||
@@ -97,6 +189,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
private bool editAll { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
@@ -135,6 +229,22 @@
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
private async Task deleteRecord()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler eliminare l'ordine selezionato??"))
|
||||
return;
|
||||
|
||||
if (_currItem != null)
|
||||
{
|
||||
DataService.OrderDelete(_currItem);
|
||||
await DataUpdated.InvokeAsync(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("User null!");
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
@@ -143,6 +253,23 @@
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
suppList = await DataService.SuppliersGetAll();
|
||||
transpList = await DataService.TransportersGetAll();
|
||||
|
||||
// vedere anche https://www.mikesdotnetting.com/article/340/working-with-query-strings-in-blazor
|
||||
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
|
||||
var currMode = GetQueryParm("currMode");
|
||||
if (!string.IsNullOrEmpty(currMode))
|
||||
{
|
||||
editAll = currMode.Equals("debug");
|
||||
}
|
||||
}
|
||||
|
||||
// Blazor: get query parm from the URL
|
||||
protected string GetQueryParm(string parmName)
|
||||
{
|
||||
var uriBuilder = new UriBuilder(NavManager.Uri);
|
||||
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
|
||||
return q[parmName] ?? "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
@inject IConfiguration Configuration
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>
|
||||
@*<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>*@
|
||||
<div class="card-body small p-1">
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
@@ -26,10 +26,10 @@
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
||||
<span class="fas fa-truck" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputDate id="DtEta" @bind-Value="_currItem.DtETA" class="form-control" title="ETA (previsione consegna)" />
|
||||
<DateEdit @bind-Date="_currItem.DtETA" InputMode="DateInputMode.DateTime" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
@@ -50,11 +50,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<div>
|
||||
<button type="button" class="btn btn-sm btn-outline-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-sm btn-outline-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<div class="card-header table-primary h1 py-1">
|
||||
@if (currItem != null)
|
||||
{
|
||||
<div class="row py-0">
|
||||
<div class="col-6">
|
||||
<b>@currItem.PlantCode</b>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@currItem.PlantDesc
|
||||
</div>
|
||||
<div class="row py-0">
|
||||
<div class="col-6">
|
||||
<b>@currItem.PlantCode</b>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@currItem.PlantDesc
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-0">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-0 border border-primary">
|
||||
<img src="./img/Plant/@(currItem.PlantCode).jpg" class="img-fluid" />
|
||||
</li>
|
||||
<li class="list-group-item active d-flex justify-content-between align-items-center py-1">PB Alta</li>
|
||||
|
||||
@@ -130,11 +130,8 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
int answ = 1;
|
||||
int numCount = _currItem.LevelTS.Count;
|
||||
if (numCount > 200)
|
||||
answ = 4;
|
||||
else if (numCount > 150)
|
||||
answ = 3;
|
||||
else if (numCount >= 50)
|
||||
// passo a 2h se > 1 week
|
||||
if (numCount > 120)
|
||||
answ = 2;
|
||||
redFact = answ;
|
||||
}
|
||||
@@ -159,7 +156,7 @@ namespace GWMS.UI.Components
|
||||
private List<string> GetLineChartLabels()
|
||||
{
|
||||
fixRedFactor();
|
||||
var answ = _currItem.LevelTS.Where((cat, index) => index % redFact == 0).Select(x => x.DtEvent.ToString("dd.MM HH")).ToList();
|
||||
var answ = _currItem.LevelTS.Where((cat, index) => index % redFact == 0).Select(x => x.DtEvent.ToString("dd/MM HH")).ToList();
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
private async Task deleteRecord()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler eliminare la consegna selezionata??"))
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler eliminare la consegna selezionata??"))
|
||||
return;
|
||||
|
||||
if (_currItem != null)
|
||||
|
||||
@@ -90,6 +90,29 @@ namespace GWMS.UI.Controllers
|
||||
return $"OK";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue verifica livelli ed eventuale creazione ordini refill
|
||||
///
|
||||
/// GET: IOB/checkLevels/SIMUL_03
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("checkLevels/{id}")]
|
||||
public async Task<string> checkLevels(string id)
|
||||
{
|
||||
bool fatto = false;
|
||||
// ...verifica per ricalcolo ordini...
|
||||
fatto = await _DataService.checkLevels();
|
||||
if (fatto)
|
||||
{
|
||||
return "Ok";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "NO";
|
||||
}
|
||||
}
|
||||
|
||||
// DELETE api/IOB/5
|
||||
[HttpDelete("{id}")]
|
||||
public void Delete(int id)
|
||||
@@ -248,6 +271,9 @@ namespace GWMS.UI.Controllers
|
||||
newData.Add(newItem);
|
||||
// insert!
|
||||
fatto = await _DataService.PlantLogInsert(newData);
|
||||
|
||||
// effettuo SEMPRE verifica per ricalcolo ordini...
|
||||
_DataService.checkLevels();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -286,6 +312,9 @@ namespace GWMS.UI.Controllers
|
||||
List<PlantLogModel> plData = rawData.fluxData.Select(jpl => _DataService.convertFluxToPL(currPlant.PlantId, jpl)).ToList();
|
||||
//insert!
|
||||
fatto = await _DataService.PlantLogInsert(plData);
|
||||
|
||||
// effettuo SEMPRE verifica per ricalcolo ordini...
|
||||
await _DataService.checkLevels();
|
||||
}
|
||||
}
|
||||
if (fatto)
|
||||
|
||||
@@ -186,12 +186,86 @@ namespace GWMS.UI.Data
|
||||
return mHash(string.Format("ExeTask:{0}", idxMacchina));
|
||||
}
|
||||
|
||||
protected async Task<bool> checkCreateOrders()
|
||||
{
|
||||
bool fatto = false;
|
||||
List<OrderModel> NewOrders = new List<OrderModel>();
|
||||
DateTime adesso = DateTime.Now;
|
||||
int supplierId = 1;
|
||||
int transporterId = 1;
|
||||
double qtyOrd = 0;
|
||||
// faccio ciclo x tutti gli impianti
|
||||
List<PlantDTO> currPlantData = await PlantsGetAll();
|
||||
List<WeekPlanModel> fullWeekPlan = WeekPlanGet().Result;
|
||||
foreach (var item in currPlantData)
|
||||
{
|
||||
// recupero ordini x il plant
|
||||
var currOrderOpen = await OrdersGetOpen(item.PlantId);
|
||||
// calcolo delta ordinato
|
||||
qtyOrd = currOrderOpen.Sum(x => x.OrderQty);
|
||||
// verifico il livello attuale + i valori degli ordini APERTI rispetto al livello di riordino...
|
||||
if (item.LevelAct + qtyOrd < item.LevelReorder)
|
||||
{
|
||||
// (FARE !!! VERIFICA!!!!)
|
||||
// calcolo supplier/transporter da tab WeekPlan
|
||||
var dailyPlan = fullWeekPlan.Where(x => x.PlantId == item.PlantId && (int)x.DayNum == ((int)adesso.DayOfWeek + 1)).FirstOrDefault();
|
||||
if (dailyPlan != null)
|
||||
{
|
||||
supplierId = dailyPlan.SupplierId;
|
||||
transporterId = dailyPlan.TransporterId;
|
||||
}
|
||||
else
|
||||
{
|
||||
supplierId = 1;
|
||||
transporterId = 1;
|
||||
}
|
||||
// stacco un NUOVO ordine di quantità finita
|
||||
NewOrders.Add(new OrderModel() { DtOrder = adesso, OrderQty = item.OrderQtyStd, PlantId = item.PlantId, OrderCode = $"O{item.PlantCode}{adesso:yyMMddHHmm}", OrderDesc = $"Ordine {item.PlantDesc} - {adesso}", SupplierId = supplierId, TransporterId = transporterId });
|
||||
}
|
||||
}
|
||||
if (NewOrders.Count > 0)
|
||||
{
|
||||
// effettuo inserimento ordini!
|
||||
dbController.OrderInsert(NewOrders);
|
||||
|
||||
// invio email x ogni fornitore x i NUOVI ordini inseriti
|
||||
var orders4supp = NewOrders.GroupBy(g => g.SupplierId).FirstOrDefault();
|
||||
foreach (var item in orders4supp)
|
||||
{
|
||||
// invio email di notifica nuovi ordini inseriti
|
||||
}
|
||||
|
||||
// invio email x ogni fornitore x i NUOVI ordini inseriti
|
||||
var orders4transp = NewOrders.GroupBy(g => g.TransporterId).FirstOrDefault();
|
||||
foreach (var item in orders4transp)
|
||||
{
|
||||
// invio email di notifica nuovi ordini inseriti
|
||||
}
|
||||
fatto = true;
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
protected string getCacheKey(string TableName, SelectOrderData CurrFilter)
|
||||
{
|
||||
string answ = $"{TableName}:P_{CurrFilter.PlantId:00}:S_{CurrFilter.SupplierId:00}:T_{CurrFilter.TransporterId:00}:D_{CurrFilter.DateStart:yyyyMMddHHmm}_{CurrFilter.DateEnd:yyyyMMddHHmm}";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// invalida tutta la cache in caso di update
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async void invalidateAllCache()
|
||||
{
|
||||
await distributedCache.RemoveAsync("DATA:CONFIG");
|
||||
await distributedCache.RemoveAsync("DATA:CHECKLEVEL");
|
||||
await distributedCache.RemoveAsync("DATA:PLANTS:ListDTO");
|
||||
await distributedCache.RemoveAsync("DATA:SUPPL:List");
|
||||
await distributedCache.RemoveAsync("DATA:TRANSP:List");
|
||||
await distributedCache.RemoveAsync("DATA:WEEKPLAN:List");
|
||||
}
|
||||
|
||||
protected async Task<List<PlantLogModel>> PlantLogGetLastByFlux(int PlantId)
|
||||
{
|
||||
List<PlantLogModel> lastValues = new List<PlantLogModel>();
|
||||
@@ -234,6 +308,45 @@ namespace GWMS.UI.Data
|
||||
return $"DATA:{dataType}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua verifica x tutti i plant, se livello > livello riordino e NON ci sono ordini APERTI in arrivo --> lancia ordine
|
||||
/// </summary>
|
||||
public async Task<bool> checkLevels()
|
||||
{
|
||||
bool fatto = false;
|
||||
// effettuo verifica veto ricalcolo ordini da cache...
|
||||
DateTime adesso = DateTime.Now;
|
||||
DateTime vetoCheck = adesso.AddMinutes(1);
|
||||
string cacheKey = "DATA:CHECKLEVEL";
|
||||
string rawData;
|
||||
try
|
||||
{
|
||||
var redisDataList = await distributedCache.GetAsync(cacheKey);
|
||||
// se non ho veto --> controllo
|
||||
if (redisDataList != null)
|
||||
{
|
||||
rawData = Encoding.UTF8.GetString(redisDataList);
|
||||
vetoCheck = JsonConvert.DeserializeObject<DateTime>(rawData);
|
||||
}
|
||||
else
|
||||
{
|
||||
vetoCheck = adesso.AddMinutes(-1);
|
||||
}
|
||||
if (adesso > vetoCheck)
|
||||
{
|
||||
fatto = await checkCreateOrders();
|
||||
// imposto nuovo veto a 5 min...
|
||||
vetoCheck = adesso.AddMinutes(5);
|
||||
rawData = JsonConvert.SerializeObject(vetoCheck);
|
||||
redisDataList = Encoding.UTF8.GetBytes(rawData);
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(false));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public async Task<List<GWMS.Data.DatabaseModels.ConfigModel>> ConfigGetAll()
|
||||
{
|
||||
//return Task.FromResult(dbController.ActionsGetAll());
|
||||
@@ -341,13 +454,26 @@ namespace GWMS.UI.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
public async void OrderDelete(OrderModel currItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
dbController.OrderDelete(currItem);
|
||||
invalidateAllCache();
|
||||
dbController.ResetController();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<OrderModel>> OrdersGetFilt(SelectOrderData CurrFilter)
|
||||
{
|
||||
List<OrderModel> dbResult = new List<OrderModel>();
|
||||
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.GetOrdersFilt(CurrFilter.PlantId, CurrFilter.SupplierId, CurrFilter.TransporterId, CurrFilter.DateStart, CurrFilter.DateEnd);
|
||||
dbResult = dbController.GetOrdersFilt(CurrFilter.PlantId, CurrFilter.SupplierId, CurrFilter.TransporterId, CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.ShowClosed);
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Info($"Effettuata lettura da DB per OrdersGetFilt: {ts.TotalMilliseconds} ms");
|
||||
@@ -355,11 +481,32 @@ namespace GWMS.UI.Data
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco degli ordini ancora aperti x il Plant
|
||||
/// </summary>
|
||||
/// <param name="CurrFilter"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<OrderModel>> OrdersGetOpen(int PlantId)
|
||||
{
|
||||
List<OrderModel> dbResult = new List<OrderModel>();
|
||||
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.GetOrdersOpen(PlantId);
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Info($"Effettuata lettura da DB per OrdersGetOpen | PlantId: {PlantId} | {ts.TotalMilliseconds} ms");
|
||||
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
public void OrderUpdate(OrderModel currItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
dbController.OrderUpdate(currItem);
|
||||
invalidateAllCache();
|
||||
dbController.ResetController();
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -506,6 +653,11 @@ namespace GWMS.UI.Data
|
||||
return await Task.FromResult(dbController.RegenDB(1, numDays, stepMin, maxHourRate));
|
||||
}
|
||||
|
||||
public void ResetController()
|
||||
{
|
||||
dbController.ResetController();
|
||||
}
|
||||
|
||||
public void rollBackEdit(object item)
|
||||
{
|
||||
dbController.rollBackEntity(item);
|
||||
@@ -595,8 +747,7 @@ namespace GWMS.UI.Data
|
||||
//dbController.ResetController();
|
||||
dbController.WeekPlanDelete(currItem);
|
||||
string cacheKey = $"DATA:WEEKPLAN:List";
|
||||
var redisDataList = Encoding.UTF8.GetBytes("");
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true));
|
||||
await distributedCache.RemoveAsync(cacheKey);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -623,8 +774,7 @@ namespace GWMS.UI.Data
|
||||
//dbController.ResetController();
|
||||
dbController.WeekPlanUpdate(currItem);
|
||||
string cacheKey = $"DATA:WEEKPLAN:List";
|
||||
var redisDataList = Encoding.UTF8.GetBytes("");
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true));
|
||||
await distributedCache.RemoveAsync(cacheKey);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace GWMS.UI.Data
|
||||
public static SelectData Init(int minRound, int numDayPrev)
|
||||
{
|
||||
TimeSpan DayElapsed = DateTime.Now.Subtract(DateTime.Today);
|
||||
int minDay = (int)(DayElapsed.TotalMinutes / minRound) * minRound;
|
||||
int minDay = (int)((DayElapsed.TotalMinutes / minRound) + 1) * minRound;
|
||||
DateTime endRounded = DateTime.Today.AddMinutes(minDay);
|
||||
SelectData answ = new SelectData()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,9 @@ namespace GWMS.UI.Data
|
||||
#region Public Properties
|
||||
|
||||
public int PlantId { get; set; } = 0;
|
||||
public bool ShowClosed { get; set; } = false;
|
||||
public int SupplierId { get; set; } = 0;
|
||||
|
||||
public int TransporterId { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
@@ -26,7 +28,7 @@ namespace GWMS.UI.Data
|
||||
public static new SelectOrderData Init(int minRound, int numDayPrev)
|
||||
{
|
||||
var selD = SelectData.Init(minRound, numDayPrev);
|
||||
return new SelectOrderData() { DateStart = selD.DateStart, DateEnd = selD.DateEnd };
|
||||
return new SelectOrderData() { DateStart = selD.DateStart, DateEnd = selD.DateEnd, ShowClosed = false };
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
@@ -34,6 +36,8 @@ namespace GWMS.UI.Data
|
||||
if (!(obj is SelectOrderData item))
|
||||
return false;
|
||||
|
||||
if (ShowClosed != item.ShowClosed)
|
||||
return false;
|
||||
if (PlantId != item.PlantId)
|
||||
return false;
|
||||
if (SupplierId != item.SupplierId)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.0.2108.0617</Version>
|
||||
<Version>1.0.2108.1915</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="5.0.1" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="5.0.1" />
|
||||
<PackageReference Include="BlazorBarcodeScanner.ZXing.JS" Version="0.2.4" />
|
||||
<PackageReference Include="Blazorise" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3.7" />
|
||||
<PackageReference Include="Blazorise.Charts" Version="0.9.3.7" />
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
@page "/GasStation"
|
||||
@page "/GasStation/{BarcodeText}"
|
||||
|
||||
@using Blazorise.Components
|
||||
@using GWMS.UI.Components
|
||||
@using BlazorBarcodeScanner.ZXing.JS
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary mb-0">
|
||||
@@ -9,10 +11,13 @@
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-9 col-lg-8 h3">
|
||||
Registrazione
|
||||
Lettura QRCode
|
||||
</div>
|
||||
<div class="col-3 col-lg-2">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleBCode()"><i class="fas fa-qrcode"></i> <i class="fas fa-chevron-down"></i></button>
|
||||
@if (!string.IsNullOrEmpty(BarcodeText))
|
||||
{
|
||||
<button class="btn btn-sm btn-block btn-success" @onclick="() => ToggleBCode()" title="reload"><i class="fas fa-qrcode"></i> re-scan</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,24 +27,41 @@
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="row small">
|
||||
<div class="col-12">
|
||||
<b>Acquisizione barcode</b>
|
||||
<div class="col-12 text-center">
|
||||
<div class="form-group">
|
||||
<input class="form-control" />
|
||||
@if (string.IsNullOrEmpty(BarcodeText))
|
||||
{
|
||||
<BlazorBarcodeScanner.ZXing.JS.BarcodeReader Title=""
|
||||
StartCameraAutomatically="true"
|
||||
ShowStart="false"
|
||||
ShowReset="false"
|
||||
ShowToggleTorch="false"
|
||||
ShowVideoDeviceList="true"
|
||||
ShowResult="false"
|
||||
OnBarcodeReceived="LocalReceivedBarcodeText"
|
||||
VideoWidth="300"
|
||||
VideoHeight="200" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3 class="textCondensed">
|
||||
@BarcodeText
|
||||
</h3>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="small">
|
||||
@*<p class="small">
|
||||
|
||||
Work IN progress, links:
|
||||
<ul>
|
||||
<li>https://github.com/sabitertan/BlazorBarcodeScanner</li>
|
||||
<li>https://github.com/tallichet/ZXingBlazor</li>
|
||||
<li>https://github.com/LorsSilvermort/BlazorBarcodeReader</li>
|
||||
<li>https://www.bing.com/search?q=blazor+server+qrcode+scanner&qs=n&form=QBRE&sp=-1&pq=blazor+server+qrcode+scanner&sc=0-28&sk=&cvid=D827470C199B47BDB39F277EFC72A266</li>
|
||||
</ul>
|
||||
</p>
|
||||
Work IN progress, links:
|
||||
<ul>
|
||||
<li>https://github.com/sabitertan/BlazorBarcodeScanner</li>
|
||||
<li>https://github.com/tallichet/ZXingBlazor</li>
|
||||
<li>https://github.com/LorsSilvermort/BlazorBarcodeReader</li>
|
||||
<li>https://www.bing.com/search?q=blazor+server+qrcode+scanner&qs=n&form=QBRE&sp=-1&pq=blazor+server+qrcode+scanner&sc=0-28&sk=&cvid=D827470C199B47BDB39F277EFC72A266</li>
|
||||
</ul>
|
||||
</p>*@
|
||||
</div>
|
||||
<div class="card-footer p-1">
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using BlazorBarcodeScanner.ZXing.JS;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.UI.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
@@ -15,7 +16,6 @@ namespace GWMS.UI.Pages
|
||||
#region Private Fields
|
||||
|
||||
private OrderModel currRecord = null;
|
||||
|
||||
private List<OrderModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<OrderModel> SearchRecords;
|
||||
@@ -26,7 +26,6 @@ namespace GWMS.UI.Pages
|
||||
#region Private Properties
|
||||
|
||||
private int _currPage { get; set; } = 1;
|
||||
|
||||
private int _numRecord { get; set; } = 10;
|
||||
|
||||
private int currPage
|
||||
@@ -182,8 +181,31 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public string BarcodeText { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void LocalReceivedBarcodeText(BarcodeReceivedEventArgs args)
|
||||
{
|
||||
// rimando a pagina con codice ordine....
|
||||
NavManager.NavigateTo($"GasStation/{args.BarcodeText}");
|
||||
|
||||
#if false
|
||||
BarcodeText = args.BarcodeText;
|
||||
|
||||
// verifico il codice
|
||||
|
||||
// registro inizio trasferimento
|
||||
|
||||
StateHasChanged();
|
||||
#endif
|
||||
}
|
||||
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
{
|
||||
DateEnd = (DateTime)date;
|
||||
@@ -260,7 +282,10 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected void ToggleBCode()
|
||||
{
|
||||
NavManager.NavigateTo("GasStation");
|
||||
#if false
|
||||
showBcodeScan = !showBcodeScan;
|
||||
#endif
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@inject GWMSDataService DataService
|
||||
@inject MessageService AppMService
|
||||
|
||||
<div class="jumbotron">
|
||||
<div class="jumbotron py-4">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4">
|
||||
<h1>GWMS</h1>
|
||||
@@ -16,29 +16,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 text-right">
|
||||
<div class="text-light display-4">
|
||||
<div class="text-light h1 d-none d-md-block">
|
||||
<span class="fas fa-home" aria-hidden="true"></span> | <span class="fas fa-gas-pump" aria-hidden="true"></span> | <span class="fas fa-file-invoice" aria-hidden="true"></span> | <span class="fas fa-industry" aria-hidden="true"></span> | <span class="fas fa-truck-moving" aria-hidden="true"></span> | <span class="fas fa-wrench" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 my-5">
|
||||
<div class="col-12 my-lg-5">
|
||||
<SetupDiagnostics></SetupDiagnostics>
|
||||
</div>
|
||||
<div class="col-12 text-center">
|
||||
<img class="img-fluid mb-3" src="./img/LogoPizzaferri.jpg" />
|
||||
<h3>
|
||||
<img class="img-fluid mb-3" src="./img/LogoPizzaferri.png" />
|
||||
<h4>
|
||||
Sistema di gestione e pianificazione logistica impianti distribuzione metano
|
||||
</h3>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="col-12 text-center mt-5">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4 badge badge-pill badge-dark">
|
||||
<h3>
|
||||
<a class="text-light" href="https://www.egalware.com/" target="_blank">powered by EgalWare <img width="32" class="img-fluid" src="img/LogoBlu.svg" /></a>
|
||||
</h3>
|
||||
<div class="px-1">
|
||||
<a class="text-light" href="https://www.egalware.com/" target="_blank">powered by EgalWare <img width="24" class="img-fluid" src="img/LogoBlu.svg" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+49
-10
@@ -14,17 +14,27 @@
|
||||
<div class="p-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">inizio:</span>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateStart" DateChanged="@OnDateStartChanged" />
|
||||
</div>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="togAttivi" title="Solo Aperti / Mostra tutti" @bind-value="@ShowClosed" checked="@ShowClosed" />
|
||||
<label class="custom-control-label small" for="togAttivi"><sub>evasi</sub></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">fine:</span>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateEnd" DateChanged="@OnDateEndChanged" />
|
||||
<span class="input-group-text">inizio:</span>
|
||||
</div>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateStart" DateChanged="@OnDateStartChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">fine:</span>
|
||||
</div>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateEnd" DateChanged="@OnDateEndChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
@@ -65,6 +75,17 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="form-group mb-0">
|
||||
<Button id="btnReset" class="btn btn-info btn-sm btn-block" Clicked="ResetFilter" title="Reset Filter"><span class="oi oi-loop-circular"></span></Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
@if (ShowAddNew)
|
||||
{
|
||||
<button class="btn btn-block btn-sm btn-success" @onclick="CreateNew" title="Aggiunta nuovo Ordine"><i class="far fa-calendar-plus"></i></button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,7 +115,9 @@
|
||||
<th>Data Ordine</th>
|
||||
<th>Ordine</th>
|
||||
<th class="text-right">Fornitore</th>
|
||||
<th class="text-right">Qta</th>
|
||||
<th class="text-right">Richiesta</th>
|
||||
<th class="text-right">Carico</th>
|
||||
<th class="text-right">Effettivo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -112,13 +135,29 @@
|
||||
</td>
|
||||
<td>@record.OrderCode | @record.OrderDesc</td>
|
||||
<td class="text-right">
|
||||
<div class="row">
|
||||
<div class="col">[@record.Supplier.SupplierCode]</div>
|
||||
<div class="col text-right">@record.Supplier.SupplierDesc</div>
|
||||
<div class="text-uppercase">
|
||||
@record.Supplier.SupplierDesc
|
||||
</div>
|
||||
<div class="small">@record.Transporter.TransporterCode | @record.Transporter.TransporterDesc</div>
|
||||
<div class="small">@record.Transporter.TransporterDesc</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@record.OrderQty.ToString("N0")
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if (!record.DtExecStart.Equals(@record.DtExecEnd))
|
||||
{
|
||||
<div>
|
||||
@record.DtExecStart.Date.ToString("ddd dd/MM/yyyyy")
|
||||
</div>
|
||||
<div class="small">@record.DtExecStart.TimeOfDay --> @record.DtExecEnd.TimeOfDay</div>
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if (record.ExecutionQty > 0)
|
||||
{
|
||||
@record.ExecutionQty.ToString("N0")
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">@record.OrderQty.ToString("N0")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -105,6 +105,28 @@ namespace GWMS.UI.Pages
|
||||
|
||||
private bool ShowCharts { get; set; } = false;
|
||||
|
||||
private bool ShowClosed
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = true;
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.ShowClosed;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.ShowClosed.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.ShowClosed = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -180,6 +202,20 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public bool ShowAddNew
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
answ = (SelSupplierId > 0 && SelPlantId > 0);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
@@ -204,6 +240,32 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Creazione nuovo record Ordine
|
||||
/// </summary>
|
||||
protected void CreateNew()
|
||||
{
|
||||
var currPlant = PlantsList.Where(x => x.PlantId == SelPlantId).FirstOrDefault();
|
||||
var currSuppl = SuppliersList.Where(x => x.SupplierId == SelSupplierId).FirstOrDefault();
|
||||
if (currPlant != null && currSuppl != null)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
// creo un nuovo record
|
||||
currRecord = new OrderModel()
|
||||
{
|
||||
DtOrder = adesso,
|
||||
PlantId = SelPlantId,
|
||||
SupplierId = SelSupplierId,
|
||||
OrderDesc = $"Ord Man {currPlant.PlantDesc} - {adesso}",
|
||||
OrderQty = 1000,
|
||||
TransporterId = 1,
|
||||
OrderCode = $"O{currPlant.PlantCode}{adesso:yyMMddHHmm}",
|
||||
};
|
||||
// aggiorno filtro
|
||||
AppMService.Order_Filter = SelectOrderData.Init(5, 10);
|
||||
}
|
||||
}
|
||||
|
||||
protected void Edit(OrderModel selRecord)
|
||||
{
|
||||
currRecord = selRecord;
|
||||
@@ -221,6 +283,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
DataService.ResetController();
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Ordini";
|
||||
AppMService.PageIcon = "fas fa-file-invoice pr-2";
|
||||
@@ -241,12 +304,13 @@ namespace GWMS.UI.Pages
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
protected async Task ResetFilter(SelectOrderData newFilter)
|
||||
protected async Task ResetFilter()
|
||||
{
|
||||
currRecord = null;
|
||||
SearchRecords = null;
|
||||
ListRecords = null;
|
||||
AppMService.Order_Filter = SelectOrderData.Init(5, 7);
|
||||
AppMService.Order_Filter = SelectOrderData.Init(5, 10);
|
||||
ShowClosed = false;
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
@@ -259,6 +323,7 @@ namespace GWMS.UI.Pages
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
DataService.ResetController();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/Suppliers"
|
||||
@page "/Suppliers/{SupplierIdReq}"
|
||||
|
||||
@using Blazorise.Components
|
||||
@using GWMS.UI.Components
|
||||
@@ -15,16 +16,16 @@
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">inizio:</span>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateStart" DateChanged="@OnDateStartChanged" />
|
||||
</div>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateStart" DateChanged="@OnDateStartChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">fine:</span>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateEnd" DateChanged="@OnDateEndChanged" />
|
||||
</div>
|
||||
<DateEdit class="form-control form-control-sm" TValue="DateTime?" Date="@DateEnd" DateChanged="@OnDateEndChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
|
||||
@@ -165,6 +165,16 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
|
||||
protected int SupplierIdFilt
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int.TryParse(SupplierIdReq, out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
@@ -180,6 +190,13 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public string SupplierIdReq { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
@@ -231,7 +248,8 @@ namespace GWMS.UI.Pages
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
SuppliersList = await DataService.SuppliersGetAll();
|
||||
var suppliersAll = await DataService.SuppliersGetAll();
|
||||
SuppliersList = suppliersAll.Where(x => x.SupplierId == SupplierIdFilt || SupplierIdFilt == 0).ToList();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
@page "/Transporters"
|
||||
@page "/Transporters/{TransporterIdReq}"
|
||||
|
||||
@using Blazorise.Components
|
||||
@using GWMS.UI.Components
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary mb-0">
|
||||
<div class="card-header table-primary pb-0 mb-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-6 col-lg-8 h3">
|
||||
In Consegna
|
||||
<div class="col-6 pr-0 col-lg-8 h3">
|
||||
Consegne
|
||||
</div>
|
||||
<div class="col-3 col-lg-2">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltPeriod()"><i class="far fa-calendar-alt"></i> <i class="fas fa-chevron-down"></i></button>
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltPeriod()"><i class="far fa-calendar-alt"></i> <i class="@icnFiltTime"></i></button>
|
||||
</div>
|
||||
<div class="col-3 col-lg-2">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltDest()"><i class="fas fa-gas-pump"></i> <i class="fas fa-chevron-down"></i></button>
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltDest()"><i class="fas fa-gas-pump"></i> <i class="@icnFiltDest"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,24 +59,6 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-truck-moving" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@SelTranspId" class="form-control form-control-sm" title="Trasportatore">
|
||||
@if (TransportersList != null)
|
||||
{
|
||||
foreach (var item in TransportersList)
|
||||
{
|
||||
<option value="@item.TransporterId">@item.TransporterCode | @item.TransporterDesc</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -119,8 +102,11 @@
|
||||
<div>
|
||||
<b>@record.OrderQty.ToString("N0")</b>
|
||||
</div>
|
||||
<div>@record.DtETA.ToString("yyyy.MM.dd")</div>
|
||||
<div class="small">@record.DtETA.ToString("ddd HH:mm.ss")</div>
|
||||
@if (!record.DtExecStart.Equals(@record.DtExecEnd))
|
||||
{
|
||||
<div>@record.DtETA.ToString("yyyy.MM.dd")</div>
|
||||
<div class="small">@record.DtETA.ToString("ddd HH:mm.ss")</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -43,6 +43,22 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private string icnFiltDest
|
||||
{
|
||||
get
|
||||
{
|
||||
return showFiltDest ? "fas fa-chevron-up" : "fas fa-chevron-down";
|
||||
}
|
||||
}
|
||||
|
||||
private string icnFiltTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return showFiltTime ? "fas fa-chevron-up" : "fas fa-chevron-down";
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private int numRecord
|
||||
@@ -74,6 +90,7 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
if (!MessageService.Order_Filter.PlantId.Equals(value))
|
||||
{
|
||||
currRecord = null;
|
||||
MessageService.Order_Filter.PlantId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
@@ -103,8 +120,6 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private bool ShowCharts { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -182,17 +197,36 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
protected int TransporterIdFilt
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int.TryParse(TransporterIdReq, out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public string TransporterIdReq { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
{
|
||||
currRecord = null;
|
||||
DateEnd = (DateTime)date;
|
||||
}
|
||||
|
||||
private void OnDateStartChanged(DateTime? date)
|
||||
{
|
||||
currRecord = null;
|
||||
DateStart = (DateTime)date;
|
||||
}
|
||||
|
||||
@@ -200,7 +234,7 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
isLoading = true;
|
||||
SearchRecords = await DataService.OrdersGetFilt(MessageService.Order_Filter);
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
ListRecords = SearchRecords.Where(x => x.TransporterId == TransporterIdFilt).Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
@@ -225,6 +259,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
SelPlantId = 0;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Fornitore";
|
||||
MessageService.PageIcon = "fas fa-industry pr-2";
|
||||
@@ -263,6 +298,11 @@ namespace GWMS.UI.Pages
|
||||
protected void ToggleFiltDest()
|
||||
{
|
||||
showFiltDest = !showFiltDest;
|
||||
// se nascosto --> reset
|
||||
if (!showFiltDest)
|
||||
{
|
||||
SelPlantId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ToggleFiltPeriod()
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
<link href="GWMS.UI.styles.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<component type="typeof(App)" render-mode="ServerPrerendered" />
|
||||
<component type="typeof(App)" render-mode="Server" />
|
||||
@*<component type="typeof(App)" render-mode="ServerPrerendered" />*@
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
<environment include="Staging,Production">
|
||||
@@ -50,6 +51,9 @@
|
||||
<script src="_content/Blazorise.Bootstrap/blazorise.bootstrap.js"></script>
|
||||
<script src="_content/Blazorise.Charts/blazorise.charts.js"></script>
|
||||
|
||||
<script src="_content/BlazorBarcodeScanner.ZXing.JS/zxingjs.index.min.js"></script>
|
||||
<script src="_content/BlazorBarcodeScanner.ZXing.JS/BlazorBarcodeScanner.js"></script>
|
||||
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="top-row">
|
||||
<CmpTop></CmpTop>
|
||||
</div>
|
||||
<div class="content px-2 mb-5">
|
||||
<div class="content pt-1 pt-lg-2 px-2 mb-5">
|
||||
@Body
|
||||
</div>
|
||||
<div class="fixed-bottom bottom-row">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<a class="navbar-brand" href="">
|
||||
<div class="row">
|
||||
<div class="col-2 px-0">
|
||||
<img src="./img/LogoBlu.svg" class="img-fluid" width="128" />
|
||||
<img src="./img/LogoBlu.svg" class="img-fluid" width="64" />
|
||||
</div>
|
||||
<div class="col-10 h4">
|
||||
MAPO.GWMS
|
||||
|
||||
@@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.UI;
|
||||
@@ -80,6 +81,14 @@ namespace GWMS.UI
|
||||
// https://github.com/ElmahCore/ElmahCore
|
||||
app.UseElmah();
|
||||
|
||||
// fix forwarders
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
|
||||
app.UseAuthentication();
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ display-4 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
body,
|
||||
.textCondensed {
|
||||
font-family: 'Roboto Condensed', sans-serif;
|
||||
}
|
||||
a,
|
||||
@@ -158,4 +159,7 @@ a,
|
||||
min-width: 8rem;
|
||||
min-height: 4rem;
|
||||
}
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ h1, h2, h3, h4, h5, h6, b, display-1, display-2, display-3, display-4 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
html, body {
|
||||
html, body, .textCondensed {
|
||||
font-family: 'Roboto Condensed', sans-serif;
|
||||
}
|
||||
|
||||
@@ -173,4 +173,8 @@ a, .btn-link {
|
||||
min-width: @blSCut * 8;
|
||||
min-height: @blSCut * 4;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');@import url('fonts.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{font-family:'Roboto Condensed',sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:.66666667rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.5rem;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:.25rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.5rem;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}}
|
||||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');@import url('fonts.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body,.textCondensed{font-family:'Roboto Condensed',sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:.66666667rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.5rem;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:.25rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.5rem;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.9em;}}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2108.0617</h4>
|
||||
<h4>Versione: 1.0.2108.1915</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2108.0617
|
||||
1.0.2108.1915
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2108.0617</version>
|
||||
<version>1.0.2108.1915</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user