[AGRICOPER] Migliorate logiche di invio id ricetta in ordine cambiato

Rimossi log inutili di connessione macchina non riuscita tramite Socket.
This commit is contained in:
2025-12-10 11:14:05 +01:00
parent 4f5cc134b3
commit e40d6c0a27
25 changed files with 434 additions and 761 deletions

View File

@@ -4,7 +4,9 @@ using System.Linq;
using Integry_Smart_Gateway.Core.Event; using Integry_Smart_Gateway.Core.Event;
using Integry_Smart_Gateway.Core.ExternalCom.Contracts; using Integry_Smart_Gateway.Core.ExternalCom.Contracts;
using Integry_Smart_Gateway.Core.Gateway.Core; using Integry_Smart_Gateway.Core.Gateway.Core;
using Integry_Smart_Gateway.Core.Logger;
using Integry_Smart_Gateway.Core.Orders; using Integry_Smart_Gateway.Core.Orders;
using Integry_Smart_Gateway.Core.Orders.Model;
using Integry_Smart_Gateway.Core.RestConsumer; using Integry_Smart_Gateway.Core.RestConsumer;
using ISG___Agricoper__L1_.Core.Model; using ISG___Agricoper__L1_.Core.Model;
@@ -13,53 +15,69 @@ namespace ISG___Agricoper__L1_.Core.Event;
public class OrdineCambiatoExecutionEvent( public class OrdineCambiatoExecutionEvent(
IOrdersHandlerService ordersHandlerService, IOrdersHandlerService ordersHandlerService,
IHmiGatewayService hmiGatewayService, IHmiGatewayService hmiGatewayService,
IRestConsumerService restConsumerService) IRestConsumerService restConsumerService,
ILoggerService loggerService)
: IExecutionEvent : IExecutionEvent
{ {
public bool Check(IEnumerable<IMachineComModel>? prevExternalComModels, IEnumerable<IMachineComModel> externalComModels) public bool Check(IEnumerable<IMachineComModel>? prevExternalComModels,
{ IEnumerable<IMachineComModel> externalComModels)
if (prevExternalComModels == null || externalComModels == null) return false; {
var termosaldatriceCurrentModel = if (prevExternalComModels == null || externalComModels == null) return false;
externalComModels.SingleOrDefault(x => x is TermosaldatriceModel) as TermosaldatriceModel; var termosaldatriceCurrentModel =
var currentOrdineLavorazione = ordersHandlerService.GetOpenedOrdineLavorazione(); externalComModels.SingleOrDefault(x => x is TermosaldatriceModel) as TermosaldatriceModel;
var currentMachineOrdineLavorazione =
ordersHandlerService.GetOrdineLavorazione(termosaldatriceCurrentModel?.DescrizioneOrdineInCorso);
var nextMachineOrdineLavorazione =
ordersHandlerService.GetOrdineLavorazione(termosaldatriceCurrentModel?.DescrizioneOrdineProssimo);
if (termosaldatriceCurrentModel == null || var currentOrdineLavorazione = ordersHandlerService.GetOpenedOrdineLavorazione();
(currentOrdineLavorazione == null && currentMachineOrdineLavorazione == null) ||
(currentMachineOrdineLavorazione != null && currentMachineOrdineLavorazione.Equals(currentOrdineLavorazione)) ||
(nextMachineOrdineLavorazione != null && nextMachineOrdineLavorazione.Equals(currentOrdineLavorazione)))
{
return false;
}
return true; var currentMachineOrdineLavorazione =
} ordersHandlerService.GetOrdineLavorazione(termosaldatriceCurrentModel?.DescrizioneOrdineInCorso);
public void Execute() var nextMachineOrdineLavorazione =
{ ordersHandlerService.GetOrdineLavorazione(termosaldatriceCurrentModel?.DescrizioneOrdineProssimo);
var currentOrdineLavorazione = ordersHandlerService.GetOpenedOrdineLavorazione();
ushort? idRicetta = null; if (termosaldatriceCurrentModel == null ||
if (currentOrdineLavorazione != null) (currentOrdineLavorazione == null && currentMachineOrdineLavorazione == null) ||
{ (currentMachineOrdineLavorazione != null &&
var result = restConsumerService.ProcessSql<IList<dynamic>>($@"SELECT TOP 1 caratteristica1 FROM jtb_cicl currentMachineOrdineLavorazione.Equals(currentOrdineLavorazione)) ||
WHERE cod_prod = '{currentOrdineLavorazione.CodProd}'") (nextMachineOrdineLavorazione != null && nextMachineOrdineLavorazione.Equals(currentOrdineLavorazione)))
.Result; {
if (result.Any() && !string.IsNullOrEmpty(result[0].caratteristica1.ToString())) return false;
idRicetta = Convert.ToUInt16(result[0].caratteristica1.ToString()); }
} var idRicettaToSet = RetrieveIdRicetta(currentOrdineLavorazione.CodProd);
if (idRicetta != null) if (idRicettaToSet == null)
{ return false;
hmiGatewayService.WriteData(new TermosaldatriceModel
{ return true;
DescrizioneOrdineProssimo = currentOrdineLavorazione.DescrizioneOrdine, }
IDRicettaProssima = idRicetta
}); public void Execute()
} {
} loggerService.LogDebug("Rilevato ordine cambiato", nameof(OrdineCambiatoExecutionEvent));
var currentOrdineLavorazione = ordersHandlerService.GetOpenedOrdineLavorazione();
ushort? idRicetta = RetrieveIdRicetta(currentOrdineLavorazione.CodProd);
if (idRicetta != null)
{
hmiGatewayService.WriteData(new TermosaldatriceModel
{
DescrizioneOrdineProssimo = currentOrdineLavorazione.DescrizioneOrdine,
IDRicettaProssima = idRicetta
});
}
}
public ushort? RetrieveIdRicetta(string codProd)
{
var result = restConsumerService.ProcessSql<IList<dynamic>>($@"SELECT TOP 1 caratteristica1 FROM jtb_cicl
WHERE cod_prod = '{codProd}'")
.Result;
if (result.Any() && !string.IsNullOrEmpty(result[0].caratteristica1.ToString()))
return Convert.ToUInt16(result[0].caratteristica1.ToString());
return null;
}
} }

View File

@@ -9,80 +9,80 @@ using Integry_Smart_Gateway.Core.Orders.Model;
namespace ISG___Biolevante__L1_.Core.Machine.Impl; namespace ISG___Biolevante__L1_.Core.Machine.Impl;
public class NimaxMarcatoreBottiglieCollectorService : SocketConnector, INimaxMarcatoreBottiglieCollectorService public class NimaxMarcatoreBottiglieCollectorService // : SocketConnector, INimaxMarcatoreBottiglieCollectorService
{ {
private readonly ILoggerService _loggerService; //private readonly ILoggerService _loggerService;
private readonly IOrdersHandlerService _ordersHandlerService; //private readonly IOrdersHandlerService _ordersHandlerService;
private const string START_MESSAGE = "1B"; //private const string START_MESSAGE = "1B";
private const string END_MESSAGE = "04"; //private const string END_MESSAGE = "04";
public async Task<bool> Connect(bool autoReconnect = true) //public async Task<bool> Connect(bool autoReconnect = true)
{ //{
return await base.Connect(); // return await base.Connect();
} //}
protected override Task PostConnect() //protected override Task PostConnect()
{ //{
return Task.CompletedTask; // return Task.CompletedTask;
} //}
protected override async Task OnConnected() //protected override async Task OnConnected()
{ //{
throw new NotImplementedException(); // throw new NotImplementedException();
} //}
protected override async Task OnDisconnected() //protected override async Task OnDisconnected()
{ //{
throw new NotImplementedException(); // throw new NotImplementedException();
} //}
public async Task<IList<IMachineComModel>> CollectData() //public async Task<IList<IMachineComModel>> CollectData()
{ //{
var externalMachineComModels = new List<IMachineComModel>(); // var externalMachineComModels = new List<IMachineComModel>();
await base.SendHex(START_MESSAGE); // await base.SendHex(START_MESSAGE);
await base.SendHex("4F31"); // await base.SendHex("4F31");
await base.SendHex(END_MESSAGE); // await base.SendHex(END_MESSAGE);
var response = await base.Receive('/'); // var response = await base.Receive('/');
ChangeOrder(null); // ChangeOrder(null);
return externalMachineComModels; // return externalMachineComModels;
} //}
public async void ChangeOrder(OrdineLavorazioneDTO ordineLavorazioneDto) //public async void ChangeOrder(OrdineLavorazioneDTO ordineLavorazioneDto)
{ //{
//CLEAR MESSAGE // //CLEAR MESSAGE
await base.SendHex(START_MESSAGE); // await base.SendHex(START_MESSAGE);
await base.Send("R"); // await base.Send("R");
await base.SendHex(END_MESSAGE); // await base.SendHex(END_MESSAGE);
var response = await base.Receive('/'); // var response = await base.Receive('/');
//SAVE NEW MESSAGE // //SAVE NEW MESSAGE
await base.SendHex(START_MESSAGE); // await base.SendHex(START_MESSAGE);
await base.Send("S"); // await base.Send("S");
await base.Send("001"); // await base.Send("001");
await base.SendHex(START_MESSAGE); // await base.SendHex(START_MESSAGE);
await base.Send("LOTTO"); // await base.Send("LOTTO");
await base.SendHex(START_MESSAGE); // await base.SendHex(START_MESSAGE);
await base.Send("DATA SCAD"); // await base.Send("DATA SCAD");
await base.SendHex(END_MESSAGE); // await base.SendHex(END_MESSAGE);
response = await base.Receive('/'); // response = await base.Receive('/');
//PUT MESSAGE ONLINE // //PUT MESSAGE ONLINE
await base.SendHex(START_MESSAGE); // await base.SendHex(START_MESSAGE);
await base.Send("P1001"); // await base.Send("P1001");
await base.SendHex(END_MESSAGE); // await base.SendHex(END_MESSAGE);
response = await base.Receive('/'); // response = await base.Receive('/');
} //}
public NimaxMarcatoreBottiglieCollectorService(string uri, int port, ILoggerService loggerService, IOrdersHandlerService ordersHandlerService) : base(uri, //public NimaxMarcatoreBottiglieCollectorService(string uri, int port, ILoggerService loggerService, IOrdersHandlerService ordersHandlerService) : base(uri,
port, // port,
(log) => loggerService.LogDebug(log, nameof(NimaxMarcatoreBottiglieCollectorService))) // (log) => loggerService.LogDebug(log, nameof(NimaxMarcatoreBottiglieCollectorService)))
{ //{
_loggerService = loggerService; // _loggerService = loggerService;
_ordersHandlerService = ordersHandlerService; // _ordersHandlerService = ordersHandlerService;
} //}
} }

View File

@@ -84,13 +84,14 @@ public class BiolevanteContext : SmartGatewayContext
{ {
var loggerService = provider.Resolve<ILoggerService>(); var loggerService = provider.Resolve<ILoggerService>();
provider.TryResolve(out IMachineConnectionsService machineConnectionsService); provider.TryResolve(out IMachineConnectionsService machineConnectionsService);
provider.TryResolve(out IMachineLoggerService machineLoggerService);
var keyenceReaderIP = "192.168.10.100"; var keyenceReaderIP = "192.168.10.100";
var keyenceReaderPort = 9005; var keyenceReaderPort = 9005;
var keyenceCodCmac = "L7_KEYENCE_1"; var keyenceCodCmac = "L7_KEYENCE_1";
var keyenceBarcodeManager = new KeyenceBarcodeManager(keyenceReaderIP, keyenceReaderPort, var keyenceBarcodeManager = new KeyenceBarcodeManager(keyenceReaderIP, keyenceReaderPort,
keyenceCodCmac, loggerService, keyenceCodCmac, loggerService, machineLoggerService,
machineConnectionsService); machineConnectionsService);
return keyenceBarcodeManager; return keyenceBarcodeManager;
}) })

View File

@@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Integry_Smart_Gateway.Core.ExternalCom.Protocols.Socket; using Integry_Smart_Gateway.Core.ExternalCom.Protocols.Socket;
using Integry_Smart_Gateway.Core.Logger; using Integry_Smart_Gateway.Core.Logger;
using Integry_Smart_Gateway.Core.Looper; using Integry_Smart_Gateway.Core.Looper;
using Integry_Smart_Gateway.Core.Machine.Contracts;
using Integry_Smart_Gateway.Core.MachineConnections.Contracts; using Integry_Smart_Gateway.Core.MachineConnections.Contracts;
using ISG___Biolevante.Core.Manager.Contracts; using ISG___Biolevante.Core.Manager.Contracts;
@@ -14,8 +15,9 @@ public class KeyenceBarcodeManager(
int port, int port,
string codCmac, string codCmac,
ILoggerService loggerService, ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService) IMachineConnectionsService machineConnectionsService)
: SocketConnector(uri, port, log => loggerService.LogDebug(log, nameof(KeyenceBarcodeManager))), : SocketConnector(codCmac, uri, port, loggerService, machineLoggerService),
IKeyenceBarcodeManager IKeyenceBarcodeManager
{ {
private CancellationTokenSource _cancellationTokenSource; private CancellationTokenSource _cancellationTokenSource;

View File

@@ -19,7 +19,7 @@ public class KeyenceBarcodeReaderManager : SocketConnector, IKeyenceBarcodeReade
ILoggerService loggerService, ILoggerService loggerService,
IMachineConnectionsService? machineConnectionsService, IMachineConnectionsService? machineConnectionsService,
IMachineLoggerService? machineLoggerService) IMachineLoggerService? machineLoggerService)
: base(uri, port, log => loggerService.LogDebug(log, nameof(KeyenceBarcodeReaderManager))) : base(codCmac, uri, port, loggerService, machineLoggerService)
{ {
_loggerService = loggerService; _loggerService = loggerService;
_machineConnectionsService = machineConnectionsService; _machineConnectionsService = machineConnectionsService;

View File

@@ -12,7 +12,16 @@ using ISG___Frudis__L01_.Core.Model.VideoJetCommandsModel;
namespace ISG___Frudis__L01_.Core.Service; namespace ISG___Frudis__L01_.Core.Service;
public class VideoJetMachineCollectorService : SocketConnector, IVideoJetInferioreCollectorService, IVideoJetSuperioreCollectorService public class VideoJetMachineCollectorService(
ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService,
string ip,
Type modelType,
string codCmac,
int port)
: SocketConnector(codCmac, ip, port, loggerService, machineLoggerService), IVideoJetInferioreCollectorService,
IVideoJetSuperioreCollectorService
{ {
private class Commands private class Commands
@@ -21,40 +30,13 @@ public class VideoJetMachineCollectorService : SocketConnector, IVideoJetInferio
public const string GET_JOB_LIST = "GJL"; public const string GET_JOB_LIST = "GJL";
} }
private readonly ILoggerService _loggerService; private readonly ILoggerService _loggerService = loggerService;
private readonly IMachineConnectionsService _machineConnectionsService;
private string _ip; private string _ip;
private readonly Type _modelType; public string CodCmac { get; private set; } = codCmac;
public string CodCmac { get; private set; }
private bool _connected; private bool _connected;
public VideoJetMachineCollectorService(
ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService,
string ip, Type modelType, string codCmac,int port)
: base(ip, port, log =>
{
loggerService.LogDebug(log, nameof(VideoJetMachineCollectorService));
machineLoggerService.Log(codCmac,
null,
"Socket",
log,
log);
})
{
_loggerService = loggerService;
_machineConnectionsService = machineConnectionsService;
this._modelType = modelType;
this.CodCmac = codCmac;
}
public async Task<bool> Connect(bool autoReconnect = true) public async Task<bool> Connect(bool autoReconnect = true)
{ {
@@ -68,12 +50,12 @@ public class VideoJetMachineCollectorService : SocketConnector, IVideoJetInferio
protected override async Task OnConnected() protected override async Task OnConnected()
{ {
await _machineConnectionsService.RegisterMachineConnection(CodCmac, true); await machineConnectionsService.RegisterMachineConnection(CodCmac, true);
} }
protected override async Task OnDisconnected() protected override async Task OnDisconnected()
{ {
await _machineConnectionsService.RegisterMachineConnection(CodCmac, false); await machineConnectionsService.RegisterMachineConnection(CodCmac, false);
} }
public async Task<IList<IMachineComModel>> CollectData() public async Task<IList<IMachineComModel>> CollectData()
@@ -82,7 +64,7 @@ public class VideoJetMachineCollectorService : SocketConnector, IVideoJetInferio
try try
{ {
var etichettatriceModel = (IEtichettatriceModel) Activator.CreateInstance(_modelType); var etichettatriceModel = (IEtichettatriceModel) Activator.CreateInstance(modelType);
await getPrinterState(etichettatriceModel); await getPrinterState(etichettatriceModel);
await GetJobList(etichettatriceModel); await GetJobList(etichettatriceModel);

View File

@@ -10,7 +10,14 @@ using ISG___Gramm__L6_.Core.Service.Contracts;
namespace ISG___Gramm__L6_.Core.Service; namespace ISG___Gramm__L6_.Core.Service;
public class EidosPrinterCollectorService : SocketConnector, IEidosPrinterCollectorService public class EidosPrinterCollectorService(
ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService,
string uri,
int port,
string codCmac)
: SocketConnector(codCmac, uri, port, loggerService, machineLoggerService), IEidosPrinterCollectorService
{ {
public const string GET_PRINTER_STATE_COMMAND = "^?\r\n"; public const string GET_PRINTER_STATE_COMMAND = "^?\r\n";
public const string RESET_BUFFER_COMMAND = "^@\r\n"; public const string RESET_BUFFER_COMMAND = "^@\r\n";
@@ -19,30 +26,9 @@ public class EidosPrinterCollectorService : SocketConnector, IEidosPrinterCollec
public const string PROCESS_VAR_COMMAND = "^V\r\n"; public const string PROCESS_VAR_COMMAND = "^V\r\n";
public const string CONFIRM_LABEL_COMMAND = "^!\r\n"; public const string CONFIRM_LABEL_COMMAND = "^!\r\n";
private readonly ILoggerService _loggerService; private readonly ILoggerService _loggerService = loggerService;
private readonly IMachineLoggerService _machineLoggerService; private readonly IMachineLoggerService _machineLoggerService = machineLoggerService;
private IMachineConnectionsService _machineConnectionsService; private readonly string _codCmac = codCmac;
private readonly string _codCmac;
public EidosPrinterCollectorService(ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService,
string uri, int port, string codCmac) : base(uri, port, (log) =>
{
loggerService.LogDebug(log, nameof(EidosPrinterCollectorService));
machineLoggerService.Log(codCmac,
null,
"Socket",
log,
log);
})
{
_loggerService = loggerService;
_machineLoggerService = machineLoggerService;
_machineConnectionsService = machineConnectionsService;
_codCmac = codCmac;
}
public Task<bool> Connect(bool autoReconnect = true) public Task<bool> Connect(bool autoReconnect = true)
@@ -204,13 +190,13 @@ public class EidosPrinterCollectorService : SocketConnector, IEidosPrinterCollec
protected async override Task OnConnected() protected async override Task OnConnected()
{ {
var model = new EidosPrinterModel(); var model = new EidosPrinterModel();
await _machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), true); await machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), true);
} }
protected override async Task OnDisconnected() protected override async Task OnDisconnected()
{ {
var model = new EidosPrinterModel(); var model = new EidosPrinterModel();
await _machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), false); await machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), false);
} }

View File

@@ -10,7 +10,14 @@ using ISG___Gramm__L7_.Core.Service.Contracts;
namespace ISG___Gramm__L7_.Core.Service; namespace ISG___Gramm__L7_.Core.Service;
public class EidosPrinterCollectorService : SocketConnector, IEidosPrinterCollectorService public class EidosPrinterCollectorService(
ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService,
string uri,
int port,
string codCmac)
: SocketConnector(codCmac, uri, port, loggerService, machineLoggerService), IEidosPrinterCollectorService
{ {
public const string GET_PRINTER_STATE_COMMAND = "^?\r\n"; public const string GET_PRINTER_STATE_COMMAND = "^?\r\n";
public const string RESET_BUFFER_COMMAND = "^@\r\n"; public const string RESET_BUFFER_COMMAND = "^@\r\n";
@@ -19,30 +26,9 @@ public class EidosPrinterCollectorService : SocketConnector, IEidosPrinterCollec
public const string PROCESS_VAR_COMMAND = "^V\r\n"; public const string PROCESS_VAR_COMMAND = "^V\r\n";
public const string CONFIRM_LABEL_COMMAND = "^!\r\n"; public const string CONFIRM_LABEL_COMMAND = "^!\r\n";
private readonly ILoggerService _loggerService; private readonly ILoggerService _loggerService = loggerService;
private readonly IMachineLoggerService _machineLoggerService; private readonly IMachineLoggerService _machineLoggerService = machineLoggerService;
private IMachineConnectionsService _machineConnectionsService; private readonly string _codCmac = codCmac;
private readonly string _codCmac;
public EidosPrinterCollectorService(ILoggerService loggerService,
IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService,
string uri, int port, string codCmac) : base(uri, port, (log) =>
{
loggerService.LogDebug(log, nameof(EidosPrinterCollectorService));
machineLoggerService.Log(codCmac,
null,
"Socket",
log,
log);
})
{
_loggerService = loggerService;
_machineLoggerService = machineLoggerService;
_machineConnectionsService = machineConnectionsService;
_codCmac = codCmac;
}
public Task<bool> Connect(bool autoReconnect = true) public Task<bool> Connect(bool autoReconnect = true)
@@ -204,13 +190,13 @@ public class EidosPrinterCollectorService : SocketConnector, IEidosPrinterCollec
protected async override Task OnConnected() protected async override Task OnConnected()
{ {
var model = new EidosPrinterModel(); var model = new EidosPrinterModel();
await _machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), true); await machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), true);
} }
protected override async Task OnDisconnected() protected override async Task OnDisconnected()
{ {
var model = new EidosPrinterModel(); var model = new EidosPrinterModel();
await _machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), false); await machineConnectionsService.RegisterMachineConnection(model.GetCodCmac(), false);
} }

View File

@@ -38,16 +38,7 @@ public class IdeconMachineCollectorService : SocketConnector, IIdeconMachineColl
IMachineLoggerService machineLoggerService, IMachineLoggerService machineLoggerService,
IMachineConnectionsService machineConnectionsService, IMachineConnectionsService machineConnectionsService,
string ip, Type modelType, string codCmac) string ip, Type modelType, string codCmac)
: base(ip, 50000, log => : base(codCmac, ip, 50000, loggerService, machineLoggerService)
{
loggerService.LogDebug(log, nameof(IdeconMachineCollectorService));
machineLoggerService.Log(codCmac,
null,
"Socket",
log,
log);
})
{ {
_loggerService = loggerService; _loggerService = loggerService;

View File

@@ -20,16 +20,7 @@ public class VideoJetMachineCollectorService(
string ip, string ip,
Type modelType, Type modelType,
string codCmac) string codCmac)
: SocketConnector(ip, 3004, log => : SocketConnector(codCmac, ip, 3004, loggerService, machineLoggerService), IVideoJetFronteCollectorService, IVideoJetRetroCollectorService, IVideoJetCartoniCollectorService
{
loggerService.LogDebug(log, nameof(VideoJetMachineCollectorService));
machineLoggerService.Log(codCmac,
null,
"Socket",
log,
log);
}), IVideoJetFronteCollectorService, IVideoJetRetroCollectorService, IVideoJetCartoniCollectorService
{ {
private class Commands private class Commands

View File

@@ -1,6 +0,0 @@
namespace ISG___Gramm__SL__Base.Core.Storage;
public interface ITrashDataCleanerService
{
}

View File

@@ -1,69 +0,0 @@
using System;
using Integry_Smart_Gateway.Core.ExternalCom.Contracts;
using Integry_Smart_Gateway.Core.Gateway.Model;
using Integry_Smart_Gateway.Core.Looper;
using Integry_Smart_Gateway.Core.Storage.DBMS;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MongoDB.Bson;
namespace ISG___Gramm__SL__Base.Core.Storage;
public class TrashDataCleanerService(IStorageDBMSService storageDbmsService, ILooperService looperService)
: ITrashDataCleanerService
{
public void Start()
{
looperService.Add(CleanUselessData, TimeSpan.FromHours(1));
}
private async Task CleanUselessData()
{
var nullModels = storageDbmsService
.AsQueryable<GatewayDataWrapper>()
.Where(x => x.Model == null)
.Select(x => x.Id)
.ToList();
var list = storageDbmsService
.AsQueryable<GatewayDataWrapper>()
.Where(x => x.Model is IProductionMachineComModel)
.Select(x =>
new
{
x.Id,
x.Model
})
.ToList()
.Where(x =>
string.IsNullOrEmpty(((IProductionMachineComModel)x.Model).DescrizioneOrdineInCorso) ||
!((IProductionMachineComModel)x.Model).DescrizioneOrdineInCorso.StartsWith("#"))
.Select(x => x.Id)
.ToList();
list.AddRange(nullModels);
await DeleteByChunks(list);
}
private async Task DeleteByChunks(IEnumerable<ObjectId> idsToDelete)
{
var chunks = idsToDelete
.Select((s, i) => new { Value = s, Index = i })
.GroupBy(x => x.Index / 10000)
.Select(grp => grp.Select(x => x.Value).ToArray())
.ToArray();
foreach (var chunk in chunks)
{
await storageDbmsService.RemoveRangeAsync<GatewayDataWrapper>(chunk);
}
}
}

View File

@@ -5,11 +5,6 @@
<RootNamespace>ISG___Gramm__SL__Base</RootNamespace> <RootNamespace>ISG___Gramm__SL__Base</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.5.376.213" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core" Version="1.5.376.213" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Integry Smart Gateway\Integry Smart Gateway.csproj" /> <ProjectReference Include="..\Integry Smart Gateway\Integry Smart Gateway.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -6,7 +6,6 @@ using Integry_Smart_Gateway.Core.Extra;
using Integry_Smart_Gateway.Core.Gateway.Core; using Integry_Smart_Gateway.Core.Gateway.Core;
using Integry_Smart_Gateway.Core.Machine.Contracts; using Integry_Smart_Gateway.Core.Machine.Contracts;
using Integry_Smart_Gateway.Core.Settings; using Integry_Smart_Gateway.Core.Settings;
using ISG___Gramm__SL__Base.Core.Storage;
using ISG___Gramm__SL01_.Core._Mockup; using ISG___Gramm__SL01_.Core._Mockup;
using ISG___Gramm__SL01_.Core.Events; using ISG___Gramm__SL01_.Core.Events;
using ISG___Gramm__SL01_.Core.Manager; using ISG___Gramm__SL01_.Core.Manager;
@@ -75,15 +74,6 @@ public class GrammSL01Context : SmartGatewayContext
#endregion #endregion
#if !DEBUG
containerBuilder
.RegisterType<TrashDataCleanerService>()
.As<ITrashDataCleanerService>()
.SingleInstance()
.AutoActivate()
.OnActivated(x => x.Instance.Start());
#endif
#if DEBUG #if DEBUG
containerBuilder containerBuilder

View File

@@ -8,12 +8,6 @@
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.5.376.213" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core" Version="1.5.376.213" />
<PackageReference Include="Topshelf" Version="4.3.0" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Integry Smart Gateway\Integry Smart Gateway.csproj" /> <ProjectReference Include="..\Integry Smart Gateway\Integry Smart Gateway.csproj" />
<ProjectReference Include="..\ISG - Gramm (SL) Base\ISG - Gramm (SL) Base.csproj" /> <ProjectReference Include="..\ISG - Gramm (SL) Base\ISG - Gramm (SL) Base.csproj" />

View File

@@ -4,7 +4,6 @@ using Integry_Smart_Gateway.Core.Event;
using Integry_Smart_Gateway.Core.ExternalCom.Contracts; using Integry_Smart_Gateway.Core.ExternalCom.Contracts;
using Integry_Smart_Gateway.Core.Extra; using Integry_Smart_Gateway.Core.Extra;
using Integry_Smart_Gateway.Core.Settings; using Integry_Smart_Gateway.Core.Settings;
using ISG___Gramm__SL__Base.Core.Storage;
using ISG___Gramm__SL02_.Core.Events; using ISG___Gramm__SL02_.Core.Events;
using ISG___Gramm__SL02_.Core.Manager; using ISG___Gramm__SL02_.Core.Manager;
using ISG___Gramm__SL02_.Core.Manager.Implementation; using ISG___Gramm__SL02_.Core.Manager.Implementation;
@@ -78,15 +77,6 @@ public class GrammSL02Context : SmartGatewayContext
#endregion #endregion
#if !DEBUG
containerBuilder
.RegisterType<TrashDataCleanerService>()
.As<ITrashDataCleanerService>()
.SingleInstance()
.AutoActivate()
.OnActivated(x => x.Instance.Start());
#endif
#region WorkFlows #region WorkFlows
containerBuilder containerBuilder

View File

@@ -9,8 +9,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.5.376.213" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core" Version="1.5.376.213" />
<PackageReference Include="Topshelf" Version="4.3.0" /> <PackageReference Include="Topshelf" Version="4.3.0" />
</ItemGroup> </ItemGroup>

View File

@@ -4,7 +4,6 @@ using Integry_Smart_Gateway.Core.Event;
using Integry_Smart_Gateway.Core.ExternalCom.Contracts; using Integry_Smart_Gateway.Core.ExternalCom.Contracts;
using Integry_Smart_Gateway.Core.Extra; using Integry_Smart_Gateway.Core.Extra;
using Integry_Smart_Gateway.Core.Settings; using Integry_Smart_Gateway.Core.Settings;
using ISG___Gramm__SL__Base.Core.Storage;
using ISG___Gramm__SL03_.Core.Events; using ISG___Gramm__SL03_.Core.Events;
using ISG___Gramm__SL03_.Core.Manager; using ISG___Gramm__SL03_.Core.Manager;
using ISG___Gramm__SL03_.Core.Manager.Implementation; using ISG___Gramm__SL03_.Core.Manager.Implementation;
@@ -65,15 +64,6 @@ public class GrammSL03Context : SmartGatewayContext
#endregion #endregion
#if !DEBUG
containerBuilder
.RegisterType<TrashDataCleanerService>()
.As<ITrashDataCleanerService>()
.SingleInstance()
.AutoActivate()
.OnActivated(x => x.Instance.Start());
#endif
#region WorkFlows #region WorkFlows
containerBuilder containerBuilder
@@ -84,12 +74,5 @@ public class GrammSL03Context : SmartGatewayContext
#endregion #endregion
#if DEBUG
//containerBuilder
// .RegisterType<CaricoSemolaTester>()
// .AutoActivate()
// .SingleInstance()
// .OnActivated(x => x.Instance.Start());
#endif
} }
} }

View File

@@ -9,8 +9,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.5.376.213" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core" Version="1.5.376.213" />
<PackageReference Include="Topshelf" Version="4.3.0" /> <PackageReference Include="Topshelf" Version="4.3.0" />
</ItemGroup> </ItemGroup>

View File

@@ -15,127 +15,117 @@ namespace ISG___LaMonarca__L5_.Core.Machine;
public class Jet3MachineCollectorService : SocketConnector, IMachineCollectorService public class Jet3MachineCollectorService : SocketConnector, IMachineCollectorService
{ {
private readonly ILoggerService _loggerService; private readonly ILoggerService _loggerService;
private readonly IOrdersHandlerService _ordersHandlerService; private readonly IOrdersHandlerService _ordersHandlerService;
private readonly IMachineConnectionsService _machineConnectionsService; private readonly IMachineConnectionsService _machineConnectionsService;
private bool _connected; private bool _connected;
private double? _lastCambioOrdineCounter; private double? _lastCambioOrdineCounter;
private double? _lastReadValue; private double? _lastReadValue;
private readonly string _codCmac; private readonly string _codCmac;
public Jet3MachineCollectorService( public Jet3MachineCollectorService(
string ip, string ip,
string codCmac, string codCmac,
ILoggerService loggerService, ILoggerService loggerService,
IOrdersHandlerService ordersHandlerService, IOrdersHandlerService ordersHandlerService,
IRiempitriceManager riempitriceManager, IRiempitriceManager riempitriceManager,
IMachineConnectionsService machineConnectionsService, IMachineConnectionsService machineConnectionsService,
IMachineLoggerService machineLoggerService) IMachineLoggerService machineLoggerService)
: base(ip, 3000, : base(codCmac, ip, 3000, loggerService, machineLoggerService)
log => {
{ _loggerService = loggerService;
loggerService.LogDebug(log, nameof(Jet3MachineCollectorService)); _ordersHandlerService = ordersHandlerService;
_machineConnectionsService = machineConnectionsService;
_codCmac = codCmac;
machineLoggerService.Log(codCmac, riempitriceManager.OnMachineOrderChanged += () => { _lastCambioOrdineCounter = _lastReadValue; };
null, }
"Socket",
log,
log);
})
{
_loggerService = loggerService;
_ordersHandlerService = ordersHandlerService;
_machineConnectionsService = machineConnectionsService;
_codCmac = codCmac;
riempitriceManager.OnMachineOrderChanged += () => { _lastCambioOrdineCounter = _lastReadValue; }; protected override Task PostConnect()
} {
return Task.CompletedTask;
}
protected override Task PostConnect() protected override async Task OnConnected()
{ {
return Task.CompletedTask; await _machineConnectionsService.RegisterMachineConnection(_codCmac, true);
} }
protected override async Task OnConnected() protected override async Task OnDisconnected()
{ {
await _machineConnectionsService.RegisterMachineConnection(_codCmac, true); await _machineConnectionsService.RegisterMachineConnection(_codCmac, false);
} }
protected override async Task OnDisconnected() public async Task<bool> Connect(bool autoReconnect = true)
{ {
await _machineConnectionsService.RegisterMachineConnection(_codCmac, false); return await base.Connect();
} }
public async Task<bool> Connect(bool autoReconnect = true) public async Task<IList<IMachineComModel>> CollectData()
{ {
return await base.Connect(); var externalMachineComModels = new List<IMachineComModel>();
}
public async Task<IList<IMachineComModel>> CollectData() try
{ {
var externalMachineComModels = new List<IMachineComModel>(); var stampanteJet3Model = await GetPrinterState(new StampanteJet3Model());
;
try var ordineInCorso = _ordersHandlerService.GetOpenedOrdineLavorazione();
{ if (stampanteJet3Model != null)
var stampanteJet3Model = await GetPrinterState(new StampanteJet3Model()); {
; if (ordineInCorso != null)
{
stampanteJet3Model.DescrizioneOrdineInCorso = ordineInCorso.DescrizioneOrdine;
stampanteJet3Model.LottoOrdineInCorso = ordineInCorso.PartitaMag;
stampanteJet3Model.ScadenzaOrdineInCorso = ordineInCorso.DataScad;
}
else
{
stampanteJet3Model.DescrizioneOrdineInCorso = null;
stampanteJet3Model.LottoOrdineInCorso = null;
stampanteJet3Model.LottoOrdineInCorso = null;
}
var ordineInCorso = _ordersHandlerService.GetOpenedOrdineLavorazione(); _lastReadValue = stampanteJet3Model.ContatoreParziale;
if (stampanteJet3Model != null) _lastCambioOrdineCounter ??= stampanteJet3Model.ContatoreParziale;
{
if (ordineInCorso != null)
{
stampanteJet3Model.DescrizioneOrdineInCorso = ordineInCorso.DescrizioneOrdine;
stampanteJet3Model.LottoOrdineInCorso = ordineInCorso.PartitaMag;
stampanteJet3Model.ScadenzaOrdineInCorso = ordineInCorso.DataScad;
}
else
{
stampanteJet3Model.DescrizioneOrdineInCorso = null;
stampanteJet3Model.LottoOrdineInCorso = null;
stampanteJet3Model.LottoOrdineInCorso = null;
}
_lastReadValue = stampanteJet3Model.ContatoreParziale; if (_lastReadValue < _lastCambioOrdineCounter) _lastCambioOrdineCounter = _lastReadValue;
_lastCambioOrdineCounter ??= stampanteJet3Model.ContatoreParziale;
if (_lastReadValue < _lastCambioOrdineCounter) _lastCambioOrdineCounter = _lastReadValue; stampanteJet3Model.ContatoreParziale =
(double)_lastReadValue - (double)_lastCambioOrdineCounter;
stampanteJet3Model.ContatoreParziale = //stampanteJet3Model.Stato = MachineStatusEnum.MARCIA;
(double)_lastReadValue - (double)_lastCambioOrdineCounter; externalMachineComModels.Add(stampanteJet3Model);
}
}
catch (Exception ex)
{
this._loggerService.LogVerboseError(ex, nameof(Jet3MachineCollectorService));
}
//stampanteJet3Model.Stato = MachineStatusEnum.MARCIA; return externalMachineComModels;
externalMachineComModels.Add(stampanteJet3Model); }
}
}
catch (Exception ex)
{
this._loggerService.LogVerboseError(ex, nameof(Jet3MachineCollectorService));
}
return externalMachineComModels; private async Task<StampanteJet3Model> GetPrinterState(StampanteJet3Model stampanteJet3Model)
} {
await base.Send("^0?CC" + '\u000d');
private async Task<StampanteJet3Model> GetPrinterState(StampanteJet3Model stampanteJet3Model) IList<string> statusDataList = await base.Receive('\t');
{
await base.Send("^0?CC" + '\u000d');
IList<string> statusDataList = await base.Receive('\t'); if (statusDataList == null || !statusDataList.Any())
{
return null;
}
if (statusDataList == null || !statusDataList.Any()) statusDataList[0] = statusDataList[0].Remove(0, 5);
{
return null;
}
statusDataList[0] = statusDataList[0].Remove(0, 5); int totaleProdotti = Convert.ToInt32(statusDataList[2]);
int totaleProdotti = Convert.ToInt32(statusDataList[2]); stampanteJet3Model.ContatoreParziale = Convert.ToInt64(statusDataList[0]);
//stampanteJet3Model.ContatoreTotale = Convert.ToInt64(statusDataList[2]);
//stampanteJet3Model.VelocitaEffettiva = Convert.ToInt32(statusDataList[2]);
stampanteJet3Model.ContatoreParziale = Convert.ToInt64(statusDataList[0]); return stampanteJet3Model;
//stampanteJet3Model.ContatoreTotale = Convert.ToInt64(statusDataList[2]); }
//stampanteJet3Model.VelocitaEffettiva = Convert.ToInt32(statusDataList[2]);
return stampanteJet3Model;
}
} }

View File

@@ -5,12 +5,15 @@ using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Integry_Smart_Gateway.Core.Logger;
using Integry_Smart_Gateway.Core.Machine.Contracts;
namespace Integry_Smart_Gateway.Core.ExternalCom.Protocols.Socket; namespace Integry_Smart_Gateway.Core.ExternalCom.Protocols.Socket;
public abstract class SocketConnector : IDisposable public abstract class SocketConnector : IDisposable
{ {
private readonly Action<string> _logAction; private readonly Action<string> _logDebugAction;
private readonly Action<string> _logErrorAction;
private System.Net.Sockets.Socket _client; private System.Net.Sockets.Socket _client;
@@ -21,9 +24,21 @@ public abstract class SocketConnector : IDisposable
private bool _connected = false; private bool _connected = false;
protected SocketConnector(string uri, int port, Action<string> logAction) protected SocketConnector(string codCmac, string uri, int port,
ILoggerService loggerService,
IMachineLoggerService machineLoggerService)
{ {
this._logAction = log => logAction($"[{uri}] {log}"); this._logDebugAction = log =>
{
loggerService.LogDebug($"[{uri}] {log}");
machineLoggerService.Log(codCmac,
null,
"Socket",
log,
log);
};
this._logErrorAction= log => loggerService.LogError($"[{uri}] {log}");
// Establish the remote endpoint for the socket. // Establish the remote endpoint for the socket.
_ipAddress = IPAddress.Parse(uri); _ipAddress = IPAddress.Parse(uri);
@@ -36,7 +51,7 @@ public abstract class SocketConnector : IDisposable
ReceiveTimeout = 5 * 1000 ReceiveTimeout = 5 * 1000
}; };
this._logAction("Connessione"); loggerService.LogDebug("Connessione");
} }
private async Task<bool> InternalConnect() private async Task<bool> InternalConnect()
@@ -50,7 +65,7 @@ public abstract class SocketConnector : IDisposable
} }
catch (Exception ex) catch (Exception ex)
{ {
this._logAction(ex.Message); this._logErrorAction(ex.Message);
isConnected = false; isConnected = false;
await Task.Delay(TimeSpan.FromSeconds(15)); await Task.Delay(TimeSpan.FromSeconds(15));
} }
@@ -59,11 +74,11 @@ public abstract class SocketConnector : IDisposable
{ {
case true when !_connected: case true when !_connected:
await OnConnected(); await OnConnected();
//this._logAction("Connesso a " + _ipAddress); //this._logDebugAction("Connesso a " + _ipAddress);
break; break;
case false when _connected: case false when _connected:
await OnDisconnected(); await OnDisconnected();
//this._logAction("Disconnesso da " + _ipAddress); //this._logDebugAction("Disconnesso da " + _ipAddress);
break; break;
} }
@@ -149,7 +164,7 @@ public abstract class SocketConnector : IDisposable
} }
catch (Exception e) catch (Exception e)
{ {
this._logAction(e.ToString()); this._logErrorAction(e.ToString());
return null; return null;
} }
} }

View File

@@ -16,7 +16,7 @@ public interface IOrdersHandlerService
OrdineLavorazioneDTO? GetOrdineLavorazione(string? key, string codJfas = null, bool forceCodJfasMatch = true); OrdineLavorazioneDTO? GetOrdineLavorazione(string? key, string codJfas = null, bool forceCodJfasMatch = true);
OrdineLavorazioneDTO GetOpenedOrdineLavorazione(); OrdineLavorazioneDTO? GetOpenedOrdineLavorazione();
OrdineLavorazioneDTO? GetNextOrdineLavorazione(OrdineLavorazioneKeyDTO ordineLavorazioneDto, bool checkFlagAvviabile = true); OrdineLavorazioneDTO? GetNextOrdineLavorazione(OrdineLavorazioneKeyDTO ordineLavorazioneDto, bool checkFlagAvviabile = true);

View File

@@ -13,180 +13,180 @@ using Integry_Smart_Gateway.Core.Workflow.Model;
namespace Integry_Smart_Gateway.Core.Orders; namespace Integry_Smart_Gateway.Core.Orders;
public class OrdersHandlerService : IOrdersHandlerService public class OrdersHandlerService(
IOrderConsumerService orderService,
ILoggerService loggerService,
ILooperService looperService,
IRestConsumerService restConsumerService)
: IOrdersHandlerService
{ {
public Action OnOrderListChanged { get; set; } public Action OnOrderListChanged { get; set; }
private static readonly TimeSpan POLL_DELAY_TIME = TimeSpan.FromSeconds(10); private static readonly TimeSpan POLL_DELAY_TIME = TimeSpan.FromSeconds(10);
private readonly IOrderConsumerService _orderService; private readonly List<OrdineLavorazioneDTO>? _currentOrders = new();
private readonly ILoggerService _loggerService;
private readonly ILooperService _looperService;
private readonly IRestConsumerService _restConsumerService;
private readonly List<OrdineLavorazioneDTO>? _currentOrders = new(); public void Init()
{
looperService.Add((Action)RefreshList, POLL_DELAY_TIME);
}
public OrdersHandlerService( public OrdineLavorazioneDTO? GetOrdineLavorazione(OrdineLavorazioneKeyDTO ordineLavorazione)
IOrderConsumerService orderService, {
ILoggerService loggerService, ILooperService looperService, IRestConsumerService restConsumerService) //Implementare la chiamata ai servizi nel caso non si trova in locale
{ if (_currentOrders == null || _currentOrders.Count == 0) return null;
_orderService = orderService;
_loggerService = loggerService;
_looperService = looperService;
_restConsumerService = restConsumerService;
}
public void Init() return _currentOrders.SingleOrDefault(dto => ordineLavorazione.Equals(dto, false));
{ }
this._looperService.Add((Action)RefreshList, POLL_DELAY_TIME);
}
public OrdineLavorazioneDTO? GetOrdineLavorazione(OrdineLavorazioneKeyDTO ordineLavorazione) public OrdineLavorazioneDTO? GetOpenedOrdineLavorazione()
{ {
//Implementare la chiamata ai servizi nel caso non si trova in locale //Implementare la chiamata ai servizi nel caso non si trova in locale
if (_currentOrders == null || _currentOrders.Count == 0) return null; if (_currentOrders == null || _currentOrders.Count == 0) return null;
return _currentOrders.SingleOrDefault(dto => ordineLavorazione.Equals(dto, false)); var openedOrders = _currentOrders
} .Where(x => x.Stato.Equals("IN CORSO", StringComparison.OrdinalIgnoreCase))
.ToList();
public OrdineLavorazioneDTO GetOpenedOrdineLavorazione() if (openedOrders.Count == 0)
{ return null;
//Implementare la chiamata ai servizi nel caso non si trova in locale
if (_currentOrders == null || _currentOrders.Count == 0) return null;
return _currentOrders.SingleOrDefault(x => x.Stato.Equals("IN CORSO", StringComparison.OrdinalIgnoreCase)); if (openedOrders.Count > 1)
} throw new Exception("Sono stati trovati più ordine in esecuzione");
public OrdineLavorazioneDTO? GetOrdineLavorazione(string key, string codJfas = null, bool forceCodJfasMatch = true) return openedOrders[0];
{ }
if (string.IsNullOrEmpty(key)) return null;
//Implementare la chiamata ai servizi nel caso non si trova in locale public OrdineLavorazioneDTO? GetOrdineLavorazione(string key, string codJfas = null, bool forceCodJfasMatch = true)
if (_currentOrders == null || _currentOrders.Count == 0) return null; {
if (string.IsNullOrEmpty(key)) return null;
//Implementare la chiamata ai servizi nel caso non si trova in locale
if (_currentOrders == null || _currentOrders.Count == 0) return null;
OrdineLavorazioneDTO? orderToReturn = null; OrdineLavorazioneDTO? orderToReturn = null;
var ordersWithoutCodJfasCheck = _currentOrders var ordersWithoutCodJfasCheck = _currentOrders
.Where(x => x.DescrizioneOrdine.StartsWith(key, StringComparison.OrdinalIgnoreCase) || .Where(x => x.DescrizioneOrdine.StartsWith(key, StringComparison.OrdinalIgnoreCase) ||
x.DescrizioneOrdine.Equals(key, StringComparison.OrdinalIgnoreCase)) x.DescrizioneOrdine.Equals(key, StringComparison.OrdinalIgnoreCase))
.ToList(); .ToList();
if (forceCodJfasMatch && !string.IsNullOrEmpty(codJfas)) if (forceCodJfasMatch && !string.IsNullOrEmpty(codJfas))
{ {
orderToReturn = ordersWithoutCodJfasCheck.FirstOrDefault(x => x.CodJfas.Equals(codJfas)); orderToReturn = ordersWithoutCodJfasCheck.FirstOrDefault(x => x.CodJfas.Equals(codJfas));
} }
else else
{ {
if (ordersWithoutCodJfasCheck.Count == 1) orderToReturn = ordersWithoutCodJfasCheck[0]; if (ordersWithoutCodJfasCheck.Count == 1) orderToReturn = ordersWithoutCodJfasCheck[0];
else if (ordersWithoutCodJfasCheck.Count > 1) else if (ordersWithoutCodJfasCheck.Count > 1)
{ {
if (codJfas != null) if (codJfas != null)
orderToReturn = ordersWithoutCodJfasCheck.FirstOrDefault(x => x.CodJfas.Equals(codJfas)); orderToReturn = ordersWithoutCodJfasCheck.FirstOrDefault(x => x.CodJfas.Equals(codJfas));
} }
} }
return orderToReturn; return orderToReturn;
} }
public OrdineLavorazioneDTO? GetNextOrdineLavorazione(OrdineLavorazioneKeyDTO ordineLavorazioneDto, public OrdineLavorazioneDTO? GetNextOrdineLavorazione(OrdineLavorazioneKeyDTO ordineLavorazioneDto,
bool checkFlagAvviabile = true) bool checkFlagAvviabile = true)
{ {
if (_currentOrders == null || _currentOrders.Count == 0) return null; if (_currentOrders == null || _currentOrders.Count == 0) return null;
OrdineLavorazioneDTO? orderToReturn = null; OrdineLavorazioneDTO? orderToReturn = null;
var tempOrders = _currentOrders var tempOrders = _currentOrders
.SkipWhile(ord => !ord.FlagAvviabile && checkFlagAvviabile) .SkipWhile(ord => !ord.FlagAvviabile && checkFlagAvviabile)
.ToList(); .ToList();
if (tempOrders is { Count: > 0 }) if (tempOrders is { Count: > 0 })
{ {
if (ordineLavorazioneDto != null) if (ordineLavorazioneDto != null)
{ {
if (tempOrders[0] != null) if (tempOrders[0] != null)
{ {
if (ordineLavorazioneDto.NumOrd == tempOrders[0].NumOrd) if (ordineLavorazioneDto.NumOrd == tempOrders[0].NumOrd)
{ {
orderToReturn = tempOrders.Count > 1 ? tempOrders[1] : null; orderToReturn = tempOrders.Count > 1 ? tempOrders[1] : null;
} }
else else
{ {
orderToReturn = tempOrders[0]; orderToReturn = tempOrders[0];
} }
} }
} }
else else
{ {
orderToReturn = tempOrders[0]; orderToReturn = tempOrders[0];
} }
} }
if (orderToReturn != null) if (orderToReturn != null)
{ {
orderToReturn = !string.IsNullOrEmpty(orderToReturn.PartitaMag) ? orderToReturn : null; orderToReturn = !string.IsNullOrEmpty(orderToReturn.PartitaMag) ? orderToReturn : null;
} }
return orderToReturn; return orderToReturn;
} }
public IList<StatoEventiMachineDTO> GetStatoEventiMachines(OrdineLavorazioneKeyDTO order, string codCmac) public IList<StatoEventiMachineDTO> GetStatoEventiMachines(OrdineLavorazioneKeyDTO order, string codCmac)
{ {
var result = _restConsumerService var result = restConsumerService
.Post<IList<StatoEventiMachineDTO>>($"production/machine/{codCmac}/order/status", null, order).Result; .Post<IList<StatoEventiMachineDTO>>($"production/machine/{codCmac}/order/status", null, order).Result;
return result.Dto; return result.Dto;
} }
public DtbOrdt StartMachineOnOrder(OrdineLavorazioneKeyDTO order, string codCmac, string? causale) public DtbOrdt StartMachineOnOrder(OrdineLavorazioneKeyDTO order, string codCmac, string? causale)
{ {
return SaveMachineOrderEvent(order, codCmac, MachineStatusEnum.MARCIA.ToEventoString(), return SaveMachineOrderEvent(order, codCmac, MachineStatusEnum.MARCIA.ToEventoString(),
string.IsNullOrEmpty(causale) ? MachineStatusEnum.MARCIA.ToDescrizioneEventoString() : causale); string.IsNullOrEmpty(causale) ? MachineStatusEnum.MARCIA.ToDescrizioneEventoString() : causale);
} }
public DtbOrdt StopMachineOnOrder(OrdineLavorazioneKeyDTO order, string codCmac, string? causale) public DtbOrdt StopMachineOnOrder(OrdineLavorazioneKeyDTO order, string codCmac, string? causale)
{ {
return SaveMachineOrderEvent(order, codCmac, MachineStatusEnum.STOP.ToEventoString(), return SaveMachineOrderEvent(order, codCmac, MachineStatusEnum.STOP.ToEventoString(),
string.IsNullOrEmpty(causale) ? MachineStatusEnum.STOP.ToDescrizioneEventoString() : causale); string.IsNullOrEmpty(causale) ? MachineStatusEnum.STOP.ToDescrizioneEventoString() : causale);
} }
public DtbOrdt SaveMachineOrderEvent(OrdineLavorazioneKeyDTO order, string codCmac, string evento, string causale) public DtbOrdt SaveMachineOrderEvent(OrdineLavorazioneKeyDTO order, string codCmac, string evento, string causale)
{ {
var model = new MachineOrderEventDTO() var model = new MachineOrderEventDTO()
{ {
Causale = causale, Causale = causale,
CodCmac = codCmac, CodCmac = codCmac,
Evento = evento, Evento = evento,
DataOrd = order.DataOrd, DataOrd = order.DataOrd,
NumOrd = order.NumOrd, NumOrd = order.NumOrd,
Gestione = order.Gestione Gestione = order.Gestione
}; };
return _restConsumerService.Post<DtbOrdt>($"production/machine/{codCmac}/order/event/save", null, model).Result return restConsumerService.Post<DtbOrdt>($"production/machine/{codCmac}/order/event/save", null, model).Result
.Dto; .Dto;
} }
public async void RefreshList() public async void RefreshList()
{ {
try try
{ {
var newList = await _orderService.RetrieveOrdiniLavorazione(true); var newList = await orderService.RetrieveOrdiniLavorazione(true);
if (newList == null) return; if (newList == null) return;
var equals = newList.SequenceEqual(_currentOrders); var equals = newList.SequenceEqual(_currentOrders);
if (!equals) if (!equals)
{ {
_currentOrders.Clear(); _currentOrders.Clear();
_currentOrders.AddRange(newList); _currentOrders.AddRange(newList);
OnOrderListChanged?.Invoke(); OnOrderListChanged?.Invoke();
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
_loggerService.LogError(ex, nameof(OrdersHandlerService)); loggerService.LogError(ex, nameof(OrdersHandlerService));
} }
} }
} }

View File

@@ -5,27 +5,19 @@ using Integry_Smart_Gateway.Core.Looper;
namespace Integry_Smart_Gateway.Core.Storage.DBMS.DataCleaner; namespace Integry_Smart_Gateway.Core.Storage.DBMS.DataCleaner;
public class DataCleanerService : IDataCleanerService public class DataCleanerService(
IStorageDBMSService storageDbmsService,
ILooperService looperService)
: IDataCleanerService
{ {
private readonly IStorageDBMSService _storageDbmsService; public void Init()
private readonly ILooperService _looperService;
public DataCleanerService(IStorageDBMSService storageDbmsService,
ILooperService looperService)
{ {
_storageDbmsService = storageDbmsService; looperService.Add(Clean, TimeSpan.FromDays(1));
_looperService = looperService;
}
public void Init()
{
_looperService.Add(Clean, TimeSpan.FromDays(1));
} }
public async void Clean() public async void Clean()
{ {
var itemsToDelete = _storageDbmsService var itemsToDelete = storageDbmsService
.AsQueryable<GatewayDataWrapper>() .AsQueryable<GatewayDataWrapper>()
.Where(x => .Where(x =>
x.TimeStamp < DateTime.Now.AddMonths(-2) || x.TimeStamp < DateTime.Now.AddMonths(-2) ||
@@ -42,7 +34,7 @@ public class DataCleanerService : IDataCleanerService
foreach (var chunk in chunks) foreach (var chunk in chunks)
{ {
await _storageDbmsService.RemoveRangeAsync<GatewayDataWrapper>(chunk); await storageDbmsService.RemoveRangeAsync<GatewayDataWrapper>(chunk);
} }
} }
} }

View File

@@ -153,50 +153,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - Gramm (SL) Base", "IS
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Rosso Gargano", "Rosso Gargano", "{45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Rosso Gargano", "Rosso Gargano", "{45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (Prod) Base", "ISG - RossoGargano (Prod) Base\ISG - RossoGargano (Prod) Base.csproj", "{07EF0422-0D0B-42F7-88BA-8614B8B29222}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E01)", "ISG - RossoGargano (E01)\ISG - RossoGargano (E01).csproj", "{6C0D016D-3C9A-44D2-A382-8BC1C5A363F8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E02)", "ISG - RossoGargano (E02)\ISG - RossoGargano (E02).csproj", "{9B85BA46-BEEC-4C58-8DDE-0F7786FD46A1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E03)", "ISG - RossoGargano (E03)\ISG - RossoGargano (E03).csproj", "{49D4BCCF-CD60-42E2-9626-543EB275A59B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E04)", "ISG - RossoGargano (E04)\ISG - RossoGargano (E04).csproj", "{6548A7FD-DC01-468D-AD87-4A0943F25510}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E05)", "ISG - RossoGargano (E05)\ISG - RossoGargano (E05).csproj", "{673F2448-B6D9-4646-9F7A-4FE590ACBE37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E06)", "ISG - RossoGargano (E06)\ISG - RossoGargano (E06).csproj", "{0FDAE312-4873-4B99-B8DA-303632E5AE3C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E07)", "ISG - RossoGargano (E07)\ISG - RossoGargano (E07).csproj", "{42F2C924-A855-4BED-85F1-4D66F5F0AC74}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E08)", "ISG - RossoGargano (E08)\ISG - RossoGargano (E08).csproj", "{681E90A8-5384-436D-8A55-5835DD095798}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E09)", "ISG - RossoGargano (E09)\ISG - RossoGargano (E09).csproj", "{17C897AE-5B86-4A24-BE2F-B24BEB344244}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (E10)", "ISG - RossoGargano (E10)\ISG - RossoGargano (E10).csproj", "{E19FEE58-F259-41F6-8119-0D2D669B5196}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B01)", "ISG - RossoGargano (B01)\ISG - RossoGargano (B01).csproj", "{B0E13D28-64BB-4334-993F-B01DD504BD21}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B02)", "ISG - RossoGargano (B02)\ISG - RossoGargano (B02).csproj", "{2AC80313-3520-4590-98D3-5C28C5D1358F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B03)", "ISG - RossoGargano (B03)\ISG - RossoGargano (B03).csproj", "{5DDC9DF2-552B-4613-AA1C-E8D00258B626}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B04)", "ISG - RossoGargano (B04)\ISG - RossoGargano (B04).csproj", "{4E97E875-5144-4072-834D-3FB3A91864E3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B05)", "ISG - RossoGargano (B05)\ISG - RossoGargano (B05).csproj", "{77810C00-66BC-4C92-8132-8DEE5E7C451A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B06)", "ISG - RossoGargano (B06)\ISG - RossoGargano (B06).csproj", "{3D638FD6-9F45-49B4-B550-CD3DBB612FEA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (B07)", "ISG - RossoGargano (B07)\ISG - RossoGargano (B07).csproj", "{AA3EBA09-8C6A-473C-B20F-248479B450AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (A01)", "ISG - RossoGargano (A01)\ISG - RossoGargano (A01).csproj", "{5C912C54-B70E-450F-A446-FF1A4B64E32D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (A02)", "ISG - RossoGargano (A02)\ISG - RossoGargano (A02).csproj", "{2348F3F7-BA6A-4B02-94C7-C18284E7929C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (A03)", "ISG - RossoGargano (A03)\ISG - RossoGargano (A03).csproj", "{287CE8F6-B30B-4BAC-8BCB-79DEA4EFAFEB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISG - RossoGargano (EA)", "ISG - RossoGargano (EA)\ISG - RossoGargano (EA).csproj", "{FA46FB57-61D2-4CA1-96AF-7F77B13C2038}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connector - Biolevante (Eurofork)", "Connector - Biolevante (Eurofork)\Connector - Biolevante (Eurofork).csproj", "{35F66009-7D5D-4554-8E4C-D49F51391BB9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connector - Biolevante (Eurofork)", "Connector - Biolevante (Eurofork)\Connector - Biolevante (Eurofork).csproj", "{35F66009-7D5D-4554-8E4C-D49F51391BB9}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISG - Gramm (L4)", "ISG - Gramm (L4)\ISG - Gramm (L4).csproj", "{49474236-41CE-49C7-A92D-B547C12C2F20}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISG - Gramm (L4)", "ISG - Gramm (L4)\ISG - Gramm (L4).csproj", "{49474236-41CE-49C7-A92D-B547C12C2F20}"
@@ -433,94 +389,6 @@ Global
{DE07E77A-A412-4C60-AFF3-FAE14F63BB54}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE07E77A-A412-4C60-AFF3-FAE14F63BB54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE07E77A-A412-4C60-AFF3-FAE14F63BB54}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE07E77A-A412-4C60-AFF3-FAE14F63BB54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE07E77A-A412-4C60-AFF3-FAE14F63BB54}.Release|Any CPU.Build.0 = Release|Any CPU {DE07E77A-A412-4C60-AFF3-FAE14F63BB54}.Release|Any CPU.Build.0 = Release|Any CPU
{07EF0422-0D0B-42F7-88BA-8614B8B29222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07EF0422-0D0B-42F7-88BA-8614B8B29222}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07EF0422-0D0B-42F7-88BA-8614B8B29222}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07EF0422-0D0B-42F7-88BA-8614B8B29222}.Release|Any CPU.Build.0 = Release|Any CPU
{6C0D016D-3C9A-44D2-A382-8BC1C5A363F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C0D016D-3C9A-44D2-A382-8BC1C5A363F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C0D016D-3C9A-44D2-A382-8BC1C5A363F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C0D016D-3C9A-44D2-A382-8BC1C5A363F8}.Release|Any CPU.Build.0 = Release|Any CPU
{9B85BA46-BEEC-4C58-8DDE-0F7786FD46A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B85BA46-BEEC-4C58-8DDE-0F7786FD46A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B85BA46-BEEC-4C58-8DDE-0F7786FD46A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B85BA46-BEEC-4C58-8DDE-0F7786FD46A1}.Release|Any CPU.Build.0 = Release|Any CPU
{49D4BCCF-CD60-42E2-9626-543EB275A59B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49D4BCCF-CD60-42E2-9626-543EB275A59B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49D4BCCF-CD60-42E2-9626-543EB275A59B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49D4BCCF-CD60-42E2-9626-543EB275A59B}.Release|Any CPU.Build.0 = Release|Any CPU
{6548A7FD-DC01-468D-AD87-4A0943F25510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6548A7FD-DC01-468D-AD87-4A0943F25510}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6548A7FD-DC01-468D-AD87-4A0943F25510}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6548A7FD-DC01-468D-AD87-4A0943F25510}.Release|Any CPU.Build.0 = Release|Any CPU
{673F2448-B6D9-4646-9F7A-4FE590ACBE37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{673F2448-B6D9-4646-9F7A-4FE590ACBE37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{673F2448-B6D9-4646-9F7A-4FE590ACBE37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{673F2448-B6D9-4646-9F7A-4FE590ACBE37}.Release|Any CPU.Build.0 = Release|Any CPU
{0FDAE312-4873-4B99-B8DA-303632E5AE3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FDAE312-4873-4B99-B8DA-303632E5AE3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FDAE312-4873-4B99-B8DA-303632E5AE3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FDAE312-4873-4B99-B8DA-303632E5AE3C}.Release|Any CPU.Build.0 = Release|Any CPU
{42F2C924-A855-4BED-85F1-4D66F5F0AC74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F2C924-A855-4BED-85F1-4D66F5F0AC74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F2C924-A855-4BED-85F1-4D66F5F0AC74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F2C924-A855-4BED-85F1-4D66F5F0AC74}.Release|Any CPU.Build.0 = Release|Any CPU
{681E90A8-5384-436D-8A55-5835DD095798}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{681E90A8-5384-436D-8A55-5835DD095798}.Debug|Any CPU.Build.0 = Debug|Any CPU
{681E90A8-5384-436D-8A55-5835DD095798}.Release|Any CPU.ActiveCfg = Release|Any CPU
{681E90A8-5384-436D-8A55-5835DD095798}.Release|Any CPU.Build.0 = Release|Any CPU
{17C897AE-5B86-4A24-BE2F-B24BEB344244}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17C897AE-5B86-4A24-BE2F-B24BEB344244}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17C897AE-5B86-4A24-BE2F-B24BEB344244}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17C897AE-5B86-4A24-BE2F-B24BEB344244}.Release|Any CPU.Build.0 = Release|Any CPU
{E19FEE58-F259-41F6-8119-0D2D669B5196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E19FEE58-F259-41F6-8119-0D2D669B5196}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E19FEE58-F259-41F6-8119-0D2D669B5196}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E19FEE58-F259-41F6-8119-0D2D669B5196}.Release|Any CPU.Build.0 = Release|Any CPU
{B0E13D28-64BB-4334-993F-B01DD504BD21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0E13D28-64BB-4334-993F-B01DD504BD21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0E13D28-64BB-4334-993F-B01DD504BD21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0E13D28-64BB-4334-993F-B01DD504BD21}.Release|Any CPU.Build.0 = Release|Any CPU
{2AC80313-3520-4590-98D3-5C28C5D1358F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AC80313-3520-4590-98D3-5C28C5D1358F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AC80313-3520-4590-98D3-5C28C5D1358F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AC80313-3520-4590-98D3-5C28C5D1358F}.Release|Any CPU.Build.0 = Release|Any CPU
{5DDC9DF2-552B-4613-AA1C-E8D00258B626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DDC9DF2-552B-4613-AA1C-E8D00258B626}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DDC9DF2-552B-4613-AA1C-E8D00258B626}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5DDC9DF2-552B-4613-AA1C-E8D00258B626}.Release|Any CPU.Build.0 = Release|Any CPU
{4E97E875-5144-4072-834D-3FB3A91864E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E97E875-5144-4072-834D-3FB3A91864E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E97E875-5144-4072-834D-3FB3A91864E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E97E875-5144-4072-834D-3FB3A91864E3}.Release|Any CPU.Build.0 = Release|Any CPU
{77810C00-66BC-4C92-8132-8DEE5E7C451A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77810C00-66BC-4C92-8132-8DEE5E7C451A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77810C00-66BC-4C92-8132-8DEE5E7C451A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77810C00-66BC-4C92-8132-8DEE5E7C451A}.Release|Any CPU.Build.0 = Release|Any CPU
{3D638FD6-9F45-49B4-B550-CD3DBB612FEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D638FD6-9F45-49B4-B550-CD3DBB612FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D638FD6-9F45-49B4-B550-CD3DBB612FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D638FD6-9F45-49B4-B550-CD3DBB612FEA}.Release|Any CPU.Build.0 = Release|Any CPU
{AA3EBA09-8C6A-473C-B20F-248479B450AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA3EBA09-8C6A-473C-B20F-248479B450AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA3EBA09-8C6A-473C-B20F-248479B450AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA3EBA09-8C6A-473C-B20F-248479B450AE}.Release|Any CPU.Build.0 = Release|Any CPU
{5C912C54-B70E-450F-A446-FF1A4B64E32D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C912C54-B70E-450F-A446-FF1A4B64E32D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C912C54-B70E-450F-A446-FF1A4B64E32D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C912C54-B70E-450F-A446-FF1A4B64E32D}.Release|Any CPU.Build.0 = Release|Any CPU
{2348F3F7-BA6A-4B02-94C7-C18284E7929C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2348F3F7-BA6A-4B02-94C7-C18284E7929C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2348F3F7-BA6A-4B02-94C7-C18284E7929C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2348F3F7-BA6A-4B02-94C7-C18284E7929C}.Release|Any CPU.Build.0 = Release|Any CPU
{287CE8F6-B30B-4BAC-8BCB-79DEA4EFAFEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{287CE8F6-B30B-4BAC-8BCB-79DEA4EFAFEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{287CE8F6-B30B-4BAC-8BCB-79DEA4EFAFEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{287CE8F6-B30B-4BAC-8BCB-79DEA4EFAFEB}.Release|Any CPU.Build.0 = Release|Any CPU
{FA46FB57-61D2-4CA1-96AF-7F77B13C2038}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA46FB57-61D2-4CA1-96AF-7F77B13C2038}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA46FB57-61D2-4CA1-96AF-7F77B13C2038}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA46FB57-61D2-4CA1-96AF-7F77B13C2038}.Release|Any CPU.Build.0 = Release|Any CPU
{35F66009-7D5D-4554-8E4C-D49F51391BB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35F66009-7D5D-4554-8E4C-D49F51391BB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35F66009-7D5D-4554-8E4C-D49F51391BB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {35F66009-7D5D-4554-8E4C-D49F51391BB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35F66009-7D5D-4554-8E4C-D49F51391BB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {35F66009-7D5D-4554-8E4C-D49F51391BB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -600,28 +468,6 @@ Global
{947D5525-8929-498A-A3AF-1B8DA27425A0} = {C557B43E-5306-4C48-B8BB-F0158AEE3DBF} {947D5525-8929-498A-A3AF-1B8DA27425A0} = {C557B43E-5306-4C48-B8BB-F0158AEE3DBF}
{C602A3FC-394F-47F2-8B16-9442723AA3D2} = {C557B43E-5306-4C48-B8BB-F0158AEE3DBF} {C602A3FC-394F-47F2-8B16-9442723AA3D2} = {C557B43E-5306-4C48-B8BB-F0158AEE3DBF}
{DE07E77A-A412-4C60-AFF3-FAE14F63BB54} = {D43BF479-C9E8-4C0A-82FE-A897653BDA6B} {DE07E77A-A412-4C60-AFF3-FAE14F63BB54} = {D43BF479-C9E8-4C0A-82FE-A897653BDA6B}
{07EF0422-0D0B-42F7-88BA-8614B8B29222} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{6C0D016D-3C9A-44D2-A382-8BC1C5A363F8} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{9B85BA46-BEEC-4C58-8DDE-0F7786FD46A1} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{49D4BCCF-CD60-42E2-9626-543EB275A59B} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{6548A7FD-DC01-468D-AD87-4A0943F25510} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{673F2448-B6D9-4646-9F7A-4FE590ACBE37} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{0FDAE312-4873-4B99-B8DA-303632E5AE3C} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{42F2C924-A855-4BED-85F1-4D66F5F0AC74} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{681E90A8-5384-436D-8A55-5835DD095798} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{17C897AE-5B86-4A24-BE2F-B24BEB344244} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{E19FEE58-F259-41F6-8119-0D2D669B5196} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{B0E13D28-64BB-4334-993F-B01DD504BD21} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{2AC80313-3520-4590-98D3-5C28C5D1358F} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{5DDC9DF2-552B-4613-AA1C-E8D00258B626} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{4E97E875-5144-4072-834D-3FB3A91864E3} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{77810C00-66BC-4C92-8132-8DEE5E7C451A} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{3D638FD6-9F45-49B4-B550-CD3DBB612FEA} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{AA3EBA09-8C6A-473C-B20F-248479B450AE} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{5C912C54-B70E-450F-A446-FF1A4B64E32D} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{2348F3F7-BA6A-4B02-94C7-C18284E7929C} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{287CE8F6-B30B-4BAC-8BCB-79DEA4EFAFEB} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{FA46FB57-61D2-4CA1-96AF-7F77B13C2038} = {45AD7AA3-ABF5-47F0-8256-9CEC4CA90516}
{35F66009-7D5D-4554-8E4C-D49F51391BB9} = {3CDAA648-8463-42D4-A09B-AB6AA309AAC4} {35F66009-7D5D-4554-8E4C-D49F51391BB9} = {3CDAA648-8463-42D4-A09B-AB6AA309AAC4}
{49474236-41CE-49C7-A92D-B547C12C2F20} = {D43BF479-C9E8-4C0A-82FE-A897653BDA6B} {49474236-41CE-49C7-A92D-B547C12C2F20} = {D43BF479-C9E8-4C0A-82FE-A897653BDA6B}
{9FB6995F-68F3-4BE8-B2E9-2C7CB45FDE01} = {7F560679-5A72-40A5-9186-A44C4914C650} {9FB6995F-68F3-4BE8-B2E9-2C7CB45FDE01} = {7F560679-5A72-40A5-9186-A44C4914C650}