Commit e239a3eb by 刘鑫

fix(对外接口): 两点间里程和耗时查询经纬度相反

1 parent 3cff7399
......@@ -5,6 +5,7 @@ import com.dituhui.pea.common.Result;
import com.dituhui.pea.dispatch.IPath;
import com.dituhui.pea.enums.StatusCodeEnum;
import com.dituhui.pea.order.common.jackson.DateUtil;
import com.dituhui.pea.order.common.jackson.JsonUtil;
import com.dituhui.pea.order.dao.TableCodeCheckDao;
import com.dituhui.pea.order.dto.param.BaseDistance;
import com.dituhui.pea.order.dto.param.BaseDistanceParam;
......@@ -31,6 +32,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
......@@ -58,6 +60,7 @@ import java.util.stream.Collectors;
@RequestMapping("/pea-order/pea")
@RequiredArgsConstructor
@Validated
@Slf4j
public class PeaApiController {
private final EngineerCalendarService engineerCalendarService;
......@@ -343,10 +346,11 @@ public class PeaApiController {
DistanceParam distanceParam = new DistanceParam();
distanceParam.setOrigin(new Location(origin.getLongitude(), origin.getLatitude()));
distanceParam.setDestination(new Location(destination.getLongitude(), destination.getLatitude()));
distanceParam.setOrigin(new Location(origin.getLatitude(),origin.getLongitude()));
distanceParam.setDestination(new Location(destination.getLatitude(),destination.getLongitude()));
distanceParam.setVehicle(param.getVehicle());
DistanceDTO locationDistance = path.getLocationDistance(distanceParam);
log.info("[baseDistance], 两点间距离返回结果:{}", JsonUtil.toJson(locationDistance));
result.setDistance((int) locationDistance.getDis());
result.setDuration((long) locationDistance.getTime());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!