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 7492b21a
authored
Dec 07, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ID1004248): 博西PEA_V1.1-推荐工程师页-地图常规位置:取值“派单首选地点,数据源在工程师的「位置配置」”,部分工程师没有位置信息时,地图上可不标注
1 parent
1ba38560
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
View file @
7492b21
...
...
@@ -363,16 +363,18 @@ public class OrderAssignImpl implements OrderAssign {
.
collect
(
Collectors
.
toSet
());
//均计算距离
List
<
TempEngineer
>
result
=
engineerCodes1
.
stream
()
.
map
(
engineerCode
->
{
List
<
TempEngineer
>
result
=
new
ArrayList
<>();
for
(
String
engineerCode
:
engineerCodes1
)
{
List
<
TLocation
>
tLocations
=
engineerDateLocation
(
engineerCode
);
TLocation
location
=
tLocations
.
stream
().
filter
(
t
->
Objects
.
equals
(
t
.
getLocationType
(),
LocationType
.
QUASI_REALTIME
))
.
findFirst
().
get
();
.
findFirst
().
orElse
(
null
);
if
(
Objects
.
nonNull
(
location
))
{
BigDecimal
orderAndEngineerDistance
=
BigDecimal
.
valueOf
(
Stapial4jUtil
.
getDistance
(
location
.
getLongitude
(),
location
.
getLatitude
(),
orderLongitude
,
orderLatitude
));
return
new
TempEngineer
(
engineerCode
,
orderAndEngineerDistance
,
tLocations
);
}).
collect
(
Collectors
.
toList
());
result
.
add
(
new
TempEngineer
(
engineerCode
,
orderAndEngineerDistance
,
tLocations
));
}
}
// 距离过滤
if
(
Objects
.
nonNull
(
distance
))
{
final
BigDecimal
finalDistance
=
BigDecimal
.
valueOf
(
distance
);
...
...
@@ -439,7 +441,7 @@ public class OrderAssignImpl implements OrderAssign {
quasiRealTimeLocation
.
setLongitude
(
Double
.
parseDouble
(
finishedOrderInfo
.
getX
()));
quasiRealTimeLocation
.
setLatitude
(
Double
.
parseDouble
(
finishedOrderInfo
.
getY
()));
currentOrder
=
finishedOrderInfo
;
}
else
if
(
Objects
.
nonNull
(
generalLocation
)){
}
else
if
(
Objects
.
nonNull
(
generalLocation
))
{
//常规位置, 出发地
resultLocationList
.
add
(
generalLocation
);
//准实时位置
...
...
@@ -448,7 +450,9 @@ public class OrderAssignImpl implements OrderAssign {
quasiRealTimeLocation
.
setLatitude
(
generalLocation
.
getLatitude
());
}
//准实时位置
if
(
Objects
.
nonNull
(
quasiRealTimeLocation
.
getLongitude
())
&&
Objects
.
nonNull
(
quasiRealTimeLocation
.
getLatitude
()))
{
resultLocationList
.
add
(
quasiRealTimeLocation
);
}
//
if
(
Objects
.
nonNull
(
currentOrder
))
{
...
...
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