Merge branch 'develop'
This commit is contained in:
+185
-59
@@ -184,7 +184,7 @@ namespace AppData
|
||||
public static string redOutPath = "NKC:SERV:BREQ";
|
||||
public static string redMsgCount = "NKC:SERV:BREQ:MCount";
|
||||
public static string redMsgList = "NKC:SERV:BREQ:MList";
|
||||
public static string redMLCurrStack = "NKC:SERV:TAKT:CurrStack";
|
||||
public static string redMLCurrBunk = "NKC:SERV:TAKT:CurrBunk";
|
||||
|
||||
public static string redNestAnsw = "NKC:NEST:BANSW";
|
||||
|
||||
@@ -1165,25 +1165,121 @@ namespace AppData
|
||||
/// <summary>
|
||||
/// Chiave bunk corrente su redis
|
||||
/// </summary>
|
||||
protected static string redCurrBunkTabKey()
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
protected static string redCurrBunkTabKey(string machine)
|
||||
{
|
||||
return $"{redProdReq}:CurrBunks";
|
||||
string answ = "";
|
||||
if (string.IsNullOrEmpty(machine))
|
||||
{
|
||||
answ = $"{redProdReq}:CurrBunks";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{redProdReq}:CurrBunks:{machine}";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Chiave bunk corrente su redis
|
||||
/// Chiave sheets correnti su redis
|
||||
/// </summary>
|
||||
protected static string redCurrSheetTabKey()
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
protected static string redCurrSheetTabKey(string machine)
|
||||
{
|
||||
return $"{redProdReq}:CurrSheets";
|
||||
string answ = "";
|
||||
if (string.IsNullOrEmpty(machine))
|
||||
{
|
||||
answ = $"{redProdReq}:CurrSheets";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{redProdReq}:CurrSheets:{machine}";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Chiave Bunk corrente su redis
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
protected static string redCurrBunkId(string machine)
|
||||
{
|
||||
string answ = "";
|
||||
if (string.IsNullOrEmpty(machine))
|
||||
{
|
||||
answ = $"{redProdReq}:CurrBunkID";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{redProdReq}:CurrBunkID:{machine}";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Chiave Sheets corrente su redis
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
protected static string redCurrSheetId(string machine)
|
||||
{
|
||||
string answ = "";
|
||||
if (string.IsNullOrEmpty(machine))
|
||||
{
|
||||
answ = $"{redProdReq}:CurrSheetID";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{redProdReq}:CurrSheetID:{machine}";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Resetto in REDIS i dati di bunk (corrente e successivi)
|
||||
/// </summary>
|
||||
public static void resetRedisBunkData()
|
||||
public static void resetRedisBunkData(string machine)
|
||||
{
|
||||
resetCurrBunk();
|
||||
resetCurrSheet();
|
||||
setCurrBunkId(machine, -2);
|
||||
setCurrSheetId(machine, -2);
|
||||
redisFirstBunk = null;
|
||||
}
|
||||
/// <summary>
|
||||
/// Cache redis del BunkID in lavorazione sulla macchina
|
||||
/// </summary>
|
||||
public static int getCurrBunkId(string macchina)
|
||||
{
|
||||
int answ = -1;
|
||||
string rawData = memLayer.ML.getRSV(redCurrBunkId(macchina));
|
||||
int.TryParse(rawData, out answ);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Salvataggio in redis del BunkID in lavorazione sulla macchina
|
||||
/// </summary>
|
||||
public static void setCurrBunkId(string macchina, int BunkID)
|
||||
{
|
||||
memLayer.ML.setRSV(redCurrBunkId(macchina), BunkID.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// Cache redis del SheetID in lavorazione sulla macchina
|
||||
/// </summary>
|
||||
public static int getCurrSheetId(string macchina)
|
||||
{
|
||||
int answ = -1;
|
||||
string rawData = memLayer.ML.getRSV(redCurrSheetId(macchina));
|
||||
int.TryParse(rawData, out answ);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Salvataggio in redis del SheetID in lavorazione sulla macchina
|
||||
/// </summary>
|
||||
public static void setCurrSheetId(string macchina, int SheetID)
|
||||
{
|
||||
memLayer.ML.setRSV(redCurrBunkId(macchina), SheetID.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// Cache redis del PRIMO bunk da lavorare
|
||||
/// </summary>
|
||||
private static ProdBunk redisFirstBunk
|
||||
@@ -1436,20 +1532,20 @@ namespace AppData
|
||||
/// BUNK corrente (x ora copia di first, poi sarà quello SELEZIONATO tra quelli SELEZIONABILI)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DS_App.StackListRow getCurrBunk()
|
||||
public static DS_App.StackListRow getCurrBunk(string machine = "WRK001")
|
||||
{
|
||||
DS_App.StackListRow answ = null;
|
||||
DS_App.StackListDataTable tabBunk = null;
|
||||
// cerco in cache....
|
||||
if (cachedCurrBunkTab != null)
|
||||
if (getCurrBunkTab(machine) != null)
|
||||
{
|
||||
tabBunk = cachedCurrBunkTab;
|
||||
tabBunk = getCurrBunkTab(machine);
|
||||
}
|
||||
else
|
||||
{
|
||||
tabBunk = DataLayer.man.taSTL.getLoaded();
|
||||
// salvo in redis
|
||||
cachedCurrBunkTab = tabBunk;
|
||||
setCurrBunkTab(machine, tabBunk);
|
||||
}
|
||||
if (tabBunk != null && tabBunk.Count > 0)
|
||||
{
|
||||
@@ -1457,31 +1553,46 @@ namespace AppData
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected static DS_App.StackListDataTable cachedCurrBunkTab
|
||||
/// <summary>
|
||||
/// resetto curr bunk
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
public static void resetCurrBunk(string machine = "WRK001")
|
||||
{
|
||||
get
|
||||
// svuoto"
|
||||
memLayer.ML.redFlushKey(redCurrBunkTabKey(machine));
|
||||
}
|
||||
/// <summary>
|
||||
/// lettura currBunk table da cache
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
protected static DS_App.StackListDataTable getCurrBunkTab(string machine)
|
||||
{
|
||||
DS_App.StackListDataTable answ = null;
|
||||
string rawData = memLayer.ML.getRSV(redCurrBunkTabKey(machine));
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
DS_App.StackListDataTable answ = null;
|
||||
string rawData = memLayer.ML.getRSV(redCurrBunkTabKey());
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
// deserializzo...
|
||||
answ = JsonConvert.DeserializeObject<DS_App.StackListDataTable>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// deserializzo...
|
||||
answ = JsonConvert.DeserializeObject<DS_App.StackListDataTable>(rawData);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
string rawData = JsonConvert.SerializeObject(value);
|
||||
// TTL 5 sec
|
||||
memLayer.ML.setRSV(redCurrBunkTabKey(), rawData, 5);
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// salvataggio inc ache currBunk table
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <param name="tabBunks"></param>
|
||||
protected static void setCurrBunkTab(string machine, DS_App.StackListDataTable tabBunks)
|
||||
{
|
||||
string rawData = JsonConvert.SerializeObject(tabBunks);
|
||||
// TTL 15 sec
|
||||
memLayer.ML.setRSV(redCurrBunkTabKey(machine), rawData, 15);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1504,8 +1615,9 @@ namespace AppData
|
||||
/// Recupera lo sheet corrente da un BUNK come quello in status 5...
|
||||
/// </summary>
|
||||
/// <param name="BatchID"></param>
|
||||
/// <param name="machine"></param>
|
||||
/// <returns></returns>
|
||||
public static DS_App.SheetListRow getCurrSheet(int BatchID)
|
||||
public static DS_App.SheetListRow getCurrSheet(int BatchID, string machine)
|
||||
{
|
||||
DS_App.SheetListRow answ = null;
|
||||
if (BatchID > 0)
|
||||
@@ -1514,17 +1626,18 @@ namespace AppData
|
||||
{
|
||||
DS_App.SheetListDataTable tabSheets = null;
|
||||
// cerco in cache....
|
||||
if (cachedCurrSheetTab != null)
|
||||
if (getCurrSheetTab(machine) != null)
|
||||
{
|
||||
tabSheets = cachedCurrSheetTab;
|
||||
tabSheets = getCurrSheetTab(machine);
|
||||
}
|
||||
else
|
||||
{
|
||||
// recupero sheet corrente da Bunk...
|
||||
tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5);
|
||||
// salvo in redis
|
||||
cachedCurrSheetTab = tabSheets;
|
||||
setCurrSheetTab(machine, tabSheets);
|
||||
}
|
||||
// leggo prima riga --> foglio corrente
|
||||
if (tabSheets != null && tabSheets.Count > 0)
|
||||
{
|
||||
answ = tabSheets[0];
|
||||
@@ -1535,31 +1648,44 @@ namespace AppData
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected static DS_App.SheetListDataTable cachedCurrSheetTab
|
||||
/// <summary>
|
||||
/// resetto curr sheets
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
public static void resetCurrSheet(string machine = "WRK001")
|
||||
{
|
||||
get
|
||||
// svuoto"
|
||||
memLayer.ML.redFlushKey(redCurrSheetTabKey(machine));
|
||||
}
|
||||
/// <summary>
|
||||
/// Recupero da redis tab fogli correnti
|
||||
/// </summary>
|
||||
protected static DS_App.SheetListDataTable getCurrSheetTab(string machine)
|
||||
{
|
||||
DS_App.SheetListDataTable answ = null;
|
||||
string rawData = memLayer.ML.getRSV(redCurrSheetTabKey(machine));
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
DS_App.SheetListDataTable answ = null;
|
||||
string rawData = memLayer.ML.getRSV(redCurrSheetTabKey());
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
// deserializzo...
|
||||
answ = JsonConvert.DeserializeObject<DS_App.SheetListDataTable>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// deserializzo...
|
||||
answ = JsonConvert.DeserializeObject<DS_App.SheetListDataTable>(rawData);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
string rawData = JsonConvert.SerializeObject(value);
|
||||
// TTL 5 sec
|
||||
memLayer.ML.setRSV(redCurrSheetTabKey(), rawData, 5);
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Salvataggio in redis tab fogli correnti
|
||||
/// </summary>
|
||||
/// <param name="machine"></param>
|
||||
/// <param name="tabella"></param>
|
||||
protected static void setCurrSheetTab(string machine, DS_App.SheetListDataTable tabella)
|
||||
{
|
||||
string rawData = JsonConvert.SerializeObject(tabella);
|
||||
// TTL 5 sec
|
||||
memLayer.ML.setRSV(redCurrSheetTabKey(machine), rawData, 2);
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce il PROSSIMO bunk secondo criterio:
|
||||
@@ -1772,17 +1898,17 @@ namespace AppData
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Valore dello Stack correntemente in processing per ML (MachineLoad)
|
||||
/// ID del BUNK correntemente in processing per ML (MachineLoad)
|
||||
/// </summary>
|
||||
public static string taktMLCurrStack
|
||||
public static string taktMLCurrBunk
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.getRSV(redMLCurrStack);
|
||||
return memLayer.ML.getRSV(redMLCurrBunk);
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setRSV(redMLCurrStack, value);
|
||||
memLayer.ML.setRSV(redMLCurrBunk, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=325']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=326']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
|
||||
@@ -8,6 +8,10 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class BunkController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// COdice macchina (HARD CODED)
|
||||
/// </summary>
|
||||
protected string machine = "WRK001";
|
||||
/// <summary>
|
||||
/// Restituisce il FIRST BUNK da lavorare
|
||||
/// GET: api/Bunk
|
||||
@@ -101,7 +105,7 @@ namespace NKC_WF.Controllers
|
||||
}
|
||||
}
|
||||
// INVALIDO eventuale valore BUNK in REDIS...
|
||||
ComLib.resetRedisBunkData();
|
||||
ComLib.resetRedisBunkData(machine);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,6 +8,10 @@ namespace NKC_WF.Controllers
|
||||
{
|
||||
public class SheetController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// COdice macchina (HARD CODED)
|
||||
/// </summary>
|
||||
protected string machine = "WRK001";
|
||||
/// <summary>
|
||||
/// Restituisce un array di sheet da lavorare (quindi NON ancora scaricati, anche di + BUNK)
|
||||
/// GET: api/Sheet
|
||||
@@ -95,7 +99,7 @@ namespace NKC_WF.Controllers
|
||||
if (currSheet.Machining.DtEnd != null)
|
||||
{
|
||||
// hard coded su multiax
|
||||
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "WRK001");
|
||||
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, machine);
|
||||
}
|
||||
}
|
||||
// segnalo avanzamento su redis x pagina unload
|
||||
@@ -113,7 +117,7 @@ namespace NKC_WF.Controllers
|
||||
// ricalcolo stato BUNK
|
||||
ComLib.updateBatchPosition(BatchId);
|
||||
// INVALIDO eventuale valore BUNK in REDIS...
|
||||
ComLib.resetRedisBunkData();
|
||||
ComLib.resetRedisBunkData(machine);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,6 +179,8 @@ namespace NKC_WF.Controllers
|
||||
}
|
||||
// ricalcolo stato BUNK
|
||||
ComLib.updateBatchPosition(BatchId);
|
||||
// INVALIDO eventuale valore BUNK in REDIS...
|
||||
ComLib.resetRedisBunkData(machine);
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -17,13 +17,17 @@
|
||||
SheetId = document.getElementById('<%=hfSheetId.ClientID%>').value;
|
||||
lastVal = document.getElementById('<%=hfCurrRev.ClientID%>').value;
|
||||
lastValBunk = document.getElementById('<%=hfCurrBunkRev.ClientID%>').value;
|
||||
// commento sennò ricarica sempre
|
||||
document.getElementById("dynCss").href = "../api/getMUCss/" + SheetId;
|
||||
$.ajax({
|
||||
url: "../api/getMUCssRev/" + SheetId
|
||||
}).then(function (data) {
|
||||
//console.log("Check cssRev: data=" + data + " | lastVal=" + lastVal);
|
||||
// se è cambiato...
|
||||
if (data != lastVal) {
|
||||
console.log("Changed cssRev: data=" + data + " | lastVal=" + lastVal);
|
||||
// aggiorno e ricarico css
|
||||
//document.getElementById("dynCss").href = "../api/getMUCss/" + SheetId;
|
||||
$('#uplTavola').load(location.href + ' #dynCss');
|
||||
document.getElementById('<%=hfCurrRev.ClientID%>').value = data;
|
||||
}
|
||||
@@ -32,6 +36,7 @@
|
||||
$.ajax({
|
||||
url: "../api/getMUSheetRev/" + BunkId
|
||||
}).then(function (data) {
|
||||
//console.log("Check SheetReview: data=" + data + " | lastValBunk=" + lastValBunk);
|
||||
// se è cambiato...
|
||||
if (data != lastValBunk) {
|
||||
console.log("Changed SheetReview: data=" + data + " | lastValBunk=" + lastValBunk);
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace NKC_WF.WebUserControls
|
||||
public partial class cmp_secScreen : BaseUserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Codice macchina (HARD CODED x ora)
|
||||
/// </summary>
|
||||
protected string machine = "WRK001";
|
||||
|
||||
protected void timerRefresh_Tick(object sender, EventArgs e)
|
||||
{
|
||||
countDown--;
|
||||
@@ -38,7 +43,7 @@ namespace NKC_WF.WebUserControls
|
||||
DS_App.StackListRow currBunk = ComLib.getCurrBunk();
|
||||
if (currBunk != null)
|
||||
{
|
||||
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(currBunk.BatchID);
|
||||
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(currBunk.BatchID, machine);
|
||||
if (currSheet != null)
|
||||
{
|
||||
// se variato...
|
||||
|
||||
@@ -162,7 +162,8 @@ namespace NKC_WF.WebUserControls
|
||||
if (currentBunkPrinted)
|
||||
{
|
||||
cmp_barcode.showOutput("badge badge-success", $"BUNK OK, {decoData.rawData}");
|
||||
ComLib.taktMLCurrStack = decoData.code;
|
||||
ComLib.resetCurrBunk();
|
||||
ComLib.taktMLCurrBunk = decoData.codeInt.ToString();
|
||||
// processo DB e salvo che lo stack è stato caricato in MACHINE LOAD
|
||||
int stackId = 0;
|
||||
try
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace NKC_WF.site
|
||||
{
|
||||
public partial class DBG_QRCode_Unload : System.Web.UI.Page
|
||||
{
|
||||
|
||||
string machine ="WRK001";
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
@@ -92,7 +94,7 @@ namespace NKC_WF.site
|
||||
if (currBunk != null)
|
||||
{
|
||||
BatchId = currBunk.BatchID;
|
||||
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId);
|
||||
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId, machine);
|
||||
if (currSheet != null)
|
||||
{
|
||||
SheetId = currSheet.SheetID;
|
||||
|
||||
@@ -9,11 +9,14 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="mx-0">
|
||||
<div class="card text-center" style="width: 100%;">
|
||||
<h4 class="card-header bg-secondary text-light"><%: traduci("MachineUnload") %> <sub>(<%: hfBatchID.Value %>)</sub></h4>
|
||||
<asp:UpdatePanel runat="server" ID="upnlTitle" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<h4 class="card-header bg-secondary text-light"><%: traduci("MachineUnload") %> <sub>(<%: hfBatchID.Value %>)</sub></h4>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="card-body py-1 bg-dark">
|
||||
<asp:UpdatePanel runat="server" ID="upnlStats" UpdateMode="Always">
|
||||
<asp:UpdatePanel runat="server" ID="upnlStats" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Timer ID="timerSvg" runat="server" Interval="1000" OnTick="timerSvg_Tick"></asp:Timer>
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
<asp:HiddenField ID="hfSheetID" runat="server" />
|
||||
<uc1:cmp_MU_stats runat="server" ID="cmp_MU_stats" />
|
||||
@@ -21,7 +24,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<div class="row">
|
||||
<div class="col-2 pr-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlBins" UpdateMode="Always">
|
||||
<asp:UpdatePanel runat="server" ID="upnlBins" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<uc1:cmp_MU_bins runat="server" ID="cmp_MU_bins" />
|
||||
</ContentTemplate>
|
||||
@@ -35,8 +38,9 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="col-2 pl-0">
|
||||
<asp:UpdatePanel runat="server" ID="upnlCarts" UpdateMode="Always">
|
||||
<asp:UpdatePanel runat="server" ID="upnlCarts" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Timer ID="timerSvg" runat="server" Interval="1100" OnTick="timerSvg_Tick"></asp:Timer>
|
||||
<uc1:cmp_MU_carts runat="server" ID="cmp_MU_carts" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -6,11 +6,18 @@ namespace NKC_WF
|
||||
{
|
||||
public partial class MachineUnload : BasePage
|
||||
{
|
||||
/// <summary>
|
||||
/// Codice macchina (HARD CODED x ora)
|
||||
/// </summary>
|
||||
protected string machine = "WRK001";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
((SiteMaster)this.Master).showSearch = false;
|
||||
BatchId = -1;
|
||||
SheetId = -1;
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
@@ -23,10 +30,11 @@ namespace NKC_WF
|
||||
set
|
||||
{
|
||||
hfBatchID.Value = value.ToString();
|
||||
ComLib.setCurrBunkId(machine, value);
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int answ = ComLib.getCurrBunkId(machine);
|
||||
int.TryParse(hfBatchID.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
@@ -39,10 +47,11 @@ namespace NKC_WF
|
||||
set
|
||||
{
|
||||
hfSheetID.Value = value.ToString();
|
||||
ComLib.setCurrSheetId(machine, value);
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int answ = ComLib.getCurrSheetId(machine);
|
||||
int.TryParse(hfSheetID.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
@@ -54,15 +63,16 @@ namespace NKC_WF
|
||||
{
|
||||
// imposto dati correnti
|
||||
bool doUpdate = setCurrData();
|
||||
// aggiorno child
|
||||
cmp_MU_stats.BatchId = BatchId;
|
||||
cmp_MU_bins.BatchId = BatchId;
|
||||
cmp_MU_carts.BatchId = BatchId;
|
||||
cmp_MU_svgViewer.BatchId = BatchId;
|
||||
cmp_MU_svgViewer.SheetId = SheetId;
|
||||
if (doUpdate)
|
||||
{
|
||||
// aggiorno child
|
||||
cmp_MU_stats.BatchId = BatchId;
|
||||
cmp_MU_bins.BatchId = BatchId;
|
||||
cmp_MU_carts.BatchId = BatchId;
|
||||
cmp_MU_svgViewer.BatchId = BatchId;
|
||||
cmp_MU_svgViewer.SheetId = SheetId;
|
||||
cmp_MU_svgViewer.doUpdate();
|
||||
upnlTitle.Update();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -81,7 +91,7 @@ namespace NKC_WF
|
||||
needUpdate = true;
|
||||
}
|
||||
|
||||
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId);
|
||||
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId, machine);
|
||||
if (currSheet != null)
|
||||
{
|
||||
if (SheetId != currSheet.SheetID)
|
||||
@@ -94,10 +104,12 @@ namespace NKC_WF
|
||||
else
|
||||
{
|
||||
BatchId = 0;
|
||||
ComLib.setCurrBunkId(machine, 0);
|
||||
ComLib.setCurrSheetId(machine, 0);
|
||||
ComLib.man.resetSheetUnload(0);
|
||||
}
|
||||
// se sheet/bunk 0 --> update!
|
||||
if (BatchId == 0 && SheetId == 0)
|
||||
if (BatchId <= 0 && SheetId <= 0)
|
||||
{
|
||||
needUpdate = true;
|
||||
}
|
||||
@@ -113,11 +125,18 @@ namespace NKC_WF
|
||||
if (counter % 10 == 0)
|
||||
{
|
||||
cmp_MU_stats.doUpdate();
|
||||
upnlStats.Update();
|
||||
}
|
||||
if (counter % 2 == 0)
|
||||
// faccio update bin/cart ogni pari/dispari...
|
||||
else if (counter % 2 == 0)
|
||||
{
|
||||
cmp_MU_carts.doUpdate();
|
||||
upnlCarts.Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
cmp_MU_bins.doUpdate();
|
||||
upnlBins.Update();
|
||||
}
|
||||
incrNumWait();
|
||||
}
|
||||
@@ -154,9 +173,10 @@ namespace NKC_WF
|
||||
/// </summary>
|
||||
protected void incrNumWait()
|
||||
{
|
||||
if (numWaitSvg > 30)
|
||||
if (numWaitSvg > 20)
|
||||
{
|
||||
memLayer.ML.resetRCnt(redProdReq);
|
||||
Response.Redirect(Request.RawUrl);
|
||||
}
|
||||
memLayer.ML.setRCntI(redProdReq);
|
||||
}
|
||||
|
||||
+18
-9
@@ -14,6 +14,15 @@ namespace NKC_WF
|
||||
public partial class MachineUnload
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo upnlTitle.
|
||||
/// </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.UpdatePanel upnlTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo upnlStats.
|
||||
/// </summary>
|
||||
@@ -23,15 +32,6 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel upnlStats;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo timerSvg.
|
||||
/// </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.Timer timerSvg;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfBatchID.
|
||||
/// </summary>
|
||||
@@ -104,6 +104,15 @@ namespace NKC_WF
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel upnlCarts;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo timerSvg.
|
||||
/// </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.Timer timerSvg;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_carts.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user