Limpieza: quitar codigo sin uso (metodos sin llamadores, throw inalcanzable, variables y propiedades del RepositoryWrapper sin uso)

- ConnectionServiceLayer: ValidarCertificado, Logout, CancelAsyncSBA, DeleteAsyncSBA y throw inalcanzable en PatchAsyncSBA
- HelperDB (SET ejecutaba SQL arbitrario, sin llamadores)
- RepositoryWrapper/IRepositoryWrapper: 11 propiedades que ningun controller usa
- PickingRepository: TotalDetalle_Parcial y _Invoice sin uso; ReciboRepository: SerieOrigen sin uso

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-14 19:29:41 -05:00
1 parent 3d82f7380c
commit 57b4578f1f
6 files changed
-506

No files matched your search

@@ -28,20 +28,9 @@ namespace Net.Data
#endregion
#region SAP (SERVICES LAYER)
IBusinessPartnersRepository BusinessPartners { get; }
ICreditNotesRepository CreditNotes { get; }
IPurchaseInvoicesRepository PurchaseInvoices { get; }
IInvoiceRepository InvoiceRepository { get; }
IPurchaseDeliveryNotesRepository PurchaseDeliveryNotes { get; }
IPurchaseOrdersRepository PurchaseOrders { get; }
IAuthenticateRepository Authenticate { get; }
IItemsRepository Items { get; }
IReturnRequestRepository ReturnRequest { get; }
IStockTransferRepository StockTransfer { get; }
IInventoryGenEntriesRepository InventoryGenEntries { get; }
IInventoryGenExitsRepository InventoryGenExits { get; }
IHRRepository HR { get; }
IGlobalDataRepository GlobalData { get; }
#endregion
@@ -42,7 +42,6 @@ namespace Net.Data
private IReciboRepository _Recibo;
private ITransferenciaRepository _Transferencia;
private IStockTransferRepository _StockTransfer;
private IPickingRepository _Picking;
private IInventarioRepository _Inventario;
private ISolicitudTransferenciaRepository _SolicitudTransferencia;
@@ -51,19 +50,9 @@ namespace Net.Data
#region SAP (SERVICES LAYER)
private IBusinessPartnersRepository _BusinessPartners;
private IPurchaseInvoicesRepository _PurchaseInvoices;
private IInvoiceRepository _Invoice;
private ICreditNotesRepository _CreditNotes;
private IAuthenticateRepository _AuthenticateRepository;
private IPurchaseDeliveryNotesRepository _PurchaseDeliveryNotes;
private IPurchaseOrdersRepository _PurchaseOrders;
private IItemsRepository _Items;
private IReturnRequestRepository _ReturnRequest;
private IInventoryGenEntriesRepository _InventoryGenEntries;
private IInventoryGenExitsRepository _InventoryGenExits;
private IHRRepository _HR;
private IGlobalDataRepository _GlobalData;
#endregion
@@ -162,79 +151,6 @@ namespace Net.Data
#endregion
#region SAP (SERVICES LAYER)
public IBusinessPartnersRepository BusinessPartners
{
get
{
if (_BusinessPartners == null)
{
_repoContext._cnx = _conSQL;
_BusinessPartners = new BusinessPartnersRepository(_clientFactory, _configuration, _repoContext);
}
return _BusinessPartners;
}
}
public ICreditNotesRepository CreditNotes
{
get
{
if (_CreditNotes == null)
{
_repoContext._cnx = _conSQL;
_CreditNotes = new CreditNotesRepository(_clientFactory, _configuration, _repoContext);
}
return _CreditNotes;
}
}
public IInvoiceRepository InvoiceRepository
{
get
{
if (_Invoice == null)
{
_repoContext._cnx = _conSQL;
_Invoice = new InvoiceRepository(_clientFactory, _configuration, _repoContext);
}
return _Invoice;
}
}
public IPurchaseInvoicesRepository PurchaseInvoices
{
get
{
if (_PurchaseInvoices == null)
{
_repoContext._cnx = _conSQL;
_PurchaseInvoices = new PurchaseInvoicesRepository(_clientFactory, _configuration);
}
return _PurchaseInvoices;
}
}
public IPurchaseDeliveryNotesRepository PurchaseDeliveryNotes
{
get
{
if (_PurchaseDeliveryNotes == null)
{
_repoContext._cnx = _conSQL;
_PurchaseDeliveryNotes = new PurchaseDeliveryNotesRepository(_clientFactory, _configuration);
}
return _PurchaseDeliveryNotes;
}
}
public IPurchaseOrdersRepository PurchaseOrders
{
get
{
if (_PurchaseOrders == null)
{
_repoContext._cnx = _conSQL;
_PurchaseOrders = new PurchaseOrdersRepository(_clientFactory, _configuration);
}
return _PurchaseOrders;
}
}
public IAuthenticateRepository Authenticate
{
get
@@ -247,54 +163,6 @@ namespace Net.Data
return _AuthenticateRepository;
}
}
public IReturnRequestRepository ReturnRequest
{
get
{
if(_ReturnRequest == null)
{
_repoContext._cnx = _conSQL;
_ReturnRequest = new ReturnRequestRepository(_clientFactory, _configuration);
}
return _ReturnRequest;
}
}
public IStockTransferRepository StockTransfer
{
get
{
if (_StockTransfer == null)
{
_repoContext._cnx = _conSQL;
_StockTransfer = new StockTransferRepository(_clientFactory, _configuration);
}
return _StockTransfer;
}
}
public IInventoryGenEntriesRepository InventoryGenEntries
{
get
{
if (_InventoryGenEntries == null)
{
_repoContext._cnx = _conSQL;
_InventoryGenEntries = new InventoryGenEntriesRepository(_clientFactory, _configuration, _repoContext);
}
return _InventoryGenEntries;
}
}
public IInventoryGenExitsRepository InventoryGenExits
{
get
{
if (_InventoryGenExits == null)
{
_repoContext._cnx = _conSQL;
_InventoryGenExits = new InventoryGenExitsRepository(_clientFactory, _configuration, _repoContext);
}
return _InventoryGenExits;
}
}
public IHRRepository HR
{
@@ -309,18 +177,6 @@ namespace Net.Data
}
}
public IGlobalDataRepository GlobalData
{
get
{
if (_GlobalData == null)
{
_repoContext._cnx = _conSQL;
_GlobalData = new GlobalDataRepository(_clientFactory, _configuration, _repoContext);
}
return _GlobalData;
}
}
#endregion
}
}
-27
View File
@@ -1,27 +0,0 @@
using Sap.Data.Hana;
using System.Data;
namespace Net.Data.HelperData
{
public class HelperDB
{
public static void SET(string query)
{
using (HanaConnection con = new HanaConnection(LocalData.ConnectionString))
{
con.Open();
HanaCommand cmd = new HanaCommand
{
CommandText = query,
Connection = con,
CommandType = CommandType.Text
};
cmd.ExecuteNonQuery();
con.Close();
}
}
}
}
@@ -88,13 +88,11 @@ namespace Net.Data.WMS.Picking
var TotalDetalle = 0;
var TotalDetalle_Anulado = 0;
var TotalDetalle_Parcial = 0;
var TotalDetalle_Completo = 0;
if (Existe > 1)
{
TotalDetalle = entidad.Detalle.Count();
TotalDetalle_Anulado = entidad.Detalle.Where(x=> x.Estado == "A").Count();
TotalDetalle_Parcial = entidad.Detalle.Where(x => x.Estado == "P").Count();
TotalDetalle_Completo = entidad.Detalle.Where(x => x.Estado == "C").Count();
if(TotalDetalle == TotalDetalle_Anulado)
{
@@ -113,7 +111,6 @@ namespace Net.Data.WMS.Picking
{
TotalDetalle = entidad.Detalle.Count();
TotalDetalle_Anulado = entidad.Detalle.Where(x => x.Estado == "A").Count();
TotalDetalle_Parcial = entidad.Detalle.Where(x => x.Estado == "P").Count();
TotalDetalle_Completo = entidad.Detalle.Where(x => x.Estado == "C").Count();
}
@@ -571,7 +568,6 @@ namespace Net.Data.WMS.Picking
}
});
var _Invoice = response_invoicesRepository.ListData.FirstOrDefault();
creditNotesNotes.DocumentLines.ForEach(line =>
{
-3
View File
@@ -379,7 +379,6 @@ namespace Net.Data.WMS.Recibo
_Invoice = _Invoice_Result.ListData.FirstOrDefault();
}
});
string SerieOrigen = "";
string U_SYP_MDTO = "";
string U_SYP_MDCO = "";
string U_SYP_MDSO = "";
@@ -387,7 +386,6 @@ namespace Net.Data.WMS.Recibo
if (_Invoice == null)
{
SerieOrigen = returnRequest.U_SYP_MDSO;
U_SYP_MDTO = returnRequest.U_SYP_MDTO;
U_SYP_MDCO = returnRequest.U_SYP_MDCO;
U_SYP_MDSO = returnRequest.U_SYP_MDSO;
@@ -395,7 +393,6 @@ namespace Net.Data.WMS.Recibo
}
else
{
SerieOrigen = _Invoice.U_SYP_MDSD;
U_SYP_MDTO = _Invoice.U_SYP_MDTD;
U_SYP_MDCO = _Invoice.U_SYP_MDCD;
U_SYP_MDSO = _Invoice.U_SYP_MDSD;