diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index de0f324c..c63e2840 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -36,18 +36,17 @@ namespace MP.Data.Controllers /// Codice articolo /// Codice lotto /// Codice magazzino - /// proprietà per definire scopo stored /// - public List ListLottiEsterni(string codArt, string codLotto, string codMagazzino, bool onlyTest) + public List ListLottiEsterni(string codArt, string codLotto, string codMagazzino) { List dbResult = new List(); using (var dbCtx = new MoonPro_InveContext(_configuration)) { - var DataGiac = new SqlParameter("@DataGiac", null); + var DataGiac = new SqlParameter("@DataGiac", DateTime.Now); var CodArt = new SqlParameter("@CodArt", codArt); var CodLotto = new SqlParameter("@CodLotto", codLotto); var CodMagaz = new SqlParameter("@CodMagaz", codMagazzino); - var OnlyTest = new SqlParameter("@OnlyTest", onlyTest); + var OnlyTest = new SqlParameter("@OnlyTest", false); dbResult = dbCtx .DbLottoArca diff --git a/MP.Data/DatabaseModels/AnagLottiArca.cs b/MP.Data/DatabaseModels/AnagLottiArca.cs index 42460fbc..ca93f08a 100644 --- a/MP.Data/DatabaseModels/AnagLottiArca.cs +++ b/MP.Data/DatabaseModels/AnagLottiArca.cs @@ -1,13 +1,17 @@ -using System; +using Microsoft.EntityFrameworkCore; +using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MP.Data.DatabaseModels { + [Keyless] public partial class AnagLottiArca { + public string Cd_MGEsercizio { get; set; } public string Cd_MG { get; set; } public string Cd_AR { get; set; } diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index b0c46970..c50b06f4 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -94,7 +94,7 @@ { - diff --git a/MP.INVE/Components/InveSessionList.razor.cs b/MP.INVE/Components/InveSessionList.razor.cs index d92c0c52..edf3bbdb 100644 --- a/MP.INVE/Components/InveSessionList.razor.cs +++ b/MP.INVE/Components/InveSessionList.razor.cs @@ -97,7 +97,7 @@ namespace MP.INVE.Components get { string answ = ""; - answ = $"{BaseUrlTab}IdSessione={currIdSess}&MatrOpr={idOperatore}&UserAuthKey={authKey}"; + answ = $"{BaseUrlTab}IdSessione={currIdSess}&IdMag={currIdMag}&MatrOpr={idOperatore}&UserAuthKey={authKey}"; return answ; } } @@ -111,9 +111,10 @@ namespace MP.INVE.Components } } - protected async Task getCurrSess(int idSess) + protected async Task getCurrSess(int idSess, int idMag) { currIdSess = idSess; + currIdMag = idMag; await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", rawCode); } @@ -188,6 +189,8 @@ namespace MP.INVE.Components [Parameter] public int currIdSess { get; set; } + [Parameter] + public int currIdMag { get; set; } [Inject] private MiDataService MIDataservice { get; set; } = null!; diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index a204376c..fc2ff761 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -34,6 +34,8 @@ namespace MP.INVE.Components public string userScan { get; set; } = null!; [Parameter] public int sessID { get; set; } = 0; + [Parameter] + public int magID { get; set; } = 0; [Inject] public IJSRuntime JSRuntime { get; set; } = null!; [Inject] @@ -42,10 +44,12 @@ namespace MP.INVE.Components private string canMod = "false"; protected List? searchRecordsUDC; - protected List? searchRecordsLotto; + protected List? searchRecordsLottoInterni; + protected List? searchRecordsLottoEsterni; protected List? elencoScansioni; protected AnagUdcModel? udc; - protected AnagLottoModel? lotto; + protected AnagLottoModel? lottoInterno; + protected AnagLottiArca? lottoEsterno; protected ScanDataModel? alreadyScan; protected AnagUdcModel? currUdc; @@ -109,18 +113,20 @@ namespace MP.INVE.Components } else { - searchRecordsLotto = MIService.ElencoLotti(); - lotto = searchRecordsLotto.Where(x => x.Lotto == lastScan).FirstOrDefault(); - if (lotto != null) + searchRecordsLottoInterni = MIService.ElencoLotti(); + lottoInterno = searchRecordsLottoInterni.Where(x => x.Lotto == lastScan).FirstOrDefault(); + if (lottoInterno != null) { tipo = "LOTTO"; - currLotto = lotto; - lottoScan = lotto.Lotto; - articoloScan = lotto.CodArt; + currLotto = lottoInterno; + lottoScan = lottoInterno.Lotto; + articoloScan = lottoInterno.CodArt; quantitaScan = 0; } else { + searchRecordsLottoEsterni = MIService.ListLottiEsterni(articoloScan, lastScan, magID.ToString()); + lottoEsterno = searchRecordsLottoEsterni.FirstOrDefault(); currLotto = null; currUdc = null; alreadyScan = null; diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs index 59b837be..7ec0145f 100644 --- a/MP.INVE/Data/MiDataService.cs +++ b/MP.INVE/Data/MiDataService.cs @@ -298,7 +298,7 @@ namespace MP.INVE.Data } - public List ListLottiEsterni() + public List ListLottiEsterni(string codArt, string codLotto, string codMagazzino) { string source = ""; Stopwatch stopWatch = new Stopwatch(); @@ -314,7 +314,7 @@ namespace MP.INVE.Data } else { - result = dbController.ListLottiEsterni(); + result = dbController.ListLottiEsterni(codArt, codLotto, codMagazzino); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); redisDb.StringSetAsync(redisLottiEsterni, rawData, getRandTOut(redisLongTimeCache)); diff --git a/MP.INVE/Data/SelectInveSessionParams.cs b/MP.INVE/Data/SelectInveSessionParams.cs index 2c39818c..641536c3 100644 --- a/MP.INVE/Data/SelectInveSessionParams.cs +++ b/MP.INVE/Data/SelectInveSessionParams.cs @@ -21,6 +21,7 @@ namespace MP.INVE.Data public string idOperatore { get; set; } = ""; public string authKey { get; set; } = ""; public int currIdSession { get; set; } = 0; + public int currIdMag { get; set; } = 0; public bool reqNew { get; set; } = false; #endregion Public Properties @@ -52,6 +53,9 @@ namespace MP.INVE.Data if (currIdSession != item.currIdSession) return false; + if (currIdMag != item.currIdMag) + return false; + if (authKey != item.authKey) return false; diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 68592d06..b51e1a46 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 6.16.2212.713 + 6.16.2212.1212 diff --git a/MP.INVE/Pages/Acquisizione.razor b/MP.INVE/Pages/Acquisizione.razor index 67f099c5..9b42ab01 100644 --- a/MP.INVE/Pages/Acquisizione.razor +++ b/MP.INVE/Pages/Acquisizione.razor @@ -21,7 +21,7 @@ { }*@
- +
diff --git a/MP.INVE/Pages/Acquisizione.razor.cs b/MP.INVE/Pages/Acquisizione.razor.cs index 9226e7c2..d6829cef 100644 --- a/MP.INVE/Pages/Acquisizione.razor.cs +++ b/MP.INVE/Pages/Acquisizione.razor.cs @@ -37,6 +37,7 @@ namespace MP.INVE.Pages protected string rawScan { get; set; } = null!; protected string idOPeratore { get; set; } = null!; protected int sessionId { get; set; } = 0; + protected int magazzinoId { get; set; } = 0; protected int nScansioniTot { get; set; } = 0; protected List? eleScansioni; //protected AnagUdcModel currUdc{ get; set; } = null!; @@ -44,10 +45,11 @@ namespace MP.INVE.Pages { await Task.Delay(1); var uri = NavManager.ToAbsoluteUri(NavManager.Uri); - if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOperatore", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSessione", out var _inveSessionId)) + if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOperatore", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSessione", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("IdMag", out var _idMag)) { idOPeratore = _matrOpr; sessionId = int.Parse(_inveSessionId); + magazzinoId = int.Parse(_idMag); eleScansioni = MIService.ScanBySession(sessionId); nScansioniTot = eleScansioni.Count(); diff --git a/MP.INVE/Pages/InveSession.razor b/MP.INVE/Pages/InveSession.razor index 6be0de66..b3e6dd71 100644 --- a/MP.INVE/Pages/InveSession.razor +++ b/MP.INVE/Pages/InveSession.razor @@ -32,156 +32,11 @@ } else { - - @*@if (reqNew) - { - -
-
-
-
-
- Avvia una nuova sessione -
-
-
-
-
-
-
-
- Magazzino - -
-
-
-
- Descrizione - -
-
- -
-
-
-
-
-
-
-
- -
-
-
- @if (magazzino != -1) - { -
- -
- } -
-
-
-
-
-
- } - - - - @if (inCorso) - { - - } - - - - - - - - - - - - @if (elencoSessioni != null) - { - @foreach (var item in elencoSessioni) - { - - @if (inCorso) - { - - } - - - - - - @if (item.DtEnd != null) - { - - } - else - { - - } - - - - - - } - } - -
QRID sessioneMagazzinoOperatoreData inizioData fineDescriptionTrasferita
- - - - @item.InveSessID - - @item.AnagMagNav.DescMag - - @item.UserCrea - - @item.DtStart - - @item.DtEnd - - In corso... - - @item.Description - - @if (item.Transferred) - { - - } - else - { - - - } - - -
*@ + } diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index aa2b577b..b7a93e15 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 6.16.2212.713

+

Versione: 6.16.2212.1212


Note di rilascio:
  • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index 1e983b84..5ed644d1 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.713 +6.16.2212.1212 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index ecedee3f..b70c036d 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.713 + 6.16.2212.1212 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