| package com.fzzy.async.fzzy61.repository; | 
|   | 
| import com.fzzy.async.fzzy61.entity.Fz61InoutRecord; | 
| import org.springframework.data.jpa.repository.JpaRepository; | 
| import org.springframework.data.jpa.repository.Query; | 
| import org.springframework.data.repository.query.Param; | 
|   | 
| import java.util.Date; | 
| import java.util.List; | 
|   | 
| /** | 
|  * 粮食出入库信息 | 
|  * | 
|  * @author chen | 
|  * @date 2022-09-23 17:10 | 
|  */ | 
| public interface Fzzy61Sync1202Rep extends JpaRepository<Fz61InoutRecord, String> { | 
|   | 
|     /** | 
|      * 根据信息获取出入库信息 | 
|      * | 
|      * @param deptId | 
|      * @param type | 
|      * @param start | 
|      * @param end | 
|      * @return | 
|      */ | 
|     @Query("from Fz61InoutRecord where deptId=:deptId and type=:type and updateTime >=:start and updateTime <=:end order by id ") | 
|     List<Fz61InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("type") String type, @Param("start") Date start, @Param("end") Date end); | 
|   | 
|     /** | 
|      * 根据id获取粮食出入库信息 | 
|      * | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @Query("from Fz61InoutRecord where id=:id order by updateTime ") | 
|     List<Fz61InoutRecord> listInoutRecordById(@Param("id") String id); | 
|   | 
|   | 
|     /** | 
|      * 根据信息获取出入库信息 | 
|      * | 
|      * @param deptId | 
|      * @param start | 
|      * @param end | 
|      * @return | 
|      */ | 
|     @Query("from Fz61InoutRecord where deptId=:deptId and updateTime >=:start and updateTime <:end order by id ") | 
|     List<Fz61InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("start") Date start, @Param("end") Date end); | 
|   | 
|   | 
|     @Query("from Fz61InoutRecord where deptId=:deptId and (type=:type1 or type=:type2) and updateTime >=:start and updateTime <=:end order by id ") | 
|     List<Fz61InoutRecord> listInAndOutRecord(@Param("deptId") String deptId, @Param("type1") String type1, @Param("type2") String type2, @Param("start") Date start, @Param("end") Date end); | 
|   | 
|   | 
| } |