diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs
index d9f2f4c..9344799 100644
--- a/AppData/ComLib.cs
+++ b/AppData/ComLib.cs
@@ -788,6 +788,30 @@ namespace AppData
return answ;
}
+ ///
+ /// Verifica esistenza del PDF SE presente negli optParams
+ /// - OK SE NO c'è pdf
+ /// - OK SE presente parametro --> cerca il file --> lo trova
+ ///
+ /// Part da analizzare
+ /// PAth del file PDF analizzato
+ ///
+ 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;
+ }
+
///
/// Deserializza un ordine offline
///
diff --git a/Jenkinsfile b/Jenkinsfile
index a809bde..8a2c1a1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -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}')
diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs
index d04f8cc..f404848 100644
--- a/NKC_WF/Controllers/BatchProcController.cs
+++ b/NKC_WF/Controllers/BatchProcController.cs
@@ -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;
}
diff --git a/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs b/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs
index ea067f4..e3f9ba9 100644
--- a/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs
@@ -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
+
///
/// fix visibilità buttons
///
@@ -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
+
///
/// Update forzato
///
@@ -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
}
}
\ No newline at end of file