Fix check errori presenti
This commit is contained in:
@@ -63,6 +63,25 @@ namespace WebDoorCreator.Data.Services
|
||||
redisConn.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restitusice gli errori della porta in oggetto
|
||||
/// </summary>
|
||||
/// <param name="doorIdVers">formato DoorId:Versione</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorErrExists(string doorIdVers)
|
||||
{
|
||||
bool hasErr = false;
|
||||
// cerco versione errore x la porta...
|
||||
var doorData = doorIdVers.Split(":");
|
||||
if (doorData.Length == 2)
|
||||
{
|
||||
RedisKey currErrKey = new RedisKey($"{Constants.CALC_REQ_ERRS}");
|
||||
int currId = await RedHashGet(currErrKey, doorData[0]);
|
||||
hasErr = doorData[1] == $"{currId}";
|
||||
}
|
||||
return hasErr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restitusice gli errori della porta in oggetto
|
||||
/// </summary>
|
||||
@@ -188,6 +207,31 @@ namespace WebDoorCreator.Data.Services
|
||||
Log.Trace($"RedHashRemove | {currKey} | in: {ts.TotalMilliseconds} ms");
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verify existence for single hash record
|
||||
/// </summary>
|
||||
/// <param name="currKey">Chiave redis della Hashlist</param>
|
||||
/// <param name="chiave">Chiave nella HashList</param>
|
||||
/// <returns>Esito rimozione</returns>
|
||||
public async Task<int> RedHashGet(RedisKey currKey, string chiave)
|
||||
{
|
||||
int result = 0;
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
var hasVal = await redisDb.HashExistsAsync(currKey, chiave);
|
||||
if (hasVal)
|
||||
{
|
||||
var rawRes = await redisDb.HashGetAsync(currKey, chiave);
|
||||
if (rawRes.HasValue)
|
||||
{
|
||||
int.TryParse($"{rawRes}", out result);
|
||||
}
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Trace($"RedHashGet | {currKey} | in: {ts.TotalMilliseconds} ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Queue request done
|
||||
|
||||
@@ -187,11 +187,12 @@ namespace WebDoorCreator.UI.Pages
|
||||
doorSvgVers = doorSvgVers.Replace(".", ":");
|
||||
}
|
||||
// fix ./:
|
||||
var tryGetErr = await QDataServ.DoorErrGet(doorSvgVers);
|
||||
if (tryGetErr != null)
|
||||
var hasErr = await QDataServ.DoorErrExists(doorSvgVers);
|
||||
if (hasErr)
|
||||
{
|
||||
var messErr = await QDataServ.DoorErrGet(doorSvgVers);
|
||||
IsErr = true;
|
||||
ErrCode = tryGetErr;
|
||||
ErrCode = messErr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -199,10 +200,10 @@ namespace WebDoorCreator.UI.Pages
|
||||
}
|
||||
|
||||
//cerco su redis la porta in oggetto
|
||||
|
||||
|
||||
//if (string.IsNullOrEmpty(DoorSvgContent))
|
||||
//{
|
||||
|
||||
|
||||
|
||||
//}
|
||||
await Task.Run(async () => await InvokeAsync(StateHasChanged));
|
||||
|
||||
@@ -15,9 +15,9 @@ order:
|
||||
date: 2023-12-05T00:00:00.0000000
|
||||
piece: DO_1
|
||||
size:
|
||||
width: 50
|
||||
height: 50
|
||||
thickness: 1.75
|
||||
width: 30
|
||||
height: 100
|
||||
thickness: 2
|
||||
swing: LHI
|
||||
secure: UP
|
||||
material: wood
|
||||
@@ -28,7 +28,7 @@ profiles:
|
||||
overmaterial: 0.1
|
||||
hingeedge:
|
||||
type: SQ
|
||||
machining: ON
|
||||
machining: OFF
|
||||
overmaterial: 0.1
|
||||
top:
|
||||
type: SQ
|
||||
@@ -36,26 +36,54 @@ profiles:
|
||||
overmaterial: 0.1
|
||||
bottom:
|
||||
type: SQ
|
||||
machining: ON
|
||||
machining: OFF
|
||||
overmaterial: 0.1
|
||||
hardware:
|
||||
louver_cut_outs:
|
||||
vision_cut_outs:
|
||||
- shape: Generic\Circle
|
||||
radius: 8.5
|
||||
center_from_top: 40
|
||||
center_from_lock: 0
|
||||
door_center: center
|
||||
- shape: Generic\Circle
|
||||
radius: 10
|
||||
center_from_top: 60
|
||||
center_from_lock: 0
|
||||
door_center: center
|
||||
- shape: Generic\Rect
|
||||
length: 10.0000
|
||||
width: 18.8125
|
||||
bottom_rail: 8.0
|
||||
lock_stile: 0.0
|
||||
length: 10
|
||||
width: 16
|
||||
top_rail: 5.5
|
||||
lock_stile: 0
|
||||
radius: 0
|
||||
door_center: center
|
||||
|
||||
face_decoration:
|
||||
- template: General\Decor_C
|
||||
type: lines
|
||||
depth: 0.0625
|
||||
topdistance: 5.0
|
||||
bottomdistance: 7.0
|
||||
lockstiledistance: 4.0
|
||||
hingestiledistance: 4.0
|
||||
face: secure
|
||||
hinges:
|
||||
- template: Generic Conceiled\StdConHingeDeepR
|
||||
ToptoCL: 10
|
||||
back_set: 0.125
|
||||
thickness: 0.25
|
||||
- template: Generic Conceiled\StdConHingeDeepR
|
||||
ToptoCL: 50
|
||||
back_set: 0.125
|
||||
thickness: 0.25
|
||||
- template: Generic Conceiled\StdConHingeDeepR
|
||||
ToptoCL: 80
|
||||
back_set: 0.125
|
||||
thickness: 0.25
|
||||
|
||||
flush_bolts:
|
||||
- template: Corner\8501
|
||||
type: corner
|
||||
side: top
|
||||
position: 5
|
||||
offset_WS: 0.0
|
||||
|
||||
strikes:
|
||||
- template: Generic\StdFaceStrike
|
||||
position: 57.875
|
||||
back_set: 2.75
|
||||
offset_WS: 0.0
|
||||
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user