| package com.fzzy.async.fzzy30.repository; | 
|   | 
| import com.fzzy.async.fzzy30.entity.InoutRecord; | 
| 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 FzzySync1202Rep extends JpaRepository<InoutRecord, String> { | 
|   | 
|     /** | 
|      * 根据信息获取出入库信息 | 
|      * @param deptId | 
|      * @param type | 
|      * @param start | 
|      * @param end | 
|      * @return | 
|      */ | 
|     @Query("from InoutRecord where deptId=:deptId and type=:type and completeTime >=:start and completeTime <:end order by completeTime ") | 
|     List<InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("type") String type, @Param("start") Date start, @Param("end") Date end); | 
|   | 
|     /** | 
|      * 根据id获取粮食出入库信息 | 
|      * @param id | 
|      * @return | 
|      */ | 
|     @Query("from InoutRecord where id=:id order by completeTime ") | 
|     List<InoutRecord> listInoutRecordById(@Param("id") String id); | 
|   | 
| } |