From f93f18561ff0a2b476ba5ea3bb11a055abbfff8c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 3 Aug 2021 17:38:08 +0200 Subject: [PATCH 1/4] Fix calcolo PlantId (was hardCoded) --- GWMS.UI/Controllers/IOBController.cs | 2 +- GWMS.UI/GWMS.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GWMS.UI/Controllers/IOBController.cs b/GWMS.UI/Controllers/IOBController.cs index daa844b..99991ac 100644 --- a/GWMS.UI/Controllers/IOBController.cs +++ b/GWMS.UI/Controllers/IOBController.cs @@ -281,7 +281,7 @@ namespace GWMS.UI.Controllers if (currPlant != null && currPlant.PlantId > 0) { // conversione dati - List plData = rawData.fluxData.Select(l => _DataService.convertFluxToPL(1, l)).ToList(); + List plData = rawData.fluxData.Select(jpl => _DataService.convertFluxToPL(currPlant.PlantId, jpl)).ToList(); //insert! fatto = _DataService.PlantLogInsert(plData); } diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj index 2852188..92992c0 100644 --- a/GWMS.UI/GWMS.UI.csproj +++ b/GWMS.UI/GWMS.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.0.2108.0312 + 1.0.2108.0317 95c9f021-52d1-4390-a670-5810b7b777b0 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 1b1afd6..5d3da76 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ GWMS - Gas Warehouse Management System -

Versione: 1.0.2108.0312

+

Versione: 1.0.2108.0317


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index b900339..88dafdf 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2108.0312 +1.0.2108.0317 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 251f5ce..e22b846 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2108.0312 + 1.0.2108.0317 http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html false From 866319a3116ac334c31999494352506a8dbf2ec5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 4 Aug 2021 13:18:52 +0200 Subject: [PATCH 2/4] =?UTF-8?q?cambio=20modalit=C3=A0=20init=20x=20valori?= =?UTF-8?q?=20VUOTI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GWMS.Data/Controllers/GWMSController.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/GWMS.Data/Controllers/GWMSController.cs b/GWMS.Data/Controllers/GWMSController.cs index b89a299..5aad10b 100644 --- a/GWMS.Data/Controllers/GWMSController.cs +++ b/GWMS.Data/Controllers/GWMSController.cs @@ -397,9 +397,13 @@ namespace GWMS.Data.Controllers PressTS.Add("BH", PressBHTS); PressTS.Add("BL", PressBLTS); - PressAct.Add("Main", PressMainTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble); - PressAct.Add("BH", PressBHTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble); - PressAct.Add("BL", PressBLTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble); + double valMain = PressMainTS.Count > 0 ? PressMainTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0; + double valBH = PressBHTS.Count > 0 ? PressBHTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0; + double valBL = PressBLTS.Count > 0 ? PressBLTS.OrderByDescending(x => x.DtEvent).Take(1).FirstOrDefault().ValDouble : 0; + + PressAct.Add("Main", valMain); + PressAct.Add("BH", valBH); + PressAct.Add("BL", valBL); PlantDTO answ = new PlantDTO() { From c13d2f135b1dd333b1fd998e9623b7cca0e56b3a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 4 Aug 2021 13:19:04 +0200 Subject: [PATCH 3/4] Refresh --- GWMS.Data/DTO/PlantDTO.cs | 4 ++-- GWMS.Data/ModelBuilderExtensions.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GWMS.Data/DTO/PlantDTO.cs b/GWMS.Data/DTO/PlantDTO.cs index 73d84e7..d03c146 100644 --- a/GWMS.Data/DTO/PlantDTO.cs +++ b/GWMS.Data/DTO/PlantDTO.cs @@ -18,7 +18,7 @@ namespace GWMS.Data.DTO public string PlantCode { get; set; } = ""; public string PlantDesc { get; set; } = ""; - public double LevelMax { get; set; } = 9999; + public double LevelMax { get; set; } = 99999; public double LevelAct { get; set; } = 0; @@ -28,7 +28,7 @@ namespace GWMS.Data.DTO { int answ = 0; double denom = LevelMax == 0 ? 1 : LevelMax; - answ = (int)(LevelAct *100/ denom); + answ = (int)(LevelAct * 100 / denom); return answ; } } diff --git a/GWMS.Data/ModelBuilderExtensions.cs b/GWMS.Data/ModelBuilderExtensions.cs index 04f88a2..4ff3586 100644 --- a/GWMS.Data/ModelBuilderExtensions.cs +++ b/GWMS.Data/ModelBuilderExtensions.cs @@ -40,7 +40,7 @@ namespace GWMS.Data new PlantDetailModel { PlantId = 1, PlantCode = "PIZ03", PlantDesc = "Collecchio", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }, new PlantDetailModel { PlantId = 2, PlantCode = "PIZ04", PlantDesc = "Noceto", LevelMax = 28000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }, new PlantDetailModel { PlantId = 3, PlantCode = "PIZ05", PlantDesc = "Baganzola", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 }, - new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 24000, PressMax = 19, PressBHMax = 270, PressBLMax = 270 } + new PlantDetailModel { PlantId = 4, PlantCode = "PIZ08", PlantDesc = "Pilastrello", LevelMax = 25500, PressMax = 19, PressBHMax = 270, PressBLMax = 270 } ); // inizializzazione dei valori di default x Fornitori From e576f94348171a3f4256f06d7cadcb80cce532cb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 4 Aug 2021 13:19:29 +0200 Subject: [PATCH 4/4] refresh --- GWMS.UI/GWMS.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj index 92992c0..2d97a19 100644 --- a/GWMS.UI/GWMS.UI.csproj +++ b/GWMS.UI/GWMS.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.0.2108.0317 + 1.0.2108.0413 95c9f021-52d1-4390-a670-5810b7b777b0 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 5d3da76..788540d 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ GWMS - Gas Warehouse Management System -

    Versione: 1.0.2108.0317

    +

    Versione: 1.0.2108.0413


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 88dafdf..659b999 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2108.0317 +1.0.2108.0413 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index e22b846..0900e68 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2108.0317 + 1.0.2108.0413 http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html false