Compare commits

...

5 Commits

Author SHA1 Message Date
Samuele Locatelli f1c295993c Merge branch 'Release/UpdateLogCall' 2022-10-19 11:02:16 +02:00
Samuele Locatelli a293ce825e Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop 2022-10-19 11:01:34 +02:00
Samuele Locatelli e3b67ee6c0 Fix log vari x chiamate MP/IO 2022-10-19 11:01:29 +02:00
zaccaria.majid 0c5e41826e fix recordsel = null in dossier post chiusura 2022-10-19 10:43:45 +02:00
Samuele Locatelli 0d4e1aed88 Merge tag 'FixPAramsDetailAndReload' into develop
Sistemazione reload e params detail
2022-10-18 20:02:34 +02:00
11 changed files with 76 additions and 28 deletions
+2
View File
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.DTO;
@@ -262,6 +263,7 @@ namespace MP.SPEC.Components
currFluxLogDto = null;
currRecord = null;
visualizzaFlux = true;
await RecordSelFlux.InvokeAsync(currFluxLogDto);
await Task.Delay(1);
}
+5
View File
@@ -3,6 +3,7 @@ using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.SPEC.Data;
using MP.SPEC.Services;
using NLog;
namespace MP.SPEC.Components
{
@@ -84,6 +85,7 @@ namespace MP.SPEC.Components
{
// effettua chiusura sul DB
await MDService.ODLClose(currRecord.IdxOdl, currRecord.IdxMacchina, 0, true);
Log.Info($"Effettuata chiusura ODL {currRecord.IdxOdl}");
// ricarica...
await selectRecord(null);
}
@@ -112,6 +114,7 @@ namespace MP.SPEC.Components
if (currRecord != null)
{
await callSyncDb(currRecord.IdxMacchina);
Log.Info($"Richiesto forceSyncDb per idxMacc {currRecord.IdxMacchina}");
// ricarica...
await selectRecord(null);
}
@@ -197,6 +200,7 @@ namespace MP.SPEC.Components
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private ODLModel? currRecord = null;
private List<StatODLModel>? ListOdlStats;
@@ -273,6 +277,7 @@ namespace MP.SPEC.Components
}
catch (Exception exc)
{
Log.Error($"Errore durante chiamata: {Environment.NewLine}{exc}");
}
}
+14 -10
View File
@@ -3,6 +3,7 @@ using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.SPEC.Data;
using MP.SPEC.Services;
using NLog;
namespace MP.SPEC.Components
{
@@ -209,9 +210,21 @@ namespace MP.SPEC.Components
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private PODLModel? currRecord = null;
private List<PODLModel>? ListRecords;
private List<ListValues>? ListStati;
/// <summary>
/// scadenza validità lista ODL correnti
/// </summary>
private DateTime odlCurrExp = DateTime.Now.AddMinutes(-1);
/// <summary>
/// Elenco ODL correnti...
/// </summary>
private List<string> odlCurrList = new List<string>();
private List<PODLModel>? SearchRecords;
#endregion Private Fields
@@ -278,6 +291,7 @@ namespace MP.SPEC.Components
}
catch (Exception exc)
{
Log.Error($"Errore durante chiamata: {Environment.NewLine}{exc}");
}
}
@@ -379,16 +393,6 @@ namespace MP.SPEC.Components
isLoading = false;
}
/// <summary>
/// scadenza validità lista ODL correnti
/// </summary>
private DateTime odlCurrExp = DateTime.Now.AddMinutes(-1);
/// <summary>
/// Elenco ODL correnti...
/// </summary>
private List<string> odlCurrList = new List<string>();
private string tradFase(string codFase)
{
string answ = codFase;
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2210.1820</Version>
<Version>6.16.2210.1910</Version>
</PropertyGroup>
<ItemGroup>
+23 -14
View File
@@ -4,6 +4,7 @@ using MP.Data.DatabaseModels;
using MP.SPEC.Components;
using MP.SPEC.Data;
using MP.SPEC.Services;
using NLog;
namespace MP.SPEC.Pages
{
@@ -165,6 +166,7 @@ namespace MP.SPEC.Pages
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private PODLModel? _currRecord = null;
private List<AnagArticoli>? ListArticoli;
private List<AnagGruppi>? ListAziende;
@@ -226,6 +228,19 @@ namespace MP.SPEC.Pages
}
}
private string currFase
{
get => currFilter.CodFase;
set
{
if (!currFilter.CodFase.Equals(value))
{
currFilter.CodFase = value;
currPage = 1;
}
}
}
private SelectPOdlParams currFilter { get; set; } = new SelectPOdlParams();
private int currPage
@@ -252,19 +267,6 @@ namespace MP.SPEC.Pages
set => currFilter.NumRec = value;
}
private string currFase
{
get => currFilter.CodFase;
set
{
if (!currFilter.CodFase.Equals(value))
{
currFilter.CodFase = value;
currPage = 1;
}
}
}
private int totalCount
{
get => currFilter.TotCount;
@@ -285,7 +287,14 @@ namespace MP.SPEC.Pages
// chiamo aggiunta task SyncDb...
string idxMacc = selRec.IdxMacchina;
string restUrl = $"IOB/addTask2Exe/{idxMacc}?taskName=syncDbData&taskVal=";
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
try
{
var response = await MpIoApiCall.callMpIoUrlGet(restUrl);
}
catch (Exception exc)
{
Log.Error($"Errore durante chiamata: {Environment.NewLine}{exc}");
}
}
private async Task reloadData()
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2210.1820</h4>
<h4>Versione: 6.16.2210.1910</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2210.1820
6.16.2210.1910
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2210.1820</version>
<version>6.16.2210.1910</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>
+7
View File
@@ -1,5 +1,6 @@
using Microsoft.Extensions.Configuration;
using MP.SPEC.Data;
using NLog;
using System.Text.Json;
namespace MP.SPEC.Services
@@ -18,6 +19,9 @@ namespace MP.SPEC.Services
private static IConfiguration _configuration = null!;
private static Logger Log = LogManager.GetCurrentClassLogger();
private static string MpIoBaseUrl = "";
public IOApiService(IHttpClientFactory clientFactory, IConfiguration configuration, ILogger<MpDataService> logger)
@@ -40,15 +44,18 @@ namespace MP.SPEC.Services
var request = new HttpRequestMessage(HttpMethod.Get, $"{MpIoBaseUrl}{relUrl}");
request.Headers.Add("Accept", "application/vnd.github.v3+json");
var client = _clientFactory.CreateClient();
Log.Info($"Richiesta call per {MpIoBaseUrl}{relUrl}");
var response = await client.SendAsync(request);
if (response.IsSuccessStatusCode)
{
var stringResponse = await response.Content.ReadAsStringAsync();
result = stringResponse;
Log.Info($"Richiesta call per {MpIoBaseUrl}{relUrl}");
}
else
{
result = "NO";
Log.Error($"Errore in chaimata | code {response.StatusCode} | {response.Content}");
}
return result;
}
+6
View File
@@ -5,5 +5,11 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ServerConf": {
"maxAge": "2000",
"cacheCheckArtUsato": 2,
"redisLongTimeCache": 15,
"MpIoBaseUrl": "https://iis01.egalware.com/MP/IO/"
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ServerConf": {
"maxAge": "2000",
"cacheCheckArtUsato": 2,
"redisLongTimeCache": 15,
"MpIoBaseUrl": "http://localhost/MP/IO/"
}
}