Merge branch 'develop' into SDK

This commit is contained in:
Samuele Locatelli
2024-04-29 13:58:20 +02:00
6 changed files with 17 additions and 11 deletions
+3 -3
View File
@@ -501,15 +501,15 @@ namespace MagMan.Data.Tenant.Services
/// </summary>
/// <param name="origItem">DTO di partenza</param>
/// <returns></returns>
public LogMachineModel LogMacFromDto(LogMachineDTO origItem)
public LogMachineModel LogMacFromDto(LogMachineDTO origItem, int machineCloudId, int keyNum)
{
LogMachineModel answ = new LogMachineModel()
{
ProjDbId = origItem.ProjCloudId,
DtEvent = origItem.DtEvent,
EvType = origItem.EvType,
MachineID = origItem.MachineCloudId,
KeyNum = origItem.KeyNum,
MachineID = machineCloudId,
KeyNum = keyNum,
VarAddress = origItem.SupervId,
VarValue = origItem.VarValue
};
+10 -4
View File
@@ -71,8 +71,8 @@ namespace MagMan.UI.Controllers
{
// in primis recupero codice chiave da token...
int nKey = await MTAdmService.MainKeyByToken(id);
var rawList = await TService.LogMacGetLast(nKey, machineId,numRec);
if(rawList!=null)
var rawList = await TService.LogMacGetLast(nKey, machineId, numRec);
if (rawList != null)
{
ListRecords.AddRange(rawList);
}
@@ -95,10 +95,16 @@ namespace MagMan.UI.Controllers
{
// in primis recupero codice chiave da token...
int nKey = await MTAdmService.MainKeyByToken(id);
int machId = 0;
var machList = await MTAdmService.MachineGetByToken(id);
if (machList != null && machList.Count > 0)
{
machId = machList.FirstOrDefault()!.MachineID;
}
if (nKey > 0)
{
// converto elenco da Dto --> DB
var listRec = rawData.LogList.Select(x=> TService.LogMacFromDto(x)).ToList();
var listRec = rawData.LogList.Select(x => TService.LogMacFromDto(x, machId, nKey)).ToList();
try
{
// upsert!
@@ -109,7 +115,7 @@ namespace MagMan.UI.Controllers
Log.Error($"LogMachineController.upsert | Errore in fase salvataggio di {rawData.LogList.Count} LogMacDTO{Environment.NewLine}{exc}");
}
// resetto cache redis
await MTAdmService.FlushRedisCache();
await MTAdmService.FlushRedisCache();
}
}
return answ;
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>1.0.2404.2711</Version>
<Version>1.0.2404.2913</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MagMan - Wood Warehouse Management System</i>
<h4>Versione: 1.0.2404.2711</h4>
<h4>Versione: 1.0.2404.2913</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.0.2404.2711
1.0.2404.2913
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.2404.2711</version>
<version>1.0.2404.2913</version>
<url>http://nexus.steamware.net/repository/SWS/MagMan/stable/0/MagMan.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MagMan/stable/0/ChangeLog.html</changelog>
<mandatory>false</mandatory>