diff --git a/MP.Data/Controllers/MpMongoController.cs b/MP.Data/Controllers/MpMongoController.cs index baade6af..c51bd878 100644 --- a/MP.Data/Controllers/MpMongoController.cs +++ b/MP.Data/Controllers/MpMongoController.cs @@ -184,9 +184,9 @@ namespace MP.Data.Controllers foreach (var item in currRecipe.RowsVal) { var rowsStrings = item.Value.Select(x => $"\"{x.Key}\": \"{x.Value}\"").ToList(); - rowComp.Add($"{Environment.NewLine}{sRow}{string.Join(",", rowsStrings)}{eRow}"); + rowComp.Add($"{sRow}{string.Join(",", rowsStrings)}{eRow}"); } - string rowsVals = string.Join(",", rowComp); + string rowsVals = string.Join($",{Environment.NewLine}", rowComp); //...poi sostituisco answ = answ.Replace("||PlaceholderRows||", rowsVals); } diff --git a/MP.Data/MgModels/RecipeModel.cs b/MP.Data/MgModels/RecipeModel.cs index a4552080..1e64f17d 100644 --- a/MP.Data/MgModels/RecipeModel.cs +++ b/MP.Data/MgModels/RecipeModel.cs @@ -58,10 +58,12 @@ namespace MP.Data.MgModels #region Public Properties +#if false /// /// Ricetta in formato calcolato (string) /// - public string CalcRecipe { get; set; } = ""; + public string CalcRecipe { get; set; } = ""; +#endif /// /// Configurazione ricetta x header diff --git a/MP.SPEC/Components/RecipeMan.razor b/MP.SPEC/Components/RecipeMan.razor index 9e369147..60b1f72b 100644 --- a/MP.SPEC/Components/RecipeMan.razor +++ b/MP.SPEC/Components/RecipeMan.razor @@ -13,7 +13,8 @@ else

Testata Ricetta

- Display + XML + json @if (!showHead) { @CurrRecipe?.HeadVal.Count par diff --git a/MP.SPEC/Controllers/RecipeController.cs b/MP.SPEC/Controllers/RecipeController.cs index 7ac28676..9e8554da 100644 --- a/MP.SPEC/Controllers/RecipeController.cs +++ b/MP.SPEC/Controllers/RecipeController.cs @@ -3,7 +3,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using MP.Data.MgModels; using MP.SPEC.Data; +using Newtonsoft.Json; using NLog; +using System.Xml; namespace MP.SPEC.Controllers { @@ -33,11 +35,26 @@ namespace MP.SPEC.Controllers { string answ = ""; var reqRecipe = await DService.RecipeGetByPODL(idxPODL); - if(reqRecipe!=null) + if (reqRecipe != null) { answ = DService.CalcRecipe(reqRecipe); } return answ; } + [HttpGet("GetRecipeXML")] + public async Task GetRecipeXML(int idxPODL) + { + string answ = ""; + // recupero versione json + string rawData = await GetRecipe(idxPODL); + if (!string.IsNullOrEmpty(rawData)) + { + // aggiungo root node? + + XmlDocument doc = (XmlDocument)JsonConvert.DeserializeXmlNode(rawData); + answ += doc.InnerXml; + } + return answ; + } } } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 42ad337e..dd054b69 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2302.1311 + 6.16.2302.1313 diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index ff9d7e44..08476435 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -26,7 +26,6 @@ @if (filtActive) {
- @**@ @if (selReparto != "*") { diff --git a/MP.SPEC/Recipe/Fimat/TemplateOutput.tpl b/MP.SPEC/Recipe/Fimat/TemplateOutput.tpl index a4adbb03..512e709d 100644 --- a/MP.SPEC/Recipe/Fimat/TemplateOutput.tpl +++ b/MP.SPEC/Recipe/Fimat/TemplateOutput.tpl @@ -3,12 +3,12 @@ "DesRecipe": { "DesData": { ||PlaceholderHeader|| + } }, - "ColRecipe": [ - ||SROW:{"ColData":{|| - ||PlaceholderRows|| - ||EROW:}}|| - ] - } + "ColRecipe": [ + ||SROW:{"ColData":{|| + ||PlaceholderRows|| + ||EROW:}}|| + ] } } \ No newline at end of file diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 72eabcda..f5c92414 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2302.1311

+

Versione: 6.16.2302.1313


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 67c61c02..5b8cb817 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2302.1311 +6.16.2302.1313 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 2e44f23a..027ebd80 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2302.1311 + 6.16.2302.1313 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