Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e239a3eb
authored
Nov 20, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(对外接口): 两点间里程和耗时查询经纬度相反
1 parent
3cff7399
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/PeaApiController.java
project-order/src/main/java/com/dituhui/pea/order/controller/PeaApiController.java
View file @
e239a3e
...
...
@@ -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
.
getL
ongitude
(),
origin
.
getLat
itude
()));
distanceParam
.
setDestination
(
new
Location
(
destination
.
getL
ongitude
(),
destination
.
getLat
itude
()));
distanceParam
.
setOrigin
(
new
Location
(
origin
.
getL
atitude
(),
origin
.
getLong
itude
()));
distanceParam
.
setDestination
(
new
Location
(
destination
.
getL
atitude
(),
destination
.
getLong
itude
()));
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
());
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment