Completato componente statistiche

This commit is contained in:
Samuele E. Locatelli
2020-01-20 17:54:05 +01:00
parent 3729517f53
commit 9f2e73e1f7
13 changed files with 110 additions and 326 deletions
-1
View File
@@ -176,7 +176,6 @@
<DependentUpon>DS_Report.xsd</DependentUpon>
</Compile>
<Compile Include="Enum.cs" />
<Compile Include="Objects.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
-34
View File
@@ -1,34 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AppData
{
/// <summary>
/// Struttura delel statistiche mostrate
/// </summary>
public class stats
{
/// <summary>
/// Variabili (red / yellow / green)
/// </summary>
public List<varData> vars { get; set; }
}
/// <summary>
/// Oggetto variabile da mostrare
/// </summary>
public class varData
{
/// <summary>
/// Nome variabile
/// </summary>
public string name { get; set; } = "A";
/// <summary>
/// Valore variabile
/// </summary>
public string value { get; set; } = "0";
}
}
Vendored
+1 -1
View File
@@ -17,7 +17,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=203']) {
withEnv(['NEXT_BUILD_NUMBER=205']) {
// env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
+14 -8
View File
@@ -1,6 +1,6 @@
/* ANIMAZIONE */
.strokeThick {
stroke-width: 10px !important;
stroke-width: 15px !important;
}
/* Animazione per richiamo attenzione*/
.flashStroke {
@@ -49,10 +49,10 @@
fill: #ACACAC;
}
.VERDE {
fill: #28a745;
fill: #21CD39;
}
.BLU {
fill: #007bff;
fill: #0000FF;
}
.ARANCIO {
fill: orange;
@@ -63,9 +63,15 @@
.PURPLE {
fill: purple;
}
.ROSSO {
fill: red;
}
.TESTO {
fill: white;
}
.NERO {
fill: black;
}
/* Classi da sostituire dinamicamente*/
#BLK-BCK {
/*background-image: url("../Images/MT0006110.jpg");
@@ -77,7 +83,7 @@
fill: #ACACAC;
}
#BLK-SEL {
fill: orange;
fill: yellow;
stroke: yellow;
/* Safari 4.0 - 8.0 */
-webkit-animation-name: doFlash;
@@ -93,14 +99,14 @@
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: alternate;
stroke-width: 10px !important;
stroke-width: 15px !important;
}
#BLK-BIN {
fill: #28a745;
fill: #0000FF;
}
#BLK-CART {
fill: #007bff;
fill: #21CD39;
}
#BLK-SEC-OP {
fill: purple;
fill: red;
}
+13 -7
View File
@@ -1,5 +1,5 @@
/* ANIMAZIONE */
@borderThick: 10px;
@borderThick: 15px;
.strokeThick {
stroke-width: @borderThick !important;
@@ -57,10 +57,10 @@
fill: #ACACAC;
}
.VERDE {
fill: #28a745;
fill: #21CD39;
}
.BLU {
fill: #007bff;
fill: #0000FF;
}
.ARANCIO {
fill: orange;
@@ -71,9 +71,15 @@
.PURPLE {
fill: purple;
}
.ROSSO {
fill: red;
}
.TESTO {
fill: white;
}
.NERO {
fill: black;
}
/* Classi da sostituire dinamicamente*/
#BLK-BCK {
@@ -83,17 +89,17 @@
.GRIGIO;
}
#BLK-SEL {
.ARANCIO;
.GIALLO;
.flashStroke;
.strokeThick;
}
#BLK-BIN {
.VERDE;
.BLU;
}
#BLK-CART {
.BLU;
.VERDE;
}
#BLK-SEC-OP {
.PURPLE;
.ROSSO;
}
+1 -1
View File
@@ -1 +1 @@
.strokeThick{stroke-width:10px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:10px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;}
.strokeThick{stroke-width:15px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#21cd39;}.BLU{fill:#00f;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.ROSSO{fill:red;}.TESTO{fill:white;}.NERO{fill:black;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:yellow;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:15px !important;}#BLK-BIN{fill:#00f;}#BLK-CART{fill:#21cd39;}#BLK-SEC-OP{fill:red;}
+9 -2
View File
@@ -29,10 +29,17 @@ namespace NKC_WF.Controllers
string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css");
answ = File.ReadAllText(filename);
// imposto sfondo ...
// imposto sfondo ... NON usato
answ = answ.Replace("#BLK-BCK", "#Sheet");
// All'inizio --> tutti colorati secondo destinazione (cart, bin, secop)
// eventualmente sec-op è SECONDO css aggiuntivo opzionale x indicare tratteggiato e/o tratteggiato + flashing...
// ...e primi 3 items...
answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE, #IT000085AF");
answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE");
answ = answ.Replace("#BLK-SEC-OP", "#IT000085AF");
answ = answ.Replace("#BLK-SEL", "#IT000085C2");
answ = answ.Replace("#BLK-BIN", "#IT000085BE");
answ = answ.Replace("#BLK-CART", "#IT000085AB");
+2 -31
View File
@@ -1,38 +1,9 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %>
<div class="card text-center mb-2" style="width: 100%;">
<h5 runat="server" id="h5Title">
<asp:Label runat="server" ID="lblTitle" /></h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
<thead>
<tr>
<th scope="col">
<asp:Label runat="server" ID="lblTitRed" /></th>
<th scope="col">
<asp:Label runat="server" ID="lblTitYel" /></th>
<th scope="col">
<asp:Label runat="server" ID="lblTitGre" /></th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-danger">
<asp:Label runat="server" ID="lblValRed" /></td>
<td class="text-warning">
<asp:Label runat="server" ID="lblValYel" /></td>
<td class="text-success">
<asp:Label runat="server" ID="lblValGre" /></td>
</tr>
</tbody>
</table>
</div>
</div>
<asp:FormView ID="frmView" runat="server" DataSourceID="ods" Width="100%" Visible="false">
<asp:FormView ID="frmView" runat="server" DataSourceID="ods" Width="100%">
<ItemTemplate>
<div class="card text-center mb-2" style="width: 100%;">
<h5 runat="server" id="h5Title" Text='<%# $"card-header py-1 {titleCss}" %>'>
<h5 runat="server" id="h5Title" class='<%# $"card-header py-1 {titleCss}" %>'>
<asp:Label ID="StatLabel" runat="server" Text='<%# Eval("Stat") %>' /></h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
@@ -44,63 +44,19 @@ namespace NKC_WF.WebUserControls
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
/// Css titolo
/// </summary>
public string titleCss = "bg-dark text-light";
/// <summary>
/// Css titolo
/// </summary>
public string title = "NONE";
public string titleCss { get; set; } = "bg-dark text-light";
/// <summary>
/// Valirizzazione variabili
/// </summary>
public void doUpdate()
{
h5Title.Attributes.Remove("class");
h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}");
lblTitle.Text = title;
#if true
// titoli
try
{
lblTitRed.Text = currStat.vars[0].name;
lblTitYel.Text = currStat.vars[1].name;
lblTitGre.Text = currStat.vars[2].name;
// valori
lblValRed.Text = currStat.vars[0].value;
lblValYel.Text = currStat.vars[1].value;
lblValGre.Text = currStat.vars[2].value;
}
catch
{ }
#endif
frmView.DataBind();
}
/// <summary>
/// Statistiche salvate (locali)
/// </summary>
protected stats _currStat { get; set; }
/// <summary>
/// Statistiche da mostrare
/// </summary>
public stats currStat
{
get
{
return _currStat;
}
set
{
_currStat = value;
doUpdate();
}
}
}
}
@@ -14,78 +14,6 @@ namespace NKC_WF.WebUserControls
public partial class cmp_MU_singleStat
{
/// <summary>
/// Controllo h5Title.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl h5Title;
/// <summary>
/// Controllo lblTitle.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTitle;
/// <summary>
/// Controllo lblTitRed.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTitRed;
/// <summary>
/// Controllo lblTitYel.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTitYel;
/// <summary>
/// Controllo lblTitGre.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTitGre;
/// <summary>
/// Controllo lblValRed.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblValRed;
/// <summary>
/// Controllo lblValYel.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblValYel;
/// <summary>
/// Controllo lblValGre.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblValGre;
/// <summary>
/// Controllo frmView.
/// </summary>
+9 -110
View File
@@ -6,123 +6,22 @@
<asp:HiddenField ID="hfBatchID" runat="server" />
<div class="row mt-2">
<div class="col-2">
<div class="card text-center mb-2" style="width: 100%;">
<h5 class="card-header py-1 bg-primary text-light">BINS</h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
<thead>
<tr>
<th scope="col">WAIT</th>
<th scope="col">WIP</th>
<th scope="col">DONE</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-danger">12</td>
<td class="text-warning">3</td>
<td class="text-success">5</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-2">
<div class="card text-center mb-2" style="width: 100%;">
<h5 class="card-header py-1 bg-info">SHIFT B20190916.0</h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
<thead>
<tr>
<th scope="col">DONE</th>
<th scope="col">TOT</th>
<th scope="col">RATIO</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-success">2</td>
<td class="text-warning">5</td>
<td class="text-success">40%</td>
</tr>
</tbody>
</table>
</div>
</div>
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatBin" />
</div>
<div class="col-1">
</div>
<div class="col-2">
<uc1:cmp_mu_singlestat runat="server" id="cmp_MU_singleStatBunk" />
<%--<div class="card text-center mb-2" style="width: 100%;">
<h5 class="card-header py-1 bg-secondary text-light">BUNK ST00000A2</h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
<thead>
<tr>
<th scope="col">DONE</th>
<th scope="col">TOT</th>
<th scope="col">RATIO</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-success">3</td>
<td class="text-warning">12</td>
<td class="text-success">25%</td>
</tr>
</tbody>
</table>
</div>
</div>--%>
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatBatch" />
</div>
<div class="col-2">
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatBunk" />
</div>
<div class="col-2">
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatSheet" />
</div>
<div class="col-1">
</div>
<div class="col-2">
<div class="card text-center mb-2" style="width: 100%;">
<h5 class="card-header py-1 bg-warning">SHEET SH00000123</h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
<thead>
<tr>
<th scope="col">DONE</th>
<th scope="col">TOT</th>
<th scope="col">RATIO</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-success">5</td>
<td class="text-warning">25</td>
<td class="text-success">20%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-2">
<div class="card text-center mb-2" style="width: 100%;">
<h5 class="card-header py-1 bg-success">CARTS</h5>
<div class="card-body py-1">
<table class="table table-sm mb-0">
<thead>
<tr>
<th scope="col">WAIT</th>
<th scope="col">WIP</th>
<th scope="col">DONE</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-danger">24</td>
<td class="text-warning">2</td>
<td class="text-success">6</td>
</tr>
</tbody>
</table>
</div>
</div>
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatCart" />
</div>
</div>
+23 -13
View File
@@ -33,24 +33,34 @@ namespace NKC_WF.WebUserControls
}
public void doUpdate()
{
// leggo stats e compongo
List<varData> variabili = new List<varData>();
variabili.Add(new varData { name = "WAIT", value = "2" });
variabili.Add(new varData { name = "WIP", value = "1" });
variabili.Add(new varData { name = "DONE", value = "3" });
stats bunkStsat = new stats
{
vars = variabili
};
cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light";
// fix x BIN
cmp_MU_singleStatBin.BatchId = BatchId;
cmp_MU_singleStatBin.statLevel = (int)StatType.BIN;
cmp_MU_singleStatBin.titleCss = "bg-primary text-light";
// fix x BATCH
cmp_MU_singleStatBatch.BatchId = BatchId;
cmp_MU_singleStatBatch.statLevel = (int)StatType.BATCH;
cmp_MU_singleStatBatch.titleCss = "bg-info";
// fix x BUNK
cmp_MU_singleStatBunk.BatchId = BatchId;
cmp_MU_singleStatBunk.statLevel= (int)StatType.BUNK;
cmp_MU_singleStatBunk.statLevel = (int)StatType.BUNK;
cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light";
// fix x SHEET
cmp_MU_singleStatSheet.BatchId = BatchId;
cmp_MU_singleStatSheet.statLevel = (int)StatType.SHEET;
cmp_MU_singleStatSheet.titleCss = "bg-warning";
// fix x CART
cmp_MU_singleStatCart.BatchId = BatchId;
cmp_MU_singleStatCart.statLevel = (int)StatType.CART;
cmp_MU_singleStatCart.titleCss = "bg-success";
cmp_MU_singleStatBunk.title = "BUNK";
cmp_MU_singleStatBunk.currStat = bunkStsat;
}
/// <summary>
/// Calcola il rapporto tra 2 valori
+36
View File
@@ -23,6 +23,24 @@ namespace NKC_WF.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
/// <summary>
/// Controllo cmp_MU_singleStatBin.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBin;
/// <summary>
/// Controllo cmp_MU_singleStatBatch.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBatch;
/// <summary>
/// Controllo cmp_MU_singleStatBunk.
/// </summary>
@@ -31,5 +49,23 @@ namespace NKC_WF.WebUserControls
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBunk;
/// <summary>
/// Controllo cmp_MU_singleStatSheet.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatSheet;
/// <summary>
/// Controllo cmp_MU_singleStatCart.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatCart;
}
}