| | |
| | | String toLonLat = orderPositionWarpper1.getLon() + "," + orderPositionWarpper1.getLat(); |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(fromLonLat, toLonLat); |
| | | Double wgs84 = distance.get("WGS84"); |
| | | if(wgs84 >= 50 && wgs84 <= 165){//5秒165米 |
| | | if(wgs84 >= 50){//5秒165米 |
| | | OrderPositionWarpper orderPositionWarpper = new OrderPositionWarpper(); |
| | | BeanUtils.copyProperties(driverPositionWarpper, orderPositionWarpper); |
| | | orderPositionWarpper.setInsertTime(new Date()); |
| | |
| | | Order order = orderService.selectById(driverPositionWarpper.getOrderId()); |
| | | Double wgs84 = distance.get("WGS84"); |
| | | Integer num = map.get(order.getId().toString()); |
| | | if(50 < wgs84 && wgs84 <= 165){//5秒165米 |
| | | if(50 < wgs84){//5秒165米 |
| | | order.setActualMileage(order.getActualMileage() + wgs84.intValue()); |
| | | orderService.updateById(order); |
| | | map.put(order.getId().toString(), 0); |