Merge branch 'develop' into SDK

This commit is contained in:
Samuele E. Locatelli
2021-03-01 19:48:52 +01:00
4 changed files with 101 additions and 47 deletions
+24
View File
@@ -788,6 +788,30 @@ namespace AppData
return answ;
}
/// <summary>
/// Verifica esistenza del PDF SE presente negli optParams
/// - OK SE NO c'è pdf
/// - OK SE presente parametro --> cerca il file --> lo trova
/// </summary>
/// <param name="reqPart">Part da analizzare</param>
/// <param name="pdfPath">PAth del file PDF analizzato</param>
/// <returns></returns>
public static bool checkPdfExistAccessible(Part reqPart, out string pdfPath)
{
pdfPath = getPdfFilePath(reqPart.OptParameters);
bool answ = string.IsNullOrEmpty(pdfPath);
if (!answ)
{
try
{
answ = File.Exists(pdfPath);
}
catch
{ }
}
return answ;
}
/// <summary>
/// Deserializza un ordine offline
/// </summary>
Vendored
+1 -1
View File
@@ -11,7 +11,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=388']) {
withEnv(['NEXT_BUILD_NUMBER=389']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '1.3.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
+18 -1
View File
@@ -167,8 +167,25 @@ namespace NKC_WF.Controllers
case procStatus.completed:
if (isValidation || isTesting)
{
// verifico PDF, se NON OK --> errore
bool pdfOk = true;
string pdfPath = "";
foreach (var item in rispStima.PartList)
{
pdfOk = pdfOk && ComLib.checkPdfExistAccessible(item, out pdfPath);
if (!pdfOk)
{
DLMan.taEL.insertQuery(DateTime.Now, "Check PDF path", $"{rispStima.BatchID}", $"{rispStima.BatchID}.{item.PartExtCode}", $"Error: PDF file not found: {pdfPath}");
}
}
// se non OK --> registro errore...
if (!pdfOk)
{
bStatus = 9;
}
// verifico se il tempo di procesisng stimato sia > minimo...
if (rispStima.EstimatedWorktime > memLayer.ML.CRI("minValidEstSec"))
else if (rispStima.EstimatedWorktime > memLayer.ML.CRI("minValidEstSec"))
{
bStatus = 10;
}
@@ -7,13 +7,8 @@ namespace NKC_WF.WebUserControls
{
public partial class cmp_validationSummary : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
fixVisibility();
}
}
#region Private Methods
/// <summary>
/// fix visibilità buttons
/// </summary>
@@ -28,13 +23,30 @@ namespace NKC_WF.WebUserControls
lbtReValidAll.Visible = tabItems2ReValid.Count > 0;
}
protected void lbtValidateMissing_Click(object sender, EventArgs e)
#endregion Private Methods
#region Protected Methods
protected void lbtForceRevali_Click(object sender, EventArgs e)
{
// chiamo stored x creazione NUOVI BATCH...
// rimetto da validare tramite stored
try
{
DLMan.taBL.redoPartValid("*");
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
}
catch
{ }
// update!
doUpdate();
}
protected void lbtRevalAll_Click(object sender, EventArgs e)
{
// rimetto da validare tramite stored
try
{
string cadBasePath = $"{memLayer.ML.CRS("nestBasePath")}{memLayer.ML.CRS("drawingFolder")}/";
DLMan.taBL.createPartValBatch(cadBasePath);
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
}
@@ -58,6 +70,40 @@ namespace NKC_WF.WebUserControls
// update!
doUpdate();
}
protected void lbtValidateMissing_Click(object sender, EventArgs e)
{
// chiamo stored x creazione NUOVI BATCH...
try
{
string cadBasePath = $"{memLayer.ML.CRS("nestBasePath")}{memLayer.ML.CRS("drawingFolder")}/";
DLMan.taBL.createPartValBatch(cadBasePath);
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
}
catch
{ }
// update!
doUpdate();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
fixVisibility();
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
doUpdate();
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// Update forzato
/// </summary>
@@ -71,39 +117,6 @@ namespace NKC_WF.WebUserControls
}
}
protected void lbtRevalAll_Click(object sender, EventArgs e)
{
// rimetto da validare tramite stored
try
{
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
}
catch
{ }
// update!
doUpdate();
}
protected void lbtForceRevali_Click(object sender, EventArgs e)
{
// rimetto da validare tramite stored
try
{
DLMan.taBL.redoPartValid("*");
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
}
catch
{ }
// update!
doUpdate();
}
protected void Timer1_Tick(object sender, EventArgs e)
{
doUpdate();
}
#endregion Public Methods
}
}