//package com.yeejoin.amos.patrol.business.feign;
//
//import java.util.List;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.http.HttpEntity;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.MediaType;
//import org.springframework.stereotype.Service;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.client.RestTemplate;
//
//import com.yeejoin.amos.patrol.business.util.CommonResponse;
//import com.yeejoin.amos.patrol.business.util.CommonResponseUtil;
//import com.yeejoin.amos.patrol.core.common.response.PointCheckInfoRespone;
//import com.yeejoin.amos.patrol.core.common.response.PointInfoSyn3DRespone;
//import com.yeejoin.amos.patrol.core.common.response.RouteResponse;
//import com.yeejoin.amos.patrol.core.common.response.TaskInfoRespone;
//
//
//
////三维远程访问
//@Service("remote3DServer")
//public class Remote3DServer {
//	    @Autowired
//	    private RestTemplate restTemplate;
//	
//	    @Value("${Remote3D.fegin.name}")
//	    private String Remote3DFeginName;
//
//
//	    private static String checkStatusPush = "/patrol/check";
//
//	    private static String errorTaskPushTo3D = "/patrol/task";
//
//	    private static String pointInfoPush = "/view3d/synchronous/points";
//
//	    private static String routeInfoPush = "/view3d/synchronous/routes";
//	    
//	   
//	    
//	    public  String geturls(String url){
//	    	return "http://"+Remote3DFeginName+url;
//	    }
//	    public  HttpHeaders getHeader(String toke,String product,String appKey){
//	    	HttpHeaders headers = new HttpHeaders();
//		    headers.setContentType(MediaType.APPLICATION_JSON);
//		    headers.set("Content-Type", "application/json");  
//		    headers.set("token", toke);
//		    headers.set("product",product);
//		    headers.set("appKey", appKey);
//		    return headers;
//	    } 
//	    
//	    
//		public CommonResponse checkStatusPush( String toke,String product,String appKey, List<PointCheckInfoRespone> pointCheckInfo){
//			  try {
//			    HttpEntity httpEntity = new HttpEntity<>(pointCheckInfo, getHeader( toke, product, appKey));
//			    CommonResponse commonResponse1 =  restTemplate.postForObject(geturls(checkStatusPush),httpEntity, CommonResponse.class);
//				return commonResponse1;
//				} catch (Exception e) {
//				e.printStackTrace();	 
//				 return CommonResponseUtil.failure("发送失败");	
//				 
//				}
//		}
//
//	    
//	 
//		public CommonResponse errorTaskPushTo3D( String toke,String product,String appKey, List<TaskInfoRespone> taskInfoRespone){
//			 try {
//				    HttpEntity httpEntity = new HttpEntity<>(taskInfoRespone, getHeader( toke, product, appKey));
//				    CommonResponse commonResponse1 =  restTemplate.postForObject(geturls(errorTaskPushTo3D),httpEntity, CommonResponse.class);
//					return commonResponse1;
//					} catch (Exception e) {
//					e.printStackTrace();	 
//					 return CommonResponseUtil.failure("发送失败");	
//					 
//					}
//		}
//	    
//	    
//	    public CommonResponse pointInfoPush(String toke,String product,String appKey,List<PointInfoSyn3DRespone> pointInfoResponseList){
//	    	 try {
//				    HttpEntity httpEntity = new HttpEntity<>(pointInfoResponseList, getHeader( toke, product, appKey));
//				    CommonResponse commonResponse1 =  restTemplate.postForObject(geturls(pointInfoPush),httpEntity, CommonResponse.class);
//					return commonResponse1;
//					} catch (Exception e) {
//					e.printStackTrace();	 
//					 return CommonResponseUtil.failure("发送失败");	
//					 
//					}
//	    }
//	    
//	    
//	    public CommonResponse routeInfoPush( String toke,String product,String appKey, List<RouteResponse> routeResponseList){
//	    	 try {
//				    HttpEntity httpEntity = new HttpEntity<>(routeResponseList, getHeader( toke, product, appKey));
//				    CommonResponse commonResponse1 =  restTemplate.postForObject(geturls(routeInfoPush),httpEntity, CommonResponse.class);
//					return commonResponse1;
//					} catch (Exception e) {
//					e.printStackTrace();	 
//					 return CommonResponseUtil.failure("发送失败");	
//					 
//					}
//	    }
//	    
//	    
//	    
//	     
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	    
//	
//}
