czt
2024-11-26 58c47f9f7fdd6e6991db9b43607e36d2175c35ad
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
package com.fzzy.api.view.repository;
 
import com.fzzy.api.entity.Api1103;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
 
import java.util.Date;
import java.util.List;
 
 
public interface Api1103Rep extends JpaRepository<Api1103, String> {
    @Transactional
    @Modifying
    @Query("update Api1103 set czbz=:czbz where cfdm =:id ")
    int updateStatus(@Param("id") String id, @Param("czbz") String czbz);
 
    /**
     *
     * @param kqdm
     * @return
     */
    @Query("from Api1103 where kqdm=:kqdm ")
    List<Api1103> findPushData(@Param("kqdm") String kqdm);
 
    /**
     * 根据仓房代码查询
     * @param cfdm
     * @return
     */
    @Query("from Api1103 where cfdm=:cfdm ")
    List<Api1103> findPushDataByCfdm(@Param("cfdm") String cfdm);
 
    /**
     *
     * @param kqdm
     * @return
     */
    @Query("from Api1103 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ")
    List<Api1103> findPushDataTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end);
 
 
 
    /**
     * 根据仓房代码查询
     * @param cfdm
     * @return
     */
    @Query("from Api1103 where cfdm=:cfdm ")
    Api1103 findDataByCfdm(@Param("cfdm") String cfdm);
}