SPEC:
- Inizio a generare ricetta da template
This commit is contained in:
@@ -12,17 +12,13 @@ namespace MP.Data.Conf
|
||||
public class RecipeBlockConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi prefissate
|
||||
/// Dizionario delle chiavi, differenziate dai primi caratteri:
|
||||
/// [C] --> Calcolato
|
||||
/// [F] --> Fixed (NON modificabile)
|
||||
/// [E] --> Enum: modificabile ma da dizionario valori seguente
|
||||
/// "" --> editabile
|
||||
/// </summary>
|
||||
public Dictionary<string, string> FixedKeys { get; set; } = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi Calcolate
|
||||
/// </summary>
|
||||
public Dictionary<string, string> CalcKeys { get; set; } = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi Editabili
|
||||
/// </summary>
|
||||
public Dictionary<string, string> EditKeys { get; set; } = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> ListKeys { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario degli enum permessi
|
||||
|
||||
@@ -65,14 +65,21 @@ namespace MP.Data.Controllers
|
||||
{
|
||||
string rawData = File.ReadAllText(fullPath);
|
||||
var currRecipe = JsonConvert.DeserializeObject<RecipeConfig>(rawData);
|
||||
// copio la mia ricetta...
|
||||
// copio la mia ricetta come conf...
|
||||
answ = new RecipeModel()
|
||||
{
|
||||
IdxPODL = idxPODL,
|
||||
TemplateFile = currRecipe.TemplateFile,
|
||||
HeadConf = currRecipe.HeadConf,
|
||||
RowsConf = currRecipe.RowsConf
|
||||
RowsConf = currRecipe.RowsConf,
|
||||
HeadVal = currRecipe.HeadConf.ListKeys,
|
||||
// aggiungo 1 riga...
|
||||
RowsVal = new Dictionary<int, Dictionary<string, string>>()
|
||||
{
|
||||
{ 1, currRecipe.RowsConf.ListKeys}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return answ;
|
||||
@@ -82,7 +89,7 @@ namespace MP.Data.Controllers
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public static string RecipePath(string ruleName)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,17 @@ namespace MP.Data.MgModels
|
||||
public int IdxPODL { get; set; } = 0;
|
||||
public int IdxODL { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario chiavi/valori campi header
|
||||
/// </summary>
|
||||
public Dictionary<string, string> HeadVal { get; set; } = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// Elenco righe ricetta (ogni riga dizionario chiavi/valori)
|
||||
/// </summary>
|
||||
public Dictionary<int, Dictionary<string, string>> RowsVal { get; set; } = new Dictionary<int, Dictionary<string, string>>();
|
||||
|
||||
|
||||
public string RawRecipe { get; set; } = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ else
|
||||
</div>
|
||||
@if (showRecipe && currRecord != null)
|
||||
{
|
||||
<div class="col-4">
|
||||
<div class="col-6 ps-0">
|
||||
<RecipeMan IdxPODL="@currRecord.IdxPromessa" RecipePath="@currRecipePath"></RecipeMan>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ namespace MP.SPEC.Components
|
||||
|
||||
private string mainCss
|
||||
{
|
||||
get => showRecipe ? "col-8" : "col-12";
|
||||
get => showRecipe ? "col-6" : "col-12";
|
||||
}
|
||||
|
||||
private int numRecord
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
<h3>RecipeMan</h3>
|
||||
|
||||
|
||||
@if(CurrRecipe==null)
|
||||
@if (isLoading)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
<b>dati ricetta</b>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Dati Ricetta</h5>
|
||||
@if (CurrRecipe?.HeadVal != null)
|
||||
{
|
||||
<p>testata: <b>@CurrRecipe.HeadVal.Count</b> valori</p>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if (CurrRecipe?.RowsVal != null)
|
||||
{
|
||||
<p>righe: <b>@CurrRecipe.RowsVal.Count</b> valori</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -33,12 +33,15 @@ namespace MP.SPEC.Components
|
||||
|
||||
protected RecipeModel? CurrRecipe { get; set; } = null;
|
||||
|
||||
protected bool isLoading = false;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
isLoading = true;
|
||||
if (IdxPODL != 0 && !string.IsNullOrEmpty(RecipePath))
|
||||
{
|
||||
RecipeModel CurrRecipe = new RecipeModel();
|
||||
CurrRecipe = new RecipeModel();
|
||||
// effettua ricerca ricetta su MongoDb
|
||||
CurrRecipe = await MDService.RecipeGetByPODL(IdxPODL);
|
||||
// se non trova crea nuova...
|
||||
@@ -47,6 +50,9 @@ namespace MP.SPEC.Components
|
||||
CurrRecipe = MDService.InitRecipe(IdxPODL, RecipePath);
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
isLoading = false;
|
||||
//await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2302.809</Version>
|
||||
<Version>6.16.2302.810</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,32 +1,28 @@
|
||||
{
|
||||
"TemplateFile": "TemplateOutput.tpl",
|
||||
"HeadConf": {
|
||||
"FixedKeys": {
|
||||
"CustDrumCode": "",
|
||||
"Taglio-N": "1",
|
||||
"Taglio-D": "4",
|
||||
"ServiceType": "N",
|
||||
"RecipeType": "C",
|
||||
"ViscoName": "",
|
||||
"ViscoValue": "0"
|
||||
},
|
||||
"CalcKeys": {
|
||||
"LotID": "PODL01",
|
||||
"OrderCode": "PODL02",
|
||||
"Article": "Art2PODL01",
|
||||
"Info1": "Art2PODL02"
|
||||
},
|
||||
"EditKeys": {
|
||||
"Prio": "Enum:Priority",
|
||||
"DrumType": "Enum:DrumType",
|
||||
"ListKeys": {
|
||||
"CustDrumCode": "F:",
|
||||
"Taglio-N": "F:1",
|
||||
"Taglio-D": "F:4",
|
||||
"ServiceType": "F:N",
|
||||
"RecipeType": "F:C",
|
||||
"ViscoName": "F:",
|
||||
"ViscoValue": "F:0",
|
||||
"LotID": "C:PODL01",
|
||||
"OrderCode": "C:PODL02",
|
||||
"Article": "C:Art2PODL01",
|
||||
"Info1": "C:Art2PODL02",
|
||||
"Prio": "E:Priority",
|
||||
"DrumType": "E:DrumType",
|
||||
"Customer": "Tenditalia",
|
||||
"Design": "DESIGN",
|
||||
"Screen": "SCREEN",
|
||||
"Variant": "VARIANT",
|
||||
"RecName": "CODE000",
|
||||
"Series": "Enum:Series",
|
||||
"UM": "Enum:UM",
|
||||
"DosType": "Enum:DosType",
|
||||
"Series": "E:Series",
|
||||
"UM": "E:UM",
|
||||
"DosType": "E:DosType",
|
||||
"Note1": "",
|
||||
"Note2": "",
|
||||
"Sequence": "1",
|
||||
@@ -84,16 +80,12 @@
|
||||
}
|
||||
},
|
||||
"RowsConf": {
|
||||
"FixedKeys": {
|
||||
"Weight-gr-prev": "0.00"
|
||||
},
|
||||
"CalcKeys": {
|
||||
"CompNumber": "#"
|
||||
},
|
||||
"EditKeys": {
|
||||
"ListKeys": {
|
||||
"Weight-gr-prev": "F:0.00",
|
||||
"CompNumber": "C:#",
|
||||
"ColourCode": "C001",
|
||||
"Description": "COLOR1",
|
||||
"TypComp": "ColType",
|
||||
"TypComp": "E:ColType",
|
||||
"PartsWeight": "1.00",
|
||||
"PartsPerc": "0.10",
|
||||
"Weight-gr": "30.00"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2302.809</h4>
|
||||
<h4>Versione: 6.16.2302.810</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2302.809
|
||||
6.16.2302.810
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2302.809</version>
|
||||
<version>6.16.2302.810</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user