| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.sysu.admin.controller.aland; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.mchange.v2.sql.SqlUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.controller.city.CityRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.controller.city.DistrictRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.controller.city.DistrictService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -7,13 +8,16 @@ import com.sysu.admin.controller.city.TownService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.site.CommonVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.support.base.BaseService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.support.cfg.CacheCfg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.sysu.admin.utils.GenericsUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.utils.MySimpleDateFormat; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.sysu.admin.utils.SqlUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.utils.TextUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xiesx.fastboot.base.pagination.PaginationHelper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xiesx.fastboot.base.pagination.PaginationResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xiesx.fastboot.base.pagination.PaginationVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xiesx.fastboot.core.jpa.JpaPlusRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.ArrayUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.apache.commons.lang3.ObjectUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.cache.annotation.Cacheable; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -323,6 +327,7 @@ public class LandService extends BaseService<Land,Long> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public StringBuffer appendWhere(CommonVo commonVo, String wkt){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StringBuffer sql = new StringBuffer(100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(wkt != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sql.append(" and St_within(geom,st_geomfromtext('"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -331,12 +336,15 @@ public class LandService extends BaseService<Land,Long> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(StringUtils.isNotBlank(commonVo.getCrop_type())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sql.append(" and crop_type = '").append(commonVo.getCrop_type()).append("'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(commonVo.getParcel_type()!= null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(commonVo.getParcel_type() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sql.append(" and parcel_type = ").append(commonVo.getParcel_type()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sql.append(SqlUtil.ArrayToInSql(" and ", "parcel_type", commonVo.getParcel_types())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sql.append(SqlUtil.ArrayToInSql(" and ", "crop_type", commonVo.getCrop_types())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.append(intervalWhere("crop_sure", commonVo.getSure())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.append(intervalWhere("dan_chan", commonVo.getDanchan())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sql.append(intervalWhere("toc", commonVo.getPh())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.append(intervalWhere("ph", commonVo.getPh())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.append(intervalWhere("c", commonVo.getC())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.append(intervalWhere("_2n", commonVo.get_2n())); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -356,6 +364,7 @@ public class LandService extends BaseService<Land,Long> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return res; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public Land findByPoint(Double[] point){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return landRepository.findByPoint("Point("+point[0]+" "+point[1]+")"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |