Update x invio 1 solo rec letto da bilancia x singolo ciclo di getDynData
This commit is contained in:
@@ -487,11 +487,13 @@
|
||||
</Compile>
|
||||
<Compile Include="UAClient.cs" />
|
||||
<Compile Include="utils.cs" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.json" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\IMI_PAMA_392.ini" />
|
||||
<None Include="DATA\CONF\IMI_PAMA_392.json" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.ini">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\IMI_SOITAAB_Z2342_02.ini" />
|
||||
<None Include="DATA\CONF\IMI_SOITAAB_Z2342_02.json" />
|
||||
|
||||
@@ -224,6 +224,32 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
listRmCurr.Remove(item);
|
||||
}
|
||||
|
||||
// aggiungo solo 1 pesata, la + vecchia...
|
||||
if (listRmCurr.Count > 0)
|
||||
{
|
||||
// prendo la prima
|
||||
var firstRec = listPesateCurr.Find(x => x.rm == listRmCurr[0]);
|
||||
// accodo x invio pesata valide IN se presenti...
|
||||
if (firstRec.dateInSpecified)
|
||||
{
|
||||
// invio record SOLO PESO
|
||||
outVal.Add("lastWeightIn", $"{firstRec.weightIn}");
|
||||
// registro record completo ultima pesata
|
||||
outVal.Add("lastRecIn", formatPesata(firstRec, true));
|
||||
}
|
||||
// accodo x invio pesata valide OUT se presenti...
|
||||
if (firstRec.dateOutSpecified)
|
||||
{
|
||||
// invio record SOLO PESO
|
||||
outVal.Add("lastWeightOut", $"{firstRec.weightIn}");
|
||||
// registro record completo ultima pesata
|
||||
outVal.Add("lastRecOut", formatPesata(firstRec, false));
|
||||
}
|
||||
// la aggiungo alle pesate archiviate...
|
||||
listPesateArch.Add(firstRec);
|
||||
}
|
||||
#if false
|
||||
|
||||
// ciclo i vari indici rimasti
|
||||
foreach (var item in listRmCurr)
|
||||
{
|
||||
@@ -248,7 +274,8 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
}
|
||||
|
||||
// salvo nuovo elenco pesate
|
||||
listPesateArch = listPesateCurr;
|
||||
listPesateArch = listPesateCurr;
|
||||
#endif
|
||||
}
|
||||
lastReadPLC = DateTime.Now;
|
||||
return outVal;
|
||||
|
||||
Reference in New Issue
Block a user