Merge branch 'release/AddSheetMissingDateProcess02'

This commit is contained in:
Samuele Locatelli
2024-03-08 17:19:17 +01:00
+58 -45
View File
@@ -142,28 +142,30 @@ namespace NKC_WF.Controllers
return answ;
}
/// <summary>
/// Effettua la chiamata di update x SINGOLO foglio
///
///
/// ***********************************
/// METODI PUT
///
/// per abilitare è necessario agire sulla conf di IIS:
///
/// - modificare il file applicationHost.config che si trova in C:\Windows\System32\inetsrv\config
/// - disinstallare webDav oppure commentare le righe
/// <!-- <add name="WebDAVModule" /> -->
/// <!-- <add name="WebDAVModule" image="%windir%\System32\inetsrv\webdav.dll" /> -->
/// <!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" /r esourceType="Unspecified"// requireAccess="None" /> -->
/// - aggiungere PUT/DELETE a handler:
/// <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" modules="IsapiModule" scriptProcessor="%w indir/%//\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
/// <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" ///t ype="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
///
/// *************************************/
/// </summary>
/// <param name="sheetUpdated">Oggetto con Elenco fogli da aggiornare</param>
/// <summary> Effettua la chiamata di update x SINGOLO foglio
///
///
/// *********************************** METODI PUT
///
/// per abilitare è necessario agire sulla conf di IIS:
///
/// - modificare il file applicationHost.config che si trova in C:\Windows\System32\inetsrv\config
/// - disinstallare webDav oppure commentare le righe <!-- <add name="WebDAVModule" /> -->
/// <!-- <add name="WebDAVModule" image="%windir%\System32\inetsrv\webdav.dll" /> --> <!--
/// <add name="WebDAV" path="*"
/// verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule"
/// /r esourceType="Unspecified"// requireAccess="None" /> -->
/// - aggiungere PUT/DELETE a handler: <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"
/// path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" modules="IsapiModule"
/// scriptProcessor="%w indir/%//\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"
/// preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> <add
/// name="ExtensionlessUrlHandler-Integrated-4.0" path="*."
/// verb="GET,HEAD,POST,DEBUG,PUT,DELETE" ///t
/// ype="System.Web.Handlers.TransferRequestHandler"
/// preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
///
/// *************************************/ </summary> <param name="sheetUpdated">Oggetto con
/// Elenco fogli da aggiornare</param>
/// PUT: api/Sheet/machine_ID
[HttpPut]
public void Put(SheetWorkList sheetUpdated)
@@ -250,7 +252,6 @@ namespace NKC_WF.Controllers
#endregion Private Fields
#region Private Methods
/// <summary>
@@ -266,47 +267,59 @@ namespace NKC_WF.Controllers
if (!fixSheet.Waiting || !fixSheet.Done)
{
// calcolo SE sia in errore secondo i 4 punti di controllo work/unload
if (fixSheet.Unloading.OkE && dfUnlEnd)
if (fixSheet.Unloading.OkE)
{
// loggo
LogSheetError(fixSheet);
// sistemo...
fixSheet.Unloading.DtStart = fixSheet.Unloading.OkS ? fixSheet.Unloading.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Machining.DtEnd = fixSheet.Machining.OkE ? fixSheet.Machining.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Machining.DtStart = fixSheet.Machining.OkS ? fixSheet.Machining.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
if (dfUnlEnd)
{
// sistemo...
fixSheet.Unloading.DtStart = fixSheet.Unloading.OkS ? fixSheet.Unloading.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Machining.DtEnd = fixSheet.Machining.OkE ? fixSheet.Machining.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Machining.DtStart = fixSheet.Machining.OkS ? fixSheet.Machining.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
}
}
else if (fixSheet.Unloading.OkS && dfUnlStart && (!fixSheet.Printing.Done || !fixSheet.Machining.Done))
else if (fixSheet.Unloading.OkS && (!fixSheet.Printing.Done || !fixSheet.Machining.Done))
{
// loggo
LogSheetError(fixSheet);
// sistemo...
fixSheet.Machining.DtEnd = fixSheet.Machining.OkE ? fixSheet.Machining.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Machining.DtStart = fixSheet.Machining.OkS ? fixSheet.Machining.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
if (dfUnlStart)
{
// sistemo...
fixSheet.Machining.DtEnd = fixSheet.Machining.OkE ? fixSheet.Machining.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Machining.DtStart = fixSheet.Machining.OkS ? fixSheet.Machining.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
}
}
else if (fixSheet.Machining.OkE && dfWrkEnd && (!fixSheet.Printing.Done || !fixSheet.Machining.Done))
else if (fixSheet.Machining.OkE && (!fixSheet.Printing.Done || !fixSheet.Machining.Done))
{
// loggo
LogSheetError(fixSheet);
// sistemo...
fixSheet.Machining.DtStart = fixSheet.Machining.OkS ? fixSheet.Machining.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
if (dfWrkEnd)
{
// sistemo...
fixSheet.Machining.DtStart = fixSheet.Machining.OkS ? fixSheet.Machining.DtStart : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
}
}
else if (fixSheet.Machining.OkS && dfWrkStart && !fixSheet.Printing.Done)
else if (fixSheet.Machining.OkS && !fixSheet.Printing.Done)
{
// loggo
LogSheetError(fixSheet);
// sistemo...
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
if (dfWrkStart)
{
// sistemo...
fixSheet.Printing.DtEnd = fixSheet.Printing.OkE ? fixSheet.Printing.DtEnd : fixSheet.Unloading.DtEnd;
fixSheet.Printing.DtStart = fixSheet.Printing.OkS ? fixSheet.Printing.DtStart : fixSheet.Unloading.DtEnd;
}
}
}