From 53b42c686244876cb22411a6010da131a3ec73d4 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 30 Nov 2022 10:02:40 +0100 Subject: [PATCH 01/10] inizio filtro macchina per Reparto --- MP.Data/Controllers/MpSpecController.cs | 29 +++++++++---- MP.SPEC/Components/ListDossiers.razor | 4 +- MP.SPEC/Components/ListDossiers.razor.cs | 4 +- MP.SPEC/Components/SelFilterXDL.razor | 2 +- MP.SPEC/Components/SelFilterXDL.razor.cs | 2 +- MP.SPEC/Data/MpDataService.cs | 17 ++++---- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/ODL.razor.cs | 4 +- MP.SPEC/Pages/PODL.razor | 6 +-- MP.SPEC/Pages/PODL.razor.cs | 52 +++++++++++++----------- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 13 files changed, 75 insertions(+), 53 deletions(-) diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index 2805f13d..438d0442 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -696,16 +696,31 @@ namespace MP.Data.Controllers /// Elenco da tabella Macchine /// /// - public List MacchineGetAll() + public List MacchineGetAll(string codGruppo = "*") { - List dbResult = new List(); + List dbResult = new List(); using (var dbCtx = new MoonProContext(_configuration)) { - dbResult = dbCtx - .DbSetMacchine - .AsNoTracking() - .OrderBy(x => x.IdxMacchina) - .ToList(); + if (codGruppo == "*") + { + dbResult = dbCtx + .DbSetGrp2Macc + .AsNoTracking() + .Include(m => m.MachineNav) + .OrderBy(x => x.IdxMacchina) + .ToList(); + } + else + { + + dbResult = dbCtx + .DbSetGrp2Macc + .Where(c => c.CodGruppo == codGruppo) + .AsNoTracking() + .Include(m => m.MachineNav) + .OrderBy(x => x.IdxMacchina) + .ToList(); + } } return dbResult; } diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 24efa151..80655c2b 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -106,11 +106,11 @@ else @if (item.IdxMacchina == currRecordClone.IdxMacchina) { - + } else { - + } } } diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index d91907a0..7fea9ec4 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -227,7 +227,7 @@ namespace MP.SPEC.Components ListStati = await MDService.AnagStatiComm(); selAzienda = await MDService.tryGetConfig("AZIENDA"); ListArticoli = await MDService.ArticoliGetSearch(100000, selAzienda, ""); - ListMacchine = await MDService.MacchineGetAll(); + ListMacchine = await MDService.MacchineGetAll("*"); await reloadData(true); } @@ -309,7 +309,7 @@ namespace MP.SPEC.Components private List? ListArticoli; private List? ListGruppiFase; - private List? ListMacchine; + private List? ListMacchine; private List? ListRecords; private List? ListStati; diff --git a/MP.SPEC/Components/SelFilterXDL.razor b/MP.SPEC/Components/SelFilterXDL.razor index 526b89cc..a9fdc0e2 100644 --- a/MP.SPEC/Components/SelFilterXDL.razor +++ b/MP.SPEC/Components/SelFilterXDL.razor @@ -42,7 +42,7 @@ { foreach (var item in ListMacchine) { - + } } diff --git a/MP.SPEC/Components/SelFilterXDL.razor.cs b/MP.SPEC/Components/SelFilterXDL.razor.cs index 039b0c0b..f5466103 100644 --- a/MP.SPEC/Components/SelFilterXDL.razor.cs +++ b/MP.SPEC/Components/SelFilterXDL.razor.cs @@ -19,7 +19,7 @@ namespace MP.SPEC.Components public List? ListGruppiFase { get; set; } = null; [Parameter] - public List? ListMacchine { get; set; } = null; + public List? ListMacchine { get; set; } = null; [Parameter] public List? ListStati { get; set; } = null; diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index d6c12f21..e68889fe 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -177,7 +177,8 @@ namespace MP.SPEC.Data Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string readType = "DB"; - string currKey = $"{redisArtList}:{azienda}"; + string sKey = string.IsNullOrEmpty(searchVal) ? "***" : searchVal; + string currKey = $"{redisArtList}:{azienda}:{sKey}"; // cerco in redis dato valore sel macchina... RedisValue rawData = redisDb.StringGet(currKey); if (rawData.HasValue) @@ -789,30 +790,30 @@ namespace MP.SPEC.Data /// Elenco di tutte le macchine gestite /// /// - public async Task> MacchineGetAll() + public async Task> MacchineGetAll(string codGruppo) { - List? result = new List(); + List? result = new List(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string readType = "DB"; - string currKey = redisMacList; + string currKey = $"{redisMacList}:{codGruppo}"; // cerco in redis dato valore sel macchina... RedisValue rawData = redisDb.StringGet(currKey); if (rawData.HasValue) { - result = JsonConvert.DeserializeObject>($"{rawData}"); + result = JsonConvert.DeserializeObject>($"{rawData}"); readType = "REDIS"; } else { - result = await Task.FromResult(dbController.MacchineGetAll()); + result = await Task.FromResult(dbController.MacchineGetAll(codGruppo)); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); + redisDb.StringSet(redisMacList, rawData, getRandTOut(redisLongTimeCache)); } if (result == null) { - result = new List(); + result = new List(); } stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 78d235dd..0db5d526 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.3008 + 6.16.2211.3010 diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index b7662ce5..db6276c6 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -111,7 +111,7 @@ namespace MP.SPEC.Pages ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList(); } ListStati = await MDService.AnagStatiComm(); - ListMacchine = await MDService.MacchineGetAll(); + ListMacchine = await MDService.MacchineGetAll(selReparto); padCodXdl = await MDService.tryGetConfig("padCodXdl"); } @@ -160,7 +160,7 @@ namespace MP.SPEC.Pages #region Private Fields - private List? ListMacchine; + private List? ListMacchine; private List? ListStati; #endregion Private Fields diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index 7a9d707d..97bcd278 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -161,16 +161,16 @@ { foreach (var item in ListMacchine) { - @if (!item.Descrizione.Contains("NEW Descrizione")) + @if (!item.MachineNav.Descrizione.Contains("NEW Descrizione")) { if (item.IdxMacchina == currRecordControlli.IdxMacchina) { - + } else { - + } } } diff --git a/MP.SPEC/Pages/PODL.razor.cs b/MP.SPEC/Pages/PODL.razor.cs index dc3d2cc2..1f7c79a4 100644 --- a/MP.SPEC/Pages/PODL.razor.cs +++ b/MP.SPEC/Pages/PODL.razor.cs @@ -98,25 +98,16 @@ namespace MP.SPEC.Pages await localStorage.SetItemAsync(keyStor, selReparto); } } - - protected override async Task OnInitializedAsync() + protected override async Task OnParametersSetAsync() { await getReparto(); - ListAziende = await MDService.ElencoAziende(); - var allGruppiData = await MDService.ElencoGruppiFase(); - if (allGruppiData != null) - { - ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList(); - } - ListMacchine = await MDService.MacchineGetAll(); - ListStati = await MDService.AnagStatiComm(); - ListArticoli = await MDService.ArticoliGetSearch(100, currAzienda, artSearch); - //SearchRecords = await MDService.ListPODLFilt(hasOdl, StatoSel, macchina, selReparto, selDtStart, selDtEnd); - currAzienda = await MDService.tryGetConfig("AZIENDA"); - padCodXdl = await MDService.tryGetConfig("padCodXdl"); - // carico dati await reloadData(); } + protected override async Task OnInitializedAsync() + { + // carico dati + //await reloadData(); + } protected async Task pgResetReq(bool doReset) { @@ -143,6 +134,7 @@ namespace MP.SPEC.Pages //} //currArticolo = ""; + if (ListArticoli != null && ListArticoli.Count > 0) { //var firstArt = ListArticoli.FirstOrDefault(); @@ -166,7 +158,7 @@ namespace MP.SPEC.Pages string codMacc = ""; if (ListMacchine != null && ListMacchine.Count > 0) { - var firstMacc = ListMacchine.FirstOrDefault(x => x.Nome.Contains(currAzienda)); + var firstMacc = ListMacchine.FirstOrDefault(x => x.MachineNav.Nome.Contains(currAzienda)); if (firstMacc != null) { codMacc = firstMacc.IdxMacchina; @@ -232,7 +224,7 @@ namespace MP.SPEC.Pages private List? ListGruppiFase; - private List? ListMacchine; + private List? ListMacchine; private List? ListStati; @@ -342,8 +334,11 @@ namespace MP.SPEC.Pages get => _currRecord; set { - _currRecord = value; - artSearch = value == null ? "" : value.CodArticolo; + if (value != null) + { + _currRecord = value; + artSearch = value == null ? "" : value.CodArticolo; + } } } @@ -426,13 +421,24 @@ namespace MP.SPEC.Pages { isLoading = true; await Task.Delay(1); - + ListAziende = await MDService.ElencoAziende(); + var allGruppiData = await MDService.ElencoGruppiFase(); + if (allGruppiData != null) + { + ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList(); + } + ListMacchine = await MDService.MacchineGetAll(selReparto); + ListStati = await MDService.AnagStatiComm(); ListArticoli = await MDService.ArticoliGetSearch(100, currAzienda, artSearch); - // ListArticoli = new List(); - //} + //SearchRecords = await MDService.ListPODLFilt(hasOdl, StatoSel, macchina, selReparto, selDtStart, selDtEnd); + currAzienda = await MDService.tryGetConfig("AZIENDA"); + padCodXdl = await MDService.tryGetConfig("padCodXdl"); + //ListMacchine = await MDService.MacchineGetAll(selReparto); + //ListArticoli = await MDService.ArticoliGetSearch(100, currAzienda, artSearch); + isLoading = false; } - protected string header + protected string header { get => currFilter.Header; set => currFilter.Header = value; diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 8a2ab009..a6dcc38b 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2211.3008

+

Versione: 6.16.2211.3010


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 81c7abf1..b06c03c3 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.3008 +6.16.2211.3010 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index dadec365..7b0fa5d8 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.3008 + 6.16.2211.3010 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From 80b28efa33acf68c556da7f5a36c627c2de05cf4 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 30 Nov 2022 11:26:43 +0100 Subject: [PATCH 02/10] FIX filtro macchina per reparto --- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/PODL.razor | 31 ++++++++++++++++++------------- MP.SPEC/Pages/PODL.razor.cs | 26 +++++++++++++++++++++++--- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 6 files changed, 45 insertions(+), 20 deletions(-) diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 0db5d526..ecf48b5e 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.3010 + 6.16.2211.3011 diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index 97bcd278..1d99e501 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -131,7 +131,7 @@
    Gruppo - @if (ListGruppiFase != null) { foreach (var item in ListGruppiFase) @@ -159,18 +159,26 @@ - @if (ListMacchine != null) { - foreach (var item in ListMacchine) + if (ListMacchine.Count == 0) { - + + } + else + { + + foreach (var item in ListMacchine) + { + + } } } diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index 1d99e501..95b50e3e 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -53,7 +53,7 @@
    - + @if (currRecord != null) diff --git a/MP.SPEC/Pages/PODL.razor.cs b/MP.SPEC/Pages/PODL.razor.cs index 2e89a3d8..452e8716 100644 --- a/MP.SPEC/Pages/PODL.razor.cs +++ b/MP.SPEC/Pages/PODL.razor.cs @@ -100,14 +100,8 @@ namespace MP.SPEC.Pages } protected override async Task OnParametersSetAsync() { - await getReparto(); await reloadData(); } - protected override async Task OnInitializedAsync() - { - // carico dati - //await reloadData(); - } protected async Task pgResetReq(bool doReset) { @@ -227,6 +221,7 @@ namespace MP.SPEC.Pages private List? ListGruppiFase; private List? ListMacchine; + private List? ListMacchineFiltro; private List? ListStati; @@ -354,7 +349,7 @@ namespace MP.SPEC.Pages { if (value != null) { - value.CodGruppo = gruppoSearch; + _currRecord = value; artSearch = value == null ? "" : value.CodArticolo; @@ -437,8 +432,14 @@ namespace MP.SPEC.Pages } } + private async Task reloadDataFiltro() + { + ListMacchineFiltro = await MDService.MacchineGetAll(selReparto); + } + private async Task reloadData() { + await getReparto(); isLoading = true; await Task.Delay(1); ListAziende = await MDService.ElencoAziende(); @@ -448,6 +449,7 @@ namespace MP.SPEC.Pages ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList(); } ListMacchine = await MDService.MacchineGetAll(gruppoSearch); + ListStati = await MDService.AnagStatiComm(); ListArticoli = await MDService.ArticoliGetSearch(100, currAzienda, artSearch); //SearchRecords = await MDService.ListPODLFilt(hasOdl, StatoSel, macchina, selReparto, selDtStart, selDtEnd); @@ -472,6 +474,7 @@ namespace MP.SPEC.Pages await localStorage.SetItemAsync("reparto", selReparto); await Task.Delay(1); await InvokeAsync(() => StateHasChanged()); + await reloadDataFiltro(); currFilter = newParams; isLoading = false; } From 3a5a98abc0fc808bbcca488b52fd00ac6539fbc3 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 30 Nov 2022 15:40:57 +0100 Subject: [PATCH 04/10] fix --- MP.Data/Controllers/MpSpecController.cs | 2 +- MP.SPEC/Components/ListDossiers.razor | 400 +++++++++++------------ MP.SPEC/Components/ListDossiers.razor.cs | 2 +- MP.SPEC/Components/SelFilterXDL.razor | 45 ++- MP.SPEC/Components/SelFilterXDL.razor.cs | 2 +- MP.SPEC/Data/MpDataService.cs | 8 +- MP.SPEC/Pages/ODL.razor.cs | 2 +- MP.SPEC/Pages/PODL.razor | 273 ++++++++-------- MP.SPEC/Pages/PODL.razor.cs | 44 +-- 9 files changed, 368 insertions(+), 410 deletions(-) diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index 3df6862a..e45e05e8 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -699,7 +699,7 @@ namespace MP.Data.Controllers /// public List MacchineGetFilt(string codGruppo) { - List dbResult = new List(); + List dbResult = new List(); using (var dbCtx = new MoonProContext(_configuration)) { if (codGruppo == "*") diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 80655c2b..cbb6bcfc 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -6,99 +6,99 @@ @if (ListRecords == null) { - + } else if (totalCount == 0) { -
    Nessun record trovato
    +
    Nessun record trovato
    } else { - + @if (currFluxLogDto != null) { -
    -
    -
    -
    -
    - Modifica Parametro -
    -
    +
    +
    +
    +
    +
    + Modifica Parametro +
    +
    @if (isEditing) { - PENDING CHANGES... + PENDING CHANGES... } -
    -
    -
    -
    -
    -
    - MACCHINA -
    -
    -
    - DATA - +
    +
    +
    +
    + MACCHINA + +
    +
    +
    +
    + DATA + +
    +
    +
    +
    + DATA TYPE + +
    +
    +
    +
    + VALORE + +
    +
    -
    -
    -
    - DATA TYPE - -
    -
    -
    -
    - VALORE - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    -
    -
    } - - + + @if (currRecordClone != null) { -
    -
    -
    -
    -
    - Nuovo Dossier -
    -
    -
    - -
    -
    -
    - MACCHINA - @if (ListMacchine != null) { foreach (var item in ListMacchine) @@ -106,89 +106,89 @@ else @if (item.IdxMacchina == currRecordClone.IdxMacchina) { - + } else { - + } } } - -
    -
    -
    -
    - FASE - +
    +
    +
    +
    + FASE + -
    -
    + +
    +
    -
    -
    - ARTICOLI +
    +
    + ARTICOLI - @if (ListArticoli != null) { foreach (var item in ListArticoli) { @if (item.CodArticolo == currRecordClone.CodArticolo) { - + } else { - + } } } - + +
    +
    -
    -
    - + -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    -
    -
    } - + @@ -196,149 +196,149 @@ else -
    -
    - - - -
    -
    +
    +
    + + + + - - - - - - - - - + + + + + + + + + + + @foreach (var record in ListRecords) { - - + - + - + - + - + - + - + - + + } - -
    +
    @if (currRecord != null) { - - + + } -
    -
    Articolo Fase Macchina Data Snap ODL
    Articolo Fase Macchina Data Snap ODL
    +
    @if (isEditing == false) { - - - + + + @**@ } else { - + } - + @record.CodArticolo -
    @record.ArticoloNav.DescArticolo
    -
    +
    @record.ArticoloNav.DescArticolo
    +
    @tradFase(record.KeyRichiesta) - + @record.IdxMacchina - + @record.DtRif - -
    -
    +
    +
    +
    @record.IdxODL -
    +
    @if (record.IdxODL > 0) { - + } - -
    + + @if (isEditing == false) { - + } else { - + } -
    + +
    @if (!visualizzaFlux) { if (listaFlux == null) { -
    Nessun record trovato
    +
    Nessun record trovato
    } else { -
    - - - - - - - - - - - +
    +
    - - Macchina Data Data Type - Valore -
    + + + + + + + + + + @foreach (var record in listaFlux) { - - - + + - + - + - + - + + } - -
    + + Macchina Data Data Type + Valore +
    - - +
    + + @record.IdxMacchina - + @record.dtEvento - + @traduci(record.CodFlux) -
    @record.CodFlux
    -
    +
    @record.CodFlux
    +
    @if (record.ValoreEdit != record.Valore) { -
    @record.ValoreEdit
    -
    (@record.Valore)
    +
    @record.ValoreEdit
    +
    (@record.Valore)
    } else { -
    @record.ValoreEdit
    +
    @record.ValoreEdit
    } -
    -
    + + +
    } } +
    -
    } diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 48013235..89106654 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -309,7 +309,7 @@ namespace MP.SPEC.Components private List? ListArticoli; private List? ListGruppiFase; - private List? ListMacchine; + private List? ListMacchine; private List? ListRecords; private List? ListStati; diff --git a/MP.SPEC/Components/SelFilterXDL.razor b/MP.SPEC/Components/SelFilterXDL.razor index 44ec8e07..f3f26e8a 100644 --- a/MP.SPEC/Components/SelFilterXDL.razor +++ b/MP.SPEC/Components/SelFilterXDL.razor @@ -23,7 +23,7 @@ { foreach (var item in ListGruppiFase) { - + } } @@ -37,19 +37,12 @@
    @@ -68,7 +61,7 @@ { foreach (var item in ListStati) { - + } } @@ -76,20 +69,20 @@
    @if (!isActive || hasOdl) { -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    }
    diff --git a/MP.SPEC/Components/SelFilterXDL.razor.cs b/MP.SPEC/Components/SelFilterXDL.razor.cs index f5466103..039b0c0b 100644 --- a/MP.SPEC/Components/SelFilterXDL.razor.cs +++ b/MP.SPEC/Components/SelFilterXDL.razor.cs @@ -19,7 +19,7 @@ namespace MP.SPEC.Components public List? ListGruppiFase { get; set; } = null; [Parameter] - public List? ListMacchine { get; set; } = null; + public List? ListMacchine { get; set; } = null; [Parameter] public List? ListStati { get; set; } = null; diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index a02d5104..a4dbd916 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -793,7 +793,7 @@ namespace MP.SPEC.Data /// public async Task> MacchineGetFilt(string codGruppo) { - List? result = new List(); + List? result = new List(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string readType = "DB"; @@ -803,7 +803,7 @@ namespace MP.SPEC.Data RedisValue rawData = redisDb.StringGet(currKey); if (rawData.HasValue) { - result = JsonConvert.DeserializeObject>($"{rawData}"); + result = JsonConvert.DeserializeObject>($"{rawData}"); readType = "REDIS"; } else @@ -811,11 +811,11 @@ namespace MP.SPEC.Data result = await Task.FromResult(dbController.MacchineGetFilt(codGruppo)); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(redisMacList, rawData, getRandTOut(redisLongTimeCache)); + redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); } if (result == null) { - result = new List(); + result = new List(); } stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index 8fe5897a..eff6487f 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -160,7 +160,7 @@ namespace MP.SPEC.Pages #region Private Fields - private List? ListMacchine; + private List? ListMacchine; private List? ListStati; #endregion Private Fields diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index 95b50e3e..d34dda95 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -18,7 +18,7 @@
    @if (addEnabled) { - + }
    @@ -26,26 +26,26 @@
    @if (filtActive) { -
    +
    @**@ @if (selReparto != "*") { - + } @if (macchina != "*") { - + } @if (StatoSel != "*") { - + } -
    +
    } @if (hasOdl) { - @selDtStart   - @selDtEnd   + @selDtStart   + @selDtEnd   }
    - + @if (currRecord != null) { -
    -
    -
    -
    @header
    -
    -
    -
    -
    -
    -
    - Search - +
    +
    +
    +
    @header
    +
    +
    +
    +
    +
    +
    + Search + +
    -
    -
    -
    - Articolo - @if (ListArticoli != null) { foreach (var item in ListArticoli) { @if (item.CodArticolo == currRecordControlli.CodArticolo) { - + } else { - + } } } - + +
    -
    -
    -
    - # pz - - T.Ciclo - +
    +
    + # pz + + T.Ciclo + +
    -
    -
    -
    - Fase - @if (ListStati != null) { foreach (var item in ListStati) { @if (item.value == currRecordControlli.KeyRichiesta) { - + } else { - + } } } - + +
    -
    -
    -
    -
    +
    +
    - Gruppo - @if (ListGruppiFase != null) { foreach (var item in ListGruppiFase) { @if (item.CodGruppo == currRecordControlli.CodGruppo) { - + } else { - + } } } - -
    -
    -
    -
    -
    -
    -
    - Macchina -
    -
    -
    -
    - Note - -
    -
    -
    -
    -
    -
    -
    -
    - Attivabile -
    -
    - +
    +
    +
    +
    + Macchina + +
    -
    -
    -
    -
    -
    - +
    +
    + Note + +
    -
    -
    - +
    +
    +
    +
    +
    + Attivabile +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + @if (currRecord.CodArticolo != "" && currRecord.CodFase != "" && currRecord.CodGruppo != "" && currRecord.IdxMacchina != "") + { + + } +
    -
    } else if (addEnabled) { -
    -
    +
    +
    @**@ -
    +
    @if (reqNew) { -
    -
    - Azienda - @if (ListAziende != null) { foreach (var item in ListAziende.Where(x => x.CodGruppo != "*").ToList()) { - + } } - -
    -
    -
    -
    - Search - - Articolo - +
    +
    +
    +
    + Search + + Articolo + -
    -
    + +
    +
    } -
    +
    }
    @if (isLoading) { - + } else { - + }
    @@ -209,7 +197,7 @@
    - @if (currRecord.CodArticolo != "" && currRecord.CodFase != "" && currRecord.CodGruppo != "" && currRecord.IdxMacchina != "") + @if (currRecord.CodArticolo != "" && currRecord.CodFase != "" && selReparto != "*" && currRecord.IdxMacchina != "") { } diff --git a/MP.SPEC/Pages/PODL.razor.cs b/MP.SPEC/Pages/PODL.razor.cs index 19f3fd84..89aaf465 100644 --- a/MP.SPEC/Pages/PODL.razor.cs +++ b/MP.SPEC/Pages/PODL.razor.cs @@ -198,6 +198,7 @@ namespace MP.SPEC.Pages return; await Task.Delay(1); var clonedRec = MP.Data.Utils.POdlExt.convertToPOdl(selRec); + clonedRec.CodGruppo = currGruppoSel.CodGruppo; var done = await MDService.POdlUpdateRecord(clonedRec); await callSyncDb(clonedRec); currRecord = null; @@ -221,6 +222,8 @@ namespace MP.SPEC.Pages private PODLExpModel currRecordControlli = new PODLExpModel(); + private AnagGruppi currGruppoSel = new AnagGruppi(); + private List? ListArticoli; private List? ListAziende; @@ -421,9 +424,12 @@ namespace MP.SPEC.Pages { isLoading = true; await Task.Delay(1); - ListMacchine = await MDService.MacchineGetFilt(selReparto); ListArticoli = await MDService.ArticoliGetSearch(100, currAzienda, artSearch); + if (ListGruppiFase != null) + { + currGruppoSel = ListGruppiFase.Where(x => x.CodGruppo == selReparto).FirstOrDefault(); + } isLoading = false; } protected string header diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index d541ddeb..1de43994 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

    Versione: 6.16.2211.3015

    +

    Versione: 6.16.2211.3016


    Note di rilascio:
    • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 6b9d7ca4..a776325b 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.3015 +6.16.2211.3016 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a9c8ec9d..e11b7ef2 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.3015 + 6.16.2211.3016 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From aed5af0c16f7cb3f51bb3407a66a5d6a76dce127 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 1 Dec 2022 09:00:57 +0100 Subject: [PATCH 06/10] trigger commit --- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/PODL.razor | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 8fa77f31..af941906 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.3016 + 6.16.2212.108 diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index f66eb9db..0c739be7 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -68,7 +68,7 @@
      - Search + Ricerca
      diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 1de43994..348059af 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

      Versione: 6.16.2211.3016

      +

      Versione: 6.16.2212.108


      Note di rilascio: