| | |
| | | import com.supersavedriving.driver.modular.system.util.mongodb.model.Location; |
| | | import com.supersavedriving.driver.modular.system.warpper.AddOrderWarpper; |
| | | import com.supersavedriving.driver.modular.system.warpper.HallOrderList; |
| | | import com.supersavedriving.driver.modular.system.warpper.OrderInfoWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.geo.Circle; |
| | | import org.springframework.data.geo.Distance; |
| | |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取订单详情 |
| | | * @param orderId |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public OrderInfoWarpper queryOrderInfo(Integer uid, Long orderId) throws Exception { |
| | | OrderInfoWarpper orderInfoWarpper = this.baseMapper.queryOrderInfo(orderId); |
| | | String value = redisUtil.getValue("DRIVER" + uid); |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(orderInfoWarpper.getStartLng() + "," + orderInfoWarpper.getStartLat(), value); |
| | | Double wgs84 = distance.get("WGS84"); |
| | | orderInfoWarpper.setCurrentDistance(wgs84); |
| | | return orderInfoWarpper; |
| | | } |
| | | } |