| 
					
				 | 
			
			
				@@ -10,6 +10,7 @@ import com.sysu.admin.controller.crop.CropPoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.controller.crop.images.CropImage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.controller.crop.images.CropImageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.controller.crop.images.ImageType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.sysu.admin.controller.geo.land.LandTaskStatus; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.support.base.BaseComponent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.support.shiro.ShiroService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.sysu.admin.support.system.config.SConfigService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -19,6 +20,7 @@ import com.xiesx.fastboot.base.result.R; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xiesx.fastboot.core.token.handle.CurrentToken; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xiesx.fastboot.utils.CopyUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.commons.codec.binary.Base64; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.apache.commons.lang3.ObjectUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.opengis.referencing.FactoryException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.opengis.referencing.operation.TransformException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.BeanUtils; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -40,19 +42,24 @@ public class ApiCropController extends BaseComponent { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     SConfigService mSConfigService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ShiroService mShiroService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CropImageService cropImageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    static Long testId = 102L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @RequestMapping("/point_list") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public BaseResult pointList(@RequestBody String data) throws FactoryException, TransformException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public BaseResult pointList(@RequestBody String data, @RequestHeader(value = "token",required = false) String token) throws FactoryException, TransformException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CropVo vo = JSON.parseObject(data, CropVo.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(vo.getMeter() > 5000){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             vo.setMeter(5000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<CropPoint> cropPoints = cityLandService.findByBuffer(vo.getPoint(), vo.getMeter()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(ObjectUtils.isNotEmpty(token)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Long userId = Long.valueOf(CurrentToken.getCurrentToken(token).getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for(int i=cropPoints.size() - 1;i > -1;i--){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(cropPoints.get(i).getStatus().intValue() == LandTaskStatus.receive.ordinal() && !cropPoints.get(i).getReceiver().equals(userId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    cropPoints.remove(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return R.succ(cropPoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |