From 37e54d8d1b1b0124b021de505b6c70959842138e Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 13 Dec 2022 09:12:33 +0100 Subject: [PATCH 01/48] fix minore --- MP.INVE/Components/InveSessionList.razor.cs | 3 --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/MP.INVE/Components/InveSessionList.razor.cs b/MP.INVE/Components/InveSessionList.razor.cs index f4761bdd..6209bc84 100644 --- a/MP.INVE/Components/InveSessionList.razor.cs +++ b/MP.INVE/Components/InveSessionList.razor.cs @@ -186,10 +186,7 @@ namespace MP.INVE.Components [Parameter] public bool isLoading { get; set; } - - [Parameter] public int currIdSess { get; set; } - [Parameter] public string currIdMag { get; set; } [Inject] diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 2ebf9ef8..c91b3bee 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1218 + 6.16.2212.1309 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 73878090..d3597473 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 6.16.2212.1218

+

Versione: 6.16.2212.1309


Note di rilascio: -
+
@if (articoloScan != "" && quantitaScan != 0 && canSave) { diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index f9149ebb..ee3a3890 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -96,7 +96,7 @@ namespace MP.INVE.Components canSave = false; } alreadyScan = scansioneClone; - lottoScan = alreadyScan.ScanValue; + lottoScan = alreadyScan.Lotto; oldArt = alreadyScan.CodArticolo; articoloScan = alreadyScan.CodArticolo; quantitaScan = Math.Round(alreadyScan.Qty, 2); @@ -194,6 +194,22 @@ namespace MP.INVE.Components { force = true; } + var lottoSave = lastScan; + var known = false; + var unique = false; + if(currUdc != null) + { + lottoSave = currUdc.Lotto; + known = true; + unique = true; + } + else if(currLottoEsterno != null || currLottoInterno != null) + { + + known = true; + unique = false; + } + ScanDataModel newScan = new ScanDataModel() { DtScan = DateTime.Now, @@ -201,12 +217,12 @@ namespace MP.INVE.Components ScanValue = lastScan, IsForced = force, CodArticolo = articoloScan, - Lotto = lastScan, + Lotto = lottoSave, RifExt = "", Qty = quantitaScan, Note = noteScan, - IsKnown = false, - IsUnique = false, + IsKnown = known, + IsUnique = unique, InveSessID = sessID }; await MIService.InsertNewScansione(newScan); From 9de714cf333f249238b2758a9707863f06b168e6 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 13 Dec 2022 17:54:56 +0100 Subject: [PATCH 15/48] pagina di test con bozza delete scan --- MP.INVE/Pages/Test.razor | 50 +++++++++++++++++++++++++++-- MP.INVE/Pages/Test.razor.cs | 63 ++++++++++++++++++++++--------------- 2 files changed, 85 insertions(+), 28 deletions(-) diff --git a/MP.INVE/Pages/Test.razor b/MP.INVE/Pages/Test.razor index d6e87d93..1451dc66 100644 --- a/MP.INVE/Pages/Test.razor +++ b/MP.INVE/Pages/Test.razor @@ -1,5 +1,5 @@ @page "/Test" -
+@*
UDC Già presente
@@ -46,4 +46,50 @@
-
+
*@ + + + + + + + + + + @if (elencoSCAN != null) + { + @foreach (var item in elencoSCAN) + { + + + + + + + } + } + +
Oggetto
+
+
+ Cod: @item.ScanValue +
+
+ Lotto: @item.Lotto +
+
+
+
+ Art: @item.CodArticolo +
+
+ Qty: @Math.Round(item.Qty, 0) +
+
+
+
+ +
+
diff --git a/MP.INVE/Pages/Test.razor.cs b/MP.INVE/Pages/Test.razor.cs index dd9bd12c..d363b80f 100644 --- a/MP.INVE/Pages/Test.razor.cs +++ b/MP.INVE/Pages/Test.razor.cs @@ -26,40 +26,51 @@ namespace MP.INVE.Pages [Inject] IJSRuntime JSRuntime { get; set; } = null!; - List? elencoUDC; - protected override async Task OnInitializedAsync() + protected string rawScan { get; set; } = null!; + + List? elencoSCAN; + protected override async Task OnParametersSetAsync() { await Task.Delay(1); - //elencoUDC = MIService.ElencoUDC().Take(4).ToList(); - - - - //await getId(); + } protected override async Task OnAfterRenderAsync(bool firstRender) { - if (firstRender) + //if (firstRender) + //{ + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", "20MFI000000001"); + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{102}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{102}", "20MSL000000002"); + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{103}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{103}", "21MFI000000017"); + + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{104}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{104}", "M200000019"); + + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{105}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{105}", "M210000055"); + + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{106}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{106}", "027407"); + + // await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{107}"); + // await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{107}", "ABCDE"); + //} + } + + protected void saveScan(string newScan) + { + if (!string.IsNullOrEmpty(newScan)) { - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", "20MFI000000001"); - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{102}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{102}", "20MSL000000002"); - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{103}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{103}", "21MFI000000017"); - - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{104}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{104}", "M200000019"); - - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{105}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{105}", "M210000055"); - - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{106}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{106}", "027407"); - - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{107}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{107}", "ABCDE"); + rawScan = newScan; + elencoSCAN = MIService.ScanList().Where(x => x.ScanValue == newScan).ToList(); } + } + protected void deleteScan(int idScan) + { + } private string CodUDC { get; set; } = null!; } From d510df4bf8ed0b537b50cf8fb8195a3dccb363b4 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 13 Dec 2022 17:55:05 +0100 Subject: [PATCH 16/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 789051c2..ab39095e 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1316 + 6.16.2212.1317 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 4c39dfbf..eaa630d2 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 6.16.2212.1316

+

Versione: 6.16.2212.1317


Note di rilascio:
  • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index 3e56200a..ced53a34 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1316 +6.16.2212.1317 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 6c755ea2..e4bed982 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1316 + 6.16.2212.1317 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 32334843e0315b0eacccf333809d3c00eed17ec6 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 13 Dec 2022 18:02:21 +0100 Subject: [PATCH 17/48] aggiunti metodi x deleteScansione --- MP.Data/Controllers/MpInveController.cs | 25 +++++++++++++++++++++++++ MP.INVE/Data/MiDataService.cs | 16 ++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index b0f47232..8fda9e72 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -235,6 +235,31 @@ namespace MP.Data.Controllers return fatto; } + /// + /// delete scansione + /// + /// + public async Task deleteScansione(ScanDataModel record) + { + bool fatto = false; + using (var dbCtx = new MoonPro_InveContext(_configuration)) + { + try + { + dbCtx + .DbScanData + .Remove(record); + await dbCtx.SaveChangesAsync(); + fatto = true; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante deleteScansione{Environment.NewLine}{exc}"); + } + } + return fatto; + } + #endregion gestione scansioni diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index 0c547067..1fdb940c 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -162,6 +162,7 @@ namespace MP.INVE.Data return result; // aggiungo record al DB } + public async Task deleteSessione(InventorySessionModel session) { bool result = false; @@ -177,6 +178,21 @@ namespace MP.INVE.Data return result; // elimino record dal DB } + public async Task deleteScansione(ScanDataModel scan) + { + bool result = false; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + result = await dbController.deleteScansione(scan); + // elimino cache redis... + RedisValue pattern = new RedisValue($"{redisScanBaseAddr}*"); + bool answ = await ExecFlushRedisPattern(pattern); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"deleteScansione | Id scansione: {scan.ScanID} | Codice scansionato: {scan.ScanValue} | {ts.TotalMilliseconds}ms"); + return result; + // elimino record dal DB + } public async Task InsertNewMag(AnagMagModel newMag) { From 81aec0c84cf24bbc59f3263d2d3863560351ae41 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 13 Dec 2022 18:02:46 +0100 Subject: [PATCH 18/48] Aggiunto bottone x eliminazione scansione test --- MP.INVE/Pages/Test.razor | 2 +- MP.INVE/Pages/Test.razor.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MP.INVE/Pages/Test.razor b/MP.INVE/Pages/Test.razor index 1451dc66..81671190 100644 --- a/MP.INVE/Pages/Test.razor +++ b/MP.INVE/Pages/Test.razor @@ -81,7 +81,7 @@
    -
    diff --git a/MP.INVE/Pages/Test.razor.cs b/MP.INVE/Pages/Test.razor.cs index d363b80f..45c98884 100644 --- a/MP.INVE/Pages/Test.razor.cs +++ b/MP.INVE/Pages/Test.razor.cs @@ -68,9 +68,9 @@ namespace MP.INVE.Pages elencoSCAN = MIService.ScanList().Where(x => x.ScanValue == newScan).ToList(); } } - protected void deleteScan(int idScan) + protected async Task deleteScan(ScanDataModel scan) { - + await MIService.deleteScansione(scan); } private string CodUDC { get; set; } = null!; } From 532176d9da7572b89b6754812079517502cca730 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 13 Dec 2022 18:02:53 +0100 Subject: [PATCH 19/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index ab39095e..c54341d4 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1317 + 6.16.2212.1318 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index eaa630d2..24e3acfa 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

    Versione: 6.16.2212.1317

    +

    Versione: 6.16.2212.1318


    Note di rilascio:
    • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index ced53a34..ca1e7157 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1317 +6.16.2212.1318 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index e4bed982..a8408d22 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1317 + 6.16.2212.1318 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From dba0f3e11a3ac82f19c9e5da4de0e720c9f7da14 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 14 Dec 2022 10:08:52 +0100 Subject: [PATCH 20/48] continuo pagina delete --- MP.INVE/Components/ListScan.razor | 47 ++++++++++++++++++ MP.INVE/Components/ListScan.razor.cs | 46 ++++++++++++++++++ MP.INVE/Components/ProcSuggestion.razor | 18 +++---- MP.INVE/Components/ProcSuggestion.razor.cs | 12 ++--- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Acquisizione.razor | 13 +++-- MP.INVE/Pages/DeleteScan.razor | 6 +++ MP.INVE/Pages/DeleteScan.razor.cs | 56 ++++++++++++++++++++++ MP.INVE/Pages/Invio.razor | 3 ++ MP.INVE/Pages/Test.razor | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 13 files changed, 186 insertions(+), 25 deletions(-) create mode 100644 MP.INVE/Components/ListScan.razor create mode 100644 MP.INVE/Components/ListScan.razor.cs create mode 100644 MP.INVE/Pages/DeleteScan.razor create mode 100644 MP.INVE/Pages/DeleteScan.razor.cs diff --git a/MP.INVE/Components/ListScan.razor b/MP.INVE/Components/ListScan.razor new file mode 100644 index 00000000..7cc8ac6d --- /dev/null +++ b/MP.INVE/Components/ListScan.razor @@ -0,0 +1,47 @@ +

      ListScan

      + + + + + + + + + + @if (elencoSCAN != null) + { + @foreach (var item in elencoSCAN) + { + + + + + + + } + } + +
      Oggetto
      +
      +
      + Cod: @item.ScanValue +
      +
      + Lotto: @item.Lotto +
      +
      +
      +
      + Art: @item.CodArticolo +
      +
      + Qty: @Math.Round(item.Qty, 0) +
      +
      +
      +
      + +
      +
      diff --git a/MP.INVE/Components/ListScan.razor.cs b/MP.INVE/Components/ListScan.razor.cs new file mode 100644 index 00000000..8ffdd6e3 --- /dev/null +++ b/MP.INVE/Components/ListScan.razor.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.INVE; +using MP.INVE.Shared; +using MP.INVE.Components; +using MP.Data.DatabaseModels; +using MP.INVE.Data; + +namespace MP.INVE.Components +{ + public partial class ListScan + { + [Inject] + MiDataService MIService { get; set; } = null!; + [Inject] + IJSRuntime JSRuntime { get; set; } = null!; + [Parameter] + public string lastScan { get; set; } = ""; + [Parameter] + public string userScan { get; set; } = null!; + [Parameter] + public int sessID { get; set; } = 0; + [Parameter] + public string magID { get; set; } = ""; + protected string rawScan { get; set; } = null!; + + List? elencoSCAN; + protected override async Task OnParametersSetAsync() + { + await Task.Delay(1); + + } + + } +} \ No newline at end of file diff --git a/MP.INVE/Components/ProcSuggestion.razor b/MP.INVE/Components/ProcSuggestion.razor index 6bc04ab3..5f7eb404 100644 --- a/MP.INVE/Components/ProcSuggestion.razor +++ b/MP.INVE/Components/ProcSuggestion.razor @@ -12,14 +12,14 @@ {
        -
      • +
      • Lotto:
        @tipo
      • -
      • +
      • Articolo:
        @@ -31,7 +31,7 @@ }
      • -
      • +
      • Quantità:
        @if (currLottoInterno != null || currLottoEsterno != null) @@ -50,14 +50,14 @@ }
      • -
      • +
      • Note:
      -
      +
      @if (articoloScan != "" && quantitaScan != 0 && canSave) { @@ -65,19 +65,19 @@ } else if (articoloScan == "" && quantitaScan != 0) { -
      Dati mancanti: Codice articolo
      +
      Dati mancanti: Codice articolo
      } else if (quantitaScan == 0 && articoloScan != "") { -
      Dati mancanti: Quantità a "0"
      +
      Dati mancanti: Quantità a "0"
      } else if (isKnown) { -
      Codice già scansionato per la sessione corrente
      +
      Codice già scansionato per la sessione corrente
      } else { -
      Dati mancanti: Codice articolo e Quantità
      +
      Dati mancanti: Codice articolo e Quantità
      }
      } diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index ee3a3890..7ea6cd30 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -26,20 +26,20 @@ namespace MP.INVE.Components { [Inject] private MiDataService MIService { get; set; } = null!; + [Inject] + public IJSRuntime JSRuntime { get; set; } = null!; + [Inject] + public NavigationManager NavManager { get; set; } = null!; + [Parameter] public string lastScan { get; set; } = ""; - //[Parameter] - //public EventCallback udcSend { get; set; } [Parameter] public string userScan { get; set; } = null!; [Parameter] public int sessID { get; set; } = 0; [Parameter] public string magID { get; set; } = ""; - [Inject] - public IJSRuntime JSRuntime { get; set; } = null!; - [Inject] - public NavigationManager NavManager { get; set; } = null!; + private string tipo { get; set; } = ""; private string canMod = "false"; diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index c54341d4..13d240d1 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1318 + 6.16.2212.1409 diff --git a/MP.INVE/Pages/Acquisizione.razor b/MP.INVE/Pages/Acquisizione.razor index 94640064..1c6d7d45 100644 --- a/MP.INVE/Pages/Acquisizione.razor +++ b/MP.INVE/Pages/Acquisizione.razor @@ -5,8 +5,13 @@
      -
      - Last scan: @rawScan +
      +
      + Last scan: @rawScan +
      +
      + #:@nScansioniTot +
      @@ -23,9 +28,7 @@
      S.@sessionId | @descr
      -
      - #:@nScansioniTot -
      +
      @magInv
      diff --git a/MP.INVE/Pages/DeleteScan.razor b/MP.INVE/Pages/DeleteScan.razor new file mode 100644 index 00000000..7cb6eec6 --- /dev/null +++ b/MP.INVE/Pages/DeleteScan.razor @@ -0,0 +1,6 @@ +@page "/DeleteScan" + +

      DeleteScan

      + + + diff --git a/MP.INVE/Pages/DeleteScan.razor.cs b/MP.INVE/Pages/DeleteScan.razor.cs new file mode 100644 index 00000000..88ab056b --- /dev/null +++ b/MP.INVE/Pages/DeleteScan.razor.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.INVE; +using MP.INVE.Shared; +using MP.INVE.Components; +using MP.Data.DatabaseModels; +using MP.INVE.Data; +using Microsoft.AspNetCore.WebUtilities; + +namespace MP.INVE.Pages +{ + public partial class DeleteScan + { + [Inject] + MiDataService MIService { get; set; } = null!; + [Inject] + NavigationManager NavManager { get; set; } = null!; + protected void saveScan(string newScan) + { + if (!string.IsNullOrEmpty(newScan)) + { + rawScan = newScan; + } + } + protected async Task deleteScan(ScanDataModel scan) + { + await MIService.deleteScansione(scan); + } + protected string rawScan { get; set; } = null!; + protected string idOpr { get; set; } = null!; + protected int sessionId { get; set; } = 0; + protected string magazzinoId { get; set; } = ""; + protected override async Task OnInitializedAsync() + { + await Task.Delay(1); + var uri = NavManager.ToAbsoluteUri(NavManager.Uri); + if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSess", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag)) + { + idOpr = _matrOpr; + sessionId = int.Parse(_inveSessionId); + magazzinoId = _idMag; + } + } + } +} \ No newline at end of file diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor index c481ef41..a9dd4f12 100644 --- a/MP.INVE/Pages/Invio.razor +++ b/MP.INVE/Pages/Invio.razor @@ -3,3 +3,6 @@

      Invio

      + + + diff --git a/MP.INVE/Pages/Test.razor b/MP.INVE/Pages/Test.razor index 81671190..5ba4e00d 100644 --- a/MP.INVE/Pages/Test.razor +++ b/MP.INVE/Pages/Test.razor @@ -82,7 +82,7 @@
      diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 24e3acfa..ee89d9b1 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

      Versione: 6.16.2212.1318

      +

      Versione: 6.16.2212.1409


      Note di rilascio:
      • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index ca1e7157..46d2f8cf 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1318 +6.16.2212.1409 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index a8408d22..a9a3e7e5 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1318 + 6.16.2212.1409 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 55d6c2f70657c4a8225e46e13f4d16f17a0248e7 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 14 Dec 2022 11:45:49 +0100 Subject: [PATCH 21/48] fix messaggio di errore --- MP.INVE/Components/ProcSuggestion.razor.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index 7ea6cd30..ff56683b 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -68,6 +68,7 @@ namespace MP.INVE.Components protected override async Task OnParametersSetAsync() { + isKnown = false; // se il valore scansionato è != null... if (string.IsNullOrEmpty(lastScan)) { From 087969dbe4d1bec7379085ceeeb462eb07e480e5 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 14 Dec 2022 14:43:45 +0100 Subject: [PATCH 22/48] aggiunta pagina invio --- MP.Data/Controllers/MpInveController.cs | 30 +++++- MP.Data/Controllers/MpSpecController.cs | 1 - MP.Data/DatabaseModels/InveSessTotLotModel.cs | 24 +++++ MP.Data/MoonPro_InveContext.cs | 1 + MP.INVE/Components/ListTotLotto.razor | 50 ++++++++++ MP.INVE/Components/ListTotLotto.razor.cs | 92 +++++++++++++++++++ MP.INVE/Data/MiDataService.cs | 19 ++++ MP.INVE/Data/SelectInvioParams.cs | 55 +++++++++++ MP.INVE/Data/SelectScanParams.cs | 10 +- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Invio.razor | 40 +++++++- MP.INVE/Pages/Invio.razor.cs | 75 ++++++++++++++- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 15 files changed, 388 insertions(+), 17 deletions(-) create mode 100644 MP.Data/DatabaseModels/InveSessTotLotModel.cs create mode 100644 MP.INVE/Components/ListTotLotto.razor create mode 100644 MP.INVE/Components/ListTotLotto.razor.cs create mode 100644 MP.INVE/Data/SelectInvioParams.cs diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index 8fda9e72..002bf103 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -462,7 +462,7 @@ namespace MP.Data.Controllers } #endregion gestione UDC - #region gestione lotti + #region gestione lotti interni /// /// elenco lotti /// @@ -500,7 +500,7 @@ namespace MP.Data.Controllers return dbResult; } - #endregion gestione lotti + #endregion gestione lotti interni #region gestione sessione @@ -598,6 +598,32 @@ namespace MP.Data.Controllers #endregion gestione sessione + #region gestione totale lotti + + + /// + /// Elenco Totale lotti x sessione + /// + /// + /// + public List InveSessTotLotList(int sessID) + { + List dbResult = new List(); + using (var dbCtx = new MoonPro_InveContext(_configuration)) + { + var SessID = new SqlParameter("@sessId", sessID); + + dbResult = dbCtx + .DbTotLotti + .FromSqlRaw("exec dbo.stp_INVE_TotLotBySess @sessId", SessID) + .AsNoTracking() + .AsEnumerable() + .ToList(); + } + return dbResult; + } + #endregion gestione totale lotti + #endregion Public Methods #region Private Fields diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index 920ba9b2..3f8b3c6d 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -665,7 +665,6 @@ namespace MP.Data.Controllers .DbSetPODLExp .FromSqlRaw("EXEC stp_PODL_getByFiltSpec @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DateFrom, @DateTo", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo) .AsNoTracking() - //.AsEnumerable() .ToList(); } return dbResult; diff --git a/MP.Data/DatabaseModels/InveSessTotLotModel.cs b/MP.Data/DatabaseModels/InveSessTotLotModel.cs new file mode 100644 index 00000000..a4966250 --- /dev/null +++ b/MP.Data/DatabaseModels/InveSessTotLotModel.cs @@ -0,0 +1,24 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MP.Data.DatabaseModels +{ + [Keyless] + public partial class InveSessTotLotModel + { + public int InveSessID { get; set; } + public int MagID { get; set; } + public string CodMag { get; set; } + public string DescMag { get; set; } + public string Lotto { get; set; } + public string CodArticolo { get; set; } + public string DescrArt { get; set; } + public int NumColli { get; set; } + public decimal TotLotto { get; set; } + public bool IsForced { get; set; } + } +} diff --git a/MP.Data/MoonPro_InveContext.cs b/MP.Data/MoonPro_InveContext.cs index a6cec875..383ecec5 100644 --- a/MP.Data/MoonPro_InveContext.cs +++ b/MP.Data/MoonPro_InveContext.cs @@ -54,6 +54,7 @@ namespace MP.Data public virtual DbSet DbLottoData { get; set; } public virtual DbSet DbArtMag { get; set; } public virtual DbSet DbLottoArca { get; set; } + public virtual DbSet DbTotLotti { get; set; } #endregion PER INVE #region PER SPEC diff --git a/MP.INVE/Components/ListTotLotto.razor b/MP.INVE/Components/ListTotLotto.razor new file mode 100644 index 00000000..8c12f29d --- /dev/null +++ b/MP.INVE/Components/ListTotLotto.razor @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + @if (elencoTotLotto != null) + { + @foreach (var item in elencoTotLotto) + { + + + + + + + + + + + } + } + +
        ID sessioneMagazzinoDescrizione MagLottoArticoloDescrizione ArtTot colliTot lotto
        + @item.InveSessID + + @item.CodMag + + @item.DescMag + + @item.Lotto + + @item.CodArticolo + + @item.DescrArt + + @item.NumColli + + @item.TotLotto +
        diff --git a/MP.INVE/Components/ListTotLotto.razor.cs b/MP.INVE/Components/ListTotLotto.razor.cs new file mode 100644 index 00000000..b8bc91a2 --- /dev/null +++ b/MP.INVE/Components/ListTotLotto.razor.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.INVE; +using MP.INVE.Shared; +using MP.INVE.Components; +using MP.Data.DatabaseModels; +using MP.INVE.Data; + +namespace MP.INVE.Components +{ + public partial class ListTotLotto + { + public void Dispose() + { + elencoTotLotto = null; + SearchRecords = null; + GC.Collect(); + } + [Parameter] + public int SessionID { get; set; } = 0; + + [Inject] + protected MiDataService MIService { get; set; } = null!; + private int totalCount + { + get => currParams.TotCount; + set + { + currParams.TotCount = value; + StateHasChanged(); + } + } + private int numRecord + { + get => currParams.NumRec; + set + { + currParams.NumRec = value; + StateHasChanged(); + } + } + private int currPage + { + get => currParams.CurrPage; + set + { + currParams.CurrPage = value; + StateHasChanged(); + } + } + + protected async override Task OnParametersSetAsync() + { + await Task.Delay(1); + if (SessionID != 0) + { + await reloadData(); + } + } + private async Task reloadData() + { + elencoTotLotto = null; + totalCount = 0; + isLoading = true; + SearchRecords = MIService.InveSessTotLotList(SessionID); + totalCount = SearchRecords.Count; + elencoTotLotto = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); + await Task.Delay(1); + await InvokeAsync(() => StateHasChanged()); + await Task.Delay(1); + isLoading = false; + } + protected List? elencoTotLotto; + private List? SearchRecords; + [Parameter] + public SelectInvioParams currParams { get; set; } = null!; + + [Parameter] + public bool isLoading { get; set; } + } +} \ No newline at end of file diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index 1fdb940c..76856a20 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -360,6 +360,24 @@ namespace MP.INVE.Data Log.Debug($"ScanList Read from {source}: {ts.TotalMilliseconds}ms"); return result; } + public List InveSessTotLotList(int sessID) + { + string source = ""; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + List? result = new List(); + result = dbController.InveSessTotLotList(sessID); + source = "DB"; + if (result == null) + { + result = new List(); + } + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"InveSessTotLotList Read from {source}: {ts.TotalMilliseconds}ms"); + return result; + } + public ScanDataModel ScanByUdcSession(string udc, int inveSessId) { string source = ""; @@ -675,6 +693,7 @@ namespace MP.INVE.Data private const string redisOperatoriBaseAddr = ":Operatore"; private const string redisLottiBaseAddr = ":Lotti"; private const string redisUdcBaseAddr = ":UDC"; + private const string redisTotLottoAddr = ":TotaleLotto"; private const string redisLottiInterni = redisBaseAddr + redisLottiBaseAddr + ":LottiInterni"; private const string redisLottiEsterni = redisBaseAddr + redisLottiBaseAddr + ":LottiEsterni"; private const string redisConfigBaseAddr = ":Config"; diff --git a/MP.INVE/Data/SelectInvioParams.cs b/MP.INVE/Data/SelectInvioParams.cs new file mode 100644 index 00000000..d6257110 --- /dev/null +++ b/MP.INVE/Data/SelectInvioParams.cs @@ -0,0 +1,55 @@ +using MP.Data; + +namespace MP.INVE.Data +{ + public class SelectScanParams + { + #region Public Constructors + + public SelectScanParams() + { } + + #endregion Public Constructors + + #region Public Properties + + public int CurrPage { get; set; } = 1; + public int NumRec { get; set; } = 10; + public int TotCount { get; set; } = 0; + public int MaxRecord { get; set; } = 100; + public string UDC { get; set; } = ""; + + #endregion Public Properties + + #region Public Methods + + public override bool Equals(object obj) + { + if (!(obj is SelectScanParams item)) + return false; + + if (MaxRecord != item.MaxRecord) + return false; + + if (TotCount != item.TotCount) + return false; + + if (NumRec != item.NumRec) + + if (CurrPage != item.CurrPage) + return false; + + if (UDC != item.UDC) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP.INVE/Data/SelectScanParams.cs b/MP.INVE/Data/SelectScanParams.cs index d6257110..c5ef148c 100644 --- a/MP.INVE/Data/SelectScanParams.cs +++ b/MP.INVE/Data/SelectScanParams.cs @@ -2,11 +2,11 @@ namespace MP.INVE.Data { - public class SelectScanParams + public class SelectInvioParams { #region Public Constructors - public SelectScanParams() + public SelectInvioParams() { } #endregion Public Constructors @@ -17,7 +17,6 @@ namespace MP.INVE.Data public int NumRec { get; set; } = 10; public int TotCount { get; set; } = 0; public int MaxRecord { get; set; } = 100; - public string UDC { get; set; } = ""; #endregion Public Properties @@ -25,7 +24,7 @@ namespace MP.INVE.Data public override bool Equals(object obj) { - if (!(obj is SelectScanParams item)) + if (!(obj is SelectInvioParams item)) return false; if (MaxRecord != item.MaxRecord) @@ -39,9 +38,6 @@ namespace MP.INVE.Data if (CurrPage != item.CurrPage) return false; - if (UDC != item.UDC) - return false; - return true; } diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 13d240d1..9554dd75 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1409 + 6.16.2212.1413 diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor index a9dd4f12..4ed02cf6 100644 --- a/MP.INVE/Pages/Invio.razor +++ b/MP.INVE/Pages/Invio.razor @@ -1,6 +1,44 @@ @page "/Invio" -

        Invio

        +@if (isLoading) +{ + +} +else +{ + +
        +
        +

        Invio

        +
        +
        + @if (elencoSessioni != null) + { +
        + SESSIONE + +
        + @if (sessID != 0) + { + + } + } +
        + + @*if (sessID != 0) + { + + }*@ +
        +} diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs index 9988e20a..6e72459e 100644 --- a/MP.INVE/Pages/Invio.razor.cs +++ b/MP.INVE/Pages/Invio.razor.cs @@ -17,15 +17,86 @@ using MP.INVE.Components; using Blazored.LocalStorage; using MP.Data.DTO; using MP.Data; +using MP.INVE.Data; +using MP.Data.DatabaseModels; namespace MP.INVE.Pages { public partial class Invio { - + [Inject] + public MiDataService MIService { get; set; } = null!; + + protected SelectInvioParams currParams = new SelectInvioParams(); + + private int totalCount + { + get => currParams.TotCount; + set + { + if (currParams.TotCount != value) + { + currParams.TotCount = value; + } + } + } + private int numRecord + { + get => currParams.NumRec; + set + { + if (currParams.NumRec != value) + { + currParams.NumRec = value; + } + } + } + private int currPage + { + get => currParams.CurrPage; + set + { + if (currParams.CurrPage != value) + { + currParams.CurrPage = value; + } + } + } + protected void ForceReload(int newNum) + { + numRecord = newNum; + } + + protected void ForceReloadPage(int newNum) + { + currPage = newNum; + } + protected List sessions { get; set; } = null!; + protected override async Task OnInitializedAsync() { - + await reloadData(); + } + + private List? elencoSessioni; + protected bool isLoading = false; + + private async Task reloadData() + { + elencoSessioni = null; + isLoading = true; + elencoSessioni = MIService.InventSessCurrList(); + await Task.Delay(1); + await InvokeAsync(() => StateHasChanged()); + await Task.Delay(1); + isLoading = false; + } + + private int _sessID; + protected int sessID + { + get => _sessID; + set=> _sessID = value; } } } \ No newline at end of file diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index ee89d9b1..c4cb6949 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

        Versione: 6.16.2212.1409

        +

        Versione: 6.16.2212.1413


        Note di rilascio:
        • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index 46d2f8cf..f076be7a 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1409 +6.16.2212.1413 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index a9a3e7e5..702cc69d 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1409 + 6.16.2212.1413 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 1b9dd6260600a218b68a9d1b73aff3cf3411b843 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 14 Dec 2022 16:47:01 +0100 Subject: [PATCH 23/48] fix pagina invio --- MP.Data/Controllers/MpInveController.cs | 19 ++++ MP.INVE/Components/InveSessionList.razor | 4 +- MP.INVE/Data/MiDataService.cs | 16 ++++ MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Invio.razor | 109 +++++++++++++++++------ MP.INVE/Pages/Invio.razor.cs | 87 +++++++++++++----- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 9 files changed, 190 insertions(+), 53 deletions(-) diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index 002bf103..13424d25 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -554,6 +554,25 @@ namespace MP.Data.Controllers return fatto; } + /// + /// Elenco Inventari Filtrati per id + /// + /// + public InventorySessionModel InventSessByID(int sessID) + { + InventorySessionModel dbResult = new InventorySessionModel(); + using (var dbCtx = new MoonPro_InveContext(_configuration)) + { + dbResult = dbCtx + .DbInveSess + .Where(x => x.InveSessID == sessID) + .Include(m => m.AnagMagNav) + .AsNoTracking() + .OrderByDescending(x => x.DtStart) + .FirstOrDefault(); + } + return dbResult; + } /// /// Elenco Inventari tipo Azienda (TUTTI, chiusi e paerti) filtrati x data /// diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index 8c065481..716eb16e 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -94,9 +94,9 @@ { - + } diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index 76856a20..44d1edfd 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -625,6 +625,22 @@ namespace MP.INVE.Data return result; } + public InventorySessionModel InventSessByID(int sessID) + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + InventorySessionModel result = new InventorySessionModel(); + string source = "DB"; + result = dbController.InventSessByID(sessID); + if (result == null) + { + result = new InventorySessionModel(); + } + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"InventSessByID Read from {source}: {ts.TotalMilliseconds}ms"); + return result; + } #endregion Public Methods #region Protected Fields diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 9554dd75..765c7353 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1413 + 6.16.2212.1416 diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor index 4ed02cf6..a030f179 100644 --- a/MP.INVE/Pages/Invio.razor +++ b/MP.INVE/Pages/Invio.razor @@ -7,37 +7,96 @@ else { -
          -
          -

          Invio

          -
          -
          - @if (elencoSessioni != null) - { -
          - SESSIONE - + @if (sessione != null) + { +
          +
          +
          +

          Invio

          +
          + @if (sessione.DtEnd == null) + { + + } + else if ((sessione.DtEnd != null) && (!sessione.Transferred)) + { + + + } +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + + + +
          ID sessioneDescrizioneMagazzinoDescrizione MagDurata
          + @sessione.InveSessID + + @sessione.Description + + @sessione.AnagMagNav.CodMag + + @sessione.AnagMagNav.DescMag + +
          +
          + @sessione.DtStart +
          +
          + >> +
          + @if (sessione.DtEnd != null) + { +
          + @sessione.DtEnd +
          + } + else + { +
          + In corso.. +
          + } +
          +
          + +
          +
          +
          +
          @if (sessID != 0) { - + } - } -
          - - @*if (sessID != 0) - { - - }*@ + + @*if (sessID != 0) + { + + }*@ +
          + } } diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs index 6e72459e..50eb7063 100644 --- a/MP.INVE/Pages/Invio.razor.cs +++ b/MP.INVE/Pages/Invio.razor.cs @@ -19,6 +19,7 @@ using MP.Data.DTO; using MP.Data; using MP.INVE.Data; using MP.Data.DatabaseModels; +using Microsoft.AspNetCore.WebUtilities; namespace MP.INVE.Pages { @@ -27,41 +28,53 @@ namespace MP.INVE.Pages [Inject] public MiDataService MIService { get; set; } = null!; - protected SelectInvioParams currParams = new SelectInvioParams(); + protected SelectInvioParams invioParams = new SelectInvioParams(); + protected SelectInveSessionParams sessParams = new SelectInveSessionParams(); private int totalCount { - get => currParams.TotCount; + get => invioParams.TotCount; set { - if (currParams.TotCount != value) + if (invioParams.TotCount != value) { - currParams.TotCount = value; + invioParams.TotCount = value; } } } private int numRecord { - get => currParams.NumRec; + get => invioParams.NumRec; set { - if (currParams.NumRec != value) + if (invioParams.NumRec != value) { - currParams.NumRec = value; + invioParams.NumRec = value; } } } private int currPage { - get => currParams.CurrPage; + get => invioParams.CurrPage; set { - if (currParams.CurrPage != value) + if (invioParams.CurrPage != value) { - currParams.CurrPage = value; + invioParams.CurrPage = value; } } } + private string idOperatore + { + get => sessParams.idOperatore; + set => sessParams.idOperatore = value; + } + private string authKey + { + get => sessParams.authKey; + set => sessParams.authKey = value; + } + protected void ForceReload(int newNum) { numRecord = newNum; @@ -71,32 +84,62 @@ namespace MP.INVE.Pages { currPage = newNum; } - protected List sessions { get; set; } = null!; protected override async Task OnInitializedAsync() { + + var uri = NavManager.ToAbsoluteUri(NavManager.Uri); + if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("sessID", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag)) + { + sessID = int.Parse(_inveSessionId); + codMag = int.Parse(_idMag); + } + await reloadData(); + + } + protected async override Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); + await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", rawCode); + } } - private List? elencoSessioni; + [Inject] + private IConfiguration Configuration { get; set; } = null!; + [Inject] + private IJSRuntime JSRuntime { get; set; } = null!; + [Inject] + private NavigationManager NavManager { get; set; } = null!; + protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrlJumper"]}"; } + + + protected string rawCode + { + get + { + string answ = ""; + answ = $"{BaseUrlTab}IdSessione={sessID}&IdMag={codMag}&MatrOpr={idOperatore}&UserAuthKey={authKey}"; + return answ; + } + } + + private InventorySessionModel? sessione; protected bool isLoading = false; private async Task reloadData() { - elencoSessioni = null; + + sessione = null; isLoading = true; - elencoSessioni = MIService.InventSessCurrList(); - await Task.Delay(1); - await InvokeAsync(() => StateHasChanged()); + sessione = MIService.InventSessByID(sessID); await Task.Delay(1); isLoading = false; } - private int _sessID; - protected int sessID - { - get => _sessID; - set=> _sessID = value; - } + protected int sessID { get; set; } = 0; + protected int codMag { get; set; } = 0; } } \ No newline at end of file diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index c4cb6949..46c400db 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

          Versione: 6.16.2212.1413

          +

          Versione: 6.16.2212.1416


          Note di rilascio:
          • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index f076be7a..d60391cb 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1413 +6.16.2212.1416 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 702cc69d..55e249a9 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1413 + 6.16.2212.1416 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From bd23c6a49375d81ea1f575e94f83be050e7da085 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 14 Dec 2022 18:38:25 +0100 Subject: [PATCH 24/48] fix pagina invio sessione --- MP.Data/Controllers/MpInveController.cs | 44 +++++++++++++++++++ MP.INVE/Components/ListTotLotto.razor | 14 +----- MP.INVE/Data/MiDataService.cs | 25 +++++++++++ MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Invio.razor | 58 ++++++++++++++++--------- MP.INVE/Pages/Invio.razor.cs | 44 +++++++++++++++++-- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 9 files changed, 152 insertions(+), 41 deletions(-) diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index 13424d25..d78c2f94 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -5,6 +5,7 @@ using MP.Data.DatabaseModels; using NLog; using System; using System.Collections.Generic; +using System.Formats.Asn1; using System.Linq; using System.Threading.Tasks; @@ -573,6 +574,7 @@ namespace MP.Data.Controllers } return dbResult; } + /// /// Elenco Inventari tipo Azienda (TUTTI, chiusi e paerti) filtrati x data /// @@ -615,6 +617,48 @@ namespace MP.Data.Controllers return dbResult; } + /// + /// Chiusura/apertura sessione + /// + /// + /// + /// + public async Task CloseOpenSessione(int sessID, bool flgClose) + { + bool answ = false; + using (var dbCtx = new MoonPro_InveContext(_configuration)) + { + var SessID = new SqlParameter("@InveSessID", sessID); + var FlgClose = new SqlParameter("@FlgClose", flgClose); + + var callResulr = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_INV_CloseOpen @InveSessID, @FlgClose", SessID, FlgClose); + + answ = true; + } + return answ; + } + /// + /// Trasferimento + /// + /// + /// + public async Task TransferSessione(int sessID) + { + bool answ = false; + using (var dbCtx = new MoonPro_InveContext(_configuration)) + { + var SessID = new SqlParameter("@InveSessID", sessID); + + var callResulr = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_INV_InveSess_Transfer @InveSessID", SessID); + + answ = true; + } + return answ; + } #endregion gestione sessione #region gestione totale lotti diff --git a/MP.INVE/Components/ListTotLotto.razor b/MP.INVE/Components/ListTotLotto.razor index 8c12f29d..2de2f74a 100644 --- a/MP.INVE/Components/ListTotLotto.razor +++ b/MP.INVE/Components/ListTotLotto.razor @@ -3,9 +3,6 @@ - - - @@ -19,15 +16,6 @@ @foreach (var item in elencoTotLotto) { - - - @@ -41,7 +29,7 @@ @item.NumColli } diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index 44d1edfd..d173b517 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -641,6 +641,31 @@ namespace MP.INVE.Data Log.Debug($"InventSessByID Read from {source}: {ts.TotalMilliseconds}ms"); return result; } + + public async Task CloseOpenSessione(int sessID, bool flgClose) + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + bool result = false; + string source = "DB"; + result = await dbController.CloseOpenSessione(sessID, flgClose); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"CloseOpenSessione Read from {source}: {ts.TotalMilliseconds}ms"); + return result; + } + public async Task TransferSessione(int sessID) + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + bool result = false; + string source = "DB"; + result = await dbController.TransferSessione(sessID); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"TransferSessione Read from {source}: {ts.TotalMilliseconds}ms"); + return result; + } #endregion Public Methods #region Protected Fields diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 765c7353..8a39520b 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1416 + 6.16.2212.1418 diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor index a030f179..f6351dac 100644 --- a/MP.INVE/Pages/Invio.razor +++ b/MP.INVE/Pages/Invio.razor @@ -13,17 +13,6 @@ else

            Invio

            -
            - @if (sessione.DtEnd == null) - { - - } - else if ((sessione.DtEnd != null) && (!sessione.Transferred)) - { - - - } -
            @@ -35,6 +24,7 @@ else
            + @@ -73,19 +63,47 @@ else } - +
            ID sessioneMagazzinoDescrizione Mag Lotto Articolo Descrizione Art
            - @item.InveSessID - - @item.CodMag - - @item.DescMag - @item.Lotto - @item.TotLotto + @($"{item.TotLotto:N2}")
            Magazzino Descrizione Mag Durata
            +
            + + @if (sessione.DtEnd == null) + { + + } + else + { + + } + @if ((sessione.DtEnd != null) && (!sessione.Transferred)) + { + + + } + else{ + + + } +
            +
            - -
            -
            -
            -
            -
            - @if (sessID != 0) + @if ((sessione.DtEnd == null) && (!sessione.Transferred)) { - +
            +
            +
            +
            +
            + } + @if (mostra) + { + @if (sessID != 0) + { + + } }
          diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs index 50eb7063..c2c0e8fe 100644 --- a/MP.INVE/Pages/Invio.razor.cs +++ b/MP.INVE/Pages/Invio.razor.cs @@ -84,7 +84,37 @@ namespace MP.INVE.Pages { currPage = newNum; } + protected bool mostra = false; + protected void mostraDati() + { + mostra = true; + } + protected async void chiudiSessione(int sessID) + { + var closed = await MIService.CloseOpenSessione(sessID, true); + if (closed) + { + NavManager.NavigateTo(NavManager.Uri, true); + } + } + + protected async void apriSessione(int sessID) + { + var open = await MIService.CloseOpenSessione(sessID, false); + if (open) + { + NavManager.NavigateTo(NavManager.Uri, true); + } + } + protected async void trasfSessione(int sessID) + { + var trasf = await MIService.TransferSessione(sessID); + if (trasf) + { + NavManager.NavigateTo(NavManager.Uri, true); + } + } protected override async Task OnInitializedAsync() { @@ -94,7 +124,7 @@ namespace MP.INVE.Pages sessID = int.Parse(_inveSessionId); codMag = int.Parse(_idMag); } - + await reloadData(); } @@ -102,8 +132,14 @@ namespace MP.INVE.Pages { if (firstRender) { - await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); - await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", rawCode); + if (sessione != null) + { + if ((sessione.DtEnd == null) && (!sessione.Transferred)) + { + await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); + await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", rawCode); + } + } } } @@ -131,7 +167,7 @@ namespace MP.INVE.Pages private async Task reloadData() { - + sessione = null; isLoading = true; sessione = MIService.InventSessByID(sessID); diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 46c400db..3a876955 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

          Versione: 6.16.2212.1416

          +

          Versione: 6.16.2212.1418


          Note di rilascio:
          • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index d60391cb..a2962d92 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1416 +6.16.2212.1418 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 55e249a9..7d52793f 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1416 + 6.16.2212.1418 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From eec565a7196e35926bba53f18afb75c98a8ce190 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 09:12:20 +0100 Subject: [PATCH 25/48] fix generazione jumper --- MP.INVE/Pages/Invio.razor | 4 +++- MP.INVE/Pages/Invio.razor.cs | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor index f6351dac..972f1022 100644 --- a/MP.INVE/Pages/Invio.razor +++ b/MP.INVE/Pages/Invio.razor @@ -81,7 +81,8 @@ else } - else{ + else + { } @@ -93,6 +94,7 @@ else @if ((sessione.DtEnd == null) && (!sessione.Transferred)) {
            +

            Scansiona il codice per connetterti alla sessione @sessID

            diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs index c2c0e8fe..7a910f31 100644 --- a/MP.INVE/Pages/Invio.razor.cs +++ b/MP.INVE/Pages/Invio.razor.cs @@ -134,6 +134,7 @@ namespace MP.INVE.Pages { if (sessione != null) { + await getId(); if ((sessione.DtEnd == null) && (!sessione.Transferred)) { await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); @@ -149,6 +150,8 @@ namespace MP.INVE.Pages private IJSRuntime JSRuntime { get; set; } = null!; [Inject] private NavigationManager NavManager { get; set; } = null!; + [Inject] + private ILocalStorageService localStorage { get; set; } = null!; protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrlJumper"]}"; } @@ -177,5 +180,17 @@ namespace MP.INVE.Pages protected int sessID { get; set; } = 0; protected int codMag { get; set; } = 0; + + + protected async Task getId() + { + OperatoreDTO local = new OperatoreDTO(); + local = await localStorage.GetItemAsync("MatrOpr"); + if (local != null) + { + idOperatore = local.MatrOpr.ToString(); + authKey = local.hashAuthKey; + } + } } } \ No newline at end of file From 6ecfb206924c31bf6a56e3245976dddf27bcec8f Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 09:12:47 +0100 Subject: [PATCH 26/48] fix grafici --- MP.INVE/Components/InveSessionList.razor | 2 +- MP.INVE/Components/ListTotLotto.razor | 2 +- MP.INVE/Pages/InveSession.razor | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index 716eb16e..dd569dda 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -95,7 +95,7 @@ - + } diff --git a/MP.INVE/Components/ListTotLotto.razor b/MP.INVE/Components/ListTotLotto.razor index 2de2f74a..d781f83a 100644 --- a/MP.INVE/Components/ListTotLotto.razor +++ b/MP.INVE/Components/ListTotLotto.razor @@ -1,4 +1,4 @@ - +

            Totale lotti

            diff --git a/MP.INVE/Pages/InveSession.razor b/MP.INVE/Pages/InveSession.razor index b3e6dd71..84685ce3 100644 --- a/MP.INVE/Pages/InveSession.razor +++ b/MP.INVE/Pages/InveSession.razor @@ -14,7 +14,7 @@
            - Concluse + Trasferite From 6b7912249ef6af2f38ba792e8ca44e72e3e0418e Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 09:13:16 +0100 Subject: [PATCH 27/48] cambio gestione sessioni chiuse/aperte --- MP.Data/Controllers/MpInveController.cs | 15 ++++++++++++--- MP.INVE/Components/InveSessionList.razor.cs | 2 +- MP.INVE/Data/MiDataService.cs | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index d78c2f94..b4bb4cb9 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -581,14 +581,23 @@ namespace MP.Data.Controllers /// /// /// - public List InventSessHistList(DateTime FromDate, DateTime ToDate) + public List InventSessHistList() { List dbResult = new List(); using (var dbCtx = new MoonPro_InveContext(_configuration)) { +#if false + dbResult = dbCtx + .DbInveSess + .Where(x => x.DtStart >= FromDate && x.DtStart <= ToDate && x.DtEnd != null) + .Include(m => m.AnagMagNav) + .AsNoTracking() + .OrderByDescending(x => x.DtStart) + .ToList(); +#endif dbResult = dbCtx .DbInveSess - .Where(x => x.DtStart >= FromDate && x.DtStart <= ToDate && x.DtEnd != null) + .Where(x => x.Transferred) .Include(m => m.AnagMagNav) .AsNoTracking() .OrderByDescending(x => x.DtStart) @@ -608,7 +617,7 @@ namespace MP.Data.Controllers { dbResult = dbCtx .DbInveSess - .Where(x => x.DtEnd == null) + .Where(x => (x.DtEnd == null) || !(x.Transferred)) .Include(m => m.AnagMagNav) .AsNoTracking() .OrderByDescending(x => x.DtStart) diff --git a/MP.INVE/Components/InveSessionList.razor.cs b/MP.INVE/Components/InveSessionList.razor.cs index 6209bc84..02c22582 100644 --- a/MP.INVE/Components/InveSessionList.razor.cs +++ b/MP.INVE/Components/InveSessionList.razor.cs @@ -170,7 +170,7 @@ namespace MP.INVE.Components } else { - SearchRecords = MIDataservice.InventSessHistList(dtStart, dtEnd); + SearchRecords = MIDataservice.InventSessHistList(); } totalCount = SearchRecords.Count; elencoSessioni = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index d173b517..c388a37f 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -595,14 +595,14 @@ namespace MP.INVE.Data return result; } - public List InventSessHistList(DateTime dtStart, DateTime dtEnd) + public List InventSessHistList() { Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); List result = new List(); string source = "DB"; // cerco in redis... - RedisValue rawData = redisDb.StringGet($"{redisSessionHistList}:{dtStart:yyyyMMdd_HHmmss}:{dtEnd:yyyyMMdd_HHmmss}"); + RedisValue rawData = redisDb.StringGet($"{redisSessionHistList}"); if (!string.IsNullOrEmpty($"{rawData}")) { result = JsonConvert.DeserializeObject>($"{rawData}"); @@ -610,7 +610,7 @@ namespace MP.INVE.Data } else { - result = dbController.InventSessHistList(dtStart, dtEnd); + result = dbController.InventSessHistList(); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); redisDb.StringSetAsync(redisSessionHistList, rawData, getRandTOut(redisLongTimeCache)); From 431c675d0847d6e2d9815ba785361117243afff2 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 09:14:01 +0100 Subject: [PATCH 28/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 8a39520b..55cbc223 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1418 + 6.16.2212.1508 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 3a876955..c62450ac 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

            Versione: 6.16.2212.1418

            +

            Versione: 6.16.2212.1508


            Note di rilascio:
            • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index a2962d92..bc266aad 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1418 +6.16.2212.1508 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 7d52793f..08775b89 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1418 + 6.16.2212.1508 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From ae750a467cf218c7d71759b548c5322c800f5a9c Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 09:22:02 +0100 Subject: [PATCH 29/48] fix minori --- MP.INVE/Components/InveSessionList.razor | 9 ++++++--- MP.INVE/Shared/MainLayout.razor | 3 +-- MP.INVE/Shared/MainLayout.razor.css | 4 +++- MP.INVE/Shared/NavMenu.razor | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index dd569dda..aab201b6 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -139,9 +139,12 @@ }
            diff --git a/MP.INVE/Shared/MainLayout.razor b/MP.INVE/Shared/MainLayout.razor index fea485f5..77213398 100644 --- a/MP.INVE/Shared/MainLayout.razor +++ b/MP.INVE/Shared/MainLayout.razor @@ -5,10 +5,9 @@ MP.INVE
            -
            + -
            diff --git a/MP.INVE/Shared/MainLayout.razor.css b/MP.INVE/Shared/MainLayout.razor.css index d5884352..fb110ad6 100644 --- a/MP.INVE/Shared/MainLayout.razor.css +++ b/MP.INVE/Shared/MainLayout.razor.css @@ -46,7 +46,9 @@ main { .top-row:not(.auth) { display: none; } - + .menuHide { + display: none; + } .top-row.auth { justify-content: space-between; } diff --git a/MP.INVE/Shared/NavMenu.razor b/MP.INVE/Shared/NavMenu.razor index 3b3f2869..544e4bd0 100644 --- a/MP.INVE/Shared/NavMenu.razor +++ b/MP.INVE/Shared/NavMenu.razor @@ -62,7 +62,7 @@
            *@ - *@ }
            From 6511ee57c4c36a4e203283b447a1ba70a6bcd123 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 10:23:17 +0100 Subject: [PATCH 30/48] fix gestione invio codice magazzino --- MP.INVE/Components/CodeScan.razor.cs | 2 +- MP.INVE/Components/ProcSuggestion.razor.cs | 15 +++++++++------ MP.INVE/Pages/Invio.razor.cs | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/MP.INVE/Components/CodeScan.razor.cs b/MP.INVE/Components/CodeScan.razor.cs index 2c0002dd..c05cbbeb 100644 --- a/MP.INVE/Components/CodeScan.razor.cs +++ b/MP.INVE/Components/CodeScan.razor.cs @@ -39,7 +39,7 @@ namespace MP.INVE.Components get => _lastScan; set { - _lastScan = value; + _lastScan = value.Trim(); if (value != "") { saveSel(LastScan); diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index ff56683b..f56aa515 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -69,6 +69,9 @@ namespace MP.INVE.Components protected override async Task OnParametersSetAsync() { isKnown = false; + currLottoInterno = null; + currUdc = null; + alreadyScan = null; // se il valore scansionato è != null... if (string.IsNullOrEmpty(lastScan)) { @@ -102,8 +105,6 @@ namespace MP.INVE.Components articoloScan = alreadyScan.CodArticolo; quantitaScan = Math.Round(alreadyScan.Qty, 2); noteScan = alreadyScan.Note; - currUdc = null; - currLottoInterno = null; } else @@ -167,9 +168,11 @@ namespace MP.INVE.Components { canSave = true; tipo = "S"; +#if false currLottoInterno = null; currUdc = null; - alreadyScan = null; + alreadyScan = null; +#endif lottoScan = lastScan; articoloScan = ""; quantitaScan = 0; @@ -262,13 +265,13 @@ namespace MP.INVE.Components protected string lottoScan { get => _lotto; - set => _lotto = value; + set => _lotto = value.Trim(); } protected string _articolo = ""; protected string articoloScan { get => _articolo; - set => _articolo = value; + set => _articolo = value.Trim(); } protected decimal _qta = 0; protected decimal quantitaScan @@ -280,7 +283,7 @@ namespace MP.INVE.Components protected string noteScan { get => _note; - set => _note = value; + set => _note = value.Trim(); } protected void cssDisableArt() diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs index 7a910f31..51abbc87 100644 --- a/MP.INVE/Pages/Invio.razor.cs +++ b/MP.INVE/Pages/Invio.razor.cs @@ -122,7 +122,7 @@ namespace MP.INVE.Pages if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("sessID", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag)) { sessID = int.Parse(_inveSessionId); - codMag = int.Parse(_idMag); + codMag = _idMag; } await reloadData(); @@ -179,7 +179,7 @@ namespace MP.INVE.Pages } protected int sessID { get; set; } = 0; - protected int codMag { get; set; } = 0; + protected string codMag { get; set; } = ""; protected async Task getId() From 7b70e21fbb2c3ec0204ee3435e1dadf0c9a9bce0 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 10:23:23 +0100 Subject: [PATCH 31/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 55cbc223..507e4b06 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1508 + 6.16.2212.1510 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index c62450ac..5a32d9cd 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

            Versione: 6.16.2212.1508

            +

            Versione: 6.16.2212.1510


            Note di rilascio:
            • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index bc266aad..f127ff1a 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1508 +6.16.2212.1510 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 08775b89..629e2edf 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1508 + 6.16.2212.1510 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 280996e73bcfa10d752b0969b34de42642d0b9c2 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 12:15:58 +0100 Subject: [PATCH 32/48] aggiunta pagina cancellazione --- MP.INVE/Pages/Cancellazione.razor | 89 ++++++++++++++++++++++++++++ MP.INVE/Pages/Cancellazione.razor.cs | 73 +++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 MP.INVE/Pages/Cancellazione.razor create mode 100644 MP.INVE/Pages/Cancellazione.razor.cs diff --git a/MP.INVE/Pages/Cancellazione.razor b/MP.INVE/Pages/Cancellazione.razor new file mode 100644 index 00000000..082a3803 --- /dev/null +++ b/MP.INVE/Pages/Cancellazione.razor @@ -0,0 +1,89 @@ +@page "/Cancellazione" + +
              +
              MP.INVE
              +
              + Cancellazione +
              +
              + +
              +
              + +
              +
              +
              Menu
              + +
              +
              + + +
              +
              + + +@if (currScan != null) +{ +
              +
              + + Dati ultima scansione + +
              +
              + +
              +
              +
              + Codice: +
              +
              + @currScan.ScanValue +
              +
              +
              +
              + Lotto: +
              +
              + @currScan.Lotto +
              +
              + +
              +
              + Articolo: +
              +
              + @currScan.CodArticolo +
              +
              +
              +
              + Quantità: +
              +
              + @Math.Round(currScan.Qty, 0) +
              +
              + +
              +
              + +
              + +
              +
              +} +else if (first) +{ +
              Eseguire scansione
              +} +else +{ +
              Nessuna scansione trovata
              +} diff --git a/MP.INVE/Pages/Cancellazione.razor.cs b/MP.INVE/Pages/Cancellazione.razor.cs new file mode 100644 index 00000000..a0bcae4b --- /dev/null +++ b/MP.INVE/Pages/Cancellazione.razor.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.INVE; +using MP.INVE.Shared; +using MP.INVE.Components; +using MP.Data.DatabaseModels; +using MP.INVE.Data; +using Microsoft.AspNetCore.WebUtilities; + +namespace MP.INVE.Pages +{ + public partial class Cancellazione + { + [Inject] + MiDataService MIService { get; set; } = null!; + [Inject] + IJSRuntime JSRuntime { get; set; } = null!; + [Inject] + private NavigationManager NavManager { get; set; } = null!; + + protected string rawScan { get; set; } = null!; + + ScanDataModel? currScan; + protected bool first { get; set; } = false; + protected override async Task OnInitializedAsync() + { + first = true; + await Task.Delay(1); + var uri = NavManager.ToAbsoluteUri(NavManager.Uri); + if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("sessID", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOpr", out var _idOpr)) + { + sessID = int.Parse(_inveSessionId); + idOPr = _idOpr; + } + } + + int sessID { get; set; } = 0; + string idOPr { get; set; } = ""; + + protected void saveScan(string newScan) + { + first = false; + if (!string.IsNullOrEmpty(newScan)) + { + rawScan = newScan; + currScan = MIService.ScanByValueSessionOpr(rawScan, sessID, idOPr); + } + } + + protected async Task deleteScan(ScanDataModel scan) + { + await MIService.deleteScansione(scan); + NavManager.NavigateTo(NavManager.Uri, true); + } + protected async Task goBack() + { + await JSRuntime.InvokeVoidAsync("history.go", -1); + } + + private string CodUDC { get; set; } = null!; + } +} \ No newline at end of file From 549d2c86f251fc28fe3a56cc8ba11f410ed52b25 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 12:16:43 +0100 Subject: [PATCH 33/48] aggiunti metodi x ricerca scan data sessione valore e operatore --- MP.Data/Controllers/MpInveController.cs | 28 +++++++++++++++++-------- MP.INVE/Data/MiDataService.cs | 14 +++++++++++++ 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index b4bb4cb9..c638a36a 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -123,6 +123,7 @@ namespace MP.Data.Controllers } return dbResult; } + /// /// Elenco Scansioni Totali /// @@ -153,6 +154,24 @@ namespace MP.Data.Controllers } return dbResult; } + /// + /// Elenco Scansioni per valore, operatore e sessione + /// + /// + public ScanDataModel ScanByValueSessionOpr(string scanData, int InveSessId, string idOpr) + { + ScanDataModel dbResult = new ScanDataModel(); + using (var dbCtx = new MoonPro_InveContext(_configuration)) + { + dbResult = dbCtx + .DbScanData + .Where(x => (x.ScanValue == scanData) && (x.InveSessID == InveSessId) && (x.UserScan == idOpr)) + .AsNoTracking() + .OrderByDescending(x => x.DtScan) + .FirstOrDefault(); + } + return dbResult; + } /// /// Elenco Scansioni dato Id sessione inventario @@ -586,15 +605,6 @@ namespace MP.Data.Controllers List dbResult = new List(); using (var dbCtx = new MoonPro_InveContext(_configuration)) { -#if false - dbResult = dbCtx - .DbInveSess - .Where(x => x.DtStart >= FromDate && x.DtStart <= ToDate && x.DtEnd != null) - .Include(m => m.AnagMagNav) - .AsNoTracking() - .OrderByDescending(x => x.DtStart) - .ToList(); -#endif dbResult = dbCtx .DbInveSess .Where(x => x.Transferred) diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index c388a37f..daa4bb91 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -392,6 +392,20 @@ namespace MP.INVE.Data return result; } + public ScanDataModel ScanByValueSessionOpr(string scanData, int inveSessId, string Opr) + { + string source = ""; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + ScanDataModel? result = new ScanDataModel(); + result = dbController.ScanByValueSessionOpr(scanData, inveSessId, Opr); + source = "DB"; + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"ScanByValueSessionOpr Read from {source}: {ts.TotalMilliseconds}ms"); + return result; + } + public List ScanBySession(int idSessione) { string source = ""; From ef38832f2c7871431ae5a8b89603f23d2320f47d Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 12:17:00 +0100 Subject: [PATCH 34/48] fix grafici --- MP.INVE/Components/CodeScan.razor | 4 ++-- MP.INVE/Components/InveSessionList.razor | 2 +- MP.INVE/Pages/Acquisizione.razor | 26 +++++++++++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/MP.INVE/Components/CodeScan.razor b/MP.INVE/Components/CodeScan.razor index cc6b2c68..d25c37a8 100644 --- a/MP.INVE/Components/CodeScan.razor +++ b/MP.INVE/Components/CodeScan.razor @@ -1,7 +1,7 @@ 
              - - + +
              diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index aab201b6..5729b4ee 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -94,7 +94,7 @@ {
            diff --git a/MP.INVE/Pages/Acquisizione.razor b/MP.INVE/Pages/Acquisizione.razor index 1c6d7d45..b91dfdad 100644 --- a/MP.INVE/Pages/Acquisizione.razor +++ b/MP.INVE/Pages/Acquisizione.razor @@ -1,5 +1,28 @@ @page "/Acquisizione" +
            +
            MP.INVE
            +
            + Acquisizione +
            +
            + +
            +
            + +
            +
            +
            Menu
            + +
            + +
            +
            @@ -34,4 +57,5 @@ - \ No newline at end of file + + From bb35b63419110f5434b025102412beced0ad14e4 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 12:17:19 +0100 Subject: [PATCH 35/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 507e4b06..badb2e22 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1510 + 6.16.2212.1511 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 5a32d9cd..bfa9e717 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

            Versione: 6.16.2212.1510

            +

            Versione: 6.16.2212.1511


            Note di rilascio:
            • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index f127ff1a..86a558fb 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1510 +6.16.2212.1511 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 629e2edf..48dee348 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1510 + 6.16.2212.1511 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 937ab1851921b936953692d16d1dcc90026da345 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 15:29:31 +0100 Subject: [PATCH 36/48] =?UTF-8?q?fix=20gestione=20lotto=20esterno:=20se=20?= =?UTF-8?q?presenti=20pi=C3=B9=20record=20con=20lo=20stesso=20codice=20=3D?= =?UTF-8?q?=20sconosciuto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MP.Data/Controllers/MpInveController.cs | 12 ++++++------ MP.INVE/Pages/Acquisizione.razor | 6 ++++-- MP.INVE/Pages/Acquisizione.razor.cs | 2 ++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index c638a36a..e371b009 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -38,9 +38,9 @@ namespace MP.Data.Controllers /// Codice lotto /// Codice magazzino /// - public AnagLottiArca LottoEsterno(string codArt, string codLotto, string codMagazzino) + public List LottoEsterno(string codArt, string codLotto, string codMagazzino) { - AnagLottiArca dbResult = new AnagLottiArca(); + List dbResult = new List(); using (var dbCtx = new MoonPro_ISContext(_configuration)) { var DataGiac = new SqlParameter("@DataGiac", DBNull.Value); @@ -54,7 +54,7 @@ namespace MP.Data.Controllers .FromSqlRaw("exec dbo.stp_GIAC_getByDate @DataGiac,@CodArt,@CodLotto,@CodMagaz,@OnlyTest", DataGiac, CodArt, CodLotto, CodMagaz, OnlyTest) .AsNoTracking() .AsEnumerable() - .FirstOrDefault(); + .ToList(); } return dbResult; } @@ -158,9 +158,9 @@ namespace MP.Data.Controllers /// Elenco Scansioni per valore, operatore e sessione /// /// - public ScanDataModel ScanByValueSessionOpr(string scanData, int InveSessId, string idOpr) + public List ScanByValueSessionOpr(string scanData, int InveSessId, string idOpr) { - ScanDataModel dbResult = new ScanDataModel(); + List dbResult = new List(); using (var dbCtx = new MoonPro_InveContext(_configuration)) { dbResult = dbCtx @@ -168,7 +168,7 @@ namespace MP.Data.Controllers .Where(x => (x.ScanValue == scanData) && (x.InveSessID == InveSessId) && (x.UserScan == idOpr)) .AsNoTracking() .OrderByDescending(x => x.DtScan) - .FirstOrDefault(); + .ToList(); } return dbResult; } diff --git a/MP.INVE/Pages/Acquisizione.razor b/MP.INVE/Pages/Acquisizione.razor index b91dfdad..376ef767 100644 --- a/MP.INVE/Pages/Acquisizione.razor +++ b/MP.INVE/Pages/Acquisizione.razor @@ -1,6 +1,6 @@ @page "/Acquisizione" -
              +@*
              MP.INVE
              Acquisizione @@ -21,7 +21,9 @@ MODALITÀ CANCELLAZIONE
              -
              +
              *@ + +
              diff --git a/MP.INVE/Pages/Acquisizione.razor.cs b/MP.INVE/Pages/Acquisizione.razor.cs index 5462ddde..cece2d1c 100644 --- a/MP.INVE/Pages/Acquisizione.razor.cs +++ b/MP.INVE/Pages/Acquisizione.razor.cs @@ -42,11 +42,13 @@ namespace MP.INVE.Pages protected string descr { get; set; } = ""; protected string magInv { get; set; } = ""; + protected string link { get; set; } = ""; protected List? eleScansioni; //protected AnagUdcModel currUdc{ get; set; } = null!; protected override async Task OnInitializedAsync() { + link = $"Cancellazione?idOpr={idOpr}&sessID={sessionId}"; await Task.Delay(1); var uri = NavManager.ToAbsoluteUri(NavManager.Uri); if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSess", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag)) From b6b0333b74434d01e9f2d1d45f09144efaeae899 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 15:29:50 +0100 Subject: [PATCH 37/48] fix grafici --- MP.INVE/Components/InveSessionList.razor | 17 +++++++---------- MP.INVE/Components/ListTotLotto.razor | 2 +- MP.INVE/Components/MagList.razor | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index 5729b4ee..f777e5c3 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -67,7 +67,7 @@
              } -
            - + @if (!item.Transferred) + { + + }
            - +
            +
            @if (inCorso) @@ -90,15 +90,12 @@ @foreach (var item in elencoSessioni) { - @if (inCorso) - { - - } + diff --git a/MP.INVE/Components/ListTotLotto.razor b/MP.INVE/Components/ListTotLotto.razor index d781f83a..7d3c919d 100644 --- a/MP.INVE/Components/ListTotLotto.razor +++ b/MP.INVE/Components/ListTotLotto.razor @@ -1,6 +1,6 @@ 

            Totale lotti

            -
            - - - - - + + + + + @item.InveSessID
            +
            diff --git a/MP.INVE/Components/MagList.razor b/MP.INVE/Components/MagList.razor index 680ddf22..5cd00ecc 100644 --- a/MP.INVE/Components/MagList.razor +++ b/MP.INVE/Components/MagList.razor @@ -73,7 +73,7 @@ } -
            Lotto
            +
            From 57ff3cdd91e7cc1ab6aed926fe8132dc733ae6a7 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 15:30:23 +0100 Subject: [PATCH 38/48] aggiunto nav menu a pagina cancellazione --- MP.INVE/Pages/Cancellazione.razor | 11 ++++++++--- MP.INVE/Pages/Cancellazione.razor.cs | 17 +++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/MP.INVE/Pages/Cancellazione.razor b/MP.INVE/Pages/Cancellazione.razor index 082a3803..713ec5d6 100644 --- a/MP.INVE/Pages/Cancellazione.razor +++ b/MP.INVE/Pages/Cancellazione.razor @@ -1,6 +1,6 @@ @page "/Cancellazione" -
            +@*
            MP.INVE
            Cancellazione @@ -21,16 +21,21 @@ MODALITÀ SCANSIONE
            -
            +
            *@ + + @if (currScan != null) {
            -
            +
            Dati ultima scansione +
            + #:@totScan +
            diff --git a/MP.INVE/Pages/Cancellazione.razor.cs b/MP.INVE/Pages/Cancellazione.razor.cs index a0bcae4b..dc501500 100644 --- a/MP.INVE/Pages/Cancellazione.razor.cs +++ b/MP.INVE/Pages/Cancellazione.razor.cs @@ -31,7 +31,8 @@ namespace MP.INVE.Pages protected string rawScan { get; set; } = null!; - ScanDataModel? currScan; + protected ScanDataModel? currScan; + protected List? scanList; protected bool first { get; set; } = false; protected override async Task OnInitializedAsync() { @@ -45,8 +46,9 @@ namespace MP.INVE.Pages } } - int sessID { get; set; } = 0; - string idOPr { get; set; } = ""; + protected int sessID { get; set; } = 0; + protected int totScan { get; set; } = 0; + protected string idOPr { get; set; } = ""; protected void saveScan(string newScan) { @@ -54,7 +56,9 @@ namespace MP.INVE.Pages if (!string.IsNullOrEmpty(newScan)) { rawScan = newScan; - currScan = MIService.ScanByValueSessionOpr(rawScan, sessID, idOPr); + scanList = MIService.ScanByValueSessionOpr(rawScan, sessID, idOPr); + currScan = scanList.FirstOrDefault(); + totScan = scanList.Count; } } @@ -63,10 +67,7 @@ namespace MP.INVE.Pages await MIService.deleteScansione(scan); NavManager.NavigateTo(NavManager.Uri, true); } - protected async Task goBack() - { - await JSRuntime.InvokeVoidAsync("history.go", -1); - } + private string CodUDC { get; set; } = null!; } From 430f539fd195e254b2383c79570e92843e0aa1d2 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 15:30:38 +0100 Subject: [PATCH 39/48] aggiunto nav menu --- MP.INVE/Components/NavMenuTerm.razor | 52 +++++++++++++++++++ MP.INVE/Components/NavMenuTerm.razor.cs | 66 ++++++++++++++++++++++++ MP.INVE/Components/NavMenuTerm.razor.css | 62 ++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 MP.INVE/Components/NavMenuTerm.razor create mode 100644 MP.INVE/Components/NavMenuTerm.razor.cs create mode 100644 MP.INVE/Components/NavMenuTerm.razor.css diff --git a/MP.INVE/Components/NavMenuTerm.razor b/MP.INVE/Components/NavMenuTerm.razor new file mode 100644 index 00000000..6061050e --- /dev/null +++ b/MP.INVE/Components/NavMenuTerm.razor @@ -0,0 +1,52 @@ +@using MP.INVE.Components +@using MP.INVE.Data + + + +
            + +
            + + diff --git a/MP.INVE/Components/NavMenuTerm.razor.cs b/MP.INVE/Components/NavMenuTerm.razor.cs new file mode 100644 index 00000000..da0633be --- /dev/null +++ b/MP.INVE/Components/NavMenuTerm.razor.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.INVE; +using MP.INVE.Shared; +using MP.INVE.Components; +using MP.INVE.Data; +using MP.Data.DTO; +using Blazored.LocalStorage; + +namespace MP.INVE.Components +{ + public partial class NavMenuTerm + { + private bool collapseNavMenu = true; + //public List? ElencoLink { get; set; } + private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; + private void ToggleNavMenu() + { + collapseNavMenu = !collapseNavMenu; + } + + + protected override async Task OnInitializedAsync() + { + // recupero elenco JQM + //ElencoLink = await MDService.ElencoLink(); + } + + protected bool showText { get; set; } = true; + protected void ToggleCompress() + { + showText = !showText; + EC_compressUpdated.InvokeAsync(showText); + } + protected async Task goBack() + { + await JSRuntime.InvokeVoidAsync("history.go", -1); + } + protected string hideText { get => showText ? "" : "invisible"; } + + [Parameter] + public EventCallback EC_compressUpdated { get; set; } + [Parameter] + public bool isScan { get; set; } = false; + [Parameter] + public string link { get; set; } = ""; + [Inject] + protected ILocalStorageService localStorage { get; set; } = null!; + [Inject] + protected NavigationManager NavigationManager { get; set; } = null!; + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + } +} \ No newline at end of file diff --git a/MP.INVE/Components/NavMenuTerm.razor.css b/MP.INVE/Components/NavMenuTerm.razor.css new file mode 100644 index 00000000..55fbd6bb --- /dev/null +++ b/MP.INVE/Components/NavMenuTerm.razor.css @@ -0,0 +1,62 @@ +.navbar-toggler { + background-color: rgba(255,255,255,1); +} + +.top-row { + height: 3.5rem; + background-color: rgba(255,255,255,1); +} + +.navbar-brand { + font-size: 1.1rem; +} + +.oi { + width: 2rem; + font-size: 1.1rem; + vertical-align: text-top; + top: -2px; +} + +.nav-item { + font-size: 0.9rem; + padding-bottom: 0.5rem; +} + + .nav-item:first-of-type { + padding-top: 1rem; + } + + .nav-item:last-of-type { + padding-bottom: 1rem; + } + + .nav-item ::deep a { + color: #d7d7d7; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; + } + + .nav-item ::deep a.active { + background-color: rgba(255,255,255,0.25); + color: white; + } + + .nav-item ::deep a:hover { + background-color: rgba(255,255,255,0.1); + color: white; + } + +@media (min-width: 641px) { + .navbar-toggler { + display: none; + } + + .collapse { + /* Never collapse the sidebar for wide screens */ + display: block; + } +} \ No newline at end of file From 9853d9d1bf5d92c987ff064e13dcceff8f942b38 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 15:30:55 +0100 Subject: [PATCH 40/48] sempre fix gestione lotto esterno --- MP.INVE/Components/ProcSuggestion.razor.cs | 8 +++++++- MP.INVE/Data/MiDataService.cs | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index f56aa515..a45547cc 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -46,6 +46,7 @@ namespace MP.INVE.Components protected AnagUdcModel? udc; protected AnagLottoModel? lottoInterno; protected AnagLottiArca? lottoEsterno; + protected List? listLottiEsterni; protected ScanDataModel? alreadyScan; protected AnagUdcModel? currUdc; @@ -136,8 +137,13 @@ namespace MP.INVE.Components } else { - lottoEsterno = MIService.LottoEsterno("", lastScan, magID); + listLottiEsterni = MIService.LottoEsterno("", lastScan, magID); + if(listLottiEsterni.Count == 1) + { + lottoEsterno = listLottiEsterni.FirstOrDefault(); + } } + if (lottoInterno != null) { canSave = true; diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index daa4bb91..94cffed8 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -314,12 +314,12 @@ namespace MP.INVE.Data } - public AnagLottiArca LottoEsterno(string codArt, string codLotto, string codMagazzino) + public List LottoEsterno(string codArt, string codLotto, string codMagazzino) { string source = ""; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); - AnagLottiArca? result = new AnagLottiArca(); + List? result = new List(); // cerco in redis... result = dbController.LottoEsterno(codArt, codLotto, codMagazzino); source = "DB"; @@ -392,12 +392,12 @@ namespace MP.INVE.Data return result; } - public ScanDataModel ScanByValueSessionOpr(string scanData, int inveSessId, string Opr) + public List ScanByValueSessionOpr(string scanData, int inveSessId, string Opr) { string source = ""; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); - ScanDataModel? result = new ScanDataModel(); + List? result = new List(); result = dbController.ScanByValueSessionOpr(scanData, inveSessId, Opr); source = "DB"; stopWatch.Stop(); From 99571f96cbccdf11c9b17b5c90143a5ff0a0e27b Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 15:31:02 +0100 Subject: [PATCH 41/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index badb2e22..43e9cc90 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1511 + 6.16.2212.1515 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index bfa9e717..4fd2f45c 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

            Versione: 6.16.2212.1511

            +

            Versione: 6.16.2212.1515


            Note di rilascio:
            • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index 86a558fb..f67f9061 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1511 +6.16.2212.1515 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 48dee348..1d2236ee 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1511 + 6.16.2212.1515 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 17b8b854af69ed8ed0ef0c30e36563753ec53479 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 16:46:36 +0100 Subject: [PATCH 42/48] =?UTF-8?q?fix=20grafico=20varie=20modalit=C3=A0=20s?= =?UTF-8?q?cansione=20cancellazione?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MP.INVE/Components/NavMenuTerm.razor | 59 +++++++++++------------- MP.INVE/Components/NavMenuTerm.razor.cs | 11 ++++- MP.INVE/Components/NavMenuTerm.razor.css | 2 +- MP.INVE/Pages/Acquisizione.razor | 5 +- MP.INVE/Pages/Cancellazione.razor | 5 +- 5 files changed, 44 insertions(+), 38 deletions(-) diff --git a/MP.INVE/Components/NavMenuTerm.razor b/MP.INVE/Components/NavMenuTerm.razor index 6061050e..3b90dc46 100644 --- a/MP.INVE/Components/NavMenuTerm.razor +++ b/MP.INVE/Components/NavMenuTerm.razor @@ -1,7 +1,7 @@ @using MP.INVE.Components @using MP.INVE.Data -*@ - - +
              + +
              diff --git a/MP.INVE/Pages/Cancellazione.razor b/MP.INVE/Pages/Cancellazione.razor index 713ec5d6..300ce61e 100644 --- a/MP.INVE/Pages/Cancellazione.razor +++ b/MP.INVE/Pages/Cancellazione.razor @@ -22,8 +22,9 @@
            *@ - - +
            + +
            @if (currScan != null) From 46f7757ec9379845980a9969aba9ac043102a08d Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 16:46:43 +0100 Subject: [PATCH 43/48] refresh versioni --- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 43e9cc90..465b41fb 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1515 + 6.16.2212.1516 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 4fd2f45c..8f04595b 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

            Versione: 6.16.2212.1515

            +

            Versione: 6.16.2212.1516


            Note di rilascio:
            • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index f67f9061..bf308b1d 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1515 +6.16.2212.1516 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 1d2236ee..a6bdad18 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1515 + 6.16.2212.1516 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From cc551835045d290747609bc7a22f771fddcdb25f Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 15 Dec 2022 17:12:40 +0100 Subject: [PATCH 44/48] fix grafici --- MP.INVE/Components/NavMenuTerm.razor.cs | 1 + MP.INVE/Components/ProcSuggestion.razor.cs | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/MP.INVE/Components/NavMenuTerm.razor.cs b/MP.INVE/Components/NavMenuTerm.razor.cs index c6a9a90c..95459c71 100644 --- a/MP.INVE/Components/NavMenuTerm.razor.cs +++ b/MP.INVE/Components/NavMenuTerm.razor.cs @@ -54,6 +54,7 @@ namespace MP.INVE.Components } protected async Task goBack() { + if(NavigationManager.Uri.Contains("")) await JSRuntime.InvokeVoidAsync("history.go", -1); } protected string hideText { get => showText ? "" : "invisible"; } diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index a45547cc..295c1027 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -39,9 +39,10 @@ namespace MP.INVE.Components public int sessID { get; set; } = 0; [Parameter] public string magID { get; set; } = ""; - + private string tipo { get; set; } = ""; private string canMod = "false"; + public string lastScanCheck { get; set; } = ""; protected AnagUdcModel? udc; protected AnagLottoModel? lottoInterno; @@ -73,6 +74,10 @@ namespace MP.INVE.Components currLottoInterno = null; currUdc = null; alreadyScan = null; + if (lastScan.StartsWith("S")) + { + lastScanCheck= lastScan.Substring(1); + } // se il valore scansionato è != null... if (string.IsNullOrEmpty(lastScan)) { @@ -86,7 +91,7 @@ namespace MP.INVE.Components var result = await MIService.tryGetConfig("MAG_SmartUdcEdit"); int sessIDSearch = 0; - if (lastScan.Contains("MFI") && lastScan.Length == 14) + if (lastScanCheck.Contains("MFI") && lastScanCheck.Length == 14) { sessIDSearch = sessID; } @@ -115,7 +120,7 @@ namespace MP.INVE.Components canMod = result; } await Task.Delay(1); - udc = MIService.IsUDC(lastScan); + udc = MIService.IsUDC(lastScanCheck); if (udc != null && !udc.UDC.Contains("MSL")) { @@ -131,6 +136,7 @@ namespace MP.INVE.Components } else { + if (lastScan.StartsWith("M") && lastScan.Length == 10) { lottoInterno = MIService.LottoInterno(lastScan); @@ -138,7 +144,7 @@ namespace MP.INVE.Components else { listLottiEsterni = MIService.LottoEsterno("", lastScan, magID); - if(listLottiEsterni.Count == 1) + if (listLottiEsterni.Count == 1) { lottoEsterno = listLottiEsterni.FirstOrDefault(); } @@ -200,20 +206,20 @@ namespace MP.INVE.Components if (artExists != null) { var force = false; - if(articoloScan != oldArt) + if (articoloScan != oldArt) { force = true; } var lottoSave = lastScan; var known = false; var unique = false; - if(currUdc != null) + if (currUdc != null) { lottoSave = currUdc.Lotto; known = true; unique = true; } - else if(currLottoEsterno != null || currLottoInterno != null) + else if (currLottoEsterno != null || currLottoInterno != null) { known = true; From 2fc9f0b1c9e0f5689ecc1acdb1251ee18c79e1d2 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 16 Dec 2022 09:23:50 +0100 Subject: [PATCH 45/48] fix conrtollo S --- MP.INVE/Components/ProcSuggestion.razor.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index 295c1027..b7c94a59 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -78,6 +78,10 @@ namespace MP.INVE.Components { lastScanCheck= lastScan.Substring(1); } + else + { + lastScanCheck = lastScan; + } // se il valore scansionato è != null... if (string.IsNullOrEmpty(lastScan)) { From add5e008cdbe27720981015db2866f8e66cdbfea Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 16 Dec 2022 10:00:33 +0100 Subject: [PATCH 46/48] fix link cancellazione --- MP.INVE/Components/ProcSuggestion.razor.cs | 46 ++++++++++++---------- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Acquisizione.razor.cs | 4 +- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 6 files changed, 32 insertions(+), 26 deletions(-) diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index b7c94a59..d387ced8 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -74,22 +74,23 @@ namespace MP.INVE.Components currLottoInterno = null; currUdc = null; alreadyScan = null; - if (lastScan.StartsWith("S")) - { - lastScanCheck= lastScan.Substring(1); - } - else - { - lastScanCheck = lastScan; - } + // se il valore scansionato è != null... if (string.IsNullOrEmpty(lastScan)) { firstMsg = true; - await Task.Delay(1); + await Task.Delay(1); } else { + if (lastScan.StartsWith("S")) + { + lastScanCheck = lastScan.Substring(1); + } + else + { + lastScanCheck = lastScan; + } firstMsg = false; await MIService.ConfigResetCache(); var result = await MIService.tryGetConfig("MAG_SmartUdcEdit"); @@ -126,17 +127,22 @@ namespace MP.INVE.Components await Task.Delay(1); udc = MIService.IsUDC(lastScanCheck); - if (udc != null && !udc.UDC.Contains("MSL")) + if (udc != null) { - isKnown = true; - canSave = true; - currUdc = udc; - tipo = "U"; - lottoScan = udc.lottoNav.Lotto; - oldArt = udc.lottoNav.CodArt; - articoloScan = udc.lottoNav.CodArt; - quantitaScan = Math.Round(udc.Qta, 2); - noteScan = udc.Note; + var udcString = udc.UDC.Substring(2, 3); + if (udcString == "MFI") + { + + isKnown = true; + canSave = true; + currUdc = udc; + tipo = "U"; + lottoScan = udc.lottoNav.Lotto; + oldArt = udc.lottoNav.CodArt; + articoloScan = udc.lottoNav.CodArt; + quantitaScan = Math.Round(udc.Qta, 2); + noteScan = udc.Note; + } } else { @@ -234,7 +240,7 @@ namespace MP.INVE.Components { DtScan = DateTime.Now, UserScan = userScan, - ScanValue = lastScan, + ScanValue = lastScanCheck, IsForced = force, CodArticolo = articoloScan, Lotto = lottoSave, diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 465b41fb..c71009b9 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.1516 + 6.16.2212.1609 diff --git a/MP.INVE/Pages/Acquisizione.razor.cs b/MP.INVE/Pages/Acquisizione.razor.cs index cece2d1c..9d9d2a99 100644 --- a/MP.INVE/Pages/Acquisizione.razor.cs +++ b/MP.INVE/Pages/Acquisizione.razor.cs @@ -48,7 +48,6 @@ namespace MP.INVE.Pages //protected AnagUdcModel currUdc{ get; set; } = null!; protected override async Task OnInitializedAsync() { - link = $"Cancellazione?idOpr={idOpr}&sessID={sessionId}"; await Task.Delay(1); var uri = NavManager.ToAbsoluteUri(NavManager.Uri); if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSess", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag)) @@ -61,13 +60,14 @@ namespace MP.INVE.Pages nScansioniTot = eleScansioni.Count(); // recupero dati della sessione di inventario... var currSessions = MIService.InventSessCurrList(); - var currInv = currSessions.Where(x=> x.InveSessID== sessionId).FirstOrDefault(); + var currInv = currSessions.Where(x => x.InveSessID == sessionId).FirstOrDefault(); if (currInv != null) { descr = currInv.Description; magInv = currInv.AnagMagNav.DescMag; } } + link = $"Cancellazione?idOpr={idOpr}&sessID={sessionId}"; } protected void saveScan(string newScan) { diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 8f04595b..9fd4c05e 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

              Versione: 6.16.2212.1516

              +

              Versione: 6.16.2212.1609


              Note di rilascio:
              • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index bf308b1d..64883077 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1516 +6.16.2212.1609 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index a6bdad18..62740f95 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1516 + 6.16.2212.1609 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false From 5e3fda35872a9edd132d5d0eb5a27508013e88ac Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 16 Dec 2022 10:01:16 +0100 Subject: [PATCH 47/48] salvataggio raw scan --- MP.INVE/Components/ProcSuggestion.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index d387ced8..c8a43ee1 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -240,7 +240,7 @@ namespace MP.INVE.Components { DtScan = DateTime.Now, UserScan = userScan, - ScanValue = lastScanCheck, + ScanValue = lastScan, IsForced = force, CodArticolo = articoloScan, Lotto = lottoSave, From a57fcc18c2759fb2f50c136150c4b4b37f87ac60 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 16 Dec 2022 10:14:26 +0100 Subject: [PATCH 48/48] fix grafici --- MP.INVE/Components/NavMenuTerm.razor | 10 +++++----- MP.INVE/Components/NavMenuTerm.razor.cs | 18 ++++++++++++++---- MP.INVE/MP.INVE.csproj | 2 +- MP.INVE/Pages/Cancellazione.razor | 5 +++-- MP.INVE/Resources/ChangeLog.html | 2 +- MP.INVE/Resources/VersNum.txt | 2 +- MP.INVE/Resources/manifest.xml | 2 +- 7 files changed, 26 insertions(+), 15 deletions(-) diff --git a/MP.INVE/Components/NavMenuTerm.razor b/MP.INVE/Components/NavMenuTerm.razor index 3b90dc46..d58eaf02 100644 --- a/MP.INVE/Components/NavMenuTerm.razor +++ b/MP.INVE/Components/NavMenuTerm.razor @@ -1,7 +1,7 @@ @using MP.INVE.Components @using MP.INVE.Data -
            ID magazzino