Compare commits
121 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 51edaa918a | |||
| 655048645b | |||
| 82caec9287 | |||
| 36c79829b5 | |||
| bc0ff628fe | |||
| 527d29eac3 | |||
| 51686f4ed7 | |||
| ae30f49d13 | |||
| 156ef822d3 | |||
| bb83c88275 | |||
| b1275a5b98 | |||
| 7b2e722b9f | |||
| 65a9e544e8 | |||
| 1c93191a3c | |||
| adfda41ecb | |||
| 5e07882384 | |||
| 1598e4d3df | |||
| 732b09c5db | |||
| 97c372f0d7 | |||
| 6d61b675a5 | |||
| 786766c402 | |||
| 76d8c027ea | |||
| 8cc5def978 | |||
| 8bf61b66e0 | |||
| 2f716385a5 | |||
| 16973a3203 | |||
| 5157366942 | |||
| 4f49625022 | |||
| e4272e2571 | |||
| 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 | |||
| 86fab02ebf | |||
| 591166189d | |||
| d5e6ff58b4 | |||
| ead8c3c955 | |||
| ba01a4851d | |||
| f7ed3c8b59 | |||
| c56cd613d9 | |||
| f221b3ea19 | |||
| 575af20c54 | |||
| f2a91e09c0 | |||
| 15c3bf012f | |||
| d3e4c65b1c | |||
| 66d27fd95a | |||
| e64051126f | |||
| d75bdfb7c0 | |||
| ff2b83164d | |||
| 303d08a229 | |||
| 31097ccee0 | |||
| e576f94348 | |||
| c13d2f135b | |||
| 866319a311 | |||
| f93f18561f | |||
| ca7b26b9bc | |||
| aea30b6502 | |||
| 8b506c54e5 | |||
| cae04d8851 | |||
| 8b84fa0016 | |||
| 5381f8a175 | |||
| bd5d48587d | |||
| 53cb7e8a4c | |||
| 12f553d703 | |||
| f5c4503fc2 | |||
| 4ada317928 | |||
| 5e17621470 | |||
| af2713be14 | |||
| 6f0b6e4f8c | |||
| de5bbe0e53 | |||
| 26b01d5f9b | |||
| 667747e4a2 | |||
| 179d19cd94 | |||
| 1d9ed73677 | |||
| aa8e52c32d | |||
| b5050ab449 | |||
| 571b40f058 | |||
| 46a8c8bee9 | |||
| d8919ccda6 | |||
| 28c7e51d64 | |||
| 7e9b264284 | |||
| e23cbbb36d | |||
| 499c91a57a | |||
| de2cd9279c | |||
| 513fa6cd91 | |||
| 887c7747a0 | |||
| f018c0474d | |||
| 5c1d4776ca | |||
| fa77860a50 | |||
| 8f88c42a71 |
@@ -35,6 +35,8 @@ namespace GWMS.Data.Controllers
|
||||
|
||||
private void CreateSimData(int numDays, int stepMin, int maxHourRate)
|
||||
{
|
||||
// disattivazione per sicurezza
|
||||
#if false
|
||||
ResetController();
|
||||
// generazione dati casuale
|
||||
Random rnd = new Random();
|
||||
@@ -130,12 +132,26 @@ namespace GWMS.Data.Controllers
|
||||
Log.Error($"Eccezione in salvataggio Orders{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcola DataOra arrotondata per eccesso secondo intervallo minuti indicato
|
||||
/// </summary>
|
||||
/// <param name="dateOrig"></param>
|
||||
/// <param name="minInt"></param>
|
||||
/// <returns></returns>
|
||||
public DateTime DateRoundEnd(DateTime dateOrig, int minInt)
|
||||
{
|
||||
int minRound = (int)Math.Ceiling((double)dateOrig.Minute / minInt) * minInt;
|
||||
DateTime roundDate = dateOrig.Date.AddHours(dateOrig.Hour).AddMinutes(minRound);
|
||||
return roundDate;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
@@ -160,11 +176,41 @@ namespace GWMS.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<OrderModel> GetOrdersFilt(int PlantId, int SupplierId, int TransporterId, DateTime DtStart, DateTime DtEnd)
|
||||
public OrderModel GetOrderByCode(string OrderCode)
|
||||
{
|
||||
OrderModel dbResult = new OrderModel();
|
||||
using (GWMSContext localDbCtx = new GWMSContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => (x.OrderCode == OrderCode))
|
||||
.Include(p => p.Plant)
|
||||
.Include(s => s.Supplier)
|
||||
.Include(t => t.Transporter)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -212,14 +258,38 @@ namespace GWMS.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<PlantDTO> GetPlantsDTO()
|
||||
public List<PlantDTO> GetPlantsDTO(int maxRecords)
|
||||
{
|
||||
var plantList = dbCtx
|
||||
.DbSetPlant
|
||||
.ToList();
|
||||
List<PlantDTO> dbResult = new List<PlantDTO>();
|
||||
using (GWMSContext dbCtxMult = new GWMSContext(_configuration))
|
||||
{
|
||||
var plantList = dbCtxMult
|
||||
.DbSetPlant
|
||||
.ToList();
|
||||
|
||||
var dbResult = plantList
|
||||
.Select(x => PlantDTO(x.PlantId))
|
||||
dbResult = plantList
|
||||
.Select(x => PlantDTO(x.PlantId, maxRecords))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce ultimi eventi rebootlog
|
||||
/// </summary>
|
||||
/// <param name="maxNum">num eventi, se 0 = tutti</param>
|
||||
/// <returns></returns>
|
||||
public List<RebootLogModel> GetRebootLog(int maxNum = 100)
|
||||
{
|
||||
if (maxNum == 0)
|
||||
{
|
||||
maxNum = dbCtx.DbRebootLog.Count();
|
||||
}
|
||||
var dbResult = dbCtx
|
||||
.DbRebootLog
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxNum)
|
||||
.ToList();
|
||||
|
||||
return dbResult;
|
||||
@@ -279,6 +349,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>
|
||||
@@ -289,21 +404,48 @@ namespace GWMS.Data.Controllers
|
||||
bool done = false;
|
||||
try
|
||||
{
|
||||
var currData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == updItem.OrderId)
|
||||
.FirstOrDefault();
|
||||
OrderModel currData = null;
|
||||
currData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == updItem.OrderId)
|
||||
.FirstOrDefault();
|
||||
if (currData != null)
|
||||
{
|
||||
dbCtx.Entry(updItem).State = EntityState.Modified;
|
||||
using (GWMSContext localDbCtx = new GWMSContext(_configuration))
|
||||
{
|
||||
// se ho modificato data --> cambio codice ordine!
|
||||
if (!localDbCtx.Entry(updItem).OriginalValues["DtOrder"].Equals(localDbCtx.Entry(updItem).CurrentValues["DtOrder"]))
|
||||
{
|
||||
updItem.OrderCode = $"O{updItem.Plant.PlantCode}{updItem.DtOrder:yyMMddHHmm}";
|
||||
updItem.OrderDesc = $"Ordine {updItem.Plant.PlantDesc} - {updItem.DtOrder}";
|
||||
}
|
||||
localDbCtx.Entry(updItem).State = EntityState.Modified;
|
||||
localDbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
//// 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;
|
||||
//dbCtx.SaveChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
//using (GWMSContext localDbCtx = new GWMSContext(_configuration))
|
||||
//{
|
||||
// localDbCtx
|
||||
// .DbSetOrders
|
||||
// .Add(updItem);
|
||||
// localDbCtx.SaveChanges();
|
||||
//}
|
||||
dbCtx
|
||||
.DbSetOrders
|
||||
.Add(updItem);
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
dbCtx.SaveChanges();
|
||||
done = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -314,12 +456,13 @@ namespace GWMS.Data.Controllers
|
||||
/// <summary>
|
||||
/// Recupero info PLANT modalità DTO
|
||||
/// </summary>
|
||||
/// <param name="PlantId"></param>
|
||||
/// <param name="PlantId">Impianto</param>
|
||||
/// <param name="PlantId">Max numero di record da recuperare</param>
|
||||
/// <returns></returns>
|
||||
public PlantDTO PlantDTO(int PlantId)
|
||||
public PlantDTO PlantDTO(int PlantId, int maxRecords)
|
||||
{
|
||||
var currPlant = GetPlant(PlantId);
|
||||
|
||||
PlantDTO answ = new PlantDTO();
|
||||
List<TSData> LevelTS = new List<TSData>();
|
||||
Dictionary<string, double> PressAct = new Dictionary<string, double>();
|
||||
Dictionary<string, List<TSData>> PressTS = new Dictionary<string, List<TSData>>();
|
||||
@@ -327,104 +470,123 @@ namespace GWMS.Data.Controllers
|
||||
List<TSData> PressBHTS = new List<TSData>();
|
||||
List<TSData> PressBLTS = new List<TSData>();
|
||||
List<TSData> OrderTS = new List<TSData>();
|
||||
// recupero dal DB
|
||||
var rawLevelData = dbCtx
|
||||
|
||||
using (GWMSContext dbCtxMult = new GWMSContext(_configuration))
|
||||
{
|
||||
// recupero dal DB
|
||||
var rawLevelData = dbCtxMult
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "Level" && x.PlantId == PlantId)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.ToList();
|
||||
|
||||
var rawMainPressData = dbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "MainPress" && x.PlantId == PlantId)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
var rawMainPressData = dbCtxMult
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "MainPress" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.ToList();
|
||||
|
||||
var rawBHPressData = dbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "PressBH" && x.PlantId == PlantId)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
var rawBHPressData = dbCtxMult
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "PressBH" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.ToList();
|
||||
|
||||
var rawBLPressData = dbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "PressBL" && x.PlantId == PlantId)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
var rawBLPressData = dbCtxMult
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.FluxType == "PressBL" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.ToList();
|
||||
|
||||
var rawOrderData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.PlantId == PlantId)
|
||||
.OrderBy(x => x.DtOrder)
|
||||
.ToList();
|
||||
var rawOrderData = dbCtxMult
|
||||
.DbSetOrders
|
||||
.Where(x => x.PlantId == PlantId && x.ExecutionQty == 0)
|
||||
.OrderByDescending(x => x.DtOrder)
|
||||
.Take(maxRecords)
|
||||
.ToList();
|
||||
|
||||
LevelTS = rawLevelData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
LevelTS = rawLevelData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
|
||||
OrderTS = rawOrderData
|
||||
.Select(x => new TSData() { DtEvent = x.DtOrder, ValDouble = x.OrderQty }).ToList();
|
||||
OrderTS = rawOrderData
|
||||
.Select(x => new TSData() { DtEvent = x.DtOrder, ValDouble = x.OrderQty }).ToList();
|
||||
|
||||
PressMainTS = rawMainPressData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
PressMainTS = rawMainPressData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
|
||||
PressBHTS = rawBHPressData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
PressBHTS = rawBHPressData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
|
||||
PressBLTS = rawBLPressData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
PressBLTS = rawBLPressData
|
||||
.Select(x => new TSData() { DtEvent = x.DtEvent, ValDouble = x.ValNumber }).ToList();
|
||||
|
||||
PressTS.Add("Main", PressMainTS);
|
||||
PressTS.Add("BH", PressBHTS);
|
||||
PressTS.Add("BL", PressBLTS);
|
||||
PressTS.Add("Main", PressMainTS);
|
||||
PressTS.Add("BH", PressBHTS);
|
||||
PressTS.Add("BL", PressBLTS);
|
||||
|
||||
PressAct.Add("Main", PressMainTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble);
|
||||
PressAct.Add("BH", PressBHTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble);
|
||||
PressAct.Add("BL", PressBLTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble);
|
||||
double actLevel = LevelTS.Count > 0 ? LevelTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0;
|
||||
double valMain = PressMainTS.Count > 0 ? PressMainTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0;
|
||||
double valBH = PressBHTS.Count > 0 ? PressBHTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0;
|
||||
double valBL = PressBLTS.Count > 0 ? PressBLTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0;
|
||||
|
||||
PlantDTO answ = new PlantDTO()
|
||||
{
|
||||
PlantId = PlantId,
|
||||
PlantCode = currPlant.PlantCode,
|
||||
PlantDesc = currPlant.PlantDesc,
|
||||
LevelAct = currPlant.LevelAct,
|
||||
LevelMax = currPlant.LevelMax,
|
||||
PressAct = PressAct,
|
||||
LevelTS = LevelTS,
|
||||
PressTS = PressTS,
|
||||
OrderTS = OrderTS
|
||||
};
|
||||
PressAct.Add("Main", valMain);
|
||||
PressAct.Add("BH", valBH);
|
||||
PressAct.Add("BL", valBL);
|
||||
|
||||
// popolo valolri
|
||||
answ = new PlantDTO()
|
||||
{
|
||||
PlantId = PlantId,
|
||||
PlantCode = currPlant.PlantCode,
|
||||
PlantDesc = currPlant.PlantDesc,
|
||||
LevelAct = actLevel,
|
||||
LevelMax = currPlant.LevelMax,
|
||||
LevelReorder = currPlant.LevelReorder,
|
||||
OrderQtyStd = currPlant.OrderQtyStd,
|
||||
PressAct = PressAct,
|
||||
LevelTS = LevelTS,
|
||||
PressTS = PressTS,
|
||||
OrderTS = OrderTS
|
||||
};
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserimento di un novo record x plant log
|
||||
/// Recupero da DB l'ultimo record per ogni flusso
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<PlantLogModel> PlantLogGetLastByFlux(int PlantId)
|
||||
{
|
||||
List<PlantLogModel> lastRec = dbCtx
|
||||
.DbSetPlantLog
|
||||
.Where(x => x.PlantId == PlantId)
|
||||
.OrderByDescending(o => o.DtEvent)
|
||||
.Take(1000)
|
||||
.AsEnumerable()
|
||||
.GroupBy(g => g.FluxType)
|
||||
.Select(s => s.First())
|
||||
.ToList();
|
||||
return lastRec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserimento di un set di record x plant log
|
||||
/// </summary>
|
||||
/// <param name="PlantLogModel">Record da inserire (senza ID...)</param>
|
||||
/// <returns></returns>
|
||||
public bool PlantLogInsertNew(List<PlantLogModel> newItems)
|
||||
{
|
||||
bool fatto = false;
|
||||
|
||||
//List<PlantLogModel> newList = new List<PlantLogModel>();
|
||||
|
||||
//foreach (var item in newItems)
|
||||
//{
|
||||
// newList.Add(new PlantLogModel()
|
||||
// {
|
||||
// DtEvent = item.DtEvent,
|
||||
// FluxType = item.FluxType,
|
||||
// PlantId = item.PlantId,
|
||||
// ValNumber = item.ValNumber,
|
||||
// ValString = item.ValString
|
||||
// });
|
||||
//}
|
||||
try
|
||||
{
|
||||
dbCtx
|
||||
.DbSetPlantLog
|
||||
.AddRange(newItems);
|
||||
//.AddRange(newList);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
fatto = true;
|
||||
}
|
||||
@@ -436,6 +598,22 @@ namespace GWMS.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public bool RecordRebootLog(RebootLogModel newItem)
|
||||
{
|
||||
bool done = false;
|
||||
try
|
||||
{
|
||||
dbCtx
|
||||
.DbRebootLog
|
||||
.Add(newItem);
|
||||
dbCtx.SaveChanges();
|
||||
done = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
return done;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rigenera intero DB se riceve ID di un plant SIM...
|
||||
/// </summary>
|
||||
|
||||
@@ -18,9 +18,12 @@ namespace GWMS.Data.DTO
|
||||
public string PlantCode { get; set; } = "";
|
||||
public string PlantDesc { get; set; } = "";
|
||||
|
||||
public double LevelMax { get; set; } = 9999;
|
||||
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
|
||||
{
|
||||
@@ -28,7 +31,7 @@ namespace GWMS.Data.DTO
|
||||
{
|
||||
int answ = 0;
|
||||
double denom = LevelMax == 0 ? 1 : LevelMax;
|
||||
answ = (int)(LevelAct *100/ denom);
|
||||
answ = (int)(LevelAct * 100 / denom);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,20 +26,23 @@ 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 LevelAct { get; set; } = 0;
|
||||
public double PressMax { get; set; } = 9999;
|
||||
public double LevelReorder { get; set; } = 0;
|
||||
|
||||
public double PressAct { get; set; } = 0;
|
||||
public double OrderQtyStd { get; set; } = 1000;
|
||||
|
||||
public double PressBHMax { get; set; } = 9999;
|
||||
//public double LastLevelMax { get; set; } = 0;
|
||||
|
||||
public double PressBHAct { get; set; } = 0;
|
||||
//public double PressAct { get; set; } = 0;
|
||||
|
||||
public double PressBLMax { get; set; } = 9999;
|
||||
//public double PressBHMax { get; set; } = 9999;
|
||||
|
||||
public double PressBLAct { get; set; } = 0;
|
||||
//public double PressBHAct { get; set; } = 0;
|
||||
|
||||
//public double PressBLMax { get; set; } = 9999;
|
||||
|
||||
//public double PressBLAct { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
|
||||
namespace GWMS.Data.DatabaseModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Tabella dati Plant (log storico)
|
||||
/// </summary>
|
||||
[Table("RebootLog")]
|
||||
public class RebootLogModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int RecordId { get; set; }
|
||||
|
||||
public DateTime DtEvent { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto di cui si registra il reboot log
|
||||
/// </summary>
|
||||
[MaxLength(250)]
|
||||
public string Item { get; set; } = "ND";
|
||||
|
||||
/// <summary>
|
||||
/// Payload associato (IP/Mac address)
|
||||
/// </summary>
|
||||
[MaxLength(250)]
|
||||
public string Payload { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -10,31 +10,16 @@ namespace GWMS.Data
|
||||
{
|
||||
public class DbAdmin : IDisposable
|
||||
{
|
||||
#if false
|
||||
private AdminContext adbCtx;
|
||||
#endif
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Singleton gestione
|
||||
/// </summary>
|
||||
public static DbAdmin man = new DbAdmin();
|
||||
#endif
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
public DbAdmin()
|
||||
{
|
||||
#if false
|
||||
// Initialize database context for ADMIN
|
||||
adbCtx = new AdminContext();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
@@ -46,16 +46,20 @@ namespace GWMS.Data
|
||||
return DbAdmin.checkCreateUser(DATABASE_USER, DATABASE_PWD);
|
||||
}
|
||||
|
||||
public static async Task<bool> ExecMigrationIdentity()
|
||||
public static bool ExecMigrationIdentity()
|
||||
{
|
||||
// esecuzione migrazione
|
||||
return await DbAdmin.migrateDbIdentity();
|
||||
var migrateTask = Task.Run(async () => await DbAdmin.migrateDbIdentity());
|
||||
migrateTask.Wait();
|
||||
return migrateTask.Result;
|
||||
}
|
||||
|
||||
public static async Task<bool> ExecMigrationMain()
|
||||
public static bool ExecMigrationMain()
|
||||
{
|
||||
// esecuzione migrazione
|
||||
return await DbAdmin.migrateDbMain();
|
||||
var migrateTask = Task.Run(async () => await DbAdmin.migrateDbMain());
|
||||
migrateTask.Wait();
|
||||
return migrateTask.Result;
|
||||
}
|
||||
|
||||
public static void InitDb(string server, string nKey, string sKey)
|
||||
|
||||
@@ -2,6 +2,47 @@
|
||||
|
||||
namespace GWMS.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Elenco dei tipi di valore gestiti da PLC (inizialmente SIEMENS)
|
||||
/// </summary>
|
||||
public enum plcDataType
|
||||
{
|
||||
/// <summary>
|
||||
/// Tipo boolean
|
||||
/// </summary>
|
||||
Boolean,
|
||||
|
||||
/// <summary>
|
||||
/// Tipo Int16 intero 16bit
|
||||
/// </summary>
|
||||
Int,
|
||||
|
||||
/// <summary>
|
||||
/// Tipo Int32 intero 32bit
|
||||
/// </summary>
|
||||
DInt,
|
||||
|
||||
/// <summary>
|
||||
/// Tipo UInt16, intero 16bit
|
||||
/// </summary>
|
||||
Word,
|
||||
|
||||
/// <summary>
|
||||
/// Tipo UInt32, intero Unsigned 32bit
|
||||
/// </summary>
|
||||
DWord,
|
||||
|
||||
/// <summary>
|
||||
/// Tipo REAL 32 bit
|
||||
/// </summary>
|
||||
Real,
|
||||
|
||||
/// <summary>
|
||||
/// Tipo stringa
|
||||
/// </summary>
|
||||
String
|
||||
}
|
||||
|
||||
public enum UserLevel
|
||||
{
|
||||
ND = 0,
|
||||
@@ -10,4 +51,30 @@ namespace GWMS.Data
|
||||
User = 3,
|
||||
UserExt = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia di elaborazione/funzione da applicare a VC
|
||||
/// </summary>
|
||||
public enum VC_func
|
||||
{
|
||||
/// <summary>
|
||||
/// Valore puntuale
|
||||
/// </summary>
|
||||
POINT = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Valore medio del periodo
|
||||
/// </summary>
|
||||
AVG,
|
||||
|
||||
/// <summary>
|
||||
/// Valore massimo del periodo
|
||||
/// </summary>
|
||||
MAX,
|
||||
|
||||
/// <summary>
|
||||
/// Valore minimo del periodo
|
||||
/// </summary>
|
||||
MIN
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,4 @@
|
||||
<PackageReference Include="NLog" Version="4.7.10" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -28,20 +28,31 @@ namespace GWMS.Data
|
||||
public GWMSContext(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
// se non ci fosse... crea!
|
||||
Database.EnsureCreated();
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
}
|
||||
|
||||
public GWMSContext(DbContextOptions<GWMSContext> options) : base(options)
|
||||
{
|
||||
// se non ci fosse... crea!
|
||||
Database.EnsureCreated();
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public virtual DbSet<RebootLogModel> DbRebootLog { get; set; }
|
||||
public virtual DbSet<ConfigModel> DbSetConfig { get; set; }
|
||||
|
||||
public virtual DbSet<ItemModel> DbSetItems { get; set; }
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GWMS.Data
|
||||
{
|
||||
public class IobObjects
|
||||
{
|
||||
#region Public Classes
|
||||
|
||||
/// <summary>
|
||||
/// Struttura conf tipo dati
|
||||
/// </summary>
|
||||
public class dataConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// DESCRIZIONE parametro
|
||||
/// </summary>
|
||||
public string description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Fattore per eventuale divisione (es leggo 1234 --> 12,34 con factor=100)
|
||||
/// </summary>
|
||||
public int factor { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Indice nell'area di memoria (da valore iniziale = 0)
|
||||
/// </summary>
|
||||
public int index { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Valore massimo ammesso (ove usato, es simulazione)
|
||||
/// </summary>
|
||||
public int maxVal { get; set; } = 9999;
|
||||
|
||||
/// <summary>
|
||||
/// Nome "assoluto" della posizione nell'area di memoria (anche diverso da indice)
|
||||
/// </summary>
|
||||
public string memAddr { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Valore minimo ammesso (ove usato, es simulazione)
|
||||
/// </summary>
|
||||
public int minVal { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// NOME parametro
|
||||
/// </summary>
|
||||
public string name { get; set; } = "none";
|
||||
|
||||
/// <summary>
|
||||
/// Size in byte
|
||||
/// </summary>
|
||||
public int size { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Tipo di dato
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public plcDataType tipoMem { get; set; } = plcDataType.Int;
|
||||
|
||||
/// <summary>
|
||||
/// Valore parametro (come stringa, decimali con ",", default VUOTO), poi LETTO da PLC (o appena scritto)
|
||||
/// </summary>
|
||||
public string value { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Struttura conf tipo dati
|
||||
/// </summary>
|
||||
public class dataConfTSVC : dataConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Tipo di funzione da applicare al dato
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public VC_func func { get; set; } = VC_func.MAX;
|
||||
|
||||
/// <summary>
|
||||
/// Periodo campionamento
|
||||
/// </summary>
|
||||
public int period { get; set; } = 60;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tracciato InputEvents in formato JSON valido
|
||||
/// Derivato da input realtime valore=3&dtEve=20181206180600000&dtCurr=20181206180600000&cnt=999
|
||||
/// </summary>
|
||||
public class evData
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Contatore incrementale x riordino invio (opzionale)
|
||||
/// </summary>
|
||||
public int cnt { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// DataOra corrente della trasmissione
|
||||
/// </summary>
|
||||
public DateTime dtCurr { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// DataOra evento
|
||||
/// </summary>
|
||||
public DateTime dtEve { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Valore del dato di flusso registrato
|
||||
/// </summary>
|
||||
public string valore { get; set; } = "-";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Array valori tipo evData inviati come JSon
|
||||
/// </summary>
|
||||
public class evJsonPayload
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public List<evData> eventList { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tracciato FluxLog in formato JSON valido
|
||||
/// </summary>
|
||||
public class flogData : evData
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// nome del flusso
|
||||
/// </summary>
|
||||
public string flux { get; set; } = "ND";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Array valori tipo flogData inviati come JSon
|
||||
/// </summary>
|
||||
public class flogJsonPayload
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public List<flogData> fluxData { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe gestione ITEM di un OBJ (machine) generico (read/write)
|
||||
/// </summary>
|
||||
public class objItem
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Ultimo messaggio associato (conferma scrittura, errore, ...)
|
||||
/// </summary>
|
||||
public string lastMessage { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// DataOra ultima lettura
|
||||
/// </summary>
|
||||
public DateTime lastRead { get; set; } = DateTime.Now.AddHours(-1);
|
||||
|
||||
/// <summary>
|
||||
/// DataOra ultima richiesta scrittura
|
||||
/// </summary>
|
||||
public DateTime lastRequest { get; set; } = DateTime.Now.AddDays(-1);
|
||||
|
||||
/// <summary>
|
||||
/// NOME item
|
||||
/// </summary>
|
||||
public string name { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indica il NUOVO valore richiesto x l'item
|
||||
/// </summary>
|
||||
public string reqValue { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// UID univoco
|
||||
/// </summary>
|
||||
public string uid { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Valore parametro (come stringa, decimali con ",", default VUOTO), sul CNC/PLC
|
||||
/// </summary>
|
||||
public string value { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indica se sia abilitato in scrittura (WRITE)
|
||||
/// </summary>
|
||||
public bool writable { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Struttura conf memorie PLC (inizialmente SIEMENS)
|
||||
/// </summary>
|
||||
public class plcMemMap
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Parametri ammessi per IOB x lettura
|
||||
/// = new Dictionary<string, dataConfTSVC>();
|
||||
/// </summary>
|
||||
public Dictionary<string, dataConfTSVC> mMapRead { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Parametri ammessi per IOB x scrittura
|
||||
/// = new Dictionary<string, dataConf>();
|
||||
/// </summary>
|
||||
public Dictionary<string, dataConf> mMapWrite { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,910 @@
|
||||
// <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("20210802085127_RebootLog")]
|
||||
partial class RebootLog
|
||||
{
|
||||
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>("LevelAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("PlantCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("PlantDesc")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<double>("PressAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBHAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBHMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBLAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBLMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.HasKey("PlantId");
|
||||
|
||||
b.ToTable("PlantDetail");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
PlantId = 1,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 28000.0,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 2,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 28000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 3,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 24000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 4,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 24000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
});
|
||||
});
|
||||
|
||||
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, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3264),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
new
|
||||
{
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3842),
|
||||
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,68 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
public partial class RebootLog : Migration
|
||||
{
|
||||
#region Protected Methods
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "RebootLog");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 6, 25, 16, 15, 35, 940, DateTimeKind.Local).AddTicks(7402));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 6, 25, 16, 15, 35, 940, DateTimeKind.Local).AddTicks(8022));
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RebootLog",
|
||||
columns: table => new
|
||||
{
|
||||
RecordId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DtEvent = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
Item = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Payload = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RebootLog", x => x.RecordId);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3264));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3842));
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,868 @@
|
||||
// <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("20210806134012_PlantData_AddLevelReoder")]
|
||||
partial class PlantData_AddLevelReoder
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64)
|
||||
.HasAnnotation("ProductVersion", "5.0.7");
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.AnKeyValModel", b =>
|
||||
{
|
||||
b.Property<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<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,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 2,
|
||||
LevelMax = 28000.0,
|
||||
LevelReorder = 15000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 3,
|
||||
LevelMax = 24000.0,
|
||||
LevelReorder = 15000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 4,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.PlantLogModel", b =>
|
||||
{
|
||||
b.Property<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, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
new
|
||||
{
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901),
|
||||
TransporterCode = "TRAF",
|
||||
TransporterDesc = "Traffik"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GWMS.Data.DatabaseModels.UserModel", b =>
|
||||
{
|
||||
b.Property<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,174 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace GWMS.Data.Migrations
|
||||
{
|
||||
public partial class PlantData_AddLevelReoder : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LevelAct",
|
||||
table: "PlantDetail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PressAct",
|
||||
table: "PlantDetail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PressBHAct",
|
||||
table: "PlantDetail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PressBHMax",
|
||||
table: "PlantDetail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PressBLAct",
|
||||
table: "PlantDetail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PressBLMax",
|
||||
table: "PlantDetail");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PressMax",
|
||||
table: "PlantDetail",
|
||||
newName: "LevelReorder");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 1,
|
||||
columns: new[] { "LevelMax", "LevelReorder" },
|
||||
values: new object[] { 26000.0, 15000.0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 2,
|
||||
column: "LevelReorder",
|
||||
value: 15000.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 3,
|
||||
column: "LevelReorder",
|
||||
value: 15000.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 4,
|
||||
columns: new[] { "LevelMax", "LevelReorder" },
|
||||
values: new object[] { 26000.0, 15000.0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9521));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 6, 15, 40, 12, 341, DateTimeKind.Local).AddTicks(9901));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "LevelReorder",
|
||||
table: "PlantDetail",
|
||||
newName: "PressMax");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "LevelAct",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "PressAct",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "PressBHAct",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "PressBHMax",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "PressBLAct",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "PressBLMax",
|
||||
table: "PlantDetail",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 1,
|
||||
columns: new[] { "LevelMax", "PressBHMax", "PressBLMax", "PressMax" },
|
||||
values: new object[] { 28000.0, 270.0, 270.0, 19.0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 2,
|
||||
columns: new[] { "PressBHMax", "PressBLMax", "PressMax" },
|
||||
values: new object[] { 270.0, 270.0, 19.0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 3,
|
||||
columns: new[] { "PressBHMax", "PressBLMax", "PressMax" },
|
||||
values: new object[] { 270.0, 270.0, 19.0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PlantDetail",
|
||||
keyColumn: "PlantId",
|
||||
keyValue: 4,
|
||||
columns: new[] { "LevelMax", "PressBHMax", "PressBLMax", "PressMax" },
|
||||
values: new object[] { 24000.0, 270.0, 270.0, 19.0 });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 1,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3264));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Transporter",
|
||||
keyColumn: "TransporterId",
|
||||
keyValue: 2,
|
||||
column: "PositionUpdated",
|
||||
value: new DateTime(2021, 8, 2, 10, 51, 27, 549, DateTimeKind.Local).AddTicks(3842));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)");
|
||||
@@ -183,10 +189,13 @@ namespace GWMS.Data.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("LevelAct")
|
||||
b.Property<double>("LevelMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("LevelMax")
|
||||
b.Property<double>("LevelReorder")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("OrderQtyStd")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("PlantCode")
|
||||
@@ -197,24 +206,6 @@ namespace GWMS.Data.Migrations
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("varchar(250)");
|
||||
|
||||
b.Property<double>("PressAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBHAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBHMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBLAct")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressBLMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PressMax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.HasKey("PlantId");
|
||||
|
||||
b.ToTable("PlantDetail");
|
||||
@@ -223,58 +214,38 @@ namespace GWMS.Data.Migrations
|
||||
new
|
||||
{
|
||||
PlantId = 1,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 28000.0,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ03",
|
||||
PlantDesc = "Collecchio",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
PlantDesc = "Collecchio"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 2,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 28000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ04",
|
||||
PlantDesc = "Noceto",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
PlantDesc = "Noceto"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 3,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 24000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ05",
|
||||
PlantDesc = "Baganzola",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
PlantDesc = "Baganzola"
|
||||
},
|
||||
new
|
||||
{
|
||||
PlantId = 4,
|
||||
LevelAct = 0.0,
|
||||
LevelMax = 24000.0,
|
||||
LevelMax = 26000.0,
|
||||
LevelReorder = 15000.0,
|
||||
OrderQtyStd = 18000.0,
|
||||
PlantCode = "PIZ08",
|
||||
PlantDesc = "Pilastrello",
|
||||
PressAct = 0.0,
|
||||
PressBHAct = 0.0,
|
||||
PressBHMax = 270.0,
|
||||
PressBLAct = 0.0,
|
||||
PressBLMax = 270.0,
|
||||
PressMax = 19.0
|
||||
PlantDesc = "Pilastrello"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -332,6 +303,28 @@ namespace GWMS.Data.Migrations
|
||||
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")
|
||||
@@ -398,7 +391,7 @@ namespace GWMS.Data.Migrations
|
||||
TransporterId = 1,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 6, 25, 16, 15, 35, 940, DateTimeKind.Local).AddTicks(7402),
|
||||
PositionUpdated = new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9092),
|
||||
TransporterCode = "LEVO",
|
||||
TransporterDesc = "Levorato"
|
||||
},
|
||||
@@ -407,7 +400,7 @@ namespace GWMS.Data.Migrations
|
||||
TransporterId = 2,
|
||||
PositionLatitude = 0.0,
|
||||
PositionLongitude = 0.0,
|
||||
PositionUpdated = new DateTime(2021, 6, 25, 16, 15, 35, 940, DateTimeKind.Local).AddTicks(8022),
|
||||
PositionUpdated = new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9470),
|
||||
TransporterCode = "TRAF",
|
||||
TransporterDesc = "Traffik"
|
||||
});
|
||||
|
||||
@@ -37,10 +37,14 @@ namespace GWMS.Data
|
||||
|
||||
// inizializzazione dei valori di default x Plant
|
||||
modelBuilder.Entity<PlantDetailModel>().HasData(
|
||||
new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
|
||||
new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
|
||||
new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 },
|
||||
new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }
|
||||
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 },
|
||||
//new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 26000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }
|
||||
);
|
||||
|
||||
// inizializzazione dei valori di default x Fornitori
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
DROP PROCEDURE IF EXISTS DecimateLog;
|
||||
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE PROCEDURE DecimateLog(
|
||||
pStartDate DATETIME,
|
||||
pPlantId INT,
|
||||
pMinInt INT,
|
||||
pFluxType VARCHAR(250)
|
||||
)
|
||||
BEGIN
|
||||
|
||||
DECLARE pCounter INT DEFAULT 1;
|
||||
DECLARE pDt DATETIME DEFAULT pStartDate;
|
||||
DECLARE pMaxStep INT DEFAULT 1;
|
||||
|
||||
WHILE pDt <= DATE_ADD(NOW(), INTERVAL -pMinInt MINUTE) DO
|
||||
#SELECT pDt;
|
||||
CALL DeletePlantLogrecords(pDt, pPlantId, pMinInt, pFluxType);
|
||||
SET pCounter = pCounter + 1;
|
||||
SET pDt = DATE_ADD(pDt, INTERVAL pMinInt MINUTE);
|
||||
END WHILE;
|
||||
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
USE GWMS_PZZFRR;
|
||||
DROP PROCEDURE IF EXISTS DeletePlantLogrecords;
|
||||
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE PROCEDURE DeletePlantLogrecords(
|
||||
IN pStartDate DATETIME,
|
||||
IN pPlantId INT,
|
||||
IN pMinInt INT,
|
||||
IN pFluxType VARCHAR(250)
|
||||
)
|
||||
BEGIN
|
||||
|
||||
# calcolo il primo record dalla data indicata
|
||||
DECLARE pDt DATETIME DEFAULT pStartDate;
|
||||
|
||||
SET pDt=
|
||||
(
|
||||
SELECT DtEvent
|
||||
FROM PlantLog
|
||||
WHERE PlantId = pPlantId
|
||||
AND FluxType = pFluxType
|
||||
AND DtEvent > pStartDate
|
||||
ORDER BY DtEvent
|
||||
LIMIT 1
|
||||
) + INTERVAL 10 SECOND;
|
||||
|
||||
#SELECT pDt;
|
||||
|
||||
# calcolo TUTTI i record successivi (da eliminare)
|
||||
DELETE
|
||||
FROM PlantLog
|
||||
WHERE PlantId = pPlantId
|
||||
AND FluxType = pFluxType
|
||||
AND DtEvent > pDt AND DtEvent < (pStartDate + INTERVAL pMinInt MINUTE)
|
||||
;
|
||||
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -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,131 @@
|
||||
</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-3">
|
||||
<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-3 pl-0">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><span class="fas fa-database" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
<InputNumber @bind-Value="@_currItem.LevelStart" class="form-control"></InputNumber>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">inizio</span>
|
||||
</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-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 class="col-3 pl-0">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><span class="fas fa-database" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
<InputNumber @bind-Value="@_currItem.LevelEnd" class="form-control"></InputNumber>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">fine</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<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>
|
||||
}
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,6 +189,7 @@
|
||||
@code {
|
||||
|
||||
private List<SupplierModel> suppList;
|
||||
private List<TransporterModel> transpList;
|
||||
|
||||
protected OrderModel _currItem = new OrderModel();
|
||||
protected int _supplierId { get; set; } = 0;
|
||||
@@ -97,6 +207,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
private bool editAll { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
@@ -135,6 +247,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 +271,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>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
@if (@_currItem != null)
|
||||
{
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item active">
|
||||
<h3 class="textCondensed mb-0">@OrderCode</h3>
|
||||
</li>
|
||||
<li class="list-group-item"><i>@_currItem.OrderDesc</i></li>
|
||||
@if (plantCorrect)
|
||||
{
|
||||
<li class="list-group-item h2">
|
||||
<i class="fas fa-weight-hanging"></i>
|
||||
<b>@_currItem.OrderQty.ToString("N0")</b> kg
|
||||
</li>
|
||||
@if (showStart)
|
||||
{
|
||||
<li class="list-group-item">
|
||||
<button class="btn btn-lg btn-block btn-success" @onclick="() => RefillStart()" title="Inizio Carico"><i class="fas fa-play"></i> Inizio Carico</button>
|
||||
</li>
|
||||
}
|
||||
@if (showEnd)
|
||||
{
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<li class="list-group-item">
|
||||
<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>
|
||||
</li>
|
||||
</EditForm>
|
||||
<li class="list-group-item">
|
||||
<button class="btn btn-lg btn-block btn-warning" @onclick="() => RefillEnd()" title="Fine Carico"><i class="fas fa-stop"></i> Fine Carico</button>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using GWMS.UI.Components;
|
||||
using GWMS.UI.Data;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
|
||||
namespace GWMS.UI.Components
|
||||
{
|
||||
public partial class OrderLoad : ComponentBase
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private PlantDTO currPlantData = null;
|
||||
private List<PlantDTO> plantsData = new List<PlantDTO>();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected OrderModel _currItem = new OrderModel();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// verifica correttezza plant/ordine
|
||||
/// </summary>
|
||||
protected bool plantCorrect
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = !string.IsNullOrEmpty(_orderCode);
|
||||
try
|
||||
{
|
||||
if (answ)
|
||||
{
|
||||
answ = _orderCode.StartsWith($"O{currPlantData.PlantCode}");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected bool showEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = (PlantId > 0);
|
||||
if (answ)
|
||||
{
|
||||
if (_currItem != null)
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
answ = _currItem.DtExecStart.Year > 1 && _currItem.DtExecEnd.Year <= 1;
|
||||
// se visibile --> calcolo valore execution!
|
||||
if (answ && _currItem.ExecutionQty < 1)
|
||||
{
|
||||
_currItem.ExecutionQty = Math.Ceiling((currPlantData.LevelAct - _currItem.LevelStart) / 100) * 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected bool showStart
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = (PlantId > 0);
|
||||
if (answ)
|
||||
{
|
||||
if (_currItem != null)
|
||||
{
|
||||
answ = _currItem.DtExecStart.Year <= 1;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string _orderCode { get; set; } = "";
|
||||
|
||||
public int _plantId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public OrderModel currItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
_currItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string OrderCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _orderCode;
|
||||
}
|
||||
set
|
||||
{
|
||||
_orderCode = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public int PlantId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _plantId;
|
||||
}
|
||||
set
|
||||
{
|
||||
_plantId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
plantsData = await DataService.PlantsGetAll();
|
||||
// recupero dato del plant corrente
|
||||
currPlantData = plantsData.Where(x => x.PlantId == PlantId).FirstOrDefault();
|
||||
// solo se ho valore QR selezionato
|
||||
if (!string.IsNullOrEmpty(OrderCode))
|
||||
{
|
||||
currItem = await DataService.OrderGetByCode(OrderCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
currItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void RefillEnd()
|
||||
{
|
||||
if (currPlantData != null)
|
||||
{
|
||||
// aggiorno il record corrente con livello e dataora inizio carico...
|
||||
_currItem.LevelEnd = currPlantData.LevelAct;
|
||||
_currItem.DtExecEnd = DateTime.Now;
|
||||
}
|
||||
|
||||
// salvo...
|
||||
DataService.OrderUpdate(_currItem);
|
||||
}
|
||||
|
||||
protected void RefillStart()
|
||||
{
|
||||
if (currPlantData != null)
|
||||
{
|
||||
// aggiorno il record corrente con livello e dataora inizio carico...
|
||||
_currItem.LevelStart = currPlantData.LevelAct;
|
||||
_currItem.DtExecStart = DateTime.Now;
|
||||
}
|
||||
|
||||
// salvo...
|
||||
DataService.OrderUpdate(_currItem);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -2,47 +2,47 @@
|
||||
@using GWMS.UI.Components
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary h1 py-1">
|
||||
<div class="card-header table-primary py-1">
|
||||
@if (currItem != null)
|
||||
{
|
||||
<div class="row py-0">
|
||||
<div class="col-6">
|
||||
<b>@currItem.PlantCode</b>
|
||||
<div class="col-5 pr-0 font-weight-bold">
|
||||
<h2>@currItem.PlantCode</h2>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@currItem.PlantDesc
|
||||
<div class="col-7 text-right">
|
||||
<h4>@currItem.PlantDesc</h4>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="row">
|
||||
<div class="col-5 pr-0">
|
||||
<div class="col-4 pr-0">
|
||||
<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>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Stoccaggio</span> <span><b>@currItem.PressAct["BH"].ToString("N1")</b>bar</span>
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Stoccaggio</span> <span><b>@getPressData("BH", "N1")</b> <sub>bar</sub></span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Alimentazione</span> <span><b>@currItem.PressAct["BH"].ToString("N1")</b>bar</span>
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Alimentazione</span> <span><b>@getPressData("BHA", "N1")</b> <sub>bar</sub></span>
|
||||
</li>
|
||||
<li class="list-group-item active d-flex justify-content-between align-items-center py-1">PB Bassa</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Stoccaggio</span> <span><b>@currItem.PressAct["BL"].ToString("N1")</b>bar</span>
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Stoccaggio</span> <span><b>@getPressData("BL", "N1")</b> <sub>bar</sub></span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center small">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Alimentazione</span> <span><b>@currItem.PressAct["BL"].ToString("N1")</b>bar</span>
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Alimentazione</span> <span><b>@getPressData("BLA", "N1")</b> <sub>bar</sub></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<div class="col-8 pl-1">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="list-group">
|
||||
@@ -66,10 +66,10 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-database"></i> Livello</span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b>%</span>
|
||||
<span><i class="fas fa-database"></i> Livello</span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Pressione</span> <span style="font-size:1.2em;"><b>@currItem.PressAct["Main"].ToString("N1")</b> <span class="small">bar</span></span>
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Pressione</span> <span style="font-size:1.2em;"><b>@currItem.PressAct["Main"].ToString("N1")</b> <span class="small"> <sub>bar</sub></span></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -79,8 +79,8 @@
|
||||
</div>
|
||||
<div class="card-footer alert alert-primary mb-0 p-1">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="py-1 px-2 h2 mb-0">
|
||||
Ordini aperti: <b>@currItem.OrderTS.Count</b>
|
||||
<div class="py-1 px-2 mb-0">
|
||||
<h4>Ordini aperti: <b>@currItem.OrderTS.Count</b></h4>
|
||||
</div>
|
||||
<div class="py-1 px-2">
|
||||
<button class="btn btn-block btn-primary" title="Mostra Ordini" @onclick="() => ShowOrders(currItem.PlantId)">Mostra Ordini <i class="fas fa-file-invoice"></i></button>
|
||||
|
||||
@@ -26,7 +26,11 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
new {
|
||||
Display = true,
|
||||
//type = "time"
|
||||
//type = "timeseries",
|
||||
//type = "time",
|
||||
//Time = new {
|
||||
// unit="day"
|
||||
//}
|
||||
}
|
||||
},
|
||||
YAxes = new object[]
|
||||
@@ -54,6 +58,11 @@ namespace GWMS.UI.Components
|
||||
AspectRatio = 2
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// fattore di riduzione x visualizzare meno punti (in base alla numerosità...
|
||||
/// </summary>
|
||||
protected int redFact = 1;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Properties
|
||||
@@ -121,13 +130,28 @@ namespace GWMS.UI.Components
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void fixRedFactor()
|
||||
{
|
||||
int answ = 1;
|
||||
int numCount = _currItem.LevelTS.Count;
|
||||
// passo a 2h se > 5 gg
|
||||
if (numCount > 120)
|
||||
answ = 2;
|
||||
// passo a 3h se > 10 gg
|
||||
else if (numCount > 240)
|
||||
answ = 3;
|
||||
redFact = answ;
|
||||
}
|
||||
|
||||
private LineChartDataset<double> GetLineChartDataset()
|
||||
{
|
||||
fixRedFactor();
|
||||
var answ = new LineChartDataset<double>
|
||||
{
|
||||
//Label = "Livello",
|
||||
Data = _currItem.LevelTS.Select(x => x.ValDouble).ToList(),
|
||||
Data = _currItem.LevelTS.Where((cat, index) => index % redFact == 0).Select(x => x.ValDouble).ToList(),
|
||||
BorderColor = getLineColors(1f),
|
||||
BackgroundColor = getFillColors(0.25f),
|
||||
Fill = true,
|
||||
PointRadius = 3,
|
||||
BorderWidth = 2,
|
||||
@@ -139,7 +163,8 @@ namespace GWMS.UI.Components
|
||||
|
||||
private List<string> GetLineChartLabels()
|
||||
{
|
||||
var answ = _currItem.LevelTS.Select(x => x.DtEvent.ToString("dd.MM HH")).ToList();
|
||||
fixRedFactor();
|
||||
var answ = _currItem.LevelTS.Where((cat, index) => index % redFact == 0).Select(x => x.DtEvent.ToString("dd/MM HH")).ToList();
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -148,7 +173,19 @@ namespace GWMS.UI.Components
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Genera colori sfondo 33% rosso / arancione / giallo
|
||||
/// Genera colori sfondo
|
||||
/// </summary>
|
||||
/// <param name="numRecords"></param>
|
||||
/// <returns></returns>
|
||||
protected List<string> getFillColors(float alpha)
|
||||
{
|
||||
List<string> answ = new List<string>();
|
||||
answ.Add(ChartColor.FromRgba(108, 164, 254, alpha));
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Genera colori linea
|
||||
/// </summary>
|
||||
/// <param name="numRecords"></param>
|
||||
/// <returns></returns>
|
||||
@@ -176,5 +213,19 @@ namespace GWMS.UI.Components
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public string getPressData(string valore, string formato)
|
||||
{
|
||||
string answ = "";
|
||||
if (currItem.PressAct.ContainsKey(valore))
|
||||
{
|
||||
answ = currItem.PressAct[valore].ToString(formato);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,13 +70,13 @@ namespace GWMS.UI.Controllers
|
||||
|
||||
// POST api/PlantLog
|
||||
[HttpPost]
|
||||
public ActionResult Post([FromBody] List<PlantLogModel> newItems)
|
||||
public async Task<ActionResult> Post([FromBody] List<PlantLogModel> newItems)
|
||||
{
|
||||
bool fatto = false;
|
||||
// verifico ci sia valore
|
||||
if (newItems != null)
|
||||
{
|
||||
fatto = _DataService.PlantLogInsert(newItems);
|
||||
fatto = await _DataService.PlantLogInsert(newItems);
|
||||
}
|
||||
if (fatto)
|
||||
{
|
||||
|
||||
@@ -14,6 +14,8 @@ using System.Diagnostics;
|
||||
using NLog;
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using static GWMS.Data.IobObjects;
|
||||
using System.Globalization;
|
||||
|
||||
namespace GWMS.UI.Data
|
||||
{
|
||||
@@ -88,20 +90,263 @@ namespace GWMS.UI.Data
|
||||
return new DistributedCacheEntryOptions().SetAbsoluteExpiration(DateTime.Now.AddSeconds(numSecAbsExp)).SetSlidingExpiration(TimeSpan.FromSeconds(numSecSliExp));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera PlantDTO e aggiorno valori attuali (se presente...)
|
||||
/// ATTENZIONE: i dati sono sempre ricevuti PER SINGOLO PlantId!!!
|
||||
/// </summary>
|
||||
/// <param name="newItems"></param>
|
||||
private async Task updateCurrDTO(List<PlantLogModel> newItems)
|
||||
{
|
||||
List<PlantDTO> dbResult = new List<PlantDTO>();
|
||||
int PlantId = newItems.FirstOrDefault().PlantId;
|
||||
string cacheKey = "DATA:PLANTS:ListDTO";
|
||||
string rawData;
|
||||
var redisDataList = await distributedCache.GetAsync(cacheKey);
|
||||
if (redisDataList != null)
|
||||
{
|
||||
rawData = Encoding.UTF8.GetString(redisDataList);
|
||||
dbResult = JsonConvert.DeserializeObject<List<PlantDTO>>(rawData);
|
||||
|
||||
// ora ciclo x ogni flusso/macchina l'ultimo record
|
||||
List<PlantLogModel> lastByFlux = newItems
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.GroupBy(g => g.FluxType)
|
||||
.Select(s => s.First())
|
||||
.ToList();
|
||||
// aggiorno il DTO x i valori trovati...
|
||||
var currDto = dbResult.Where(x => x.PlantId == PlantId).FirstOrDefault();
|
||||
|
||||
// verifico SE c'è Level
|
||||
var lastLev = lastByFlux.Where(x => x.FluxType == "Level").FirstOrDefault();
|
||||
if (lastLev != null)
|
||||
{
|
||||
currDto.LevelAct = lastLev.ValNumber;
|
||||
}
|
||||
|
||||
// verifico SE c'è MainPress
|
||||
var lastMain = lastByFlux.Where(x => x.FluxType == "MainPress").FirstOrDefault();
|
||||
if (lastMain != null)
|
||||
{
|
||||
if (currDto.PressAct.ContainsKey("Main"))
|
||||
{
|
||||
currDto.PressAct["Main"] = lastMain.ValNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
currDto.PressAct.Add("Main", lastMain.ValNumber);
|
||||
}
|
||||
}
|
||||
|
||||
// verifico SE c'è PressBH
|
||||
var lastBH = lastByFlux.Where(x => x.FluxType == "PressBH").FirstOrDefault();
|
||||
if (lastBH != null)
|
||||
{
|
||||
if (currDto.PressAct.ContainsKey("BH"))
|
||||
{
|
||||
currDto.PressAct["BH"] = lastBH.ValNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
currDto.PressAct.Add("BH", lastBH.ValNumber);
|
||||
}
|
||||
}
|
||||
|
||||
// verifico SE c'è PressBL
|
||||
var lastBL = lastByFlux.Where(x => x.FluxType == "PressBL").FirstOrDefault();
|
||||
if (lastBL != null)
|
||||
{
|
||||
if (currDto.PressAct.ContainsKey("BL"))
|
||||
{
|
||||
currDto.PressAct["BL"] = lastBL.ValNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
currDto.PressAct.Add("BL", lastBL.ValNumber);
|
||||
}
|
||||
}
|
||||
|
||||
// salvo DTO!
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDataList = Encoding.UTF8.GetBytes(rawData);
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Hash dati EXE TASK x la macchina specificata
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
protected static string exeTaskHash(string idxMacchina)
|
||||
{
|
||||
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>();
|
||||
// cerco in cache
|
||||
string cacheKey = $"DATA:PLANTS:LastFlux:{PlantId}";
|
||||
string rawData;
|
||||
var redisDataList = await distributedCache.GetAsync(cacheKey);
|
||||
if (redisDataList != null)
|
||||
{
|
||||
rawData = Encoding.UTF8.GetString(redisDataList);
|
||||
lastValues = JsonConvert.DeserializeObject<List<PlantLogModel>>(rawData);
|
||||
}
|
||||
// altrimenti DB e salvo...
|
||||
else
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
lastValues = dbController.PlantLogGetLastByFlux(PlantId);
|
||||
rawData = JsonConvert.SerializeObject(lastValues);
|
||||
redisDataList = Encoding.UTF8.GetBytes(rawData);
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true));
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Info($"Effettuata lettura da DB + caching per PlantLogGetLastByFlux: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
return await Task.FromResult(lastValues);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Hash Redis contenente i dati MP di una specifico TYPE (es StatusMacchina, StateMachineIngressi, ...)
|
||||
/// </summary>
|
||||
/// <param name="dataType"></param>
|
||||
/// <returns></returns>
|
||||
public static string mHash(string dataType)
|
||||
{
|
||||
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());
|
||||
@@ -129,6 +374,26 @@ namespace GWMS.UI.Data
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
public PlantLogModel convertFluxToPL(int plantId, flogData origData)
|
||||
{
|
||||
// cerco di ottenere un val in cifre
|
||||
double valDbl = 0;
|
||||
NumberStyles style = NumberStyles.Number;
|
||||
CultureInfo culture = CultureInfo.CreateSpecificCulture("it-IT");
|
||||
double.TryParse(origData.valore.Replace(".", ","), style, culture, out valDbl);
|
||||
TimeSpan delta = origData.dtCurr.Subtract(origData.dtEve);
|
||||
PlantLogModel answ = new PlantLogModel()
|
||||
{
|
||||
FluxType = origData.flux,
|
||||
ValNumber = valDbl,
|
||||
ValString = origData.valore,
|
||||
PlantId = plantId,
|
||||
DtEvent = DateTime.Now.Subtract(delta)
|
||||
};
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
public async Task<bool> HasPlantLog()
|
||||
{
|
||||
return await Task.FromResult(dbController.HasPlantLog());
|
||||
@@ -161,13 +426,68 @@ namespace GWMS.UI.Data
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restitusice elenco KVP dei TASK (da passare a IOB-WIN) per l'impianto indicato
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string, string>> mTaskMacchina(string idxMacchina)
|
||||
{
|
||||
// hard coded dimensione vettore DatiMacchine
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
// ORA recupero da memoria redis...
|
||||
try
|
||||
{
|
||||
string cacheKey = exeTaskHash(idxMacchina);
|
||||
string rawData;
|
||||
var redisDataList = await distributedCache.GetAsync(cacheKey);
|
||||
if (redisDataList != null)
|
||||
{
|
||||
rawData = Encoding.UTF8.GetString(redisDataList);
|
||||
answ = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Info($"Errore in recupero dati EXE TASK x Redis mTaskMacchina - idxMacchina {idxMacchina}{Environment.NewLine}{exc}");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public async void OrderDelete(OrderModel currItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
dbController.OrderDelete(currItem);
|
||||
invalidateAllCache();
|
||||
dbController.ResetController();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<OrderModel> OrderGetByCode(string OrderCode)
|
||||
{
|
||||
OrderModel dbResult = new OrderModel();
|
||||
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.GetOrderByCode(OrderCode);
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Info($"Effettuata lettura da DB per OrderGetByCode: {ts.TotalMilliseconds} ms");
|
||||
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
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");
|
||||
@@ -175,11 +495,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
|
||||
{
|
||||
@@ -212,9 +553,63 @@ namespace GWMS.UI.Data
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
public bool PlantLogInsert(List<PlantLogModel> newItems)
|
||||
public async Task<bool> PlantLogInsert(List<PlantLogModel> newItems)
|
||||
{
|
||||
return dbController.PlantLogInsertNew(newItems);
|
||||
bool fatto = false;
|
||||
// init valori
|
||||
int IntervalMin = 60;
|
||||
int.TryParse(_configuration["IntervalMin"], out IntervalMin);
|
||||
List<PlantLogModel> item2insert = new List<PlantLogModel>();
|
||||
int PlantId = newItems.FirstOrDefault().PlantId;
|
||||
// aggiorno valori ACT x DTO
|
||||
await updateCurrDTO(newItems);
|
||||
|
||||
// recupero ultimi inseriti
|
||||
List<PlantLogModel> lastValues = PlantLogGetLastByFlux(PlantId).Result;
|
||||
// verifico i flussi presenti tra quelli ricevuti
|
||||
List<string> fluxList = newItems
|
||||
.GroupBy(g => g.FluxType)
|
||||
.Select(s => s.First().FluxType)
|
||||
.ToList();
|
||||
foreach (var item in fluxList)
|
||||
{
|
||||
// cerco se c'è valore...
|
||||
var lastInserted = lastValues.Where(x => x.FluxType == item).FirstOrDefault();
|
||||
DateTime dateLimit = DateTime.Today.AddDays(-1);
|
||||
if (lastInserted != null)
|
||||
{
|
||||
// per ogni flusso calcolo il valore minimo x inserimento (arrotondando a minInt)
|
||||
dateLimit = dbController.DateRoundEnd(lastInserted.DtEvent, IntervalMin);
|
||||
}
|
||||
|
||||
// cerco se ho record > valore minimo x ogni flusso ricevuto
|
||||
List<PlantLogModel> insCandidates = newItems.Where(x => x.FluxType == item && x.DtEvent >= dateLimit).ToList();
|
||||
|
||||
while (insCandidates.Count > 0)
|
||||
{
|
||||
var newRec = insCandidates.First();
|
||||
// il primo lo accodo da inserire
|
||||
item2insert.Add(newRec);
|
||||
// calcolo nuovo veto
|
||||
dateLimit = dbController.DateRoundEnd(newRec.DtEvent, IntervalMin);
|
||||
// ...e se ho record accodo
|
||||
insCandidates = newItems.Where(x => x.FluxType == item && x.DtEvent >= dateLimit).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
// se ho record da inserire...
|
||||
if (item2insert.Count > 0)
|
||||
{
|
||||
// faccio vero insert
|
||||
fatto = dbController.PlantLogInsertNew(item2insert);
|
||||
|
||||
// invalido i vari valori in cache
|
||||
await distributedCache.RemoveAsync($"DATA:PLANTS:LastFlux:{PlantId}");
|
||||
await distributedCache.RemoveAsync($"DATA:PLANTS:ListDTO");
|
||||
}
|
||||
|
||||
// restituisco
|
||||
return await Task.FromResult(fatto);
|
||||
}
|
||||
|
||||
public async Task<List<PlantDTO>> PlantsGetAll()
|
||||
@@ -232,7 +627,9 @@ namespace GWMS.UI.Data
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.GetPlantsDTO();
|
||||
int maxRec = 100;
|
||||
int.TryParse(_configuration["MaxLogRecord"], out maxRec);
|
||||
dbResult = dbController.GetPlantsDTO(maxRec);
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDataList = Encoding.UTF8.GetBytes(rawData);
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true));
|
||||
@@ -243,11 +640,38 @@ namespace GWMS.UI.Data
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
public async Task<PlantDTO> PlantsGetByCode(string PlantCode)
|
||||
{
|
||||
PlantDTO answ = new PlantDTO();
|
||||
var ListRecords = await PlantsGetAll();
|
||||
var found = ListRecords.Where(x => x.PlantCode == PlantCode).FirstOrDefault();
|
||||
if (found != null)
|
||||
{
|
||||
answ = found;
|
||||
}
|
||||
return await Task.FromResult(answ);
|
||||
}
|
||||
|
||||
public void RebootLogInsert(RebootLogModel newItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
dbController.RecordRebootLog(newItem);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
public async Task<bool> RegenDB(int numDays, int stepMin = 30, int maxHourRate = 800)
|
||||
{
|
||||
return await Task.FromResult(dbController.RegenDB(1, numDays, stepMin, maxHourRate));
|
||||
}
|
||||
|
||||
public void ResetController()
|
||||
{
|
||||
dbController.ResetController();
|
||||
}
|
||||
|
||||
public void rollBackEdit(object item)
|
||||
{
|
||||
dbController.rollBackEntity(item);
|
||||
@@ -337,8 +761,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
|
||||
{
|
||||
@@ -365,8 +788,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
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace GWMS.UI.Data
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private SelectData _detailFilter = SelectData.Init(5, 7);
|
||||
private SelectData _detailFilter = SelectData.Init(5, 15);
|
||||
private string _pageIcon;
|
||||
private string _pageName;
|
||||
private string _searchVal;
|
||||
@@ -33,8 +33,6 @@ namespace GWMS.UI.Data
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public SelectData DDB_Filter { get; set; } = SelectData.Init(5, 3);
|
||||
|
||||
public SelectData DetailFilter
|
||||
{
|
||||
get => _detailFilter;
|
||||
@@ -52,10 +50,7 @@ namespace GWMS.UI.Data
|
||||
}
|
||||
}
|
||||
|
||||
public SelectData KRE_Filter { get; set; } = SelectData.Init(5, 7);
|
||||
public SelectData ODL_Filter { get; set; } = SelectData.Init(5, 7);
|
||||
public SelectData OEE_Filter { get; set; } = SelectData.Init(5, 7);
|
||||
public SelectOrderData Order_Filter { get; set; } = SelectOrderData.Init(5, 7);
|
||||
public SelectOrderData Order_Filter { get; set; } = SelectOrderData.Init(5, 30);
|
||||
|
||||
public string PageIcon
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.WebUtilities;
|
||||
|
||||
namespace GWMS.UI.Extensions
|
||||
{
|
||||
public static class NavigationManagerExtension
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Estensione metodo NavigationManager
|
||||
///
|
||||
/// https://code-maze.com/query-strings-blazor-webassembly/
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="navManager"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
public static T ExtractQueryStringByKey<T>(this NavigationManager navManager, string key)
|
||||
{
|
||||
var uri = navManager.ToAbsoluteUri(navManager.Uri);
|
||||
QueryHelpers.ParseQuery(uri.Query)
|
||||
.TryGetValue(key, out var queryValue);
|
||||
|
||||
if (typeof(T).Equals(typeof(int)))
|
||||
{
|
||||
int.TryParse(queryValue, out int result);
|
||||
return (T)(object)result;
|
||||
}
|
||||
|
||||
if (typeof(T).Equals(typeof(string)))
|
||||
return (T)(object)queryValue.ToString();
|
||||
|
||||
return default;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.0.2108.2410</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -22,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,18 +1,46 @@
|
||||
@page "/GasStation"
|
||||
@page "/GasStation/{OrderCode}"
|
||||
|
||||
@using Blazorise.Components
|
||||
@using GWMS.UI.Components
|
||||
@using BlazorBarcodeScanner.ZXing.JS
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary mb-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-9 col-lg-8 h3">
|
||||
Registrazione
|
||||
<div class="col-6 col-lg-8 h4">
|
||||
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>
|
||||
<div class="col-6 col-lg-2">
|
||||
@if (string.IsNullOrEmpty(OrderCode))
|
||||
{
|
||||
<button class="btn btn-sm btn-block btn-info" @onclick="() => ToggleShowCam()" title="reload"><i class="fas fa-camera"></i> show select</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-block btn-success" @onclick="() => ToggleBCode()" title="reload"><i class="fas fa-qrcode"></i> re-scan</button>
|
||||
}
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-gas-pump" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@SelPlantId" class="form-control form-control-sm">
|
||||
<option value="0">--- Tutti ---</option>
|
||||
@if (PlantsList != null)
|
||||
{
|
||||
foreach (var item in PlantsList)
|
||||
{
|
||||
<option value="@item.PlantId">@item.PlantCode | @item.PlantDesc</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,25 +50,45 @@
|
||||
</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 (SelPlantId == 0)
|
||||
{
|
||||
<h2 class="alert alert-danger">Manca Stazione</h2>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (string.IsNullOrEmpty(OrderCode))
|
||||
{
|
||||
<BlazorBarcodeScanner.ZXing.JS.BarcodeReader Title=""
|
||||
StartCameraAutomatically="true"
|
||||
ShowStart="false"
|
||||
ShowReset="false"
|
||||
ShowToggleTorch="false"
|
||||
ShowVideoDeviceList="@showCamera"
|
||||
ShowResult="false"
|
||||
OnBarcodeReceived="LocalReceivedBarcodeText" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<OrderLoad OrderCode="@OrderCode" PlantId="@SelPlantId"></OrderLoad>
|
||||
}
|
||||
}
|
||||
</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>
|
||||
</div>
|
||||
<div class="card-footer p-1">
|
||||
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>*@
|
||||
</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;
|
||||
@@ -14,51 +15,12 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private OrderModel currRecord = null;
|
||||
|
||||
private List<OrderModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<OrderModel> SearchRecords;
|
||||
private List<TransporterModel> TransportersList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int _currPage { get; set; } = 1;
|
||||
|
||||
private int _numRecord { get; set; } = 10;
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => _currPage;
|
||||
set
|
||||
{
|
||||
if (_currPage != value)
|
||||
{
|
||||
_currPage = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => _numRecord;
|
||||
set
|
||||
{
|
||||
if (_numRecord != value)
|
||||
{
|
||||
_numRecord = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int SelPlantId
|
||||
{
|
||||
get
|
||||
@@ -75,87 +37,19 @@ namespace GWMS.UI.Pages
|
||||
if (!MessageService.Order_Filter.PlantId.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.PlantId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int SelTranspId
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (MessageService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.TransporterId;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.TransporterId.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.TransporterId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool ShowCharts { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string _plantCode { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
protected DateTime DateEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(1);
|
||||
if (MessageService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.DateEnd;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.DateEnd.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.DateEnd = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime DateStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(-1);
|
||||
if (MessageService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.DateStart;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.DateStart.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.DateStart = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
@@ -165,141 +59,82 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
|
||||
protected bool showBcodeScan { get; set; } = false;
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (SearchRecords != null)
|
||||
{
|
||||
answ = SearchRecords.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
protected bool showCamera { get; set; } = false;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string BarcodeText { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string OrderCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return BarcodeText;
|
||||
}
|
||||
set
|
||||
{
|
||||
BarcodeText = $"{value}";
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string PlantCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _plantCode;
|
||||
}
|
||||
set
|
||||
{
|
||||
_plantCode = $"{value}";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
private void LocalReceivedBarcodeText(BarcodeReceivedEventArgs args)
|
||||
{
|
||||
DateEnd = (DateTime)date;
|
||||
}
|
||||
|
||||
private void OnDateStartChanged(DateTime? date)
|
||||
{
|
||||
DateStart = (DateTime)date;
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
SearchRecords = await DataService.OrdersGetFilt(MessageService.Order_Filter);
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
isLoading = false;
|
||||
// rimando a pagina con codice ordine....
|
||||
NavManager.NavigateTo($"GasStation/{args.BarcodeText}");
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Edit(OrderModel selRecord)
|
||||
{
|
||||
currRecord = selRecord;
|
||||
}
|
||||
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
}
|
||||
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Fornitore";
|
||||
MessageService.PageIcon = "fas fa-industry pr-2";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
MessageService.PageName = "Stazione";
|
||||
MessageService.PageIcon = "fas fa-gas-pump pr-2";
|
||||
PlantsList = await DataService.PlantsGetAll();
|
||||
TransportersList = await DataService.TransportersGetAll();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
{
|
||||
DataService.rollBackEdit(currRecord);
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
protected async Task ResetFilter(SelectOrderData newFilter)
|
||||
{
|
||||
currRecord = null;
|
||||
SearchRecords = null;
|
||||
ListRecords = null;
|
||||
MessageService.Order_Filter = SelectOrderData.Init(5, 7);
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected void Select(OrderModel selRecord)
|
||||
{
|
||||
// applico filtro da selezione
|
||||
currRecord = selRecord;
|
||||
}
|
||||
|
||||
protected void ToggleBCode()
|
||||
{
|
||||
showBcodeScan = !showBcodeScan;
|
||||
NavManager.NavigateTo("GasStation");
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
protected void ToggleShowCam()
|
||||
{
|
||||
currRecord = null;
|
||||
await ReloadData();
|
||||
showCamera = !showCamera;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public string checkSelect(int OrderId)
|
||||
{
|
||||
string answ = "";
|
||||
if (currRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currRecord.OrderId == OrderId) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
}
|
||||
|
||||
public async void OnSeachUpdated()
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
Task task = UpdateData();
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -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>
|
||||
|
||||
+58
-11
@@ -6,27 +6,56 @@
|
||||
<div class="card">
|
||||
<div class="card-header table-primary h3">
|
||||
<div class="row">
|
||||
<div class="col-3 h3">
|
||||
<div class="col-6 col-lg-2 h3">
|
||||
Elenco Ordini
|
||||
</div>
|
||||
<div class="col-9 text-right">
|
||||
<div class="col-6 col-lg-2 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
<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">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
</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">
|
||||
@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 class="col-12 col-lg-4 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="p-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
@@ -86,7 +115,7 @@
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-striped">
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
@@ -94,7 +123,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 +143,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.ToString("HH:mm:ss") --> @record.DtExecEnd.ToString("HH:mm:ss")</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,9 +240,40 @@ 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)
|
||||
{
|
||||
// rileggo dal DB il record corrente...
|
||||
#if false
|
||||
currRecord = selRecord;
|
||||
#endif
|
||||
var pUpd = Task.Run(async () => currRecord = await DataService.OrderGetByCode(selRecord.OrderCode));
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
protected void ForceReload(int newNum)
|
||||
@@ -221,6 +288,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 +309,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 +328,7 @@ namespace GWMS.UI.Pages
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
DataService.ResetController();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,41 +20,7 @@
|
||||
}
|
||||
</div>
|
||||
<div class="col-12">
|
||||
@*<div class="d-flex justify-content-between">
|
||||
<div class="p-2">
|
||||
<h4>Simulazione</h4>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">giorni</span>
|
||||
</div>
|
||||
<input @bind-value="@numDays" @bind-value:event="oninput" type="number" class="form-control" title="Giorni" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">step</span>
|
||||
</div>
|
||||
<input @bind-value="@stepMin" @bind-value:event="oninput" type="number" class="form-control" title="Step sim (minuti)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">cons orario max</span>
|
||||
</div>
|
||||
<input @bind-value="@maxHourRate" @bind-value:event="oninput" type="number" class="form-control" title="Consumo massimo orario" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<Button id="btnReset" class="btn btn-danger btn-block" Clicked="resetDB">
|
||||
<span class="oi oi-reload"></span> Regen DB Data
|
||||
</Button>
|
||||
</div>
|
||||
</div>*@
|
||||
<SetupSim />
|
||||
@*<SetupSim />*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="row">
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<div class="col-12 col-md-6 py-2">
|
||||
<div class="col-12 col-xl-6 py-2">
|
||||
<PlantDetail currItem="@record"></PlantDetail>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/Suppliers"
|
||||
@page "/Suppliers/{SupplierIdReq}"
|
||||
|
||||
@using Blazorise.Components
|
||||
@using GWMS.UI.Components
|
||||
@@ -6,27 +7,31 @@
|
||||
<div class="card">
|
||||
<div class="card-header table-primary h3">
|
||||
<div class="row">
|
||||
<div class="col-3 h3">
|
||||
<div class="col-12 col-lg-4 h3">
|
||||
Ordini Fornitore
|
||||
</div>
|
||||
<div class="col-9 text-right">
|
||||
<div class="col-12 col-lg-4 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="p-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
@@ -85,7 +90,7 @@
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-striped">
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,18 +4,25 @@
|
||||
@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>
|
||||
</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>
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="row">
|
||||
<div class="col-6 px-1">
|
||||
<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-4 px-1">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltTransp()"><i class="fas fa-truck-moving"></i> <i class="@icnFiltTran"></i></button>
|
||||
</div>*@
|
||||
<div class="col-6 px-1">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +42,6 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (showFiltDest)
|
||||
{
|
||||
<div class="row">
|
||||
@@ -58,26 +64,29 @@
|
||||
</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 class="row">
|
||||
<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">
|
||||
<option value="0">--- Tutti ---</option>
|
||||
@if (TransportersList != null)
|
||||
{
|
||||
foreach (var item in TransportersList)
|
||||
{
|
||||
<option value="@item.TransporterId">@item.TransporterCode | @item.TransporterDesc</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,8 +128,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>
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace GWMS.UI.Pages
|
||||
private List<OrderModel> ListRecords;
|
||||
private List<PlantDTO> PlantsList;
|
||||
private List<OrderModel> SearchRecords;
|
||||
|
||||
private List<TransporterModel> TransportersList;
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -43,6 +44,30 @@ 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 string icnFiltTran
|
||||
{
|
||||
get
|
||||
{
|
||||
return showFiltTrasp ? "fas fa-chevron-up" : "fas fa-chevron-down";
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private int numRecord
|
||||
@@ -74,6 +99,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();
|
||||
@@ -96,6 +122,7 @@ namespace GWMS.UI.Pages
|
||||
{
|
||||
if (!MessageService.Order_Filter.TransporterId.Equals(value))
|
||||
{
|
||||
currRecord = null;
|
||||
MessageService.Order_Filter.TransporterId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
@@ -103,8 +130,6 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private bool ShowCharts { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -168,15 +193,16 @@ namespace GWMS.UI.Pages
|
||||
protected bool showFiltDest { get; set; } = false;
|
||||
|
||||
protected bool showFiltTime { get; set; } = false;
|
||||
protected bool showFiltTrasp { get; set; } = false;
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (SearchRecords != null)
|
||||
if (ListRecords != null)
|
||||
{
|
||||
answ = SearchRecords.Count;
|
||||
answ = ListRecords.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -188,11 +214,13 @@ namespace GWMS.UI.Pages
|
||||
|
||||
private void OnDateEndChanged(DateTime? date)
|
||||
{
|
||||
currRecord = null;
|
||||
DateEnd = (DateTime)date;
|
||||
}
|
||||
|
||||
private void OnDateStartChanged(DateTime? date)
|
||||
{
|
||||
currRecord = null;
|
||||
DateStart = (DateTime)date;
|
||||
}
|
||||
|
||||
@@ -201,6 +229,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 +254,8 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
SelPlantId = 0;
|
||||
SelTranspId = 0;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Fornitore";
|
||||
MessageService.PageIcon = "fas fa-industry pr-2";
|
||||
@@ -263,6 +294,10 @@ namespace GWMS.UI.Pages
|
||||
protected void ToggleFiltDest()
|
||||
{
|
||||
showFiltDest = !showFiltDest;
|
||||
if (!showFiltDest)
|
||||
{
|
||||
SelPlantId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ToggleFiltPeriod()
|
||||
@@ -270,6 +305,11 @@ namespace GWMS.UI.Pages
|
||||
showFiltTime = !showFiltTime;
|
||||
}
|
||||
|
||||
protected void ToggleFiltTransp()
|
||||
{
|
||||
showFiltTrasp = !showFiltTrasp;
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected List<WeekPlanModel> SlotList(DayOfWeek Giorno, int Ora)
|
||||
{
|
||||
List<WeekPlanModel> result = new();
|
||||
List<WeekPlanModel> result = new List<WeekPlanModel>();
|
||||
|
||||
if (ListRecords != null && ListRecords.Count > 0)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
@*<meta name="viewport" content="width=device-width, initial-scale=1.0" />*@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>GWMS.UI</title>
|
||||
<base href="~/" />
|
||||
@*<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />*@
|
||||
@@ -27,7 +30,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 +54,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>
|
||||
@@ -1,28 +1,38 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:26659",
|
||||
"sslPort": 44339
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"GWMS.UI": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:5003;http://localhost:5002",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:26659",
|
||||
"sslPort": 44339
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"GWMS.UI": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": "true",
|
||||
"applicationUrl": "https://localhost:5003;http://localhost:5002"
|
||||
},
|
||||
"WSL 2": {
|
||||
"commandName": "WSL2",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "https://localhost:5003",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_URLS": "https://localhost:5003;http://localhost:5002",
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"distributionName": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@
|
||||
@implements IDisposable
|
||||
|
||||
<div class="page">
|
||||
<div class="sidebar">
|
||||
<NavMenu />
|
||||
<div class="@sideClass">
|
||||
<NavMenu EC_compressUpdated="@UpdateNavDisplay" />
|
||||
</div>
|
||||
|
||||
<CascadingValue Name="ShowSearch" Value=@ShowSearch>
|
||||
@@ -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">
|
||||
@@ -56,4 +56,14 @@
|
||||
MessageService.EA_ShowSearch -= OnHideSearch;
|
||||
}
|
||||
|
||||
protected bool navLarge { get; set; } = true;
|
||||
|
||||
protected string sideClass { get; set; } = "sidebar";
|
||||
|
||||
protected void UpdateNavDisplay()
|
||||
{
|
||||
navLarge = !navLarge;
|
||||
sideClass = navLarge ? "sidebar" : "sidebarSmall";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
.sidebar, .sidebarSmall {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%);
|
||||
}
|
||||
|
||||
@@ -77,6 +77,13 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.sidebarSmall {
|
||||
width: 80px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">
|
||||
<div class="row">
|
||||
<div class="col-2 px-0">
|
||||
<img src="./img/LogoBlu.svg" class="img-fluid" width="128" />
|
||||
</div>
|
||||
<div class="col-10 h4">
|
||||
MAPO.GWMS
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="top-row pl-3 navbar navbar-dark">
|
||||
<div class="text-nowrap">
|
||||
@if (showText)
|
||||
{
|
||||
<a class="navbar-brand" @onclick="() => ToggleCompress()" title="Comprimi">
|
||||
<img src="./img/LogoBlu.svg" class="img-fluid" width="32" />
|
||||
@*<i class="fas fa-chevron-left"></i>*@
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="navbar-brand" @onclick="() => ToggleCompress()" title="Comprimi">
|
||||
<img src="./img/LogoBlu.svg" class="img-fluid" width="32" />
|
||||
@*<i class="fas fa-chevron-right"></i>*@
|
||||
</a>
|
||||
}
|
||||
<a class="navbar-brand" href="">
|
||||
<span class="@hideText">MAPO.GWMS</span>
|
||||
</a>
|
||||
</div>
|
||||
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -16,57 +25,67 @@
|
||||
|
||||
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Home">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="fas fa-home pr-2" aria-hidden="true"></span> Home
|
||||
<span class="fas fa-home pr-2" aria-hidden="true"></span>
|
||||
<span class="@hideText">Home</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Stato Impianti">
|
||||
<NavLink class="nav-link" href="PlantStatus">
|
||||
<i class="fas fa-tachometer-alt pr-2"></i> Stato Impianti
|
||||
<i class="fas fa-tachometer-alt pr-2"></i>
|
||||
<span class="@hideText">Stato Impianti</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Storico Ordini">
|
||||
<NavLink class="nav-link" href="Orders">
|
||||
<i class="fas fa-file-invoice pr-2" aria-hidden="true"></i> Storico Ordini
|
||||
<i class="fas fa-file-invoice pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Storico Ordini</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Scheda Fornitore">
|
||||
<NavLink class="nav-link" href="Suppliers">
|
||||
<i class="fas fa-industry pr-2" aria-hidden="true"></i> Scheda Fornitore
|
||||
<i class="fas fa-industry pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Scheda Fornitore</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Scheda Trasportatore">
|
||||
<NavLink class="nav-link" href="Transporters">
|
||||
<i class="fas fa-truck-moving pr-2" aria-hidden="true"></i> Scheda Trasportatore
|
||||
<i class="fas fa-truck-moving pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Scheda Trasportatore</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Scheda Stazione">
|
||||
<NavLink class="nav-link" href="GasStation">
|
||||
<i class="fas fa-gas-pump pr-2" aria-hidden="true"></i> Scheda Stazione
|
||||
<i class="fas fa-gas-pump pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Scheda Stazione</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Planner Consegne">
|
||||
<NavLink class="nav-link" href="WeekPlan">
|
||||
<i class="fas fa-calendar pr-2" aria-hidden="true"></i> Planner Consegne
|
||||
<i class="fas fa-calendar pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Planner Consegne</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<li class="nav-item px-3" title="Utenti">
|
||||
<NavLink class="nav-link" href="UserManager">
|
||||
<i class="fas fa-users pr-2" aria-hidden="true"></i> Utenti
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="Scheduler">
|
||||
<i class="fas fa-calendar-alt pr-2" aria-hidden="true"></i> Job Scheduler
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="Parameters">
|
||||
<i class="fas fa-wrench pr-2" aria-hidden="true"></i> Setup Parametri
|
||||
<i class="fas fa-users pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Utenti</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
@*<li class="nav-item px-3" title="Job Scheduler">
|
||||
<NavLink class="nav-link" href="Scheduler">
|
||||
<i class="fas fa-calendar-alt pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Job Scheduler</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3" title="Setup Parametri">
|
||||
<NavLink class="nav-link" href="Parameters">
|
||||
<i class="fas fa-wrench pr-2" aria-hidden="true"></i>
|
||||
<span class="@hideText">Setup Parametri</span>
|
||||
</NavLink>
|
||||
</li>*@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -79,4 +98,20 @@
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
|
||||
protected bool showText { get; set; } = true;
|
||||
|
||||
protected void ToggleCompress()
|
||||
{
|
||||
showText = !showText;
|
||||
EC_compressUpdated.InvokeAsync(showText);
|
||||
}
|
||||
|
||||
protected string hideText
|
||||
{
|
||||
get => showText ? "" : "invisible";
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_compressUpdated { get; set; }
|
||||
}
|
||||
+14
-1
@@ -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();
|
||||
|
||||
@@ -113,6 +122,9 @@ namespace GWMS.UI
|
||||
DbConfig.InitDb(dbServerAddr, nKey, sKey);
|
||||
// inizializzo il DB e creo (se necessario) l'utente
|
||||
DbConfig.CheckUser(nKey, sKey);
|
||||
// verifico se serve applicazione migrazioni
|
||||
//DbConfig.ExecMigrationMain();
|
||||
//DbConfig.ExecMigrationIdentity();
|
||||
|
||||
// altri parametri per check vari
|
||||
string connStringDB = DbConfig.CONNECTION_STRING;
|
||||
@@ -190,7 +202,8 @@ namespace GWMS.UI
|
||||
services.AddSingleton<IConfiguration>(Configuration);
|
||||
//services.AddTransient<Services.BlazorTimer>();
|
||||
|
||||
services.AddSingleton<GWMSDataService>();
|
||||
//services.AddSingleton<GWMSDataService>();
|
||||
services.AddScoped<GWMSDataService>();
|
||||
services.AddScoped<MessageService>();
|
||||
|
||||
#if false
|
||||
|
||||
@@ -9,21 +9,23 @@
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "localhost:6379",
|
||||
//"AuthConnection": "Server=10.74.83.98;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
//"DefaultConnection": "Server=10.74.83.98;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
//"AdminConnection": "Server=10.74.83.98;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
//"GWMS.Data": "Server=10.74.83.98;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
//"AuthConnection": "Server=10.74.83.97;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
//"DefaultConnection": "Server=10.74.83.97;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
//"AdminConnection": "Server=10.74.83.97;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
//"GWMS.Data": "Server=10.74.83.97;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"DefaultConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"AdminConnection": "Server=localhost;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
"GWMS.Data": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
},
|
||||
"DbConfig": {
|
||||
//"Server": "10.74.83.98",
|
||||
//"Server": "10.74.83.97",
|
||||
"Server": "localhost",
|
||||
"nKey": "PZZFRR",
|
||||
"sKey": "M3T@n0"
|
||||
},
|
||||
"IntervalMin": 60,
|
||||
"MaxLogRecord": 360,
|
||||
"ZCodeUrl": "https://qrcode.steamware.net/",
|
||||
"logo": "img/LogoPizzaferri.jpg"
|
||||
}
|
||||
@@ -20,7 +20,7 @@ Set-Content -Path $FileVers -Value $currRelNum
|
||||
# replace x manifest
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $currRelNum
|
||||
$manData = $manData -replace "{{DIRNAME}}", "MP-STATS"
|
||||
$manData = $manData -replace "{{DIRNAME}}", "GWMS"
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "stable/0"
|
||||
$manData = $manData -replace "{{PACKNAME}}", "GWMS.UI"
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
|
||||
@@ -15,7 +15,8 @@ display-4 {
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
body,
|
||||
.textCondensed {
|
||||
font-family: 'Roboto Condensed', sans-serif;
|
||||
}
|
||||
a,
|
||||
@@ -153,9 +154,12 @@ a,
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
@media (max-width: 640px) {
|
||||
.shortcuts .shortcut {
|
||||
min-width: 8rem;
|
||||
min-height: 4rem;
|
||||
}
|
||||
body {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -168,9 +168,13 @@ a, .btn-link {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
@media (max-width: 640px) {
|
||||
.shortcuts .shortcut {
|
||||
min-width: @blSCut * 8;
|
||||
min-height: @blSCut * 4;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
}
|
||||
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:640px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.8em;}}
|
||||
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 |
@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GWMS.UI", "GWMS.UI\GWMS.UI.
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GWMS.User", "GWMS.User\GWMS.User.csproj", "{3112DC8B-4752-4D43-A9A7-41AC40A38DFD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GWMS.API", "GWMS.API\GWMS.API.csproj", "{F455A3A5-89FD-49E3-B5B6-ED8B0DCEC444}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -29,10 +27,6 @@ Global
|
||||
{3112DC8B-4752-4D43-A9A7-41AC40A38DFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3112DC8B-4752-4D43-A9A7-41AC40A38DFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3112DC8B-4752-4D43-A9A7-41AC40A38DFD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F455A3A5-89FD-49E3-B5B6-ED8B0DCEC444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F455A3A5-89FD-49E3-B5B6-ED8B0DCEC444}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F455A3A5-89FD-49E3-B5B6-ED8B0DCEC444}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F455A3A5-89FD-49E3-B5B6-ED8B0DCEC444}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: {{CURRENT-REL}}</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
@@ -11,6 +10,7 @@
|
||||
<li>
|
||||
<b>v.1.* →</b>
|
||||
<ul>
|
||||
<li>INtegrazione metodi MAPO IOB</li>
|
||||
<li>Prima release dotnet5</li>
|
||||
<li>Integrazione EFCore</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 1.0.2106.3010</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2108.2410</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
@@ -11,6 +10,7 @@
|
||||
<li>
|
||||
<b>v.1.* →</b>
|
||||
<ul>
|
||||
<li>INtegrazione metodi MAPO IOB</li>
|
||||
<li>Prima release dotnet5</li>
|
||||
<li>Integrazione EFCore</li>
|
||||
</ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2106.3010
|
||||
1.0.2108.2410
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2106.3010</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html</changelog>
|
||||
<version>1.0.2108.2410</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>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user