From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- .../ParametrosRelatorioRepository.cs | 111 --------------------- 1 file changed, 111 deletions(-) delete mode 100644 Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/ParametrosRelatorioRepository.cs (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/ParametrosRelatorioRepository.cs') diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/ParametrosRelatorioRepository.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/ParametrosRelatorioRepository.cs deleted file mode 100644 index d547f22..0000000 --- a/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/ParametrosRelatorioRepository.cs +++ /dev/null @@ -1,111 +0,0 @@ -using AutoMapper; -using Gestor.Infrastructure.Entities.Relatorios; -using Gestor.Infrastructure.Helpers; -using Gestor.Infrastructure.Mappers; -using Gestor.Infrastructure.Repository.Generic; -using Gestor.Infrastructure.Repository.Interface; -using Gestor.Infrastructure.UnitOfWork.Generic; -using Gestor.Model.Common; -using Gestor.Model.Domain.Relatorios; -using System; -using System.Collections.Generic; - -namespace Gestor.Infrastructure.Repository.Logic -{ - public class ParametrosRelatorioRepository : GenericRepository, IParametrosRelatorioRepository, IGenericRepository - { - private readonly GenericUnitOfWork _unitOfWork; - - public ParametrosRelatorioRepository(GenericUnitOfWork unitOfWork) : base(unitOfWork.Session) - { - this._unitOfWork = unitOfWork; - } - - public void Delete(long id) - { - ParametrosRelatorioDb parametrosRelatorioDb = base.FindEntityById(id); - if (parametrosRelatorioDb == null) - { - return; - } - base.Delete(parametrosRelatorioDb); - } - - public List Find(long id, Relatorio relatorio) - { - List parametrosRelatorios = this.Select(new List() - { - new Condicao() - { - Campo = "IdUsuario", - Valores = id.CriarValor() - }, - new Condicao() - { - Campo = "Relatorio", - Valores = relatorio.CriarValor() - }, - new Condicao() - { - Campo = "Header", - Valores = null, - Operador = Operador.Diferente - }, - new Condicao() - { - Campo = "Header", - Valores = "".CriarValor(), - Operador = Operador.Diferente - } - }); - if (parametrosRelatorios.Count == 0) - { - parametrosRelatorios = this.Select(new List() - { - new Condicao() - { - Campo = "IdUsuario", - Valores = 0.CriarValor() - }, - new Condicao() - { - Campo = "Relatorio", - Valores = relatorio.CriarValor() - }, - new Condicao() - { - Campo = "Header", - Valores = null, - Operador = Operador.Diferente - }, - new Condicao() - { - Campo = "Header", - Valores = "".CriarValor(), - Operador = Operador.Diferente - } - }); - } - return parametrosRelatorios; - } - - public ParametrosRelatorio Merge(ParametrosRelatorio parametrosRelatorio) - { - ParametrosRelatorioDb parametrosRelatorioDb = ApplicationMapper.Mapper.Map(parametrosRelatorio); - base.Merge(parametrosRelatorioDb); - return ApplicationMapper.Mapper.Map(parametrosRelatorioDb); - } - - public ParametrosRelatorio SaveOrUpdate(ParametrosRelatorio parametrosRelatorio) - { - ParametrosRelatorioDb parametrosRelatorioDb = ApplicationMapper.Mapper.Map(parametrosRelatorio); - this.SaveOrUpdate(parametrosRelatorioDb); - return ApplicationMapper.Mapper.Map(parametrosRelatorioDb); - } - - public List Select(List condicao) - { - return this._unitOfWork.Select(condicao.CreateParameters(0), "SELECT * FROM CamposRelatorios WHERE ", "").MapCamposRelatorio(); - } - } -} \ No newline at end of file -- cgit v1.2.3