CZT
2023-09-07 7add7aa4ca3105fcc742d5f42bdc11a3ff322a03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.fzzy.async.fzzy35.repository;
 
import com.fzzy.async.fzzy35.entity.Fz35InoutRecord;
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 Fzzy35Sync1202Rep extends JpaRepository<Fz35InoutRecord, String> {
 
    /**
     * 根据信息获取出入库信息
     * @param deptId
     * @param type
     * @param start
     * @param end
     * @return
     */
    @Query("from Fz35InoutRecord where deptId=:deptId and type=:type and completeTime >=:start and completeTime <:end order by completeTime ")
    List<Fz35InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("type") String type, @Param("start") Date start, @Param("end") Date end);
 
    /**
     * 根据id获取粮食出入库信息
     * @param id
     * @return
     */
    @Query("from Fz35InoutRecord where id=:id order by completeTime ")
    List<Fz35InoutRecord> listInoutRecordById(@Param("id") String id);
 
}