Interface VentaLineaRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<VentaLinea,Long>, org.springframework.data.jpa.repository.JpaRepository<VentaLinea,Long>, org.springframework.data.repository.ListCrudRepository<VentaLinea,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<VentaLinea,Long>, org.springframework.data.repository.PagingAndSortingRepository<VentaLinea,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<VentaLinea>, org.springframework.data.repository.Repository<VentaLinea,Long>

public interface VentaLineaRepository extends org.springframework.data.jpa.repository.JpaRepository<VentaLinea,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
    Devuelve todas las líneas pertenecientes a una venta concreta.
    Genera el reporte de ventas agregadas por día y por producto.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByVentaId

      List<VentaLinea> findByVentaId(Long ventaId)
      Devuelve todas las líneas pertenecientes a una venta concreta.
    • getReporteVentasDiarias

      @Query("SELECT new com.deusto.coffeestack.dto.ReporteVentasDTO(cast(v.fechaHora as date), i.name, SUM(vl.cantidadUnidades)) FROM VentaLinea vl JOIN vl.venta v JOIN vl.item i GROUP BY cast(v.fechaHora as date), i.name ORDER BY cast(v.fechaHora as date) DESC, i.name ASC") List<ReporteVentasDTO> getReporteVentasDiarias()
      Genera el reporte de ventas agregadas por día y por producto.