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 f26dde47
authored
Jul 05, 2023
by
张晓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变量改名称
1 parent
e2b36da3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/DispatchServiceImpl.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/service/impl/DispatchServiceImpl.java
View file @
f26dde4
...
...
@@ -130,22 +130,22 @@ public class DispatchServiceImpl implements DispatchService {
}
// 生成订单和技术员的偏好距离Map 技术员-订单-距离
Map
<
String
,
Map
<
String
,
Long
>>
customerTecnician
DistanceMap
=
new
HashMap
<
String
,
Map
<
String
,
Long
>>();
Map
<
String
,
Map
<
String
,
Long
>>
tecnicianCustomer
DistanceMap
=
new
HashMap
<
String
,
Map
<
String
,
Long
>>();
customerCodeLocationMap
.
forEach
((
customerCode
,
value
)
->
{
technicianCodeLocationMap
.
forEach
((
technicianCode
,
value2
)
->
{
String
[]
temps
=
RegExUtils
.
removeAll
(
value
,
"\""
).
split
(
","
);
String
[]
temps2
=
RegExUtils
.
removeAll
(
value2
,
"\""
).
split
(
","
);
long
distance
=
(
long
)
getDistance
(
Double
.
parseDouble
(
temps
[
1
]),
Double
.
parseDouble
(
temps
[
0
]),
Double
.
parseDouble
(
temps2
[
1
]),
Double
.
parseDouble
(
temps2
[
0
]));
Map
<
String
,
Long
>
customerMaps
=
customerTecnician
DistanceMap
.
get
(
technicianCode
);
Map
<
String
,
Long
>
customerMaps
=
tecnicianCustomer
DistanceMap
.
get
(
technicianCode
);
if
(
null
==
customerMaps
)
{
customerMaps
=
new
HashMap
<
String
,
Long
>();
customerTecnician
DistanceMap
.
put
(
technicianCode
,
customerMaps
);
tecnicianCustomer
DistanceMap
.
put
(
technicianCode
,
customerMaps
);
}
customerMaps
.
put
(
customerCode
,
distance
);
});
});
return
customerTecnician
DistanceMap
;
return
tecnicianCustomer
DistanceMap
;
}
/**
...
...
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