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, JpaSpecificationExecutor { /** * 根据仓库编码获取最后一条数据 * @param depotId * @param end * @return */ @Query("from DepotStore where depotId =:depotId and createDate <:end order by createDate desc") List getDataByDepotId(@Param("depotId") String depotId,@Param("end") Date end); }