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 1ba38560
authored
Dec 07, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ID1004248): 博西PEA_V1.1-推荐工程师页-地图常规位置:取值“派单首选地点,数据源在工程师的「位置配置」”,部分工程师没有位置信息时,地图上可不标注。
1 parent
cd915f07
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
project-order/src/main/java/com/dituhui/pea/order/service/EngineerBusinessService.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerBusinessServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/EngineerBusinessService.java
View file @
1ba3856
...
@@ -19,7 +19,7 @@ public interface EngineerBusinessService {
...
@@ -19,7 +19,7 @@ public interface EngineerBusinessService {
/**
/**
* 获取工程师出发位置
* 获取工程师出发位置
* @param engineerCode 工程师编号
* @param engineerCode 工程师编号
* @return 工程师出发位置
* @return 工程师出发位置
注意: 此方法可能返回null值
*/
*/
TLocation
engineerDepartLocation
(
String
engineerCode
);
TLocation
engineerDepartLocation
(
String
engineerCode
);
}
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerBusinessServiceImpl.java
View file @
1ba3856
...
@@ -134,11 +134,14 @@ public class EngineerBusinessServiceImpl implements EngineerBusinessService {
...
@@ -134,11 +134,14 @@ public class EngineerBusinessServiceImpl implements EngineerBusinessService {
@Override
@Override
public
TLocation
engineerDepartLocation
(
String
engineerCode
)
{
public
TLocation
engineerDepartLocation
(
String
engineerCode
)
{
EngineerBusinessEntity
byEngineerCode
=
engineerBusinessDao
.
getByEngineerCode
(
engineerCode
);
EngineerBusinessEntity
byEngineerCode
=
engineerBusinessDao
.
getByEngineerCode
(
engineerCode
);
if
(
StringUtils
.
isNotBlank
(
byEngineerCode
.
getX
())
||
StringUtils
.
isNotBlank
(
byEngineerCode
.
getY
()))
{
TLocation
location
=
new
TLocation
();
TLocation
location
=
new
TLocation
();
location
.
setAddress
(
byEngineerCode
.
getAddress
());
location
.
setAddress
(
byEngineerCode
.
getAddress
());
location
.
setLongitude
(
StringUtils
.
isNotBlank
(
byEngineerCode
.
getX
())
?
Double
.
parseDouble
(
byEngineerCode
.
getX
())
:
0.0
);
location
.
setLongitude
(
Double
.
parseDouble
(
byEngineerCode
.
getX
())
);
location
.
setLatitude
(
StringUtils
.
isNotBlank
(
byEngineerCode
.
getY
())
?
Double
.
parseDouble
(
byEngineerCode
.
getY
())
:
0.0
);
location
.
setLatitude
(
Double
.
parseDouble
(
byEngineerCode
.
getY
())
);
location
.
setLocationType
(
LocationType
.
GENERAL
);
location
.
setLocationType
(
LocationType
.
GENERAL
);
return
location
;
return
location
;
}
}
return
null
;
}
}
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
View file @
1ba3856
...
@@ -433,15 +433,16 @@ public class OrderAssignImpl implements OrderAssign {
...
@@ -433,15 +433,16 @@ public class OrderAssignImpl implements OrderAssign {
ArrayList
<
TLocation
>
resultLocationList
=
new
ArrayList
<>();
ArrayList
<
TLocation
>
resultLocationList
=
new
ArrayList
<>();
TLocation
generalLocation
=
engineerBusinessService
.
engineerDepartLocation
(
engineerCode
);
TLocation
generalLocation
=
engineerBusinessService
.
engineerDepartLocation
(
engineerCode
);
//常规位置, 出发地
resultLocationList
.
add
(
generalLocation
);
if
(
finishedOrder
.
isPresent
())
{
if
(
finishedOrder
.
isPresent
())
{
OrderInfoEntity
finishedOrderInfo
=
finishedOrder
.
get
();
OrderInfoEntity
finishedOrderInfo
=
finishedOrder
.
get
();
quasiRealTimeLocation
.
setAddress
(
finishedOrderInfo
.
getAddress
());
quasiRealTimeLocation
.
setAddress
(
finishedOrderInfo
.
getAddress
());
quasiRealTimeLocation
.
setLongitude
(
Double
.
parseDouble
(
finishedOrderInfo
.
getX
()));
quasiRealTimeLocation
.
setLongitude
(
Double
.
parseDouble
(
finishedOrderInfo
.
getX
()));
quasiRealTimeLocation
.
setLatitude
(
Double
.
parseDouble
(
finishedOrderInfo
.
getY
()));
quasiRealTimeLocation
.
setLatitude
(
Double
.
parseDouble
(
finishedOrderInfo
.
getY
()));
currentOrder
=
finishedOrderInfo
;
currentOrder
=
finishedOrderInfo
;
}
else
{
}
else
if
(
Objects
.
nonNull
(
generalLocation
)){
//常规位置, 出发地
resultLocationList
.
add
(
generalLocation
);
//准实时位置
quasiRealTimeLocation
.
setAddress
(
generalLocation
.
getAddress
());
quasiRealTimeLocation
.
setAddress
(
generalLocation
.
getAddress
());
quasiRealTimeLocation
.
setLongitude
(
generalLocation
.
getLongitude
());
quasiRealTimeLocation
.
setLongitude
(
generalLocation
.
getLongitude
());
quasiRealTimeLocation
.
setLatitude
(
generalLocation
.
getLatitude
());
quasiRealTimeLocation
.
setLatitude
(
generalLocation
.
getLatitude
());
...
...
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