package com.northglass.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import com.northglass.entity.Horizontal; import com.northglass.entity.ShelfTask; public interface HorizontalDao extends JpaRepository{ @Query("select t from Horizontal t where t.gourp=?1 and t.slicecageRank=?2 ") public Horizontal findbygroup(Long groups,String slicecageRank); @Query("select t from Horizontal t where t.id=?1 ") public Horizontal findById(long id); @Query("select count(t) from Horizontal t where t.gourp=?1 and t.state='使用中' or t.state='出库中' or t.state='进库中'") public int findfall2(Long groups); @Query(nativeQuery=true,value="select count(*) from gmms_horizontal s left join gmms_galss_task gt on gt.processcard_id=s.processcard_id where engineering_id=?1 and s.state='使用中';") public int findfall3(String engineeringid); }