PODL:
- Fix ordinamento su DB
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Data;
|
||||
using MP.SPEC.Services;
|
||||
@@ -76,28 +77,7 @@ namespace MP.SPEC.Components
|
||||
|
||||
protected async Task cloneRecord(PODLExpModel selRec)
|
||||
{
|
||||
// creo record duplicato...
|
||||
PODLExpModel newRec = new PODLExpModel()
|
||||
{
|
||||
Attivabile = selRec.Attivabile,
|
||||
CodArticolo = selRec.CodArticolo,
|
||||
CodCli = selRec.CodCli,
|
||||
CodGruppo = selRec.CodGruppo,
|
||||
DueDate = selRec.DueDate,
|
||||
IdxMacchina = selRec.IdxMacchina,
|
||||
IdxOdl = selRec.IdxOdl,
|
||||
IdxPromessa = 0,
|
||||
InsertDate = selRec.InsertDate,
|
||||
KeyBCode = selRec.KeyBCode,
|
||||
KeyRichiesta = selRec.KeyRichiesta,
|
||||
Note = $"DUPLICATED - {selRec.Note}",
|
||||
NumPezzi = selRec.NumPezzi,
|
||||
Priorita = selRec.Priorita,
|
||||
PzPallet = selRec.PzPallet,
|
||||
Tcassegnato = selRec.Tcassegnato
|
||||
};
|
||||
currRecord = selRec;
|
||||
await RecordSel.InvokeAsync(newRec);
|
||||
await RecordSel.InvokeAsync(Utils.POdlExt.clone(selRec));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -708,7 +708,7 @@ namespace MP.SPEC.Data
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string readType = "DB";
|
||||
string currKey = $"{redisPOdlList}:{lanciato}:{keyRichPart}:{idxMacchina}:{codGruppo}";
|
||||
string currKey = $"{redisPOdlList}:{codGruppo}:{idxMacchina}:{keyRichPart}:{lanciato}";
|
||||
// cerco in redis dato valore sel macchina...
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
@@ -1064,7 +1064,12 @@ namespace MP.SPEC.Data
|
||||
/// <returns></returns>
|
||||
public async Task<bool> PODLDeleteRecord(PODLExpModel currRec)
|
||||
{
|
||||
return await dbController.PODLDeleteRecord(currRec);
|
||||
var dbResult = await dbController.PODLDeleteRecord(currRec);
|
||||
// elimino cache redis...
|
||||
RedisValue pattern = new RedisValue($"{redisXdlData}:*");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
await Task.Delay(1);
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1074,7 +1079,12 @@ namespace MP.SPEC.Data
|
||||
/// <returns></returns>
|
||||
public async Task<bool> POdlDoSetup(PODLExpModel currRec)
|
||||
{
|
||||
return await dbController.PODL_startSetup(currRec, 0, 1, 1, "");
|
||||
var dbResult = await dbController.PODL_startSetup(currRec, 0, 1, 1, "");
|
||||
// elimino cache redis...
|
||||
RedisValue pattern = new RedisValue($"{redisXdlData}:*");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
await Task.Delay(1);
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1082,13 +1092,13 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="currRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> POdlUpdateRecord(PODLExpModel currRec)
|
||||
public async Task<bool> POdlUpdateRecord(PODLModel currRec)
|
||||
{
|
||||
var dbResult = await dbController.PODLUpdateRecord(currRec);
|
||||
// elimino cache redis...
|
||||
RedisValue pattern = new RedisValue($"{redisPOdlList}:*");
|
||||
RedisValue pattern = new RedisValue($"{redisXdlData}:*");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
|
||||
await Task.Delay(1);
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
@@ -1243,13 +1253,16 @@ namespace MP.SPEC.Data
|
||||
|
||||
private const string redisMacList = redisBaseAddr + "SPEC:Cache:MacList";
|
||||
|
||||
private const string redisOdlCurrByMac = redisBaseAddr + "SPEC:Cache:OdlByMac";
|
||||
private const string redisOdlList = redisBaseAddr + "SPEC:Cache:OdlList";
|
||||
|
||||
private const string redisPOdlByOdl = redisBaseAddr + "SPEC:Cache:POdlByOdl";
|
||||
private const string redisPOdlByPOdl = redisBaseAddr + "SPEC:Cache:POdlByPOdl";
|
||||
private const string redisPOdlList = redisBaseAddr + "SPEC:Cache:POdlList";
|
||||
private const string redisPOdlListNOOdl = redisBaseAddr + "SPEC:Cache:POdlListNOOdl";
|
||||
private const string redisXdlData = redisBaseAddr + "SPEC:Cache:XDL";
|
||||
|
||||
private const string redisOdlCurrByMac = redisXdlData + ":OdlByMac";
|
||||
private const string redisOdlList = redisXdlData + ":OdlList";
|
||||
|
||||
private const string redisPOdlByOdl = redisXdlData + ":POdlByOdl";
|
||||
private const string redisPOdlByPOdl = redisXdlData + ":POdlByPOdl";
|
||||
private const string redisPOdlList = redisXdlData + ":POdlList";
|
||||
private const string redisPOdlListNOOdl = redisXdlData + ":POdlListNOOdl";
|
||||
private const string redisStatoCom = redisBaseAddr + "SPEC:Cache:StatoCom";
|
||||
|
||||
private const string redisTipoArt = redisBaseAddr + "SPEC:Cache:TipoArt";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2211.2817</Version>
|
||||
<Version>6.16.2211.2818</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -182,14 +182,11 @@ namespace MP.SPEC.Pages
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare le modifiche?"))
|
||||
return;
|
||||
await Task.Delay(1);
|
||||
var done = await MDService.POdlUpdateRecord(selRec);
|
||||
await callSyncDb(selRec);
|
||||
var clonedRec = MP.Data.Utils.POdlExt.convertToPOdl(selRec);
|
||||
var done = await MDService.POdlUpdateRecord(clonedRec);
|
||||
await callSyncDb(clonedRec);
|
||||
currRecord = null;
|
||||
await reloadData();
|
||||
// forzo update parametri
|
||||
await Task.Delay(1);
|
||||
currFase = "*";
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
|
||||
protected void UpdateTotCount(int newTotCount)
|
||||
@@ -359,7 +356,7 @@ namespace MP.SPEC.Pages
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <returns></returns>
|
||||
private async Task callSyncDb(PODLExpModel selRec)
|
||||
private async Task callSyncDb(PODLModel selRec)
|
||||
{
|
||||
// chiamo aggiunta task SyncDb...
|
||||
string idxMacc = selRec.IdxMacchina;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2211.2817</h4>
|
||||
<h4>Versione: 6.16.2211.2818</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.2817
|
||||
6.16.2211.2818
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.2817</version>
|
||||
<version>6.16.2211.2818</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user