2016-11-02 3 views
0

に句の間で使用する誰もがリクエストに問題が何であるかを伝えることができます:どのようHQL

@Query("SELECT new com.app.gsc.entities.ListeBI(lm.listeDeCriteres.designation,count(*) as totalNumber,lm.ficheDeMission.dateEtHeurDeDepart) from ListeDeControleDetailsMission lm where lm.boolDepart=false AND Year(lm.ficheDeMission.dateEtHeurDeDepart)=:year AND Month(lm.ficheDeMission.dateEtHeurDeDepart) >= Month(lm.ficheDeMission.dateEtHeurDeDepart)=:FromMonth AND Month(lm.ficheDeMission.dateEtHeurDeDepart) <= Month(lm.ficheDeMission.dateEtHeurDeDepart)=:ToMonth GROUP BY lm.listeDeCriteres.designation") 
List<ListeBI> getIncidentDepartByFromToMonth(@Param("FromMonth") int FromMonth, @Param("ToMonth") int ToMonth, 
     @Param("year") int year); 

ERRORメッセージ:Month(lm.ficheDeMission.dateEtHeurDeDepart) >= Month(lm.ficheDeMission.dateEtHeurDeDepart)=:FromMonth

Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected AST node: >= near line 1, column 322 [SELECT new com.app.gsc.entities.ListeBI(lm.listeDeCriteres.designation,count(*) as totalNumber,lm.ficheDeMission.dateEtHeurDeDepart) from com.app.gsc.entities.ListeDeControleDetailsMission lm where lm.boolDepart=false AND Year(lm.ficheDeMission.dateEtHeurDeDepart)=:year AND Month(lm.ficheDeMission.dateEtHeurDeDepart) >= Month(lm.ficheDeMission.dateEtHeurDeDepart)=:FromMonth AND Month(lm.ficheDeMission.dateEtHeurDeDepart) <= Month(lm.ficheDeMission.dateEtHeurDeDepart)=:ToMonth GROUP BY lm.listeDeCriteres.designation] 

答えて

0

それはこの部分である必要があります。あなたの3つの比較に問題があると私は言います。