diff --git a/MP.Data/Controllers/MpIocController.cs b/MP.Data/Controllers/MpIocController.cs index 192249ff..5e05ff15 100644 --- a/MP.Data/Controllers/MpIocController.cs +++ b/MP.Data/Controllers/MpIocController.cs @@ -1836,6 +1836,27 @@ namespace MP.Data.Controllers } return dbResult; } + /// + /// Vista v_MSFD delle machine MULTI filtrato x macchina (da stored) + /// + /// + /// + public async Task> VMSFDGetMultiByMaccAsync(string idxMacc) + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacc); + + dbResult = await dbCtx + .DbSetMSFD + .FromSqlRaw("exec dbo.stp_MSFD_getMulti @IdxMacchina", IdxMacchina) + .AsNoTracking() + //.AsEnumerable() + .ToListAsync(); + } + return dbResult; + } #endregion Public Methods diff --git a/MP.IOC/Data/MpDataService.cs b/MP.IOC/Data/MpDataService.cs index 63ed3f11..eba3cdb3 100644 --- a/MP.IOC/Data/MpDataService.cs +++ b/MP.IOC/Data/MpDataService.cs @@ -819,7 +819,7 @@ namespace MP.IOC.Data addTask4Machine(idxMacchina, taskType.setArt, setArtVal); addTask4Machine(idxMacchina, taskType.setComm, setCommVal); addTask4Machine(idxMacchina, taskType.setPzComm, setPzCommVal); - + updateMachineParameter(idxMacchina, "setArt", setArtVal); updateMachineParameter(idxMacchina, "setComm", setCommVal); updateMachineParameter(idxMacchina, "setPzComm", setPzCommVal); @@ -869,15 +869,14 @@ namespace MP.IOC.Data updDict.Add(taskType.setComm, setCommVal); updDict.Add(taskType.setPzComm, setPzCommVal); - #if false addTask4Machine(machine.IdxMacchinaSlave, taskType.fixStopSetup, outData); - addTask4Machine(machine.IdxMacchinaSlave, taskType.forceResetPzCount, outData); + addTask4Machine(machine.IdxMacchinaSlave, taskType.forceResetPzCount, outData); // invio task caricamento dati ODL addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal); addTask4Machine(machine.IdxMacchinaSlave, taskType.setComm, setCommVal); addTask4Machine(machine.IdxMacchinaSlave, taskType.setPzComm, setPzCommVal); - + updateMachineParameter(machine.IdxMacchinaSlave, "setArt", setArtVal); updateMachineParameter(machine.IdxMacchinaSlave, "setComm", setCommVal); updateMachineParameter(machine.IdxMacchinaSlave, "setPzComm", setPzCommVal); @@ -914,7 +913,6 @@ namespace MP.IOC.Data return answ; } - public string CalcRecipe(RecipeModel currRecipe) { return mongoController.CalcRecipe(currRecipe); @@ -2418,7 +2416,7 @@ namespace MP.IOC.Data try { var currHash = Utils.RedKeyMsmi(idxMacchina); - answ = await RedisGetHashDictAsync(currHash); + answ = await RedisGetHashAsync(currHash); if (answ == null || answ.Length == 0) { answ = await resetMSMIAsync(idxMacchina); @@ -2452,6 +2450,7 @@ namespace MP.IOC.Data } return answ; } + /// /// Restitusice elenco KVP dei TASK (da passare a IOB-WIN) per l'impianto indicato /// @@ -3501,7 +3500,7 @@ namespace MP.IOC.Data return result; } - public async Task[]> RedisGetHashAsync(string redKey) + public async Task[]> RedisGetHashAsync(RedisKey redKey) { HashEntry[] rawData = await redisDb.HashGetAllAsync(redKey); var result = rawData.Where(x => !x.Name.IsNull).Select(x => new KeyValuePair($"{x.Name}", $"{x.Value}")).ToArray(); @@ -3615,6 +3614,17 @@ namespace MP.IOC.Data return answ; } + public async Task RedisSetHashAsync(RedisKey redKey, KeyValuePair[] valori, double expireSeconds = -1.0) + { + bool answ = false; + answ = await RedisSetHashAsync(redKey, valori); + if (expireSeconds > 0.0) + { + await redisDb.KeyExpireAsync(redKey, DateTime.Now.AddSeconds(expireSeconds)); + } + return answ; + } + public bool RedisSetHashDict(RedisKey redKey, Dictionary valori, double expireSeconds = -1.0) { bool answ = false; @@ -4824,7 +4834,7 @@ namespace MP.IOC.Data int.TryParse(mDatiMacchinaVal(idxMacchina, "BSR"), out BSR); Boolean.TryParse(mDatiMacchinaVal(idxMacchina, "ExplodeBit"), out ExplodeBit); int.TryParse(mDatiMacchinaVal(idxMacchina, "NumBit"), out NumBit); // non usato (x ora) - // recupero valore + // recupero valore valINT = int.Parse(valore, NumberStyles.HexNumber); // filtro newValInt = MP.Core.Utils.bMaskInt(valINT, BitFilt); @@ -4873,7 +4883,7 @@ namespace MP.IOC.Data int.TryParse(datiMacc.ContainsKey("BSR") ? datiMacc["BSR"] : "0", out BSR); Boolean.TryParse(datiMacc.ContainsKey("ExplodeBit") ? datiMacc["ExplodeBit"] : "false", out ExplodeBit); int.TryParse(datiMacc.ContainsKey("NumBit") ? datiMacc["NumBit"] : "0", out NumBit); // non usato (x ora) - // recupero valore + // recupero valore valINT = int.Parse(valore, NumberStyles.HexNumber); // filtro newValInt = MP.Core.Utils.bMaskInt(valINT, BitFilt); diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj index 0f6d257a..12db5c99 100644 --- a/MP.IOC/MP.IOC.csproj +++ b/MP.IOC/MP.IOC.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 6.16.2604.1709 + 6.16.2604.1718 diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html index 32944119..71aadd84 100644 --- a/MP.IOC/Resources/ChangeLog.html +++ b/MP.IOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-IOC -

Versione: 6.16.2604.1709

+

Versione: 6.16.2604.1718


Note di rilascio:
  • diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt index 974a30ac..88190268 100644 --- a/MP.IOC/Resources/VersNum.txt +++ b/MP.IOC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2604.1709 +6.16.2604.1718 diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml index 7516b3f9..561cba4b 100644 --- a/MP.IOC/Resources/manifest.xml +++ b/MP.IOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2604.1709 + 6.16.2604.1718 https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html false