严智鑫
2025-05-27 80f64d025e25cdba8a33a1badf2109c80d0bafe7
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
package com.northglass.repository;
 
import java.util.List;
import java.util.Map;
 
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
 
import com.northglass.entity.GalssTaskDetails;
import com.northglass.entity.PatternTask;
import com.northglass.entity.PatternTaskBuffer;
 
public interface PatternTaskBufferDao extends JpaRepository<PatternTaskBuffer, Long>{
 
    /*@Query("select t from RawPackage t where t.fileName = '052-123' and t.fileUrl = '1' and t.state = '已下发' and t.operator = '1' and t.createTime = '2021-09-22 13:22:18' and t.receiveTime = '2021-09-22 13:22:21' ")
    public List<RawPackage> findMachineDispose();*/
    @Query("select t from PatternTaskBuffer t where t.engineeringId = ?1 ")
    public List<PatternTaskBuffer> findgetEnd(String fileName);
    
    
    @Query("select count(t) from PatternTaskBuffer t where t.engineeringId = ?1 ")
    public int findbypattertaskcount(String fileName);
    
    
    @Query(nativeQuery=true,value="select raw_width,raw_height,raw_thickness,color,count(*) as shuliang,rank from  gmms_pattern_task_buffer t where t.engineering_id =?1 group by raw_width,raw_height,raw_thickness,color")
    public List<Object[]> findIdGroupBy(String fileName);
}