diff --git a/pom.xml b/pom.xml index 1b248a493..651a20522 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 org.opencommercial api - 1.2.1 + 1.3.1 jar diff --git a/src/main/java/sic/App.java b/src/main/java/org/opencommercial/App.java similarity index 94% rename from src/main/java/sic/App.java rename to src/main/java/org/opencommercial/App.java index 848240dec..2010ecd61 100644 --- a/src/main/java/sic/App.java +++ b/src/main/java/org/opencommercial/App.java @@ -1,4 +1,4 @@ -package sic; +package org.opencommercial; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/sic/aspect/AccesoRolesPermitidos.java b/src/main/java/org/opencommercial/aspect/AccesoRolesPermitidos.java similarity index 80% rename from src/main/java/sic/aspect/AccesoRolesPermitidos.java rename to src/main/java/org/opencommercial/aspect/AccesoRolesPermitidos.java index c1212414e..c5886518c 100644 --- a/src/main/java/sic/aspect/AccesoRolesPermitidos.java +++ b/src/main/java/org/opencommercial/aspect/AccesoRolesPermitidos.java @@ -1,6 +1,6 @@ -package sic.aspect; +package org.opencommercial.aspect; -import sic.modelo.Rol; +import org.opencommercial.model.Rol; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/src/main/java/sic/aspect/AuthAspect.java b/src/main/java/org/opencommercial/aspect/AuthAspect.java similarity index 90% rename from src/main/java/sic/aspect/AuthAspect.java rename to src/main/java/org/opencommercial/aspect/AuthAspect.java index 0f781e74b..272f00c74 100644 --- a/src/main/java/sic/aspect/AuthAspect.java +++ b/src/main/java/org/opencommercial/aspect/AuthAspect.java @@ -1,4 +1,4 @@ -package sic.aspect; +package org.opencommercial.aspect; import io.jsonwebtoken.Claims; import org.aspectj.lang.annotation.Aspect; @@ -8,9 +8,9 @@ import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import sic.exception.ForbiddenException; -import sic.modelo.Rol; -import sic.service.AuthService; +import org.opencommercial.exception.ForbiddenException; +import org.opencommercial.model.Rol; +import org.opencommercial.service.AuthService; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/config/AppConfig.java b/src/main/java/org/opencommercial/config/AppConfig.java similarity index 93% rename from src/main/java/sic/config/AppConfig.java rename to src/main/java/org/opencommercial/config/AppConfig.java index c001dd454..a4ae84529 100644 --- a/src/main/java/sic/config/AppConfig.java +++ b/src/main/java/org/opencommercial/config/AppConfig.java @@ -1,4 +1,4 @@ -package sic.config; +package org.opencommercial.config; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; @@ -17,11 +17,11 @@ import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; -import sic.modelo.Cliente; -import sic.modelo.Ubicacion; -import sic.modelo.dto.ClienteDTO; -import sic.modelo.dto.UbicacionDTO; -import sic.service.AfipWebServiceSOAPClient; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.dto.ClienteDTO; +import org.opencommercial.model.dto.UbicacionDTO; +import org.opencommercial.service.AfipWebServiceSOAPClient; import java.io.IOException; import java.time.Clock; diff --git a/src/main/java/sic/config/AppWebMvc.java b/src/main/java/org/opencommercial/config/AppWebMvc.java similarity index 93% rename from src/main/java/sic/config/AppWebMvc.java rename to src/main/java/org/opencommercial/config/AppWebMvc.java index 9f404637b..fd581e4bd 100644 --- a/src/main/java/sic/config/AppWebMvc.java +++ b/src/main/java/org/opencommercial/config/AppWebMvc.java @@ -1,10 +1,10 @@ -package sic.config; +package org.opencommercial.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import sic.interceptor.JwtInterceptor; +import org.opencommercial.interceptor.JwtInterceptor; @Configuration public class AppWebMvc implements WebMvcConfigurer { diff --git a/src/main/java/sic/config/SecurityJsonViewControllerAdvice.java b/src/main/java/org/opencommercial/config/SecurityJsonViewControllerAdvice.java similarity index 95% rename from src/main/java/sic/config/SecurityJsonViewControllerAdvice.java rename to src/main/java/org/opencommercial/config/SecurityJsonViewControllerAdvice.java index 185ef8374..7f1a60c23 100644 --- a/src/main/java/sic/config/SecurityJsonViewControllerAdvice.java +++ b/src/main/java/org/opencommercial/config/SecurityJsonViewControllerAdvice.java @@ -1,4 +1,4 @@ -package sic.config; +package org.opencommercial.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.MethodParameter; @@ -8,8 +8,8 @@ import org.springframework.http.server.ServerHttpResponse; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.servlet.mvc.method.annotation.AbstractMappingJacksonResponseBodyAdvice; -import sic.modelo.Rol; -import sic.service.AuthService; +import org.opencommercial.model.Rol; +import org.opencommercial.service.AuthService; import java.util.List; diff --git a/src/main/java/sic/config/Views.java b/src/main/java/org/opencommercial/config/Views.java similarity index 90% rename from src/main/java/sic/config/Views.java rename to src/main/java/org/opencommercial/config/Views.java index a75797af5..ce3ac3a90 100644 --- a/src/main/java/sic/config/Views.java +++ b/src/main/java/org/opencommercial/config/Views.java @@ -1,4 +1,4 @@ -package sic.config; +package org.opencommercial.config; public class Views { diff --git a/src/main/java/sic/controller/AuthController.java b/src/main/java/org/opencommercial/controller/AuthController.java similarity index 85% rename from src/main/java/sic/controller/AuthController.java rename to src/main/java/org/opencommercial/controller/AuthController.java index 4f2de0b06..c5ede205c 100644 --- a/src/main/java/sic/controller/AuthController.java +++ b/src/main/java/org/opencommercial/controller/AuthController.java @@ -1,14 +1,14 @@ -package sic.controller; +package org.opencommercial.controller; import jakarta.servlet.http.HttpServletRequest; +import org.opencommercial.model.Credencial; +import org.opencommercial.model.dto.RecoveryPasswordDTO; +import org.opencommercial.model.dto.RegistracionClienteAndUsuarioDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.RegistracionService; +import org.opencommercial.service.UsuarioService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import sic.modelo.*; -import sic.modelo.dto.RecoveryPasswordDTO; -import sic.modelo.dto.RegistracionClienteAndUsuarioDTO; -import sic.service.AuthService; -import sic.service.RegistracionService; -import sic.service.UsuarioService; @RestController public class AuthController { diff --git a/src/main/java/sic/controller/CajaController.java b/src/main/java/org/opencommercial/controller/CajaController.java similarity index 94% rename from src/main/java/sic/controller/CajaController.java rename to src/main/java/org/opencommercial/controller/CajaController.java index d770c6f0d..dcb0945f7 100644 --- a/src/main/java/sic/controller/CajaController.java +++ b/src/main/java/org/opencommercial/controller/CajaController.java @@ -1,15 +1,15 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Caja; +import org.opencommercial.model.MovimientoCaja; +import org.opencommercial.model.Rol; +import org.opencommercial.model.criteria.BusquedaCajaCriteria; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Caja; -import sic.modelo.MovimientoCaja; -import sic.modelo.Rol; -import sic.modelo.criteria.BusquedaCajaCriteria; -import sic.service.*; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/controller/CarritoCompraController.java b/src/main/java/org/opencommercial/controller/CarritoCompraController.java similarity index 91% rename from src/main/java/sic/controller/CarritoCompraController.java rename to src/main/java/org/opencommercial/controller/CarritoCompraController.java index 3daaff32c..cf1227020 100644 --- a/src/main/java/sic/controller/CarritoCompraController.java +++ b/src/main/java/org/opencommercial/controller/CarritoCompraController.java @@ -1,17 +1,17 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.modelo.ItemCarritoCompra; -import sic.modelo.Pedido; -import sic.modelo.dto.CarritoCompraDTO; -import sic.modelo.dto.NuevaOrdenDePagoDTO; -import sic.modelo.dto.ProductoFaltanteDTO; -import sic.service.AuthService; -import sic.service.CarritoCompraService; -import sic.service.ProductoService; +import org.opencommercial.model.ItemCarritoCompra; +import org.opencommercial.model.Pedido; +import org.opencommercial.model.dto.CarritoCompraDTO; +import org.opencommercial.model.dto.NuevaOrdenDePagoDTO; +import org.opencommercial.model.dto.ProductoFaltanteDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.CarritoCompraService; +import org.opencommercial.service.ProductoService; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/controller/ClienteController.java b/src/main/java/org/opencommercial/controller/ClienteController.java similarity index 93% rename from src/main/java/sic/controller/ClienteController.java rename to src/main/java/org/opencommercial/controller/ClienteController.java index 820fdf3f3..e2f22babf 100644 --- a/src/main/java/sic/controller/ClienteController.java +++ b/src/main/java/org/opencommercial/controller/ClienteController.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import org.modelmapper.ModelMapper; @@ -6,18 +6,18 @@ import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.ForbiddenException; -import sic.modelo.Cliente; -import sic.modelo.Rol; -import sic.modelo.Ubicacion; -import sic.modelo.Usuario; -import sic.modelo.criteria.BusquedaClienteCriteria; -import sic.modelo.dto.ClienteDTO; -import sic.service.AuthService; -import sic.service.ClienteService; -import sic.service.UbicacionService; -import sic.service.UsuarioService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.ForbiddenException; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.criteria.BusquedaClienteCriteria; +import org.opencommercial.model.dto.ClienteDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.ClienteService; +import org.opencommercial.service.UbicacionService; +import org.opencommercial.service.UsuarioService; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/controller/ConfiguracionSucursalController.java b/src/main/java/org/opencommercial/controller/ConfiguracionSucursalController.java similarity index 88% rename from src/main/java/sic/controller/ConfiguracionSucursalController.java rename to src/main/java/org/opencommercial/controller/ConfiguracionSucursalController.java index 9a3bf1841..99541a27b 100644 --- a/src/main/java/sic/controller/ConfiguracionSucursalController.java +++ b/src/main/java/org/opencommercial/controller/ConfiguracionSucursalController.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -8,12 +8,12 @@ import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.ConfiguracionSucursal; -import sic.modelo.Rol; -import sic.modelo.dto.ConfiguracionSucursalDTO; -import sic.service.ConfiguracionSucursalService; -import sic.service.SucursalService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.ConfiguracionSucursal; +import org.opencommercial.model.Rol; +import org.opencommercial.model.dto.ConfiguracionSucursalDTO; +import org.opencommercial.service.ConfiguracionSucursalService; +import org.opencommercial.service.SucursalService; @RestController public class ConfiguracionSucursalController { diff --git a/src/main/java/sic/controller/CuentaCorrienteController.java b/src/main/java/org/opencommercial/controller/CuentaCorrienteController.java similarity index 91% rename from src/main/java/sic/controller/CuentaCorrienteController.java rename to src/main/java/org/opencommercial/controller/CuentaCorrienteController.java index 4835a2cfd..c1459903e 100644 --- a/src/main/java/sic/controller/CuentaCorrienteController.java +++ b/src/main/java/org/opencommercial/controller/CuentaCorrienteController.java @@ -1,6 +1,19 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.CuentaCorrienteCliente; +import org.opencommercial.model.CuentaCorrienteProveedor; +import org.opencommercial.model.RenglonCuentaCorriente; +import org.opencommercial.model.Rol; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteClienteCriteria; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteProveedorCriteria; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.ClienteService; +import org.opencommercial.service.CuentaCorrienteService; +import org.opencommercial.service.ProveedorService; +import org.opencommercial.util.FormatoReporte; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -9,19 +22,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.BusinessServiceException; -import sic.modelo.CuentaCorrienteCliente; -import sic.modelo.CuentaCorrienteProveedor; -import sic.modelo.RenglonCuentaCorriente; -import sic.modelo.Rol; -import sic.modelo.criteria.BusquedaCuentaCorrienteClienteCriteria; -import sic.modelo.criteria.BusquedaCuentaCorrienteProveedorCriteria; -import sic.service.AuthService; -import sic.service.ClienteService; -import sic.service.CuentaCorrienteService; -import sic.service.ProveedorService; -import sic.util.FormatoReporte; import java.math.BigDecimal; import java.util.Locale; diff --git a/src/main/java/sic/controller/EstadisticaController.java b/src/main/java/org/opencommercial/controller/EstadisticaController.java similarity index 93% rename from src/main/java/sic/controller/EstadisticaController.java rename to src/main/java/org/opencommercial/controller/EstadisticaController.java index 57140391f..3f8a2b5fe 100644 --- a/src/main/java/sic/controller/EstadisticaController.java +++ b/src/main/java/org/opencommercial/controller/EstadisticaController.java @@ -1,12 +1,12 @@ -package sic.controller; +package org.opencommercial.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Rol; -import sic.modelo.dto.EntidadMontoDTO; -import sic.modelo.dto.PeriodoMontoDTO; -import sic.service.EstadisticaService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Rol; +import org.opencommercial.model.dto.EntidadMontoDTO; +import org.opencommercial.model.dto.PeriodoMontoDTO; +import org.opencommercial.service.EstadisticaService; import java.util.List; @RestController diff --git a/src/main/java/sic/controller/ExceptionControllerAdvice.java b/src/main/java/org/opencommercial/controller/ExceptionControllerAdvice.java similarity index 93% rename from src/main/java/sic/controller/ExceptionControllerAdvice.java rename to src/main/java/org/opencommercial/controller/ExceptionControllerAdvice.java index c7cc5a903..2c492d506 100644 --- a/src/main/java/sic/controller/ExceptionControllerAdvice.java +++ b/src/main/java/org/opencommercial/controller/ExceptionControllerAdvice.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import java.time.LocalDateTime; import java.time.ZoneId; @@ -13,9 +13,9 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseStatus; -import sic.exception.ForbiddenException; -import sic.exception.UnauthorizedException; -import sic.exception.ServiceException; +import org.opencommercial.exception.ForbiddenException; +import org.opencommercial.exception.UnauthorizedException; +import org.opencommercial.exception.ServiceException; @RestControllerAdvice @Slf4j diff --git a/src/main/java/sic/controller/FacturaCompraController.java b/src/main/java/org/opencommercial/controller/FacturaCompraController.java similarity index 94% rename from src/main/java/sic/controller/FacturaCompraController.java rename to src/main/java/org/opencommercial/controller/FacturaCompraController.java index 045919b97..2162787f4 100644 --- a/src/main/java/sic/controller/FacturaCompraController.java +++ b/src/main/java/org/opencommercial/controller/FacturaCompraController.java @@ -1,15 +1,15 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaCompraCriteria; +import org.opencommercial.model.dto.NuevaFacturaCompraDTO; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaCompraCriteria; -import sic.modelo.dto.NuevaFacturaCompraDTO; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.service.*; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/controller/FacturaController.java b/src/main/java/org/opencommercial/controller/FacturaController.java similarity index 88% rename from src/main/java/sic/controller/FacturaController.java rename to src/main/java/org/opencommercial/controller/FacturaController.java index 97a77837a..c6be1c1a0 100644 --- a/src/main/java/sic/controller/FacturaController.java +++ b/src/main/java/org/opencommercial/controller/FacturaController.java @@ -1,14 +1,15 @@ -package sic.controller; +package org.opencommercial.controller; -import java.math.BigDecimal; -import java.util.*; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; +import org.opencommercial.service.FacturaService; +import org.opencommercial.service.SucursalService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.*; -import sic.modelo.Resultados; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.service.*; + +import java.math.BigDecimal; +import java.util.List; @RestController public class FacturaController { diff --git a/src/main/java/sic/controller/FacturaVentaController.java b/src/main/java/org/opencommercial/controller/FacturaVentaController.java similarity index 93% rename from src/main/java/sic/controller/FacturaVentaController.java rename to src/main/java/org/opencommercial/controller/FacturaVentaController.java index fe15282e9..184711eb5 100644 --- a/src/main/java/sic/controller/FacturaVentaController.java +++ b/src/main/java/org/opencommercial/controller/FacturaVentaController.java @@ -1,6 +1,16 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaVentaCriteria; +import org.opencommercial.model.dto.NuevaFacturaVentaDTO; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.FacturaService; +import org.opencommercial.service.FacturaVentaService; +import org.opencommercial.service.ReciboService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -9,16 +19,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaVentaCriteria; -import sic.modelo.dto.NuevaFacturaVentaDTO; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.service.AuthService; -import sic.service.FacturaService; -import sic.service.FacturaVentaService; -import sic.service.ReciboService; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/src/main/java/sic/controller/FormaDePagoController.java b/src/main/java/org/opencommercial/controller/FormaDePagoController.java similarity index 86% rename from src/main/java/sic/controller/FormaDePagoController.java rename to src/main/java/org/opencommercial/controller/FormaDePagoController.java index c5c0760e3..c8019c2c5 100644 --- a/src/main/java/sic/controller/FormaDePagoController.java +++ b/src/main/java/org/opencommercial/controller/FormaDePagoController.java @@ -1,14 +1,14 @@ -package sic.controller; +package org.opencommercial.controller; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.FormaDePago; +import org.opencommercial.model.Rol; +import org.opencommercial.service.FormaDePagoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RestController; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.FormaDePago; -import sic.modelo.Rol; -import sic.service.FormaDePagoService; import java.util.List; diff --git a/src/main/java/sic/controller/GastoController.java b/src/main/java/org/opencommercial/controller/GastoController.java similarity index 90% rename from src/main/java/sic/controller/GastoController.java rename to src/main/java/org/opencommercial/controller/GastoController.java index 03a57c20c..c436a9e06 100644 --- a/src/main/java/sic/controller/GastoController.java +++ b/src/main/java/org/opencommercial/controller/GastoController.java @@ -1,15 +1,15 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Gasto; +import org.opencommercial.model.Rol; +import org.opencommercial.model.criteria.BusquedaGastoCriteria; +import org.opencommercial.model.dto.NuevoGastoDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Gasto; -import sic.modelo.Rol; -import sic.modelo.criteria.BusquedaGastoCriteria; -import sic.modelo.dto.NuevoGastoDTO; -import sic.service.*; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/controller/MedidaController.java b/src/main/java/org/opencommercial/controller/MedidaController.java similarity index 87% rename from src/main/java/sic/controller/MedidaController.java rename to src/main/java/org/opencommercial/controller/MedidaController.java index 3bfc576bf..ba0ab690c 100644 --- a/src/main/java/sic/controller/MedidaController.java +++ b/src/main/java/org/opencommercial/controller/MedidaController.java @@ -1,14 +1,14 @@ -package sic.controller; +package org.opencommercial.controller; import java.util.List; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Medida; -import sic.modelo.Rol; -import sic.modelo.dto.MedidaDTO; -import sic.service.MedidaService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Medida; +import org.opencommercial.model.Rol; +import org.opencommercial.model.dto.MedidaDTO; +import org.opencommercial.service.MedidaService; @RestController public class MedidaController { diff --git a/src/main/java/sic/controller/NotaController.java b/src/main/java/org/opencommercial/controller/NotaController.java similarity index 96% rename from src/main/java/sic/controller/NotaController.java rename to src/main/java/org/opencommercial/controller/NotaController.java index 724f1c02c..ecf2ffa01 100644 --- a/src/main/java/sic/controller/NotaController.java +++ b/src/main/java/org/opencommercial/controller/NotaController.java @@ -1,6 +1,14 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaNotaCriteria; +import org.opencommercial.model.dto.NuevaNotaCreditoDeFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaCreditoSinFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoDeReciboDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoSinReciboDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; @@ -8,14 +16,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaNotaCriteria; -import sic.modelo.dto.NuevaNotaCreditoDeFacturaDTO; -import sic.modelo.dto.NuevaNotaCreditoSinFacturaDTO; -import sic.modelo.dto.NuevaNotaDebitoDeReciboDTO; -import sic.modelo.dto.NuevaNotaDebitoSinReciboDTO; -import sic.service.*; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/controller/PagoController.java b/src/main/java/org/opencommercial/controller/PagoController.java similarity index 87% rename from src/main/java/sic/controller/PagoController.java rename to src/main/java/org/opencommercial/controller/PagoController.java index 0de949018..e225d3924 100644 --- a/src/main/java/sic/controller/PagoController.java +++ b/src/main/java/org/opencommercial/controller/PagoController.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import jakarta.servlet.http.HttpServletRequest; @@ -7,10 +7,10 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import sic.modelo.dto.MercadoPagoPreferenceDTO; -import sic.modelo.dto.NuevaOrdenDePagoDTO; -import sic.service.AuthService; -import sic.service.PaymentService; +import org.opencommercial.model.dto.MercadoPagoPreferenceDTO; +import org.opencommercial.model.dto.NuevaOrdenDePagoDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.PaymentService; @RestController public class PagoController { diff --git a/src/main/java/sic/controller/PedidoController.java b/src/main/java/org/opencommercial/controller/PedidoController.java similarity index 94% rename from src/main/java/sic/controller/PedidoController.java rename to src/main/java/org/opencommercial/controller/PedidoController.java index 596bcc50f..12d360a28 100644 --- a/src/main/java/sic/controller/PedidoController.java +++ b/src/main/java/org/opencommercial/controller/PedidoController.java @@ -1,6 +1,13 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaPedidoCriteria; +import org.opencommercial.model.dto.NuevoRenglonPedidoDTO; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; +import org.opencommercial.model.dto.PedidoDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; @@ -8,13 +15,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaPedidoCriteria; -import sic.modelo.dto.NuevoRenglonPedidoDTO; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.modelo.dto.PedidoDTO; -import sic.service.*; import java.time.LocalDateTime; import java.util.ArrayList; diff --git a/src/main/java/sic/controller/ProductoController.java b/src/main/java/org/opencommercial/controller/ProductoController.java similarity index 97% rename from src/main/java/sic/controller/ProductoController.java rename to src/main/java/org/opencommercial/controller/ProductoController.java index 24dffe0c9..2e0936b3e 100644 --- a/src/main/java/sic/controller/ProductoController.java +++ b/src/main/java/org/opencommercial/controller/ProductoController.java @@ -1,19 +1,19 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import jakarta.persistence.EntityNotFoundException; import org.modelmapper.ModelMapper; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaProductoCriteria; +import org.opencommercial.model.dto.*; +import org.opencommercial.service.*; +import org.opencommercial.util.FormatoReporte; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaProductoCriteria; -import sic.modelo.dto.*; -import sic.service.*; -import sic.util.FormatoReporte; import java.math.BigDecimal; import java.util.HashSet; diff --git a/src/main/java/sic/controller/ProveedorController.java b/src/main/java/org/opencommercial/controller/ProveedorController.java similarity index 89% rename from src/main/java/sic/controller/ProveedorController.java rename to src/main/java/org/opencommercial/controller/ProveedorController.java index 762b07eaf..3625eb3f4 100644 --- a/src/main/java/sic/controller/ProveedorController.java +++ b/src/main/java/org/opencommercial/controller/ProveedorController.java @@ -1,17 +1,17 @@ -package sic.controller; +package org.opencommercial.controller; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Proveedor; -import sic.modelo.Rol; -import sic.modelo.Ubicacion; -import sic.modelo.criteria.BusquedaProveedorCriteria; -import sic.modelo.dto.ProveedorDTO; -import sic.service.ProveedorService; -import sic.service.UbicacionService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Proveedor; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.criteria.BusquedaProveedorCriteria; +import org.opencommercial.model.dto.ProveedorDTO; +import org.opencommercial.service.ProveedorService; +import org.opencommercial.service.UbicacionService; import java.util.List; diff --git a/src/main/java/sic/controller/ReciboController.java b/src/main/java/org/opencommercial/controller/ReciboController.java similarity index 93% rename from src/main/java/sic/controller/ReciboController.java rename to src/main/java/org/opencommercial/controller/ReciboController.java index 1ad6a816d..54358c374 100644 --- a/src/main/java/sic/controller/ReciboController.java +++ b/src/main/java/org/opencommercial/controller/ReciboController.java @@ -1,7 +1,13 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import org.modelmapper.ModelMapper; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Recibo; +import org.opencommercial.model.Rol; +import org.opencommercial.model.criteria.BusquedaReciboCriteria; +import org.opencommercial.model.dto.ReciboDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; @@ -9,12 +15,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Recibo; -import sic.modelo.Rol; -import sic.modelo.criteria.BusquedaReciboCriteria; -import sic.modelo.dto.ReciboDTO; -import sic.service.*; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/controller/RemitoController.java b/src/main/java/org/opencommercial/controller/RemitoController.java similarity index 86% rename from src/main/java/sic/controller/RemitoController.java rename to src/main/java/org/opencommercial/controller/RemitoController.java index b6f8f9cf7..63331edef 100644 --- a/src/main/java/sic/controller/RemitoController.java +++ b/src/main/java/org/opencommercial/controller/RemitoController.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import org.springframework.beans.factory.annotation.Autowired; @@ -8,14 +8,14 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Remito; -import sic.modelo.RenglonRemito; -import sic.modelo.Rol; -import sic.modelo.criteria.BusquedaRemitoCriteria; -import sic.modelo.dto.NuevoRemitoDTO; -import sic.service.AuthService; -import sic.service.RemitoService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Remito; +import org.opencommercial.model.RenglonRemito; +import org.opencommercial.model.Rol; +import org.opencommercial.model.criteria.BusquedaRemitoCriteria; +import org.opencommercial.model.dto.NuevoRemitoDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.RemitoService; import java.util.List; diff --git a/src/main/java/sic/controller/RubroController.java b/src/main/java/org/opencommercial/controller/RubroController.java similarity index 86% rename from src/main/java/sic/controller/RubroController.java rename to src/main/java/org/opencommercial/controller/RubroController.java index 011376b96..42c77e342 100644 --- a/src/main/java/sic/controller/RubroController.java +++ b/src/main/java/org/opencommercial/controller/RubroController.java @@ -1,14 +1,14 @@ -package sic.controller; +package org.opencommercial.controller; import java.util.List; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Rol; -import sic.modelo.Rubro; -import sic.modelo.dto.RubroDTO; -import sic.service.RubroService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Rubro; +import org.opencommercial.model.dto.RubroDTO; +import org.opencommercial.service.RubroService; @RestController public class RubroController { diff --git a/src/main/java/sic/controller/SucursalController.java b/src/main/java/org/opencommercial/controller/SucursalController.java similarity index 87% rename from src/main/java/sic/controller/SucursalController.java rename to src/main/java/org/opencommercial/controller/SucursalController.java index c70da147a..a3aba55bd 100644 --- a/src/main/java/sic/controller/SucursalController.java +++ b/src/main/java/org/opencommercial/controller/SucursalController.java @@ -1,16 +1,16 @@ -package sic.controller; +package org.opencommercial.controller; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Rol; -import sic.modelo.Sucursal; -import sic.modelo.Ubicacion; -import sic.modelo.dto.NuevaSucursalDTO; -import sic.modelo.dto.SucursalDTO; -import sic.service.SucursalService; -import sic.service.UbicacionService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.dto.NuevaSucursalDTO; +import org.opencommercial.model.dto.SucursalDTO; +import org.opencommercial.service.SucursalService; +import org.opencommercial.service.UbicacionService; import java.util.List; diff --git a/src/main/java/sic/controller/TransportistaController.java b/src/main/java/org/opencommercial/controller/TransportistaController.java similarity index 89% rename from src/main/java/sic/controller/TransportistaController.java rename to src/main/java/org/opencommercial/controller/TransportistaController.java index e21076c68..45b539e20 100644 --- a/src/main/java/sic/controller/TransportistaController.java +++ b/src/main/java/org/opencommercial/controller/TransportistaController.java @@ -1,17 +1,17 @@ -package sic.controller; +package org.opencommercial.controller; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.modelo.Rol; -import sic.modelo.Transportista; -import sic.modelo.Ubicacion; -import sic.modelo.criteria.BusquedaTransportistaCriteria; -import sic.modelo.dto.TransportistaDTO; -import sic.service.TransportistaService; -import sic.service.UbicacionService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Transportista; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.criteria.BusquedaTransportistaCriteria; +import org.opencommercial.model.dto.TransportistaDTO; +import org.opencommercial.service.TransportistaService; +import org.opencommercial.service.UbicacionService; import java.util.List; diff --git a/src/main/java/sic/controller/TraspasoController.java b/src/main/java/org/opencommercial/controller/TraspasoController.java similarity index 87% rename from src/main/java/sic/controller/TraspasoController.java rename to src/main/java/org/opencommercial/controller/TraspasoController.java index 41295c0bf..88a64730e 100644 --- a/src/main/java/sic/controller/TraspasoController.java +++ b/src/main/java/org/opencommercial/controller/TraspasoController.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import org.springframework.beans.factory.annotation.Autowired; @@ -9,15 +9,15 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.BusinessServiceException; -import sic.modelo.RenglonTraspaso; -import sic.modelo.Rol; -import sic.modelo.Traspaso; -import sic.modelo.criteria.BusquedaTraspasoCriteria; -import sic.modelo.dto.NuevoTraspasoDTO; -import sic.service.AuthService; -import sic.service.TraspasoService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.RenglonTraspaso; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Traspaso; +import org.opencommercial.model.criteria.BusquedaTraspasoCriteria; +import org.opencommercial.model.dto.NuevoTraspasoDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.TraspasoService; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/controller/UbicacionController.java b/src/main/java/org/opencommercial/controller/UbicacionController.java similarity index 87% rename from src/main/java/sic/controller/UbicacionController.java rename to src/main/java/org/opencommercial/controller/UbicacionController.java index c2d276a6b..a1fba2692 100644 --- a/src/main/java/sic/controller/UbicacionController.java +++ b/src/main/java/org/opencommercial/controller/UbicacionController.java @@ -1,20 +1,20 @@ -package sic.controller; +package org.opencommercial.controller; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.BusinessServiceException; -import sic.modelo.Localidad; -import sic.modelo.Provincia; -import sic.modelo.Rol; -import sic.modelo.Ubicacion; -import sic.modelo.criteria.BusquedaLocalidadCriteria; -import sic.modelo.dto.LocalidadDTO; -import sic.modelo.dto.LocalidadesParaActualizarDTO; -import sic.service.UbicacionService; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Localidad; +import org.opencommercial.model.Provincia; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.criteria.BusquedaLocalidadCriteria; +import org.opencommercial.model.dto.LocalidadDTO; +import org.opencommercial.model.dto.LocalidadesParaActualizarDTO; +import org.opencommercial.service.UbicacionService; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/controller/UsuarioController.java b/src/main/java/org/opencommercial/controller/UsuarioController.java similarity index 87% rename from src/main/java/sic/controller/UsuarioController.java rename to src/main/java/org/opencommercial/controller/UsuarioController.java index ffd48b76c..95668f7c7 100644 --- a/src/main/java/sic/controller/UsuarioController.java +++ b/src/main/java/org/opencommercial/controller/UsuarioController.java @@ -1,20 +1,20 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.Claims; import org.modelmapper.ModelMapper; +import org.opencommercial.aspect.AccesoRolesPermitidos; +import org.opencommercial.exception.ForbiddenException; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.criteria.BusquedaUsuarioCriteria; +import org.opencommercial.model.dto.UsuarioDTO; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.UsuarioService; +import org.opencommercial.util.EncryptUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.*; -import sic.aspect.AccesoRolesPermitidos; -import sic.exception.ForbiddenException; -import sic.modelo.Rol; -import sic.modelo.Usuario; -import sic.modelo.criteria.BusquedaUsuarioCriteria; -import sic.modelo.dto.UsuarioDTO; -import sic.service.AuthService; -import sic.service.UsuarioService; -import sic.util.EncryptUtils; import java.util.Locale; @@ -87,8 +87,7 @@ public void actualizar(@RequestBody UsuarioDTO usuarioDTO, } usuarioService.actualizar(usuarioPorActualizar); } else { - throw new ForbiddenException(messageSource.getMessage( - "mensaje_usuario_rol_no_valido", null, Locale.getDefault())); + throw new ForbiddenException(messageSource.getMessage("mensaje_usuario_rol_no_valido", null, Locale.getDefault())); } } diff --git a/src/main/java/sic/exception/BusinessServiceException.java b/src/main/java/org/opencommercial/exception/BusinessServiceException.java similarity index 91% rename from src/main/java/sic/exception/BusinessServiceException.java rename to src/main/java/org/opencommercial/exception/BusinessServiceException.java index d3b396174..79a1b3101 100644 --- a/src/main/java/sic/exception/BusinessServiceException.java +++ b/src/main/java/org/opencommercial/exception/BusinessServiceException.java @@ -1,4 +1,4 @@ -package sic.exception; +package org.opencommercial.exception; public class BusinessServiceException extends ServiceException { diff --git a/src/main/java/sic/exception/ForbiddenException.java b/src/main/java/org/opencommercial/exception/ForbiddenException.java similarity index 90% rename from src/main/java/sic/exception/ForbiddenException.java rename to src/main/java/org/opencommercial/exception/ForbiddenException.java index c092ece66..a1759b039 100644 --- a/src/main/java/sic/exception/ForbiddenException.java +++ b/src/main/java/org/opencommercial/exception/ForbiddenException.java @@ -1,4 +1,4 @@ -package sic.exception; +package org.opencommercial.exception; public class ForbiddenException extends RuntimeException { diff --git a/src/main/java/sic/exception/ServiceException.java b/src/main/java/org/opencommercial/exception/ServiceException.java similarity index 90% rename from src/main/java/sic/exception/ServiceException.java rename to src/main/java/org/opencommercial/exception/ServiceException.java index 96eb58406..8a261c5a9 100644 --- a/src/main/java/sic/exception/ServiceException.java +++ b/src/main/java/org/opencommercial/exception/ServiceException.java @@ -1,4 +1,4 @@ -package sic.exception; +package org.opencommercial.exception; public class ServiceException extends RuntimeException { diff --git a/src/main/java/sic/exception/UnauthorizedException.java b/src/main/java/org/opencommercial/exception/UnauthorizedException.java similarity index 91% rename from src/main/java/sic/exception/UnauthorizedException.java rename to src/main/java/org/opencommercial/exception/UnauthorizedException.java index 55951da4e..89b036943 100644 --- a/src/main/java/sic/exception/UnauthorizedException.java +++ b/src/main/java/org/opencommercial/exception/UnauthorizedException.java @@ -1,4 +1,4 @@ -package sic.exception; +package org.opencommercial.exception; public class UnauthorizedException extends RuntimeException { diff --git a/src/main/java/sic/interceptor/JwtInterceptor.java b/src/main/java/org/opencommercial/interceptor/JwtInterceptor.java similarity index 87% rename from src/main/java/sic/interceptor/JwtInterceptor.java rename to src/main/java/org/opencommercial/interceptor/JwtInterceptor.java index 8c4e32e70..7375ac297 100644 --- a/src/main/java/sic/interceptor/JwtInterceptor.java +++ b/src/main/java/org/opencommercial/interceptor/JwtInterceptor.java @@ -1,13 +1,13 @@ -package sic.interceptor; +package org.opencommercial.interceptor; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.web.servlet.HandlerInterceptor; -import sic.exception.UnauthorizedException; -import sic.service.AuthService; -import sic.service.UsuarioService; +import org.opencommercial.exception.UnauthorizedException; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.UsuarioService; import java.util.Locale; diff --git a/src/main/java/sic/modelo/BlobAdapter.java b/src/main/java/org/opencommercial/model/BlobAdapter.java similarity index 92% rename from src/main/java/sic/modelo/BlobAdapter.java rename to src/main/java/org/opencommercial/model/BlobAdapter.java index e0fc26bdb..6e0541b5e 100644 --- a/src/main/java/sic/modelo/BlobAdapter.java +++ b/src/main/java/org/opencommercial/model/BlobAdapter.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.sql.Blob; import jakarta.xml.bind.annotation.adapters.XmlAdapter; diff --git a/src/main/java/sic/modelo/Caja.java b/src/main/java/org/opencommercial/model/Caja.java similarity index 97% rename from src/main/java/sic/modelo/Caja.java rename to src/main/java/org/opencommercial/model/Caja.java index a1f945b2c..8cfc7273d 100644 --- a/src/main/java/sic/modelo/Caja.java +++ b/src/main/java/org/opencommercial/model/Caja.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -6,7 +6,7 @@ import jakarta.persistence.*; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/CantidadEnSucursal.java b/src/main/java/org/opencommercial/model/CantidadEnSucursal.java similarity index 94% rename from src/main/java/sic/modelo/CantidadEnSucursal.java rename to src/main/java/org/opencommercial/model/CantidadEnSucursal.java index 5b1630c7d..f83479354 100644 --- a/src/main/java/sic/modelo/CantidadEnSucursal.java +++ b/src/main/java/org/opencommercial/model/CantidadEnSucursal.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -7,7 +7,7 @@ import jakarta.validation.constraints.DecimalMin; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/CategoriaIVA.java b/src/main/java/org/opencommercial/model/CategoriaIVA.java similarity index 92% rename from src/main/java/sic/modelo/CategoriaIVA.java rename to src/main/java/org/opencommercial/model/CategoriaIVA.java index ff2f83abc..81372141c 100644 --- a/src/main/java/sic/modelo/CategoriaIVA.java +++ b/src/main/java/org/opencommercial/model/CategoriaIVA.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum CategoriaIVA { RESPONSABLE_INSCRIPTO, diff --git a/src/main/java/sic/modelo/Cliente.java b/src/main/java/org/opencommercial/model/Cliente.java similarity index 98% rename from src/main/java/sic/modelo/Cliente.java rename to src/main/java/org/opencommercial/model/Cliente.java index 3378d5fe0..16542db22 100644 --- a/src/main/java/sic/modelo/Cliente.java +++ b/src/main/java/org/opencommercial/model/Cliente.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -10,7 +10,7 @@ import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/ComprobanteAutorizable.java b/src/main/java/org/opencommercial/model/ComprobanteAutorizable.java similarity index 81% rename from src/main/java/sic/modelo/ComprobanteAutorizable.java rename to src/main/java/org/opencommercial/model/ComprobanteAutorizable.java index 215de819e..dc7e87527 100644 --- a/src/main/java/sic/modelo/ComprobanteAutorizable.java +++ b/src/main/java/org/opencommercial/model/ComprobanteAutorizable.java @@ -1,8 +1,9 @@ -package sic.modelo; +package org.opencommercial.model; import lombok.Data; import lombok.experimental.SuperBuilder; -import sic.modelo.embeddable.ClienteEmbeddable; +import org.opencommercial.model.embeddable.ClienteEmbeddable; + import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/modelo/ComprobanteAutorizableAFIP.java b/src/main/java/org/opencommercial/model/ComprobanteAutorizableAFIP.java similarity index 93% rename from src/main/java/sic/modelo/ComprobanteAutorizableAFIP.java rename to src/main/java/org/opencommercial/model/ComprobanteAutorizableAFIP.java index 2341c60ef..2b2fdd9fc 100644 --- a/src/main/java/sic/modelo/ComprobanteAutorizableAFIP.java +++ b/src/main/java/org/opencommercial/model/ComprobanteAutorizableAFIP.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.math.BigDecimal; import java.time.LocalDate; diff --git a/src/main/java/sic/modelo/ConfiguracionSucursal.java b/src/main/java/org/opencommercial/model/ConfiguracionSucursal.java similarity index 96% rename from src/main/java/sic/modelo/ConfiguracionSucursal.java rename to src/main/java/org/opencommercial/model/ConfiguracionSucursal.java index 54ab83250..487321b77 100644 --- a/src/main/java/sic/modelo/ConfiguracionSucursal.java +++ b/src/main/java/org/opencommercial/model/ConfiguracionSucursal.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -15,7 +15,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; @Entity @Table(name = "configuracionsucursal") diff --git a/src/main/java/sic/modelo/Credencial.java b/src/main/java/org/opencommercial/model/Credencial.java similarity index 86% rename from src/main/java/sic/modelo/Credencial.java rename to src/main/java/org/opencommercial/model/Credencial.java index a3a339945..56a9931de 100644 --- a/src/main/java/sic/modelo/Credencial.java +++ b/src/main/java/org/opencommercial/model/Credencial.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/src/main/java/sic/modelo/CuentaCorriente.java b/src/main/java/org/opencommercial/model/CuentaCorriente.java similarity index 97% rename from src/main/java/sic/modelo/CuentaCorriente.java rename to src/main/java/org/opencommercial/model/CuentaCorriente.java index 03ac63f4e..6e2fc5851 100644 --- a/src/main/java/sic/modelo/CuentaCorriente.java +++ b/src/main/java/org/opencommercial/model/CuentaCorriente.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.*; import jakarta.persistence.*; diff --git a/src/main/java/sic/modelo/CuentaCorrienteCliente.java b/src/main/java/org/opencommercial/model/CuentaCorrienteCliente.java similarity index 95% rename from src/main/java/sic/modelo/CuentaCorrienteCliente.java rename to src/main/java/org/opencommercial/model/CuentaCorrienteCliente.java index 4fb37492b..67798a351 100644 --- a/src/main/java/sic/modelo/CuentaCorrienteCliente.java +++ b/src/main/java/org/opencommercial/model/CuentaCorrienteCliente.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonView; import com.querydsl.core.annotations.QueryInit; @@ -10,7 +10,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/CuentaCorrienteProveedor.java b/src/main/java/org/opencommercial/model/CuentaCorrienteProveedor.java similarity index 94% rename from src/main/java/sic/modelo/CuentaCorrienteProveedor.java rename to src/main/java/org/opencommercial/model/CuentaCorrienteProveedor.java index 5e2fa2f04..03c8e7b64 100644 --- a/src/main/java/sic/modelo/CuentaCorrienteProveedor.java +++ b/src/main/java/org/opencommercial/model/CuentaCorrienteProveedor.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonView; import com.querydsl.core.annotations.QueryInit; @@ -10,7 +10,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/EstadoCaja.java b/src/main/java/org/opencommercial/model/EstadoCaja.java similarity index 59% rename from src/main/java/sic/modelo/EstadoCaja.java rename to src/main/java/org/opencommercial/model/EstadoCaja.java index 030d58e65..475e955c6 100644 --- a/src/main/java/sic/modelo/EstadoCaja.java +++ b/src/main/java/org/opencommercial/model/EstadoCaja.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum EstadoCaja { ABIERTA, diff --git a/src/main/java/sic/modelo/EstadoPedido.java b/src/main/java/org/opencommercial/model/EstadoPedido.java similarity index 65% rename from src/main/java/sic/modelo/EstadoPedido.java rename to src/main/java/org/opencommercial/model/EstadoPedido.java index b67520b09..cf98d604c 100644 --- a/src/main/java/sic/modelo/EstadoPedido.java +++ b/src/main/java/org/opencommercial/model/EstadoPedido.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum EstadoPedido { ABIERTO, diff --git a/src/main/java/sic/modelo/Factura.java b/src/main/java/org/opencommercial/model/Factura.java similarity index 99% rename from src/main/java/sic/modelo/Factura.java rename to src/main/java/org/opencommercial/model/Factura.java index 01b4a6127..caf526d81 100644 --- a/src/main/java/sic/modelo/Factura.java +++ b/src/main/java/org/opencommercial/model/Factura.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.JsonProperty.Access; diff --git a/src/main/java/sic/modelo/FacturaCompra.java b/src/main/java/org/opencommercial/model/FacturaCompra.java similarity index 97% rename from src/main/java/sic/modelo/FacturaCompra.java rename to src/main/java/org/opencommercial/model/FacturaCompra.java index af7d98082..cba9dbed0 100644 --- a/src/main/java/sic/modelo/FacturaCompra.java +++ b/src/main/java/org/opencommercial/model/FacturaCompra.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -11,7 +11,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/FacturaVenta.java b/src/main/java/org/opencommercial/model/FacturaVenta.java similarity index 97% rename from src/main/java/sic/modelo/FacturaVenta.java rename to src/main/java/org/opencommercial/model/FacturaVenta.java index e03a35829..feba313be 100644 --- a/src/main/java/sic/modelo/FacturaVenta.java +++ b/src/main/java/org/opencommercial/model/FacturaVenta.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -8,8 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import sic.config.Views; -import sic.modelo.embeddable.ClienteEmbeddable; +import org.opencommercial.config.Views; +import org.opencommercial.model.embeddable.ClienteEmbeddable; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/FormaDePago.java b/src/main/java/org/opencommercial/model/FormaDePago.java similarity index 91% rename from src/main/java/sic/modelo/FormaDePago.java rename to src/main/java/org/opencommercial/model/FormaDePago.java index f3a8d2061..455c1215a 100644 --- a/src/main/java/sic/modelo/FormaDePago.java +++ b/src/main/java/org/opencommercial/model/FormaDePago.java @@ -1,11 +1,11 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonView; import jakarta.persistence.*; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; diff --git a/src/main/java/sic/modelo/FormaDePagoEnum.java b/src/main/java/org/opencommercial/model/FormaDePagoEnum.java similarity index 95% rename from src/main/java/sic/modelo/FormaDePagoEnum.java rename to src/main/java/org/opencommercial/model/FormaDePagoEnum.java index de0747b79..d1b77fdf3 100644 --- a/src/main/java/sic/modelo/FormaDePagoEnum.java +++ b/src/main/java/org/opencommercial/model/FormaDePagoEnum.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum FormaDePagoEnum { CONTRAREEMBOLSO("Contrareembolso"), diff --git a/src/main/java/sic/modelo/Gasto.java b/src/main/java/org/opencommercial/model/Gasto.java similarity index 97% rename from src/main/java/sic/modelo/Gasto.java rename to src/main/java/org/opencommercial/model/Gasto.java index 3b13ac5fe..cdf3d7cd1 100644 --- a/src/main/java/sic/modelo/Gasto.java +++ b/src/main/java/org/opencommercial/model/Gasto.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -9,7 +9,7 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/ItemCarritoCompra.java b/src/main/java/org/opencommercial/model/ItemCarritoCompra.java similarity index 92% rename from src/main/java/sic/modelo/ItemCarritoCompra.java rename to src/main/java/org/opencommercial/model/ItemCarritoCompra.java index 1fb4f9fa5..2da3afd96 100644 --- a/src/main/java/sic/modelo/ItemCarritoCompra.java +++ b/src/main/java/org/opencommercial/model/ItemCarritoCompra.java @@ -1,10 +1,10 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonView; import jakarta.persistence.*; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Localidad.java b/src/main/java/org/opencommercial/model/Localidad.java similarity index 94% rename from src/main/java/sic/modelo/Localidad.java rename to src/main/java/org/opencommercial/model/Localidad.java index 4264c8475..90967aeca 100644 --- a/src/main/java/sic/modelo/Localidad.java +++ b/src/main/java/org/opencommercial/model/Localidad.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -6,7 +6,7 @@ import jakarta.persistence.*; import jakarta.validation.constraints.DecimalMin; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Medida.java b/src/main/java/org/opencommercial/model/Medida.java similarity index 92% rename from src/main/java/sic/modelo/Medida.java rename to src/main/java/org/opencommercial/model/Medida.java index 6d8687a6b..e6da50528 100644 --- a/src/main/java/sic/modelo/Medida.java +++ b/src/main/java/org/opencommercial/model/Medida.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import jakarta.validation.constraints.NotNull; @@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.validation.constraints.NotEmpty; diff --git a/src/main/java/sic/modelo/Movimiento.java b/src/main/java/org/opencommercial/model/Movimiento.java similarity index 66% rename from src/main/java/sic/modelo/Movimiento.java rename to src/main/java/org/opencommercial/model/Movimiento.java index 739020df3..b813841b9 100644 --- a/src/main/java/sic/modelo/Movimiento.java +++ b/src/main/java/org/opencommercial/model/Movimiento.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum Movimiento { COMPRA, diff --git a/src/main/java/sic/modelo/MovimientoCaja.java b/src/main/java/org/opencommercial/model/MovimientoCaja.java similarity index 95% rename from src/main/java/sic/modelo/MovimientoCaja.java rename to src/main/java/org/opencommercial/model/MovimientoCaja.java index 97d211f85..011aa098a 100644 --- a/src/main/java/sic/modelo/MovimientoCaja.java +++ b/src/main/java/org/opencommercial/model/MovimientoCaja.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -8,7 +8,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; @Data @AllArgsConstructor diff --git a/src/main/java/sic/modelo/Nota.java b/src/main/java/org/opencommercial/model/Nota.java similarity index 99% rename from src/main/java/sic/modelo/Nota.java rename to src/main/java/org/opencommercial/model/Nota.java index ffd6e569b..15f323a3c 100644 --- a/src/main/java/sic/modelo/Nota.java +++ b/src/main/java/org/opencommercial/model/Nota.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.*; import jakarta.persistence.*; diff --git a/src/main/java/sic/modelo/NotaCredito.java b/src/main/java/org/opencommercial/model/NotaCredito.java similarity index 98% rename from src/main/java/sic/modelo/NotaCredito.java rename to src/main/java/org/opencommercial/model/NotaCredito.java index c2741332f..2f5caa754 100644 --- a/src/main/java/sic/modelo/NotaCredito.java +++ b/src/main/java/org/opencommercial/model/NotaCredito.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; @@ -18,7 +18,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; @Entity @Table(name = "notacredito") diff --git a/src/main/java/sic/modelo/NotaDebito.java b/src/main/java/org/opencommercial/model/NotaDebito.java similarity index 97% rename from src/main/java/sic/modelo/NotaDebito.java rename to src/main/java/org/opencommercial/model/NotaDebito.java index c38c694b6..4a00e7ec1 100644 --- a/src/main/java/sic/modelo/NotaDebito.java +++ b/src/main/java/org/opencommercial/model/NotaDebito.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonView; @@ -6,7 +6,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Pedido.java b/src/main/java/org/opencommercial/model/Pedido.java similarity index 97% rename from src/main/java/sic/modelo/Pedido.java rename to src/main/java/org/opencommercial/model/Pedido.java index 051afa9e5..7e689d259 100644 --- a/src/main/java/sic/modelo/Pedido.java +++ b/src/main/java/org/opencommercial/model/Pedido.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.JsonProperty.Access; @@ -8,8 +8,8 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; -import sic.modelo.dto.UbicacionDTO; +import org.opencommercial.config.Views; +import org.opencommercial.model.dto.UbicacionDTO; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Producto.java b/src/main/java/org/opencommercial/model/Producto.java similarity index 94% rename from src/main/java/sic/modelo/Producto.java rename to src/main/java/org/opencommercial/model/Producto.java index 25979f122..17d00d28f 100644 --- a/src/main/java/sic/modelo/Producto.java +++ b/src/main/java/org/opencommercial/model/Producto.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -10,9 +10,9 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import org.hibernate.validator.constraints.Length; -import sic.config.Views; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.config.Views; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; import java.io.Serializable; import java.time.LocalDate; diff --git a/src/main/java/sic/modelo/ProductoFavorito.java b/src/main/java/org/opencommercial/model/ProductoFavorito.java similarity index 95% rename from src/main/java/sic/modelo/ProductoFavorito.java rename to src/main/java/org/opencommercial/model/ProductoFavorito.java index 794746423..fc21b95c4 100644 --- a/src/main/java/sic/modelo/ProductoFavorito.java +++ b/src/main/java/org/opencommercial/model/ProductoFavorito.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import jakarta.persistence.*; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/sic/modelo/Proveedor.java b/src/main/java/org/opencommercial/model/Proveedor.java similarity index 95% rename from src/main/java/sic/modelo/Proveedor.java rename to src/main/java/org/opencommercial/model/Proveedor.java index 64d80be4f..225f19089 100644 --- a/src/main/java/sic/modelo/Proveedor.java +++ b/src/main/java/org/opencommercial/model/Proveedor.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonView; @@ -8,7 +8,7 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; diff --git a/src/main/java/sic/modelo/Provincia.java b/src/main/java/org/opencommercial/model/Provincia.java similarity index 89% rename from src/main/java/sic/modelo/Provincia.java rename to src/main/java/org/opencommercial/model/Provincia.java index 901c37d8e..e73a55093 100644 --- a/src/main/java/sic/modelo/Provincia.java +++ b/src/main/java/org/opencommercial/model/Provincia.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import jakarta.persistence.*; @@ -9,7 +9,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; @Entity @Table(name = "provincia") diff --git a/src/main/java/sic/modelo/ReCaptchaResponse.java b/src/main/java/org/opencommercial/model/ReCaptchaResponse.java similarity index 81% rename from src/main/java/sic/modelo/ReCaptchaResponse.java rename to src/main/java/org/opencommercial/model/ReCaptchaResponse.java index c95326c88..00347059b 100644 --- a/src/main/java/sic/modelo/ReCaptchaResponse.java +++ b/src/main/java/org/opencommercial/model/ReCaptchaResponse.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import lombok.Data; diff --git a/src/main/java/sic/modelo/Recibo.java b/src/main/java/org/opencommercial/model/Recibo.java similarity index 97% rename from src/main/java/sic/modelo/Recibo.java rename to src/main/java/org/opencommercial/model/Recibo.java index 533a0d0a1..3580c626d 100644 --- a/src/main/java/sic/modelo/Recibo.java +++ b/src/main/java/org/opencommercial/model/Recibo.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -9,7 +9,7 @@ import jakarta.validation.constraints.PastOrPresent; import jakarta.validation.constraints.Positive; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Remito.java b/src/main/java/org/opencommercial/model/Remito.java similarity index 95% rename from src/main/java/sic/modelo/Remito.java rename to src/main/java/org/opencommercial/model/Remito.java index 611094e8c..c842b2a28 100644 --- a/src/main/java/sic/modelo/Remito.java +++ b/src/main/java/org/opencommercial/model/Remito.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -11,9 +11,9 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; -import sic.modelo.dto.UbicacionDTO; -import sic.modelo.embeddable.ClienteEmbeddable; +import org.opencommercial.config.Views; +import org.opencommercial.model.dto.UbicacionDTO; +import org.opencommercial.model.embeddable.ClienteEmbeddable; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/RenglonCuentaCorriente.java b/src/main/java/org/opencommercial/model/RenglonCuentaCorriente.java similarity index 97% rename from src/main/java/sic/modelo/RenglonCuentaCorriente.java rename to src/main/java/org/opencommercial/model/RenglonCuentaCorriente.java index 9b8480a6b..80b5f2c42 100644 --- a/src/main/java/sic/modelo/RenglonCuentaCorriente.java +++ b/src/main/java/org/opencommercial/model/RenglonCuentaCorriente.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonProperty; @@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import org.hibernate.annotations.Formula; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/RenglonFactura.java b/src/main/java/org/opencommercial/model/RenglonFactura.java similarity index 97% rename from src/main/java/sic/modelo/RenglonFactura.java rename to src/main/java/org/opencommercial/model/RenglonFactura.java index 483e57be2..a62d3f1ec 100644 --- a/src/main/java/sic/modelo/RenglonFactura.java +++ b/src/main/java/org/opencommercial/model/RenglonFactura.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import java.math.BigDecimal; @@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; @Entity @Table(name = "renglonfactura") diff --git a/src/main/java/sic/modelo/RenglonNotaCredito.java b/src/main/java/org/opencommercial/model/RenglonNotaCredito.java similarity index 97% rename from src/main/java/sic/modelo/RenglonNotaCredito.java rename to src/main/java/org/opencommercial/model/RenglonNotaCredito.java index dde6536ce..45710141b 100644 --- a/src/main/java/sic/modelo/RenglonNotaCredito.java +++ b/src/main/java/org/opencommercial/model/RenglonNotaCredito.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import java.math.BigDecimal; @@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.Positive; diff --git a/src/main/java/sic/modelo/RenglonNotaDebito.java b/src/main/java/org/opencommercial/model/RenglonNotaDebito.java similarity index 95% rename from src/main/java/sic/modelo/RenglonNotaDebito.java rename to src/main/java/org/opencommercial/model/RenglonNotaDebito.java index 20d013d7e..25ca7696c 100644 --- a/src/main/java/sic/modelo/RenglonNotaDebito.java +++ b/src/main/java/org/opencommercial/model/RenglonNotaDebito.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import java.math.BigDecimal; @@ -11,7 +11,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.validation.constraints.NotEmpty; diff --git a/src/main/java/sic/modelo/RenglonPedido.java b/src/main/java/org/opencommercial/model/RenglonPedido.java similarity index 96% rename from src/main/java/sic/modelo/RenglonPedido.java rename to src/main/java/org/opencommercial/model/RenglonPedido.java index 3e4731c99..afec2df2b 100644 --- a/src/main/java/sic/modelo/RenglonPedido.java +++ b/src/main/java/org/opencommercial/model/RenglonPedido.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import java.math.BigDecimal; @@ -12,7 +12,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; @Entity @Table(name = "renglonpedido") diff --git a/src/main/java/sic/modelo/RenglonRemito.java b/src/main/java/org/opencommercial/model/RenglonRemito.java similarity index 91% rename from src/main/java/sic/modelo/RenglonRemito.java rename to src/main/java/org/opencommercial/model/RenglonRemito.java index 5f0345c65..849221356 100644 --- a/src/main/java/sic/modelo/RenglonRemito.java +++ b/src/main/java/org/opencommercial/model/RenglonRemito.java @@ -1,10 +1,10 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.persistence.*; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/sic/modelo/RenglonTraspaso.java b/src/main/java/org/opencommercial/model/RenglonTraspaso.java similarity index 93% rename from src/main/java/sic/modelo/RenglonTraspaso.java rename to src/main/java/org/opencommercial/model/RenglonTraspaso.java index 2518db763..d1e15db82 100644 --- a/src/main/java/sic/modelo/RenglonTraspaso.java +++ b/src/main/java/org/opencommercial/model/RenglonTraspaso.java @@ -1,10 +1,10 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.persistence.*; import jakarta.validation.constraints.NotEmpty; diff --git a/src/main/java/sic/modelo/Resultados.java b/src/main/java/org/opencommercial/model/Resultados.java similarity index 89% rename from src/main/java/sic/modelo/Resultados.java rename to src/main/java/org/opencommercial/model/Resultados.java index 64b2b5c74..acf20c6af 100644 --- a/src/main/java/sic/modelo/Resultados.java +++ b/src/main/java/org/opencommercial/model/Resultados.java @@ -1,11 +1,11 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Rol.java b/src/main/java/org/opencommercial/model/Rol.java similarity index 71% rename from src/main/java/sic/modelo/Rol.java rename to src/main/java/org/opencommercial/model/Rol.java index 482a91c5b..4bf5a78d1 100644 --- a/src/main/java/sic/modelo/Rol.java +++ b/src/main/java/org/opencommercial/model/Rol.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum Rol { ADMINISTRADOR, diff --git a/src/main/java/sic/modelo/Rubro.java b/src/main/java/org/opencommercial/model/Rubro.java similarity index 93% rename from src/main/java/sic/modelo/Rubro.java rename to src/main/java/org/opencommercial/model/Rubro.java index f34952852..613ee01f3 100644 --- a/src/main/java/sic/modelo/Rubro.java +++ b/src/main/java/org/opencommercial/model/Rubro.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.io.Serializable; import jakarta.persistence.*; @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; import lombok.ToString; import org.hibernate.validator.constraints.Length; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.validation.constraints.NotEmpty; diff --git a/src/main/java/sic/modelo/SortingProducto.java b/src/main/java/org/opencommercial/model/SortingProducto.java similarity index 96% rename from src/main/java/sic/modelo/SortingProducto.java rename to src/main/java/org/opencommercial/model/SortingProducto.java index c2aa21cb0..6790ff99a 100644 --- a/src/main/java/sic/modelo/SortingProducto.java +++ b/src/main/java/org/opencommercial/model/SortingProducto.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import java.util.Optional; diff --git a/src/main/java/sic/modelo/Sucursal.java b/src/main/java/org/opencommercial/model/Sucursal.java similarity index 97% rename from src/main/java/sic/modelo/Sucursal.java rename to src/main/java/org/opencommercial/model/Sucursal.java index e4ba84d12..a4e19dcb3 100644 --- a/src/main/java/sic/modelo/Sucursal.java +++ b/src/main/java/org/opencommercial/model/Sucursal.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -10,7 +10,7 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.time.LocalDateTime; diff --git a/src/main/java/sic/modelo/TipoBulto.java b/src/main/java/org/opencommercial/model/TipoBulto.java similarity index 74% rename from src/main/java/sic/modelo/TipoBulto.java rename to src/main/java/org/opencommercial/model/TipoBulto.java index 11a184ef2..4446aab2f 100644 --- a/src/main/java/sic/modelo/TipoBulto.java +++ b/src/main/java/org/opencommercial/model/TipoBulto.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum TipoBulto { CAJA, diff --git a/src/main/java/sic/modelo/TipoDeComprobante.java b/src/main/java/org/opencommercial/model/TipoDeComprobante.java similarity index 91% rename from src/main/java/sic/modelo/TipoDeComprobante.java rename to src/main/java/org/opencommercial/model/TipoDeComprobante.java index 6c677cf73..cc15894d6 100644 --- a/src/main/java/sic/modelo/TipoDeComprobante.java +++ b/src/main/java/org/opencommercial/model/TipoDeComprobante.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum TipoDeComprobante { FACTURA_A, diff --git a/src/main/java/sic/modelo/TipoDeEnvio.java b/src/main/java/org/opencommercial/model/TipoDeEnvio.java similarity index 75% rename from src/main/java/sic/modelo/TipoDeEnvio.java rename to src/main/java/org/opencommercial/model/TipoDeEnvio.java index e2b1b6e1e..f6358e8ce 100644 --- a/src/main/java/sic/modelo/TipoDeEnvio.java +++ b/src/main/java/org/opencommercial/model/TipoDeEnvio.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum TipoDeEnvio { RETIRO_EN_SUCURSAL, diff --git a/src/main/java/sic/modelo/TipoDeOperacion.java b/src/main/java/org/opencommercial/model/TipoDeOperacion.java similarity index 68% rename from src/main/java/sic/modelo/TipoDeOperacion.java rename to src/main/java/org/opencommercial/model/TipoDeOperacion.java index 3d6d0888d..ccfd72c60 100644 --- a/src/main/java/sic/modelo/TipoDeOperacion.java +++ b/src/main/java/org/opencommercial/model/TipoDeOperacion.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; public enum TipoDeOperacion { ALTA, diff --git a/src/main/java/sic/modelo/TokenAccesoExcluido.java b/src/main/java/org/opencommercial/model/TokenAccesoExcluido.java similarity index 93% rename from src/main/java/sic/modelo/TokenAccesoExcluido.java rename to src/main/java/org/opencommercial/model/TokenAccesoExcluido.java index c525f017d..6709f40de 100644 --- a/src/main/java/sic/modelo/TokenAccesoExcluido.java +++ b/src/main/java/org/opencommercial/model/TokenAccesoExcluido.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import jakarta.persistence.*; import lombok.AllArgsConstructor; diff --git a/src/main/java/sic/modelo/Transportista.java b/src/main/java/org/opencommercial/model/Transportista.java similarity index 94% rename from src/main/java/sic/modelo/Transportista.java rename to src/main/java/org/opencommercial/model/Transportista.java index 433d37977..cd744519c 100644 --- a/src/main/java/sic/modelo/Transportista.java +++ b/src/main/java/org/opencommercial/model/Transportista.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonView; @@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; diff --git a/src/main/java/sic/modelo/Traspaso.java b/src/main/java/org/opencommercial/model/Traspaso.java similarity index 96% rename from src/main/java/sic/modelo/Traspaso.java rename to src/main/java/org/opencommercial/model/Traspaso.java index b3e33f676..7c4e0c486 100644 --- a/src/main/java/sic/modelo/Traspaso.java +++ b/src/main/java/org/opencommercial/model/Traspaso.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -10,7 +10,7 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import java.time.LocalDateTime; import java.util.List; diff --git a/src/main/java/sic/modelo/Ubicacion.java b/src/main/java/org/opencommercial/model/Ubicacion.java similarity index 97% rename from src/main/java/sic/modelo/Ubicacion.java rename to src/main/java/org/opencommercial/model/Ubicacion.java index 79a2a4380..d29147630 100644 --- a/src/main/java/sic/modelo/Ubicacion.java +++ b/src/main/java/org/opencommercial/model/Ubicacion.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.Length; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/Usuario.java b/src/main/java/org/opencommercial/model/Usuario.java similarity index 96% rename from src/main/java/sic/modelo/Usuario.java rename to src/main/java/org/opencommercial/model/Usuario.java index 99d8e17dc..dc28194f4 100644 --- a/src/main/java/sic/modelo/Usuario.java +++ b/src/main/java/org/opencommercial/model/Usuario.java @@ -1,4 +1,4 @@ -package sic.modelo; +package org.opencommercial.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotEmpty; diff --git a/src/main/java/sic/modelo/criteria/BusquedaCajaCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaCajaCriteria.java similarity index 92% rename from src/main/java/sic/modelo/criteria/BusquedaCajaCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaCajaCriteria.java index 0f7f3d904..a9995b61b 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaCajaCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaCajaCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import java.time.LocalDateTime; import lombok.AllArgsConstructor; diff --git a/src/main/java/sic/modelo/criteria/BusquedaClienteCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaClienteCriteria.java similarity index 92% rename from src/main/java/sic/modelo/criteria/BusquedaClienteCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaClienteCriteria.java index 54ccd6153..3050eeff1 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaClienteCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaClienteCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaCuentaCorrienteClienteCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaCuentaCorrienteClienteCriteria.java similarity index 92% rename from src/main/java/sic/modelo/criteria/BusquedaCuentaCorrienteClienteCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaCuentaCorrienteClienteCriteria.java index e1ec40cd2..d9c6e02d2 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaCuentaCorrienteClienteCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaCuentaCorrienteClienteCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaCuentaCorrienteProveedorCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaCuentaCorrienteProveedorCriteria.java similarity index 91% rename from src/main/java/sic/modelo/criteria/BusquedaCuentaCorrienteProveedorCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaCuentaCorrienteProveedorCriteria.java index 0c36134c4..0ca829278 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaCuentaCorrienteProveedorCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaCuentaCorrienteProveedorCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaFacturaCompraCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaFacturaCompraCriteria.java similarity index 87% rename from src/main/java/sic/modelo/criteria/BusquedaFacturaCompraCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaFacturaCompraCriteria.java index 941366daf..99ad62b95 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaFacturaCompraCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaFacturaCompraCriteria.java @@ -1,11 +1,11 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; @Data @AllArgsConstructor diff --git a/src/main/java/sic/modelo/criteria/BusquedaFacturaVentaCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaFacturaVentaCriteria.java similarity index 88% rename from src/main/java/sic/modelo/criteria/BusquedaFacturaVentaCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaFacturaVentaCriteria.java index eee17fcce..80f51e391 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaFacturaVentaCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaFacturaVentaCriteria.java @@ -1,11 +1,11 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; @Data @AllArgsConstructor diff --git a/src/main/java/sic/modelo/criteria/BusquedaGastoCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaGastoCriteria.java similarity index 92% rename from src/main/java/sic/modelo/criteria/BusquedaGastoCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaGastoCriteria.java index aba430526..7110b60c4 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaGastoCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaGastoCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaLocalidadCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaLocalidadCriteria.java similarity index 90% rename from src/main/java/sic/modelo/criteria/BusquedaLocalidadCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaLocalidadCriteria.java index 91ed69e0c..fd4cba942 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaLocalidadCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaLocalidadCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaNotaCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaNotaCriteria.java similarity index 84% rename from src/main/java/sic/modelo/criteria/BusquedaNotaCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaNotaCriteria.java index 5ac4af436..3ac57d17f 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaNotaCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaNotaCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import java.time.LocalDateTime; @@ -6,8 +6,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.Movimiento; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.Movimiento; +import org.opencommercial.model.TipoDeComprobante; @Data @AllArgsConstructor diff --git a/src/main/java/sic/modelo/criteria/BusquedaPedidoCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaPedidoCriteria.java similarity index 82% rename from src/main/java/sic/modelo/criteria/BusquedaPedidoCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaPedidoCriteria.java index 4f928f8e3..3712117d5 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaPedidoCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaPedidoCriteria.java @@ -1,11 +1,11 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.EstadoPedido; -import sic.modelo.TipoDeEnvio; +import org.opencommercial.model.EstadoPedido; +import org.opencommercial.model.TipoDeEnvio; import java.time.LocalDateTime; diff --git a/src/main/java/sic/modelo/criteria/BusquedaProductoCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaProductoCriteria.java similarity index 93% rename from src/main/java/sic/modelo/criteria/BusquedaProductoCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaProductoCriteria.java index d5285858b..e7c9bfbe5 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaProductoCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaProductoCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaProveedorCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaProveedorCriteria.java similarity index 90% rename from src/main/java/sic/modelo/criteria/BusquedaProveedorCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaProveedorCriteria.java index b5f377ae6..b2b7bbd88 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaProveedorCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaProveedorCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaReciboCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaReciboCriteria.java similarity index 88% rename from src/main/java/sic/modelo/criteria/BusquedaReciboCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaReciboCriteria.java index 85cecaded..d44f1c59e 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaReciboCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaReciboCriteria.java @@ -1,10 +1,10 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.Movimiento; +import org.opencommercial.model.Movimiento; import java.time.LocalDateTime; diff --git a/src/main/java/sic/modelo/criteria/BusquedaRemitoCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaRemitoCriteria.java similarity index 93% rename from src/main/java/sic/modelo/criteria/BusquedaRemitoCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaRemitoCriteria.java index caf4a9f18..8e0e5e7fd 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaRemitoCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaRemitoCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaTransportistaCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaTransportistaCriteria.java similarity index 89% rename from src/main/java/sic/modelo/criteria/BusquedaTransportistaCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaTransportistaCriteria.java index db0980203..00f2f1461 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaTransportistaCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaTransportistaCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/src/main/java/sic/modelo/criteria/BusquedaTraspasoCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaTraspasoCriteria.java similarity index 92% rename from src/main/java/sic/modelo/criteria/BusquedaTraspasoCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaTraspasoCriteria.java index 98f6dd3ac..6f704b0c3 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaTraspasoCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaTraspasoCriteria.java @@ -1,4 +1,4 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/criteria/BusquedaUsuarioCriteria.java b/src/main/java/org/opencommercial/model/criteria/BusquedaUsuarioCriteria.java similarity index 85% rename from src/main/java/sic/modelo/criteria/BusquedaUsuarioCriteria.java rename to src/main/java/org/opencommercial/model/criteria/BusquedaUsuarioCriteria.java index 6b326f0d3..ce3057a34 100644 --- a/src/main/java/sic/modelo/criteria/BusquedaUsuarioCriteria.java +++ b/src/main/java/org/opencommercial/model/criteria/BusquedaUsuarioCriteria.java @@ -1,10 +1,10 @@ -package sic.modelo.criteria; +package org.opencommercial.model.criteria; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.Rol; +import org.opencommercial.model.Rol; import java.util.List; diff --git a/src/main/java/sic/modelo/dto/CajaDTO.java b/src/main/java/org/opencommercial/model/dto/CajaDTO.java similarity index 91% rename from src/main/java/sic/modelo/dto/CajaDTO.java rename to src/main/java/org/opencommercial/model/dto/CajaDTO.java index 3e701c1f8..a849c7297 100644 --- a/src/main/java/sic/modelo/dto/CajaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/CajaDTO.java @@ -1,7 +1,7 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; -import sic.modelo.EstadoCaja; +import org.opencommercial.model.EstadoCaja; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/modelo/dto/CantidadEnSucursalDTO.java b/src/main/java/org/opencommercial/model/dto/CantidadEnSucursalDTO.java similarity index 90% rename from src/main/java/sic/modelo/dto/CantidadEnSucursalDTO.java rename to src/main/java/org/opencommercial/model/dto/CantidadEnSucursalDTO.java index 1f98f955d..df1127d2b 100644 --- a/src/main/java/sic/modelo/dto/CantidadEnSucursalDTO.java +++ b/src/main/java/org/opencommercial/model/dto/CantidadEnSucursalDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/CarritoCompraDTO.java b/src/main/java/org/opencommercial/model/dto/CarritoCompraDTO.java similarity index 82% rename from src/main/java/sic/modelo/dto/CarritoCompraDTO.java rename to src/main/java/org/opencommercial/model/dto/CarritoCompraDTO.java index d4a511564..1166bbc14 100644 --- a/src/main/java/sic/modelo/dto/CarritoCompraDTO.java +++ b/src/main/java/org/opencommercial/model/dto/CarritoCompraDTO.java @@ -1,8 +1,8 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import com.fasterxml.jackson.annotation.JsonView; import lombok.*; -import sic.config.Views; +import org.opencommercial.config.Views; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/ClienteDTO.java b/src/main/java/org/opencommercial/model/dto/ClienteDTO.java similarity index 93% rename from src/main/java/sic/modelo/dto/ClienteDTO.java rename to src/main/java/org/opencommercial/model/dto/ClienteDTO.java index 2a587036c..b733d7d4e 100644 --- a/src/main/java/sic/modelo/dto/ClienteDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ClienteDTO.java @@ -1,7 +1,7 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/ConfiguracionSucursalDTO.java b/src/main/java/org/opencommercial/model/dto/ConfiguracionSucursalDTO.java similarity index 95% rename from src/main/java/sic/modelo/dto/ConfiguracionSucursalDTO.java rename to src/main/java/org/opencommercial/model/dto/ConfiguracionSucursalDTO.java index e18895e78..604ff4f61 100644 --- a/src/main/java/sic/modelo/dto/ConfiguracionSucursalDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ConfiguracionSucursalDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/DetalleCompraDTO.java b/src/main/java/org/opencommercial/model/dto/DetalleCompraDTO.java similarity index 89% rename from src/main/java/sic/modelo/dto/DetalleCompraDTO.java rename to src/main/java/org/opencommercial/model/dto/DetalleCompraDTO.java index 733c7e231..b5ff58177 100644 --- a/src/main/java/sic/modelo/dto/DetalleCompraDTO.java +++ b/src/main/java/org/opencommercial/model/dto/DetalleCompraDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/EntidadMontoDTO.java b/src/main/java/org/opencommercial/model/dto/EntidadMontoDTO.java similarity index 82% rename from src/main/java/sic/modelo/dto/EntidadMontoDTO.java rename to src/main/java/org/opencommercial/model/dto/EntidadMontoDTO.java index 3fc75bce5..d5963f4cb 100644 --- a/src/main/java/sic/modelo/dto/EntidadMontoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/EntidadMontoDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import java.math.BigDecimal; @Data diff --git a/src/main/java/sic/modelo/dto/FormaDePagoDTO.java b/src/main/java/org/opencommercial/model/dto/FormaDePagoDTO.java similarity index 91% rename from src/main/java/sic/modelo/dto/FormaDePagoDTO.java rename to src/main/java/org/opencommercial/model/dto/FormaDePagoDTO.java index c3f535e3a..c67866625 100644 --- a/src/main/java/sic/modelo/dto/FormaDePagoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/FormaDePagoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/LocalidadDTO.java b/src/main/java/org/opencommercial/model/dto/LocalidadDTO.java similarity index 91% rename from src/main/java/sic/modelo/dto/LocalidadDTO.java rename to src/main/java/org/opencommercial/model/dto/LocalidadDTO.java index 56e38a203..5507d7a0e 100644 --- a/src/main/java/sic/modelo/dto/LocalidadDTO.java +++ b/src/main/java/org/opencommercial/model/dto/LocalidadDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/LocalidadesParaActualizarDTO.java b/src/main/java/org/opencommercial/model/dto/LocalidadesParaActualizarDTO.java similarity index 90% rename from src/main/java/sic/modelo/dto/LocalidadesParaActualizarDTO.java rename to src/main/java/org/opencommercial/model/dto/LocalidadesParaActualizarDTO.java index cdc3c1cbb..ca6764e2d 100644 --- a/src/main/java/sic/modelo/dto/LocalidadesParaActualizarDTO.java +++ b/src/main/java/org/opencommercial/model/dto/LocalidadesParaActualizarDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/MedidaDTO.java b/src/main/java/org/opencommercial/model/dto/MedidaDTO.java similarity index 85% rename from src/main/java/sic/modelo/dto/MedidaDTO.java rename to src/main/java/org/opencommercial/model/dto/MedidaDTO.java index 87f1cb492..f1700454d 100644 --- a/src/main/java/sic/modelo/dto/MedidaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/MedidaDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/MercadoPagoPreferenceDTO.java b/src/main/java/org/opencommercial/model/dto/MercadoPagoPreferenceDTO.java similarity index 81% rename from src/main/java/sic/modelo/dto/MercadoPagoPreferenceDTO.java rename to src/main/java/org/opencommercial/model/dto/MercadoPagoPreferenceDTO.java index 407cb8217..7dacf8ecf 100644 --- a/src/main/java/sic/modelo/dto/MercadoPagoPreferenceDTO.java +++ b/src/main/java/org/opencommercial/model/dto/MercadoPagoPreferenceDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; @Data @AllArgsConstructor diff --git a/src/main/java/sic/modelo/dto/NotaCreditoDTO.java b/src/main/java/org/opencommercial/model/dto/NotaCreditoDTO.java similarity index 86% rename from src/main/java/sic/modelo/dto/NotaCreditoDTO.java rename to src/main/java/org/opencommercial/model/dto/NotaCreditoDTO.java index 3447f3234..3864b2880 100644 --- a/src/main/java/sic/modelo/dto/NotaCreditoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NotaCreditoDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; import lombok.*; -import sic.modelo.RenglonNotaCredito; +import org.opencommercial.model.RenglonNotaCredito; @Data @EqualsAndHashCode(callSuper = true, exclude = {"renglonesNotaCredito"}) diff --git a/src/main/java/sic/modelo/dto/NotaDTO.java b/src/main/java/org/opencommercial/model/dto/NotaDTO.java similarity index 93% rename from src/main/java/sic/modelo/dto/NotaDTO.java rename to src/main/java/org/opencommercial/model/dto/NotaDTO.java index 8a1640aa4..a3e6dfd38 100644 --- a/src/main/java/sic/modelo/dto/NotaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NotaDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -8,8 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import sic.modelo.Nota; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.Nota; +import org.opencommercial.model.TipoDeComprobante; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/NotaDebitoDTO.java b/src/main/java/org/opencommercial/model/dto/NotaDebitoDTO.java similarity index 83% rename from src/main/java/sic/modelo/dto/NotaDebitoDTO.java rename to src/main/java/org/opencommercial/model/dto/NotaDebitoDTO.java index 153e6abab..dde9fde66 100644 --- a/src/main/java/sic/modelo/dto/NotaDebitoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NotaDebitoDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import sic.modelo.RenglonNotaDebito; +import org.opencommercial.model.RenglonNotaDebito; @Data @EqualsAndHashCode(callSuper = true, exclude = {"renglonesNotaDebito"}) diff --git a/src/main/java/sic/modelo/dto/NuevaFacturaCompraDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaFacturaCompraDTO.java similarity index 89% rename from src/main/java/sic/modelo/dto/NuevaFacturaCompraDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaFacturaCompraDTO.java index 924a6a1a6..c368318a9 100644 --- a/src/main/java/sic/modelo/dto/NuevaFacturaCompraDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaFacturaCompraDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; import java.time.LocalDate; diff --git a/src/main/java/sic/modelo/dto/NuevaFacturaVentaDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaFacturaVentaDTO.java similarity index 88% rename from src/main/java/sic/modelo/dto/NuevaFacturaVentaDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaFacturaVentaDTO.java index e100f2253..1eca4b079 100644 --- a/src/main/java/sic/modelo/dto/NuevaFacturaVentaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaFacturaVentaDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; import java.time.LocalDate; diff --git a/src/main/java/sic/modelo/dto/NuevaNotaCreditoDeFacturaDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaNotaCreditoDeFacturaDTO.java similarity index 92% rename from src/main/java/sic/modelo/dto/NuevaNotaCreditoDeFacturaDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaNotaCreditoDeFacturaDTO.java index 368dbdea2..e7228ca91 100644 --- a/src/main/java/sic/modelo/dto/NuevaNotaCreditoDeFacturaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaNotaCreditoDeFacturaDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/NuevaNotaCreditoSinFacturaDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaNotaCreditoSinFacturaDTO.java similarity index 84% rename from src/main/java/sic/modelo/dto/NuevaNotaCreditoSinFacturaDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaNotaCreditoSinFacturaDTO.java index d11d7f8e1..d58aad718 100644 --- a/src/main/java/sic/modelo/dto/NuevaNotaCreditoSinFacturaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaNotaCreditoSinFacturaDTO.java @@ -1,9 +1,9 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/NuevaNotaDebitoDeReciboDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaNotaDebitoDeReciboDTO.java similarity index 82% rename from src/main/java/sic/modelo/dto/NuevaNotaDebitoDeReciboDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaNotaDebitoDeReciboDTO.java index 65b5cb667..c33e33ac0 100644 --- a/src/main/java/sic/modelo/dto/NuevaNotaDebitoDeReciboDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaNotaDebitoDeReciboDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/NuevaNotaDebitoSinReciboDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaNotaDebitoSinReciboDTO.java similarity index 84% rename from src/main/java/sic/modelo/dto/NuevaNotaDebitoSinReciboDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaNotaDebitoSinReciboDTO.java index e6edc8cf0..09a0bdf91 100644 --- a/src/main/java/sic/modelo/dto/NuevaNotaDebitoSinReciboDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaNotaDebitoSinReciboDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/NuevaOrdenDePagoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaOrdenDePagoDTO.java similarity index 78% rename from src/main/java/sic/modelo/dto/NuevaOrdenDePagoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaOrdenDePagoDTO.java index a0ef752d1..f7b4199dc 100644 --- a/src/main/java/sic/modelo/dto/NuevaOrdenDePagoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaOrdenDePagoDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.Movimiento; -import sic.modelo.TipoDeEnvio; +import org.opencommercial.model.Movimiento; +import org.opencommercial.model.TipoDeEnvio; import jakarta.validation.constraints.NotNull; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/NuevaSucursalDTO.java b/src/main/java/org/opencommercial/model/dto/NuevaSucursalDTO.java similarity index 93% rename from src/main/java/sic/modelo/dto/NuevaSucursalDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevaSucursalDTO.java index 88ce0ff07..3e85f9470 100644 --- a/src/main/java/sic/modelo/dto/NuevaSucursalDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevaSucursalDTO.java @@ -1,11 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.CategoriaIVA; -import sic.modelo.Ubicacion; +import org.opencommercial.model.CategoriaIVA; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; diff --git a/src/main/java/sic/modelo/dto/NuevoGastoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoGastoDTO.java similarity index 89% rename from src/main/java/sic/modelo/dto/NuevoGastoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoGastoDTO.java index 42f4e5fe1..c467eeb9a 100644 --- a/src/main/java/sic/modelo/dto/NuevoGastoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoGastoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/NuevoProductoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoProductoDTO.java similarity index 98% rename from src/main/java/sic/modelo/dto/NuevoProductoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoProductoDTO.java index 4f1c2c933..40d5ed1fe 100644 --- a/src/main/java/sic/modelo/dto/NuevoProductoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoProductoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/NuevoRemitoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoRemitoDTO.java similarity index 86% rename from src/main/java/sic/modelo/dto/NuevoRemitoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoRemitoDTO.java index a465ca504..17066db92 100644 --- a/src/main/java/sic/modelo/dto/NuevoRemitoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoRemitoDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoBulto; +import org.opencommercial.model.TipoBulto; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/NuevoRenglonFacturaDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoRenglonFacturaDTO.java similarity index 93% rename from src/main/java/sic/modelo/dto/NuevoRenglonFacturaDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoRenglonFacturaDTO.java index e6cb03aee..652a85dc8 100644 --- a/src/main/java/sic/modelo/dto/NuevoRenglonFacturaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoRenglonFacturaDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.Builder; import lombok.Data; diff --git a/src/main/java/sic/modelo/dto/NuevoRenglonPedidoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoRenglonPedidoDTO.java similarity index 88% rename from src/main/java/sic/modelo/dto/NuevoRenglonPedidoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoRenglonPedidoDTO.java index 57ef2841f..de0eaadce 100644 --- a/src/main/java/sic/modelo/dto/NuevoRenglonPedidoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoRenglonPedidoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/NuevoTraspasoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoTraspasoDTO.java similarity index 90% rename from src/main/java/sic/modelo/dto/NuevoTraspasoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoTraspasoDTO.java index cb90dc180..a82784737 100644 --- a/src/main/java/sic/modelo/dto/NuevoTraspasoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoTraspasoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/NuevoTraspasoDePedidoDTO.java b/src/main/java/org/opencommercial/model/dto/NuevoTraspasoDePedidoDTO.java similarity index 90% rename from src/main/java/sic/modelo/dto/NuevoTraspasoDePedidoDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevoTraspasoDePedidoDTO.java index f6f3969f9..c4ebe45c9 100644 --- a/src/main/java/sic/modelo/dto/NuevoTraspasoDePedidoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevoTraspasoDePedidoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/NuevosResultadosComprobanteDTO.java b/src/main/java/org/opencommercial/model/dto/NuevosResultadosComprobanteDTO.java similarity index 85% rename from src/main/java/sic/modelo/dto/NuevosResultadosComprobanteDTO.java rename to src/main/java/org/opencommercial/model/dto/NuevosResultadosComprobanteDTO.java index 09af2df5d..024dabcf7 100644 --- a/src/main/java/sic/modelo/dto/NuevosResultadosComprobanteDTO.java +++ b/src/main/java/org/opencommercial/model/dto/NuevosResultadosComprobanteDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/PedidoDTO.java b/src/main/java/org/opencommercial/model/dto/PedidoDTO.java similarity index 87% rename from src/main/java/sic/modelo/dto/PedidoDTO.java rename to src/main/java/org/opencommercial/model/dto/PedidoDTO.java index 844380a90..1a55e33fe 100644 --- a/src/main/java/sic/modelo/dto/PedidoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/PedidoDTO.java @@ -1,10 +1,10 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeEnvio; +import org.opencommercial.model.TipoDeEnvio; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/modelo/dto/PeriodoMontoDTO.java b/src/main/java/org/opencommercial/model/dto/PeriodoMontoDTO.java similarity index 82% rename from src/main/java/sic/modelo/dto/PeriodoMontoDTO.java rename to src/main/java/org/opencommercial/model/dto/PeriodoMontoDTO.java index 45525ebb4..3c1c48c17 100644 --- a/src/main/java/sic/modelo/dto/PeriodoMontoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/PeriodoMontoDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import java.math.BigDecimal; @Data diff --git a/src/main/java/sic/modelo/dto/ProductoDTO.java b/src/main/java/org/opencommercial/model/dto/ProductoDTO.java similarity index 97% rename from src/main/java/sic/modelo/dto/ProductoDTO.java rename to src/main/java/org/opencommercial/model/dto/ProductoDTO.java index ff3f3e621..85798beb5 100644 --- a/src/main/java/sic/modelo/dto/ProductoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ProductoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/ProductoFaltanteDTO.java b/src/main/java/org/opencommercial/model/dto/ProductoFaltanteDTO.java similarity index 87% rename from src/main/java/sic/modelo/dto/ProductoFaltanteDTO.java rename to src/main/java/org/opencommercial/model/dto/ProductoFaltanteDTO.java index 54d389d05..5d687fe83 100644 --- a/src/main/java/sic/modelo/dto/ProductoFaltanteDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ProductoFaltanteDTO.java @@ -1,11 +1,11 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/ProductosParaActualizarDTO.java b/src/main/java/org/opencommercial/model/dto/ProductosParaActualizarDTO.java similarity index 95% rename from src/main/java/sic/modelo/dto/ProductosParaActualizarDTO.java rename to src/main/java/org/opencommercial/model/dto/ProductosParaActualizarDTO.java index 5257c2675..01d7cda23 100644 --- a/src/main/java/sic/modelo/dto/ProductosParaActualizarDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ProductosParaActualizarDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/ProductosParaVerificarStockDTO.java b/src/main/java/org/opencommercial/model/dto/ProductosParaVerificarStockDTO.java similarity index 90% rename from src/main/java/sic/modelo/dto/ProductosParaVerificarStockDTO.java rename to src/main/java/org/opencommercial/model/dto/ProductosParaVerificarStockDTO.java index 93ec11e00..7c2b0f4cf 100644 --- a/src/main/java/sic/modelo/dto/ProductosParaVerificarStockDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ProductosParaVerificarStockDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/ProveedorDTO.java b/src/main/java/org/opencommercial/model/dto/ProveedorDTO.java similarity index 89% rename from src/main/java/sic/modelo/dto/ProveedorDTO.java rename to src/main/java/org/opencommercial/model/dto/ProveedorDTO.java index db96cd83c..927714026 100644 --- a/src/main/java/sic/modelo/dto/ProveedorDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ProveedorDTO.java @@ -1,7 +1,7 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; import java.io.Serializable; import java.math.BigDecimal; diff --git a/src/main/java/sic/modelo/dto/ProvinciaDTO.java b/src/main/java/org/opencommercial/model/dto/ProvinciaDTO.java similarity index 86% rename from src/main/java/sic/modelo/dto/ProvinciaDTO.java rename to src/main/java/org/opencommercial/model/dto/ProvinciaDTO.java index e9ff27f98..aa7b23320 100644 --- a/src/main/java/sic/modelo/dto/ProvinciaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ProvinciaDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/ReciboDTO.java b/src/main/java/org/opencommercial/model/dto/ReciboDTO.java similarity index 95% rename from src/main/java/sic/modelo/dto/ReciboDTO.java rename to src/main/java/org/opencommercial/model/dto/ReciboDTO.java index 2070d7e32..aa43ee41d 100644 --- a/src/main/java/sic/modelo/dto/ReciboDTO.java +++ b/src/main/java/org/opencommercial/model/dto/ReciboDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/RecoveryPasswordDTO.java b/src/main/java/org/opencommercial/model/dto/RecoveryPasswordDTO.java similarity index 87% rename from src/main/java/sic/modelo/dto/RecoveryPasswordDTO.java rename to src/main/java/org/opencommercial/model/dto/RecoveryPasswordDTO.java index 610522fe3..9955b3f3f 100644 --- a/src/main/java/sic/modelo/dto/RecoveryPasswordDTO.java +++ b/src/main/java/org/opencommercial/model/dto/RecoveryPasswordDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/RegistracionClienteAndUsuarioDTO.java b/src/main/java/org/opencommercial/model/dto/RegistracionClienteAndUsuarioDTO.java similarity index 92% rename from src/main/java/sic/modelo/dto/RegistracionClienteAndUsuarioDTO.java rename to src/main/java/org/opencommercial/model/dto/RegistracionClienteAndUsuarioDTO.java index 5e78ad5ec..cc1c7d156 100644 --- a/src/main/java/sic/modelo/dto/RegistracionClienteAndUsuarioDTO.java +++ b/src/main/java/org/opencommercial/model/dto/RegistracionClienteAndUsuarioDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.Pattern; @@ -7,7 +7,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.Length; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; import java.io.Serializable; diff --git a/src/main/java/sic/modelo/dto/RenglonReporteTraspasoDTO.java b/src/main/java/org/opencommercial/model/dto/RenglonReporteTraspasoDTO.java similarity index 91% rename from src/main/java/sic/modelo/dto/RenglonReporteTraspasoDTO.java rename to src/main/java/org/opencommercial/model/dto/RenglonReporteTraspasoDTO.java index aa3050524..4d2ff1e79 100644 --- a/src/main/java/sic/modelo/dto/RenglonReporteTraspasoDTO.java +++ b/src/main/java/org/opencommercial/model/dto/RenglonReporteTraspasoDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/sic/modelo/dto/RubroDTO.java b/src/main/java/org/opencommercial/model/dto/RubroDTO.java similarity index 86% rename from src/main/java/sic/modelo/dto/RubroDTO.java rename to src/main/java/org/opencommercial/model/dto/RubroDTO.java index de0c83af1..5178f8977 100644 --- a/src/main/java/sic/modelo/dto/RubroDTO.java +++ b/src/main/java/org/opencommercial/model/dto/RubroDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/SucursalDTO.java b/src/main/java/org/opencommercial/model/dto/SucursalDTO.java similarity index 88% rename from src/main/java/sic/modelo/dto/SucursalDTO.java rename to src/main/java/org/opencommercial/model/dto/SucursalDTO.java index 206e6b90b..71639bdbf 100644 --- a/src/main/java/sic/modelo/dto/SucursalDTO.java +++ b/src/main/java/org/opencommercial/model/dto/SucursalDTO.java @@ -1,7 +1,7 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; import java.time.LocalDateTime; diff --git a/src/main/java/sic/modelo/dto/TransportistaDTO.java b/src/main/java/org/opencommercial/model/dto/TransportistaDTO.java similarity index 89% rename from src/main/java/sic/modelo/dto/TransportistaDTO.java rename to src/main/java/org/opencommercial/model/dto/TransportistaDTO.java index 3d3492a7c..0e2fcf55e 100644 --- a/src/main/java/sic/modelo/dto/TransportistaDTO.java +++ b/src/main/java/org/opencommercial/model/dto/TransportistaDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/UbicacionDTO.java b/src/main/java/org/opencommercial/model/dto/UbicacionDTO.java similarity index 96% rename from src/main/java/sic/modelo/dto/UbicacionDTO.java rename to src/main/java/org/opencommercial/model/dto/UbicacionDTO.java index 38b1738bf..bd42ac770 100644 --- a/src/main/java/sic/modelo/dto/UbicacionDTO.java +++ b/src/main/java/org/opencommercial/model/dto/UbicacionDTO.java @@ -1,4 +1,4 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; diff --git a/src/main/java/sic/modelo/dto/UsuarioDTO.java b/src/main/java/org/opencommercial/model/dto/UsuarioDTO.java similarity index 88% rename from src/main/java/sic/modelo/dto/UsuarioDTO.java rename to src/main/java/org/opencommercial/model/dto/UsuarioDTO.java index 784c5a586..90b0ed994 100644 --- a/src/main/java/sic/modelo/dto/UsuarioDTO.java +++ b/src/main/java/org/opencommercial/model/dto/UsuarioDTO.java @@ -1,7 +1,7 @@ -package sic.modelo.dto; +package org.opencommercial.model.dto; import lombok.*; -import sic.modelo.Rol; +import org.opencommercial.model.Rol; import java.io.Serializable; import java.util.List; diff --git a/src/main/java/sic/modelo/embeddable/CantidadProductoEmbeddable.java b/src/main/java/org/opencommercial/model/embeddable/CantidadProductoEmbeddable.java similarity index 93% rename from src/main/java/sic/modelo/embeddable/CantidadProductoEmbeddable.java rename to src/main/java/org/opencommercial/model/embeddable/CantidadProductoEmbeddable.java index 9397254fc..d9a118755 100644 --- a/src/main/java/sic/modelo/embeddable/CantidadProductoEmbeddable.java +++ b/src/main/java/org/opencommercial/model/embeddable/CantidadProductoEmbeddable.java @@ -1,4 +1,4 @@ -package sic.modelo.embeddable; +package org.opencommercial.model.embeddable; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonView; @@ -6,8 +6,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; -import sic.modelo.CantidadEnSucursal; +import org.opencommercial.config.Views; +import org.opencommercial.model.CantidadEnSucursal; import jakarta.persistence.*; import jakarta.validation.constraints.DecimalMin; diff --git a/src/main/java/sic/modelo/embeddable/ClienteEmbeddable.java b/src/main/java/org/opencommercial/model/embeddable/ClienteEmbeddable.java similarity index 92% rename from src/main/java/sic/modelo/embeddable/ClienteEmbeddable.java rename to src/main/java/org/opencommercial/model/embeddable/ClienteEmbeddable.java index 183904be4..4ec51e86b 100644 --- a/src/main/java/sic/modelo/embeddable/ClienteEmbeddable.java +++ b/src/main/java/org/opencommercial/model/embeddable/ClienteEmbeddable.java @@ -1,10 +1,10 @@ -package sic.modelo.embeddable; +package org.opencommercial.model.embeddable; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; import jakarta.persistence.Embeddable; import jakarta.persistence.EnumType; diff --git a/src/main/java/sic/modelo/embeddable/PrecioProductoEmbeddable.java b/src/main/java/org/opencommercial/model/embeddable/PrecioProductoEmbeddable.java similarity index 96% rename from src/main/java/sic/modelo/embeddable/PrecioProductoEmbeddable.java rename to src/main/java/org/opencommercial/model/embeddable/PrecioProductoEmbeddable.java index 71b506df4..635615ffb 100644 --- a/src/main/java/sic/modelo/embeddable/PrecioProductoEmbeddable.java +++ b/src/main/java/org/opencommercial/model/embeddable/PrecioProductoEmbeddable.java @@ -1,11 +1,11 @@ -package sic.modelo.embeddable; +package org.opencommercial.model.embeddable; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import sic.config.Views; +import org.opencommercial.config.Views; import jakarta.persistence.Column; import jakarta.persistence.Embeddable; diff --git a/src/main/java/sic/repository/CajaRepository.java b/src/main/java/org/opencommercial/repository/CajaRepository.java similarity index 85% rename from src/main/java/sic/repository/CajaRepository.java rename to src/main/java/org/opencommercial/repository/CajaRepository.java index 224721a3d..7677fc486 100644 --- a/src/main/java/sic/repository/CajaRepository.java +++ b/src/main/java/org/opencommercial/repository/CajaRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -7,7 +7,7 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Caja; +import org.opencommercial.model.Caja; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -25,13 +25,13 @@ public interface CajaRepository extends @Query("SELECT c FROM Caja c " + "WHERE c.sucursal.idSucursal = :idSucursal AND c.eliminada = false " - + "AND c.estado = sic.modelo.EstadoCaja.ABIERTA " + + "AND c.estado = org.opencommercial.model.EstadoCaja.ABIERTA " + "ORDER BY c.idCaja DESC") Caja isUltimaCajaAbierta(@Param("idSucursal") long idSucursal); @Query("SELECT c FROM Caja c " + "WHERE c.sucursal.idSucursal = :idSucursal AND c.eliminada = false " - + "AND c.estado = sic.modelo.EstadoCaja.CERRADA " + + "AND c.estado = org.opencommercial.model.EstadoCaja.CERRADA " + "AND :fecha BETWEEN c.fechaApertura AND c.fechaCierre") Caja encontrarCajaCerradaQueContengaFechaEntreFechaAperturaYFechaCierre( @Param("idSucursal") long idSucursal, @Param("fecha") LocalDateTime fecha); @@ -39,6 +39,6 @@ Caja encontrarCajaCerradaQueContengaFechaEntreFechaAperturaYFechaCierre( @Modifying @Query("UPDATE Caja c " + "SET c.saldoSistema = c.saldoSistema + :monto WHERE c.idCaja = :idCaja " - + "AND c.estado = sic.modelo.EstadoCaja.CERRADA") + + "AND c.estado = org.opencommercial.model.EstadoCaja.CERRADA") int actualizarSaldoSistema(@Param("idCaja") long idCaja, @Param("monto") BigDecimal monto); } diff --git a/src/main/java/sic/repository/CajaRepositoryCustom.java b/src/main/java/org/opencommercial/repository/CajaRepositoryCustom.java similarity index 85% rename from src/main/java/sic/repository/CajaRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/CajaRepositoryCustom.java index 87299bc44..f1fe66d8a 100644 --- a/src/main/java/sic/repository/CajaRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/CajaRepositoryCustom.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import com.querydsl.core.BooleanBuilder; diff --git a/src/main/java/sic/repository/CarritoCompraRepository.java b/src/main/java/org/opencommercial/repository/CarritoCompraRepository.java similarity index 93% rename from src/main/java/sic/repository/CarritoCompraRepository.java rename to src/main/java/org/opencommercial/repository/CarritoCompraRepository.java index 546948164..d60785ffe 100644 --- a/src/main/java/sic/repository/CarritoCompraRepository.java +++ b/src/main/java/org/opencommercial/repository/CarritoCompraRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import java.math.BigDecimal; import java.util.List; @@ -9,8 +9,8 @@ import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import sic.modelo.ItemCarritoCompra; -import sic.modelo.Usuario; +import org.opencommercial.model.ItemCarritoCompra; +import org.opencommercial.model.Usuario; public interface CarritoCompraRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/ClienteRepository.java b/src/main/java/org/opencommercial/repository/ClienteRepository.java similarity index 93% rename from src/main/java/sic/repository/ClienteRepository.java rename to src/main/java/org/opencommercial/repository/ClienteRepository.java index 576097ccc..62a90b852 100644 --- a/src/main/java/sic/repository/ClienteRepository.java +++ b/src/main/java/org/opencommercial/repository/ClienteRepository.java @@ -1,12 +1,12 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Cliente; -import sic.modelo.Usuario; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.Usuario; import java.util.List; public interface ClienteRepository extends diff --git a/src/main/java/sic/repository/ConfiguracionSucursalRepository.java b/src/main/java/org/opencommercial/repository/ConfiguracionSucursalRepository.java similarity index 92% rename from src/main/java/sic/repository/ConfiguracionSucursalRepository.java rename to src/main/java/org/opencommercial/repository/ConfiguracionSucursalRepository.java index e8ad9ec39..3436687a2 100644 --- a/src/main/java/sic/repository/ConfiguracionSucursalRepository.java +++ b/src/main/java/org/opencommercial/repository/ConfiguracionSucursalRepository.java @@ -1,10 +1,10 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import sic.modelo.ConfiguracionSucursal; +import org.opencommercial.model.ConfiguracionSucursal; public interface ConfiguracionSucursalRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/CuentaCorrienteClienteRepository.java b/src/main/java/org/opencommercial/repository/CuentaCorrienteClienteRepository.java similarity index 87% rename from src/main/java/sic/repository/CuentaCorrienteClienteRepository.java rename to src/main/java/org/opencommercial/repository/CuentaCorrienteClienteRepository.java index 31d7fff0e..4cd4e4cce 100644 --- a/src/main/java/sic/repository/CuentaCorrienteClienteRepository.java +++ b/src/main/java/org/opencommercial/repository/CuentaCorrienteClienteRepository.java @@ -1,11 +1,11 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Cliente; -import sic.modelo.CuentaCorrienteCliente; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.CuentaCorrienteCliente; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/CuentaCorrienteProveedorRepository.java b/src/main/java/org/opencommercial/repository/CuentaCorrienteProveedorRepository.java similarity index 83% rename from src/main/java/sic/repository/CuentaCorrienteProveedorRepository.java rename to src/main/java/org/opencommercial/repository/CuentaCorrienteProveedorRepository.java index 87d06cf79..1f388b117 100644 --- a/src/main/java/sic/repository/CuentaCorrienteProveedorRepository.java +++ b/src/main/java/org/opencommercial/repository/CuentaCorrienteProveedorRepository.java @@ -1,12 +1,11 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.CuentaCorrienteProveedor; -import sic.modelo.Sucursal; -import sic.modelo.Proveedor; +import org.opencommercial.model.CuentaCorrienteProveedor; +import org.opencommercial.model.Proveedor; public interface CuentaCorrienteProveedorRepository extends CuentaCorrienteRepository, diff --git a/src/main/java/sic/repository/CuentaCorrienteRepository.java b/src/main/java/org/opencommercial/repository/CuentaCorrienteRepository.java similarity index 84% rename from src/main/java/sic/repository/CuentaCorrienteRepository.java rename to src/main/java/org/opencommercial/repository/CuentaCorrienteRepository.java index f3fc69597..c7b056066 100644 --- a/src/main/java/sic/repository/CuentaCorrienteRepository.java +++ b/src/main/java/org/opencommercial/repository/CuentaCorrienteRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import sic.modelo.CuentaCorriente; +import org.opencommercial.model.CuentaCorriente; public interface CuentaCorrienteRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/FacturaCompraRepository.java b/src/main/java/org/opencommercial/repository/FacturaCompraRepository.java similarity index 89% rename from src/main/java/sic/repository/FacturaCompraRepository.java rename to src/main/java/org/opencommercial/repository/FacturaCompraRepository.java index aa64da65f..5ec51f336 100644 --- a/src/main/java/sic/repository/FacturaCompraRepository.java +++ b/src/main/java/org/opencommercial/repository/FacturaCompraRepository.java @@ -1,11 +1,12 @@ -package sic.repository; +package org.opencommercial.repository; +import org.opencommercial.repository.projection.EntidadMontoProjection; +import org.opencommercial.repository.projection.PeriodoMontoProjection; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.FacturaCompra; -import sic.repository.projection.EntidadMontoProjection; -import sic.repository.projection.PeriodoMontoProjection; +import org.opencommercial.model.FacturaCompra; + import java.util.List; public interface FacturaCompraRepository extends diff --git a/src/main/java/sic/repository/FacturaCompraRepositoryCustom.java b/src/main/java/org/opencommercial/repository/FacturaCompraRepositoryCustom.java similarity index 76% rename from src/main/java/sic/repository/FacturaCompraRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/FacturaCompraRepositoryCustom.java index 3f4e49bf4..7aa01e8d3 100644 --- a/src/main/java/sic/repository/FacturaCompraRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/FacturaCompraRepositoryCustom.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import java.math.BigDecimal; import com.querydsl.core.BooleanBuilder; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; public interface FacturaCompraRepositoryCustom { diff --git a/src/main/java/sic/repository/FacturaRepository.java b/src/main/java/org/opencommercial/repository/FacturaRepository.java similarity index 65% rename from src/main/java/sic/repository/FacturaRepository.java rename to src/main/java/org/opencommercial/repository/FacturaRepository.java index dd379063a..c9fbb4642 100644 --- a/src/main/java/sic/repository/FacturaRepository.java +++ b/src/main/java/org/opencommercial/repository/FacturaRepository.java @@ -1,6 +1,6 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; -import sic.modelo.Factura; +import org.opencommercial.model.Factura; public interface FacturaRepository extends JpaRepository {} diff --git a/src/main/java/sic/repository/FacturaVentaRepository.java b/src/main/java/org/opencommercial/repository/FacturaVentaRepository.java similarity index 90% rename from src/main/java/sic/repository/FacturaVentaRepository.java rename to src/main/java/org/opencommercial/repository/FacturaVentaRepository.java index e97a96701..8eed58b2b 100644 --- a/src/main/java/sic/repository/FacturaVentaRepository.java +++ b/src/main/java/org/opencommercial/repository/FacturaVentaRepository.java @@ -1,14 +1,14 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.FacturaVenta; -import sic.modelo.Remito; -import sic.modelo.TipoDeComprobante; -import sic.repository.projection.EntidadMontoProjection; -import sic.repository.projection.PeriodoMontoProjection; +import org.opencommercial.model.FacturaVenta; +import org.opencommercial.model.Remito; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.repository.projection.EntidadMontoProjection; +import org.opencommercial.repository.projection.PeriodoMontoProjection; import java.util.List; public interface FacturaVentaRepository extends diff --git a/src/main/java/sic/repository/FacturaVentaRepositoryCustom.java b/src/main/java/org/opencommercial/repository/FacturaVentaRepositoryCustom.java similarity index 79% rename from src/main/java/sic/repository/FacturaVentaRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/FacturaVentaRepositoryCustom.java index 9872f0145..02e8cfcc6 100644 --- a/src/main/java/sic/repository/FacturaVentaRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/FacturaVentaRepositoryCustom.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import java.math.BigDecimal; import com.querydsl.core.BooleanBuilder; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; public interface FacturaVentaRepositoryCustom { diff --git a/src/main/java/sic/repository/FormaDePagoRepository.java b/src/main/java/org/opencommercial/repository/FormaDePagoRepository.java similarity index 86% rename from src/main/java/sic/repository/FormaDePagoRepository.java rename to src/main/java/org/opencommercial/repository/FormaDePagoRepository.java index 30cc241fe..234491516 100644 --- a/src/main/java/sic/repository/FormaDePagoRepository.java +++ b/src/main/java/org/opencommercial/repository/FormaDePagoRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; -import sic.modelo.FormaDePago; +import org.opencommercial.model.FormaDePago; public interface FormaDePagoRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/GastoRepository.java b/src/main/java/org/opencommercial/repository/GastoRepository.java similarity index 95% rename from src/main/java/sic/repository/GastoRepository.java rename to src/main/java/org/opencommercial/repository/GastoRepository.java index a63df7d79..884a0a00b 100644 --- a/src/main/java/sic/repository/GastoRepository.java +++ b/src/main/java/org/opencommercial/repository/GastoRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -8,8 +8,8 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Sucursal; -import sic.modelo.Gasto; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.Gasto; public interface GastoRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/GastoRepositoryCustom.java b/src/main/java/org/opencommercial/repository/GastoRepositoryCustom.java similarity index 81% rename from src/main/java/sic/repository/GastoRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/GastoRepositoryCustom.java index a1b383ad3..6e46a83a4 100644 --- a/src/main/java/sic/repository/GastoRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/GastoRepositoryCustom.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import com.querydsl.core.BooleanBuilder; diff --git a/src/main/java/sic/repository/LocalidadRepository.java b/src/main/java/org/opencommercial/repository/LocalidadRepository.java similarity index 85% rename from src/main/java/sic/repository/LocalidadRepository.java rename to src/main/java/org/opencommercial/repository/LocalidadRepository.java index 791fe325a..9c624e336 100644 --- a/src/main/java/sic/repository/LocalidadRepository.java +++ b/src/main/java/org/opencommercial/repository/LocalidadRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; @@ -6,8 +6,8 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Localidad; -import sic.modelo.Provincia; +import org.opencommercial.model.Localidad; +import org.opencommercial.model.Provincia; public interface LocalidadRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/MedidaRepository.java b/src/main/java/org/opencommercial/repository/MedidaRepository.java similarity index 79% rename from src/main/java/sic/repository/MedidaRepository.java rename to src/main/java/org/opencommercial/repository/MedidaRepository.java index b2c86ad94..8e06676a0 100644 --- a/src/main/java/sic/repository/MedidaRepository.java +++ b/src/main/java/org/opencommercial/repository/MedidaRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; -import sic.modelo.Medida; +import org.opencommercial.model.Medida; public interface MedidaRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/NotaCreditoRepository.java b/src/main/java/org/opencommercial/repository/NotaCreditoRepository.java similarity index 82% rename from src/main/java/sic/repository/NotaCreditoRepository.java rename to src/main/java/org/opencommercial/repository/NotaCreditoRepository.java index 0472f71ad..8ff535a52 100644 --- a/src/main/java/sic/repository/NotaCreditoRepository.java +++ b/src/main/java/org/opencommercial/repository/NotaCreditoRepository.java @@ -1,9 +1,13 @@ -package sic.repository; +package org.opencommercial.repository; +import org.opencommercial.model.FacturaCompra; +import org.opencommercial.model.FacturaVenta; +import org.opencommercial.model.NotaCredito; +import org.opencommercial.model.TipoDeComprobante; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.*; + import java.util.List; public interface NotaCreditoRepository extends diff --git a/src/main/java/sic/repository/NotaCreditoRepositoryCustom.java b/src/main/java/org/opencommercial/repository/NotaCreditoRepositoryCustom.java similarity index 75% rename from src/main/java/sic/repository/NotaCreditoRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/NotaCreditoRepositoryCustom.java index b93f191e3..1b3f24d37 100644 --- a/src/main/java/sic/repository/NotaCreditoRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/NotaCreditoRepositoryCustom.java @@ -1,7 +1,7 @@ -package sic.repository; +package org.opencommercial.repository; import com.querydsl.core.BooleanBuilder; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/NotaDebitoRepository.java b/src/main/java/org/opencommercial/repository/NotaDebitoRepository.java similarity index 82% rename from src/main/java/sic/repository/NotaDebitoRepository.java rename to src/main/java/org/opencommercial/repository/NotaDebitoRepository.java index c3a0e6487..1bb95614e 100644 --- a/src/main/java/sic/repository/NotaDebitoRepository.java +++ b/src/main/java/org/opencommercial/repository/NotaDebitoRepository.java @@ -1,9 +1,11 @@ -package sic.repository; +package org.opencommercial.repository; +import org.opencommercial.model.NotaDebito; +import org.opencommercial.model.Recibo; +import org.opencommercial.model.TipoDeComprobante; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.*; public interface NotaDebitoRepository extends NotaRepository, diff --git a/src/main/java/sic/repository/NotaDebitoRepositoryCustom.java b/src/main/java/org/opencommercial/repository/NotaDebitoRepositoryCustom.java similarity index 75% rename from src/main/java/sic/repository/NotaDebitoRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/NotaDebitoRepositoryCustom.java index 3edade25b..cc59e1a32 100644 --- a/src/main/java/sic/repository/NotaDebitoRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/NotaDebitoRepositoryCustom.java @@ -1,7 +1,7 @@ -package sic.repository; +package org.opencommercial.repository; import com.querydsl.core.BooleanBuilder; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/NotaRepository.java b/src/main/java/org/opencommercial/repository/NotaRepository.java similarity index 65% rename from src/main/java/sic/repository/NotaRepository.java rename to src/main/java/org/opencommercial/repository/NotaRepository.java index b67bc23ed..d42bbe795 100644 --- a/src/main/java/sic/repository/NotaRepository.java +++ b/src/main/java/org/opencommercial/repository/NotaRepository.java @@ -1,6 +1,6 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; -import sic.modelo.Nota; +import org.opencommercial.model.Nota; public interface NotaRepository extends JpaRepository {} diff --git a/src/main/java/sic/repository/PedidoRepository.java b/src/main/java/org/opencommercial/repository/PedidoRepository.java similarity index 83% rename from src/main/java/sic/repository/PedidoRepository.java rename to src/main/java/org/opencommercial/repository/PedidoRepository.java index f715a7694..ade522fc7 100644 --- a/src/main/java/sic/repository/PedidoRepository.java +++ b/src/main/java/org/opencommercial/repository/PedidoRepository.java @@ -1,12 +1,14 @@ -package sic.repository; +package org.opencommercial.repository; +import org.opencommercial.model.EstadoPedido; +import org.opencommercial.model.Pedido; +import org.opencommercial.model.Sucursal; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.*; public interface PedidoRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/ProductoFavoritoRepository.java b/src/main/java/org/opencommercial/repository/ProductoFavoritoRepository.java similarity index 83% rename from src/main/java/sic/repository/ProductoFavoritoRepository.java rename to src/main/java/org/opencommercial/repository/ProductoFavoritoRepository.java index 02cca6c0b..44caa0d4d 100644 --- a/src/main/java/sic/repository/ProductoFavoritoRepository.java +++ b/src/main/java/org/opencommercial/repository/ProductoFavoritoRepository.java @@ -1,12 +1,12 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Cliente; -import sic.modelo.Producto; -import sic.modelo.ProductoFavorito; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.Producto; +import org.opencommercial.model.ProductoFavorito; import java.util.List; diff --git a/src/main/java/sic/repository/ProductoRepository.java b/src/main/java/org/opencommercial/repository/ProductoRepository.java similarity index 95% rename from src/main/java/sic/repository/ProductoRepository.java rename to src/main/java/org/opencommercial/repository/ProductoRepository.java index 6c3a9a2bb..cdcc4c565 100644 --- a/src/main/java/sic/repository/ProductoRepository.java +++ b/src/main/java/org/opencommercial/repository/ProductoRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -7,7 +7,7 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Producto; +import org.opencommercial.model.Producto; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/repository/ProductoRepositoryCustom.java b/src/main/java/org/opencommercial/repository/ProductoRepositoryCustom.java similarity index 82% rename from src/main/java/sic/repository/ProductoRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/ProductoRepositoryCustom.java index 109a212cf..a6adf2628 100644 --- a/src/main/java/sic/repository/ProductoRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/ProductoRepositoryCustom.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/ProveedorRepository.java b/src/main/java/org/opencommercial/repository/ProveedorRepository.java similarity index 88% rename from src/main/java/sic/repository/ProveedorRepository.java rename to src/main/java/org/opencommercial/repository/ProveedorRepository.java index b7c11cc32..165b6cb3c 100644 --- a/src/main/java/sic/repository/ProveedorRepository.java +++ b/src/main/java/org/opencommercial/repository/ProveedorRepository.java @@ -1,10 +1,10 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.Proveedor; +import org.opencommercial.model.Proveedor; public interface ProveedorRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/ProvinciaRepository.java b/src/main/java/org/opencommercial/repository/ProvinciaRepository.java similarity index 87% rename from src/main/java/sic/repository/ProvinciaRepository.java rename to src/main/java/org/opencommercial/repository/ProvinciaRepository.java index f12ab56aa..2a17b3b23 100644 --- a/src/main/java/sic/repository/ProvinciaRepository.java +++ b/src/main/java/org/opencommercial/repository/ProvinciaRepository.java @@ -1,11 +1,11 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import sic.modelo.Provincia; +import org.opencommercial.model.Provincia; public interface ProvinciaRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/ReciboRepository.java b/src/main/java/org/opencommercial/repository/ReciboRepository.java similarity index 97% rename from src/main/java/sic/repository/ReciboRepository.java rename to src/main/java/org/opencommercial/repository/ReciboRepository.java index 16cd77dec..a718c8a64 100644 --- a/src/main/java/sic/repository/ReciboRepository.java +++ b/src/main/java/org/opencommercial/repository/ReciboRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -9,8 +9,8 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Sucursal; -import sic.modelo.Recibo; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.Recibo; public interface ReciboRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/ReciboRepositoryCustom.java b/src/main/java/org/opencommercial/repository/ReciboRepositoryCustom.java similarity index 81% rename from src/main/java/sic/repository/ReciboRepositoryCustom.java rename to src/main/java/org/opencommercial/repository/ReciboRepositoryCustom.java index 5cc036b4a..2646a3df4 100644 --- a/src/main/java/sic/repository/ReciboRepositoryCustom.java +++ b/src/main/java/org/opencommercial/repository/ReciboRepositoryCustom.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import com.querydsl.core.BooleanBuilder; diff --git a/src/main/java/sic/repository/RemitoRepository.java b/src/main/java/org/opencommercial/repository/RemitoRepository.java similarity index 86% rename from src/main/java/sic/repository/RemitoRepository.java rename to src/main/java/org/opencommercial/repository/RemitoRepository.java index d20c58e37..cec361178 100644 --- a/src/main/java/sic/repository/RemitoRepository.java +++ b/src/main/java/org/opencommercial/repository/RemitoRepository.java @@ -1,10 +1,10 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Remito; +import org.opencommercial.model.Remito; public interface RemitoRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/RenglonCuentaCorrienteRepository.java b/src/main/java/org/opencommercial/repository/RenglonCuentaCorrienteRepository.java similarity index 95% rename from src/main/java/sic/repository/RenglonCuentaCorrienteRepository.java rename to src/main/java/org/opencommercial/repository/RenglonCuentaCorrienteRepository.java index 6632d900c..9e7ef1ddb 100644 --- a/src/main/java/sic/repository/RenglonCuentaCorrienteRepository.java +++ b/src/main/java/org/opencommercial/repository/RenglonCuentaCorrienteRepository.java @@ -1,11 +1,11 @@ -package sic.repository; +package org.opencommercial.repository; +import org.opencommercial.model.*; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import sic.modelo.*; import java.util.List; diff --git a/src/main/java/sic/repository/RenglonFacturaRepository.java b/src/main/java/org/opencommercial/repository/RenglonFacturaRepository.java similarity index 64% rename from src/main/java/sic/repository/RenglonFacturaRepository.java rename to src/main/java/org/opencommercial/repository/RenglonFacturaRepository.java index 438592072..173828fd3 100644 --- a/src/main/java/sic/repository/RenglonFacturaRepository.java +++ b/src/main/java/org/opencommercial/repository/RenglonFacturaRepository.java @@ -1,7 +1,7 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; -import sic.modelo.RenglonFactura; +import org.opencommercial.model.RenglonFactura; public interface RenglonFacturaRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/RenglonPedidoRepository.java b/src/main/java/org/opencommercial/repository/RenglonPedidoRepository.java similarity index 91% rename from src/main/java/sic/repository/RenglonPedidoRepository.java rename to src/main/java/org/opencommercial/repository/RenglonPedidoRepository.java index 6205c8414..fa03ae420 100644 --- a/src/main/java/sic/repository/RenglonPedidoRepository.java +++ b/src/main/java/org/opencommercial/repository/RenglonPedidoRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; -import sic.modelo.RenglonPedido; +import org.opencommercial.model.RenglonPedido; import java.util.List; public interface RenglonPedidoRepository extends PagingAndSortingRepository { diff --git a/src/main/java/sic/repository/RenglonRemitoRepository.java b/src/main/java/org/opencommercial/repository/RenglonRemitoRepository.java similarity index 86% rename from src/main/java/sic/repository/RenglonRemitoRepository.java rename to src/main/java/org/opencommercial/repository/RenglonRemitoRepository.java index aac2cff07..45d44d062 100644 --- a/src/main/java/sic/repository/RenglonRemitoRepository.java +++ b/src/main/java/org/opencommercial/repository/RenglonRemitoRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; -import sic.modelo.RenglonRemito; +import org.opencommercial.model.RenglonRemito; import java.util.List; diff --git a/src/main/java/sic/repository/RenglonTraspasoRepository.java b/src/main/java/org/opencommercial/repository/RenglonTraspasoRepository.java similarity index 86% rename from src/main/java/sic/repository/RenglonTraspasoRepository.java rename to src/main/java/org/opencommercial/repository/RenglonTraspasoRepository.java index b8b2dc3b0..182df8101 100644 --- a/src/main/java/sic/repository/RenglonTraspasoRepository.java +++ b/src/main/java/org/opencommercial/repository/RenglonTraspasoRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; -import sic.modelo.RenglonTraspaso; +import org.opencommercial.model.RenglonTraspaso; import java.util.List; diff --git a/src/main/java/sic/repository/RubroRepository.java b/src/main/java/org/opencommercial/repository/RubroRepository.java similarity index 79% rename from src/main/java/sic/repository/RubroRepository.java rename to src/main/java/org/opencommercial/repository/RubroRepository.java index 3336b4958..4aaf0dee3 100644 --- a/src/main/java/sic/repository/RubroRepository.java +++ b/src/main/java/org/opencommercial/repository/RubroRepository.java @@ -1,9 +1,9 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; -import sic.modelo.Rubro; +import org.opencommercial.model.Rubro; public interface RubroRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/SucursalRepository.java b/src/main/java/org/opencommercial/repository/SucursalRepository.java similarity index 88% rename from src/main/java/sic/repository/SucursalRepository.java rename to src/main/java/org/opencommercial/repository/SucursalRepository.java index df5fa5d44..8956f246c 100644 --- a/src/main/java/sic/repository/SucursalRepository.java +++ b/src/main/java/org/opencommercial/repository/SucursalRepository.java @@ -1,10 +1,10 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; -import sic.modelo.Sucursal; +import org.opencommercial.model.Sucursal; public interface SucursalRepository extends JpaRepository { diff --git a/src/main/java/sic/repository/TokenAccesoExcluidoRepository.java b/src/main/java/org/opencommercial/repository/TokenAccesoExcluidoRepository.java similarity index 78% rename from src/main/java/sic/repository/TokenAccesoExcluidoRepository.java rename to src/main/java/org/opencommercial/repository/TokenAccesoExcluidoRepository.java index 89eb0b9e3..f19474c23 100644 --- a/src/main/java/sic/repository/TokenAccesoExcluidoRepository.java +++ b/src/main/java/org/opencommercial/repository/TokenAccesoExcluidoRepository.java @@ -1,8 +1,8 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.TokenAccesoExcluido; +import org.opencommercial.model.TokenAccesoExcluido; public interface TokenAccesoExcluidoRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/TransportistaRepository.java b/src/main/java/org/opencommercial/repository/TransportistaRepository.java similarity index 84% rename from src/main/java/sic/repository/TransportistaRepository.java rename to src/main/java/org/opencommercial/repository/TransportistaRepository.java index 42719df9c..1e8f3e128 100644 --- a/src/main/java/sic/repository/TransportistaRepository.java +++ b/src/main/java/org/opencommercial/repository/TransportistaRepository.java @@ -1,10 +1,10 @@ -package sic.repository; +package org.opencommercial.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.Transportista; +import org.opencommercial.model.Transportista; public interface TransportistaRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/TraspasoRepository.java b/src/main/java/org/opencommercial/repository/TraspasoRepository.java similarity index 82% rename from src/main/java/sic/repository/TraspasoRepository.java rename to src/main/java/org/opencommercial/repository/TraspasoRepository.java index 56290c4d8..d7b1f3d27 100644 --- a/src/main/java/sic/repository/TraspasoRepository.java +++ b/src/main/java/org/opencommercial/repository/TraspasoRepository.java @@ -1,8 +1,8 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.Traspaso; +import org.opencommercial.model.Traspaso; import java.util.List; diff --git a/src/main/java/sic/repository/UbicacionRepository.java b/src/main/java/org/opencommercial/repository/UbicacionRepository.java similarity index 76% rename from src/main/java/sic/repository/UbicacionRepository.java rename to src/main/java/org/opencommercial/repository/UbicacionRepository.java index 2c11db8d7..f326b13e0 100644 --- a/src/main/java/sic/repository/UbicacionRepository.java +++ b/src/main/java/org/opencommercial/repository/UbicacionRepository.java @@ -1,8 +1,8 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QuerydslPredicateExecutor; -import sic.modelo.Ubicacion; +import org.opencommercial.model.Ubicacion; public interface UbicacionRepository extends JpaRepository, diff --git a/src/main/java/sic/repository/UsuarioRepository.java b/src/main/java/org/opencommercial/repository/UsuarioRepository.java similarity index 93% rename from src/main/java/sic/repository/UsuarioRepository.java rename to src/main/java/org/opencommercial/repository/UsuarioRepository.java index e55f07fa3..464a988f3 100644 --- a/src/main/java/sic/repository/UsuarioRepository.java +++ b/src/main/java/org/opencommercial/repository/UsuarioRepository.java @@ -1,4 +1,4 @@ -package sic.repository; +package org.opencommercial.repository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -6,8 +6,8 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.repository.query.Param; -import sic.modelo.Rol; -import sic.modelo.Usuario; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Usuario; import java.util.Optional; public interface UsuarioRepository extends diff --git a/src/main/java/sic/repository/custom/CajaRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/CajaRepositoryImpl.java similarity index 86% rename from src/main/java/sic/repository/custom/CajaRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/CajaRepositoryImpl.java index 74b8a5fa2..85482d2d2 100644 --- a/src/main/java/sic/repository/custom/CajaRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/CajaRepositoryImpl.java @@ -1,9 +1,9 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QCaja; -import sic.repository.CajaRepositoryCustom; +import org.opencommercial.model.QCaja; +import org.opencommercial.repository.CajaRepositoryCustom; import jakarta.persistence.PersistenceContext; import jakarta.persistence.EntityManager; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/custom/FacturaCompraRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/FacturaCompraRepositoryImpl.java similarity index 86% rename from src/main/java/sic/repository/custom/FacturaCompraRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/FacturaCompraRepositoryImpl.java index 6797cd4dc..d3b1ea8a5 100644 --- a/src/main/java/sic/repository/custom/FacturaCompraRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/FacturaCompraRepositoryImpl.java @@ -1,13 +1,13 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import java.math.BigDecimal; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QFacturaCompra; -import sic.modelo.TipoDeComprobante; -import sic.repository.FacturaCompraRepositoryCustom; +import org.opencommercial.model.QFacturaCompra; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.repository.FacturaCompraRepositoryCustom; public class FacturaCompraRepositoryImpl implements FacturaCompraRepositoryCustom { diff --git a/src/main/java/sic/repository/custom/FacturaVentaRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/FacturaVentaRepositoryImpl.java similarity index 87% rename from src/main/java/sic/repository/custom/FacturaVentaRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/FacturaVentaRepositoryImpl.java index c15771f7e..04f2f9cc5 100644 --- a/src/main/java/sic/repository/custom/FacturaVentaRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/FacturaVentaRepositoryImpl.java @@ -1,12 +1,15 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; -import java.math.BigDecimal; -import jakarta.persistence.EntityManager; -import jakarta.persistence.PersistenceContext; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.*; -import sic.repository.FacturaVentaRepositoryCustom; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import org.opencommercial.model.QFacturaVenta; +import org.opencommercial.model.QRenglonFactura; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.repository.FacturaVentaRepositoryCustom; + +import java.math.BigDecimal; public class FacturaVentaRepositoryImpl implements FacturaVentaRepositoryCustom { diff --git a/src/main/java/sic/repository/custom/GastoRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/GastoRepositoryImpl.java similarity index 81% rename from src/main/java/sic/repository/custom/GastoRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/GastoRepositoryImpl.java index 0103aff91..01642d954 100644 --- a/src/main/java/sic/repository/custom/GastoRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/GastoRepositoryImpl.java @@ -1,9 +1,9 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QGasto; -import sic.repository.GastoRepositoryCustom; +import org.opencommercial.model.QGasto; +import org.opencommercial.repository.GastoRepositoryCustom; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; diff --git a/src/main/java/sic/repository/custom/NotaCreditoRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/NotaCreditoRepositoryImpl.java similarity index 86% rename from src/main/java/sic/repository/custom/NotaCreditoRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/NotaCreditoRepositoryImpl.java index 425c3592a..96a79f8e0 100644 --- a/src/main/java/sic/repository/custom/NotaCreditoRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/NotaCreditoRepositoryImpl.java @@ -1,10 +1,10 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QNotaCredito; -import sic.modelo.TipoDeComprobante; -import sic.repository.NotaCreditoRepositoryCustom; +import org.opencommercial.model.QNotaCredito; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.repository.NotaCreditoRepositoryCustom; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/custom/NotaDebitoRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/NotaDebitoRepositoryImpl.java similarity index 87% rename from src/main/java/sic/repository/custom/NotaDebitoRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/NotaDebitoRepositoryImpl.java index a5fbd35d2..11e9acf7a 100644 --- a/src/main/java/sic/repository/custom/NotaDebitoRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/NotaDebitoRepositoryImpl.java @@ -1,10 +1,10 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QNotaDebito; -import sic.modelo.TipoDeComprobante; -import sic.repository.NotaDebitoRepositoryCustom; +import org.opencommercial.model.QNotaDebito; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.repository.NotaDebitoRepositoryCustom; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/custom/ProductoRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/ProductoRepositoryImpl.java similarity index 83% rename from src/main/java/sic/repository/custom/ProductoRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/ProductoRepositoryImpl.java index bd21f98cf..fa035e272 100644 --- a/src/main/java/sic/repository/custom/ProductoRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/ProductoRepositoryImpl.java @@ -1,4 +1,4 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import java.math.BigDecimal; import jakarta.persistence.EntityManager; @@ -6,8 +6,8 @@ import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QProducto; -import sic.repository.ProductoRepositoryCustom; +import org.opencommercial.model.QProducto; +import org.opencommercial.repository.ProductoRepositoryCustom; public class ProductoRepositoryImpl implements ProductoRepositoryCustom { diff --git a/src/main/java/sic/repository/custom/ReciboRepositoryImpl.java b/src/main/java/org/opencommercial/repository/custom/ReciboRepositoryImpl.java similarity index 81% rename from src/main/java/sic/repository/custom/ReciboRepositoryImpl.java rename to src/main/java/org/opencommercial/repository/custom/ReciboRepositoryImpl.java index 2a5329a35..49a37652a 100644 --- a/src/main/java/sic/repository/custom/ReciboRepositoryImpl.java +++ b/src/main/java/org/opencommercial/repository/custom/ReciboRepositoryImpl.java @@ -1,9 +1,9 @@ -package sic.repository.custom; +package org.opencommercial.repository.custom; import com.querydsl.core.BooleanBuilder; import com.querydsl.jpa.impl.JPAQueryFactory; -import sic.modelo.QRecibo; -import sic.repository.ReciboRepositoryCustom; +import org.opencommercial.model.QRecibo; +import org.opencommercial.repository.ReciboRepositoryCustom; import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; diff --git a/src/main/java/sic/repository/projection/EntidadMontoProjection.java b/src/main/java/org/opencommercial/repository/projection/EntidadMontoProjection.java similarity index 71% rename from src/main/java/sic/repository/projection/EntidadMontoProjection.java rename to src/main/java/org/opencommercial/repository/projection/EntidadMontoProjection.java index 72033f914..92b209fd4 100644 --- a/src/main/java/sic/repository/projection/EntidadMontoProjection.java +++ b/src/main/java/org/opencommercial/repository/projection/EntidadMontoProjection.java @@ -1,4 +1,4 @@ -package sic.repository.projection; +package org.opencommercial.repository.projection; import java.math.BigDecimal; diff --git a/src/main/java/sic/repository/projection/PeriodoMontoProjection.java b/src/main/java/org/opencommercial/repository/projection/PeriodoMontoProjection.java similarity index 71% rename from src/main/java/sic/repository/projection/PeriodoMontoProjection.java rename to src/main/java/org/opencommercial/repository/projection/PeriodoMontoProjection.java index 2ba6129c3..07d2ddb14 100644 --- a/src/main/java/sic/repository/projection/PeriodoMontoProjection.java +++ b/src/main/java/org/opencommercial/repository/projection/PeriodoMontoProjection.java @@ -1,4 +1,4 @@ -package sic.repository.projection; +package org.opencommercial.repository.projection; import java.math.BigDecimal; diff --git a/src/main/java/sic/service/AfipTaxationServiceImpl.java b/src/main/java/org/opencommercial/service/AfipTaxationServiceImpl.java similarity index 98% rename from src/main/java/sic/service/AfipTaxationServiceImpl.java rename to src/main/java/org/opencommercial/service/AfipTaxationServiceImpl.java index 498df9d0c..85db9adff 100644 --- a/src/main/java/sic/service/AfipTaxationServiceImpl.java +++ b/src/main/java/org/opencommercial/service/AfipTaxationServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import afip.wsaa.wsdl.LoginCms; import afip.wsfe.wsdl.*; @@ -6,15 +6,15 @@ import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.io.SAXReader; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.embeddable.ClienteEmbeddable; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.ws.client.WebServiceClientException; import org.xml.sax.SAXException; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.embeddable.ClienteEmbeddable; import java.io.IOException; import java.io.Reader; diff --git a/src/main/java/sic/service/AfipWebServiceSOAPClient.java b/src/main/java/org/opencommercial/service/AfipWebServiceSOAPClient.java similarity index 98% rename from src/main/java/sic/service/AfipWebServiceSOAPClient.java rename to src/main/java/org/opencommercial/service/AfipWebServiceSOAPClient.java index 6b30f8ecf..f73bd464f 100644 --- a/src/main/java/sic/service/AfipWebServiceSOAPClient.java +++ b/src/main/java/org/opencommercial/service/AfipWebServiceSOAPClient.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import afip.wsaa.wsdl.LoginCms; import afip.wsaa.wsdl.LoginCmsResponse; @@ -13,8 +13,8 @@ import org.springframework.ws.client.core.support.WebServiceGatewaySupport; import org.springframework.ws.soap.SoapMessage; import org.springframework.xml.transform.StringResult; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/src/main/java/sic/service/AuthService.java b/src/main/java/org/opencommercial/service/AuthService.java similarity index 86% rename from src/main/java/sic/service/AuthService.java rename to src/main/java/org/opencommercial/service/AuthService.java index 7886d4243..8dde00ef3 100644 --- a/src/main/java/sic/service/AuthService.java +++ b/src/main/java/org/opencommercial/service/AuthService.java @@ -1,7 +1,7 @@ -package sic.service; +package org.opencommercial.service; import io.jsonwebtoken.Claims; -import sic.modelo.Rol; +import org.opencommercial.model.Rol; import java.util.List; diff --git a/src/main/java/sic/service/AuthServiceImpl.java b/src/main/java/org/opencommercial/service/AuthServiceImpl.java similarity index 93% rename from src/main/java/sic/service/AuthServiceImpl.java rename to src/main/java/org/opencommercial/service/AuthServiceImpl.java index e7e63c146..db7f29efc 100644 --- a/src/main/java/sic/service/AuthServiceImpl.java +++ b/src/main/java/org/opencommercial/service/AuthServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtException; @@ -11,12 +11,12 @@ import org.springframework.stereotype.Service; import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; -import sic.exception.BusinessServiceException; -import sic.exception.UnauthorizedException; -import sic.modelo.ReCaptchaResponse; -import sic.modelo.Rol; -import sic.modelo.TokenAccesoExcluido; -import sic.repository.TokenAccesoExcluidoRepository; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.UnauthorizedException; +import org.opencommercial.model.ReCaptchaResponse; +import org.opencommercial.model.Rol; +import org.opencommercial.model.TokenAccesoExcluido; +import org.opencommercial.repository.TokenAccesoExcluidoRepository; import javax.crypto.spec.SecretKeySpec; import java.time.LocalDateTime; diff --git a/src/main/java/sic/service/CajaService.java b/src/main/java/org/opencommercial/service/CajaService.java similarity index 85% rename from src/main/java/sic/service/CajaService.java rename to src/main/java/org/opencommercial/service/CajaService.java index c1ca77ad0..5ed1a3aca 100644 --- a/src/main/java/sic/service/CajaService.java +++ b/src/main/java/org/opencommercial/service/CajaService.java @@ -1,14 +1,14 @@ -package sic.service; +package org.opencommercial.service; + +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaCajaCriteria; +import org.springframework.data.domain.Page; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; import java.util.Map; -import org.springframework.data.domain.Page; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaCajaCriteria; - public interface CajaService { void actualizar(Caja caja); @@ -42,7 +42,7 @@ public interface CajaService { BigDecimal getSaldoRealCajas(BusquedaCajaCriteria criteria); List getMovimientosPorFormaDePagoEntreFechas( - Sucursal sucursal, FormaDePago formaDePago, LocalDateTime desde, LocalDateTime hasta); + Sucursal sucursal, FormaDePago formaDePago, LocalDateTime desde, LocalDateTime hasta); void reabrirCaja(long idCaja, BigDecimal saldoInicial); diff --git a/src/main/java/sic/service/CajaServiceImpl.java b/src/main/java/org/opencommercial/service/CajaServiceImpl.java similarity index 97% rename from src/main/java/sic/service/CajaServiceImpl.java rename to src/main/java/org/opencommercial/service/CajaServiceImpl.java index 9d83c15d4..50db27d0f 100644 --- a/src/main/java/sic/service/CajaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/CajaServiceImpl.java @@ -1,8 +1,13 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaCajaCriteria; +import org.opencommercial.repository.CajaRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -12,11 +17,6 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaCajaCriteria; -import sic.repository.CajaRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -366,7 +366,7 @@ public BigDecimal getSaldoRealCajas(BusquedaCajaCriteria criteria) { @Override public List getMovimientosPorFormaDePagoEntreFechas( - Sucursal sucursal, FormaDePago formaDePago, LocalDateTime desde, LocalDateTime hasta) { + Sucursal sucursal, FormaDePago formaDePago, LocalDateTime desde, LocalDateTime hasta) { List movimientos = new ArrayList<>(); gastoService .getGastosEntreFechasYFormaDePago(sucursal, formaDePago, desde, hasta) diff --git a/src/main/java/sic/service/CarritoCompraService.java b/src/main/java/org/opencommercial/service/CarritoCompraService.java similarity index 74% rename from src/main/java/sic/service/CarritoCompraService.java rename to src/main/java/org/opencommercial/service/CarritoCompraService.java index 223b7afe3..fd6438ff4 100644 --- a/src/main/java/sic/service/CarritoCompraService.java +++ b/src/main/java/org/opencommercial/service/CarritoCompraService.java @@ -1,15 +1,15 @@ -package sic.service; +package org.opencommercial.service; import java.math.BigDecimal; import java.util.List; import org.springframework.data.domain.Page; -import sic.modelo.ItemCarritoCompra; -import sic.modelo.Pedido; -import sic.modelo.Usuario; -import sic.modelo.dto.CarritoCompraDTO; -import sic.modelo.dto.NuevaOrdenDePagoDTO; -import sic.modelo.dto.ProductoFaltanteDTO; +import org.opencommercial.model.ItemCarritoCompra; +import org.opencommercial.model.Pedido; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.dto.CarritoCompraDTO; +import org.opencommercial.model.dto.NuevaOrdenDePagoDTO; +import org.opencommercial.model.dto.ProductoFaltanteDTO; public interface CarritoCompraService { diff --git a/src/main/java/sic/service/CarritoCompraServiceImpl.java b/src/main/java/org/opencommercial/service/CarritoCompraServiceImpl.java similarity index 95% rename from src/main/java/sic/service/CarritoCompraServiceImpl.java rename to src/main/java/org/opencommercial/service/CarritoCompraServiceImpl.java index a61ebfb2b..7db39ed86 100644 --- a/src/main/java/sic/service/CarritoCompraServiceImpl.java +++ b/src/main/java/org/opencommercial/service/CarritoCompraServiceImpl.java @@ -1,6 +1,13 @@ -package sic.service; +package org.opencommercial.service; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.CarritoCompraDTO; +import org.opencommercial.model.dto.NuevaOrdenDePagoDTO; +import org.opencommercial.model.dto.ProductoFaltanteDTO; +import org.opencommercial.model.dto.ProductosParaVerificarStockDTO; +import org.opencommercial.repository.CarritoCompraRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -9,13 +16,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.dto.CarritoCompraDTO; -import sic.modelo.dto.NuevaOrdenDePagoDTO; -import sic.modelo.dto.ProductoFaltanteDTO; -import sic.modelo.dto.ProductosParaVerificarStockDTO; -import sic.repository.CarritoCompraRepository; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/src/main/java/sic/service/ClienteService.java b/src/main/java/org/opencommercial/service/ClienteService.java similarity index 76% rename from src/main/java/sic/service/ClienteService.java rename to src/main/java/org/opencommercial/service/ClienteService.java index 98f84466b..e266e14e2 100644 --- a/src/main/java/sic/service/ClienteService.java +++ b/src/main/java/org/opencommercial/service/ClienteService.java @@ -1,9 +1,11 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.*; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.criteria.BusquedaClienteCriteria; +import org.opencommercial.model.embeddable.ClienteEmbeddable; import org.springframework.data.domain.Page; -import sic.modelo.criteria.BusquedaClienteCriteria; -import sic.modelo.embeddable.ClienteEmbeddable; public interface ClienteService { diff --git a/src/main/java/sic/service/ClienteServiceImpl.java b/src/main/java/org/opencommercial/service/ClienteServiceImpl.java similarity index 97% rename from src/main/java/sic/service/ClienteServiceImpl.java rename to src/main/java/org/opencommercial/service/ClienteServiceImpl.java index 1cba8f1c2..65df6c33f 100644 --- a/src/main/java/sic/service/ClienteServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ClienteServiceImpl.java @@ -1,8 +1,14 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaClienteCriteria; +import org.opencommercial.model.embeddable.ClienteEmbeddable; +import org.opencommercial.repository.ClienteRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -11,12 +17,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaClienteCriteria; -import sic.modelo.embeddable.ClienteEmbeddable; -import sic.repository.ClienteRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/service/ClockService.java b/src/main/java/org/opencommercial/service/ClockService.java similarity index 84% rename from src/main/java/sic/service/ClockService.java rename to src/main/java/org/opencommercial/service/ClockService.java index e72b157c5..f6664c306 100644 --- a/src/main/java/sic/service/ClockService.java +++ b/src/main/java/org/opencommercial/service/ClockService.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import java.time.LocalDateTime; diff --git a/src/main/java/sic/service/ClockServiceImpl.java b/src/main/java/org/opencommercial/service/ClockServiceImpl.java similarity index 96% rename from src/main/java/sic/service/ClockServiceImpl.java rename to src/main/java/org/opencommercial/service/ClockServiceImpl.java index f3f7cdb29..8e38e01a3 100644 --- a/src/main/java/sic/service/ClockServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ClockServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/sic/service/CloudinaryImageUploaderServiceImpl.java b/src/main/java/org/opencommercial/service/CloudinaryImageUploaderServiceImpl.java similarity index 96% rename from src/main/java/sic/service/CloudinaryImageUploaderServiceImpl.java rename to src/main/java/org/opencommercial/service/CloudinaryImageUploaderServiceImpl.java index 21af1cb50..0d5fcfdfe 100644 --- a/src/main/java/sic/service/CloudinaryImageUploaderServiceImpl.java +++ b/src/main/java/org/opencommercial/service/CloudinaryImageUploaderServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import com.cloudinary.Cloudinary; import com.cloudinary.Transformation; @@ -8,7 +8,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; -import sic.exception.ServiceException; +import org.opencommercial.exception.ServiceException; import java.io.IOException; import java.util.Locale; diff --git a/src/main/java/sic/service/ConfiguracionSucursalService.java b/src/main/java/org/opencommercial/service/ConfiguracionSucursalService.java similarity index 86% rename from src/main/java/sic/service/ConfiguracionSucursalService.java rename to src/main/java/org/opencommercial/service/ConfiguracionSucursalService.java index 6c77c4b1d..f23352bfa 100644 --- a/src/main/java/sic/service/ConfiguracionSucursalService.java +++ b/src/main/java/org/opencommercial/service/ConfiguracionSucursalService.java @@ -1,6 +1,6 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.ConfiguracionSucursal; +import org.opencommercial.model.ConfiguracionSucursal; public interface ConfiguracionSucursalService { diff --git a/src/main/java/sic/service/ConfiguracionSucursalServiceImpl.java b/src/main/java/org/opencommercial/service/ConfiguracionSucursalServiceImpl.java similarity index 96% rename from src/main/java/sic/service/ConfiguracionSucursalServiceImpl.java rename to src/main/java/org/opencommercial/service/ConfiguracionSucursalServiceImpl.java index 96b9b20dd..bac26265f 100644 --- a/src/main/java/sic/service/ConfiguracionSucursalServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ConfiguracionSucursalServiceImpl.java @@ -1,15 +1,15 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.ConfiguracionSucursal; +import org.opencommercial.repository.ConfiguracionSucursalRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.ConfiguracionSucursal; -import sic.repository.ConfiguracionSucursalRepository; -import sic.util.CustomValidator; import java.util.Locale; diff --git a/src/main/java/sic/service/CuentaCorrienteService.java b/src/main/java/org/opencommercial/service/CuentaCorrienteService.java similarity index 91% rename from src/main/java/sic/service/CuentaCorrienteService.java rename to src/main/java/org/opencommercial/service/CuentaCorrienteService.java index bd562cb56..4330466d6 100644 --- a/src/main/java/sic/service/CuentaCorrienteService.java +++ b/src/main/java/org/opencommercial/service/CuentaCorrienteService.java @@ -1,12 +1,13 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteClienteCriteria; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteProveedorCriteria; +import org.opencommercial.util.FormatoReporte; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaCuentaCorrienteClienteCriteria; -import sic.modelo.criteria.BusquedaCuentaCorrienteProveedorCriteria; -import sic.util.FormatoReporte; + import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/service/CuentaCorrienteServiceImpl.java b/src/main/java/org/opencommercial/service/CuentaCorrienteServiceImpl.java similarity index 96% rename from src/main/java/sic/service/CuentaCorrienteServiceImpl.java rename to src/main/java/org/opencommercial/service/CuentaCorrienteServiceImpl.java index 67b879739..3a7726304 100644 --- a/src/main/java/sic/service/CuentaCorrienteServiceImpl.java +++ b/src/main/java/org/opencommercial/service/CuentaCorrienteServiceImpl.java @@ -1,7 +1,19 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteClienteCriteria; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteProveedorCriteria; +import org.opencommercial.repository.CuentaCorrienteClienteRepository; +import org.opencommercial.repository.CuentaCorrienteProveedorRepository; +import org.opencommercial.repository.CuentaCorrienteRepository; +import org.opencommercial.repository.RenglonCuentaCorrienteRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; @@ -11,18 +23,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaCuentaCorrienteClienteCriteria; -import sic.modelo.criteria.BusquedaCuentaCorrienteProveedorCriteria; -import sic.repository.CuentaCorrienteClienteRepository; -import sic.repository.CuentaCorrienteProveedorRepository; -import sic.repository.CuentaCorrienteRepository; -import sic.repository.RenglonCuentaCorrienteRepository; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/EmailService.java b/src/main/java/org/opencommercial/service/EmailService.java similarity index 85% rename from src/main/java/sic/service/EmailService.java rename to src/main/java/org/opencommercial/service/EmailService.java index e45441fe4..fdc503827 100644 --- a/src/main/java/sic/service/EmailService.java +++ b/src/main/java/org/opencommercial/service/EmailService.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; public interface EmailService { diff --git a/src/main/java/sic/service/EmailServiceFactory.java b/src/main/java/org/opencommercial/service/EmailServiceFactory.java similarity index 86% rename from src/main/java/sic/service/EmailServiceFactory.java rename to src/main/java/org/opencommercial/service/EmailServiceFactory.java index be5765539..5c393d8a5 100644 --- a/src/main/java/sic/service/EmailServiceFactory.java +++ b/src/main/java/org/opencommercial/service/EmailServiceFactory.java @@ -1,7 +1,7 @@ -package sic.service; +package org.opencommercial.service; import org.springframework.stereotype.Component; -import sic.exception.ServiceException; +import org.opencommercial.exception.ServiceException; import java.util.Map; diff --git a/src/main/java/sic/service/EstadisticaService.java b/src/main/java/org/opencommercial/service/EstadisticaService.java similarity index 84% rename from src/main/java/sic/service/EstadisticaService.java rename to src/main/java/org/opencommercial/service/EstadisticaService.java index 2f4604a20..9c4af8fc3 100644 --- a/src/main/java/sic/service/EstadisticaService.java +++ b/src/main/java/org/opencommercial/service/EstadisticaService.java @@ -1,7 +1,7 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.dto.EntidadMontoDTO; -import sic.modelo.dto.PeriodoMontoDTO; +import org.opencommercial.model.dto.EntidadMontoDTO; +import org.opencommercial.model.dto.PeriodoMontoDTO; import java.util.List; public interface EstadisticaService { diff --git a/src/main/java/sic/service/EstadisticaServiceImpl.java b/src/main/java/org/opencommercial/service/EstadisticaServiceImpl.java similarity index 93% rename from src/main/java/sic/service/EstadisticaServiceImpl.java rename to src/main/java/org/opencommercial/service/EstadisticaServiceImpl.java index 51363cb99..e28b8af7a 100644 --- a/src/main/java/sic/service/EstadisticaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/EstadisticaServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -8,13 +8,13 @@ import org.springframework.data.domain.PageRequest; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; -import sic.exception.BusinessServiceException; -import sic.modelo.dto.EntidadMontoDTO; -import sic.modelo.dto.PeriodoMontoDTO; -import sic.repository.FacturaCompraRepository; -import sic.repository.FacturaVentaRepository; -import sic.repository.projection.EntidadMontoProjection; -import sic.repository.projection.PeriodoMontoProjection; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.dto.EntidadMontoDTO; +import org.opencommercial.model.dto.PeriodoMontoDTO; +import org.opencommercial.repository.FacturaCompraRepository; +import org.opencommercial.repository.FacturaVentaRepository; +import org.opencommercial.repository.projection.EntidadMontoProjection; +import org.opencommercial.repository.projection.PeriodoMontoProjection; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/service/FacturaCompraService.java b/src/main/java/org/opencommercial/service/FacturaCompraService.java similarity index 69% rename from src/main/java/sic/service/FacturaCompraService.java rename to src/main/java/org/opencommercial/service/FacturaCompraService.java index f2de08e5e..f2a1a5c6d 100644 --- a/src/main/java/sic/service/FacturaCompraService.java +++ b/src/main/java/org/opencommercial/service/FacturaCompraService.java @@ -1,12 +1,12 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import org.springframework.data.domain.Page; -import sic.modelo.FacturaCompra; -import sic.modelo.Proveedor; -import sic.modelo.Sucursal; -import sic.modelo.TipoDeComprobante; -import sic.modelo.criteria.BusquedaFacturaCompraCriteria; +import org.opencommercial.model.FacturaCompra; +import org.opencommercial.model.Proveedor; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.model.criteria.BusquedaFacturaCompraCriteria; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/service/FacturaCompraServiceImpl.java b/src/main/java/org/opencommercial/service/FacturaCompraServiceImpl.java similarity index 96% rename from src/main/java/sic/service/FacturaCompraServiceImpl.java rename to src/main/java/org/opencommercial/service/FacturaCompraServiceImpl.java index fe3fb9b5b..3d7e50afd 100644 --- a/src/main/java/sic/service/FacturaCompraServiceImpl.java +++ b/src/main/java/org/opencommercial/service/FacturaCompraServiceImpl.java @@ -1,17 +1,17 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaCompraCriteria; +import org.opencommercial.repository.FacturaCompraRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaCompraCriteria; -import sic.repository.FacturaCompraRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/src/main/java/sic/service/FacturaService.java b/src/main/java/org/opencommercial/service/FacturaService.java similarity index 90% rename from src/main/java/sic/service/FacturaService.java rename to src/main/java/org/opencommercial/service/FacturaService.java index abdeedf6c..fa065e771 100644 --- a/src/main/java/sic/service/FacturaService.java +++ b/src/main/java/org/opencommercial/service/FacturaService.java @@ -1,15 +1,14 @@ -package sic.service; +package org.opencommercial.service; -import java.math.BigDecimal; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; import org.springframework.data.domain.Pageable; -import sic.modelo.*; + +import java.math.BigDecimal; import java.util.List; import java.util.Map; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.modelo.Resultados; -import sic.modelo.dto.NuevoRenglonFacturaDTO; - public interface FacturaService { Factura getFacturaNoEliminadaPorId(long idFactura); diff --git a/src/main/java/sic/service/FacturaServiceImpl.java b/src/main/java/org/opencommercial/service/FacturaServiceImpl.java similarity index 97% rename from src/main/java/sic/service/FacturaServiceImpl.java rename to src/main/java/org/opencommercial/service/FacturaServiceImpl.java index d1802a000..257f98ba8 100644 --- a/src/main/java/sic/service/FacturaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/FacturaServiceImpl.java @@ -1,6 +1,14 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; +import org.opencommercial.repository.FacturaRepository; +import org.opencommercial.repository.RenglonFacturaRepository; +import org.opencommercial.util.CalculosComprobante; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; @@ -8,14 +16,6 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.repository.FacturaRepository; -import sic.repository.RenglonFacturaRepository; -import sic.util.CalculosComprobante; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/src/main/java/sic/service/FacturaVentaService.java b/src/main/java/org/opencommercial/service/FacturaVentaService.java similarity index 90% rename from src/main/java/sic/service/FacturaVentaService.java rename to src/main/java/org/opencommercial/service/FacturaVentaService.java index 2b7ab9b92..938b18b65 100644 --- a/src/main/java/sic/service/FacturaVentaService.java +++ b/src/main/java/org/opencommercial/service/FacturaVentaService.java @@ -1,10 +1,10 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaVentaCriteria; +import org.opencommercial.model.dto.NuevaFacturaVentaDTO; import org.springframework.data.domain.Page; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaVentaCriteria; -import sic.modelo.dto.NuevaFacturaVentaDTO; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/service/FacturaVentaServiceImpl.java b/src/main/java/org/opencommercial/service/FacturaVentaServiceImpl.java similarity index 98% rename from src/main/java/sic/service/FacturaVentaServiceImpl.java rename to src/main/java/org/opencommercial/service/FacturaVentaServiceImpl.java index 62d744818..31cf5af4c 100644 --- a/src/main/java/sic/service/FacturaVentaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/FacturaVentaServiceImpl.java @@ -1,7 +1,18 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaVentaCriteria; +import org.opencommercial.model.dto.NuevaFacturaVentaDTO; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.repository.FacturaVentaRepository; +import org.opencommercial.util.CalculosComprobante; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; @@ -9,17 +20,6 @@ import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaVentaCriteria; -import sic.modelo.dto.NuevaFacturaVentaDTO; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.repository.FacturaVentaRepository; -import sic.util.CalculosComprobante; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/FormaDePagoService.java b/src/main/java/org/opencommercial/service/FormaDePagoService.java similarity index 77% rename from src/main/java/sic/service/FormaDePagoService.java rename to src/main/java/org/opencommercial/service/FormaDePagoService.java index 0a2290c62..fdd659e3f 100644 --- a/src/main/java/sic/service/FormaDePagoService.java +++ b/src/main/java/org/opencommercial/service/FormaDePagoService.java @@ -1,8 +1,8 @@ -package sic.service; +package org.opencommercial.service; import java.util.List; -import sic.modelo.FormaDePago; -import sic.modelo.FormaDePagoEnum; +import org.opencommercial.model.FormaDePago; +import org.opencommercial.model.FormaDePagoEnum; public interface FormaDePagoService { diff --git a/src/main/java/sic/service/FormaDePagoServiceImpl.java b/src/main/java/org/opencommercial/service/FormaDePagoServiceImpl.java similarity index 94% rename from src/main/java/sic/service/FormaDePagoServiceImpl.java rename to src/main/java/org/opencommercial/service/FormaDePagoServiceImpl.java index 8264684b9..706ac0c08 100644 --- a/src/main/java/sic/service/FormaDePagoServiceImpl.java +++ b/src/main/java/org/opencommercial/service/FormaDePagoServiceImpl.java @@ -1,13 +1,13 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.modelo.FormaDePago; -import sic.modelo.FormaDePagoEnum; -import sic.repository.FormaDePagoRepository; +import org.opencommercial.model.FormaDePago; +import org.opencommercial.model.FormaDePagoEnum; +import org.opencommercial.repository.FormaDePagoRepository; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/service/GastoService.java b/src/main/java/org/opencommercial/service/GastoService.java similarity index 84% rename from src/main/java/sic/service/GastoService.java rename to src/main/java/org/opencommercial/service/GastoService.java index 83f73fae1..d700eef11 100644 --- a/src/main/java/sic/service/GastoService.java +++ b/src/main/java/org/opencommercial/service/GastoService.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -7,10 +7,10 @@ import com.querydsl.core.BooleanBuilder; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import sic.modelo.criteria.BusquedaGastoCriteria; -import sic.modelo.Sucursal; -import sic.modelo.FormaDePago; -import sic.modelo.Gasto; +import org.opencommercial.model.criteria.BusquedaGastoCriteria; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.FormaDePago; +import org.opencommercial.model.Gasto; public interface GastoService { diff --git a/src/main/java/sic/service/GastoServiceImpl.java b/src/main/java/org/opencommercial/service/GastoServiceImpl.java similarity index 95% rename from src/main/java/sic/service/GastoServiceImpl.java rename to src/main/java/org/opencommercial/service/GastoServiceImpl.java index 7ff71ea2b..58ddf6f5a 100644 --- a/src/main/java/sic/service/GastoServiceImpl.java +++ b/src/main/java/org/opencommercial/service/GastoServiceImpl.java @@ -1,8 +1,13 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaGastoCriteria; +import org.opencommercial.repository.GastoRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; @@ -12,11 +17,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaGastoCriteria; -import sic.repository.GastoRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -150,7 +150,7 @@ public Gasto guardar(Gasto gasto) { @Override public List getGastosEntreFechasYFormaDePago( - Sucursal sucursal, FormaDePago formaDePago, LocalDateTime desde, LocalDateTime hasta) { + Sucursal sucursal, FormaDePago formaDePago, LocalDateTime desde, LocalDateTime hasta) { return gastoRepository.getGastosEntreFechasPorFormaDePago( sucursal.getIdSucursal(), formaDePago.getIdFormaDePago(), desde, hasta); } diff --git a/src/main/java/sic/service/GmailEmailServiceImpl.java b/src/main/java/org/opencommercial/service/GmailEmailServiceImpl.java similarity index 96% rename from src/main/java/sic/service/GmailEmailServiceImpl.java rename to src/main/java/org/opencommercial/service/GmailEmailServiceImpl.java index 60e1dac40..4dda521d4 100644 --- a/src/main/java/sic/service/GmailEmailServiceImpl.java +++ b/src/main/java/org/opencommercial/service/GmailEmailServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import jakarta.mail.*; import jakarta.mail.internet.MimeMessage; @@ -10,7 +10,7 @@ import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; -import sic.exception.ServiceException; +import org.opencommercial.exception.ServiceException; import java.util.Locale; import java.util.Properties; diff --git a/src/main/java/sic/service/ImageUploaderService.java b/src/main/java/org/opencommercial/service/ImageUploaderService.java similarity index 83% rename from src/main/java/sic/service/ImageUploaderService.java rename to src/main/java/org/opencommercial/service/ImageUploaderService.java index 1e4074157..15172d6a1 100644 --- a/src/main/java/sic/service/ImageUploaderService.java +++ b/src/main/java/org/opencommercial/service/ImageUploaderService.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; public interface ImageUploaderService { diff --git a/src/main/java/sic/service/MedidaService.java b/src/main/java/org/opencommercial/service/MedidaService.java similarity index 74% rename from src/main/java/sic/service/MedidaService.java rename to src/main/java/org/opencommercial/service/MedidaService.java index 4f46331fa..399adac54 100644 --- a/src/main/java/sic/service/MedidaService.java +++ b/src/main/java/org/opencommercial/service/MedidaService.java @@ -1,8 +1,8 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.TipoDeOperacion; +import org.opencommercial.model.TipoDeOperacion; import java.util.List; -import sic.modelo.Medida; +import org.opencommercial.model.Medida; public interface MedidaService { diff --git a/src/main/java/sic/service/MedidaServiceImpl.java b/src/main/java/org/opencommercial/service/MedidaServiceImpl.java similarity index 91% rename from src/main/java/sic/service/MedidaServiceImpl.java rename to src/main/java/org/opencommercial/service/MedidaServiceImpl.java index 82a6506b1..89fed107e 100644 --- a/src/main/java/sic/service/MedidaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/MedidaServiceImpl.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Medida; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.repository.MedidaRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.Medida; -import sic.modelo.TipoDeOperacion; -import sic.repository.MedidaRepository; -import sic.util.CustomValidator; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/service/MercadoPagoPaymentServiceImpl.java b/src/main/java/org/opencommercial/service/MercadoPagoPaymentServiceImpl.java similarity index 97% rename from src/main/java/sic/service/MercadoPagoPaymentServiceImpl.java rename to src/main/java/org/opencommercial/service/MercadoPagoPaymentServiceImpl.java index 74172db3b..b7c8a4fd0 100644 --- a/src/main/java/sic/service/MercadoPagoPaymentServiceImpl.java +++ b/src/main/java/org/opencommercial/service/MercadoPagoPaymentServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import com.google.gson.Gson; import com.google.gson.JsonObject; @@ -13,18 +13,18 @@ import com.mercadopago.resources.preference.Preference; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevaNotaDebitoDeReciboDTO; +import org.opencommercial.model.dto.NuevaOrdenDePagoDTO; +import org.opencommercial.model.dto.ProductosParaVerificarStockDTO; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.EncryptUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.dto.NuevaNotaDebitoDeReciboDTO; -import sic.modelo.dto.NuevaOrdenDePagoDTO; -import sic.modelo.dto.ProductosParaVerificarStockDTO; -import sic.util.CustomValidator; -import sic.util.EncryptUtils; import java.math.BigDecimal; import java.security.GeneralSecurityException; diff --git a/src/main/java/sic/service/NotaService.java b/src/main/java/org/opencommercial/service/NotaService.java similarity index 91% rename from src/main/java/sic/service/NotaService.java rename to src/main/java/org/opencommercial/service/NotaService.java index ab9981e12..9776783dd 100644 --- a/src/main/java/sic/service/NotaService.java +++ b/src/main/java/org/opencommercial/service/NotaService.java @@ -1,12 +1,12 @@ -package sic.service; - +package org.opencommercial.service; + +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaNotaCriteria; +import org.opencommercial.model.dto.NuevaNotaCreditoDeFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaCreditoSinFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoDeReciboDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoSinReciboDTO; import org.springframework.data.domain.Page; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaNotaCriteria; -import sic.modelo.dto.NuevaNotaCreditoDeFacturaDTO; -import sic.modelo.dto.NuevaNotaCreditoSinFacturaDTO; -import sic.modelo.dto.NuevaNotaDebitoDeReciboDTO; -import sic.modelo.dto.NuevaNotaDebitoSinReciboDTO; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/sic/service/NotaServiceImpl.java b/src/main/java/org/opencommercial/service/NotaServiceImpl.java similarity index 98% rename from src/main/java/sic/service/NotaServiceImpl.java rename to src/main/java/org/opencommercial/service/NotaServiceImpl.java index dfc92a361..706032057 100644 --- a/src/main/java/sic/service/NotaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/NotaServiceImpl.java @@ -1,8 +1,22 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaNotaCriteria; +import org.opencommercial.model.dto.NuevaNotaCreditoDeFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaCreditoSinFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoDeReciboDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoSinReciboDTO; +import org.opencommercial.repository.NotaCreditoRepository; +import org.opencommercial.repository.NotaDebitoRepository; +import org.opencommercial.repository.NotaRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; @@ -12,20 +26,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaNotaCriteria; -import sic.modelo.dto.NuevaNotaCreditoDeFacturaDTO; -import sic.modelo.dto.NuevaNotaCreditoSinFacturaDTO; -import sic.modelo.dto.NuevaNotaDebitoDeReciboDTO; -import sic.modelo.dto.NuevaNotaDebitoSinReciboDTO; -import sic.repository.NotaCreditoRepository; -import sic.repository.NotaDebitoRepository; -import sic.repository.NotaRepository; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/PaymentService.java b/src/main/java/org/opencommercial/service/PaymentService.java similarity index 76% rename from src/main/java/sic/service/PaymentService.java rename to src/main/java/org/opencommercial/service/PaymentService.java index b4a574045..f11e7caaa 100644 --- a/src/main/java/sic/service/PaymentService.java +++ b/src/main/java/org/opencommercial/service/PaymentService.java @@ -1,6 +1,6 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.dto.NuevaOrdenDePagoDTO; +import org.opencommercial.model.dto.NuevaOrdenDePagoDTO; import java.util.List; public interface PaymentService { diff --git a/src/main/java/sic/service/PedidoService.java b/src/main/java/org/opencommercial/service/PedidoService.java similarity index 87% rename from src/main/java/sic/service/PedidoService.java rename to src/main/java/org/opencommercial/service/PedidoService.java index ba5f88152..43efc5b4e 100644 --- a/src/main/java/sic/service/PedidoService.java +++ b/src/main/java/org/opencommercial/service/PedidoService.java @@ -1,15 +1,14 @@ -package sic.service; - -import java.math.BigDecimal; -import java.util.List; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaPedidoCriteria; +import org.opencommercial.model.dto.NuevoRenglonPedidoDTO; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; import org.springframework.data.domain.Page; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaPedidoCriteria; -import sic.modelo.dto.NuevoRenglonPedidoDTO; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.modelo.Resultados; + +import java.math.BigDecimal; +import java.util.List; public interface PedidoService { diff --git a/src/main/java/sic/service/PedidoServiceImpl.java b/src/main/java/org/opencommercial/service/PedidoServiceImpl.java similarity index 97% rename from src/main/java/sic/service/PedidoServiceImpl.java rename to src/main/java/org/opencommercial/service/PedidoServiceImpl.java index b6f89ad93..490b989f9 100644 --- a/src/main/java/sic/service/PedidoServiceImpl.java +++ b/src/main/java/org/opencommercial/service/PedidoServiceImpl.java @@ -1,9 +1,23 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; import org.modelmapper.ModelMapper; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaPedidoCriteria; +import org.opencommercial.model.dto.NuevoRenglonPedidoDTO; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; +import org.opencommercial.model.dto.ProductosParaVerificarStockDTO; +import org.opencommercial.model.dto.UbicacionDTO; +import org.opencommercial.repository.PedidoRepository; +import org.opencommercial.repository.RenglonPedidoRepository; +import org.opencommercial.util.CalculosComprobante; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; @@ -14,20 +28,6 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaPedidoCriteria; -import sic.modelo.dto.NuevoRenglonPedidoDTO; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.modelo.dto.ProductosParaVerificarStockDTO; -import sic.modelo.dto.UbicacionDTO; -import sic.repository.PedidoRepository; -import sic.repository.RenglonPedidoRepository; -import sic.util.CalculosComprobante; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/ProductoService.java b/src/main/java/org/opencommercial/service/ProductoService.java similarity index 90% rename from src/main/java/sic/service/ProductoService.java rename to src/main/java/org/opencommercial/service/ProductoService.java index 09fac5d53..9adab6c4f 100644 --- a/src/main/java/sic/service/ProductoService.java +++ b/src/main/java/org/opencommercial/service/ProductoService.java @@ -1,25 +1,26 @@ -package sic.service; +package org.opencommercial.service; -import java.math.BigDecimal; import com.querydsl.core.BooleanBuilder; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaProductoCriteria; +import org.opencommercial.model.dto.*; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.util.FormatoReporte; +import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import sic.modelo.*; + +import java.math.BigDecimal; import java.util.List; import java.util.Map; import java.util.Set; -import org.springframework.data.domain.Page; -import sic.modelo.criteria.BusquedaProductoCriteria; -import sic.modelo.dto.*; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.util.FormatoReporte; public interface ProductoService { void actualizar(Producto productoPorActualizar, Producto productoPersistido, byte[] imagen); void devolverStockPedido( - Pedido pedido, TipoDeOperacion tipoDeOperacion, List renglonesAnteriores, Long idSucursalOrigen); + Pedido pedido, TipoDeOperacion tipoDeOperacion, List renglonesAnteriores, Long idSucursalOrigen); void actualizarStockPedido(Pedido pedido, TipoDeOperacion tipoDeOperacion); diff --git a/src/main/java/sic/service/ProductoServiceImpl.java b/src/main/java/org/opencommercial/service/ProductoServiceImpl.java similarity index 98% rename from src/main/java/sic/service/ProductoServiceImpl.java rename to src/main/java/org/opencommercial/service/ProductoServiceImpl.java index d30c0bfc3..9f6f90d3d 100644 --- a/src/main/java/sic/service/ProductoServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ProductoServiceImpl.java @@ -1,8 +1,21 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaProductoCriteria; +import org.opencommercial.model.dto.*; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.ProductoFavoritoRepository; +import org.opencommercial.repository.ProductoRepository; +import org.opencommercial.util.CalculosComprobante; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; @@ -11,19 +24,6 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaProductoCriteria; -import sic.modelo.dto.*; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.ProductoFavoritoRepository; -import sic.repository.ProductoRepository; -import sic.util.CalculosComprobante; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; @@ -503,7 +503,7 @@ private void calcularPrecioBonificado(Producto producto) { @Override public void devolverStockPedido( - Pedido pedido, TipoDeOperacion tipoDeOperacion, List renglonesAnteriores, Long idSucursalOrigen) { + Pedido pedido, TipoDeOperacion tipoDeOperacion, List renglonesAnteriores, Long idSucursalOrigen) { if (tipoDeOperacion == TipoDeOperacion.ACTUALIZACION && pedido.getEstado() == EstadoPedido.ABIERTO && renglonesAnteriores != null diff --git a/src/main/java/sic/service/ProveedorService.java b/src/main/java/org/opencommercial/service/ProveedorService.java similarity index 74% rename from src/main/java/sic/service/ProveedorService.java rename to src/main/java/org/opencommercial/service/ProveedorService.java index b21e79ef7..75a9b816a 100644 --- a/src/main/java/sic/service/ProveedorService.java +++ b/src/main/java/org/opencommercial/service/ProveedorService.java @@ -1,11 +1,11 @@ -package sic.service; +package org.opencommercial.service; import java.util.List; import org.springframework.data.domain.Page; -import sic.modelo.TipoDeOperacion; -import sic.modelo.criteria.BusquedaProveedorCriteria; -import sic.modelo.Proveedor; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.criteria.BusquedaProveedorCriteria; +import org.opencommercial.model.Proveedor; public interface ProveedorService { diff --git a/src/main/java/sic/service/ProveedorServiceImpl.java b/src/main/java/org/opencommercial/service/ProveedorServiceImpl.java similarity index 94% rename from src/main/java/sic/service/ProveedorServiceImpl.java rename to src/main/java/org/opencommercial/service/ProveedorServiceImpl.java index cc761c141..2e32b2c70 100644 --- a/src/main/java/sic/service/ProveedorServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ProveedorServiceImpl.java @@ -1,8 +1,16 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.CuentaCorrienteProveedor; +import org.opencommercial.model.Proveedor; +import org.opencommercial.model.QProveedor; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.criteria.BusquedaProveedorCriteria; +import org.opencommercial.repository.ProveedorRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -11,14 +19,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.CuentaCorrienteProveedor; -import sic.modelo.Proveedor; -import sic.modelo.QProveedor; -import sic.modelo.TipoDeOperacion; -import sic.modelo.criteria.BusquedaProveedorCriteria; -import sic.repository.ProveedorRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/service/ReciboService.java b/src/main/java/org/opencommercial/service/ReciboService.java similarity index 85% rename from src/main/java/sic/service/ReciboService.java rename to src/main/java/org/opencommercial/service/ReciboService.java index 610fb37e7..2d2cf67d6 100644 --- a/src/main/java/sic/service/ReciboService.java +++ b/src/main/java/org/opencommercial/service/ReciboService.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; + +import com.mercadopago.resources.payment.Payment; +import com.querydsl.core.BooleanBuilder; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaReciboCriteria; +import org.springframework.data.domain.Page; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; import java.util.Optional; -import com.mercadopago.resources.payment.Payment; -import com.querydsl.core.BooleanBuilder; -import org.springframework.data.domain.Page; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaReciboCriteria; - public interface ReciboService { Recibo getReciboNoEliminadoPorId(long idRecibo); @@ -36,7 +36,7 @@ List construirRecibos( LocalDateTime fecha); Recibo construirReciboPorPayment( - Sucursal sucursal, Usuario usuario, Cliente cliente, Payment payment); + Sucursal sucursal, Usuario usuario, Cliente cliente, Payment payment); long getSiguienteNumeroRecibo(long idSucursal, long serie); @@ -51,7 +51,7 @@ BigDecimal getTotalRecibosProveedoresEntreFechasPorFormaDePago( long idSucursal, long idFormaDePago, LocalDateTime desde, LocalDateTime hasta); List getRecibosEntreFechasPorFormaDePago( - LocalDateTime desde, LocalDateTime hasta, FormaDePago formaDePago, Sucursal sucursal); + LocalDateTime desde, LocalDateTime hasta, FormaDePago formaDePago, Sucursal sucursal); BigDecimal getTotalRecibosClientesQueAfectanCajaEntreFechas( long idSucursal, LocalDateTime desde, LocalDateTime hasta); diff --git a/src/main/java/sic/service/ReciboServiceImpl.java b/src/main/java/org/opencommercial/service/ReciboServiceImpl.java similarity index 97% rename from src/main/java/sic/service/ReciboServiceImpl.java rename to src/main/java/org/opencommercial/service/ReciboServiceImpl.java index 1b9267a46..696d5165a 100644 --- a/src/main/java/sic/service/ReciboServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ReciboServiceImpl.java @@ -1,9 +1,17 @@ -package sic.service; +package org.opencommercial.service; import com.mercadopago.resources.payment.Payment; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaReciboCriteria; +import org.opencommercial.repository.ReciboRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Lazy; @@ -13,14 +21,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaReciboCriteria; -import sic.repository.ReciboRepository; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/RegistracionService.java b/src/main/java/org/opencommercial/service/RegistracionService.java similarity index 64% rename from src/main/java/sic/service/RegistracionService.java rename to src/main/java/org/opencommercial/service/RegistracionService.java index bb0303cfa..71eb980a7 100644 --- a/src/main/java/sic/service/RegistracionService.java +++ b/src/main/java/org/opencommercial/service/RegistracionService.java @@ -1,6 +1,6 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.dto.RegistracionClienteAndUsuarioDTO; +import org.opencommercial.model.dto.RegistracionClienteAndUsuarioDTO; public interface RegistracionService { diff --git a/src/main/java/sic/service/RegistracionServiceImpl.java b/src/main/java/org/opencommercial/service/RegistracionServiceImpl.java similarity index 93% rename from src/main/java/sic/service/RegistracionServiceImpl.java rename to src/main/java/org/opencommercial/service/RegistracionServiceImpl.java index 846c32388..9a1d2d524 100644 --- a/src/main/java/sic/service/RegistracionServiceImpl.java +++ b/src/main/java/org/opencommercial/service/RegistracionServiceImpl.java @@ -1,17 +1,17 @@ -package sic.service; +package org.opencommercial.service; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.model.CategoriaIVA; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.Rol; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.dto.RegistracionClienteAndUsuarioDTO; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.modelo.CategoriaIVA; -import sic.modelo.Cliente; -import sic.modelo.Rol; -import sic.modelo.Usuario; -import sic.modelo.dto.RegistracionClienteAndUsuarioDTO; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/sic/service/RemitoService.java b/src/main/java/org/opencommercial/service/RemitoService.java similarity index 75% rename from src/main/java/sic/service/RemitoService.java rename to src/main/java/org/opencommercial/service/RemitoService.java index e9aacf45c..4ade315f8 100644 --- a/src/main/java/sic/service/RemitoService.java +++ b/src/main/java/org/opencommercial/service/RemitoService.java @@ -1,11 +1,13 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; +import org.opencommercial.model.FacturaVenta; +import org.opencommercial.model.Remito; +import org.opencommercial.model.RenglonRemito; +import org.opencommercial.model.criteria.BusquedaRemitoCriteria; +import org.opencommercial.model.dto.NuevoRemitoDTO; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaRemitoCriteria; -import sic.modelo.dto.NuevoRemitoDTO; import java.util.List; diff --git a/src/main/java/sic/service/RemitoServiceImpl.java b/src/main/java/org/opencommercial/service/RemitoServiceImpl.java similarity index 96% rename from src/main/java/sic/service/RemitoServiceImpl.java rename to src/main/java/org/opencommercial/service/RemitoServiceImpl.java index 3493130bd..d4194b18f 100644 --- a/src/main/java/sic/service/RemitoServiceImpl.java +++ b/src/main/java/org/opencommercial/service/RemitoServiceImpl.java @@ -1,8 +1,18 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaRemitoCriteria; +import org.opencommercial.model.dto.NuevoRemitoDTO; +import org.opencommercial.repository.RemitoRepository; +import org.opencommercial.repository.RenglonRemitoRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -11,16 +21,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaRemitoCriteria; -import sic.modelo.dto.NuevoRemitoDTO; -import sic.repository.RemitoRepository; -import sic.repository.RenglonRemitoRepository; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/ResendEmailServiceImpl.java b/src/main/java/org/opencommercial/service/ResendEmailServiceImpl.java similarity index 96% rename from src/main/java/sic/service/ResendEmailServiceImpl.java rename to src/main/java/org/opencommercial/service/ResendEmailServiceImpl.java index 1f404c80a..3283dcb3c 100644 --- a/src/main/java/sic/service/ResendEmailServiceImpl.java +++ b/src/main/java/org/opencommercial/service/ResendEmailServiceImpl.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import com.resend.Resend; import com.resend.core.exception.ResendException; @@ -9,7 +9,7 @@ import org.springframework.context.MessageSource; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; -import sic.exception.ServiceException; +import org.opencommercial.exception.ServiceException; import java.util.Base64; import java.util.Locale; diff --git a/src/main/java/sic/service/RubroService.java b/src/main/java/org/opencommercial/service/RubroService.java similarity index 73% rename from src/main/java/sic/service/RubroService.java rename to src/main/java/org/opencommercial/service/RubroService.java index 8aefdfca2..72b3b384e 100644 --- a/src/main/java/sic/service/RubroService.java +++ b/src/main/java/org/opencommercial/service/RubroService.java @@ -1,9 +1,9 @@ -package sic.service; +package org.opencommercial.service; import java.util.List; -import sic.modelo.Rubro; -import sic.modelo.TipoDeOperacion; +import org.opencommercial.model.Rubro; +import org.opencommercial.model.TipoDeOperacion; public interface RubroService { diff --git a/src/main/java/sic/service/RubroServiceImpl.java b/src/main/java/org/opencommercial/service/RubroServiceImpl.java similarity index 91% rename from src/main/java/sic/service/RubroServiceImpl.java rename to src/main/java/org/opencommercial/service/RubroServiceImpl.java index 120809643..19e70c543 100644 --- a/src/main/java/sic/service/RubroServiceImpl.java +++ b/src/main/java/org/opencommercial/service/RubroServiceImpl.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Rubro; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.repository.RubroRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.Rubro; -import sic.modelo.TipoDeOperacion; -import sic.repository.RubroRepository; -import sic.util.CustomValidator; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/service/SucursalService.java b/src/main/java/org/opencommercial/service/SucursalService.java similarity index 74% rename from src/main/java/sic/service/SucursalService.java rename to src/main/java/org/opencommercial/service/SucursalService.java index 51820ab72..c422adb72 100644 --- a/src/main/java/sic/service/SucursalService.java +++ b/src/main/java/org/opencommercial/service/SucursalService.java @@ -1,10 +1,10 @@ -package sic.service; +package org.opencommercial.service; import java.util.List; -import sic.modelo.Sucursal; -import sic.modelo.TipoDeOperacion; -import sic.modelo.Ubicacion; -import sic.modelo.dto.NuevaSucursalDTO; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.dto.NuevaSucursalDTO; public interface SucursalService { diff --git a/src/main/java/sic/service/SucursalServiceImpl.java b/src/main/java/org/opencommercial/service/SucursalServiceImpl.java similarity index 95% rename from src/main/java/sic/service/SucursalServiceImpl.java rename to src/main/java/org/opencommercial/service/SucursalServiceImpl.java index 60e3829d4..13cf17ce0 100644 --- a/src/main/java/sic/service/SucursalServiceImpl.java +++ b/src/main/java/org/opencommercial/service/SucursalServiceImpl.java @@ -1,19 +1,19 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.ConfiguracionSucursal; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.dto.NuevaSucursalDTO; +import org.opencommercial.repository.SucursalRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.ConfiguracionSucursal; -import sic.modelo.Sucursal; -import sic.modelo.TipoDeOperacion; -import sic.modelo.Ubicacion; -import sic.modelo.dto.NuevaSucursalDTO; -import sic.repository.SucursalRepository; -import sic.util.CustomValidator; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/service/TaxationService.java b/src/main/java/org/opencommercial/service/TaxationService.java similarity index 53% rename from src/main/java/sic/service/TaxationService.java rename to src/main/java/org/opencommercial/service/TaxationService.java index 917af49da..6f7e0e337 100644 --- a/src/main/java/sic/service/TaxationService.java +++ b/src/main/java/org/opencommercial/service/TaxationService.java @@ -1,6 +1,6 @@ -package sic.service; +package org.opencommercial.service; -import sic.modelo.ComprobanteAutorizable; +import org.opencommercial.model.ComprobanteAutorizable; public interface TaxationService { diff --git a/src/main/java/sic/service/TransportistaService.java b/src/main/java/org/opencommercial/service/TransportistaService.java similarity index 74% rename from src/main/java/sic/service/TransportistaService.java rename to src/main/java/org/opencommercial/service/TransportistaService.java index 3ae8a7030..060675e91 100644 --- a/src/main/java/sic/service/TransportistaService.java +++ b/src/main/java/org/opencommercial/service/TransportistaService.java @@ -1,11 +1,11 @@ -package sic.service; +package org.opencommercial.service; import java.util.List; -import sic.modelo.TipoDeOperacion; -import sic.modelo.criteria.BusquedaTransportistaCriteria; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.criteria.BusquedaTransportistaCriteria; import org.springframework.data.domain.Page; -import sic.modelo.Transportista; +import org.opencommercial.model.Transportista; public interface TransportistaService { diff --git a/src/main/java/sic/service/TransportistaServiceImpl.java b/src/main/java/org/opencommercial/service/TransportistaServiceImpl.java similarity index 94% rename from src/main/java/sic/service/TransportistaServiceImpl.java rename to src/main/java/org/opencommercial/service/TransportistaServiceImpl.java index 1f4d6c6de..f734e0436 100644 --- a/src/main/java/sic/service/TransportistaServiceImpl.java +++ b/src/main/java/org/opencommercial/service/TransportistaServiceImpl.java @@ -1,8 +1,15 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.QTransportista; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Transportista; +import org.opencommercial.model.criteria.BusquedaTransportistaCriteria; +import org.opencommercial.repository.TransportistaRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -11,13 +18,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.QTransportista; -import sic.modelo.TipoDeOperacion; -import sic.modelo.Transportista; -import sic.modelo.criteria.BusquedaTransportistaCriteria; -import sic.repository.TransportistaRepository; -import sic.util.CustomValidator; import java.util.List; import java.util.Locale; diff --git a/src/main/java/sic/service/TraspasoService.java b/src/main/java/org/opencommercial/service/TraspasoService.java similarity index 75% rename from src/main/java/sic/service/TraspasoService.java rename to src/main/java/org/opencommercial/service/TraspasoService.java index e6bf31cdb..08239e769 100644 --- a/src/main/java/sic/service/TraspasoService.java +++ b/src/main/java/org/opencommercial/service/TraspasoService.java @@ -1,14 +1,14 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import sic.modelo.Pedido; -import sic.modelo.RenglonTraspaso; -import sic.modelo.Traspaso; -import sic.modelo.criteria.BusquedaTraspasoCriteria; -import sic.modelo.dto.NuevoTraspasoDTO; -import sic.modelo.dto.NuevoTraspasoDePedidoDTO; +import org.opencommercial.model.Pedido; +import org.opencommercial.model.RenglonTraspaso; +import org.opencommercial.model.Traspaso; +import org.opencommercial.model.criteria.BusquedaTraspasoCriteria; +import org.opencommercial.model.dto.NuevoTraspasoDTO; +import org.opencommercial.model.dto.NuevoTraspasoDePedidoDTO; import java.util.List; diff --git a/src/main/java/sic/service/TraspasoServiceImpl.java b/src/main/java/org/opencommercial/service/TraspasoServiceImpl.java similarity index 97% rename from src/main/java/sic/service/TraspasoServiceImpl.java rename to src/main/java/org/opencommercial/service/TraspasoServiceImpl.java index 76d759d0c..58b32d0c4 100644 --- a/src/main/java/sic/service/TraspasoServiceImpl.java +++ b/src/main/java/org/opencommercial/service/TraspasoServiceImpl.java @@ -1,8 +1,17 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaTraspasoCriteria; +import org.opencommercial.model.dto.*; +import org.opencommercial.repository.RenglonTraspasoRepository; +import org.opencommercial.repository.TraspasoRepository; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -11,15 +20,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaTraspasoCriteria; -import sic.modelo.dto.*; -import sic.repository.RenglonTraspasoRepository; -import sic.repository.TraspasoRepository; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import javax.imageio.ImageIO; import javax.swing.*; diff --git a/src/main/java/sic/service/UbicacionService.java b/src/main/java/org/opencommercial/service/UbicacionService.java similarity index 69% rename from src/main/java/sic/service/UbicacionService.java rename to src/main/java/org/opencommercial/service/UbicacionService.java index 1865baabb..d8ec04ac4 100644 --- a/src/main/java/sic/service/UbicacionService.java +++ b/src/main/java/org/opencommercial/service/UbicacionService.java @@ -1,12 +1,12 @@ -package sic.service; +package org.opencommercial.service; import org.springframework.data.domain.Page; -import sic.modelo.Localidad; -import sic.modelo.Provincia; -import sic.modelo.TipoDeOperacion; -import sic.modelo.Ubicacion; -import sic.modelo.criteria.BusquedaLocalidadCriteria; -import sic.modelo.dto.LocalidadesParaActualizarDTO; +import org.opencommercial.model.Localidad; +import org.opencommercial.model.Provincia; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.criteria.BusquedaLocalidadCriteria; +import org.opencommercial.model.dto.LocalidadesParaActualizarDTO; import java.util.List; diff --git a/src/main/java/sic/service/UbicacionServiceImpl.java b/src/main/java/org/opencommercial/service/UbicacionServiceImpl.java similarity index 94% rename from src/main/java/sic/service/UbicacionServiceImpl.java rename to src/main/java/org/opencommercial/service/UbicacionServiceImpl.java index b353da8f2..e28012c0b 100644 --- a/src/main/java/sic/service/UbicacionServiceImpl.java +++ b/src/main/java/org/opencommercial/service/UbicacionServiceImpl.java @@ -1,8 +1,16 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaLocalidadCriteria; +import org.opencommercial.model.dto.LocalidadesParaActualizarDTO; +import org.opencommercial.repository.LocalidadRepository; +import org.opencommercial.repository.ProvinciaRepository; +import org.opencommercial.repository.UbicacionRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; @@ -11,14 +19,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaLocalidadCriteria; -import sic.modelo.dto.LocalidadesParaActualizarDTO; -import sic.repository.LocalidadRepository; -import sic.repository.ProvinciaRepository; -import sic.repository.UbicacionRepository; -import sic.util.CustomValidator; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/sic/service/UsuarioService.java b/src/main/java/org/opencommercial/service/UsuarioService.java similarity index 78% rename from src/main/java/sic/service/UsuarioService.java rename to src/main/java/org/opencommercial/service/UsuarioService.java index ef1b2d3fc..c4c76a8b7 100644 --- a/src/main/java/sic/service/UsuarioService.java +++ b/src/main/java/org/opencommercial/service/UsuarioService.java @@ -1,8 +1,11 @@ -package sic.service; +package org.opencommercial.service; +import org.opencommercial.model.Credencial; +import org.opencommercial.model.Rol; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.criteria.BusquedaUsuarioCriteria; import org.springframework.data.domain.Page; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaUsuarioCriteria; public interface UsuarioService { diff --git a/src/main/java/sic/service/UsuarioServiceImpl.java b/src/main/java/org/opencommercial/service/UsuarioServiceImpl.java similarity index 96% rename from src/main/java/sic/service/UsuarioServiceImpl.java rename to src/main/java/org/opencommercial/service/UsuarioServiceImpl.java index a56c626aa..9a68bfe86 100644 --- a/src/main/java/sic/service/UsuarioServiceImpl.java +++ b/src/main/java/org/opencommercial/service/UsuarioServiceImpl.java @@ -1,9 +1,16 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.EntityNotFoundException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.UnauthorizedException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaUsuarioCriteria; +import org.opencommercial.repository.UsuarioRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.EncryptUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; @@ -14,13 +21,6 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sic.exception.BusinessServiceException; -import sic.exception.UnauthorizedException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaUsuarioCriteria; -import sic.repository.UsuarioRepository; -import sic.util.CustomValidator; -import sic.util.EncryptUtils; import java.time.LocalDateTime; import java.util.Locale; @@ -229,7 +229,7 @@ public void validarReglasDeNegocio(TipoDeOperacion operacion, Usuario usuario) { if ((operacion == TipoDeOperacion.ACTUALIZACION && !usuario.getRoles().contains(Rol.ADMINISTRADOR)) || operacion == TipoDeOperacion.ELIMINACION && usuario.getRoles().contains(Rol.ADMINISTRADOR)) { var administradores = this.getUsuariosPorRol(Rol.ADMINISTRADOR).getContent(); - if (administradores.size() == 1 && administradores.get(0).getIdUsuario() == usuario.getIdUsuario()) { + if (administradores.size() == 1 && administradores.getFirst().getIdUsuario() == usuario.getIdUsuario()) { throw new BusinessServiceException(messageSource.getMessage( "mensaje_usuario_ultimoAdmin", null, Locale.getDefault())); } diff --git a/src/main/java/sic/util/CalculosComprobante.java b/src/main/java/org/opencommercial/util/CalculosComprobante.java similarity index 96% rename from src/main/java/sic/util/CalculosComprobante.java rename to src/main/java/org/opencommercial/util/CalculosComprobante.java index b28b479d0..5eed6579d 100644 --- a/src/main/java/sic/util/CalculosComprobante.java +++ b/src/main/java/org/opencommercial/util/CalculosComprobante.java @@ -1,6 +1,6 @@ -package sic.util; +package org.opencommercial.util; -import sic.modelo.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/src/main/java/sic/util/CustomValidator.java b/src/main/java/org/opencommercial/util/CustomValidator.java similarity index 97% rename from src/main/java/sic/util/CustomValidator.java rename to src/main/java/org/opencommercial/util/CustomValidator.java index 0e434956e..4d5af945b 100644 --- a/src/main/java/sic/util/CustomValidator.java +++ b/src/main/java/org/opencommercial/util/CustomValidator.java @@ -1,14 +1,15 @@ -package sic.util; +package org.opencommercial.util; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.Validation; +import jakarta.validation.Validator; import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator; import org.springframework.context.MessageSource; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.stereotype.Component; import org.springframework.validation.beanvalidation.MessageSourceResourceBundleLocator; -import jakarta.validation.Validator; -import jakarta.validation.Validation; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; + import java.util.Set; @Component diff --git a/src/main/java/sic/util/EncryptUtils.java b/src/main/java/org/opencommercial/util/EncryptUtils.java similarity index 91% rename from src/main/java/sic/util/EncryptUtils.java rename to src/main/java/org/opencommercial/util/EncryptUtils.java index 2bf592e2a..8d593d0e8 100644 --- a/src/main/java/sic/util/EncryptUtils.java +++ b/src/main/java/org/opencommercial/util/EncryptUtils.java @@ -1,16 +1,19 @@ -package sic.util; +package org.opencommercial.util; +import jakarta.xml.bind.DatatypeConverter; +import org.opencommercial.exception.ServiceException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.MessageSource; import org.springframework.stereotype.Component; -import sic.exception.ServiceException; + import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; -import jakarta.xml.bind.DatatypeConverter; import java.nio.charset.StandardCharsets; -import java.security.*; +import java.security.GeneralSecurityException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.Locale; @Component diff --git a/src/main/java/sic/util/FormatoReporte.java b/src/main/java/org/opencommercial/util/FormatoReporte.java similarity index 79% rename from src/main/java/sic/util/FormatoReporte.java rename to src/main/java/org/opencommercial/util/FormatoReporte.java index 08abd9ad4..f3bd27fa6 100644 --- a/src/main/java/sic/util/FormatoReporte.java +++ b/src/main/java/org/opencommercial/util/FormatoReporte.java @@ -1,4 +1,4 @@ -package sic.util; +package org.opencommercial.util; public enum FormatoReporte { PDF, diff --git a/src/main/java/sic/util/JasperReportsHandler.java b/src/main/java/org/opencommercial/util/JasperReportsHandler.java similarity index 93% rename from src/main/java/sic/util/JasperReportsHandler.java rename to src/main/java/org/opencommercial/util/JasperReportsHandler.java index 5fd0102da..2ed8bbce8 100644 --- a/src/main/java/sic/util/JasperReportsHandler.java +++ b/src/main/java/org/opencommercial/util/JasperReportsHandler.java @@ -1,14 +1,14 @@ -package sic.util; +package org.opencommercial.util; import net.sf.jasperreports.engine.*; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; import net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter; import net.sf.jasperreports.export.SimpleExporterInput; import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; import org.springframework.context.MessageSource; import org.springframework.stereotype.Component; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/resources/report/CuentaCorriente.jrxml b/src/main/resources/report/CuentaCorriente.jrxml index e02a34c6e..e91f88b75 100644 --- a/src/main/resources/report/CuentaCorriente.jrxml +++ b/src/main/resources/report/CuentaCorriente.jrxml @@ -15,9 +15,9 @@ - + - + diff --git a/src/main/resources/report/FacturaVenta.jrxml b/src/main/resources/report/FacturaVenta.jrxml index a464469f2..f37efa5b3 100644 --- a/src/main/resources/report/FacturaVenta.jrxml +++ b/src/main/resources/report/FacturaVenta.jrxml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/report/ListaClientes.jrxml b/src/main/resources/report/ListaClientes.jrxml index bf6dabe84..aea25b1ca 100644 --- a/src/main/resources/report/ListaClientes.jrxml +++ b/src/main/resources/report/ListaClientes.jrxml @@ -13,12 +13,12 @@ - + - + diff --git a/src/main/resources/report/ListaPreciosProductos.jrxml b/src/main/resources/report/ListaPreciosProductos.jrxml index dfa09c0b7..d752361b7 100644 --- a/src/main/resources/report/ListaPreciosProductos.jrxml +++ b/src/main/resources/report/ListaPreciosProductos.jrxml @@ -4,7 +4,7 @@ - + @@ -17,13 +17,13 @@ - + - + - + diff --git a/src/main/resources/report/NotaCredito.jrxml b/src/main/resources/report/NotaCredito.jrxml index a2c065333..5471425fe 100644 --- a/src/main/resources/report/NotaCredito.jrxml +++ b/src/main/resources/report/NotaCredito.jrxml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/report/NotaDebito.jrxml b/src/main/resources/report/NotaDebito.jrxml index ea8874a82..0b39f9b92 100644 --- a/src/main/resources/report/NotaDebito.jrxml +++ b/src/main/resources/report/NotaDebito.jrxml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/report/Pedido.jrxml b/src/main/resources/report/Pedido.jrxml index fa62190eb..b25c2d4de 100644 --- a/src/main/resources/report/Pedido.jrxml +++ b/src/main/resources/report/Pedido.jrxml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/report/Recibo.jrxml b/src/main/resources/report/Recibo.jrxml index 0cbd28e94..73baff632 100644 --- a/src/main/resources/report/Recibo.jrxml +++ b/src/main/resources/report/Recibo.jrxml @@ -14,7 +14,7 @@ - + diff --git a/src/main/resources/report/Remito.jrxml b/src/main/resources/report/Remito.jrxml index 1330ffc08..19c1b86b9 100644 --- a/src/main/resources/report/Remito.jrxml +++ b/src/main/resources/report/Remito.jrxml @@ -5,7 +5,7 @@ - + diff --git a/src/main/resources/report/Traspasos.jrxml b/src/main/resources/report/Traspasos.jrxml index 6bf99333f..c80d93980 100644 --- a/src/main/resources/report/Traspasos.jrxml +++ b/src/main/resources/report/Traspasos.jrxml @@ -13,7 +13,7 @@ - + diff --git a/src/test/java/sic/controller/CarritoCompraControllerTest.java b/src/test/java/org/opencommercial/controller/CarritoCompraControllerTest.java similarity index 86% rename from src/test/java/sic/controller/CarritoCompraControllerTest.java rename to src/test/java/org/opencommercial/controller/CarritoCompraControllerTest.java index 0cf403ae1..aa21052c4 100644 --- a/src/test/java/sic/controller/CarritoCompraControllerTest.java +++ b/src/test/java/org/opencommercial/controller/CarritoCompraControllerTest.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; @@ -8,10 +8,10 @@ import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.dto.ProductoFaltanteDTO; -import sic.service.AuthServiceImpl; -import sic.service.CarritoCompraServiceImpl; -import sic.service.ProductoServiceImpl; +import org.opencommercial.model.dto.ProductoFaltanteDTO; +import org.opencommercial.service.AuthServiceImpl; +import org.opencommercial.service.CarritoCompraServiceImpl; +import org.opencommercial.service.ProductoServiceImpl; import java.util.ArrayList; import java.util.List; diff --git a/src/test/java/sic/controller/CuentaCorrienteControllerTest.java b/src/test/java/org/opencommercial/controller/CuentaCorrienteControllerTest.java similarity index 84% rename from src/test/java/sic/controller/CuentaCorrienteControllerTest.java rename to src/test/java/org/opencommercial/controller/CuentaCorrienteControllerTest.java index d19b8e6f3..78756b175 100644 --- a/src/test/java/sic/controller/CuentaCorrienteControllerTest.java +++ b/src/test/java/org/opencommercial/controller/CuentaCorrienteControllerTest.java @@ -1,19 +1,19 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteClienteCriteria; +import org.opencommercial.service.AuthService; +import org.opencommercial.service.ClienteService; +import org.opencommercial.service.CuentaCorrienteService; +import org.opencommercial.service.ProveedorService; +import org.opencommercial.util.FormatoReporte; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.criteria.BusquedaCuentaCorrienteClienteCriteria; -import sic.service.AuthService; -import sic.service.ClienteService; -import sic.service.CuentaCorrienteService; -import sic.service.ProveedorService; -import sic.util.FormatoReporte; import java.util.List; import java.util.Map; diff --git a/src/test/java/sic/controller/FacturaCompraControllerTest.java b/src/test/java/org/opencommercial/controller/FacturaCompraControllerTest.java similarity index 82% rename from src/test/java/sic/controller/FacturaCompraControllerTest.java rename to src/test/java/org/opencommercial/controller/FacturaCompraControllerTest.java index ab1eecd5c..12fbf12aa 100644 --- a/src/test/java/sic/controller/FacturaCompraControllerTest.java +++ b/src/test/java/org/opencommercial/controller/FacturaCompraControllerTest.java @@ -1,16 +1,16 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaCompraCriteria; +import org.opencommercial.model.dto.NuevaFacturaCompraDTO; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.service.*; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaCompraCriteria; -import sic.modelo.dto.NuevaFacturaCompraDTO; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.service.*; import java.math.BigDecimal; import java.util.ArrayList; @@ -35,8 +35,7 @@ class FacturaCompraControllerTest { @Test void shouldGuardarFacturaCompra() { - NuevaFacturaCompraDTO nuevaFacturaCompra = - NuevaFacturaCompraDTO.builder().idProveedor(1L).build(); + NuevaFacturaCompraDTO nuevaFacturaCompra = NuevaFacturaCompraDTO.builder().idProveedor(1L).build(); List facturasCompra = new ArrayList<>(); FacturaCompra facturaCompra = new FacturaCompra(); facturasCompra.add(facturaCompra); @@ -65,11 +64,9 @@ void shouldGetTipoFacturaCompra() { void shouldCalcularRenglonesCompra() { List nuevosRenglonesFacturaDTO = new ArrayList<>(); List renglonesFacturas = new ArrayList<>(); - when(facturaService.calcularRenglones( - TipoDeComprobante.FACTURA_A, Movimiento.COMPRA, nuevosRenglonesFacturaDTO)) - .thenReturn(renglonesFacturas); - facturaCompraController.calcularRenglonesCompra( - nuevosRenglonesFacturaDTO, TipoDeComprobante.FACTURA_A); + when(facturaService.calcularRenglones(TipoDeComprobante.FACTURA_A, Movimiento.COMPRA, nuevosRenglonesFacturaDTO)) + .thenReturn(renglonesFacturas); + facturaCompraController.calcularRenglonesCompra(nuevosRenglonesFacturaDTO, TipoDeComprobante.FACTURA_A); } @Test diff --git a/src/test/java/sic/controller/FacturaControllerTest.java b/src/test/java/org/opencommercial/controller/FacturaControllerTest.java similarity index 88% rename from src/test/java/sic/controller/FacturaControllerTest.java rename to src/test/java/org/opencommercial/controller/FacturaControllerTest.java index ac159c486..2b0b619eb 100644 --- a/src/test/java/sic/controller/FacturaControllerTest.java +++ b/src/test/java/org/opencommercial/controller/FacturaControllerTest.java @@ -1,16 +1,16 @@ -package sic.controller; +package org.opencommercial.controller; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.opencommercial.model.Resultados; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.TipoDeComprobante; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; +import org.opencommercial.service.FacturaServiceImpl; +import org.opencommercial.service.SucursalServiceImpl; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.Resultados; -import sic.modelo.Sucursal; -import sic.modelo.TipoDeComprobante; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.service.FacturaServiceImpl; -import sic.service.SucursalServiceImpl; import java.math.BigDecimal; diff --git a/src/test/java/sic/controller/FacturaVentaControllerTest.java b/src/test/java/org/opencommercial/controller/FacturaVentaControllerTest.java similarity index 96% rename from src/test/java/sic/controller/FacturaVentaControllerTest.java rename to src/test/java/org/opencommercial/controller/FacturaVentaControllerTest.java index 17996b419..0de0846a7 100644 --- a/src/test/java/sic/controller/FacturaVentaControllerTest.java +++ b/src/test/java/org/opencommercial/controller/FacturaVentaControllerTest.java @@ -1,8 +1,14 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaVentaCriteria; +import org.opencommercial.model.dto.NuevaFacturaVentaDTO; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; @@ -10,12 +16,6 @@ import org.springframework.data.domain.PageImpl; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaVentaCriteria; -import sic.modelo.dto.NuevaFacturaVentaDTO; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.service.*; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/src/test/java/sic/controller/NotaControllerTest.java b/src/test/java/org/opencommercial/controller/NotaControllerTest.java similarity index 88% rename from src/test/java/sic/controller/NotaControllerTest.java rename to src/test/java/org/opencommercial/controller/NotaControllerTest.java index 274d92494..a4c147db1 100644 --- a/src/test/java/sic/controller/NotaControllerTest.java +++ b/src/test/java/org/opencommercial/controller/NotaControllerTest.java @@ -1,19 +1,19 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.NotaCredito; +import org.opencommercial.model.NotaDebito; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.dto.NuevaNotaCreditoSinFacturaDTO; +import org.opencommercial.model.dto.NuevaNotaDebitoSinReciboDTO; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.NotaCredito; -import sic.modelo.NotaDebito; -import sic.modelo.Usuario; -import sic.modelo.dto.NuevaNotaCreditoSinFacturaDTO; -import sic.modelo.dto.NuevaNotaDebitoSinReciboDTO; -import sic.service.*; import java.util.List; import java.util.Map; diff --git a/src/test/java/sic/controller/PedidoControllerTest.java b/src/test/java/org/opencommercial/controller/PedidoControllerTest.java similarity index 70% rename from src/test/java/sic/controller/PedidoControllerTest.java rename to src/test/java/org/opencommercial/controller/PedidoControllerTest.java index 9afa677e4..5d34924e2 100644 --- a/src/test/java/sic/controller/PedidoControllerTest.java +++ b/src/test/java/org/opencommercial/controller/PedidoControllerTest.java @@ -1,16 +1,16 @@ -package sic.controller; +package org.opencommercial.controller; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.opencommercial.model.Pedido; +import org.opencommercial.model.RenglonPedido; +import org.opencommercial.model.Resultados; +import org.opencommercial.model.dto.NuevoRenglonPedidoDTO; +import org.opencommercial.model.dto.NuevosResultadosComprobanteDTO; +import org.opencommercial.service.PedidoServiceImpl; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.Pedido; -import sic.modelo.RenglonPedido; -import sic.modelo.Resultados; -import sic.modelo.dto.NuevoRenglonPedidoDTO; -import sic.modelo.dto.NuevosResultadosComprobanteDTO; -import sic.service.PedidoServiceImpl; import java.math.BigDecimal; import java.util.ArrayList; @@ -37,10 +37,8 @@ void shouldGetPedidoPorId() { @Test void shouldCalcularRenglonesPedido() { List nuevoRenglonPedido = new ArrayList<>(); - nuevoRenglonPedido.add( - NuevoRenglonPedidoDTO.builder().idProductoItem(1L).cantidad(BigDecimal.TEN).build()); - nuevoRenglonPedido.add( - NuevoRenglonPedidoDTO.builder().idProductoItem(2L).cantidad(BigDecimal.ONE).build()); + nuevoRenglonPedido.add(NuevoRenglonPedidoDTO.builder().idProductoItem(1L).cantidad(BigDecimal.TEN).build()); + nuevoRenglonPedido.add(NuevoRenglonPedidoDTO.builder().idProductoItem(2L).cantidad(BigDecimal.ONE).build()); List renglones = new ArrayList<>(); long[] idsProducto = {1L, 2L}; BigDecimal[] cantidades = {BigDecimal.TEN, BigDecimal.ONE}; @@ -55,7 +53,6 @@ void shouldCalcularResultadosPedido() { Resultados resultados = new Resultados(); when(pedidoService.calcularResultadosPedido(nuevosResultadosComprobanteDTO)) .thenReturn(resultados); - assertEquals( - resultados, pedidoController.calcularResultadosPedido(nuevosResultadosComprobanteDTO)); + assertEquals(resultados, pedidoController.calcularResultadosPedido(nuevosResultadosComprobanteDTO)); } } diff --git a/src/test/java/sic/controller/ProductoControllerTest.java b/src/test/java/org/opencommercial/controller/ProductoControllerTest.java similarity index 91% rename from src/test/java/sic/controller/ProductoControllerTest.java rename to src/test/java/org/opencommercial/controller/ProductoControllerTest.java index 4b604fa2f..1894f1809 100644 --- a/src/test/java/sic/controller/ProductoControllerTest.java +++ b/src/test/java/org/opencommercial/controller/ProductoControllerTest.java @@ -1,19 +1,19 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.modelmapper.ModelMapper; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.CantidadEnSucursalDTO; +import org.opencommercial.model.dto.ProductoDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.*; -import sic.modelo.dto.CantidadEnSucursalDTO; -import sic.modelo.dto.ProductoDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.service.*; import java.math.BigDecimal; import java.util.*; @@ -57,8 +57,7 @@ void shouldActualizarProducto() { ProductoDTO productoDTO = new ProductoDTO(); productoDTO.setIdProducto(1L); Set cantidadesEnSucursales = new HashSet<>(); - CantidadEnSucursalDTO cantidadEnSucursalDTO = - CantidadEnSucursalDTO.builder().idSucursal(1L).cantidad(BigDecimal.TEN).build(); + var cantidadEnSucursalDTO = CantidadEnSucursalDTO.builder().idSucursal(1L).cantidad(BigDecimal.TEN).build(); cantidadesEnSucursales.add(cantidadEnSucursalDTO); productoDTO.setCantidadEnSucursales(cantidadesEnSucursales); when(productoService.construirCantidadProductoEmbeddable(productoDTO)).thenReturn(cantidadProductoEmbeddable); @@ -72,8 +71,7 @@ void shouldActualizarProducto() { productoPorActualizar.setCantidadProducto(new CantidadProductoEmbeddable()); productoPorActualizar.setPrecioProducto(new PrecioProductoEmbeddable()); when(modelMapper.map(productoDTO, Producto.class)).thenReturn(productoPorActualizar); - when(modelMapper.map(cantidadEnSucursalDTO, CantidadEnSucursal.class)) - .thenReturn(cantidadEnSucursal); + when(modelMapper.map(cantidadEnSucursalDTO, CantidadEnSucursal.class)).thenReturn(cantidadEnSucursal); var claims = new DefaultClaims(Map.of("idUsuario", 1L, "roles", List.of("ADMINISTRADOR"))); when(authService.getClaimsDelToken("headers")).thenReturn(claims); Usuario usuario = new Usuario(); diff --git a/src/test/java/sic/controller/TransportistaControllerTest.java b/src/test/java/org/opencommercial/controller/TransportistaControllerTest.java similarity index 90% rename from src/test/java/sic/controller/TransportistaControllerTest.java rename to src/test/java/org/opencommercial/controller/TransportistaControllerTest.java index d79c99b2f..7e7b0bd66 100644 --- a/src/test/java/sic/controller/TransportistaControllerTest.java +++ b/src/test/java/org/opencommercial/controller/TransportistaControllerTest.java @@ -1,12 +1,12 @@ -package sic.controller; +package org.opencommercial.controller; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.Transportista; -import sic.service.TransportistaServiceImpl; +import org.opencommercial.model.Transportista; +import org.opencommercial.service.TransportistaServiceImpl; import java.util.ArrayList; import java.util.List; diff --git a/src/test/java/sic/controller/TraspasoControllerTest.java b/src/test/java/org/opencommercial/controller/TraspasoControllerTest.java similarity index 85% rename from src/test/java/sic/controller/TraspasoControllerTest.java rename to src/test/java/org/opencommercial/controller/TraspasoControllerTest.java index f1e1523ee..c87d61143 100644 --- a/src/test/java/sic/controller/TraspasoControllerTest.java +++ b/src/test/java/org/opencommercial/controller/TraspasoControllerTest.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import io.jsonwebtoken.impl.DefaultClaims; import org.junit.jupiter.api.Test; @@ -7,11 +7,11 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.Traspaso; -import sic.modelo.criteria.BusquedaTraspasoCriteria; -import sic.modelo.dto.NuevoTraspasoDTO; -import sic.service.AuthServiceImpl; -import sic.service.TraspasoServiceImpl; +import org.opencommercial.model.Traspaso; +import org.opencommercial.model.criteria.BusquedaTraspasoCriteria; +import org.opencommercial.model.dto.NuevoTraspasoDTO; +import org.opencommercial.service.AuthServiceImpl; +import org.opencommercial.service.TraspasoServiceImpl; import java.util.List; import java.util.Map; diff --git a/src/test/java/sic/controller/UbicacionControllerTest.java b/src/test/java/org/opencommercial/controller/UbicacionControllerTest.java similarity index 86% rename from src/test/java/sic/controller/UbicacionControllerTest.java rename to src/test/java/org/opencommercial/controller/UbicacionControllerTest.java index 69f91f712..33e95e5cb 100644 --- a/src/test/java/sic/controller/UbicacionControllerTest.java +++ b/src/test/java/org/opencommercial/controller/UbicacionControllerTest.java @@ -1,4 +1,4 @@ -package sic.controller; +package org.opencommercial.controller; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -7,8 +7,8 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.dto.LocalidadesParaActualizarDTO; -import sic.service.UbicacionServiceImpl; +import org.opencommercial.model.dto.LocalidadesParaActualizarDTO; +import org.opencommercial.service.UbicacionServiceImpl; import static org.mockito.Mockito.verify; diff --git a/src/test/java/sic/integration/AppIntegrationTest.java b/src/test/java/org/opencommercial/integration/AppIntegrationTest.java similarity index 75% rename from src/test/java/sic/integration/AppIntegrationTest.java rename to src/test/java/org/opencommercial/integration/AppIntegrationTest.java index 14a5a980d..2809362c7 100644 --- a/src/test/java/sic/integration/AppIntegrationTest.java +++ b/src/test/java/org/opencommercial/integration/AppIntegrationTest.java @@ -1,9 +1,13 @@ -package sic.integration; +package org.opencommercial.integration; import jakarta.validation.constraints.NotNull; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.*; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.integration.model.*; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.*; +import org.opencommercial.model.dto.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -23,30 +27,6 @@ import org.testcontainers.containers.MySQLContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import sic.model.Caja; -import sic.model.CantidadEnSucursal; -import sic.model.Cliente; -import sic.model.ConfiguracionSucursal; -import sic.model.FacturaCompra; -import sic.model.FacturaVenta; -import sic.model.Gasto; -import sic.model.Medida; -import sic.model.NotaCredito; -import sic.model.NotaDebito; -import sic.model.Pedido; -import sic.model.Producto; -import sic.model.Proveedor; -import sic.model.Recibo; -import sic.model.Remito; -import sic.model.Rubro; -import sic.model.Sucursal; -import sic.model.Ubicacion; -import sic.model.Usuario; -import sic.model.*; -import sic.modelo.RenglonFactura; -import sic.modelo.*; -import sic.modelo.criteria.*; -import sic.modelo.dto.*; import java.io.IOException; import java.math.BigDecimal; @@ -121,8 +101,8 @@ void iniciarActividadComercial() { new Credencial("test", "test"), String.class) .getBody(); - Usuario usuario = - Usuario.builder() + UsuarioTest usuario = + UsuarioTest.builder() .username("dueño") .password("dueño123") .nombre("Max") @@ -130,19 +110,19 @@ void iniciarActividadComercial() { .email("liderDeLaEmpresa@yahoo.com.br") .roles(new ArrayList<>(Collections.singletonList(Rol.ADMINISTRADOR))) .build(); - usuario = restTemplate.postForObject("/api/v1/usuarios", usuario, Usuario.class); + usuario = restTemplate.postForObject("/api/v1/usuarios", usuario, UsuarioTest.class); usuario.setHabilitado(true); restTemplate.put("/api/v1/usuarios", usuario); this.iniciarSesionComoAdministrador(); - NuevaSucursal nuevaSucursal = - NuevaSucursal.builder() + var nuevaSucursal = + NuevaSucursalTest.builder() .nombre("FirstOfAll") .categoriaIVA(CategoriaIVA.RESPONSABLE_INSCRIPTO) .email("support@globocorporation.com") .idFiscal(20311023188L) .ubicacion(UbicacionDTO.builder().idLocalidad(1L).idProvincia(1L).build()) .build(); - var sucursalRecuperada = restTemplate.postForObject("/api/v1/sucursales", nuevaSucursal, Sucursal.class); + var sucursalRecuperada = restTemplate.postForObject("/api/v1/sucursales", nuevaSucursal, SucursalTest.class); assertEquals(nuevaSucursal.getNombre(), sucursalRecuperada.getNombre()); assertEquals(nuevaSucursal.getLema(), sucursalRecuperada.getLema()); assertEquals(nuevaSucursal.getCategoriaIVA(), sucursalRecuperada.getCategoriaIVA()); @@ -188,7 +168,7 @@ void testEscenarioAbrirCaja() { .idFormaDePago(1L) .idSucursal(1L) .build(); - List sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", Sucursal[].class)); + List sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", SucursalTest[].class)); assertFalse(sucursales.isEmpty()); assertEquals(1, sucursales.size()); restTemplate.postForObject("/api/v1/gastos", nuevoGasto, Gasto.class); @@ -205,8 +185,8 @@ void testEscenarioAbrirCaja() { assertNotNull(resultadoBusqueda); List gastosRecuperados = resultadoBusqueda.getContent(); assertEquals(1, gastosRecuperados.size()); - assertEquals(new BigDecimal("500.000000000000000"), gastosRecuperados.get(0).getMonto()); - assertEquals("Pago de Agua", gastosRecuperados.get(0).getConcepto()); + assertEquals(new BigDecimal("500.000000000000000"), gastosRecuperados.getFirst().getMonto()); + assertEquals("Pago de Agua", gastosRecuperados.getFirst().getConcepto()); } @Test @@ -214,19 +194,18 @@ void testEscenarioAbrirCaja() { @Order(3) void testEscenarioCompraEscenario1() { this.iniciarSesionComoAdministrador(); - Proveedor proveedor = - Proveedor.builder() + var proveedor = + ProveedorTest.builder() .categoriaIVA(CategoriaIVA.RESPONSABLE_INSCRIPTO) .razonSocial("Chamaco S.R.L.") .build(); - Proveedor proveedorRecuperado = - restTemplate.postForObject("/api/v1/proveedores", proveedor, Proveedor.class); + var proveedorRecuperado = restTemplate.postForObject("/api/v1/proveedores", proveedor, ProveedorTest.class); assertEquals(proveedor, proveedorRecuperado); - Rubro rubro = Rubro.builder().nombre("Ferreteria").build(); - Rubro rubroDadoDeAlta = restTemplate.postForObject("/api/v1/rubros", rubro, Rubro.class); + RubroTest rubro = RubroTest.builder().nombre("Ferreteria").build(); + RubroTest rubroDadoDeAlta = restTemplate.postForObject("/api/v1/rubros", rubro, RubroTest.class); assertEquals(rubro, rubroDadoDeAlta); - Medida medida = Medida.builder().nombre("Metro").build(); - Medida medidaDadaDeAlta = restTemplate.postForObject("/api/v1/medidas", medida, Medida.class); + var medida = MedidaTest.builder().nombre("Metro").build(); + var medidaDadaDeAlta = restTemplate.postForObject("/api/v1/medidas", medida, MedidaTest.class); assertEquals(medida, medidaDadaDeAlta); NuevoProductoDTO nuevoProductoUno = NuevoProductoDTO.builder() @@ -282,7 +261,7 @@ void testEscenarioCompraEscenario1() { .porcentajeBonificacionPrecio(BigDecimal.TEN) .paraCatalogo(true) .build(); - Sucursal sucursal = restTemplate.getForObject("/api/v1/sucursales/1", Sucursal.class); + SucursalTest sucursal = restTemplate.getForObject("/api/v1/sucursales/1", SucursalTest.class); restTemplate.postForObject( "/api/v1/productos?idMedida=" + medidaDadaDeAlta.getIdMedida() + "&idRubro=" + rubroDadoDeAlta.getIdRubro() @@ -293,31 +272,31 @@ void testEscenarioCompraEscenario1() { BusquedaProductoCriteria criteria = BusquedaProductoCriteria.builder().descripcion("Ventilador").build(); HttpEntity requestEntity = new HttpEntity<>(criteria); - PaginaRespuestaRest resultadoBusqueda = + PaginaRespuestaRest resultadoBusqueda = restTemplate .exchange( "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); - List productosRecuperados = resultadoBusqueda.getContent(); - assertEquals("Ventilador de pie", productosRecuperados.get(0).getDescripcion()); - assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); - assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(0).getCantidadReservada()); - assertEquals("Metro", productosRecuperados.get(0).getNombreMedida()); - assertEquals(new BigDecimal("100.000000000000000"), productosRecuperados.get(0).getPrecioCosto()); - assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.get(0).getGananciaPorcentaje()); - assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.get(0).getGananciaNeto()); - assertEquals(new BigDecimal("1000.000000000000000"), productosRecuperados.get(0).getPrecioVentaPublico()); - assertEquals(new BigDecimal("21.000000000000000"), productosRecuperados.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("210.000000000000000"), productosRecuperados.get(0).getIvaNeto()); - assertEquals(new BigDecimal("1210.000000000000000"), productosRecuperados.get(0).getPrecioLista()); - assertEquals("Ferreteria", productosRecuperados.get(0).getNombreRubro()); - assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(0).getPorcentajeBonificacionOferta()); - assertEquals(new BigDecimal("20.000000000000000"), productosRecuperados.get(0).getPorcentajeBonificacionPrecio()); - assertEquals(new BigDecimal("968.000000000000000"), productosRecuperados.get(0).getPrecioBonificado()); + List productosRecuperados = resultadoBusqueda.getContent(); + assertEquals("Ventilador de pie", productosRecuperados.getFirst().getDescripcion()); + assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); + assertEquals(new BigDecimal("0E-15"), productosRecuperados.getFirst().getCantidadReservada()); + assertEquals("Metro", productosRecuperados.getFirst().getNombreMedida()); + assertEquals(new BigDecimal("100.000000000000000"), productosRecuperados.getFirst().getPrecioCosto()); + assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.getFirst().getGananciaPorcentaje()); + assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.getFirst().getGananciaNeto()); + assertEquals(new BigDecimal("1000.000000000000000"), productosRecuperados.getFirst().getPrecioVentaPublico()); + assertEquals(new BigDecimal("21.000000000000000"), productosRecuperados.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("210.000000000000000"), productosRecuperados.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("1210.000000000000000"), productosRecuperados.getFirst().getPrecioLista()); + assertEquals("Ferreteria", productosRecuperados.getFirst().getNombreRubro()); + assertEquals(new BigDecimal("0E-15"), productosRecuperados.getFirst().getPorcentajeBonificacionOferta()); + assertEquals(new BigDecimal("20.000000000000000"), productosRecuperados.getFirst().getPorcentajeBonificacionPrecio()); + assertEquals(new BigDecimal("968.000000000000000"), productosRecuperados.getFirst().getPrecioBonificado()); restTemplate.postForObject( "/api/v1/productos?idMedida=" + medidaDadaDeAlta.getIdMedida() + "&idRubro=" + rubroDadoDeAlta.getIdRubro() @@ -333,24 +312,24 @@ void testEscenarioCompraEscenario1() { "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); productosRecuperados = resultadoBusqueda.getContent(); - assertEquals("Reflector led 100w", productosRecuperados.get(0).getDescripcion()); - assertEquals(new BigDecimal("9.000000000000000"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); - assertEquals("Metro", productosRecuperados.get(0).getNombreMedida()); - assertEquals(new BigDecimal("100.000000000000000"), productosRecuperados.get(0).getPrecioCosto()); - assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.get(0).getGananciaPorcentaje()); - assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.get(0).getGananciaNeto()); - assertEquals(new BigDecimal("1000.000000000000000"), productosRecuperados.get(0).getPrecioVentaPublico()); - assertEquals(new BigDecimal("10.500000000000000"), productosRecuperados.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("105.000000000000000"), productosRecuperados.get(0).getIvaNeto()); - assertEquals(new BigDecimal("1105.000000000000000"), productosRecuperados.get(0).getPrecioLista()); - assertEquals("Ferreteria", productosRecuperados.get(0).getNombreRubro()); - assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(0).getPorcentajeBonificacionOferta()); - assertEquals(new BigDecimal("20.000000000000000"), productosRecuperados.get(0).getPorcentajeBonificacionPrecio()); - assertEquals(new BigDecimal("884.000000000000000"), productosRecuperados.get(0).getPrecioBonificado()); + assertEquals("Reflector led 100w", productosRecuperados.getFirst().getDescripcion()); + assertEquals(new BigDecimal("9.000000000000000"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); + assertEquals("Metro", productosRecuperados.getFirst().getNombreMedida()); + assertEquals(new BigDecimal("100.000000000000000"), productosRecuperados.getFirst().getPrecioCosto()); + assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.getFirst().getGananciaPorcentaje()); + assertEquals(new BigDecimal("900.000000000000000"), productosRecuperados.getFirst().getGananciaNeto()); + assertEquals(new BigDecimal("1000.000000000000000"), productosRecuperados.getFirst().getPrecioVentaPublico()); + assertEquals(new BigDecimal("10.500000000000000"), productosRecuperados.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("105.000000000000000"), productosRecuperados.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("1105.000000000000000"), productosRecuperados.getFirst().getPrecioLista()); + assertEquals("Ferreteria", productosRecuperados.getFirst().getNombreRubro()); + assertEquals(new BigDecimal("0E-15"), productosRecuperados.getFirst().getPorcentajeBonificacionOferta()); + assertEquals(new BigDecimal("20.000000000000000"), productosRecuperados.getFirst().getPorcentajeBonificacionPrecio()); + assertEquals(new BigDecimal("884.000000000000000"), productosRecuperados.getFirst().getPrecioBonificado()); restTemplate.postForObject( "/api/v1/productos?idMedida=" + medidaDadaDeAlta.getIdMedida() + "&idRubro=" + rubroDadoDeAlta.getIdRubro() @@ -366,24 +345,24 @@ void testEscenarioCompraEscenario1() { "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); productosRecuperados = resultadoBusqueda.getContent(); - assertEquals("Canilla Monocomando", productosRecuperados.get(0).getDescripcion()); - assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); - assertEquals("Metro", productosRecuperados.get(0).getNombreMedida()); - assertEquals(new BigDecimal("10859.730000000000000"), productosRecuperados.get(0).getPrecioCosto()); - assertEquals(new BigDecimal("11.370000000000000"), productosRecuperados.get(0).getGananciaPorcentaje()); - assertEquals(new BigDecimal("1234.751000000000000"), productosRecuperados.get(0).getGananciaNeto()); - assertEquals(new BigDecimal("12094.481000000000000"), productosRecuperados.get(0).getPrecioVentaPublico()); - assertEquals(new BigDecimal("10.500000000000000"), productosRecuperados.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("1269.921000000000000"), productosRecuperados.get(0).getIvaNeto()); - assertEquals(new BigDecimal("13364.402000000000000"), productosRecuperados.get(0).getPrecioLista()); - assertEquals("Ferreteria", productosRecuperados.get(0).getNombreRubro()); - assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(0).getPorcentajeBonificacionOferta()); - assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.get(0).getPorcentajeBonificacionPrecio()); - assertEquals(new BigDecimal("12027.961800000000000"), productosRecuperados.get(0).getPrecioBonificado()); + assertEquals("Canilla Monocomando", productosRecuperados.getFirst().getDescripcion()); + assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); + assertEquals("Metro", productosRecuperados.getFirst().getNombreMedida()); + assertEquals(new BigDecimal("10859.730000000000000"), productosRecuperados.getFirst().getPrecioCosto()); + assertEquals(new BigDecimal("11.370000000000000"), productosRecuperados.getFirst().getGananciaPorcentaje()); + assertEquals(new BigDecimal("1234.751000000000000"), productosRecuperados.getFirst().getGananciaNeto()); + assertEquals(new BigDecimal("12094.481000000000000"), productosRecuperados.getFirst().getPrecioVentaPublico()); + assertEquals(new BigDecimal("10.500000000000000"), productosRecuperados.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("1269.921000000000000"), productosRecuperados.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("13364.402000000000000"), productosRecuperados.getFirst().getPrecioLista()); + assertEquals("Ferreteria", productosRecuperados.getFirst().getNombreRubro()); + assertEquals(new BigDecimal("0E-15"), productosRecuperados.getFirst().getPorcentajeBonificacionOferta()); + assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.getFirst().getPorcentajeBonificacionPrecio()); + assertEquals(new BigDecimal("12027.961800000000000"), productosRecuperados.getFirst().getPrecioBonificado()); List nuevosRenglones = new ArrayList<>(); criteria = BusquedaProductoCriteria.builder().build(); requestEntity = new HttpEntity<>(criteria); @@ -393,7 +372,7 @@ void testEscenarioCompraEscenario1() { "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); productosRecuperados = resultadoBusqueda.getContent(); @@ -421,48 +400,46 @@ void testEscenarioCompraEscenario1() { .descuentoPorcentaje(new BigDecimal("25")) .fecha(LocalDateTime.now()) .build(); - restTemplate.postForObject( - "/api/v1/facturas/compras", nuevaFacturaCompraDTO, FacturaCompra[].class); + restTemplate.postForObject("/api/v1/facturas/compras", nuevaFacturaCompraDTO, FacturaCompra[].class); BusquedaFacturaCompraCriteria criteriaCompra = BusquedaFacturaCompraCriteria.builder() .idSucursal(1L) .tipoComprobante(TipoDeComprobante.FACTURA_A) .build(); - HttpEntity requestEntityCompra = - new HttpEntity<>(criteriaCompra); - PaginaRespuestaRest resultadoBusquedaCompra = + HttpEntity requestEntityCompra = new HttpEntity<>(criteriaCompra); + PaginaRespuestaRest resultadoBusquedaCompra = restTemplate .exchange( "/api/v1/facturas/compras/busqueda/criteria", HttpMethod.POST, requestEntityCompra, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaCompra); - List facturasRecuperadas = resultadoBusquedaCompra.getContent(); + List facturasRecuperadas = resultadoBusquedaCompra.getContent(); assertEquals(1, facturasRecuperadas.size()); - assertEquals(new BigDecimal("560.000000000000000"), facturasRecuperadas.get(0).getSubTotal()); - assertEquals(new BigDecimal("56.000000000000000"), facturasRecuperadas.get(0).getRecargoNeto()); - assertEquals(new BigDecimal("140.000000000000000"), facturasRecuperadas.get(0).getDescuentoNeto()); - assertEquals(new BigDecimal("476.000000000000000"), facturasRecuperadas.get(0).getSubTotalBruto()); - assertEquals(new BigDecimal("21.420000000000000"), facturasRecuperadas.get(0).getIva105Neto()); - assertEquals(new BigDecimal("57.120000000000000"), facturasRecuperadas.get(0).getIva21Neto()); - assertEquals(new BigDecimal("554.540000000000000"), facturasRecuperadas.get(0).getTotal()); - assertNotNull(facturasRecuperadas.get(0).getFechaAlta()); - assertEquals(proveedorRecuperado.getRazonSocial(), facturasRecuperadas.get(0).getRazonSocialProveedor()); - assertEquals(sucursal.getNombre(), facturasRecuperadas.get(0).getNombreSucursal()); + assertEquals(new BigDecimal("560.000000000000000"), facturasRecuperadas.getFirst().getSubTotal()); + assertEquals(new BigDecimal("56.000000000000000"), facturasRecuperadas.getFirst().getRecargoNeto()); + assertEquals(new BigDecimal("140.000000000000000"), facturasRecuperadas.getFirst().getDescuentoNeto()); + assertEquals(new BigDecimal("476.000000000000000"), facturasRecuperadas.getFirst().getSubTotalBruto()); + assertEquals(new BigDecimal("21.420000000000000"), facturasRecuperadas.getFirst().getIva105Neto()); + assertEquals(new BigDecimal("57.120000000000000"), facturasRecuperadas.getFirst().getIva21Neto()); + assertEquals(new BigDecimal("554.540000000000000"), facturasRecuperadas.getFirst().getTotal()); + assertNotNull(facturasRecuperadas.getFirst().getFechaAlta()); + assertEquals(proveedorRecuperado.getRazonSocial(), facturasRecuperadas.getFirst().getRazonSocialProveedor()); + assertEquals(sucursal.getNombre(), facturasRecuperadas.getFirst().getNombreSucursal()); assertEquals(new BigDecimal("-554.540000000000000"), restTemplate.getForObject("/api/v1/cuentas-corriente/proveedores/1/saldo", BigDecimal.class)); - Recibo recibo = - Recibo.builder() + var recibo = + ReciboTest.builder() .monto(554.54) .concepto("Recibo para proveedor") .idSucursal(sucursal.getIdSucursal()) .idProveedor(proveedorRecuperado.getIdProveedor()) .idFormaDePago(2L) .build(); - Recibo reciboRecuperado = - restTemplate.postForObject("/api/v1/recibos/proveedores", recibo, Recibo.class); + var reciboRecuperado = + restTemplate.postForObject("/api/v1/recibos/proveedores", recibo, ReciboTest.class); assertEquals(recibo, reciboRecuperado); assertEquals( 0.0, @@ -477,13 +454,13 @@ void testEscenarioCompraEscenario1() { "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); productosRecuperados = resultadoBusqueda.getContent(); assertEquals(new BigDecimal("14.000000000000000"), productosRecuperados.get(2).getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("12.000000000000000"), productosRecuperados.get(1).getCantidadTotalEnSucursales()); - assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); + assertEquals(new BigDecimal("10.000000000000000"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); } @Test @@ -491,23 +468,23 @@ void testEscenarioCompraEscenario1() { @Order(4) void testEscenarioCompraEscenario2() { this.iniciarSesionComoAdministrador(); - assertEquals(0.0, restTemplate.getForObject("/api/v1/cuentas-corriente/proveedores/1/saldo", + assertEquals(0.0, + restTemplate.getForObject("/api/v1/cuentas-corriente/proveedores/1/saldo", BigDecimal.class).doubleValue()); - BusquedaProductoCriteria criteria = - BusquedaProductoCriteria.builder().descripcion("Ventilador").build(); + BusquedaProductoCriteria criteria = BusquedaProductoCriteria.builder().descripcion("Ventilador").build(); HttpEntity requestEntity = new HttpEntity<>(criteria); - PaginaRespuestaRest resultadoBusqueda = + PaginaRespuestaRest resultadoBusqueda = restTemplate .exchange( "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); - List productosRecuperados = resultadoBusqueda.getContent(); - assertEquals("Ventilador de pie", productosRecuperados.get(0).getDescripcion()); - assertEquals(new BigDecimal("14.000000000000000"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); + List productosRecuperados = resultadoBusqueda.getContent(); + assertEquals("Ventilador de pie", productosRecuperados.getFirst().getDescripcion()); + assertEquals(new BigDecimal("14.000000000000000"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); BusquedaFacturaCompraCriteria criteriaCompra = BusquedaFacturaCompraCriteria.builder() .idSucursal(1L) @@ -526,20 +503,20 @@ void testEscenarioCompraEscenario2() { assertNotNull(resultadoBusquedaCompra); List facturasRecuperadas = resultadoBusquedaCompra.getContent(); assertEquals(1, facturasRecuperadas.size()); - List renglonesFacturaCompra = Arrays.asList(restTemplate.getForObject("/api/v1/facturas/" + - facturasRecuperadas.get(0).getIdFactura() + "/renglones", sic.model.RenglonFactura[].class)); + List renglonesFacturaCompra = Arrays.asList(restTemplate.getForObject("/api/v1/facturas/" + + facturasRecuperadas.getFirst().getIdFactura() + "/renglones", RenglonFacturaTest[].class)); NuevaNotaCreditoDeFacturaDTO nuevaNotaCreditoDeFacturaDTO = NuevaNotaCreditoDeFacturaDTO .builder() - .idFactura(facturasRecuperadas.get(0).getIdFactura()) + .idFactura(facturasRecuperadas.getFirst().getIdFactura()) .cantidades(new BigDecimal[]{BigDecimal.ONE}) - .idsRenglonesFactura(new Long[]{renglonesFacturaCompra.get(0).getIdRenglonFactura()}) + .idsRenglonesFactura(new Long[]{renglonesFacturaCompra.getFirst().getIdRenglonFactura()}) .modificaStock(true) .motivo("Unidad Fallada") .build(); - NotaCredito notaCredito = restTemplate.postForObject("/api/v1/notas/credito/factura", nuevaNotaCreditoDeFacturaDTO, NotaCredito.class); + var notaCredito = restTemplate.postForObject("/api/v1/notas/credito/factura", nuevaNotaCreditoDeFacturaDTO, NotaCreditoTest.class); assertEquals(Movimiento.COMPRA, notaCredito.getMovimiento()); - assertEquals(notaCredito.getIdFacturaCompra(), facturasRecuperadas.get(0).getIdFactura()); - assertEquals(notaCredito.getIdNota(), 1L); + assertEquals(notaCredito.getIdFacturaCompra(), facturasRecuperadas.getFirst().getIdFactura()); + assertEquals(1L, notaCredito.getIdNota()); assertEquals(82.28, restTemplate.getForObject("/api/v1/cuentas-corriente/proveedores/1/saldo", BigDecimal.class).doubleValue()); resultadoBusqueda = @@ -548,12 +525,12 @@ void testEscenarioCompraEscenario2() { "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); productosRecuperados = resultadoBusqueda.getContent(); - assertEquals("Ventilador de pie", productosRecuperados.get(0).getDescripcion()); - assertEquals(new BigDecimal("13.000000000000000"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); + assertEquals("Ventilador de pie", productosRecuperados.getFirst().getDescripcion()); + assertEquals(new BigDecimal("13.000000000000000"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); } @Test @@ -577,7 +554,7 @@ void testEscenarioNotaDebito() { assertEquals(1, proveedoresRecuperados.size()); BusquedaReciboCriteria criteriaParaRecibos = BusquedaReciboCriteria.builder() - .idProveedor(proveedoresRecuperados.get(0).getIdProveedor()) + .idProveedor(proveedoresRecuperados.getFirst().getIdProveedor()) .build(); HttpEntity requestEntity = new HttpEntity<>(criteriaParaRecibos); PaginaRespuestaRest resultadoBusquedaRecibo = @@ -593,7 +570,7 @@ void testEscenarioNotaDebito() { assertEquals(1, recibosRecuperados.size()); NuevaNotaDebitoDeReciboDTO nuevaNotaDebitoDeReciboDTO = NuevaNotaDebitoDeReciboDTO.builder() - .idRecibo(recibosRecuperados.get(0).getIdRecibo()) + .idRecibo(recibosRecuperados.getFirst().getIdRecibo()) .gastoAdministrativo(new BigDecimal("1500.00")) .motivo("No pagamos, la vida es así.") .tipoDeComprobante(TipoDeComprobante.NOTA_DEBITO_A) @@ -602,7 +579,7 @@ void testEscenarioNotaDebito() { // restTemplate.postForObject( // "/api/v1/notas/debito/calculos", nuevaNotaDebitoDeReciboDTO, NotaDebito.class); // NotaDebito notaDebitoGuardada = - restTemplate.postForObject("/api/v1/notas/debito", nuevaNotaDebitoDeReciboDTO, NotaDebito.class); + restTemplate.postForObject("/api/v1/notas/debito", nuevaNotaDebitoDeReciboDTO, NotaDebitoTest.class); BusquedaNotaCriteria criteriaNota = BusquedaNotaCriteria.builder() .idSucursal(1L) @@ -615,20 +592,20 @@ void testEscenarioNotaDebito() { .getBody(); assertNotNull(resultadoBusquedaNota); List notasRecuperadas = resultadoBusquedaNota.getContent(); - List renglones = + List renglones = Arrays.asList( restTemplate.getForObject( - "/api/v1/notas/renglones/debito/" + notasRecuperadas.get(0).getIdNota(), - sic.model.RenglonNotaDebito[].class)); + "/api/v1/notas/renglones/debito/" + notasRecuperadas.getFirst().getIdNota(), + RenglonNotaDebitoTest[].class)); assertNotNull(renglones); assertEquals(2, renglones.size()); // renglones - assertEquals("Nº Recibo 2-1: Recibo para proveedor", renglones.get(0).getDescripcion()); - assertEquals(new BigDecimal("554.540000000000000"), renglones.get(0).getMonto()); - assertEquals(new BigDecimal("554.540000000000000"), renglones.get(0).getImporteBruto()); - assertEquals(new BigDecimal("0E-15"), renglones.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("0E-15"), renglones.get(0).getIvaNeto()); - assertEquals(new BigDecimal("554.540000000000000"), renglones.get(0).getImporteNeto()); + assertEquals("Nº Recibo 2-1: Recibo para proveedor", renglones.getFirst().getDescripcion()); + assertEquals(new BigDecimal("554.540000000000000"), renglones.getFirst().getMonto()); + assertEquals(new BigDecimal("554.540000000000000"), renglones.getFirst().getImporteBruto()); + assertEquals(new BigDecimal("0E-15"), renglones.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("0E-15"), renglones.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("554.540000000000000"), renglones.getFirst().getImporteNeto()); assertEquals("Gasto Administrativo", renglones.get(1).getDescripcion()); assertEquals(new BigDecimal("1239.669421487603306"), renglones.get(1).getMonto()); assertEquals(new BigDecimal("1239.669421487603306"), renglones.get(1).getImporteBruto()); @@ -642,13 +619,13 @@ void testEscenarioNotaDebito() { @Order(6) void testEscenarioAltaDeProducto() { this.iniciarSesionComoAdministrador(); - var medidas = Arrays.asList(restTemplate.getForObject("/api/v1/medidas", Medida[].class)); + var medidas = Arrays.asList(restTemplate.getForObject("/api/v1/medidas", MedidaTest[].class)); assertFalse(medidas.isEmpty()); assertEquals(1, medidas.size()); - var rubros = Arrays.asList(restTemplate.getForObject("/api/v1/rubros", Rubro[].class)); + var rubros = Arrays.asList(restTemplate.getForObject("/api/v1/rubros", RubroTest[].class)); assertFalse(rubros.isEmpty()); assertEquals(1, rubros.size()); - var sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", Sucursal[].class)); + var sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", SucursalTest[].class)); assertFalse(sucursales.isEmpty()); assertEquals(1, sucursales.size()); BusquedaProveedorCriteria criteriaParaProveedores = BusquedaProveedorCriteria.builder().build(); @@ -679,13 +656,13 @@ void testEscenarioAltaDeProducto() { .publico(true) .paraCatalogo(true) .build(); - Producto productoGuardado = + var productoGuardado = restTemplate.postForObject( - "/api/v1/productos?idMedida=" + medidas.get(0).getIdMedida() - + "&idRubro=" + rubros.get(0).getIdRubro() - + "&idProveedor=" + proveedoresRecuperados.get(0).getIdProveedor(), + "/api/v1/productos?idMedida=" + medidas.getFirst().getIdMedida() + + "&idRubro=" + rubros.getFirst().getIdRubro() + + "&idProveedor=" + proveedoresRecuperados.getFirst().getIdProveedor(), nuevoProductoCuatro, - Producto.class); + ProductoTest.class); assertNotNull(productoGuardado.getIdProducto()); } @@ -694,8 +671,8 @@ void testEscenarioAltaDeProducto() { @Order(7) void testEscenarioAltaClienteYPedido() { this.iniciarSesionComoAdministrador(); - Usuario credencial = - Usuario.builder() + UsuarioTest credencial = + UsuarioTest.builder() .username("elenanocanete") .password("siempredebarrio") .nombre("Juan") @@ -704,25 +681,25 @@ void testEscenarioAltaClienteYPedido() { .roles(new ArrayList<>(Collections.singletonList(Rol.COMPRADOR))) .habilitado(true) .build(); - var credencialDadaDeAlta = restTemplate.postForObject("/api/v1/usuarios", credencial, Usuario.class); + var credencialDadaDeAlta = restTemplate.postForObject("/api/v1/usuarios", credencial, UsuarioTest.class); credencialDadaDeAlta.setHabilitado(true); assertEquals(credencial, credencialDadaDeAlta); - Cliente cliente = - Cliente.builder() + var cliente = + ClienteTest.builder() .montoCompraMinima(new BigDecimal("500")) .nombreFiscal("Juan Fernando Canete") .categoriaIVA(CategoriaIVA.RESPONSABLE_INSCRIPTO) .idFiscal(30703176840L) .telefono("3785663322") .idCredencial(credencialDadaDeAlta.getIdUsuario()) - .ubicacionFacturacion(Ubicacion.builder().idProvincia(1L).idLocalidad(1L).build()) + .ubicacionFacturacion(UbicacionTest.builder().idProvincia(1L).idLocalidad(1L).build()) .email("correoparapagos@gmail.com") .puedeComprarAPlazo(true) .build(); - Cliente clienteRecuperado = restTemplate.postForObject("/api/v1/clientes", cliente, Cliente.class); + var clienteRecuperado = restTemplate.postForObject("/api/v1/clientes", cliente, ClienteTest.class); assertEquals(cliente, clienteRecuperado); - Producto productoUno = restTemplate.getForObject("/api/v1/productos/1/sucursales/1", Producto.class); - Producto productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", Producto.class); + var productoUno = restTemplate.getForObject("/api/v1/productos/1/sucursales/1", ProductoTest.class); + var productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", ProductoTest.class); assertEquals(new BigDecimal("13.000000000000000"), productoUno.getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("12.000000000000000"), productoDos.getCantidadTotalEnSucursales()); List renglonesPedidoDTO = new ArrayList<>(); @@ -745,28 +722,28 @@ void testEscenarioAltaClienteYPedido() { .idCliente(clienteRecuperado.getIdCliente()) .tipoDeEnvio(TipoDeEnvio.RETIRO_EN_SUCURSAL) .build(); - Pedido pedidoRecuperado = restTemplate.postForObject("/api/v1/pedidos", pedidoDTO, Pedido.class); - productoUno = restTemplate.getForObject("/api/v1/productos/1/sucursales/1", Producto.class); - productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", Producto.class); + var pedidoRecuperado = restTemplate.postForObject("/api/v1/pedidos", pedidoDTO, PedidoTest.class); + productoUno = restTemplate.getForObject("/api/v1/productos/1/sucursales/1", ProductoTest.class); + productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", ProductoTest.class); assertEquals(new BigDecimal("8.000000000000000"), productoUno.getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("10.000000000000000"), productoDos.getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("5.000000000000000"), productoUno.getCantidadReservada()); assertEquals(new BigDecimal("2.000000000000000"), productoDos.getCantidadReservada()); assertEquals(new BigDecimal("5947.200000000000000"), pedidoRecuperado.getTotal()); assertEquals(EstadoPedido.ABIERTO, pedidoRecuperado.getEstado()); - List renglonesDelPedido = + List renglonesDelPedido = Arrays.asList(restTemplate.getForObject( "/api/v1/pedidos/" + pedidoRecuperado.getIdPedido() + "/renglones", - sic.model.RenglonPedido[].class)); + RenglonPedidoTest[].class)); assertEquals(2, renglonesDelPedido.size()); - assertEquals("Ventilador de pie", renglonesDelPedido.get(0).getDescripcionItem()); - assertEquals("Metro", renglonesDelPedido.get(0).getMedidaItem()); - assertEquals(new BigDecimal("1210.000000000000000"), renglonesDelPedido.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("5.000000000000000"), renglonesDelPedido.get(0).getCantidad()); - assertEquals(new BigDecimal("20.000000000000000"), renglonesDelPedido.get(0).getBonificacionPorcentaje()); - assertEquals(new BigDecimal("242.000000000000000"), renglonesDelPedido.get(0).getBonificacionNeta()); - assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglonesDelPedido.get(0).getImporteAnterior()); - assertEquals(new BigDecimal("4840.000000000000000000000000000000"), renglonesDelPedido.get(0).getImporte()); + assertEquals("Ventilador de pie", renglonesDelPedido.getFirst().getDescripcionItem()); + assertEquals("Metro", renglonesDelPedido.getFirst().getMedidaItem()); + assertEquals(new BigDecimal("1210.000000000000000"), renglonesDelPedido.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("5.000000000000000"), renglonesDelPedido.getFirst().getCantidad()); + assertEquals(new BigDecimal("20.000000000000000"), renglonesDelPedido.getFirst().getBonificacionPorcentaje()); + assertEquals(new BigDecimal("242.000000000000000"), renglonesDelPedido.getFirst().getBonificacionNeta()); + assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglonesDelPedido.getFirst().getImporteAnterior()); + assertEquals(new BigDecimal("4840.000000000000000000000000000000"), renglonesDelPedido.getFirst().getImporte()); assertEquals("Reflector led 100w", renglonesDelPedido.get(1).getDescripcionItem()); assertEquals("Metro", renglonesDelPedido.get(1).getMedidaItem()); assertEquals(new BigDecimal("1105.000000000000000"), renglonesDelPedido.get(1).getPrecioUnitario()); @@ -784,22 +761,22 @@ void testEscenarioModificacionPedido() { this.iniciarSesionComoAdministrador(); BusquedaPedidoCriteria criteria = BusquedaPedidoCriteria.builder().idSucursal(1L).build(); HttpEntity requestEntity = new HttpEntity<>(criteria); - PaginaRespuestaRest resultadoBusquedaPedido = + var resultadoBusquedaPedido = restTemplate .exchange( "/api/v1/pedidos/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaPedido); - List pedidosRecuperados = resultadoBusquedaPedido.getContent(); + var pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(1, pedidosRecuperados.size()); - List renglonesPedidos = + List renglonesPedidos = Arrays.asList( restTemplate.getForObject( - "/api/v1/pedidos/" + pedidosRecuperados.get(0).getIdPedido() + "/renglones", - sic.model.RenglonPedido[].class)); + "/api/v1/pedidos/" + pedidosRecuperados.getFirst().getIdPedido() + "/renglones", + RenglonPedidoTest[].class)); assertNotNull(renglonesPedidos); assertEquals(2, renglonesPedidos.size()); List renglonesPedidoDTO = new ArrayList<>(); @@ -811,20 +788,19 @@ void testEscenarioModificacionPedido() { .cantidad(renglonPedido.getCantidad()) .build())); renglonesPedidoDTO.get(1).setCantidad(new BigDecimal("3")); - renglonesPedidoDTO.add( - NuevoRenglonPedidoDTO.builder().idProductoItem(3L).cantidad(BigDecimal.TEN).build()); + renglonesPedidoDTO.add(NuevoRenglonPedidoDTO.builder().idProductoItem(3L).cantidad(BigDecimal.TEN).build()); PedidoDTO pedidoDTO = PedidoDTO.builder() - .idPedido(pedidosRecuperados.get(0).getIdPedido()) + .idPedido(pedidosRecuperados.getFirst().getIdPedido()) .descuentoPorcentaje(new BigDecimal("15.000000000000000")) .recargoPorcentaje(new BigDecimal("5")) .renglones(renglonesPedidoDTO) .idSucursal(1L) - .idCliente(pedidosRecuperados.get(0).getCliente().getIdCliente()) + .idCliente(pedidosRecuperados.getFirst().getCliente().getIdCliente()) .tipoDeEnvio(TipoDeEnvio.RETIRO_EN_SUCURSAL) .build(); restTemplate.put("/api/v1/pedidos", pedidoDTO); - Producto productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", Producto.class); + var productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", ProductoTest.class); assertEquals(new BigDecimal("9.000000000000000"), productoDos.getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("3.000000000000000"), productoDos.getCantidadReservada()); criteria = BusquedaPedidoCriteria.builder().idSucursal(1L).build(); @@ -835,26 +811,26 @@ void testEscenarioModificacionPedido() { "/api/v1/pedidos/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaPedido); pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(1, pedidosRecuperados.size()); - assertEquals(EstadoPedido.ABIERTO, pedidosRecuperados.get(0).getEstado()); - List renglonesDelPedido = + assertEquals(EstadoPedido.ABIERTO, pedidosRecuperados.getFirst().getEstado()); + var renglonesDelPedido = Arrays.asList( restTemplate.getForObject( - "/api/v1/pedidos/" + pedidosRecuperados.get(0).getIdPedido() + "/renglones", - sic.model.RenglonPedido[].class)); + "/api/v1/pedidos/" + pedidosRecuperados.getFirst().getIdPedido() + "/renglones", + RenglonPedidoTest[].class)); assertEquals(3, renglonesDelPedido.size()); - assertEquals("Ventilador de pie", renglonesDelPedido.get(0).getDescripcionItem()); - assertEquals("Metro", renglonesDelPedido.get(0).getMedidaItem()); - assertEquals(new BigDecimal("1210.000000000000000"), renglonesDelPedido.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("5.000000000000000"), renglonesDelPedido.get(0).getCantidad()); - assertEquals(new BigDecimal("20.000000000000000"), renglonesDelPedido.get(0).getBonificacionPorcentaje()); - assertEquals(new BigDecimal("242.000000000000000"), renglonesDelPedido.get(0).getBonificacionNeta()); - assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglonesDelPedido.get(0).getImporteAnterior()); - assertEquals(new BigDecimal("4840.000000000000000000000000000000"), renglonesDelPedido.get(0).getImporte()); + assertEquals("Ventilador de pie", renglonesDelPedido.getFirst().getDescripcionItem()); + assertEquals("Metro", renglonesDelPedido.getFirst().getMedidaItem()); + assertEquals(new BigDecimal("1210.000000000000000"), renglonesDelPedido.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("5.000000000000000"), renglonesDelPedido.getFirst().getCantidad()); + assertEquals(new BigDecimal("20.000000000000000"), renglonesDelPedido.getFirst().getBonificacionPorcentaje()); + assertEquals(new BigDecimal("242.000000000000000"), renglonesDelPedido.getFirst().getBonificacionNeta()); + assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglonesDelPedido.getFirst().getImporteAnterior()); + assertEquals(new BigDecimal("4840.000000000000000000000000000000"), renglonesDelPedido.getFirst().getImporte()); assertEquals("Reflector led 100w", renglonesDelPedido.get(1).getDescripcionItem()); assertEquals("Metro", renglonesDelPedido.get(1).getMedidaItem()); assertEquals(new BigDecimal("1105.000000000000000"), renglonesDelPedido.get(1).getPrecioUnitario()); @@ -880,35 +856,35 @@ void testEscenarioVenta1() { this.iniciarSesionComoAdministrador(); BusquedaPedidoCriteria criteria = BusquedaPedidoCriteria.builder().idSucursal(1L).build(); HttpEntity requestEntity = new HttpEntity<>(criteria); - PaginaRespuestaRest resultadoBusquedaPedido = + var resultadoBusquedaPedido = restTemplate .exchange( "/api/v1/pedidos/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaPedido); - List pedidosRecuperados = resultadoBusquedaPedido.getContent(); + var pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(1, pedidosRecuperados.size()); - List renglones = + var renglones = Arrays.asList( restTemplate.getForObject( "/api/v1/facturas/ventas/renglones/pedidos/" - + pedidosRecuperados.get(0).getIdPedido() + + pedidosRecuperados.getFirst().getIdPedido() + "?tipoDeComprobante=FACTURA_A", RenglonFactura[].class)); - assertEquals("Ventilador de pie", renglones.get(0).getDescripcionItem()); - assertEquals(new BigDecimal("5.000000000000000"), renglones.get(0).getCantidad()); - assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("20.000000000000000"), renglones.get(0).getBonificacionPorcentaje()); - assertEquals(new BigDecimal("200.000000000000000"), renglones.get(0).getBonificacionNeta()); - assertEquals(new BigDecimal("21.000000000000000"), renglones.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("168.000000000000000000000000000000000000000000000"), renglones.get(0).getIvaNeto()); - assertEquals(new BigDecimal("900.000000000000000"), renglones.get(0).getGananciaPorcentaje()); - assertEquals(new BigDecimal("900.000000000000000"), renglones.get(0).getGananciaNeto()); - assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglones.get(0).getImporteAnterior()); - assertEquals(new BigDecimal("4000.000000000000000000000000000000"), renglones.get(0).getImporte()); + assertEquals("Ventilador de pie", renglones.getFirst().getDescripcionItem()); + assertEquals(new BigDecimal("5.000000000000000"), renglones.getFirst().getCantidad()); + assertEquals(new BigDecimal("1000.000000000000000"), renglones.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("20.000000000000000"), renglones.getFirst().getBonificacionPorcentaje()); + assertEquals(new BigDecimal("200.000000000000000"), renglones.getFirst().getBonificacionNeta()); + assertEquals(new BigDecimal("21.000000000000000"), renglones.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("168.000000000000000000000000000000000000000000000"), renglones.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("900.000000000000000"), renglones.getFirst().getGananciaPorcentaje()); + assertEquals(new BigDecimal("900.000000000000000"), renglones.getFirst().getGananciaNeto()); + assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglones.getFirst().getImporteAnterior()); + assertEquals(new BigDecimal("4000.000000000000000000000000000000"), renglones.getFirst().getImporte()); assertEquals("Reflector led 100w", renglones.get(1).getDescripcionItem()); assertEquals(new BigDecimal("3.000000000000000"), renglones.get(1).getCantidad()); assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(1).getPrecioUnitario()); @@ -931,7 +907,7 @@ void testEscenarioVenta1() { assertEquals(new BigDecimal("1234.751000000000000"), renglones.get(2).getGananciaNeto()); assertEquals(new BigDecimal("133644.020000000000000000000000000000"), renglones.get(2).getImporteAnterior()); assertEquals(new BigDecimal("108850.329000000000000000000000000000"), renglones.get(2).getImporte()); - Cliente cliente = restTemplate.getForObject("/api/v1/clientes/1", Cliente.class); + var cliente = restTemplate.getForObject("/api/v1/clientes/1", ClienteTest.class); assertNotNull(cliente); int[] indices = new int[] {0}; NuevaFacturaVentaDTO nuevaFacturaVentaDTO = @@ -943,14 +919,14 @@ void testEscenarioVenta1() { .descuentoPorcentaje(new BigDecimal("25")) .indices(indices) .build(); - FacturaVenta[] facturas = restTemplate.postForObject( - "/api/v1/facturas/ventas/pedidos/" + pedidosRecuperados.get(0).getIdPedido(), - nuevaFacturaVentaDTO, FacturaVenta[].class); - Producto productoUno = restTemplate.getForObject("/api/v1/productos/1/sucursales/1", Producto.class); + var facturas = restTemplate.postForObject( + "/api/v1/facturas/ventas/pedidos/" + pedidosRecuperados.getFirst().getIdPedido(), + nuevaFacturaVentaDTO, FacturaVentaTest[].class); + var productoUno = restTemplate.getForObject("/api/v1/productos/1/sucursales/1", ProductoTest.class); assertEquals(new BigDecimal("8.000000000000000"), productoUno.getCantidadTotalEnSucursales()); - Producto productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", Producto.class); + var productoDos = restTemplate.getForObject("/api/v1/productos/2/sucursales/1", ProductoTest.class); assertEquals(new BigDecimal("9.000000000000000"), productoDos.getCantidadTotalEnSucursales()); - Producto productoTres = restTemplate.getForObject("/api/v1/productos/3/sucursales/1", Producto.class); + var productoTres = restTemplate.getForObject("/api/v1/productos/3/sucursales/1", ProductoTest.class); assertEquals(new BigDecimal("0E-15"), productoTres.getCantidadTotalEnSucursales()); assertEquals(2, facturas.length); assertEquals(TipoDeComprobante.FACTURA_A, facturas[1].getTipoComprobante()); @@ -965,12 +941,12 @@ void testEscenarioVenta1() { "/api/v1/facturas/ventas/" + facturas[1].getIdFactura() + "/reporte", byte[].class)); assertEquals(cliente.getNombreFiscal(), facturas[0].getNombreFiscalCliente()); - Sucursal sucursal = restTemplate.getForObject("/api/v1/sucursales/1", Sucursal.class); + SucursalTest sucursal = restTemplate.getForObject("/api/v1/sucursales/1", SucursalTest.class); assertNotNull(sucursal); assertEquals(sucursal.getNombre(), facturas[0].getNombreSucursal()); assertEquals(cliente.getNombreFiscal(), facturas[1].getNombreFiscalCliente()); assertEquals(sucursal.getNombre(), facturas[1].getNombreSucursal()); - Usuario credencial = restTemplate.getForObject("/api/v1/usuarios/2", Usuario.class); + UsuarioTest credencial = restTemplate.getForObject("/api/v1/usuarios/2", UsuarioTest.class); assertNotNull(credencial); assertEquals(credencial.getNombre() + " " + credencial.getApellido() + " (" + credencial.getUsername() + ")", facturas[0].getNombreUsuario()); @@ -983,27 +959,29 @@ void testEscenarioVenta1() { assertEquals(new BigDecimal("400.000000000000000"), facturas[0].getDescuentoNeto()); assertEquals(new BigDecimal("28412.582250000000000"), facturas[1].getDescuentoNeto()); assertEquals(BigDecimal.ZERO, facturas[0].getIva105Neto()); - assertEquals(new BigDecimal("9929.091863250000000000000000000000000000000000000000000000000000000000000000000"), + assertEquals( + new BigDecimal("9929.091863250000000000000000000000000000000000000000000000000000000000000000000"), facturas[1].getIva105Neto()); assertEquals(BigDecimal.ZERO, facturas[0].getIva21Neto()); assertEquals(new BigDecimal("428.400000000000000000000000000000000000000000000000000000000000"), facturas[1].getIva21Neto()); assertEquals(new BigDecimal("1360.000000000000000000000000000000"), facturas[0].getSubTotalBruto()); assertEquals(new BigDecimal("96602.779650000000000000000000000000"), facturas[1].getSubTotalBruto()); assertEquals(new BigDecimal("1360.000000000000000000000000000000"), facturas[0].getTotal()); - assertEquals(new BigDecimal("106960.271513250000000000000000000000000000000000000000000000000000000000000000000"), + assertEquals( + new BigDecimal("106960.271513250000000000000000000000000000000000000000000000000000000000000000000"), facturas[1].getTotal()); - List renglonesFacturaUno = + var renglonesFacturaUno = Arrays.asList( restTemplate.getForObject( "/api/v1/facturas/" + facturas[0].getIdFactura() + "/renglones", - RenglonFactura[].class)); - List renglonesFacturaDos = + RenglonFacturaTest[].class)); + var renglonesFacturaDos = Arrays.asList( restTemplate.getForObject( "/api/v1/facturas/" + facturas[1].getIdFactura() + "/renglones", - RenglonFactura[].class)); - assertEquals(2.0, renglonesFacturaUno.get(0).getCantidad().doubleValue()); - assertEquals(3.0, renglonesFacturaDos.get(0).getCantidad().doubleValue()); + RenglonFacturaTest[].class)); + assertEquals(2.0, renglonesFacturaUno.getFirst().getCantidad().doubleValue()); + assertEquals(3.0, renglonesFacturaDos.getFirst().getCantidad().doubleValue()); assertEquals(3.0, renglonesFacturaDos.get(1).getCantidad().doubleValue()); assertEquals(10.000000000000000, renglonesFacturaDos.get(2).getCantidad().doubleValue()); assertEquals( @@ -1011,16 +989,15 @@ void testEscenarioVenta1() { restTemplate .getForObject("/api/v1/cuentas-corriente/clientes/1/saldo", BigDecimal.class) .doubleValue()); - Recibo recibo = - Recibo.builder() + var recibo = + ReciboTest.builder() .concepto("Recibo Test") .monto(108320.27151325) .idSucursal(sucursal.getIdSucursal()) .idCliente(cliente.getIdCliente()) .idFormaDePago(1L) .build(); - Recibo reciboDeFactura = - restTemplate.postForObject("/api/v1/recibos/clientes", recibo, Recibo.class); + var reciboDeFactura = restTemplate.postForObject("/api/v1/recibos/clientes", recibo, ReciboTest.class); assertNotNull( restTemplate.getForObject( "/api/v1/recibos/" + reciboDeFactura.getIdRecibo() + "/reporte", byte[].class)); @@ -1038,12 +1015,12 @@ void testEscenarioVenta1() { "/api/v1/pedidos/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaPedido); pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(1, pedidosRecuperados.size()); - assertEquals(EstadoPedido.CERRADO, pedidosRecuperados.get(0).getEstado()); + assertEquals(EstadoPedido.CERRADO, pedidosRecuperados.getFirst().getEstado()); } @Test @@ -1065,22 +1042,22 @@ void testEscenarioRemito() { assertEquals("transportista.com.ar", transportistaNuevo.getWeb()); BusquedaFacturaVentaCriteria criteria = BusquedaFacturaVentaCriteria.builder().idSucursal(1L).build(); HttpEntity requestEntity = new HttpEntity<>(criteria); - PaginaRespuestaRest resultadoBusquedaFactura = + var resultadoBusquedaFactura = restTemplate.exchange("/api/v1/facturas/ventas/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaFactura); - List facturasVenta = resultadoBusquedaFactura.getContent(); + var facturasVenta = resultadoBusquedaFactura.getContent(); assertEquals(2, facturasVenta.size()); BigDecimal[] cantidadesDeBultos = new BigDecimal[]{new BigDecimal("6"), BigDecimal.TEN}; TipoBulto[] tipoBulto = new TipoBulto[]{TipoBulto.CAJA, TipoBulto.ATADO}; - Remito remitoResultante = + var remitoResultante = restTemplate.postForObject( "/api/v1/remitos", NuevoRemitoDTO.builder() - .idFacturaVenta(new long[] {facturasVenta.get(0).getIdFactura(), facturasVenta.get(1).getIdFactura()}) + .idFacturaVenta(new long[] {facturasVenta.getFirst().getIdFactura(), facturasVenta.get(1).getIdFactura()}) .cantidadPorBulto(cantidadesDeBultos) .tiposDeBulto(tipoBulto) .costoDeEnvio(new BigDecimal("25")) @@ -1088,7 +1065,7 @@ void testEscenarioRemito() { .pesoTotalEnKg(new BigDecimal("72")) .volumenTotalEnM3(new BigDecimal("118")) .build(), - Remito.class); + RemitoTest.class); assertNotNull(remitoResultante); assertEquals(1L, remitoResultante.getIdRemito()); assertNotNull(remitoResultante.getFecha()); @@ -1117,15 +1094,15 @@ void testEscenarioRemito() { "/api/v1/facturas/ventas/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaFactura); facturasVenta = resultadoBusquedaFactura.getContent(); assertEquals(2, facturasVenta.size()); assertNotNull(facturasVenta.get(1).getRemito()); assertEquals(1L,facturasVenta.get(1).getRemito().getIdRemito()); - assertNotNull(facturasVenta.get(0).getRemito()); - assertEquals( 1L,facturasVenta.get(0).getRemito().getIdRemito()); + assertNotNull(facturasVenta.getFirst().getRemito()); + assertEquals( 1L,facturasVenta.getFirst().getRemito().getIdRemito()); } @Test @@ -1141,34 +1118,32 @@ void testEscenarioVenta2() { .numFactura(1L) .build(); HttpEntity requestEntity = new HttpEntity<>(criteria); - PaginaRespuestaRest resultadoBusqueda = + var resultadoBusqueda = restTemplate .exchange( "/api/v1/facturas/ventas/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); - List facturasRecuperadas = resultadoBusqueda.getContent(); + var facturasRecuperadas = resultadoBusqueda.getContent(); Long[] idsRenglonesFactura = new Long[1]; idsRenglonesFactura[0] = 3L; BigDecimal[] cantidades = new BigDecimal[1]; cantidades[0] = new BigDecimal("1"); NuevaNotaCreditoDeFacturaDTO nuevaNotaCreditoDTO = NuevaNotaCreditoDeFacturaDTO.builder() - .idFactura(facturasRecuperadas.get(0).getIdFactura()) + .idFactura(facturasRecuperadas.getFirst().getIdFactura()) .idsRenglonesFactura(idsRenglonesFactura) .cantidades(cantidades) .modificaStock(true) .motivo("No funcionan.") .build(); - NotaCredito notaCreditoCalculada = - restTemplate.postForObject( - "/api/v1/notas/credito/calculos", nuevaNotaCreditoDTO, NotaCredito.class); - NotaCredito notaCreditoGuardada = - restTemplate.postForObject( - "/api/v1/notas/credito/factura", nuevaNotaCreditoDTO, NotaCredito.class); + var notaCreditoCalculada = + restTemplate.postForObject("/api/v1/notas/credito/calculos", nuevaNotaCreditoDTO, NotaCreditoTest.class); + var notaCreditoGuardada = + restTemplate.postForObject("/api/v1/notas/credito/factura", nuevaNotaCreditoDTO, NotaCreditoTest.class); assertEquals(TipoDeComprobante.NOTA_CREDITO_X, notaCreditoCalculada.getTipoComprobante()); BusquedaNotaCriteria criteriaNota = BusquedaNotaCriteria.builder() @@ -1176,33 +1151,33 @@ void testEscenarioVenta2() { .tipoComprobante(TipoDeComprobante.NOTA_CREDITO_X) .build(); HttpEntity requestEntityNota = new HttpEntity<>(criteriaNota); - PaginaRespuestaRest resultadoBusquedaNota = + var resultadoBusquedaNota = restTemplate .exchange( "/api/v1/notas/credito/busqueda/criteria", HttpMethod.POST, requestEntityNota, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaNota); - List notasRecuperadas = resultadoBusquedaNota.getContent(); - List renglones = + var notasRecuperadas = resultadoBusquedaNota.getContent(); + List renglones = Arrays.asList( restTemplate.getForObject( - "/api/v1/notas/renglones/credito/" + notasRecuperadas.get(0).getIdNota(), - sic.model.RenglonNotaCredito[].class)); + "/api/v1/notas/renglones/credito/" + notasRecuperadas.getFirst().getIdNota(), + RenglonNotaCreditoTest[].class)); assertNotNull(renglones); assertEquals(1, renglones.size()); // renglones - assertEquals(new BigDecimal("1.000000000000000"), renglones.get(0).getCantidad()); - assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("20.000000000000000"), renglones.get(0).getDescuentoPorcentaje()); - assertEquals(new BigDecimal("200.000000000000000"), renglones.get(0).getDescuentoNeto()); - assertEquals(new BigDecimal("21.000000000000000"), renglones.get(0).getIvaPorcentaje()); - assertEquals(0.0, renglones.get(0).getIvaNeto().doubleValue()); - assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(0).getImporte()); - assertEquals(new BigDecimal("800.000000000000000"), renglones.get(0).getImporteBruto()); - assertEquals(new BigDecimal("800.000000000000000"), renglones.get(0).getImporteNeto()); + assertEquals(new BigDecimal("1.000000000000000"), renglones.getFirst().getCantidad()); + assertEquals(new BigDecimal("1000.000000000000000"), renglones.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("20.000000000000000"), renglones.getFirst().getDescuentoPorcentaje()); + assertEquals(new BigDecimal("200.000000000000000"), renglones.getFirst().getDescuentoNeto()); + assertEquals(new BigDecimal("21.000000000000000"), renglones.getFirst().getIvaPorcentaje()); + assertEquals(0.0, renglones.getFirst().getIvaNeto().doubleValue()); + assertEquals(new BigDecimal("1000.000000000000000"), renglones.getFirst().getImporte()); + assertEquals(new BigDecimal("800.000000000000000"), renglones.getFirst().getImporteBruto()); + assertEquals(new BigDecimal("800.000000000000000"), renglones.getFirst().getImporteNeto()); // pie de nota assertEquals(new BigDecimal("800.000000000000000000000000000000"), notaCreditoGuardada.getSubTotal()); assertEquals(new BigDecimal("80.000000000000000"), notaCreditoGuardada.getRecargoNeto()); @@ -1212,8 +1187,9 @@ void testEscenarioVenta2() { assertEquals(BigDecimal.ZERO, notaCreditoGuardada.getIva105Neto()); assertEquals(new BigDecimal("680.000000000000000000000000000000"), notaCreditoGuardada.getTotal()); assertNotNull(restTemplate.getForObject("/api/v1/notas/1/reporte", byte[].class)); - assertEquals(655.0, restTemplate.getForObject("/api/v1/cuentas-corriente/clientes/1/saldo", - BigDecimal.class).doubleValue()); + assertEquals( + 655.0, + restTemplate.getForObject("/api/v1/cuentas-corriente/clientes/1/saldo", BigDecimal.class).doubleValue()); } @Test @@ -1233,21 +1209,21 @@ void testEscenarioRegistracionYPedidoDelNuevoCliente() { .build(); restTemplate.postForObject("/api/v1/registracion", registro, Void.class); this.iniciarSesionComoAdministrador(); - Usuario usuario = restTemplate.getForObject("/api/v1/usuarios/4", Usuario.class); + UsuarioTest usuario = restTemplate.getForObject("/api/v1/usuarios/4", UsuarioTest.class); assertEquals("Sansa María", usuario.getNombre()); assertEquals("Stark", usuario.getApellido()); assertTrue(usuario.isHabilitado()); - Cliente cliente = restTemplate.getForObject("/api/v1/clientes/2", Cliente.class); + var cliente = restTemplate.getForObject("/api/v1/clientes/2", ClienteTest.class); assertEquals("theRedWolf", cliente.getNombreFiscal()); assertEquals(0.0, cliente.getMontoCompraMinima().doubleValue()); assertFalse(cliente.isPuedeComprarAPlazo()); - sic.model.CuentaCorrienteCliente cuentaCorrienteCliente = + var cuentaCorrienteCliente = restTemplate.getForObject( "/api/v1/cuentas-corriente/clientes/" + cliente.getIdCliente(), - sic.model.CuentaCorrienteCliente.class); + CuentaCorrienteCliente.class); assertNotNull(cuentaCorrienteCliente); assertEquals(0.0, cuentaCorrienteCliente.getSaldo().doubleValue()); - cliente.setUbicacionFacturacion(Ubicacion.builder().idLocalidad(2L).idProvincia(2L).build()); + cliente.setUbicacionFacturacion(UbicacionTest.builder().idLocalidad(2L).idProvincia(2L).build()); cliente.setPuedeComprarAPlazo(true); restTemplate.put("/api/v1/clientes", cliente); this.token = @@ -1258,19 +1234,13 @@ void testEscenarioRegistracionYPedidoDelNuevoCliente() { String.class) .getBody(); assertNotNull(this.token); - restTemplate.postForObject( - "/api/v1/carrito-compra/productos/1?cantidad=5", null, ItemCarritoCompra.class); - restTemplate.postForObject( - "/api/v1/carrito-compra/productos/2?cantidad=9", null, ItemCarritoCompra.class); - ItemCarritoCompra item1 = - restTemplate.getForObject( - "/api/v1/carrito-compra/productos/1/sucursales/1", ItemCarritoCompra.class); + restTemplate.postForObject("/api/v1/carrito-compra/productos/1?cantidad=5", null, ItemCarritoCompra.class); + restTemplate.postForObject("/api/v1/carrito-compra/productos/2?cantidad=9", null, ItemCarritoCompra.class); + var item1 = restTemplate.getForObject("/api/v1/carrito-compra/productos/1/sucursales/1", ItemCarritoCompra.class); assertNotNull(item1); assertEquals(1L, item1.getProducto().getIdProducto().longValue()); assertEquals(5, item1.getCantidad().doubleValue()); - ItemCarritoCompra item2 = - restTemplate.getForObject( - "/api/v1/carrito-compra/productos/2/sucursales/1", ItemCarritoCompra.class); + var item2 = restTemplate.getForObject("/api/v1/carrito-compra/productos/2/sucursales/1", ItemCarritoCompra.class); assertNotNull(item2); assertEquals(2L, item2.getProducto().getIdProducto().longValue()); assertEquals(9, item2.getCantidad().doubleValue()); @@ -1279,27 +1249,27 @@ void testEscenarioRegistracionYPedidoDelNuevoCliente() { .idSucursal(1L) .tipoDeEnvio(TipoDeEnvio.USAR_UBICACION_FACTURACION) .build(); - Pedido pedido = + var pedido = restTemplate.postForObject( - "/api/v1/carrito-compra", nuevaOrdenDePagoDTO, Pedido.class); + "/api/v1/carrito-compra", nuevaOrdenDePagoDTO, PedidoTest.class); assertNotNull(pedido); assertEquals(14, pedido.getCantidadArticulos().doubleValue()); assertEquals(new BigDecimal("12796.000000000000000"), pedido.getTotal()); assertEquals(EstadoPedido.ABIERTO, pedido.getEstado()); - List renglonesDelPedido = + List renglonesDelPedido = Arrays.asList( restTemplate.getForObject( "/api/v1/pedidos/" + pedido.getIdPedido() + "/renglones", - sic.model.RenglonPedido[].class)); + RenglonPedidoTest[].class)); assertEquals(2, renglonesDelPedido.size()); - assertEquals("Reflector led 100w", renglonesDelPedido.get(0).getDescripcionItem()); - assertEquals("Metro", renglonesDelPedido.get(0).getMedidaItem()); - assertEquals(new BigDecimal("1105.000000000000000"), renglonesDelPedido.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("9.000000000000000"), renglonesDelPedido.get(0).getCantidad()); - assertEquals(new BigDecimal("20.000000000000000"), renglonesDelPedido.get(0).getBonificacionPorcentaje()); - assertEquals(new BigDecimal("221.000000000000000"), renglonesDelPedido.get(0).getBonificacionNeta()); - assertEquals(new BigDecimal("9945.000000000000000000000000000000"), renglonesDelPedido.get(0).getImporteAnterior()); - assertEquals(new BigDecimal("7956.000000000000000000000000000000"), renglonesDelPedido.get(0).getImporte()); + assertEquals("Reflector led 100w", renglonesDelPedido.getFirst().getDescripcionItem()); + assertEquals("Metro", renglonesDelPedido.getFirst().getMedidaItem()); + assertEquals(new BigDecimal("1105.000000000000000"), renglonesDelPedido.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("9.000000000000000"), renglonesDelPedido.getFirst().getCantidad()); + assertEquals(new BigDecimal("20.000000000000000"), renglonesDelPedido.getFirst().getBonificacionPorcentaje()); + assertEquals(new BigDecimal("221.000000000000000"), renglonesDelPedido.getFirst().getBonificacionNeta()); + assertEquals(new BigDecimal("9945.000000000000000000000000000000"), renglonesDelPedido.getFirst().getImporteAnterior()); + assertEquals(new BigDecimal("7956.000000000000000000000000000000"), renglonesDelPedido.getFirst().getImporte()); assertEquals("Ventilador de pie", renglonesDelPedido.get(1).getDescripcionItem()); assertEquals("Metro", renglonesDelPedido.get(1).getMedidaItem()); assertEquals(new BigDecimal("1210.000000000000000"), renglonesDelPedido.get(1).getPrecioUnitario()); @@ -1315,28 +1285,25 @@ void testEscenarioRegistracionYPedidoDelNuevoCliente() { @Order(13) void testEscenarioCerrarCaja1() { this.iniciarSesionComoAdministrador(); - List sucursales = - Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", Sucursal[].class)); + var sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", SucursalTest[].class)); assertNotNull(sucursales); assertEquals(1, sucursales.size()); - BusquedaCajaCriteria criteriaParaBusquedaCaja = - BusquedaCajaCriteria.builder().idSucursal(sucursales.get(0).getIdSucursal()).build(); - HttpEntity requestEntityParaProveedores = - new HttpEntity<>(criteriaParaBusquedaCaja); - PaginaRespuestaRest resultadosBusquedaCaja = + var criteriaParaBusquedaCaja = BusquedaCajaCriteria.builder().idSucursal(sucursales.getFirst().getIdSucursal()).build(); + HttpEntity requestEntityParaProveedores = new HttpEntity<>(criteriaParaBusquedaCaja); + var resultadosBusquedaCaja = restTemplate .exchange( "/api/v1/cajas/busqueda/criteria", HttpMethod.POST, requestEntityParaProveedores, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadosBusquedaCaja); - List cajasRecuperadas = resultadosBusquedaCaja.getContent(); + var cajasRecuperadas = resultadosBusquedaCaja.getContent(); assertEquals(1, cajasRecuperadas.size()); - assertEquals(EstadoCaja.ABIERTA, cajasRecuperadas.get(0).getEstado()); + assertEquals(EstadoCaja.ABIERTA, cajasRecuperadas.getFirst().getEstado()); restTemplate.put( - "/api/v1/cajas/" + cajasRecuperadas.get(0).getIdCaja() + "/cierre?monto=5276.66", + "/api/v1/cajas/" + cajasRecuperadas.getFirst().getIdCaja() + "/cierre?monto=5276.66", null); resultadosBusquedaCaja = restTemplate @@ -1344,42 +1311,41 @@ void testEscenarioCerrarCaja1() { "/api/v1/cajas/busqueda/criteria", HttpMethod.POST, requestEntityParaProveedores, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadosBusquedaCaja); cajasRecuperadas = resultadosBusquedaCaja.getContent(); assertEquals(1, cajasRecuperadas.size()); - assertEquals(EstadoCaja.CERRADA, cajasRecuperadas.get(0).getEstado()); - assertEquals( - new BigDecimal("1000.000000000000000"), cajasRecuperadas.get(0).getSaldoApertura()); + assertEquals(EstadoCaja.CERRADA, cajasRecuperadas.getFirst().getEstado()); + assertEquals(new BigDecimal("1000.000000000000000"), cajasRecuperadas.getFirst().getSaldoApertura()); List movimientoCajas = Arrays.asList( restTemplate.getForObject( "/api/v1/cajas/" - + cajasRecuperadas.get(0).getIdCaja() + + cajasRecuperadas.getFirst().getIdCaja() + "/movimientos?idFormaDePago=1", MovimientoCaja[].class)); assertEquals(2, movimientoCajas.size()); - assertEquals(new BigDecimal("108320.271513250000000"), movimientoCajas.get(0).getMonto()); + assertEquals(new BigDecimal("108320.271513250000000"), movimientoCajas.getFirst().getMonto()); assertEquals(new BigDecimal("-500.000000000000000"), movimientoCajas.get(1).getMonto()); movimientoCajas = Arrays.asList( restTemplate.getForObject( "/api/v1/cajas/" - + cajasRecuperadas.get(0).getIdCaja() + + cajasRecuperadas.getFirst().getIdCaja() + "/movimientos?idFormaDePago=2", MovimientoCaja[].class)); assertEquals(1, movimientoCajas.size()); - assertEquals(new BigDecimal("-554.540000000000000"), movimientoCajas.get(0).getMonto()); + assertEquals(new BigDecimal("-554.540000000000000"), movimientoCajas.getFirst().getMonto()); assertEquals( new BigDecimal("108820.271513250000000"), restTemplate.getForObject( - "/api/v1/cajas/" + cajasRecuperadas.get(0).getIdCaja() + "/saldo-afecta-caja", + "/api/v1/cajas/" + cajasRecuperadas.getFirst().getIdCaja() + "/saldo-afecta-caja", BigDecimal.class)); assertEquals( new BigDecimal("108265.731513250000000"), restTemplate.getForObject( - "/api/v1/cajas/" + cajasRecuperadas.get(0).getIdCaja() + "/saldo-sistema", + "/api/v1/cajas/" + cajasRecuperadas.getFirst().getIdCaja() + "/saldo-sistema", BigDecimal.class)); } @@ -1388,25 +1354,25 @@ void testEscenarioCerrarCaja1() { @Order(14) void testEscenarioCerrarCaja2() { this.iniciarSesionComoAdministrador(); - var sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", Sucursal[].class)); + var sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", SucursalTest[].class)); assertEquals(1, sucursales.size()); - var criteriaParaBusquedaCaja = BusquedaCajaCriteria.builder().idSucursal(sucursales.get(0).getIdSucursal()).build(); + var criteriaParaBusquedaCaja = BusquedaCajaCriteria.builder().idSucursal(sucursales.getFirst().getIdSucursal()).build(); HttpEntity requestEntityParaProveedores = new HttpEntity<>(criteriaParaBusquedaCaja); - PaginaRespuestaRest resultadosBusquedaCaja = + var resultadosBusquedaCaja = restTemplate .exchange( "/api/v1/cajas/busqueda/criteria", HttpMethod.POST, requestEntityParaProveedores, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadosBusquedaCaja); - List cajasRecuperadas = resultadosBusquedaCaja.getContent(); + var cajasRecuperadas = resultadosBusquedaCaja.getContent(); assertEquals(1, cajasRecuperadas.size()); - assertEquals(EstadoCaja.CERRADA, cajasRecuperadas.get(0).getEstado()); + assertEquals(EstadoCaja.CERRADA, cajasRecuperadas.getFirst().getEstado()); restTemplate.put( "/api/v1/cajas/" - + cajasRecuperadas.get(0).getIdCaja() + "/reapertura?monto=1100", + + cajasRecuperadas.getFirst().getIdCaja() + "/reapertura?monto=1100", null); resultadosBusquedaCaja = restTemplate @@ -1414,13 +1380,13 @@ void testEscenarioCerrarCaja2() { "/api/v1/cajas/busqueda/criteria", HttpMethod.POST, requestEntityParaProveedores, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadosBusquedaCaja); cajasRecuperadas = resultadosBusquedaCaja.getContent(); assertEquals(1, cajasRecuperadas.size()); - assertEquals(EstadoCaja.ABIERTA, cajasRecuperadas.get(0).getEstado()); - assertEquals(new BigDecimal("1100.000000000000000"), cajasRecuperadas.get(0).getSaldoApertura()); + assertEquals(EstadoCaja.ABIERTA, cajasRecuperadas.getFirst().getEstado()); + assertEquals(new BigDecimal("1100.000000000000000"), cajasRecuperadas.getFirst().getSaldoApertura()); NuevoGastoDTO nuevoGasto = NuevoGastoDTO.builder() .concepto("Gasto olvidado") @@ -1428,37 +1394,37 @@ void testEscenarioCerrarCaja2() { .idSucursal(1L) .idFormaDePago(1L) .build(); - Gasto gasto = restTemplate.postForObject("/api/v1/gastos", nuevoGasto, Gasto.class); + var gasto = restTemplate.postForObject("/api/v1/gastos", nuevoGasto, GastoTest.class); assertNotNull(gasto); List movimientoCajas = Arrays.asList( restTemplate.getForObject( "/api/v1/cajas/" - + cajasRecuperadas.get(0).getIdCaja() + + cajasRecuperadas.getFirst().getIdCaja() + "/movimientos?idFormaDePago=1", MovimientoCaja[].class)); assertEquals(3, movimientoCajas.size()); - assertEquals(new BigDecimal("-750.000000000000000"), movimientoCajas.get(0).getMonto()); + assertEquals(new BigDecimal("-750.000000000000000"), movimientoCajas.getFirst().getMonto()); assertEquals(new BigDecimal("108320.271513250000000"), movimientoCajas.get(1).getMonto()); assertEquals(new BigDecimal("-500.000000000000000"), movimientoCajas.get(2).getMonto()); movimientoCajas = Arrays.asList( restTemplate.getForObject( "/api/v1/cajas/" - + cajasRecuperadas.get(0).getIdCaja() + + cajasRecuperadas.getFirst().getIdCaja() + "/movimientos?idFormaDePago=2", MovimientoCaja[].class)); assertEquals(1, movimientoCajas.size()); - assertEquals(new BigDecimal("-554.540000000000000"), movimientoCajas.get(0).getMonto()); + assertEquals(new BigDecimal("-554.540000000000000"), movimientoCajas.getFirst().getMonto()); assertEquals( new BigDecimal("108170.271513250000000"), restTemplate.getForObject( - "/api/v1/cajas/" + cajasRecuperadas.get(0).getIdCaja() + "/saldo-afecta-caja", + "/api/v1/cajas/" + cajasRecuperadas.getFirst().getIdCaja() + "/saldo-afecta-caja", BigDecimal.class)); assertEquals( new BigDecimal("107615.731513250000000"), restTemplate.getForObject( - "/api/v1/cajas/" + cajasRecuperadas.get(0).getIdCaja() + "/saldo-sistema", + "/api/v1/cajas/" + cajasRecuperadas.getFirst().getIdCaja() + "/saldo-sistema", BigDecimal.class)); } @@ -1468,55 +1434,51 @@ void testEscenarioCerrarCaja2() { void testEscenarioFacturarPedidoAndIntentarEliminarlo() { this.iniciarSesionComoAdministrador(); BusquedaProductoCriteria productosCriteria = BusquedaProductoCriteria.builder().build(); - HttpEntity requestEntityProductos = - new HttpEntity<>(productosCriteria); - PaginaRespuestaRest resultadoBusqueda = + HttpEntity requestEntityProductos = new HttpEntity<>(productosCriteria); + var resultadoBusqueda = restTemplate .exchange( "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntityProductos, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); - List productosRecuperados = resultadoBusqueda.getContent(); - assertEquals( - new BigDecimal("0E-15"), productosRecuperados.get(2).getCantidadTotalEnSucursales()); - assertEquals( - new BigDecimal("4.000000000000000"), + List productosRecuperados = resultadoBusqueda.getContent(); + assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(2).getCantidadTotalEnSucursales()); + assertEquals(new BigDecimal("4.000000000000000"), productosRecuperados.get(3).getCantidadTotalEnSucursales()); - BusquedaPedidoCriteria pedidoCriteria = - BusquedaPedidoCriteria.builder().idSucursal(1L).estadoPedido(EstadoPedido.ABIERTO).build(); + var pedidoCriteria = BusquedaPedidoCriteria.builder().idSucursal(1L).estadoPedido(EstadoPedido.ABIERTO).build(); HttpEntity requestEntity = new HttpEntity<>(pedidoCriteria); - PaginaRespuestaRest resultadoBusquedaPedido = + var resultadoBusquedaPedido = restTemplate .exchange( "/api/v1/pedidos/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaPedido); - List pedidosRecuperados = resultadoBusquedaPedido.getContent(); + var pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(1, pedidosRecuperados.size()); - List renglones = + var renglones = Arrays.asList( restTemplate.getForObject( "/api/v1/facturas/ventas/renglones/pedidos/" - + pedidosRecuperados.get(0).getIdPedido() + + pedidosRecuperados.getFirst().getIdPedido() + "?tipoDeComprobante=FACTURA_X", RenglonFactura[].class)); - assertEquals("Reflector led 100w", renglones.get(0).getDescripcionItem()); - assertEquals(new BigDecimal("9.000000000000000"), renglones.get(0).getCantidad()); - assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("20.000000000000000"), renglones.get(0).getBonificacionPorcentaje()); - assertEquals(new BigDecimal("200.000000000000000"), renglones.get(0).getBonificacionNeta()); - assertEquals(new BigDecimal("10.500000000000000"), renglones.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("0"), renglones.get(0).getIvaNeto()); - assertEquals(new BigDecimal("900.000000000000000"), renglones.get(0).getGananciaPorcentaje()); - assertEquals(new BigDecimal("900.000000000000000"), renglones.get(0).getGananciaNeto()); - assertEquals(new BigDecimal("9945.000000000000000000000000000000"), renglones.get(0).getImporteAnterior()); - assertEquals(new BigDecimal("7200.000000000000000000000000000000"), renglones.get(0).getImporte()); + assertEquals("Reflector led 100w", renglones.getFirst().getDescripcionItem()); + assertEquals(new BigDecimal("9.000000000000000"), renglones.getFirst().getCantidad()); + assertEquals(new BigDecimal("1000.000000000000000"), renglones.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("20.000000000000000"), renglones.getFirst().getBonificacionPorcentaje()); + assertEquals(new BigDecimal("200.000000000000000"), renglones.getFirst().getBonificacionNeta()); + assertEquals(new BigDecimal("10.500000000000000"), renglones.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("0"), renglones.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("900.000000000000000"), renglones.getFirst().getGananciaPorcentaje()); + assertEquals(new BigDecimal("900.000000000000000"), renglones.getFirst().getGananciaNeto()); + assertEquals(new BigDecimal("9945.000000000000000000000000000000"), renglones.getFirst().getImporteAnterior()); + assertEquals(new BigDecimal("7200.000000000000000000000000000000"), renglones.getFirst().getImporte()); assertEquals("Ventilador de pie", renglones.get(1).getDescripcionItem()); assertEquals(new BigDecimal("5.000000000000000"), renglones.get(1).getCantidad()); assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(1).getPrecioUnitario()); @@ -1528,19 +1490,19 @@ void testEscenarioFacturarPedidoAndIntentarEliminarlo() { assertEquals(new BigDecimal("900.000000000000000"), renglones.get(1).getGananciaNeto()); assertEquals(new BigDecimal("6050.000000000000000000000000000000"), renglones.get(1).getImporteAnterior()); assertEquals(new BigDecimal("4000.000000000000000000000000000000"), renglones.get(1).getImporte()); - Cliente cliente = restTemplate.getForObject("/api/v1/clientes/2", Cliente.class); + var cliente = restTemplate.getForObject("/api/v1/clientes/2", ClienteTest.class); assertNotNull(cliente); int[] indices = new int[] {0}; NuevaFacturaVentaDTO nuevaFacturaVentaDTO = NuevaFacturaVentaDTO.builder() - .idCliente(pedidosRecuperados.get(0).getCliente().getIdCliente()) - .idSucursal(pedidosRecuperados.get(0).getIdSucursal()) + .idCliente(pedidosRecuperados.getFirst().getCliente().getIdCliente()) + .idSucursal(pedidosRecuperados.getFirst().getIdSucursal()) .tipoDeComprobante(TipoDeComprobante.FACTURA_X) .recargoPorcentaje(new BigDecimal("10")) .descuentoPorcentaje(new BigDecimal("25")) .indices(indices) .build(); - restTemplate.postForObject("/api/v1/facturas/ventas/pedidos/" + pedidosRecuperados.get(0).getIdPedido(), + restTemplate.postForObject("/api/v1/facturas/ventas/pedidos/" + pedidosRecuperados.getFirst().getIdPedido(), nuevaFacturaVentaDTO, FacturaVenta[].class); pedidoCriteria = BusquedaPedidoCriteria.builder().idSucursal(1L).estadoPedido(EstadoPedido.CERRADO).build(); requestEntity = new HttpEntity<>(pedidoCriteria); @@ -1550,19 +1512,19 @@ void testEscenarioFacturarPedidoAndIntentarEliminarlo() { "/api/v1/pedidos/busqueda/criteria", HttpMethod.POST, requestEntity, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusquedaPedido); pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(2, pedidosRecuperados.size()); - assertEquals(EstadoPedido.CERRADO, pedidosRecuperados.get(0).getEstado()); + assertEquals(EstadoPedido.CERRADO, pedidosRecuperados.getFirst().getEstado()); resultadoBusqueda = restTemplate .exchange( "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntityProductos, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); productosRecuperados = resultadoBusqueda.getContent(); @@ -1573,13 +1535,10 @@ void testEscenarioFacturarPedidoAndIntentarEliminarlo() { RestClientResponseException.class, () -> restTemplate.put("/api/v1/pedidos/2", null)); assertNotNull(thrown.getMessage()); - assertTrue( - thrown - .getMessage() - .contains( - messageSource.getMessage( + assertTrue(thrown.getMessage() + .contains(messageSource.getMessage( "mensaje_no_se_puede_cancelar_pedido", - new Object[] {EstadoPedido.CERRADO}, + new Object[]{EstadoPedido.CERRADO}, Locale.getDefault()))); } @@ -1588,21 +1547,20 @@ void testEscenarioFacturarPedidoAndIntentarEliminarlo() { @Order(16) void testEscenarioActualizarStockParaDosSucursales() { this.iniciarSesionComoAdministrador(); - Cliente clienteParaEditar = restTemplate.getForObject("/api/v1/clientes/2", Cliente.class); + var clienteParaEditar = restTemplate.getForObject("/api/v1/clientes/2", ClienteTest.class); clienteParaEditar.setPuedeComprarAPlazo(true); restTemplate.put("/api/v1/clientes", clienteParaEditar); - Sucursal sucursalNueva = - Sucursal.builder() + SucursalTest sucursalNueva = + SucursalTest.builder() .nombre("Sucursal Centrica") .categoriaIVA(CategoriaIVA.RESPONSABLE_INSCRIPTO) .email("sucursalNueva@gmail.com") .idFiscal(30711184569L) - .ubicacion(Ubicacion.builder().idLocalidad(1L).idProvincia(1L).build()) + .ubicacion(UbicacionTest.builder().idLocalidad(1L).idProvincia(1L).build()) .build(); - Sucursal sucursalRecuperada = - restTemplate.postForObject("/api/v1/sucursales", sucursalNueva, Sucursal.class); + var sucursalRecuperada = restTemplate.postForObject("/api/v1/sucursales", sucursalNueva, SucursalTest.class); assertEquals(sucursalNueva, sucursalRecuperada); - ConfiguracionSucursal configuracionSucursal = + var configuracionSucursal = restTemplate.getForObject( "/api/v1/configuraciones-sucursal/" + sucursalRecuperada.getIdSucursal(), ConfiguracionSucursal.class); @@ -1614,21 +1572,17 @@ void testEscenarioActualizarStockParaDosSucursales() { ConfiguracionSucursal.class); assertTrue(configuracionSucursal.isPuntoDeRetiro()); assertFalse(configuracionSucursal.isComparteStock()); - List sucursales = - Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", Sucursal[].class)); + var sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", SucursalTest[].class)); assertFalse(sucursales.isEmpty()); assertEquals(2, sucursales.size()); - BusquedaProductoCriteria productosCriteria = BusquedaProductoCriteria.builder() - .descripcion("Corta Papas - Vegetales").build(); - HttpEntity requestEntityProductos = - new HttpEntity<>(productosCriteria); - PaginaRespuestaRest resultadoBusqueda = - restTemplate - .exchange( + var productosCriteria = BusquedaProductoCriteria.builder().descripcion("Corta Papas - Vegetales").build(); + HttpEntity requestEntityProductos = new HttpEntity<>(productosCriteria); + var resultadoBusqueda = + restTemplate.exchange( "/api/v1/productos/busqueda/criteria/sucursales/1", HttpMethod.POST, requestEntityProductos, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); Set cantidadEnSucursales = new HashSet<>(); @@ -1644,7 +1598,7 @@ void testEscenarioActualizarStockParaDosSucursales() { cantidadEnSucursales.add(cantidadEnSucursalDos); ProductoDTO productoParaActualizar = ProductoDTO.builder() - .idProducto(resultadoBusqueda.getContent().get(0).getIdProducto()) + .idProducto(resultadoBusqueda.getContent().getFirst().getIdProducto()) .cantidadEnSucursales(cantidadEnSucursales) .precioCosto(CIEN) .gananciaPorcentaje(new BigDecimal("900")) @@ -1657,10 +1611,10 @@ void testEscenarioActualizarStockParaDosSucursales() { .paraCatalogo(true) .build(); restTemplate.put("/api/v1/productos", productoParaActualizar); - Producto productoParaControlarStock = + var productoParaControlarStock = restTemplate.getForObject( - "/api/v1/productos/" + resultadoBusqueda.getContent().get(0).getIdProducto() + "/sucursales/1", - Producto.class); + "/api/v1/productos/" + resultadoBusqueda.getContent().getFirst().getIdProducto() + "/sucursales/1", + ProductoTest.class); assertEquals(140, productoParaControlarStock.getCantidadTotalEnSucursales().doubleValue()); } @@ -1669,7 +1623,7 @@ void testEscenarioActualizarStockParaDosSucursales() { @Order(17) void testEscenarioPedidoConStockDeDosSucursales() { this.iniciarSesionComoAdministrador(); - Usuario usuario = restTemplate.getForObject("/api/v1/usuarios/4", Usuario.class); + UsuarioTest usuario = restTemplate.getForObject("/api/v1/usuarios/4", UsuarioTest.class); this.token = restTemplate .postForEntity( @@ -1678,24 +1632,19 @@ void testEscenarioPedidoConStockDeDosSucursales() { String.class) .getBody(); assertNotNull(this.token); - restTemplate.postForObject( - "/api/v1/carrito-compra/productos/4?cantidad=50", null, ItemCarritoCompra.class); - ItemCarritoCompra item1 = - restTemplate.getForObject( - "/api/v1/carrito-compra/productos/4/sucursales/1", ItemCarritoCompra.class); + restTemplate.postForObject("/api/v1/carrito-compra/productos/4?cantidad=50", null, ItemCarritoCompra.class); + var item1 = restTemplate.getForObject("/api/v1/carrito-compra/productos/4/sucursales/1", ItemCarritoCompra.class); assertNotNull(item1); assertEquals(4L, item1.getProducto().getIdProducto().longValue()); assertEquals(50, item1.getCantidad().doubleValue()); - NuevaOrdenDePagoDTO nuevaOrdenDePagoDTO = NuevaOrdenDePagoDTO.builder() + var nuevaOrdenDePagoDTO = NuevaOrdenDePagoDTO.builder() .idSucursal(1L) .tipoDeEnvio(TipoDeEnvio.USAR_UBICACION_FACTURACION) .build(); RestClientResponseException thrown = assertThrows( RestClientResponseException.class, - () -> - restTemplate.postForObject( - "/api/v1/carrito-compra", nuevaOrdenDePagoDTO, Pedido.class)); + () -> restTemplate.postForObject("/api/v1/carrito-compra", nuevaOrdenDePagoDTO, PedidoTest.class)); assertNotNull(thrown.getMessage()); assertTrue(thrown.getMessage().contains(messageSource.getMessage("mensaje_pedido_sin_stock", null, Locale.getDefault()))); @@ -1712,43 +1661,35 @@ void testEscenarioPedidoConStockDeDosSucursales() { ConfiguracionSucursal.class); assertTrue(configuracionSucursal.isPuntoDeRetiro()); assertTrue(configuracionSucursal.isComparteStock()); - usuario = restTemplate.getForObject("/api/v1/usuarios/4", Usuario.class); - this.token = - restTemplate - .postForEntity( - "/api/v1/login", - new Credencial(usuario.getUsername(), "caraDeMala"), - String.class) + usuario = restTemplate.getForObject("/api/v1/usuarios/4", UsuarioTest.class); + this.token = restTemplate.postForEntity( + "/api/v1/login", + new Credencial(usuario.getUsername(), "caraDeMala"), + String.class) .getBody(); assertNotNull(this.token); - Pedido pedido = - restTemplate.postForObject( - "/api/v1/carrito-compra", nuevaOrdenDePagoDTO, Pedido.class); + var pedido = restTemplate.postForObject("/api/v1/carrito-compra", nuevaOrdenDePagoDTO, PedidoTest.class); assertEquals(new BigDecimal("50.000000000000000") , pedido.getCantidadArticulos()); this.iniciarSesionComoAdministrador(); - BusquedaProductoCriteria productosCriteria = BusquedaProductoCriteria.builder() - .descripcion("Corta Papas - Vegetales").build(); - HttpEntity requestEntityProductos = - new HttpEntity<>(productosCriteria); - PaginaRespuestaRest resultadoBusqueda = - restTemplate - .exchange( - "/api/v1/productos/busqueda/criteria/sucursales/1", - HttpMethod.POST, - requestEntityProductos, - new ParameterizedTypeReference>() {}) - .getBody(); + BusquedaProductoCriteria productosCriteria = BusquedaProductoCriteria.builder().descripcion("Corta Papas - Vegetales").build(); + HttpEntity requestEntityProductos = new HttpEntity<>(productosCriteria); + var resultadoBusqueda = restTemplate.exchange( + "/api/v1/productos/busqueda/criteria/sucursales/1", + HttpMethod.POST, + requestEntityProductos, + new ParameterizedTypeReference>() {}) + .getBody(); assertNotNull(resultadoBusqueda); - Producto productoParaControlarStock = + var productoParaControlarStock = restTemplate.getForObject( - "/api/v1/productos/" + resultadoBusqueda.getContent().get(0).getIdProducto() + "/sucursales/1", - Producto.class); - assertEquals(90 , productoParaControlarStock.getCantidadTotalEnSucursales().doubleValue()); - List cantidadEnSucursalesParaAssert = new ArrayList<>(productoParaControlarStock.getCantidadEnSucursales()); - assertEquals(new BigDecimal("0E-15") , cantidadEnSucursalesParaAssert.get(0).getCantidad()); + "/api/v1/productos/" + resultadoBusqueda.getContent().getFirst().getIdProducto() + "/sucursales/1", + ProductoTest.class); + assertEquals(90, productoParaControlarStock.getCantidadTotalEnSucursales().doubleValue()); + var cantidadEnSucursalesParaAssert = new ArrayList<>(productoParaControlarStock.getCantidadEnSucursales()); + assertEquals(new BigDecimal("0E-15") , cantidadEnSucursalesParaAssert.getFirst().getCantidad()); assertEquals(new BigDecimal("90.000000000000000") , cantidadEnSucursalesParaAssert.get(1).getCantidad()); - assertEquals(1L , cantidadEnSucursalesParaAssert.get(0).getIdSucursal()); - assertEquals(2L , cantidadEnSucursalesParaAssert.get(1).getIdSucursal()); + assertEquals(1L, cantidadEnSucursalesParaAssert.getFirst().getIdSucursal()); + assertEquals(2L, cantidadEnSucursalesParaAssert.get(1).getIdSucursal()); } @Test @@ -1756,49 +1697,43 @@ void testEscenarioPedidoConStockDeDosSucursales() { @Order(18) void testEscenarioFacturarPedido() { this.iniciarSesionComoAdministrador(); - BusquedaPedidoCriteria pedidoCriteria = - BusquedaPedidoCriteria.builder().idSucursal(1L).estadoPedido(EstadoPedido.ABIERTO).build(); + var pedidoCriteria = BusquedaPedidoCriteria.builder().idSucursal(1L).estadoPedido(EstadoPedido.ABIERTO).build(); HttpEntity requestEntity = new HttpEntity<>(pedidoCriteria); - PaginaRespuestaRest resultadoBusquedaPedido = - restTemplate - .exchange( - "/api/v1/pedidos/busqueda/criteria", - HttpMethod.POST, - requestEntity, - new ParameterizedTypeReference>() {}) - .getBody(); + var resultadoBusquedaPedido = restTemplate.exchange( + "/api/v1/pedidos/busqueda/criteria", + HttpMethod.POST, + requestEntity, + new ParameterizedTypeReference>() {}) + .getBody(); assertNotNull(resultadoBusquedaPedido); - List pedidosRecuperados = resultadoBusquedaPedido.getContent(); + var pedidosRecuperados = resultadoBusquedaPedido.getContent(); assertEquals(1, pedidosRecuperados.size()); - List renglones = - Arrays.asList( - restTemplate.getForObject( - "/api/v1/facturas/ventas/renglones/pedidos/" - + pedidosRecuperados.get(0).getIdPedido() - + "?tipoDeComprobante=FACTURA_X", - RenglonFactura[].class)); - assertEquals("Corta Papas - Vegetales", renglones.get(0).getDescripcionItem()); - assertEquals(new BigDecimal("50.000000000000000"), renglones.get(0).getCantidad()); - assertEquals(new BigDecimal("1000.000000000000000"), renglones.get(0).getPrecioUnitario()); - assertEquals(new BigDecimal("20.000000000000000"), renglones.get(0).getBonificacionPorcentaje()); - assertEquals(new BigDecimal("200.000000000000000"), renglones.get(0).getBonificacionNeta()); - assertEquals(new BigDecimal("10.500000000000000"), renglones.get(0).getIvaPorcentaje()); - assertEquals(new BigDecimal("0"), renglones.get(0).getIvaNeto()); - assertEquals(new BigDecimal("900.000000000000000"), renglones.get(0).getGananciaPorcentaje()); - assertEquals(new BigDecimal("900.000000000000000"), renglones.get(0).getGananciaNeto()); - assertEquals(new BigDecimal("55250.000000000000000000000000000000"), renglones.get(0).getImporteAnterior()); - assertEquals(new BigDecimal("40000.000000000000000000000000000000"), renglones.get(0).getImporte()); + var renglones = Arrays.asList(restTemplate.getForObject( + "/api/v1/facturas/ventas/renglones/pedidos/" + pedidosRecuperados.getFirst().getIdPedido() + + "?tipoDeComprobante=FACTURA_X", + RenglonFactura[].class)); + assertEquals("Corta Papas - Vegetales", renglones.getFirst().getDescripcionItem()); + assertEquals(new BigDecimal("50.000000000000000"), renglones.getFirst().getCantidad()); + assertEquals(new BigDecimal("1000.000000000000000"), renglones.getFirst().getPrecioUnitario()); + assertEquals(new BigDecimal("20.000000000000000"), renglones.getFirst().getBonificacionPorcentaje()); + assertEquals(new BigDecimal("200.000000000000000"), renglones.getFirst().getBonificacionNeta()); + assertEquals(new BigDecimal("10.500000000000000"), renglones.getFirst().getIvaPorcentaje()); + assertEquals(new BigDecimal("0"), renglones.getFirst().getIvaNeto()); + assertEquals(new BigDecimal("900.000000000000000"), renglones.getFirst().getGananciaPorcentaje()); + assertEquals(new BigDecimal("900.000000000000000"), renglones.getFirst().getGananciaNeto()); + assertEquals(new BigDecimal("55250.000000000000000000000000000000"), renglones.getFirst().getImporteAnterior()); + assertEquals(new BigDecimal("40000.000000000000000000000000000000"), renglones.getFirst().getImporte()); int[] indices = new int[] {0}; NuevaFacturaVentaDTO nuevaFacturaVentaDTO = NuevaFacturaVentaDTO.builder() - .idCliente(pedidosRecuperados.get(0).getCliente().getIdCliente()) - .idSucursal(pedidosRecuperados.get(0).getIdSucursal()) + .idCliente(pedidosRecuperados.getFirst().getCliente().getIdCliente()) + .idSucursal(pedidosRecuperados.getFirst().getIdSucursal()) .tipoDeComprobante(TipoDeComprobante.FACTURA_X) .recargoPorcentaje(new BigDecimal("10")) .descuentoPorcentaje(new BigDecimal("25")) .indices(indices) .build(); - restTemplate.postForObject("/api/v1/facturas/ventas/pedidos/" + pedidosRecuperados.get(0).getIdPedido(), + restTemplate.postForObject("/api/v1/facturas/ventas/pedidos/" + pedidosRecuperados.getFirst().getIdPedido(), nuevaFacturaVentaDTO, FacturaVenta[].class); } @@ -1809,40 +1744,35 @@ void testEscenarioVerificarStockAndCerrarCaja() { this.iniciarSesionComoAdministrador(); BusquedaProductoCriteria productosCriteria = BusquedaProductoCriteria.builder().build(); HttpEntity requestEntityProductos = new HttpEntity<>(productosCriteria); - PaginaRespuestaRest resultadoBusqueda = - restTemplate - .exchange( - "/api/v1/productos/busqueda/criteria/sucursales/1", - HttpMethod.POST, - requestEntityProductos, - new ParameterizedTypeReference>() {}) + var resultadoBusqueda = restTemplate.exchange( + "/api/v1/productos/busqueda/criteria/sucursales/1", + HttpMethod.POST, + requestEntityProductos, + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadoBusqueda); - List productosRecuperados = resultadoBusqueda.getContent(); - assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(0).getCantidadTotalEnSucursales()); + var productosRecuperados = resultadoBusqueda.getContent(); + assertEquals(new BigDecimal("0E-15"), productosRecuperados.getFirst().getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("90.000000000000000"), productosRecuperados.get(1).getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("0E-15"), productosRecuperados.get(2).getCantidadTotalEnSucursales()); assertEquals(new BigDecimal("4.000000000000000"), productosRecuperados.get(3).getCantidadTotalEnSucursales()); - List sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", Sucursal[].class)); + List sucursales = Arrays.asList(restTemplate.getForObject("/api/v1/sucursales", SucursalTest[].class)); assertEquals(2, sucursales.size()); BusquedaCajaCriteria criteriaParaBusquedaCaja = - BusquedaCajaCriteria.builder().idSucursal(sucursales.get(0).getIdSucursal()).build(); - HttpEntity requestEntityParaProveedores = - new HttpEntity<>(criteriaParaBusquedaCaja); - PaginaRespuestaRest resultadosBusquedaCaja = - restTemplate - .exchange( - "/api/v1/cajas/busqueda/criteria", - HttpMethod.POST, - requestEntityParaProveedores, - new ParameterizedTypeReference>() {}) + BusquedaCajaCriteria.builder().idSucursal(sucursales.getFirst().getIdSucursal()).build(); + HttpEntity requestEntityParaProveedores = new HttpEntity<>(criteriaParaBusquedaCaja); + var resultadosBusquedaCaja = restTemplate.exchange( + "/api/v1/cajas/busqueda/criteria", + HttpMethod.POST, + requestEntityParaProveedores, + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadosBusquedaCaja); - List cajasRecuperadas = resultadosBusquedaCaja.getContent(); + var cajasRecuperadas = resultadosBusquedaCaja.getContent(); assertEquals(1, cajasRecuperadas.size()); - assertEquals(EstadoCaja.ABIERTA, cajasRecuperadas.get(0).getEstado()); + assertEquals(EstadoCaja.ABIERTA, cajasRecuperadas.getFirst().getEstado()); restTemplate.put( - "/api/v1/cajas/" + cajasRecuperadas.get(0).getIdCaja() + "/cierre?monto=5276.66", + "/api/v1/cajas/" + cajasRecuperadas.getFirst().getIdCaja() + "/cierre?monto=5276.66", null); requestEntityParaProveedores = new HttpEntity<>(criteriaParaBusquedaCaja); resultadosBusquedaCaja = @@ -1850,11 +1780,11 @@ void testEscenarioVerificarStockAndCerrarCaja() { "/api/v1/cajas/busqueda/criteria", HttpMethod.POST, requestEntityParaProveedores, - new ParameterizedTypeReference>() {}) + new ParameterizedTypeReference>() {}) .getBody(); assertNotNull(resultadosBusquedaCaja); cajasRecuperadas = resultadosBusquedaCaja.getContent(); assertEquals(1, cajasRecuperadas.size()); - assertEquals(EstadoCaja.CERRADA, cajasRecuperadas.get(0).getEstado()); + assertEquals(EstadoCaja.CERRADA, cajasRecuperadas.getFirst().getEstado()); } } diff --git a/src/test/java/sic/integration/PaginaRespuestaRest.java b/src/test/java/org/opencommercial/integration/PaginaRespuestaRest.java similarity index 91% rename from src/test/java/sic/integration/PaginaRespuestaRest.java rename to src/test/java/org/opencommercial/integration/PaginaRespuestaRest.java index 54e10529b..d44479f4c 100644 --- a/src/test/java/sic/integration/PaginaRespuestaRest.java +++ b/src/test/java/org/opencommercial/integration/PaginaRespuestaRest.java @@ -1,8 +1,9 @@ -package sic.integration; +package org.opencommercial.integration; -import java.util.List; import lombok.Data; +import java.util.List; + @Data class PaginaRespuestaRest { diff --git a/src/test/java/sic/model/Caja.java b/src/test/java/org/opencommercial/integration/model/CajaTest.java similarity index 88% rename from src/test/java/sic/model/Caja.java rename to src/test/java/org/opencommercial/integration/model/CajaTest.java index 13688e7c5..0824dd8af 100644 --- a/src/test/java/sic/model/Caja.java +++ b/src/test/java/org/opencommercial/integration/model/CajaTest.java @@ -1,7 +1,7 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.EstadoCaja; +import org.opencommercial.model.EstadoCaja; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -24,7 +24,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class Caja { +public class CajaTest { private long idCaja; private LocalDateTime fechaApertura; diff --git a/src/test/java/sic/model/CantidadEnSucursal.java b/src/test/java/org/opencommercial/integration/model/CantidadEnSucursalTest.java similarity index 76% rename from src/test/java/sic/model/CantidadEnSucursal.java rename to src/test/java/org/opencommercial/integration/model/CantidadEnSucursalTest.java index c3a064d07..cd36eadf9 100644 --- a/src/test/java/sic/model/CantidadEnSucursal.java +++ b/src/test/java/org/opencommercial/integration/model/CantidadEnSucursalTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -9,7 +9,7 @@ @NoArgsConstructor @EqualsAndHashCode(of = "idSucursal") @Builder -public class CantidadEnSucursal { +public class CantidadEnSucursalTest { private Long idCantidadEnSucursal; private BigDecimal cantidad; diff --git a/src/test/java/sic/model/Cliente.java b/src/test/java/org/opencommercial/integration/model/ClienteTest.java similarity index 83% rename from src/test/java/sic/model/Cliente.java rename to src/test/java/org/opencommercial/integration/model/ClienteTest.java index 7f6bc4507..7a9e3c7ee 100644 --- a/src/test/java/sic/model/Cliente.java +++ b/src/test/java/org/opencommercial/integration/model/ClienteTest.java @@ -1,9 +1,8 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; -import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -23,7 +22,7 @@ "detalleUbicacionDeFacturacion", "detalleUbicacionDeEnvio" }) -public class Cliente { +public class ClienteTest { private long idCliente; private String nroCliente; @@ -31,8 +30,8 @@ public class Cliente { private String nombreFantasia; private CategoriaIVA categoriaIVA; private Long idFiscal; - private Ubicacion ubicacionFacturacion; - private Ubicacion ubicacionEnvio; + private UbicacionTest ubicacionFacturacion; + private UbicacionTest ubicacionEnvio; private String email; private String telefono; private String contacto; diff --git a/src/test/java/sic/model/ConfiguracionSucursal.java b/src/test/java/org/opencommercial/integration/model/ConfiguracionSucursalTest.java similarity index 88% rename from src/test/java/sic/model/ConfiguracionSucursal.java rename to src/test/java/org/opencommercial/integration/model/ConfiguracionSucursalTest.java index ff0f47af6..5e60d8bd0 100644 --- a/src/test/java/sic/model/ConfiguracionSucursal.java +++ b/src/test/java/org/opencommercial/integration/model/ConfiguracionSucursalTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -7,7 +7,7 @@ @NoArgsConstructor @Builder @EqualsAndHashCode(exclude = {"certificadoAfip", "existeCertificado", "passwordCertificadoAfip"}) -public class ConfiguracionSucursal { +public class ConfiguracionSucursalTest { private long idConfiguracionSucursal; private boolean usarFacturaVentaPreImpresa; diff --git a/src/test/java/sic/model/CuentaCorrienteCliente.java b/src/test/java/org/opencommercial/integration/model/CuentaCorrienteClienteTest.java similarity index 58% rename from src/test/java/sic/model/CuentaCorrienteCliente.java rename to src/test/java/org/opencommercial/integration/model/CuentaCorrienteClienteTest.java index 2e5a2bd3e..43f1ec6f3 100644 --- a/src/test/java/sic/model/CuentaCorrienteCliente.java +++ b/src/test/java/org/opencommercial/integration/model/CuentaCorrienteClienteTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Data; @@ -10,7 +10,7 @@ @Data @AllArgsConstructor @NoArgsConstructor -public class CuentaCorrienteCliente extends CuentaCorriente { +public class CuentaCorrienteClienteTest extends CuentaCorrienteTest { - private Cliente cliente; + private ClienteTest cliente; } diff --git a/src/test/java/sic/model/CuentaCorriente.java b/src/test/java/org/opencommercial/integration/model/CuentaCorrienteTest.java similarity index 78% rename from src/test/java/sic/model/CuentaCorriente.java rename to src/test/java/org/opencommercial/integration/model/CuentaCorrienteTest.java index d80d99e75..c8762a55b 100644 --- a/src/test/java/sic/model/CuentaCorriente.java +++ b/src/test/java/org/opencommercial/integration/model/CuentaCorrienteTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -18,18 +18,18 @@ @JsonIdentityInfo( generator = ObjectIdGenerators.PropertyGenerator.class, property = "idCuentaCorriente", - scope = sic.model.CuentaCorriente.class) + scope = CuentaCorrienteTest.class) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") @JsonSubTypes({ - @JsonSubTypes.Type(value = CuentaCorrienteCliente.class), + @JsonSubTypes.Type(value = CuentaCorrienteClienteTest.class), // @JsonSubTypes.Type(value = CuentaCorrienteProveedor.class) }) -public class CuentaCorriente { +public class CuentaCorrienteTest { private Long idCuentaCorriente; private boolean eliminada; private LocalDateTime fechaApertura; private BigDecimal saldo; private LocalDateTime fechaUltimoMovimiento; - private List renglones; + private List renglones; } diff --git a/src/test/java/sic/model/FacturaCompra.java b/src/test/java/org/opencommercial/integration/model/FacturaCompraTest.java similarity index 90% rename from src/test/java/sic/model/FacturaCompra.java rename to src/test/java/org/opencommercial/integration/model/FacturaCompraTest.java index ffbf0bd2d..ad022924f 100644 --- a/src/test/java/sic/model/FacturaCompra.java +++ b/src/test/java/org/opencommercial/integration/model/FacturaCompraTest.java @@ -1,10 +1,8 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.TipoDeComprobante; -import sic.modelo.RenglonFactura; +import org.opencommercial.model.TipoDeComprobante; -import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; @@ -17,14 +15,14 @@ callSuper = true, exclude = {"razonSocialProveedor", "idProveedor"}) @Builder -public class FacturaCompra extends Factura { +public class FacturaCompraTest extends FacturaTest { private Long idProveedor; private String razonSocialProveedor; private LocalDateTime fechaAlta; @Builder(builderMethodName = "facturaCompraBuilder") - public FacturaCompra( + public FacturaCompraTest( long idFactura, LocalDateTime fecha, LocalDateTime fechaAlta, @@ -36,7 +34,7 @@ public FacturaCompra( Long nroPedido, Long idTransportista, String nombreTransportista, - List renglones, + List renglones, BigDecimal subTotal, BigDecimal recargoPorcentaje, BigDecimal recargoNeto, diff --git a/src/test/java/sic/model/Factura.java b/src/test/java/org/opencommercial/integration/model/FacturaTest.java similarity index 83% rename from src/test/java/sic/model/Factura.java rename to src/test/java/org/opencommercial/integration/model/FacturaTest.java index 07c916338..b02474eab 100644 --- a/src/test/java/sic/model/Factura.java +++ b/src/test/java/org/opencommercial/integration/model/FacturaTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -8,8 +8,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import sic.modelo.RenglonFactura; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; import java.time.LocalDate; @@ -35,13 +34,13 @@ @JsonIdentityInfo( generator = ObjectIdGenerators.PropertyGenerator.class, property = "idFactura", - scope = Factura.class) + scope = FacturaTest.class) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") @JsonSubTypes({ - @JsonSubTypes.Type(value = FacturaCompra.class, name = "FacturaCompra"), - @JsonSubTypes.Type(value = FacturaVenta.class, name = "FacturaVenta"), + @JsonSubTypes.Type(value = FacturaCompraTest.class, name = "FacturaCompra"), + @JsonSubTypes.Type(value = FacturaVentaTest.class, name = "FacturaVenta"), }) -public abstract class Factura { +public abstract class FacturaTest { private long idFactura; private LocalDateTime fecha; @@ -53,7 +52,7 @@ public abstract class Factura { private Long nroPedido; private Long idTransportista; private String nombreTransportista; - private List renglones; + private List renglones; private BigDecimal subTotal; private BigDecimal recargoPorcentaje; private BigDecimal recargoNeto; diff --git a/src/test/java/sic/model/FacturaVenta.java b/src/test/java/org/opencommercial/integration/model/FacturaVentaTest.java similarity index 90% rename from src/test/java/sic/model/FacturaVenta.java rename to src/test/java/org/opencommercial/integration/model/FacturaVentaTest.java index 2c75bd39d..2196c603d 100644 --- a/src/test/java/sic/model/FacturaVenta.java +++ b/src/test/java/org/opencommercial/integration/model/FacturaVentaTest.java @@ -1,11 +1,9 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.CategoriaIVA; -import sic.modelo.RenglonFactura; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.CategoriaIVA; +import org.opencommercial.model.TipoDeComprobante; -import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; @@ -26,7 +24,7 @@ "ubicacionCliente" }) @Builder -public class FacturaVenta extends Factura { +public class FacturaVentaTest extends FacturaTest { private Long idCliente; private String nombreFiscalCliente; @@ -35,10 +33,10 @@ public class FacturaVenta extends Factura { private Long idViajanteCliente; private String nombreViajanteCliente; private String ubicacionCliente; - private Remito remito; + private RemitoTest remito; @Builder(builderMethodName = "facturaVentaBuilder") - public FacturaVenta( + public FacturaVentaTest( long idFactura, LocalDateTime fecha, TipoDeComprobante tipoDeComprobante, @@ -49,7 +47,7 @@ public FacturaVenta( Long nroPedido, Long idTransportista, String nombreTransportista, - List renglones, + List renglones, BigDecimal subTotal, BigDecimal recargoPorcentaje, BigDecimal recargoNeto, diff --git a/src/test/java/sic/model/Gasto.java b/src/test/java/org/opencommercial/integration/model/GastoTest.java similarity index 90% rename from src/test/java/sic/model/Gasto.java rename to src/test/java/org/opencommercial/integration/model/GastoTest.java index 899a0cf7e..b5ea3f8a6 100644 --- a/src/test/java/sic/model/Gasto.java +++ b/src/test/java/org/opencommercial/integration/model/GastoTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -21,7 +21,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class Gasto { +public class GastoTest { private long idGasto; private long nroGasto; diff --git a/src/test/java/sic/model/Localidad.java b/src/test/java/org/opencommercial/integration/model/LocalidadTest.java similarity index 86% rename from src/test/java/sic/model/Localidad.java rename to src/test/java/org/opencommercial/integration/model/LocalidadTest.java index 5bbddc92d..fe492aaf8 100644 --- a/src/test/java/sic/model/Localidad.java +++ b/src/test/java/org/opencommercial/integration/model/LocalidadTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Builder; @@ -11,7 +11,7 @@ @NoArgsConstructor @Builder @EqualsAndHashCode(exclude = {"idLocalidad", "idProvincia", "nombreProvincia"}) -public class Localidad { +public class LocalidadTest { private long idLocalidad; private String nombre; diff --git a/src/test/java/sic/model/Medida.java b/src/test/java/org/opencommercial/integration/model/MedidaTest.java similarity index 73% rename from src/test/java/sic/model/Medida.java rename to src/test/java/org/opencommercial/integration/model/MedidaTest.java index 01569ca09..abf3b1b59 100644 --- a/src/test/java/sic/model/Medida.java +++ b/src/test/java/org/opencommercial/integration/model/MedidaTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -7,7 +7,7 @@ @NoArgsConstructor @EqualsAndHashCode(exclude = "idMedida") @Builder -public class Medida { +public class MedidaTest { private long idMedida; private String nombre; diff --git a/src/test/java/sic/model/NotaCredito.java b/src/test/java/org/opencommercial/integration/model/NotaCreditoTest.java similarity index 73% rename from src/test/java/sic/model/NotaCredito.java rename to src/test/java/org/opencommercial/integration/model/NotaCreditoTest.java index 67b5f74b7..0b25eb376 100644 --- a/src/test/java/sic/model/NotaCredito.java +++ b/src/test/java/org/opencommercial/integration/model/NotaCreditoTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -10,10 +10,10 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class NotaCredito extends Nota { +public class NotaCreditoTest extends NotaTest { private boolean modificaStock; - private List renglonesNotaCredito; + private List renglonesNotaCredito; private BigDecimal subTotal; private BigDecimal recargoPorcentaje; private BigDecimal recargoNeto; diff --git a/src/test/java/sic/model/NotaDebito.java b/src/test/java/org/opencommercial/integration/model/NotaDebitoTest.java similarity index 67% rename from src/test/java/sic/model/NotaDebito.java rename to src/test/java/org/opencommercial/integration/model/NotaDebitoTest.java index aaf61c4d8..af73e8c31 100644 --- a/src/test/java/sic/model/NotaDebito.java +++ b/src/test/java/org/opencommercial/integration/model/NotaDebitoTest.java @@ -1,9 +1,8 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; import java.math.BigDecimal; -import java.util.Collections; import java.util.List; @Data @@ -13,9 +12,9 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class NotaDebito extends Nota { +public class NotaDebitoTest extends NotaTest { - private List renglonesNotaDebito; + private List renglonesNotaDebito; private BigDecimal montoNoGravado; private Long idRecibo = 0L; private boolean pagada = true; diff --git a/src/test/java/sic/model/Nota.java b/src/test/java/org/opencommercial/integration/model/NotaTest.java similarity index 82% rename from src/test/java/sic/model/Nota.java rename to src/test/java/org/opencommercial/integration/model/NotaTest.java index 09c44d24f..10af3546c 100644 --- a/src/test/java/sic/model/Nota.java +++ b/src/test/java/org/opencommercial/integration/model/NotaTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -8,8 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import sic.modelo.Movimiento; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.Movimiento; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -21,13 +21,13 @@ @JsonIdentityInfo( generator = ObjectIdGenerators.PropertyGenerator.class, property = "idNota", - scope = sic.model.Nota.class) + scope = NotaTest.class) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") @JsonSubTypes({ - @JsonSubTypes.Type(value = NotaCredito.class, name = "NotaCredito"), - @JsonSubTypes.Type(value = NotaDebito.class, name = "NotaDebito"), + @JsonSubTypes.Type(value = NotaCreditoTest.class, name = "NotaCredito"), + @JsonSubTypes.Type(value = NotaDebitoTest.class, name = "NotaDebito"), }) -public class Nota { +public class NotaTest { private Long idNota; private long serie; diff --git a/src/test/java/sic/model/NuevaSucursal.java b/src/test/java/org/opencommercial/integration/model/NuevaSucursalTest.java similarity index 70% rename from src/test/java/sic/model/NuevaSucursal.java rename to src/test/java/org/opencommercial/integration/model/NuevaSucursalTest.java index e64c0c4b4..cb0f04213 100644 --- a/src/test/java/sic/model/NuevaSucursal.java +++ b/src/test/java/org/opencommercial/integration/model/NuevaSucursalTest.java @@ -1,15 +1,15 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.Builder; import lombok.Data; -import sic.modelo.CategoriaIVA; -import sic.modelo.dto.UbicacionDTO; +import org.opencommercial.model.CategoriaIVA; +import org.opencommercial.model.dto.UbicacionDTO; import java.time.LocalDateTime; @Data @Builder -public class NuevaSucursal { +public class NuevaSucursalTest { private String nombre; private String lema; diff --git a/src/test/java/sic/model/NuevoTokenCard.java b/src/test/java/org/opencommercial/integration/model/NuevoTokenCardTest.java similarity index 84% rename from src/test/java/sic/model/NuevoTokenCard.java rename to src/test/java/org/opencommercial/integration/model/NuevoTokenCardTest.java index ee58983a5..ffdabe784 100644 --- a/src/test/java/sic/model/NuevoTokenCard.java +++ b/src/test/java/org/opencommercial/integration/model/NuevoTokenCardTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Builder; @@ -9,7 +9,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class NuevoTokenCard { +public class NuevoTokenCardTest { private String email; private String cardNumber; diff --git a/src/test/java/sic/model/Pedido.java b/src/test/java/org/opencommercial/integration/model/PedidoTest.java similarity index 78% rename from src/test/java/sic/model/Pedido.java rename to src/test/java/org/opencommercial/integration/model/PedidoTest.java index 50a196c30..55e228add 100644 --- a/src/test/java/sic/model/Pedido.java +++ b/src/test/java/org/opencommercial/integration/model/PedidoTest.java @@ -1,9 +1,8 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.Cliente; -import sic.modelo.EstadoPedido; -import sic.modelo.TipoDeEnvio; +import org.opencommercial.model.EstadoPedido; +import org.opencommercial.model.TipoDeEnvio; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -15,7 +14,7 @@ @ToString(exclude = {"renglones", "cantidadArticulos"}) @EqualsAndHashCode(of = {"nroPedido", "nombreSucursal"}) @Builder -public class Pedido { +public class PedidoTest { private long idPedido; private long nroPedido; @@ -27,9 +26,9 @@ public class Pedido { private String detalleEnvio; private TipoDeEnvio tipoDeEnvio; private boolean eliminado; - private Cliente cliente; + private ClienteTest cliente; private String nombreUsuario; - private List renglones; + private List renglones; private BigDecimal subTotal; private BigDecimal recargoPorcentaje; private BigDecimal recargoNeto; diff --git a/src/test/java/sic/model/Producto.java b/src/test/java/org/opencommercial/integration/model/ProductoTest.java similarity index 87% rename from src/test/java/sic/model/Producto.java rename to src/test/java/org/opencommercial/integration/model/ProductoTest.java index 21025cc83..e18938216 100644 --- a/src/test/java/sic/model/Producto.java +++ b/src/test/java/org/opencommercial/integration/model/ProductoTest.java @@ -1,6 +1,7 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; @@ -11,13 +12,13 @@ @NoArgsConstructor @EqualsAndHashCode(of = {"codigo", "descripcion", "eliminado"}) @Builder -public class Producto { +public class ProductoTest { private Long idProducto; private String codigo; private String descripcion; - private Set cantidadEnSucursales; - private Set cantidadEnSucursalesDisponible; + private Set cantidadEnSucursales; + private Set cantidadEnSucursalesDisponible; private BigDecimal cantidadReservada; private BigDecimal cantidadTotalEnSucursales; private BigDecimal cantidadTotalEnSucursalesDisponible; diff --git a/src/test/java/sic/model/Proveedor.java b/src/test/java/org/opencommercial/integration/model/ProveedorTest.java similarity index 79% rename from src/test/java/sic/model/Proveedor.java rename to src/test/java/org/opencommercial/integration/model/ProveedorTest.java index 7726775ba..cc9305664 100644 --- a/src/test/java/sic/model/Proveedor.java +++ b/src/test/java/org/opencommercial/integration/model/ProveedorTest.java @@ -1,7 +1,7 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.CategoriaIVA; +import org.opencommercial.model.CategoriaIVA; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -11,7 +11,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class Proveedor { +public class ProveedorTest { private long idProveedor; private String nroProveedor; @@ -23,7 +23,7 @@ public class Proveedor { private String contacto; private String email; private String web; - private Ubicacion ubicacion; + private UbicacionTest ubicacion; private boolean eliminado; private BigDecimal saldoCuentaCorriente; private LocalDateTime fechaUltimoMovimiento; diff --git a/src/test/java/sic/model/Provincia.java b/src/test/java/org/opencommercial/integration/model/ProvinciaTest.java similarity index 72% rename from src/test/java/sic/model/Provincia.java rename to src/test/java/org/opencommercial/integration/model/ProvinciaTest.java index 0e2513788..23f39b5ff 100644 --- a/src/test/java/sic/model/Provincia.java +++ b/src/test/java/org/opencommercial/integration/model/ProvinciaTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Builder; @@ -7,7 +7,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class Provincia { +public class ProvinciaTest { private long idProvincia; private String nombre; diff --git a/src/test/java/sic/model/Recibo.java b/src/test/java/org/opencommercial/integration/model/ReciboTest.java similarity index 92% rename from src/test/java/sic/model/Recibo.java rename to src/test/java/org/opencommercial/integration/model/ReciboTest.java index 485b8d494..309e6760a 100644 --- a/src/test/java/sic/model/Recibo.java +++ b/src/test/java/org/opencommercial/integration/model/ReciboTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -20,7 +20,7 @@ "nombreFormaDePago", "nombreFiscalCliente" }) -public class Recibo { +public class ReciboTest { private Long idRecibo; private long numSerie; diff --git a/src/test/java/sic/model/Remito.java b/src/test/java/org/opencommercial/integration/model/RemitoTest.java similarity index 88% rename from src/test/java/sic/model/Remito.java rename to src/test/java/org/opencommercial/integration/model/RemitoTest.java index 03da79648..1eab79f4d 100644 --- a/src/test/java/sic/model/Remito.java +++ b/src/test/java/org/opencommercial/integration/model/RemitoTest.java @@ -1,16 +1,17 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.*; +import org.opencommercial.model.CategoriaIVA; + import java.math.BigDecimal; import java.time.LocalDateTime; @Data @AllArgsConstructor @NoArgsConstructor -public class Remito { +public class RemitoTest { private long idRemito; private LocalDateTime fecha; diff --git a/src/test/java/sic/model/RenglonCuentaCorriente.java b/src/test/java/org/opencommercial/integration/model/RenglonCuentaCorrienteTest.java similarity index 78% rename from src/test/java/sic/model/RenglonCuentaCorriente.java rename to src/test/java/org/opencommercial/integration/model/RenglonCuentaCorrienteTest.java index 71371f66b..f27492f2a 100644 --- a/src/test/java/sic/model/RenglonCuentaCorriente.java +++ b/src/test/java/org/opencommercial/integration/model/RenglonCuentaCorrienteTest.java @@ -1,16 +1,16 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import sic.modelo.TipoDeComprobante; +import org.opencommercial.model.TipoDeComprobante; import java.math.BigDecimal; @Data @AllArgsConstructor @NoArgsConstructor -public class RenglonCuentaCorriente { +public class RenglonCuentaCorrienteTest { private Long idRenglonCuentaCorriente; private Long idMovimiento; diff --git a/src/test/java/sic/model/RenglonFactura.java b/src/test/java/org/opencommercial/integration/model/RenglonFacturaTest.java similarity index 88% rename from src/test/java/sic/model/RenglonFactura.java rename to src/test/java/org/opencommercial/integration/model/RenglonFacturaTest.java index 68d0e071e..4707d87d2 100644 --- a/src/test/java/sic/model/RenglonFactura.java +++ b/src/test/java/org/opencommercial/integration/model/RenglonFacturaTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -9,7 +9,7 @@ @AllArgsConstructor @EqualsAndHashCode(of = {"idProductoItem", "codigoItem"}) @Builder -public class RenglonFactura { +public class RenglonFacturaTest { private long idRenglonFactura; private long idProductoItem; diff --git a/src/test/java/sic/model/RenglonNotaCredito.java b/src/test/java/org/opencommercial/integration/model/RenglonNotaCreditoTest.java similarity index 89% rename from src/test/java/sic/model/RenglonNotaCredito.java rename to src/test/java/org/opencommercial/integration/model/RenglonNotaCreditoTest.java index fa099f559..2d5a68fcb 100644 --- a/src/test/java/sic/model/RenglonNotaCredito.java +++ b/src/test/java/org/opencommercial/integration/model/RenglonNotaCreditoTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -9,7 +9,7 @@ @AllArgsConstructor @EqualsAndHashCode(of = {"idProductoItem", "codigoItem"}) @Builder -public class RenglonNotaCredito { +public class RenglonNotaCreditoTest { private long idRenglonNota; private long idProductoItem; diff --git a/src/test/java/sic/model/RenglonNotaDebito.java b/src/test/java/org/opencommercial/integration/model/RenglonNotaDebitoTest.java similarity index 81% rename from src/test/java/sic/model/RenglonNotaDebito.java rename to src/test/java/org/opencommercial/integration/model/RenglonNotaDebitoTest.java index 6a6316569..ce1815b69 100644 --- a/src/test/java/sic/model/RenglonNotaDebito.java +++ b/src/test/java/org/opencommercial/integration/model/RenglonNotaDebitoTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -9,7 +9,7 @@ @AllArgsConstructor @ToString @Builder -public class RenglonNotaDebito { +public class RenglonNotaDebitoTest { private long idRenglonNotaDebito; private String descripcion; diff --git a/src/test/java/sic/model/RenglonPedido.java b/src/test/java/org/opencommercial/integration/model/RenglonPedidoTest.java similarity index 88% rename from src/test/java/sic/model/RenglonPedido.java rename to src/test/java/org/opencommercial/integration/model/RenglonPedidoTest.java index cd8887421..5157ef90f 100644 --- a/src/test/java/sic/model/RenglonPedido.java +++ b/src/test/java/org/opencommercial/integration/model/RenglonPedidoTest.java @@ -1,18 +1,17 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.io.Serializable; import java.math.BigDecimal; @Data @AllArgsConstructor @NoArgsConstructor @Builder -public class RenglonPedido { +public class RenglonPedidoTest { private long idRenglonPedido; private long idProductoItem; diff --git a/src/test/java/sic/model/RenglonRemito.java b/src/test/java/org/opencommercial/integration/model/RenglonRemitoTest.java similarity index 80% rename from src/test/java/sic/model/RenglonRemito.java rename to src/test/java/org/opencommercial/integration/model/RenglonRemitoTest.java index 8bf2bf3c3..cc1c64d8d 100644 --- a/src/test/java/sic/model/RenglonRemito.java +++ b/src/test/java/org/opencommercial/integration/model/RenglonRemitoTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Data; @@ -9,7 +9,7 @@ @Data @NoArgsConstructor @AllArgsConstructor -public class RenglonRemito { +public class RenglonRemitoTest { private long idRenglonRemito; private String codigoItem; diff --git a/src/test/java/sic/model/Rubro.java b/src/test/java/org/opencommercial/integration/model/RubroTest.java similarity index 76% rename from src/test/java/sic/model/Rubro.java rename to src/test/java/org/opencommercial/integration/model/RubroTest.java index 8c73fe30b..9d5b67f27 100644 --- a/src/test/java/sic/model/Rubro.java +++ b/src/test/java/org/opencommercial/integration/model/RubroTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; @@ -7,7 +7,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class Rubro { +public class RubroTest { private long idRubro; private String nombre; diff --git a/src/test/java/sic/model/Sucursal.java b/src/test/java/org/opencommercial/integration/model/SucursalTest.java similarity index 72% rename from src/test/java/sic/model/Sucursal.java rename to src/test/java/org/opencommercial/integration/model/SucursalTest.java index f42705a59..40a3f9e3e 100644 --- a/src/test/java/sic/model/Sucursal.java +++ b/src/test/java/org/opencommercial/integration/model/SucursalTest.java @@ -1,8 +1,7 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.CategoriaIVA; -import sic.modelo.ConfiguracionSucursal; +import org.opencommercial.model.CategoriaIVA; import java.time.LocalDateTime; @@ -11,7 +10,7 @@ @NoArgsConstructor @Builder @EqualsAndHashCode(exclude = {"idSucursal", "ubicacion", "detalleUbicacion", "configuracionSucursal"}) -public class Sucursal { +public class SucursalTest { private long idSucursal; private String nombre; @@ -22,8 +21,8 @@ public class Sucursal { private LocalDateTime fechaInicioActividad; private String email; private String telefono; - private Ubicacion ubicacion; - private ConfiguracionSucursal configuracionSucursal; + private UbicacionTest ubicacion; + private ConfiguracionSucursalTest configuracionSucursal; private String detalleUbicacion; private String logo; private boolean eliminada; diff --git a/src/test/java/sic/model/TokenCard.java b/src/test/java/org/opencommercial/integration/model/TokenCardTest.java similarity index 88% rename from src/test/java/sic/model/TokenCard.java rename to src/test/java/org/opencommercial/integration/model/TokenCardTest.java index 4e008ea14..0df5b52fc 100644 --- a/src/test/java/sic/model/TokenCard.java +++ b/src/test/java/org/opencommercial/integration/model/TokenCardTest.java @@ -1,4 +1,4 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.AllArgsConstructor; import lombok.Builder; @@ -11,7 +11,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class TokenCard { +public class TokenCardTest { private String id; private String public_key; diff --git a/src/test/java/sic/model/Ubicacion.java b/src/test/java/org/opencommercial/integration/model/UbicacionTest.java similarity index 89% rename from src/test/java/sic/model/Ubicacion.java rename to src/test/java/org/opencommercial/integration/model/UbicacionTest.java index b366805ff..5b20a4032 100644 --- a/src/test/java/sic/model/Ubicacion.java +++ b/src/test/java/org/opencommercial/integration/model/UbicacionTest.java @@ -1,9 +1,7 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import java.io.Serializable; - @Data @AllArgsConstructor @NoArgsConstructor @@ -17,7 +15,7 @@ "idProvincia", "nombreProvincia" }) -public class Ubicacion { +public class UbicacionTest { private long idUbicacion; private String descripcion; diff --git a/src/test/java/sic/model/Usuario.java b/src/test/java/org/opencommercial/integration/model/UsuarioTest.java similarity index 80% rename from src/test/java/sic/model/Usuario.java rename to src/test/java/org/opencommercial/integration/model/UsuarioTest.java index a3bb0952c..aa71643f6 100644 --- a/src/test/java/sic/model/Usuario.java +++ b/src/test/java/org/opencommercial/integration/model/UsuarioTest.java @@ -1,10 +1,8 @@ -package sic.model; +package org.opencommercial.integration.model; import lombok.*; -import sic.modelo.Rol; +import org.opencommercial.model.Rol; -import java.io.Serializable; -import java.util.Collections; import java.util.List; @Data @@ -12,7 +10,7 @@ @NoArgsConstructor @Builder @EqualsAndHashCode(of = {"username", "email", "roles"}) -public class Usuario { +public class UsuarioTest { private long idUsuario; private String username; diff --git a/src/test/java/sic/repository/ProductoRepositoryTest.java b/src/test/java/org/opencommercial/repository/ProductoRepositoryTest.java similarity index 95% rename from src/test/java/sic/repository/ProductoRepositoryTest.java rename to src/test/java/org/opencommercial/repository/ProductoRepositoryTest.java index c6b08107a..6811cd0d6 100644 --- a/src/test/java/sic/repository/ProductoRepositoryTest.java +++ b/src/test/java/org/opencommercial/repository/ProductoRepositoryTest.java @@ -1,10 +1,16 @@ -package sic.repository; +package org.opencommercial.repository; import com.querydsl.core.BooleanBuilder; import jakarta.persistence.OptimisticLockException; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.App; +import org.opencommercial.interceptor.JwtInterceptor; +import org.opencommercial.model.*; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.custom.ProductoRepositoryImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; @@ -16,12 +22,6 @@ import org.testcontainers.containers.MySQLContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import sic.App; -import sic.interceptor.JwtInterceptor; -import sic.modelo.*; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.custom.ProductoRepositoryImpl; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/test/java/sic/service/AuthServiceImplTest.java b/src/test/java/org/opencommercial/service/AuthServiceImplTest.java similarity index 91% rename from src/test/java/sic/service/AuthServiceImplTest.java rename to src/test/java/org/opencommercial/service/AuthServiceImplTest.java index fdce72928..edf9d321c 100644 --- a/src/test/java/sic/service/AuthServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/AuthServiceImplTest.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -9,9 +9,9 @@ import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.web.client.RestTemplate; -import sic.modelo.Rol; -import sic.modelo.TokenAccesoExcluido; -import sic.repository.TokenAccesoExcluidoRepository; +import org.opencommercial.model.Rol; +import org.opencommercial.model.TokenAccesoExcluido; +import org.opencommercial.repository.TokenAccesoExcluidoRepository; import java.util.List; diff --git a/src/test/java/sic/service/CarritoCompraServiceImplTest.java b/src/test/java/org/opencommercial/service/CarritoCompraServiceImplTest.java similarity index 89% rename from src/test/java/sic/service/CarritoCompraServiceImplTest.java rename to src/test/java/org/opencommercial/service/CarritoCompraServiceImplTest.java index 67b71f3c8..03ead8621 100644 --- a/src/test/java/sic/service/CarritoCompraServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/CarritoCompraServiceImplTest.java @@ -1,7 +1,17 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.ItemCarritoCompra; +import org.opencommercial.model.Producto; +import org.opencommercial.model.Sucursal; +import org.opencommercial.model.Usuario; +import org.opencommercial.model.dto.CarritoCompraDTO; +import org.opencommercial.model.dto.ProductosParaVerificarStockDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.CarritoCompraRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.data.domain.Page; @@ -10,16 +20,6 @@ import org.springframework.data.domain.Sort; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.ItemCarritoCompra; -import sic.modelo.Producto; -import sic.modelo.Sucursal; -import sic.modelo.Usuario; -import sic.modelo.dto.CarritoCompraDTO; -import sic.modelo.dto.ProductosParaVerificarStockDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.CarritoCompraRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.util.ArrayList; @@ -88,11 +88,9 @@ void shouldGetCarritoDeCompra() { .thenReturn(itemsCarritoCompras); CarritoCompraDTO carritoCompra = carritoCompraServiceImpl.getCarritoCompra(1L); assertNotNull(carritoCompra); - assertEquals( - new BigDecimal("3"), carritoCompraServiceImpl.getCarritoCompra(1L).getCantArticulos()); + assertEquals(new BigDecimal("3"), carritoCompraServiceImpl.getCarritoCompra(1L).getCantArticulos()); assertEquals(3, carritoCompraServiceImpl.getCarritoCompra(1L).getCantRenglones()); - assertEquals( - new BigDecimal("1450.00"), carritoCompraServiceImpl.getCarritoCompra(1L).getTotal()); + assertEquals(new BigDecimal("1450.00"), carritoCompraServiceImpl.getCarritoCompra(1L).getTotal()); } @Test diff --git a/src/test/java/sic/service/ClienteServiceImplTest.java b/src/test/java/org/opencommercial/service/ClienteServiceImplTest.java similarity index 90% rename from src/test/java/sic/service/ClienteServiceImplTest.java rename to src/test/java/org/opencommercial/service/ClienteServiceImplTest.java index edcfba731..dc7a488d5 100644 --- a/src/test/java/sic/service/ClienteServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/ClienteServiceImplTest.java @@ -1,19 +1,19 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Cliente; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.model.Usuario; +import org.opencommercial.repository.ClienteRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.Cliente; -import sic.modelo.TipoDeOperacion; -import sic.modelo.Usuario; -import sic.repository.ClienteRepository; -import sic.util.CustomValidator; import java.util.ArrayList; import java.util.List; @@ -91,8 +91,7 @@ void shouldLanzarExceptionWhenIdFiscalDuplicadoEnActualizacion() { .thenReturn(listaClienteNuevo); assertThrows( BusinessServiceException.class, - () -> - clienteService.validarReglasDeNegocio(TipoDeOperacion.ACTUALIZACION, clienteDuplicado)); + () -> clienteService.validarReglasDeNegocio(TipoDeOperacion.ACTUALIZACION, clienteDuplicado)); verify(messageSource).getMessage(eq("mensaje_cliente_duplicado_idFiscal"), any(), any()); } diff --git a/src/test/java/sic/service/ConfiguracionSucursalServiceImplTest.java b/src/test/java/org/opencommercial/service/ConfiguracionSucursalServiceImplTest.java similarity index 93% rename from src/test/java/sic/service/ConfiguracionSucursalServiceImplTest.java rename to src/test/java/org/opencommercial/service/ConfiguracionSucursalServiceImplTest.java index cb7095cb0..f2ae761d9 100644 --- a/src/test/java/sic/service/ConfiguracionSucursalServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/ConfiguracionSucursalServiceImplTest.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.ConfiguracionSucursal; +import org.opencommercial.repository.ConfiguracionSucursalRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.ConfiguracionSucursal; -import sic.repository.ConfiguracionSucursalRepository; -import sic.util.CustomValidator; import java.time.LocalDateTime; import java.util.Optional; @@ -88,8 +88,7 @@ void shouldActualizarConfiguracionSucursal() { when(configuracionSucursalRepository.findById(1L)).thenReturn(Optional.of(configuracionSucursalPersistida)); assertThrows( BusinessServiceException.class, - () -> - configuracionSucursalService.actualizar(configuracionDeSucursalParaActualizar)); + () -> configuracionSucursalService.actualizar(configuracionDeSucursalParaActualizar)); verify(messageSource).getMessage(eq("mensaje_sucursal_quitar_predeterminada"), any(), any()); configuracionDeSucursalParaActualizar.setPredeterminada(true); configuracionSucursalService.actualizar(configuracionDeSucursalParaActualizar); diff --git a/src/test/java/sic/service/CuentaCorrienteServiceImplTest.java b/src/test/java/org/opencommercial/service/CuentaCorrienteServiceImplTest.java similarity index 73% rename from src/test/java/sic/service/CuentaCorrienteServiceImplTest.java rename to src/test/java/org/opencommercial/service/CuentaCorrienteServiceImplTest.java index cb5e19737..ce4491a03 100644 --- a/src/test/java/sic/service/CuentaCorrienteServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/CuentaCorrienteServiceImplTest.java @@ -1,23 +1,22 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaCuentaCorrienteClienteCriteria; +import org.opencommercial.repository.CuentaCorrienteClienteRepository; +import org.opencommercial.repository.CuentaCorrienteRepository; +import org.opencommercial.repository.RenglonCuentaCorrienteRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.data.domain.PageImpl; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaCuentaCorrienteClienteCriteria; -import sic.modelo.criteria.BusquedaProductoCriteria; -import sic.repository.CuentaCorrienteClienteRepository; -import sic.repository.CuentaCorrienteRepository; -import sic.repository.RenglonCuentaCorrienteRepository; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import java.util.ArrayList; import java.util.List; @@ -54,26 +53,22 @@ void shouldTestReporteListaDeClientes() { usuario.setRoles(rolesDeUsuario); when(usuarioService.getUsuarioNoEliminadoPorId(1L)).thenReturn(usuario); when(cuentaCorrienteClienteRepository.findAll( - cuentaCorrienteService.getBuilder( - BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L), + cuentaCorrienteService.getBuilder(BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L), cuentaCorrienteService.getPageable(null, null, null, "cliente.nombreFiscal", Integer.MAX_VALUE))) .thenReturn(new PageImpl<>(cuentasCorriente)); Sucursal sucursal = new Sucursal(); sucursal.setLogo("noTieneImagen"); when(sucursalService.getSucursalPredeterminada()).thenReturn(sucursal); assertThrows( - ServiceException.class, - () -> - cuentaCorrienteService.getReporteListaDeCuentasCorrienteClientePorCriteria( - BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L, FormatoReporte.PDF)); + ServiceException.class, + () -> cuentaCorrienteService.getReporteListaDeCuentasCorrienteClientePorCriteria( + BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L, FormatoReporte.PDF)); assertThrows( - ServiceException.class, - () -> - cuentaCorrienteService.getReporteListaDeCuentasCorrienteClientePorCriteria( - BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L, FormatoReporte.XLSX)); + ServiceException.class, + () -> cuentaCorrienteService.getReporteListaDeCuentasCorrienteClientePorCriteria( + BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L, FormatoReporte.XLSX)); verify(messageSource, times(2)).getMessage(eq("mensaje_sucursal_404_logo"), any(), any()); sucursal.setLogo(null); - BusquedaProductoCriteria criteria = BusquedaProductoCriteria.builder().build(); assertNotNull( cuentaCorrienteService.getReporteListaDeCuentasCorrienteClientePorCriteria( BusquedaCuentaCorrienteClienteCriteria.builder().build(), 1L, FormatoReporte.PDF)); diff --git a/src/test/java/sic/service/FacturaCompraServiceImplTest.java b/src/test/java/org/opencommercial/service/FacturaCompraServiceImplTest.java similarity index 87% rename from src/test/java/sic/service/FacturaCompraServiceImplTest.java rename to src/test/java/org/opencommercial/service/FacturaCompraServiceImplTest.java index 7924116a0..49ba78188 100644 --- a/src/test/java/sic/service/FacturaCompraServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/FacturaCompraServiceImplTest.java @@ -1,19 +1,19 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mockito; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaCompraCriteria; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.FacturaCompraRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaCompraCriteria; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.FacturaCompraRepository; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -46,8 +46,7 @@ void shouldGetTipoFacturaCompraWhenSucursalYProveedorDiscriminanIVA() { expResult[1] = TipoDeComprobante.FACTURA_B; expResult[2] = TipoDeComprobante.FACTURA_X; expResult[3] = TipoDeComprobante.PRESUPUESTO; - TipoDeComprobante[] result = - facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); + TipoDeComprobante[] result = facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); assertArrayEquals(expResult, result); } @@ -61,8 +60,7 @@ void shouldGetTipoFacturaCompraWhenSucursalDiscriminaIVAYProveedorNO() { expResult[0] = TipoDeComprobante.FACTURA_C; expResult[1] = TipoDeComprobante.FACTURA_X; expResult[2] = TipoDeComprobante.PRESUPUESTO; - TipoDeComprobante[] result = - facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); + TipoDeComprobante[] result = facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); assertArrayEquals(expResult, result); } @@ -76,8 +74,7 @@ void shouldGetTipoFacturaCompraWhenSucursalNoDiscriminaIVAYProveedorSI() { expResult[0] = TipoDeComprobante.FACTURA_B; expResult[1] = TipoDeComprobante.FACTURA_X; expResult[2] = TipoDeComprobante.PRESUPUESTO; - TipoDeComprobante[] result = - facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); + TipoDeComprobante[] result = facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); assertArrayEquals(expResult, result); } @@ -91,8 +88,7 @@ void shouldGetTipoFacturaCompraWhenSucursalNoDiscriminaYProveedorTampoco() { expResult[0] = TipoDeComprobante.FACTURA_C; expResult[1] = TipoDeComprobante.FACTURA_X; expResult[2] = TipoDeComprobante.PRESUPUESTO; - TipoDeComprobante[] result = - facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); + TipoDeComprobante[] result = facturaCompraServiceImpl.getTiposDeComprobanteCompra(sucursal, proveedor); assertArrayEquals(expResult, result); } @@ -106,8 +102,7 @@ void shouldCalcularIVANetoWhenCompraConFacturaA() { assertEquals( 0, facturaServiceImpl - .calcularIVANetoRenglon( - Movimiento.COMPRA, TipoDeComprobante.FACTURA_A, producto, BigDecimal.ZERO) + .calcularIVANetoRenglon(Movimiento.COMPRA, TipoDeComprobante.FACTURA_A, producto, BigDecimal.ZERO) .compareTo(new BigDecimal("21"))); } @@ -121,8 +116,7 @@ void shouldCalcularIVANetoWhenCompraConFacturaB() { assertEquals( 42, facturaServiceImpl - .calcularIVANetoRenglon( - Movimiento.COMPRA, TipoDeComprobante.FACTURA_B, producto, BigDecimal.ZERO) + .calcularIVANetoRenglon(Movimiento.COMPRA, TipoDeComprobante.FACTURA_B, producto, BigDecimal.ZERO) .doubleValue()); } @@ -199,15 +193,13 @@ void shouldTestBusquedaFacturaCompraCriteria() { @Test void shouldThrownBusinessServiceExceptionPorBusquedaCompraSinIdSucursal() { BusquedaFacturaCompraCriteria criteria = BusquedaFacturaCompraCriteria.builder().build(); - assertThrows( - BusinessServiceException.class, () -> facturaCompraServiceImpl.getBuilderCompra(criteria)); + assertThrows(BusinessServiceException.class, () -> facturaCompraServiceImpl.getBuilderCompra(criteria)); verify(messageSource).getMessage(eq("mensaje_busqueda_sin_sucursal"), any(), any()); } @Test void shouldCalcularTotalFacturadoCompra() { - BusquedaFacturaCompraCriteria criteria = - BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); + BusquedaFacturaCompraCriteria criteria = BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); BooleanBuilder builder = new BooleanBuilder(); QFacturaCompra qFacturaCompra = QFacturaCompra.facturaCompra; builder.and( @@ -222,8 +214,7 @@ void shouldCalcularTotalFacturadoCompra() { @Test void shouldCalcularTotalFacturadoCompraAndReturnZero() { - BusquedaFacturaCompraCriteria criteria = - BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); + BusquedaFacturaCompraCriteria criteria = BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); BooleanBuilder builder = new BooleanBuilder(); QFacturaCompra qFacturaCompra = QFacturaCompra.facturaCompra; builder.and( @@ -238,8 +229,7 @@ void shouldCalcularTotalFacturadoCompraAndReturnZero() { @Test void shouldCalcularIvaCompra() { - BusquedaFacturaCompraCriteria criteria = - BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); + BusquedaFacturaCompraCriteria criteria = BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); BooleanBuilder builder = new BooleanBuilder(); QFacturaCompra qFacturaCompra = QFacturaCompra.facturaCompra; builder.and( @@ -256,8 +246,7 @@ void shouldCalcularIvaCompra() { @Test void shouldCalcularIvaCompraAndReturnZero() { - BusquedaFacturaCompraCriteria criteria = - BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); + BusquedaFacturaCompraCriteria criteria = BusquedaFacturaCompraCriteria.builder().idSucursal(1L).build(); BooleanBuilder builder = new BooleanBuilder(); QFacturaCompra qFacturaCompra = QFacturaCompra.facturaCompra; builder.and( diff --git a/src/test/java/sic/service/FacturaServiceImplTest.java b/src/test/java/org/opencommercial/service/FacturaServiceImplTest.java similarity index 93% rename from src/test/java/sic/service/FacturaServiceImplTest.java rename to src/test/java/org/opencommercial/service/FacturaServiceImplTest.java index 3ccb3a5d1..c536875d0 100644 --- a/src/test/java/sic/service/FacturaServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/FacturaServiceImplTest.java @@ -1,19 +1,19 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevoRenglonFacturaDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.FacturaRepository; +import org.opencommercial.util.CalculosComprobante; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.*; -import sic.modelo.dto.NuevoRenglonFacturaDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.FacturaRepository; -import sic.util.CalculosComprobante; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.util.ArrayList; @@ -418,20 +418,16 @@ void shouldGetArrayDeIdProductoParaFactura() { nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().idProducto(1L).build()); nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().idProducto(2L).build()); nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().idProducto(3L).build()); - assertArrayEquals( - arrayEsperado, CalculosComprobante.getArrayDeIdProductoParaFactura(nuevosRenglonsFactura)); + assertArrayEquals(arrayEsperado, CalculosComprobante.getArrayDeIdProductoParaFactura(nuevosRenglonsFactura)); } @Test void shouldGetArrayDeCantidadesParaFactura() { BigDecimal[] arrayEsperado = {new BigDecimal("10"), new BigDecimal("20"), new BigDecimal("5")}; List nuevosRenglonsFactura = new ArrayList<>(); - nuevosRenglonsFactura.add( - NuevoRenglonFacturaDTO.builder().cantidad(new BigDecimal("10")).build()); - nuevosRenglonsFactura.add( - NuevoRenglonFacturaDTO.builder().cantidad(new BigDecimal("20")).build()); - nuevosRenglonsFactura.add( - NuevoRenglonFacturaDTO.builder().cantidad(new BigDecimal("5")).build()); + nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().cantidad(new BigDecimal("10")).build()); + nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().cantidad(new BigDecimal("20")).build()); + nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().cantidad(new BigDecimal("5")).build()); assertArrayEquals( arrayEsperado, CalculosComprobante.getArrayDeCantidadesProductoParaFactura(nuevosRenglonsFactura)); @@ -441,12 +437,9 @@ void shouldGetArrayDeCantidadesParaFactura() { void shouldGetArrayDeBonificacionesDeRenglonParaFactura() { BigDecimal[] arrayEsperado = {new BigDecimal("5"), new BigDecimal("2"), new BigDecimal("12")}; List nuevosRenglonsFactura = new ArrayList<>(); - nuevosRenglonsFactura.add( - NuevoRenglonFacturaDTO.builder().bonificacion(new BigDecimal("5")).build()); - nuevosRenglonsFactura.add( - NuevoRenglonFacturaDTO.builder().bonificacion(new BigDecimal("2")).build()); - nuevosRenglonsFactura.add( - NuevoRenglonFacturaDTO.builder().bonificacion(new BigDecimal("12")).build()); + nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().bonificacion(new BigDecimal("5")).build()); + nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().bonificacion(new BigDecimal("2")).build()); + nuevosRenglonsFactura.add(NuevoRenglonFacturaDTO.builder().bonificacion(new BigDecimal("12")).build()); assertArrayEquals( arrayEsperado, CalculosComprobante.getArrayDeBonificacionesParaFactura(nuevosRenglonsFactura)); diff --git a/src/test/java/sic/service/FacturaVentaServiceImplTest.java b/src/test/java/org/opencommercial/service/FacturaVentaServiceImplTest.java similarity index 98% rename from src/test/java/sic/service/FacturaVentaServiceImplTest.java rename to src/test/java/org/opencommercial/service/FacturaVentaServiceImplTest.java index 83a78d990..73a67b2ee 100644 --- a/src/test/java/sic/service/FacturaVentaServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/FacturaVentaServiceImplTest.java @@ -1,25 +1,25 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mockito; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaFacturaVentaCriteria; +import org.opencommercial.model.dto.NuevaFacturaVentaDTO; +import org.opencommercial.model.dto.UbicacionDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.FacturaRepository; +import org.opencommercial.repository.FacturaVentaRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaFacturaVentaCriteria; -import sic.modelo.dto.NuevaFacturaVentaDTO; -import sic.modelo.dto.UbicacionDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.FacturaRepository; -import sic.repository.FacturaVentaRepository; -import sic.util.CustomValidator; -import sic.util.JasperReportsHandler; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/test/java/sic/service/GastoServiceImplTest.java b/src/test/java/org/opencommercial/service/GastoServiceImplTest.java similarity index 71% rename from src/test/java/sic/service/GastoServiceImplTest.java rename to src/test/java/org/opencommercial/service/GastoServiceImplTest.java index 47e0a4bf6..54c428874 100644 --- a/src/test/java/sic/service/GastoServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/GastoServiceImplTest.java @@ -1,14 +1,14 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.criteria.BusquedaGastoCriteria; +import org.opencommercial.repository.GastoRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.criteria.BusquedaGastoCriteria; -import sic.repository.GastoRepository; import java.time.LocalDateTime; @@ -18,24 +18,19 @@ @ContextConfiguration(classes = {GastoServiceImpl.class, MessageSource.class}) class GastoServiceImplTest { - @MockBean - GastoRepository gastoRepository; - @MockBean - SucursalService sucursalService; - @MockBean - CajaService cajaService; - @MockBean - MessageSource messageSource; - @Autowired - GastoServiceImpl gastoService; + @MockBean GastoRepository gastoRepository; + @MockBean SucursalService sucursalService; + @MockBean CajaService cajaService; + @MockBean MessageSource messageSource; + + @Autowired GastoServiceImpl gastoService; @Test void shouldTestGastosSearchWithOnlyFechaDesde() { BusquedaGastoCriteria busquedaGastoCriteria = BusquedaGastoCriteria.builder() .fechaDesde(LocalDateTime.MIN) .build(); - String builder = - "gasto.fecha > -999999999-01-01T00:00"; + String builder = "gasto.fecha > -999999999-01-01T00:00"; assertEquals(builder, gastoService.getBuilder(busquedaGastoCriteria).toString()); } @@ -44,8 +39,7 @@ void shouldTestGastosSearchWithOnlyFechaHasta() { BusquedaGastoCriteria busquedaGastoCriteria = BusquedaGastoCriteria.builder() .fechaHasta(LocalDateTime.MAX) .build(); - String builder = - "gasto.fecha < +999999999-12-31T23:59:59.999999999"; + String builder = "gasto.fecha < +999999999-12-31T23:59:59.999999999"; assertEquals(builder, gastoService.getBuilder(busquedaGastoCriteria).toString()); } @@ -55,8 +49,7 @@ void shouldTestGastosSearchWithOnlyBothDates() { .fechaDesde(LocalDateTime.MIN) .fechaHasta(LocalDateTime.MAX) .build(); - String builder = - "gasto.fecha between -999999999-01-01T00:00 and +999999999-12-31T23:59:59.999999999"; + String builder = "gasto.fecha between -999999999-01-01T00:00 and +999999999-12-31T23:59:59.999999999"; assertEquals(builder, gastoService.getBuilder(busquedaGastoCriteria).toString()); } } diff --git a/src/test/java/sic/service/MedidaServiceImplTest.java b/src/test/java/org/opencommercial/service/MedidaServiceImplTest.java similarity index 89% rename from src/test/java/sic/service/MedidaServiceImplTest.java rename to src/test/java/org/opencommercial/service/MedidaServiceImplTest.java index 746ef6c91..ffa405be5 100644 --- a/src/test/java/sic/service/MedidaServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/MedidaServiceImplTest.java @@ -1,17 +1,17 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Medida; +import org.opencommercial.model.TipoDeOperacion; +import org.opencommercial.repository.MedidaRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.Medida; -import sic.modelo.TipoDeOperacion; -import sic.repository.MedidaRepository; -import sic.util.CustomValidator; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; diff --git a/src/test/java/sic/service/NotaServiceImplTest.java b/src/test/java/org/opencommercial/service/NotaServiceImplTest.java similarity index 98% rename from src/test/java/sic/service/NotaServiceImplTest.java rename to src/test/java/org/opencommercial/service/NotaServiceImplTest.java index 2af474a0b..9b3cec8d1 100644 --- a/src/test/java/sic/service/NotaServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/NotaServiceImplTest.java @@ -1,17 +1,17 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevaNotaCreditoSinFacturaDTO; +import org.opencommercial.repository.NotaDebitoRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.dto.NuevaNotaCreditoSinFacturaDTO; -import sic.repository.NotaDebitoRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/src/test/java/sic/service/PedidoServiceImplTest.java b/src/test/java/org/opencommercial/service/PedidoServiceImplTest.java similarity index 95% rename from src/test/java/sic/service/PedidoServiceImplTest.java rename to src/test/java/org/opencommercial/service/PedidoServiceImplTest.java index e1a3822d8..a1670862a 100644 --- a/src/test/java/sic/service/PedidoServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/PedidoServiceImplTest.java @@ -1,25 +1,25 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.modelmapper.ModelMapper; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaPedidoCriteria; +import org.opencommercial.model.dto.NuevoRenglonPedidoDTO; +import org.opencommercial.model.dto.ProductoFaltanteDTO; +import org.opencommercial.model.dto.UbicacionDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.repository.PedidoRepository; +import org.opencommercial.repository.RenglonPedidoRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaPedidoCriteria; -import sic.modelo.dto.NuevoRenglonPedidoDTO; -import sic.modelo.dto.ProductoFaltanteDTO; -import sic.modelo.dto.UbicacionDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.repository.PedidoRepository; -import sic.repository.RenglonPedidoRepository; -import sic.util.CustomValidator; -import sic.util.JasperReportsHandler; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -115,8 +115,7 @@ void shouldGetArrayDeCantidadesProducto() { nuevosRenglonesPedido.add(nuevoRenglonPedidoDTO1); nuevosRenglonesPedido.add(nuevoRenglonPedidoDTO2); BigDecimal[] idsProductoEsperado = new BigDecimal[] {BigDecimal.TEN, BigDecimal.ONE}; - BigDecimal[] idsProductoResultado = - pedidoService.getArrayDeCantidadesProducto(nuevosRenglonesPedido); + BigDecimal[] idsProductoResultado = pedidoService.getArrayDeCantidadesProducto(nuevosRenglonesPedido); assertEquals(idsProductoEsperado.length, idsProductoResultado.length); assertEquals(idsProductoEsperado[0], idsProductoResultado[0]); assertEquals(idsProductoEsperado[1], idsProductoResultado[1]); @@ -417,7 +416,6 @@ void shouldThrowsServiceExceptionActualizarCantidadReservadaDeProductosPorModifi assertThrows( ServiceException.class, () -> pedidoService.actualizarCantidadReservadaDeProductosPorModificacion(pedido, renglonesAnterioresPedido)); - verify(messageSource) - .getMessage(eq("mensaje_producto_error_actualizar_cantidad_reservada"), any(), any()); + verify(messageSource).getMessage(eq("mensaje_producto_error_actualizar_cantidad_reservada"), any(), any()); } } diff --git a/src/test/java/sic/service/ProductoServiceImplTest.java b/src/test/java/org/opencommercial/service/ProductoServiceImplTest.java similarity index 98% rename from src/test/java/sic/service/ProductoServiceImplTest.java rename to src/test/java/org/opencommercial/service/ProductoServiceImplTest.java index 289cc77df..5e49942e0 100644 --- a/src/test/java/sic/service/ProductoServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/ProductoServiceImplTest.java @@ -1,4 +1,4 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import com.querydsl.core.types.Predicate; @@ -6,27 +6,27 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaProductoCriteria; +import org.opencommercial.model.dto.NuevoProductoDTO; +import org.opencommercial.model.dto.ProductoFaltanteDTO; +import org.opencommercial.model.dto.ProductosParaActualizarDTO; +import org.opencommercial.model.dto.ProductosParaVerificarStockDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.model.embeddable.PrecioProductoEmbeddable; +import org.opencommercial.repository.ProductoFavoritoRepository; +import org.opencommercial.repository.ProductoRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.FormatoReporte; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.data.domain.*; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaProductoCriteria; -import sic.modelo.dto.NuevoProductoDTO; -import sic.modelo.dto.ProductoFaltanteDTO; -import sic.modelo.dto.ProductosParaActualizarDTO; -import sic.modelo.dto.ProductosParaVerificarStockDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.modelo.embeddable.PrecioProductoEmbeddable; -import sic.repository.ProductoFavoritoRepository; -import sic.repository.ProductoRepository; -import sic.util.CustomValidator; -import sic.util.FormatoReporte; -import sic.util.JasperReportsHandler; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -300,8 +300,7 @@ void shouldGetProductoConPrecioBonificadoPorOferta() { @Test void shouldThrownEntityNotFoundException() { when(productoRepository.findById(1L)).thenReturn(Optional.empty()); - assertThrows( - EntityNotFoundException.class, () -> productoService.getProductoNoEliminadoPorId(1L)); + assertThrows(EntityNotFoundException.class, () -> productoService.getProductoNoEliminadoPorId(1L)); verify(messageSource).getMessage(eq("mensaje_producto_no_existente"), any(), any()); } diff --git a/src/test/java/sic/service/ProveedorServiceImplTest.java b/src/test/java/org/opencommercial/service/ProveedorServiceImplTest.java similarity index 84% rename from src/test/java/sic/service/ProveedorServiceImplTest.java rename to src/test/java/org/opencommercial/service/ProveedorServiceImplTest.java index 5e77b8e4c..b698d964c 100644 --- a/src/test/java/sic/service/ProveedorServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/ProveedorServiceImplTest.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.CategoriaIVA; +import org.opencommercial.model.Proveedor; +import org.opencommercial.repository.ProveedorRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.CategoriaIVA; -import sic.modelo.Proveedor; -import sic.repository.ProveedorRepository; -import sic.util.CustomValidator; import static org.mockito.Mockito.verify; diff --git a/src/test/java/sic/service/ReciboServiceImplTest.java b/src/test/java/org/opencommercial/service/ReciboServiceImplTest.java similarity index 97% rename from src/test/java/sic/service/ReciboServiceImplTest.java rename to src/test/java/org/opencommercial/service/ReciboServiceImplTest.java index b9f10c5b9..80089560f 100644 --- a/src/test/java/sic/service/ReciboServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/ReciboServiceImplTest.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaReciboCriteria; +import org.opencommercial.repository.ReciboRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaReciboCriteria; -import sic.repository.ReciboRepository; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/test/java/sic/service/RegistracionServiceImplTest.java b/src/test/java/org/opencommercial/service/RegistracionServiceImplTest.java similarity index 89% rename from src/test/java/sic/service/RegistracionServiceImplTest.java rename to src/test/java/org/opencommercial/service/RegistracionServiceImplTest.java index 97a173e35..218b202d6 100644 --- a/src/test/java/sic/service/RegistracionServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/RegistracionServiceImplTest.java @@ -1,15 +1,15 @@ -package sic.service; +package org.opencommercial.service; import jakarta.validation.ConstraintViolationException; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.CategoriaIVA; +import org.opencommercial.model.dto.RegistracionClienteAndUsuarioDTO; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.CategoriaIVA; -import sic.modelo.dto.RegistracionClienteAndUsuarioDTO; -import sic.util.CustomValidator; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/src/test/java/sic/service/RemitoServiceImplTest.java b/src/test/java/org/opencommercial/service/RemitoServiceImplTest.java similarity index 96% rename from src/test/java/sic/service/RemitoServiceImplTest.java rename to src/test/java/org/opencommercial/service/RemitoServiceImplTest.java index 4119e06f9..e53e54424 100644 --- a/src/test/java/sic/service/RemitoServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/RemitoServiceImplTest.java @@ -1,23 +1,23 @@ -package sic.service; +package org.opencommercial.service; import com.querydsl.core.BooleanBuilder; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaRemitoCriteria; +import org.opencommercial.model.dto.NuevoRemitoDTO; +import org.opencommercial.model.dto.UbicacionDTO; +import org.opencommercial.repository.RemitoRepository; +import org.opencommercial.repository.RenglonRemitoRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.data.domain.Pageable; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaRemitoCriteria; -import sic.modelo.dto.NuevoRemitoDTO; -import sic.modelo.dto.UbicacionDTO; -import sic.repository.RemitoRepository; -import sic.repository.RenglonRemitoRepository; -import sic.util.CustomValidator; -import sic.util.JasperReportsHandler; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/test/java/sic/service/RubroServiceImplTest.java b/src/test/java/org/opencommercial/service/RubroServiceImplTest.java similarity index 88% rename from src/test/java/sic/service/RubroServiceImplTest.java rename to src/test/java/org/opencommercial/service/RubroServiceImplTest.java index b0ef7ebbc..fa7d01460 100644 --- a/src/test/java/sic/service/RubroServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/RubroServiceImplTest.java @@ -1,16 +1,16 @@ -package sic.service; +package org.opencommercial.service; import org.apache.commons.lang.RandomStringUtils; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.Rubro; +import org.opencommercial.repository.RubroRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.Rubro; -import sic.repository.RubroRepository; -import sic.util.CustomValidator; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.verify; diff --git a/src/test/java/sic/service/SucursalServiceImplTest.java b/src/test/java/org/opencommercial/service/SucursalServiceImplTest.java similarity index 93% rename from src/test/java/sic/service/SucursalServiceImplTest.java rename to src/test/java/org/opencommercial/service/SucursalServiceImplTest.java index cd8666c75..3f6c97ef3 100644 --- a/src/test/java/sic/service/SucursalServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/SucursalServiceImplTest.java @@ -1,18 +1,18 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.dto.NuevaSucursalDTO; +import org.opencommercial.repository.SucursalRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.*; -import sic.modelo.dto.NuevaSucursalDTO; -import sic.repository.SucursalRepository; -import sic.util.CustomValidator; import java.util.ArrayList; import java.util.List; @@ -166,12 +166,10 @@ void shouldNotValidarReglasDeNegocio() { when(sucursalRepository.findByNombreIsAndEliminadaOrderByNombreAsc("Sucursal Test", false)).thenReturn(sucursalDuplicada); assertThrows( BusinessServiceException.class, - () -> - sucursalService.validarReglasDeNegocio(TipoDeOperacion.ALTA, sucursal)); + () -> sucursalService.validarReglasDeNegocio(TipoDeOperacion.ALTA, sucursal)); assertThrows( BusinessServiceException.class, - () -> - sucursalService.validarReglasDeNegocio(TipoDeOperacion.ACTUALIZACION, sucursal)); + () -> sucursalService.validarReglasDeNegocio(TipoDeOperacion.ACTUALIZACION, sucursal)); verify(messageSource, times(2)) .getMessage( eq("mensaje_sucursal_duplicado_nombre"), @@ -203,8 +201,7 @@ void shouldNotValidarReglasDeNegocio() { sucursal.setUbicacion(ubicacion); assertThrows( BusinessServiceException.class, - () -> - sucursalService.validarReglasDeNegocio(TipoDeOperacion.ALTA , sucursal)); + () -> sucursalService.validarReglasDeNegocio(TipoDeOperacion.ALTA , sucursal)); verify(messageSource) .getMessage( eq("mensaje_ubicacion_sin_localidad"), @@ -214,8 +211,7 @@ void shouldNotValidarReglasDeNegocio() { sucursal.setUbicacion(ubicacion); assertThrows( BusinessServiceException.class, - () -> - sucursalService.validarReglasDeNegocio(TipoDeOperacion.ALTA , sucursal)); + () -> sucursalService.validarReglasDeNegocio(TipoDeOperacion.ALTA , sucursal)); verify(messageSource) .getMessage( eq("mensaje_sucursal_sin_configuracion"), diff --git a/src/test/java/sic/service/TransportistaServiceImplTest.java b/src/test/java/org/opencommercial/service/TransportistaServiceImplTest.java similarity index 84% rename from src/test/java/sic/service/TransportistaServiceImplTest.java rename to src/test/java/org/opencommercial/service/TransportistaServiceImplTest.java index 9e90c53f1..9c248d278 100644 --- a/src/test/java/sic/service/TransportistaServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/TransportistaServiceImplTest.java @@ -1,18 +1,18 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Localidad; +import org.opencommercial.model.Transportista; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.repository.TransportistaRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.Localidad; -import sic.modelo.Transportista; -import sic.modelo.Ubicacion; -import sic.repository.TransportistaRepository; -import sic.util.CustomValidator; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.*; @@ -20,7 +20,7 @@ @ExtendWith(SpringExtension.class) @ContextConfiguration( classes = {TransportistaServiceImpl.class, CustomValidator.class, MessageSource.class}) -public class TransportistaServiceImplTest { +class TransportistaServiceImplTest { @MockBean UbicacionServiceImpl ubicacionService; @MockBean TransportistaRepository transportistaRepository; diff --git a/src/test/java/sic/service/TraspasoServiceImplTest.java b/src/test/java/org/opencommercial/service/TraspasoServiceImplTest.java similarity index 95% rename from src/test/java/sic/service/TraspasoServiceImplTest.java rename to src/test/java/org/opencommercial/service/TraspasoServiceImplTest.java index 08a51483e..6195df789 100644 --- a/src/test/java/sic/service/TraspasoServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/TraspasoServiceImplTest.java @@ -1,8 +1,20 @@ -package sic.service; +package org.opencommercial.service; import jakarta.persistence.EntityNotFoundException; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.exception.ServiceException; +import org.opencommercial.model.*; +import org.opencommercial.model.criteria.BusquedaTraspasoCriteria; +import org.opencommercial.model.dto.NuevoTraspasoDTO; +import org.opencommercial.model.dto.NuevoTraspasoDePedidoDTO; +import org.opencommercial.model.dto.ProductoFaltanteDTO; +import org.opencommercial.model.embeddable.CantidadProductoEmbeddable; +import org.opencommercial.repository.RenglonTraspasoRepository; +import org.opencommercial.repository.TraspasoRepository; +import org.opencommercial.util.CustomValidator; +import org.opencommercial.util.JasperReportsHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; @@ -10,18 +22,6 @@ import org.springframework.data.domain.Pageable; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.exception.ServiceException; -import sic.modelo.*; -import sic.modelo.criteria.BusquedaTraspasoCriteria; -import sic.modelo.dto.NuevoTraspasoDTO; -import sic.modelo.dto.NuevoTraspasoDePedidoDTO; -import sic.modelo.dto.ProductoFaltanteDTO; -import sic.modelo.embeddable.CantidadProductoEmbeddable; -import sic.repository.RenglonTraspasoRepository; -import sic.repository.TraspasoRepository; -import sic.util.CustomValidator; -import sic.util.JasperReportsHandler; import java.math.BigDecimal; import java.time.LocalDateTime; @@ -202,17 +202,16 @@ void shouldGuardarTraspasosPorPedido() { when(productoService.getProductoNoEliminadoPorId(2L)).thenReturn(producto2); when(productoService.getProductoNoEliminadoPorId(3L)).thenReturn(producto3); when(productoService.getProductoNoEliminadoPorId(4L)).thenReturn(producto4); - List nuevosTraspasos = - traspasoService.construirNuevosTraspasosPorPedido(pedido); + List nuevosTraspasos = traspasoService.construirNuevosTraspasosPorPedido(pedido); assertEquals(2, nuevosTraspasos.size()); Set idsEsperados = new HashSet<>(); idsEsperados.add(1L); idsEsperados.add(3L); idsEsperados.add(4L); - assertEquals(idsEsperados, nuevosTraspasos.get(0).getIdProductoConCantidad().keySet()); - assertEquals(new BigDecimal("90"), nuevosTraspasos.get(0).getIdProductoConCantidad().get(1L)); - assertEquals(new BigDecimal("20"), nuevosTraspasos.get(0).getIdProductoConCantidad().get(3L)); - assertEquals(new BigDecimal("50"), nuevosTraspasos.get(0).getIdProductoConCantidad().get(4L)); + assertEquals(idsEsperados, nuevosTraspasos.getFirst().getIdProductoConCantidad().keySet()); + assertEquals(new BigDecimal("90"), nuevosTraspasos.getFirst().getIdProductoConCantidad().get(1L)); + assertEquals(new BigDecimal("20"), nuevosTraspasos.getFirst().getIdProductoConCantidad().get(3L)); + assertEquals(new BigDecimal("50"), nuevosTraspasos.getFirst().getIdProductoConCantidad().get(4L)); idsEsperados.clear(); idsEsperados.add(4L); assertEquals(idsEsperados, nuevosTraspasos.get(1).getIdProductoConCantidad().keySet()); @@ -543,8 +542,7 @@ void shouldGetReporteTraspasos() { sucursal.setLogo("errorLogo"); when(sucursalService.getSucursalPredeterminada()).thenReturn(sucursal); assertThrows(ServiceException.class, () -> traspasoService.getReporteTraspaso(criteria)); - verify(messageSource) - .getMessage(eq("mensaje_sucursal_404_logo"), any(), any()); + verify(messageSource).getMessage(eq("mensaje_sucursal_404_logo"), any(), any()); sucursal.setLogo(null); assertNotNull(traspasoService.getReporteTraspaso(criteria)); } diff --git a/src/test/java/sic/service/UbicacionServiceImplTest.java b/src/test/java/org/opencommercial/service/UbicacionServiceImplTest.java similarity index 76% rename from src/test/java/sic/service/UbicacionServiceImplTest.java rename to src/test/java/org/opencommercial/service/UbicacionServiceImplTest.java index e6d97abab..f3d3bfd12 100644 --- a/src/test/java/sic/service/UbicacionServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/UbicacionServiceImplTest.java @@ -1,25 +1,25 @@ -package sic.service; +package org.opencommercial.service; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.exception.BusinessServiceException; +import org.opencommercial.model.Localidad; +import org.opencommercial.model.Provincia; +import org.opencommercial.model.Ubicacion; +import org.opencommercial.model.dto.LocalidadesParaActualizarDTO; +import org.opencommercial.repository.LocalidadRepository; +import org.opencommercial.repository.ProvinciaRepository; +import org.opencommercial.repository.UbicacionRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.exception.BusinessServiceException; -import sic.modelo.Localidad; -import sic.modelo.Provincia; -import sic.modelo.Ubicacion; -import sic.modelo.dto.LocalidadesParaActualizarDTO; -import sic.repository.LocalidadRepository; -import sic.repository.ProvinciaRepository; -import sic.repository.UbicacionRepository; -import sic.util.CustomValidator; import java.math.BigDecimal; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.*; @@ -43,18 +43,16 @@ void shouldGuardarUbicacion() { ubicacion.setLatitud(Double.valueOf("80")); ubicacion.setLongitud(Double.valueOf("120")); when(UbicacionRepository.save(ubicacion)).thenReturn(ubicacion); - assertEquals(ubicacion, ubicacionService.guardar(ubicacion)); + Assertions.assertEquals(ubicacion, ubicacionService.guardar(ubicacion)); } @Test void shouldActualizarLocalidad() { Localidad localidad = new Localidad(); - assertThrows( - BusinessServiceException.class, () -> ubicacionService.actualizarLocalidad(localidad)); + assertThrows(BusinessServiceException.class, () -> ubicacionService.actualizarLocalidad(localidad)); verify(messageSource).getMessage(eq("mensaje_localidad_vacio_nombre"), any(), any()); localidad.setNombre("nombre localidad"); - assertThrows( - BusinessServiceException.class, () -> ubicacionService.actualizarLocalidad(localidad)); + assertThrows(BusinessServiceException.class, () -> ubicacionService.actualizarLocalidad(localidad)); verify(messageSource).getMessage(eq("mensaje_localidad_provincia_vacio"), any(), any()); Provincia provincia = new Provincia(); localidad.setProvincia(provincia); @@ -63,11 +61,9 @@ void shouldActualizarLocalidad() { localidadDuplicada.setProvincia(provincia); localidadDuplicada.setNombre("nombre localidad"); localidadDuplicada.setIdLocalidad(1L); - when(localidadRepository.findByNombreAndProvinciaOrderByNombreAsc( - "nombre localidad", provincia)) + when(localidadRepository.findByNombreAndProvinciaOrderByNombreAsc("nombre localidad", provincia)) .thenReturn(localidadDuplicada); - assertThrows( - BusinessServiceException.class, () -> ubicacionService.actualizarLocalidad(localidad)); + assertThrows(BusinessServiceException.class, () -> ubicacionService.actualizarLocalidad(localidad)); verify(messageSource).getMessage(eq("mensaje_localidad_duplicado_nombre"), any(), any()); } diff --git a/src/test/java/sic/service/UsuarioServiceImplTest.java b/src/test/java/org/opencommercial/service/UsuarioServiceImplTest.java similarity index 90% rename from src/test/java/sic/service/UsuarioServiceImplTest.java rename to src/test/java/org/opencommercial/service/UsuarioServiceImplTest.java index eeb767714..15f89db55 100644 --- a/src/test/java/sic/service/UsuarioServiceImplTest.java +++ b/src/test/java/org/opencommercial/service/UsuarioServiceImplTest.java @@ -1,15 +1,15 @@ -package sic.service; +package org.opencommercial.service; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.opencommercial.model.Usuario; +import org.opencommercial.repository.UsuarioRepository; +import org.opencommercial.util.CustomValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.MessageSource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.modelo.Usuario; -import sic.repository.UsuarioRepository; -import sic.util.CustomValidator; import java.time.LocalDateTime; import java.util.Optional; diff --git a/src/test/java/sic/utils/EncryptUtilsTest.java b/src/test/java/org/opencommercial/util/EncryptUtilsTest.java similarity index 95% rename from src/test/java/sic/utils/EncryptUtilsTest.java rename to src/test/java/org/opencommercial/util/EncryptUtilsTest.java index 45c250573..9bc915997 100644 --- a/src/test/java/sic/utils/EncryptUtilsTest.java +++ b/src/test/java/org/opencommercial/util/EncryptUtilsTest.java @@ -1,4 +1,4 @@ -package sic.utils; +package org.opencommercial.util; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -6,8 +6,9 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; -import sic.util.EncryptUtils; + import java.security.GeneralSecurityException; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals;