Update output stima/nest x dati su MongoDB
This commit is contained in:
+4
-3
@@ -85,7 +85,7 @@ namespace AppData
|
||||
/// </summary>
|
||||
/// <param name="BatchID"></param>
|
||||
/// <returns></returns>
|
||||
public nestReplyBatchInitial geEstAnsw(int BatchID)
|
||||
public nestReplyBatchInitial getEstAnsw(int BatchID)
|
||||
{
|
||||
nestReplyBatchInitial answ = null;
|
||||
try
|
||||
@@ -95,7 +95,7 @@ namespace AppData
|
||||
var filter = filtBuilder.Eq<int>("BatchID", BatchID);
|
||||
var collRawData = database.GetCollection<nestReplyBatchInitial>("EstimationArchive");
|
||||
// recupero
|
||||
answ = collRawData.Find(filter).FirstOrDefault<nestReplyBatchInitial>();
|
||||
answ = collRawData.Find(filter).Project<nestReplyBatchInitial>("{_id: 0}").FirstOrDefault<nestReplyBatchInitial>();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -114,9 +114,10 @@ namespace AppData
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<nestReplyBatchFinal>.Filter;
|
||||
var filter = filtBuilder.Eq<int>("BatchID", BatchID);
|
||||
FindOptions opz = new FindOptions { ShowRecordId = false };
|
||||
var collRawData = database.GetCollection<nestReplyBatchFinal>("NestingArchive");
|
||||
// recupero
|
||||
answ = collRawData.Find(filter).FirstOrDefault<nestReplyBatchFinal>();
|
||||
answ = collRawData.Find(filter).Project<nestReplyBatchFinal>("{_id: 0}").FirstOrDefault<nestReplyBatchFinal>();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
Vendored
+1
-1
@@ -17,7 +17,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=183']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=187']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
<add key="redisDb" value="0"/>
|
||||
<!--MongoDB-->
|
||||
<add key="mdbConnString" value="mongodb://W2019-MONGODB:27017"/>
|
||||
<add key="enableMongo" value="true"/>
|
||||
<!--Configurazioni DB per classi referenziate AppData e Steamware dll-->
|
||||
<add key="NKC_WFConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="DbConfConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
<div class="form-group row py-0 mt-0 mb-1">
|
||||
<label for="TotalTimeLabel" class="col-sm-4 col-form-label py-0">Estimated Time</label>
|
||||
<div class="col-sm-8 font-weight-bold">
|
||||
<asp:Label ID="TotalTimeLabel" runat="server" Text='<%# Eval("TotalTime","{0:N2}") %>' /> min
|
||||
<asp:Label ID="TotalTimeLabel" runat="server" Text='<%# Eval("TotalTime","{0:N2}") %>' />
|
||||
min
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,3 +79,9 @@
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblTestJson" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
@@ -18,6 +20,32 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
hfBatchId.Value = value.ToString();
|
||||
frmView.DataBind();
|
||||
if (memLayer.ML.CRB("enableMongo"))
|
||||
{
|
||||
// cerco da lista salvataggi Estim/Nest...
|
||||
var estimAnsw = ComLib.man.getEstAnsw(value);
|
||||
var nestAnsw = ComLib.man.getNestAnsw(value);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (estimAnsw != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
sb.AppendLine($"ESTIM: EnvNum: {estimAnsw.EnvNum} | Worktime: {estimAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {estimAnsw.ProcessingRuntime / 60:N2} min | Parts #: {estimAnsw.PartList.Count}");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
if (nestAnsw != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
sb.AppendLine($"NEST: EnvNum: {nestAnsw.EnvNum} | Worktime: {nestAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {nestAnsw.ProcessingRuntime / 60:N2} min | Bunks #: {nestAnsw.BunkList.Count} | Carts #: {nestAnsw.CartList.Count}");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
lblTestJson.Text = sb.Replace("\r\n", "<br/>").ToString();
|
||||
}
|
||||
}
|
||||
get
|
||||
{
|
||||
|
||||
+43
-32
@@ -7,36 +7,47 @@
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.WebUserControls {
|
||||
|
||||
|
||||
public partial class cmp_batchDetail {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo frmView.
|
||||
/// </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.FormView frmView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfBatchId.
|
||||
/// </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.HiddenField hfBatchId;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods.
|
||||
/// </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.ObjectDataSource ods;
|
||||
}
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_batchDetail
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo frmView.
|
||||
/// </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.FormView frmView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfBatchId.
|
||||
/// </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.HiddenField hfBatchId;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods.
|
||||
/// </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.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTestJson.
|
||||
/// </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 lblTestJson;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user