廖井涛
2025-06-11 42154214c5698326710edf336b3148830b646bb2
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
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<Horizontal, Long>{
 
    
    @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);
}