廖井涛
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package com.northglass.repository;
 
import java.sql.ResultSet;
import java.util.Date;
import java.util.List;
 
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
 
import com.northglass.entity.LiuChengKaReport;
import com.northglass.entity.RawFile;
 
public interface LiuChengKaReportDao extends JpaRepository<LiuChengKaReport, Long> {
 
    // 获取流程卡报表前一百条
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform limit 0,100")
    public List<LiuChengKaReport> GetLiuChengKaReport2();
 
    // 获取所有流程卡
    @Query("select t from LiuChengKaReport t")
    public List<LiuChengKaReport> GetLiuChengKaReportAll();
 
    // 根据工程号获取流程卡
    @Query("select t from LiuChengKaReport t where t.gongchenghao = ?1")
    public List<LiuChengKaReport> GetLiuChengKaReportByGCH(String gongchenghao);
 
    // 根据时间获取流程卡
    @Query("select t from LiuChengKaReport t where t.startTime >= ?1 and t.startTime <= ?2 ")
    public List<LiuChengKaReport> GetLiuChengKaReportByTime(Date sTime, Date eTime);
    
    @Query("select t from LiuChengKaReport t where t.startTime >= ?1 and t.startTime <= ?2")
    public List<LiuChengKaReport> GetLiuChengKaReportByStrTime(String sTime,String eTime);
 
    @Query("select t from LiuChengKaReport t where t.startTime >= ?1 ")
    public List<LiuChengKaReport> GetLiuChengKaReportByTime2(Date sTime);
 
    @Query("select t from LiuChengKaReport t where t.startTime <= ?1")
    public List<LiuChengKaReport> GetLiuChengKaReportByTime3(Date eTime);
 
    // 根据流程卡或工程号获取流程卡报表
    //根据工程号查询
    @Query("select t from LiuChengKaReport t where t.gongchenghao like ?1")
    public List<LiuChengKaReport> GetLiuChengKaReportByGCNO(String gongchenghao);
    //根据流程卡查询
    @Query( "select t from LiuChengKaReport t where t.liuchengkahao like ?1")
    public List<LiuChengKaReport> GetLiuChengKaReportByLCKNO(String liuchengkahao);
    // 并集
    @Query("select t from LiuChengKaReport t where t.gongchenghao like ?1 and t.liuchengkahao like ?2")
    public List<LiuChengKaReport> GetLiuChengKaReportByNO(String gongchenghao, String liuchengkahao);
    // 交集
    @Query("select t from LiuChengKaReport t where t.gongchenghao like ?1 or t.liuchengkahao like ?2")
    public List<LiuChengKaReport> GetLiuChengKaReportByOrNO(String gongchenghao, String liuchengkahao);
 
 
 
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform where t.startTime >= ?1 and t.startTime <= ?2 and gongchenghao like ?3 and liuchengkahao like ?4")
    public List<LiuChengKaReport> GetLiuChengKaReport(Date sTime, Date eTime, String gongchenghao,
            String liuchengkahao);
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform where t.startTime >= ?1 and t.startTime <= ?2 and gongchenghao like ?3 or liuchengkahao like ?4")
    public List<LiuChengKaReport> GetLiuChengKaReport1(Date sTime, Date eTime, String gongchenghao,
            String liuchengkahao);
    
    
    
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform where t.startTime >= ?1 and gongchenghao like ?2 and liuchengkahao like ?3")
    public List<LiuChengKaReport> GetLiuChengKaReport2(Date sTime,String gongchenghao,String liuchengkahao);
    
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform where t.startTime >= ?1 and gongchenghao like ?2 or liuchengkahao like ?3")
    public List<LiuChengKaReport> GetLiuChengKaReport3(Date sTime,String gongchenghao,String liuchengkahao);
    
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform where t.startTime <= ?1 and gongchenghao like ?2 and liuchengkahao like ?3")
    public List<LiuChengKaReport> GetLiuChengKaReport4(Date eTime, String gongchenghao,String liuchengkahao);
    
    @Query(nativeQuery = true, value = "select * from v_liuchengkareportform where t.startTime <= ?1 and gongchenghao like ?2 or liuchengkahao like ?3")
    public List<LiuChengKaReport> GetLiuChengKaReport5(Date eTime, String gongchenghao,String liuchengkahao);
 
 
}