czt
2025-09-16 db74943b46ffb5245477894f394c368cc04f93e7
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.fzzy.async.fzzy40.repository;
 
import com.fzzy.async.fzzy40.entity.Fz40InoutRecord;
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 Fzzy40Sync1202Rep extends JpaRepository<Fz40InoutRecord, String> {
 
    /**
     * 根据信息获取出入库信息
     *
     * @param deptId
     * @param type
     * @param start
     * @param end
     * @return
     */
    @Query("from Fz40InoutRecord where deptId=:deptId and type=:type and updateTime >=:start and updateTime <=:end order by id ")
    List<Fz40InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("type") String type, @Param("start") Date start, @Param("end") Date end);
 
    /**
     * 根据id获取粮食出入库信息
     *
     * @param id
     * @return
     */
    @Query("from Fz40InoutRecord where id=:id order by updateTime ")
    List<Fz40InoutRecord> listInoutRecordById(@Param("id") String id);
 
 
    /**
     * 根据信息获取出入库信息
     *
     * @param deptId
     * @param start
     * @param end
     * @return
     */
    @Query("from Fz40InoutRecord where deptId=:deptId and updateTime >=:start and updateTime <:end order by id ")
    List<Fz40InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("start") Date start, @Param("end") Date end);
 
 
    @Query("from Fz40InoutRecord where deptId=:deptId and (type=:type1 or type=:type2) and updateTime >=:start and updateTime <=:end order by id ")
    List<Fz40InoutRecord> listInAndOutRecord(@Param("deptId") String deptId, @Param("type1") String type1, @Param("type2") String type2, @Param("start") Date start, @Param("end") Date end);
 
 
}