Commit 73afba1fb47a1c5f2c54427f86ebf45945a19606

Authored by 廖磊
1 parent e367d1c5

月报表查询方法

src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -155,8 +155,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI
155 155 List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm);
156 156  
157 157 //按照时间段统计
158   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm")
159   - List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2);
  158 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  159 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm")
  160 + List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2);
  161 + //月报表
  162 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  163 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 order by s.xlBm")
  164 + List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2);
160 165  
161 166 @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY clZbh,fcsj")
162 167 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm);
... ...