| 
														
															@@ -1,12 +1,20 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 package com.sysu.admin.controller.lz.tree; 
														 | 
														
														 | 
														
															 package com.sysu.admin.controller.lz.tree; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.querydsl.core.types.Predicate; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.querydsl.core.types.Projections; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.querydsl.core.types.QBean; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.querydsl.jpa.impl.JPAQuery; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.sysu.admin.controller.lz.area.LzArea; 
														 | 
														
														 | 
														
															 import com.sysu.admin.controller.lz.area.LzArea; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.sysu.admin.controller.lz.area.LzAreaRepository; 
														 | 
														
														 | 
														
															 import com.sysu.admin.controller.lz.area.LzAreaRepository; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.sysu.admin.site.CommonVo; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.sysu.admin.support.base.BaseService; 
														 | 
														
														 | 
														
															 import com.sysu.admin.support.base.BaseService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.sysu.admin.support.system.user.User; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.xiesx.fastboot.core.jpa.JpaPlusRepository; 
														 | 
														
														 | 
														
															 import com.xiesx.fastboot.core.jpa.JpaPlusRepository; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import org.springframework.beans.factory.annotation.Autowired; 
														 | 
														
														 | 
														
															 import org.springframework.beans.factory.annotation.Autowired; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import org.springframework.stereotype.Service; 
														 | 
														
														 | 
														
															 import org.springframework.stereotype.Service; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import javax.persistence.Query; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import javax.persistence.criteria.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import java.util.List; 
														 | 
														
														 | 
														
															 import java.util.List; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 @Service 
														 | 
														
														 | 
														
															 @Service 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -15,8 +23,19 @@ public class LzTreeService extends BaseService<LzTree, Integer> { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Autowired 
														 | 
														
														 | 
														
															     @Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     LzTreeRepository lzTreeRepository; 
														 | 
														
														 | 
														
															     LzTreeRepository lzTreeRepository; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    public List<LzTree> findAllByShow(){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return lzTreeRepository.findAllByShow(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public List<LzTree> findAll(CommonVo vo){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        String filter = " where 1=1 "; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(vo != null){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(vo.getClazzId() != null){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                filter += " and c.id = " + vo.getClazzId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(vo.getPeriodId() != null){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                filter += " and b.lzPeriod.id = " + vo.getPeriodId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        String sql = "SELECT a, b, c FROM LzTree a JOIN FETCH a.lzEveryday b JOIN FETCH a.clazz c"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Query query = mEntityManager.createQuery(sql + filter); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return query.getResultList(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public LzTree findByCode(String code){ 
														 | 
														
														 | 
														
															     public LzTree findByCode(String code){ 
														 |