| 
					
				 | 
			
			
				@@ -40,6 +40,38 @@ public class StationServiceImpl implements StationService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return stationInfoMapper.getStationListToAliPay(stationInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //支付宝小程序根据地理位置查询油站列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public StationInfoVo getStationListByGeoSituationToAliPay(StationInfo stationInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //根据传过来的坐标查询数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<StationInfoResponse> distanceAndResidueSeat = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 数据库查询门店数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<StationInfo> stationInfolist = stationInfoMapper.getStationListToAliPay(stationInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 入参坐标拼接 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String coordinate = stationInfo.getStationLatitude()+","+stationInfo.getStationLongitude(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(StringUtils.isNotBlank(stationInfo.getStationLatitude()) && StringUtils.isNotBlank(stationInfo.getStationLongitude())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //根据地址坐标计算距离 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<StationInfoResponse> stationInfos = computeDistance(coordinate, stationInfolist); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //根据距离排序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            distanceAndResidueSeat = getDistanceAndResidueSeat(stationInfos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        StationInfoVo stationInfoVo=new StationInfoVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(stationInfo.getPageSize()==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            stationInfoVo.setPageSize(10); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            stationInfoVo.setPageSize(stationInfo.getPageSize()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stationInfoVo.setPageNum(stationInfo.getPageNum()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(distanceAndResidueSeat!=null&&distanceAndResidueSeat.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if( distanceAndResidueSeat.size()<=stationInfoVo.getPageNum()*stationInfoVo.getPageSize() || distanceAndResidueSeat.size()>stationInfoVo.getPageNum()*stationInfoVo.getPageSize()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<StationInfoResponse> ss= PageUtil.splitList(distanceAndResidueSeat,stationInfo.getPageSize(),stationInfo.getPageNum()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                stationInfoVo.setStationInfoResponseList(ss); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                stationInfoVo.setTotal(ss.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return stationInfoVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //更新LNG平台加气油站余额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void updateStationBalance(StationInfo stationInfo) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -116,8 +148,12 @@ public class StationServiceImpl implements StationService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(StringUtils.isNotBlank(stationRequest.getAppId())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             example.or().andAppIdEqualTo(stationRequest.getAppId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //example.or().andJiBieEqualTo(stationRequest.getJiBie()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //example.or().andIsAliPayFlagEqualTo(stationRequest.getIsAliPayFlag()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        if(StringUtils.isNotBlank(stationRequest.getJiBie())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            example.or().andJiBieEqualTo(stationRequest.getJiBie()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        if(StringUtils.isNotBlank(stationRequest.getIsAliPayFlag())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            example.or().andIsAliPayFlagEqualTo(stationRequest.getIsAliPayFlag()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 数据库查询门店数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<StationInfo> stationInfolist = stationInfoMapper.selectByExample(example); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 入参坐标拼接 
			 |