PurcInquiryItemInfoDao.java 913 B

123456789101112131415161718192021222324252627
  1. package com.uas.ps.inquiry.dao;
  2. import com.uas.ps.inquiry.model.PurcInquiryItemInfo;
  3. import org.springframework.data.jpa.repository.JpaRepository;
  4. import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
  5. import org.springframework.data.jpa.repository.Query;
  6. import org.springframework.stereotype.Repository;
  7. /**
  8. * 询价明细数据库操作
  9. * <pre>
  10. * 明细带出主表信息,列表查询使用
  11. * </pre>
  12. * Created by hejq on 2018-01-17.
  13. */
  14. @Repository
  15. public interface PurcInquiryItemInfoDao extends JpaSpecificationExecutor<PurcInquiryItemInfo>, JpaRepository<PurcInquiryItemInfo, Long> {
  16. /**
  17. * 查询某年某月的询价明细总数
  18. *
  19. * @param month
  20. * @return
  21. */
  22. @Query(value = "select count(*) from purc$puinquiryitems where year(id_date)=?1 and month(id_date) = ?2", nativeQuery = true)
  23. Long countByMonth(Integer year, Integer month);
  24. }