czt
2025-05-30 9bc5f4d58da606c6a465e152d05a1c31b0611f74
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
package com.fzzy.igds.sys.repository;
 
import com.fzzy.igds.dzhwk.domain.DepotStore;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
 
import java.util.Date;
import java.util.List;
 
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 10:59
 */
@Service
public interface DepotStoreRepository extends JpaRepository<DepotStore, String>, JpaSpecificationExecutor<DepotStore> {
 
    /**
     * 根据仓库编码获取最后一条数据
     * @param depotId
     * @param end
     * @return
     */
    @Query("from DepotStore where depotId =:depotId and createDate <:end order by createDate desc")
    List<DepotStore> getDataByDepotId(@Param("depotId") String depotId,@Param("end") Date end);
 
}