Aggiunta calcolo statistiche x materiale + cache in REDIS valori yeld calcolati
This commit is contained in:
@@ -245,6 +245,9 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DS_Report.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DTO\BatchYeldStatDTO.cs" />
|
||||
<Compile Include="DTO\MaterialYeldStatsDTO.cs" />
|
||||
<Compile Include="DTO\SheetYeldStatDTO.cs" />
|
||||
<Compile Include="Enum.cs" />
|
||||
<Compile Include="Objects.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AppData.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Statistiche in termini di Yeld e quantità produzioni relative ad un singolo batch
|
||||
/// </summary>
|
||||
public class BatchYeldStatDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Statistiche YELD aggregate per Material
|
||||
/// </summary>
|
||||
public List<MaterialYeldStatsDTO> ListByMaterial { get; set; } = new List<MaterialYeldStatsDTO>();
|
||||
|
||||
/// <summary>
|
||||
/// Statistiche YELD aggregate per Sheet
|
||||
/// </summary>
|
||||
public List<SheetYeldStatDTO> ListBySheet { get; set; } = new List<SheetYeldStatDTO>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AppData.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Statistiche resa materiali
|
||||
/// </summary>
|
||||
public class MaterialYeldStatsDTO
|
||||
{
|
||||
public int MatId { get; set; } = 0;
|
||||
public int MatCode { get; set; } = 0;
|
||||
public string MatDescript { get; set; } = "";
|
||||
|
||||
public int TotSheets { get; set; } = 0;
|
||||
public int TotParts { get; set; } = 0;
|
||||
|
||||
public double YeldMin { get; set; } = 0;
|
||||
public double YeldAvg { get; set; } = 0;
|
||||
public double YeldMax { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AppData.DTO
|
||||
{
|
||||
public class SheetYeldStatDTO
|
||||
{
|
||||
public int SheetId { get; set; } = 0;
|
||||
public int MatId { get; set; } = 0;
|
||||
public int MatCode { get; set; } = 0;
|
||||
public string MatDescript { get; set; } = "";
|
||||
public int BunkIdx { get; set; } = 0;
|
||||
public int SheetIdx { get; set; } = 0;
|
||||
|
||||
public int NumParts { get; set; } = 0;
|
||||
|
||||
public double Yeld { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
+361
-227
@@ -1,7 +1,9 @@
|
||||
using Newtonsoft.Json;
|
||||
using AppData.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
@@ -81,12 +83,6 @@ namespace AppData
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int cacheDataTTL { get; set; } = 2;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string CodSoggCurrUser
|
||||
@@ -107,189 +103,6 @@ namespace AppData
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// verifica esistenza record da tipo doc + chiave...
|
||||
/// </summary>
|
||||
/// <param name="tipoDoc"></param>
|
||||
/// <param name="keyParam"></param>
|
||||
/// <returns></returns>
|
||||
private bool checkDoc(tipoDocumento tipoDoc, string keyParam)
|
||||
{
|
||||
bool answ = false;
|
||||
int intIdx = 0;
|
||||
switch (tipoDoc)
|
||||
{
|
||||
case tipoDocumento.docBinPre:
|
||||
case tipoDocumento.docBinPost:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabBinPre = taBN.getByKey(intIdx);
|
||||
answ = tabBinPre.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docCart:
|
||||
case tipoDocumento.docCartIRK:
|
||||
case tipoDocumento.docCartIRKSum:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabCarts = taCR.getByKey(intIdx);
|
||||
answ = tabCarts.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docPart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabPart = taIL.getByKey(intIdx);
|
||||
answ = tabPart.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docOtherPart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabOtherPart = taOtItem.getByKey(intIdx);
|
||||
answ = tabOtherPart.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docStack:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabStack = taSTL.getByKey(intIdx);
|
||||
answ = tabStack.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docCartSpecialPart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabSpecPart = taRepSpecPart.GetData(intIdx, "", "");
|
||||
answ = tabSpecPart.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docND:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void initTA()
|
||||
{
|
||||
taBL = new DS_AppTableAdapters.BatchListTableAdapter();
|
||||
taBN = new DS_AppTableAdapters.BinsTableAdapter();
|
||||
taBNLS = new DS_AppTableAdapters.BinListTableAdapter();
|
||||
taBStats = new DS_AppTableAdapters.BatchStatsTableAdapter();
|
||||
taCL = new DS_AppTableAdapters.CartsTableAdapter();
|
||||
taCOK = new DS_AppTableAdapters.CartOnKitTableAdapter();
|
||||
taCount = new DS_AppTableAdapters.CountersTableAdapter();
|
||||
taCR = new DS_AppTableAdapters.CartsTableAdapter();
|
||||
taDayStats = new DS_AppTableAdapters.ProductionStatsDayTableAdapter();
|
||||
taEL = new DS_AppTableAdapters.ErrorsLogTableAdapter();
|
||||
taFV = new DS_AppTableAdapters.FileValidationTableAdapter();
|
||||
taIL = new DS_AppTableAdapters.ItemListTableAdapter();
|
||||
taImpLog = new DS_AppTableAdapters.ImportLogTableAdapter();
|
||||
taISD = new DS_AppTableAdapters.ItemSearchDetailTableAdapter();
|
||||
taIV = new DS_AppTableAdapters.ItemValidationTableAdapter();
|
||||
taKL = new DS_AppTableAdapters.KitListTableAdapter();
|
||||
taMat = new DS_AppTableAdapters.MaterialsTableAdapter();
|
||||
taNest = new DS_AppTableAdapters.NestingTableAdapter();
|
||||
taOffOL = new DS_AppTableAdapters.OfflineOrderListTableAdapter();
|
||||
taOO2I = new DS_AppTableAdapters.OffOrd2ItemTableAdapter();
|
||||
taOKIB = new DS_AppTableAdapters.OKIBTableAdapter();
|
||||
taOKIB_Sum = new DS_AppTableAdapters.OKIB_SumTableAdapter();
|
||||
taOKOI = new DS_AppTableAdapters.OKOITableAdapter();
|
||||
taOKOI_Sum = new DS_AppTableAdapters.OKOI_sumTableAdapter();
|
||||
taOL = new DS_AppTableAdapters.OrderListTableAdapter();
|
||||
taOLT = new DS_AppTableAdapters.OrderListTreeTableAdapter();
|
||||
taOtItem = new DS_AppTableAdapters.OtherItemTableAdapter();
|
||||
taPL = new DS_AppTableAdapters.PackListTableAdapter();
|
||||
taPlac = new DS_AppTableAdapters.PlacesTableAdapter();
|
||||
taPlant = new DS_AppTableAdapters.PlantListTableAdapter();
|
||||
taPLC = new DS_AppTableAdapters.PackCheckTableAdapter();
|
||||
taPLD = new DS_AppTableAdapters.PackListDetTableAdapter();
|
||||
taPLog = new DS_AppTableAdapters.PackLogTableAdapter();
|
||||
taPVP = new DS_AppTableAdapters.PartValidParetoTableAdapter();
|
||||
taRem = new DS_AppTableAdapters.RemnantsTableAdapter();
|
||||
taStatDec = new DS_AppTableAdapters.StatusDecodeTableAdapter();
|
||||
taStatLog = new DS_AppTableAdapters.StatusLogTableAdapter();
|
||||
taSTL = new DS_AppTableAdapters.StackListTableAdapter();
|
||||
taSHL = new DS_AppTableAdapters.SheetListTableAdapter();
|
||||
taSP = new DS_AppTableAdapters.SheetsPreviewTableAdapter();
|
||||
taSpecialPart = new DS_AppTableAdapters.SpecialPartsTableAdapter();
|
||||
taElPos = new DS_ReportTableAdapters.ElencoPostazioniTableAdapter();
|
||||
taPJQ = new DS_ReportTableAdapters.PrintJobQueueTableAdapter();
|
||||
taRepBin = new DS_ReportTableAdapters.stp_prt_BinTableAdapter();
|
||||
taRepBunkGroup = new DS_ReportTableAdapters.stp_prt_BunkGroupTableAdapter();
|
||||
taRepBunkList = new DS_ReportTableAdapters.stp_prt_BunkListTableAdapter();
|
||||
taRepCart = new DS_ReportTableAdapters.stp_prt_CartTableAdapter();
|
||||
taRepPart = new DS_ReportTableAdapters.stp_prt_PartTableAdapter();
|
||||
taRepSpecPart = new DS_ReportTableAdapters.stp_prt_SpecialPartTableAdapter();
|
||||
taRepOtherPart = new DS_ReportTableAdapters.stp_prt_OtherPartTableAdapter();
|
||||
taRepIRK = new DS_ReportTableAdapters.stp_prt_IRKTableAdapter();
|
||||
taRepIRKSum = new DS_ReportTableAdapters.stp_prt_IRK_SumTableAdapter();
|
||||
taShStats = new DS_AppTableAdapters.SheetStatsTableAdapter();
|
||||
taUpdMan = new DS_AppTableAdapters.UpdManTableAdapter();
|
||||
taUStat = new DS_AppTableAdapters.UnloadStatsTableAdapter();
|
||||
}
|
||||
|
||||
private void setupConnString()
|
||||
{
|
||||
string connString = memLayer.ML.confReadString("NKC_WFConnectionString");
|
||||
taBL.Connection.ConnectionString = connString;
|
||||
taBN.Connection.ConnectionString = connString;
|
||||
taBNLS.Connection.ConnectionString = connString;
|
||||
taBStats.Connection.ConnectionString = connString;
|
||||
taCL.Connection.ConnectionString = connString;
|
||||
taCOK.Connection.ConnectionString = connString;
|
||||
taCount.Connection.ConnectionString = connString;
|
||||
taCR.Connection.ConnectionString = connString;
|
||||
taDayStats.Connection.ConnectionString = connString;
|
||||
taEL.Connection.ConnectionString = connString;
|
||||
taFV.Connection.ConnectionString = connString;
|
||||
taIL.Connection.ConnectionString = connString;
|
||||
taImpLog.Connection.ConnectionString = connString;
|
||||
taISD.Connection.ConnectionString = connString;
|
||||
taIV.Connection.ConnectionString = connString;
|
||||
taKL.Connection.ConnectionString = connString;
|
||||
taMat.Connection.ConnectionString = connString;
|
||||
taNest.Connection.ConnectionString = connString;
|
||||
taOffOL.Connection.ConnectionString = connString;
|
||||
taOO2I.Connection.ConnectionString = connString;
|
||||
taOKIB.Connection.ConnectionString = connString;
|
||||
taOKIB_Sum.Connection.ConnectionString = connString;
|
||||
taOKOI.Connection.ConnectionString = connString;
|
||||
taOKOI_Sum.Connection.ConnectionString = connString;
|
||||
taOL.Connection.ConnectionString = connString;
|
||||
taOLT.Connection.ConnectionString = connString;
|
||||
taOtItem.Connection.ConnectionString = connString;
|
||||
taPL.Connection.ConnectionString = connString;
|
||||
taPlac.Connection.ConnectionString = connString;
|
||||
taPlant.Connection.ConnectionString = connString;
|
||||
taPLC.Connection.ConnectionString = connString;
|
||||
taPLD.Connection.ConnectionString = connString;
|
||||
taPLog.Connection.ConnectionString = connString;
|
||||
taPVP.Connection.ConnectionString = connString;
|
||||
taRem.Connection.ConnectionString = connString;
|
||||
taStatDec.Connection.ConnectionString = connString;
|
||||
taStatLog.Connection.ConnectionString = connString;
|
||||
taSTL.Connection.ConnectionString = connString;
|
||||
taSHL.Connection.ConnectionString = connString;
|
||||
taSP.Connection.ConnectionString = connString;
|
||||
taSpecialPart.Connection.ConnectionString = connString;
|
||||
taElPos.Connection.ConnectionString = connString;
|
||||
taPJQ.Connection.ConnectionString = connString;
|
||||
taRepBin.Connection.ConnectionString = connString;
|
||||
taRepBunkGroup.Connection.ConnectionString = connString;
|
||||
taRepBunkList.Connection.ConnectionString = connString;
|
||||
taRepCart.Connection.ConnectionString = connString;
|
||||
taRepPart.Connection.ConnectionString = connString;
|
||||
taRepSpecPart.Connection.ConnectionString = connString;
|
||||
taRepOtherPart.Connection.ConnectionString = connString;
|
||||
taRepIRK.Connection.ConnectionString = connString;
|
||||
taRepIRKSum.Connection.ConnectionString = connString;
|
||||
taShStats.Connection.ConnectionString = connString;
|
||||
taUStat.Connection.ConnectionString = connString;
|
||||
taUpdMan.Connection.ConnectionString = connString;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -476,7 +289,6 @@ namespace AppData
|
||||
memLayer.ML.setRSV(redKey, rawData, cacheDataTTL);
|
||||
}
|
||||
|
||||
//restituisco valore..
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -516,42 +328,6 @@ namespace AppData
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce tabella dati SpecialPart (con cache lungo periodo)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DS_App.SpecialPartsDataTable getSpecialPart()
|
||||
{
|
||||
DS_App.SpecialPartsDataTable answ = new DS_App.SpecialPartsDataTable();
|
||||
// controllo cache
|
||||
bool trovato = false;
|
||||
string redKey = memLayer.ML.redHash($"SpecialPartsTable");
|
||||
string rawData = "";
|
||||
rawData = memLayer.ML.getRSV(redKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<DS_App.SpecialPartsDataTable>(rawData);
|
||||
trovato = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if (!trovato)
|
||||
{
|
||||
// se non trovo leggo
|
||||
answ = taSpecialPart.GetData();
|
||||
rawData = JsonConvert.SerializeObject(answ);
|
||||
// salvo in redis x periodo LUNGO
|
||||
memLayer.ML.setRSV(redKey, rawData, cacheDataTTL * 60);
|
||||
}
|
||||
|
||||
//restituisco valore..
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera printer dato codPostazione
|
||||
/// </summary>
|
||||
@@ -589,6 +365,41 @@ namespace AppData
|
||||
return printer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce tabella dati SpecialPart (con cache lungo periodo)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DS_App.SpecialPartsDataTable getSpecialPart()
|
||||
{
|
||||
DS_App.SpecialPartsDataTable answ = new DS_App.SpecialPartsDataTable();
|
||||
// controllo cache
|
||||
bool trovato = false;
|
||||
string redKey = memLayer.ML.redHash($"SpecialPartsTable");
|
||||
string rawData = "";
|
||||
rawData = memLayer.ML.getRSV(redKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<DS_App.SpecialPartsDataTable>(rawData);
|
||||
trovato = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if (!trovato)
|
||||
{
|
||||
// se non trovo leggo
|
||||
answ = taSpecialPart.GetData();
|
||||
rawData = JsonConvert.SerializeObject(answ);
|
||||
// salvo in redis x periodo LUNGO
|
||||
memLayer.ML.setRSV(redKey, rawData, cacheDataTTL * 60);
|
||||
}
|
||||
|
||||
//restituisco valore..
|
||||
return answ;
|
||||
}
|
||||
|
||||
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public DS_App.UnloadStatsDataTable getUnloadStatsByBatch(int BatchID, int StatLevel)
|
||||
{
|
||||
@@ -621,6 +432,140 @@ namespace AppData
|
||||
return answ;
|
||||
}
|
||||
|
||||
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public BatchYeldStatDTO getYeldStatsByBatch(int BatchID)
|
||||
{
|
||||
BatchYeldStatDTO answ = new BatchYeldStatDTO();
|
||||
// controllo cache
|
||||
bool trovato = false;
|
||||
string redKey = memLayer.ML.redHash($"YeldStatByBatch:{BatchID}");
|
||||
string rawData = "";
|
||||
rawData = memLayer.ML.getRSV(redKey);
|
||||
if (!string.IsNullOrEmpty(rawData) && rawData.Count() > 2)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<BatchYeldStatDTO>(rawData);
|
||||
trovato = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if (!trovato)
|
||||
{
|
||||
// se non trovo leggo
|
||||
answ = GetYeldStatsFromMongoData(BatchID);
|
||||
rawData = JsonConvert.SerializeObject(answ);
|
||||
// salvo in redis con cache lunga (2 volte la minima...)
|
||||
memLayer.ML.setRSV(redKey, rawData, cacheDataTTL * 2);
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera da MongoDB le risposte dal supervisor e calcola statistiche Batch
|
||||
/// NB. statistiche per singolo Sheet ed aggregate x materiale
|
||||
/// </summary>
|
||||
/// <param name="BatchId">ID del Batch di cui recuperare le info</param>
|
||||
public BatchYeldStatDTO GetYeldStatsFromMongoData(int BatchId)
|
||||
{
|
||||
BatchYeldStatDTO answ = new BatchYeldStatDTO();
|
||||
if (memLayer.ML.CRB("enableMongo"))
|
||||
{
|
||||
List<MaterialYeldStatsDTO> ListByMaterialTemp = new List<MaterialYeldStatsDTO>();
|
||||
List<SheetYeldStatDTO> ListBySheetTemp = new List<SheetYeldStatDTO>();
|
||||
// cerco da lista salvataggi Nest...
|
||||
var nestAnsw = ComLib.man.getNestAnsw(BatchId);
|
||||
// recupero bunk da DB
|
||||
DataLayer dlMan = new DataLayer();
|
||||
var bunkList = taSTL.getByBatch(BatchId);
|
||||
var listSheets = taSHL.getByBatch(BatchId, "ND");
|
||||
var matList = taMat.GetData();
|
||||
// elenchi x ricerca duplicati
|
||||
List<int> partListNest = new List<int>();
|
||||
List<int> partListNestDupl = new List<int>();
|
||||
|
||||
if (nestAnsw != null)
|
||||
{
|
||||
double num = 0;
|
||||
double den = 1;
|
||||
double currRatio = 0;
|
||||
try
|
||||
{
|
||||
if (nestAnsw.BunkList != null)
|
||||
{
|
||||
foreach (var bunk in nestAnsw.BunkList)
|
||||
{
|
||||
// procedo SOLO per il bunk corrente...
|
||||
foreach (var sheet in bunk.SheetList)
|
||||
{
|
||||
num = sheet.SurfaceWork > 0 ? sheet.SurfaceWork : 0;
|
||||
den = sheet.SurfaceTotal > 0 ? sheet.SurfaceTotal : 1;
|
||||
currRatio = ComLib.ratioProt(num, den);
|
||||
// recupero sheet dettaglio x materiale ed idx vari...
|
||||
var rSheet = listSheets
|
||||
.Where(x => x.SheetIndex == sheet.SheetIndex && x.StackIndex == bunk.BunkIndex)
|
||||
.FirstOrDefault();
|
||||
if (rSheet != null)
|
||||
{
|
||||
var rMat = matList
|
||||
.Where(x => x.MatID == rSheet.MatID)
|
||||
.FirstOrDefault();
|
||||
var rSStat = ListBySheetTemp
|
||||
.Where(x => x.SheetIdx == sheet.SheetIndex && x.BunkIdx == bunk.BunkIndex)
|
||||
.FirstOrDefault();
|
||||
if (rSStat != null)
|
||||
{
|
||||
rSStat.Yeld = currRatio;
|
||||
rSStat.NumParts = sheet.PartList.Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
// recupero la riga x indicare il materiale...
|
||||
|
||||
rSStat = new SheetYeldStatDTO()
|
||||
{
|
||||
SheetId = rSheet.SheetID,
|
||||
MatId = rSheet.MatID,
|
||||
MatCode = rMat.MatExtCode,
|
||||
MatDescript = rMat.MatDesc,
|
||||
BunkIdx = bunk.BunkIndex,
|
||||
SheetIdx = sheet.SheetIndex,
|
||||
NumParts = sheet.PartList.Count,
|
||||
Yeld = currRatio
|
||||
};
|
||||
ListBySheetTemp.Add(rSStat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ciclo nuovamente per i dati recuperati x aggregare x materiale...
|
||||
ListByMaterialTemp = ListBySheetTemp
|
||||
.GroupBy(x => x.MatId)
|
||||
.Select(x => new MaterialYeldStatsDTO()
|
||||
{
|
||||
MatId = x.Key,
|
||||
MatCode = x.FirstOrDefault().MatCode,
|
||||
MatDescript = x.FirstOrDefault().MatDescript,
|
||||
TotParts = x.Sum(p => p.NumParts),
|
||||
TotSheets = x.Count(),
|
||||
YeldAvg = x.Average(p => p.Yeld),
|
||||
YeldMin = x.Min(p => p.Yeld),
|
||||
YeldMax = x.Max(p => p.Yeld)
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salvo nell'oggetto
|
||||
answ.ListBySheet = ListBySheetTemp;
|
||||
answ.ListByMaterial = ListByMaterialTemp;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua la stampa di un documento
|
||||
/// </summary>
|
||||
@@ -656,5 +601,194 @@ namespace AppData
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int cacheDataTTL { get; set; } = 2;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// verifica esistenza record da tipo doc + chiave...
|
||||
/// </summary>
|
||||
/// <param name="tipoDoc"></param>
|
||||
/// <param name="keyParam"></param>
|
||||
/// <returns></returns>
|
||||
private bool checkDoc(tipoDocumento tipoDoc, string keyParam)
|
||||
{
|
||||
bool answ = false;
|
||||
int intIdx = 0;
|
||||
switch (tipoDoc)
|
||||
{
|
||||
case tipoDocumento.docBinPre:
|
||||
case tipoDocumento.docBinPost:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabBinPre = taBN.getByKey(intIdx);
|
||||
answ = tabBinPre.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docCart:
|
||||
case tipoDocumento.docCartIRK:
|
||||
case tipoDocumento.docCartIRKSum:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabCarts = taCR.getByKey(intIdx);
|
||||
answ = tabCarts.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docPart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabPart = taIL.getByKey(intIdx);
|
||||
answ = tabPart.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docOtherPart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabOtherPart = taOtItem.getByKey(intIdx);
|
||||
answ = tabOtherPart.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docStack:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabStack = taSTL.getByKey(intIdx);
|
||||
answ = tabStack.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docCartSpecialPart:
|
||||
int.TryParse(keyParam, out intIdx);
|
||||
var tabSpecPart = taRepSpecPart.GetData(intIdx, "", "");
|
||||
answ = tabSpecPart.Count > 0;
|
||||
break;
|
||||
|
||||
case tipoDocumento.docND:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void initTA()
|
||||
{
|
||||
taBL = new DS_AppTableAdapters.BatchListTableAdapter();
|
||||
taBN = new DS_AppTableAdapters.BinsTableAdapter();
|
||||
taBNLS = new DS_AppTableAdapters.BinListTableAdapter();
|
||||
taBStats = new DS_AppTableAdapters.BatchStatsTableAdapter();
|
||||
taCL = new DS_AppTableAdapters.CartsTableAdapter();
|
||||
taCOK = new DS_AppTableAdapters.CartOnKitTableAdapter();
|
||||
taCount = new DS_AppTableAdapters.CountersTableAdapter();
|
||||
taCR = new DS_AppTableAdapters.CartsTableAdapter();
|
||||
taDayStats = new DS_AppTableAdapters.ProductionStatsDayTableAdapter();
|
||||
taEL = new DS_AppTableAdapters.ErrorsLogTableAdapter();
|
||||
taFV = new DS_AppTableAdapters.FileValidationTableAdapter();
|
||||
taIL = new DS_AppTableAdapters.ItemListTableAdapter();
|
||||
taImpLog = new DS_AppTableAdapters.ImportLogTableAdapter();
|
||||
taISD = new DS_AppTableAdapters.ItemSearchDetailTableAdapter();
|
||||
taIV = new DS_AppTableAdapters.ItemValidationTableAdapter();
|
||||
taKL = new DS_AppTableAdapters.KitListTableAdapter();
|
||||
taMat = new DS_AppTableAdapters.MaterialsTableAdapter();
|
||||
taNest = new DS_AppTableAdapters.NestingTableAdapter();
|
||||
taOffOL = new DS_AppTableAdapters.OfflineOrderListTableAdapter();
|
||||
taOO2I = new DS_AppTableAdapters.OffOrd2ItemTableAdapter();
|
||||
taOKIB = new DS_AppTableAdapters.OKIBTableAdapter();
|
||||
taOKIB_Sum = new DS_AppTableAdapters.OKIB_SumTableAdapter();
|
||||
taOKOI = new DS_AppTableAdapters.OKOITableAdapter();
|
||||
taOKOI_Sum = new DS_AppTableAdapters.OKOI_sumTableAdapter();
|
||||
taOL = new DS_AppTableAdapters.OrderListTableAdapter();
|
||||
taOLT = new DS_AppTableAdapters.OrderListTreeTableAdapter();
|
||||
taOtItem = new DS_AppTableAdapters.OtherItemTableAdapter();
|
||||
taPL = new DS_AppTableAdapters.PackListTableAdapter();
|
||||
taPlac = new DS_AppTableAdapters.PlacesTableAdapter();
|
||||
taPlant = new DS_AppTableAdapters.PlantListTableAdapter();
|
||||
taPLC = new DS_AppTableAdapters.PackCheckTableAdapter();
|
||||
taPLD = new DS_AppTableAdapters.PackListDetTableAdapter();
|
||||
taPLog = new DS_AppTableAdapters.PackLogTableAdapter();
|
||||
taPVP = new DS_AppTableAdapters.PartValidParetoTableAdapter();
|
||||
taRem = new DS_AppTableAdapters.RemnantsTableAdapter();
|
||||
taStatDec = new DS_AppTableAdapters.StatusDecodeTableAdapter();
|
||||
taStatLog = new DS_AppTableAdapters.StatusLogTableAdapter();
|
||||
taSTL = new DS_AppTableAdapters.StackListTableAdapter();
|
||||
taSHL = new DS_AppTableAdapters.SheetListTableAdapter();
|
||||
taSP = new DS_AppTableAdapters.SheetsPreviewTableAdapter();
|
||||
taSpecialPart = new DS_AppTableAdapters.SpecialPartsTableAdapter();
|
||||
taElPos = new DS_ReportTableAdapters.ElencoPostazioniTableAdapter();
|
||||
taPJQ = new DS_ReportTableAdapters.PrintJobQueueTableAdapter();
|
||||
taRepBin = new DS_ReportTableAdapters.stp_prt_BinTableAdapter();
|
||||
taRepBunkGroup = new DS_ReportTableAdapters.stp_prt_BunkGroupTableAdapter();
|
||||
taRepBunkList = new DS_ReportTableAdapters.stp_prt_BunkListTableAdapter();
|
||||
taRepCart = new DS_ReportTableAdapters.stp_prt_CartTableAdapter();
|
||||
taRepPart = new DS_ReportTableAdapters.stp_prt_PartTableAdapter();
|
||||
taRepSpecPart = new DS_ReportTableAdapters.stp_prt_SpecialPartTableAdapter();
|
||||
taRepOtherPart = new DS_ReportTableAdapters.stp_prt_OtherPartTableAdapter();
|
||||
taRepIRK = new DS_ReportTableAdapters.stp_prt_IRKTableAdapter();
|
||||
taRepIRKSum = new DS_ReportTableAdapters.stp_prt_IRK_SumTableAdapter();
|
||||
taShStats = new DS_AppTableAdapters.SheetStatsTableAdapter();
|
||||
taUpdMan = new DS_AppTableAdapters.UpdManTableAdapter();
|
||||
taUStat = new DS_AppTableAdapters.UnloadStatsTableAdapter();
|
||||
}
|
||||
|
||||
private void setupConnString()
|
||||
{
|
||||
string connString = memLayer.ML.confReadString("NKC_WFConnectionString");
|
||||
taBL.Connection.ConnectionString = connString;
|
||||
taBN.Connection.ConnectionString = connString;
|
||||
taBNLS.Connection.ConnectionString = connString;
|
||||
taBStats.Connection.ConnectionString = connString;
|
||||
taCL.Connection.ConnectionString = connString;
|
||||
taCOK.Connection.ConnectionString = connString;
|
||||
taCount.Connection.ConnectionString = connString;
|
||||
taCR.Connection.ConnectionString = connString;
|
||||
taDayStats.Connection.ConnectionString = connString;
|
||||
taEL.Connection.ConnectionString = connString;
|
||||
taFV.Connection.ConnectionString = connString;
|
||||
taIL.Connection.ConnectionString = connString;
|
||||
taImpLog.Connection.ConnectionString = connString;
|
||||
taISD.Connection.ConnectionString = connString;
|
||||
taIV.Connection.ConnectionString = connString;
|
||||
taKL.Connection.ConnectionString = connString;
|
||||
taMat.Connection.ConnectionString = connString;
|
||||
taNest.Connection.ConnectionString = connString;
|
||||
taOffOL.Connection.ConnectionString = connString;
|
||||
taOO2I.Connection.ConnectionString = connString;
|
||||
taOKIB.Connection.ConnectionString = connString;
|
||||
taOKIB_Sum.Connection.ConnectionString = connString;
|
||||
taOKOI.Connection.ConnectionString = connString;
|
||||
taOKOI_Sum.Connection.ConnectionString = connString;
|
||||
taOL.Connection.ConnectionString = connString;
|
||||
taOLT.Connection.ConnectionString = connString;
|
||||
taOtItem.Connection.ConnectionString = connString;
|
||||
taPL.Connection.ConnectionString = connString;
|
||||
taPlac.Connection.ConnectionString = connString;
|
||||
taPlant.Connection.ConnectionString = connString;
|
||||
taPLC.Connection.ConnectionString = connString;
|
||||
taPLD.Connection.ConnectionString = connString;
|
||||
taPLog.Connection.ConnectionString = connString;
|
||||
taPVP.Connection.ConnectionString = connString;
|
||||
taRem.Connection.ConnectionString = connString;
|
||||
taStatDec.Connection.ConnectionString = connString;
|
||||
taStatLog.Connection.ConnectionString = connString;
|
||||
taSTL.Connection.ConnectionString = connString;
|
||||
taSHL.Connection.ConnectionString = connString;
|
||||
taSP.Connection.ConnectionString = connString;
|
||||
taSpecialPart.Connection.ConnectionString = connString;
|
||||
taElPos.Connection.ConnectionString = connString;
|
||||
taPJQ.Connection.ConnectionString = connString;
|
||||
taRepBin.Connection.ConnectionString = connString;
|
||||
taRepBunkGroup.Connection.ConnectionString = connString;
|
||||
taRepBunkList.Connection.ConnectionString = connString;
|
||||
taRepCart.Connection.ConnectionString = connString;
|
||||
taRepPart.Connection.ConnectionString = connString;
|
||||
taRepSpecPart.Connection.ConnectionString = connString;
|
||||
taRepOtherPart.Connection.ConnectionString = connString;
|
||||
taRepIRK.Connection.ConnectionString = connString;
|
||||
taRepIRKSum.Connection.ConnectionString = connString;
|
||||
taShStats.Connection.ConnectionString = connString;
|
||||
taUStat.Connection.ConnectionString = connString;
|
||||
taUpdMan.Connection.ConnectionString = connString;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -93,4 +93,6 @@ namespace AppData
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -534,6 +534,7 @@
|
||||
<Content Include="WebUserControls\cmp_BatchStatsPlot.ascx" />
|
||||
<Content Include="WebUserControls\cmp_binDetIRK.ascx" />
|
||||
<Content Include="WebUserControls\cmp_BP_bunkList.ascx" />
|
||||
<Content Include="WebUserControls\cmp_BP_MaterialYeld.ascx" />
|
||||
<Content Include="WebUserControls\cmp_BP_sheetList.ascx" />
|
||||
<Content Include="WebUserControls\cmp_cartDetIRK.ascx" />
|
||||
<Content Include="WebUserControls\cmp_DailyStatsList.ascx" />
|
||||
@@ -1282,6 +1283,13 @@
|
||||
<Compile Include="WebUserControls\cmp_BP_bunkList.ascx.designer.cs">
|
||||
<DependentUpon>cmp_BP_bunkList.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_BP_MaterialYeld.ascx.cs">
|
||||
<DependentUpon>cmp_BP_MaterialYeld.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_BP_MaterialYeld.ascx.designer.cs">
|
||||
<DependentUpon>cmp_BP_MaterialYeld.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_BP_sheetList.ascx.cs">
|
||||
<DependentUpon>cmp_BP_sheetList.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BP_MaterialYeld.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BP_MaterialYeld" %>
|
||||
|
||||
<b>Material's</b> YELD
|
||||
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" CssClass="table table-sm table-striped" AllowSorting="True">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="table-info" />
|
||||
<EmptyDataTemplate>
|
||||
<%: traduci("NoRecord") %>
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Material" SortExpression="MatCode">
|
||||
<ItemTemplate>
|
||||
<div class="font-weight-bold">
|
||||
<asp:Label runat="server" ID="lblMatCode" Text='<%# Eval("MatCode") %>'></asp:Label>
|
||||
</div>
|
||||
<div class="small">
|
||||
<asp:Label runat="server" ID="lblMatDescript" Text='<%# Eval("MatDescript") %>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle CssClass="text-left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sheets/Parts" SortExpression="TotParts">
|
||||
<ItemTemplate>
|
||||
<div class="d-flex justify-content-between">
|
||||
<span class="px-0 small">Sheets</span>
|
||||
<span class="px-0 font-weight-bold">
|
||||
<asp:Label runat="server" ID="lblTotSheets" Text='<%# Eval("TotSheets") %>'></asp:Label></span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<span class="px-0 small">Parts</span>
|
||||
<span class="px-0 font-weight">
|
||||
<asp:Label runat="server" ID="lblTotParts" Text='<%# Eval("TotParts") %>'></asp:Label></span>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle CssClass="text-left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Yeld" SortExpression="YeldAvg">
|
||||
<ItemTemplate>
|
||||
<div class="d-flex justify-content-between">
|
||||
<span class="px-0 small">Avg</span>
|
||||
<span class="px-0 font-weight-bold">
|
||||
<asp:Label runat="server" ID="lblYeldAvg" Text='<%# Eval("YeldAvg", "{0:P1}") %>'></asp:Label></span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<span class="px-0 font-weight">
|
||||
<asp:Label runat="server" ID="lblYeldMin" Text='<%# Eval("YeldMin", "{0:P1}") %>'></asp:Label></span>
|
||||
<span class="px-0 small">...</span>
|
||||
<span class="px-0 font-weight">
|
||||
<asp:Label runat="server" ID="lblYeldMax" Text='<%# Eval("YeldMax", "{0:P1}") %>'></asp:Label></span>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle CssClass="text-left" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetMatStatList" TypeName="NKC_WF.WebUserControls.cmp_BP_MaterialYeld"></asp:ObjectDataSource>
|
||||
@@ -0,0 +1,92 @@
|
||||
using AppData;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_BP_MaterialYeld : BaseUserControl
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Batch corrente...
|
||||
/// </summary>
|
||||
public int BatchId
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = memLayer.ML.QSI("BatchId");
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public List<AppData.DTO.MaterialYeldStatsDTO> GetMatStatList()
|
||||
{
|
||||
DataLayer DLMan = new DataLayer();
|
||||
MatStatList = new List<AppData.DTO.MaterialYeldStatsDTO>();
|
||||
var statData = DLMan.GetYeldStatsFromMongoData(BatchId);
|
||||
if (statData != null)
|
||||
{
|
||||
MatStatList = statData.ListByMaterial;
|
||||
}
|
||||
#if false
|
||||
Random rnd = new Random();
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var randDbl = rnd.NextDouble();
|
||||
MatStatList.Add(new NKC_WF.DTO.MaterialStats() { MatCode = $"{i * 100:00000}", MatDescript = $"Descrizione {i:00}", TotSheets = rnd.Next(10), TotParts = 50 * rnd.Next(1, 5), YeldAvg = randDbl, YeldMin = randDbl / 2, YeldMax = 1 - (1 - randDbl) / 2 });
|
||||
}
|
||||
#endif
|
||||
return MatStatList;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected List<AppData.DTO.MaterialYeldStatsDTO> MatStatList = new List<AppData.DTO.MaterialYeldStatsDTO>();
|
||||
|
||||
/// <summary>
|
||||
/// Tabella dei dati di quante part siano presenti x foglio recuperato dai dati nesting da mongoDB
|
||||
/// </summary>
|
||||
protected Dictionary<int, int> SheetPartQty = new Dictionary<int, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Tabella dei dati di resa (Yeald) x foglio recuperato dai dati nesting da mongoDB
|
||||
/// </summary>
|
||||
protected Dictionary<int, double> SheetYeld = new Dictionary<int, double>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Legge da redis, se non trovasse legge da mongoDB e salva in redis come cache...
|
||||
/// </summary>
|
||||
private void ReloadData()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_BP_MaterialYeld
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
}
|
||||
}
|
||||
@@ -16,20 +16,22 @@
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-sm btn-primary" Visible="true" ToolTip="Reset"><i class="fa fa-refresh"></i></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-sm btn-primary"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-sm btn-primary m-0"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SheetIndex" HeaderText="#" ReadOnly="True" SortExpression="SheetIndex" />
|
||||
<asp:BoundField DataField="SheetIndex" HeaderText="#" ReadOnly="True" SortExpression="SheetIndex" ItemStyle-CssClass="px-0" />
|
||||
<asp:TemplateField HeaderText="Material" SortExpression="MatExtCode">
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-8 text-left">
|
||||
<div class="d-flex justify-content-between text-nowrap">
|
||||
<div class="px-0 text-left">
|
||||
<asp:Label ID="lblMatExtCode" runat="server" Text='<%# Eval("MatExtCode") %>' CssClass="font-weight-bold"></asp:Label>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="px-0 text-right">
|
||||
<asp:Label ID="lblSheetID" runat="server" Text='<%# Eval("SheetID") %>' CssClass="small text-right"></asp:Label>
|
||||
</div>
|
||||
<div class="col-12 text-left">
|
||||
</div>
|
||||
<div class="d-flex justify-content-between text-nowrap">
|
||||
<div class="px-0 text-left">
|
||||
<asp:Label ID="lblMatDesc" runat="server" Text='<%# Eval("MatDesc") %>' CssClass="small"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,16 +39,19 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estim" SortExpression="WrkTimeEst">
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<div class="d-flex justify-content-between text-nowrap">
|
||||
<div class="px-0 text-left">
|
||||
<asp:Label ID="lblWrkTimeEst" runat="server" Text='<%# formatMinSec(Eval("WrkTimeEst", "{0:N0}")) %>'></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 text-left">
|
||||
P: <asp:Label ID="lblSheetParts" runat="server" Text='<%# GetSheetPartQty(Eval("SheetIndex")) %>'></asp:Label>
|
||||
<div class="px-0 text-right" title="Part on current Sheet">
|
||||
<sup>(<asp:Label ID="lblSheetParts" runat="server" Text='<%# GetSheetPartQty(Eval("SheetIndex")) %>'></asp:Label>)</sup>
|
||||
</div>
|
||||
<div class="col-8 text-right">
|
||||
</div>
|
||||
<div class="d-flex justify-content-between text-nowrap">
|
||||
<div class="px-0 text-left">
|
||||
Y:
|
||||
</div>
|
||||
<div class="px-0 text-right">
|
||||
<asp:Label ID="lblSheetYels" runat="server" Text='<%# GetSheetYeld(Eval("SheetIndex")) %>'></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,23 +4,24 @@
|
||||
<%@ Register Src="~/WebUserControls/cmp_MU_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_MU_svgViewer" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_BP_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BP_sheetList" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_slider.ascx" TagPrefix="uc1" TagName="cmp_slider" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_BP_MaterialYeld.ascx" TagPrefix="uc1" TagName="cmp_BP_MaterialYeld" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="uplBody">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
<div class="row text-center small">
|
||||
<div class="col-2 pr-0 small">
|
||||
<uc1:cmp_BP_bunkList runat="server" ID="cmp_BP_bunkList" />
|
||||
<uc1:cmp_BP_MaterialYeld runat="server" ID="cmp_BP_MaterialYeld" />
|
||||
</div>
|
||||
<div class="col-7 px-0">
|
||||
<div class="col-8 px-0">
|
||||
<h3><%# traduci("BatchPreview") %></h3>
|
||||
<uc1:cmp_slider runat="server" ID="cmp_slider" />
|
||||
<uc1:cmp_MU_svgViewer runat="server" ID="cmp_MU_svgViewer" />
|
||||
</div>
|
||||
<div class="col-3 pl-0 small">
|
||||
<div class="col-2 pl-0 small">
|
||||
<uc1:cmp_BP_sheetList runat="server" ID="cmp_BP_sheetList" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+9
@@ -41,6 +41,15 @@ namespace NKC_WF.site
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_BP_bunkList cmp_BP_bunkList;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_BP_MaterialYeld control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_BP_MaterialYeld cmp_BP_MaterialYeld;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_slider control.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user