jiazx0107@163.com
2024-01-01 d454e51e06dbf7beb50551588fc58a5810295d7c
src/main/java/com/fzzy/async/fzzy40/repository/Fzzy40Sync1302Rep.java
@@ -1,6 +1,5 @@
package com.fzzy.async.fzzy40.repository;
import com.fzzy.async.fzzy35.entity.Fz35Grain;
import com.fzzy.async.fzzy40.entity.Fz40Grain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
@@ -19,10 +18,23 @@
    /**
     * 根据时间段查询粮情数据
     *
     * @param start
     * @param end
     * @return
     */
    @Query("from Fz40Grain where receiveDate >=:start and receiveDate <:end order by receiveDate ")
    List<Fz40Grain> findByReceiveDate(@Param("start") Date start, @Param("end") Date end);
    /**
     * 根据时间段查询粮情数据
     *
     * @param depotId
     * @param start
     * @param end
     * @return
     */
    @Query("from Fz40Grain where depotId =:depotId and receiveDate >=:start and receiveDate <:end order by receiveDate desc ")
    List<Fz40Grain> findByReceiveDate(@Param("depotId") String depotId, @Param("start") Date start, @Param("end") Date end);
}