fix grafici

This commit is contained in:
zaccaria.majid
2023-08-04 16:29:59 +02:00
parent 22909f3fdd
commit 2939dfb093
6 changed files with 101 additions and 12 deletions
+7 -5
View File
@@ -204,6 +204,7 @@ namespace SMGen.Data.Services
get => _configuration.GetValue<string>("ServerConf:BitCsvPath");
}
#if false
protected bool calcEmptyState
{
get => _configuration.GetValue<bool>("SetupOptions:DoCalcEmptyState");
@@ -212,7 +213,8 @@ namespace SMGen.Data.Services
protected bool calcItself
{
get => _configuration.GetValue<bool>("SetupOptions:DoCalcItself");
}
}
#endif
protected string procRootDir
{
@@ -377,7 +379,7 @@ namespace SMGen.Data.Services
/// <param name="currFile">Path file *.rul da processare</param>
/// <param name="saveToDb">Indica se salvare sul DB</param>
/// <returns></returns>
public async Task<FilesClass> EvalIn2StateRuleFile(FilesClass currFile, bool saveToDb)
public async Task<FilesClass> EvalIn2StateRuleFile(FilesClass currFile, bool saveToDb, bool calcItself, bool calcEmptyState)
{
await Task.Delay(1);
sz_state_machine_name = "";
@@ -453,7 +455,7 @@ namespace SMGen.Data.Services
{
var fileName = $"{currFile.origFileName.Split(".")[0]}.csv";
currFile.DLoadFileName = $"{Path.Combine(procRootDir, bitCsvPath, fileName)}";
currFile = await evalIn2State_transitions(currFile);
currFile = await evalIn2State_transitions(currFile, calcItself, calcEmptyState);
}
break;
@@ -495,6 +497,7 @@ namespace SMGen.Data.Services
/// <param name="currFile"></param>
/// <returns></returns>
protected async Task<FilesClass> evalIn2Ev_transitions(FilesClass currFile)
{
await Task.Delay(1);
StringBuilder sb = new StringBuilder();
@@ -620,13 +623,12 @@ namespace SMGen.Data.Services
}
return currFile;
}
/// <summary>
/// Valutazione schema macchina a stati x Ingressi --> stati
/// </summary>
/// <param name="currFile"></param>
/// <returns></returns>
protected async Task<FilesClass> evalIn2State_transitions(FilesClass currFile)
protected async Task<FilesClass> evalIn2State_transitions(FilesClass currFile, bool calcItself, bool calcEmptyState)
{
TranInList2add.Clear();
StringBuilder sb = new StringBuilder();
+5 -1
View File
@@ -37,6 +37,10 @@ namespace SMGen.Components
public SelectSMIn2EvParams currFilter { get; set; } = null!;
[Parameter]
public bool hasBit { get; set; } = false;
[Parameter]
public bool calcItSelf { get; set; } = false;
[Parameter]
public bool calcEmptyState { get; set; } = false;
[Inject]
protected SMGDataService SMGDService { get; set; } = null!;
@@ -97,7 +101,7 @@ namespace SMGen.Components
}
else
{
await SMGDService.EvalIn2StateRuleFile(item.Value, false);
await SMGDService.EvalIn2StateRuleFile(item.Value, false, calcItSelf, calcEmptyState);
}
item.Value.calcRunning = false;
await InvokeAsync(() => StateHasChanged());
+27 -6
View File
@@ -8,19 +8,40 @@
<p>
I dati generati potrebbero andare direttamente sul DB, nella tab <b>TransizioneStatiNew</b> (da creare...):
<br />
select * from TransizioneStatiNew
select * from TransizioneStatiNew
</p>
<p>
Vista in preview si può poi inserire in prod se confermato
</p>
<div class="d-flex justify-content-between">
<div>
<InputFile OnChange="@LoadFiles" multiple />
<div class="w-100 shadow-lg p-3 rounded mb-2">
<div class="d-flex justify-content-between w-100">
<div class="mb-2">
<InputFile OnChange="@LoadFiles" multiple />
</div>
<div class="d-flex justify-content-center">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" @bind="@CalcItself" id="flexCheckDefault">
<label class="form-check-label" for="flexCheckDefault">
Stesso stato
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" @bind="@CalcEmptyState" id="flexCheckDefault2">
<label class="form-check-label" for="flexCheckDefault2">
Stato zero
</label>
</div>
</div>
</div>
<FilesList PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter" hasBit="false" calcItSelf="@CalcItself" calcEmptyState="@CalcEmptyState"></FilesList>
</div>
<FilesList PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter" hasBit="false"></FilesList>
<div class="w-100 shadow-lg p-3 bg-body rounded mb-2">
<DataPager @ref="pagerSMIn2Ev" PageSize="@numRecord" currPage="@currPage" numRecordChanged="@ForceReload" numPageChanged="@ForceReloadPage" totalCount="@totalCount" />
</div>
<DataPager @ref="pagerSMIn2Ev" PageSize="@numRecord" currPage="@currPage" numRecordChanged="@ForceReload" numPageChanged="@ForceReloadPage" totalCount="@totalCount" />
+2
View File
@@ -53,6 +53,8 @@ namespace SMGen.Pages
await SMGDService.ExecFlushRedisPattern(Constants.FILES_TO_PROC);
}
protected bool CalcItself { get; set; } = false;
protected bool CalcEmptyState { get; set; } = false;
protected void ForceReload(int newNum)
{
numRecord = newNum;
@@ -21,6 +21,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;0;40;34
12;0;49;49
12;0;50;50
12;2;0;0
12;2;1;13
12;2;3;3
12;2;4;4
@@ -43,6 +44,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;2;40;34
12;2;49;49
12;2;50;50
12;3;0;0
12;3;1;13
12;3;2;2
12;3;4;4
@@ -65,6 +67,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;3;40;34
12;3;49;49
12;3;50;50
12;4;0;0
12;4;1;13
12;4;2;2
12;4;3;3
@@ -87,6 +90,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;4;40;34
12;4;49;49
12;4;50;50
12;5;0;0
12;5;1;13
12;5;2;2
12;5;3;3
@@ -109,6 +113,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;5;40;34
12;5;49;49
12;5;50;50
12;6;0;0
12;6;1;13
12;6;2;2
12;6;3;3
@@ -131,6 +136,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;6;40;34
12;6;49;49
12;6;50;50
12;7;0;0
12;7;1;13
12;7;2;2
12;7;3;3
@@ -153,6 +159,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;7;40;34
12;7;49;49
12;7;50;50
12;8;0;0
12;8;1;13
12;8;2;2
12;8;3;3
@@ -175,6 +182,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;8;40;34
12;8;49;49
12;8;50;50
12;9;0;0
12;9;1;13
12;9;2;2
12;9;3;3
@@ -197,6 +205,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;9;40;34
12;9;49;49
12;9;50;50
12;10;0;0
12;10;1;13
12;10;2;2
12;10;3;3
@@ -219,6 +228,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;10;40;34
12;10;49;49
12;10;50;50
12;11;0;0
12;11;1;13
12;11;2;2
12;11;3;3
@@ -254,6 +264,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;11;40;34
12;11;49;49
12;11;50;50
12;12;0;0
12;12;1;13
12;12;2;2
12;12;3;3
@@ -287,6 +298,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;12;40;34
12;12;49;49
12;12;50;50
12;13;0;0
12;13;2;2
12;13;3;3
12;13;4;4
@@ -318,6 +330,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;13;40;34
12;13;49;49
12;13;50;50
12;14;0;0
12;14;1;13
12;14;2;2
12;14;3;3
@@ -352,6 +365,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;14;40;34
12;14;49;49
12;14;50;50
12;15;0;0
12;15;1;13
12;15;2;2
12;15;3;3
@@ -384,6 +398,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;15;40;34
12;15;49;49
12;15;50;50
12;23;0;0
12;23;1;13
12;23;2;2
12;23;3;3
@@ -421,6 +436,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;23;40;34
12;23;49;49
12;23;50;50
12;24;0;0
12;24;1;13
12;24;2;2
12;24;3;3
@@ -454,6 +470,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;24;40;34
12;24;49;49
12;24;50;50
12;25;0;0
12;25;1;13
12;25;2;2
12;25;3;3
@@ -490,6 +507,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;25;40;34
12;25;49;49
12;25;50;50
12;26;0;0
12;26;1;13
12;26;2;2
12;26;3;3
@@ -527,6 +545,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;26;40;34
12;26;49;49
12;26;50;50
12;27;0;0
12;27;1;13
12;27;2;2
12;27;3;3
@@ -549,6 +568,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;27;40;34
12;27;49;49
12;27;50;50
12;28;0;0
12;28;1;13
12;28;2;2
12;28;3;3
@@ -572,6 +592,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;28;40;34
12;28;49;49
12;28;50;50
12;29;0;0
12;29;1;13
12;29;2;2
12;29;3;3
@@ -596,6 +617,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;29;40;34
12;29;49;49
12;29;50;50
12;30;0;0
12;30;1;13
12;30;2;2
12;30;3;3
@@ -617,6 +639,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;30;40;34
12;30;49;49
12;30;50;50
12;31;0;0
12;31;1;13
12;31;2;2
12;31;3;3
@@ -639,6 +662,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;31;40;34
12;31;49;49
12;31;50;50
12;32;0;0
12;32;1;13
12;32;2;2
12;32;3;3
@@ -661,6 +685,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;32;40;34
12;32;49;49
12;32;50;50
12;33;0;0
12;33;1;13
12;33;2;2
12;33;3;3
@@ -683,6 +708,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;33;40;34
12;33;49;49
12;33;50;50
12;34;0;0
12;34;1;13
12;34;2;2
12;34;3;3
@@ -707,6 +733,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;34;39;35
12;34;49;49
12;34;50;50
12;35;0;0
12;35;1;13
12;35;2;2
12;35;3;3
@@ -729,6 +756,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;35;40;34
12;35;49;49
12;35;50;50
12;49;0;0
12;49;1;13
12;49;2;2
12;49;3;3
@@ -751,6 +779,7 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
12;49;39;35
12;49;40;34
12;49;50;50
12;50;0;0
12;50;1;13
12;50;2;2
12;50;3;3
1 IdxFamiglia IdxStato IdxTipo next_IdxStato
21 12 0 40 34
22 12 0 49 49
23 12 0 50 50
24 12 2 0 0
25 12 2 1 13
26 12 2 3 3
27 12 2 4 4
44 12 2 40 34
45 12 2 49 49
46 12 2 50 50
47 12 3 0 0
48 12 3 1 13
49 12 3 2 2
50 12 3 4 4
67 12 3 40 34
68 12 3 49 49
69 12 3 50 50
70 12 4 0 0
71 12 4 1 13
72 12 4 2 2
73 12 4 3 3
90 12 4 40 34
91 12 4 49 49
92 12 4 50 50
93 12 5 0 0
94 12 5 1 13
95 12 5 2 2
96 12 5 3 3
113 12 5 40 34
114 12 5 49 49
115 12 5 50 50
116 12 6 0 0
117 12 6 1 13
118 12 6 2 2
119 12 6 3 3
136 12 6 40 34
137 12 6 49 49
138 12 6 50 50
139 12 7 0 0
140 12 7 1 13
141 12 7 2 2
142 12 7 3 3
159 12 7 40 34
160 12 7 49 49
161 12 7 50 50
162 12 8 0 0
163 12 8 1 13
164 12 8 2 2
165 12 8 3 3
182 12 8 40 34
183 12 8 49 49
184 12 8 50 50
185 12 9 0 0
186 12 9 1 13
187 12 9 2 2
188 12 9 3 3
205 12 9 40 34
206 12 9 49 49
207 12 9 50 50
208 12 10 0 0
209 12 10 1 13
210 12 10 2 2
211 12 10 3 3
228 12 10 40 34
229 12 10 49 49
230 12 10 50 50
231 12 11 0 0
232 12 11 1 13
233 12 11 2 2
234 12 11 3 3
264 12 11 40 34
265 12 11 49 49
266 12 11 50 50
267 12 12 0 0
268 12 12 1 13
269 12 12 2 2
270 12 12 3 3
298 12 12 40 34
299 12 12 49 49
300 12 12 50 50
301 12 13 0 0
302 12 13 2 2
303 12 13 3 3
304 12 13 4 4
330 12 13 40 34
331 12 13 49 49
332 12 13 50 50
333 12 14 0 0
334 12 14 1 13
335 12 14 2 2
336 12 14 3 3
365 12 14 40 34
366 12 14 49 49
367 12 14 50 50
368 12 15 0 0
369 12 15 1 13
370 12 15 2 2
371 12 15 3 3
398 12 15 40 34
399 12 15 49 49
400 12 15 50 50
401 12 23 0 0
402 12 23 1 13
403 12 23 2 2
404 12 23 3 3
436 12 23 40 34
437 12 23 49 49
438 12 23 50 50
439 12 24 0 0
440 12 24 1 13
441 12 24 2 2
442 12 24 3 3
470 12 24 40 34
471 12 24 49 49
472 12 24 50 50
473 12 25 0 0
474 12 25 1 13
475 12 25 2 2
476 12 25 3 3
507 12 25 40 34
508 12 25 49 49
509 12 25 50 50
510 12 26 0 0
511 12 26 1 13
512 12 26 2 2
513 12 26 3 3
545 12 26 40 34
546 12 26 49 49
547 12 26 50 50
548 12 27 0 0
549 12 27 1 13
550 12 27 2 2
551 12 27 3 3
568 12 27 40 34
569 12 27 49 49
570 12 27 50 50
571 12 28 0 0
572 12 28 1 13
573 12 28 2 2
574 12 28 3 3
592 12 28 40 34
593 12 28 49 49
594 12 28 50 50
595 12 29 0 0
596 12 29 1 13
597 12 29 2 2
598 12 29 3 3
617 12 29 40 34
618 12 29 49 49
619 12 29 50 50
620 12 30 0 0
621 12 30 1 13
622 12 30 2 2
623 12 30 3 3
639 12 30 40 34
640 12 30 49 49
641 12 30 50 50
642 12 31 0 0
643 12 31 1 13
644 12 31 2 2
645 12 31 3 3
662 12 31 40 34
663 12 31 49 49
664 12 31 50 50
665 12 32 0 0
666 12 32 1 13
667 12 32 2 2
668 12 32 3 3
685 12 32 40 34
686 12 32 49 49
687 12 32 50 50
688 12 33 0 0
689 12 33 1 13
690 12 33 2 2
691 12 33 3 3
708 12 33 40 34
709 12 33 49 49
710 12 33 50 50
711 12 34 0 0
712 12 34 1 13
713 12 34 2 2
714 12 34 3 3
733 12 34 39 35
734 12 34 49 49
735 12 34 50 50
736 12 35 0 0
737 12 35 1 13
738 12 35 2 2
739 12 35 3 3
756 12 35 40 34
757 12 35 49 49
758 12 35 50 50
759 12 49 0 0
760 12 49 1 13
761 12 49 2 2
762 12 49 3 3
779 12 49 39 35
780 12 49 40 34
781 12 49 50 50
782 12 50 0 0
783 12 50 1 13
784 12 50 2 2
785 12 50 3 3
@@ -0,0 +1,31 @@
IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
15;1;14;11
15;1;18;15
15;1;44;38
15;1;45;39
15;1;46;37
15;11;15;1
15;11;18;15
15;11;44;38
15;11;45;39
15;11;46;37
15;15;14;11
15;15;15;1
15;15;44;38
15;15;45;39
15;15;46;37
15;37;14;11
15;37;15;1
15;37;18;15
15;37;44;38
15;37;45;39
15;38;14;11
15;38;15;1
15;38;18;15
15;38;45;39
15;38;46;37
15;39;14;11
15;39;15;1
15;39;18;15
15;39;44;38
15;39;46;37
1 IdxFamiglia IdxStato IdxTipo next_IdxStato
2 15 1 14 11
3 15 1 18 15
4 15 1 44 38
5 15 1 45 39
6 15 1 46 37
7 15 11 15 1
8 15 11 18 15
9 15 11 44 38
10 15 11 45 39
11 15 11 46 37
12 15 15 14 11
13 15 15 15 1
14 15 15 44 38
15 15 15 45 39
16 15 15 46 37
17 15 37 14 11
18 15 37 15 1
19 15 37 18 15
20 15 37 44 38
21 15 37 45 39
22 15 38 14 11
23 15 38 15 1
24 15 38 18 15
25 15 38 45 39
26 15 38 46 37
27 15 39 14 11
28 15 39 15 1
29 15 39 18 15
30 15 39 44 38
31 15 39 46 37