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 d2498107
authored
Nov 21, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:排班里程数据库公里改成米
1 parent
c3ed56ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
24 deletions
project-dispatch/src/main/java/com/dituhui/pea/dispatch/utils/RoadDistanceUtils.java
project-order/src/main/java/com/dituhui/pea/order/dto/ScheduleEngineerOverviewResp.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/ScheduleServiceImpl.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/utils/RoadDistanceUtils.java
View file @
d249810
...
...
@@ -163,7 +163,7 @@ public class RoadDistanceUtils {
String
text
=
requestGetAK
(
url
,
params
);
// System.out.println(url + " : " + gson.toJson(params) + " : " + text);
BDResult
webResult
=
gson
.
fromJson
(
text
,
BDResult
.
class
);
float
dis
=
webResult
.
getResult
().
get
(
0
).
getDistance
().
getValue
()
/
1000
F
;
float
dis
=
webResult
.
getResult
().
get
(
0
).
getDistance
().
getValue
();
int
time
=
webResult
.
getResult
().
get
(
0
).
getDuration
().
getValue
();
Distance
d
=
new
Distance
();
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/ScheduleEngineerOverviewResp.java
View file @
d249810
...
...
@@ -26,7 +26,7 @@ public class ScheduleEngineerOverviewResp {
/**
* 在途公里数
*/
private
Integer
distance
;
private
String
distance
;
/**
* 上门时间
*/
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/ScheduleServiceImpl.java
View file @
d249810
...
...
@@ -128,10 +128,10 @@ public class ScheduleServiceImpl implements ScheduleService {
List
<
ScheduleOverviewResp
.
Item
>
children
=
new
ArrayList
<>();
Integer
teamDistance
=
0
;
Integer
minOrderSum
=
0
;
Integer
maxOrderSum
=
0
;
Integer
minDistance
=
0
;
Integer
maxDistance
=
0
;
Integer
minOrderSum
=
0
;
Integer
maxOrderSum
=
0
;
Integer
minDistance
=
0
;
Integer
maxDistance
=
0
;
for
(
Map
.
Entry
<
String
,
List
<
EngineerInfoEntity
>>
entry
:
engineers
.
entrySet
())
{
ScheduleOverviewResp
.
Item
child
=
new
ScheduleOverviewResp
.
Item
();
...
...
@@ -153,27 +153,27 @@ public class ScheduleServiceImpl implements ScheduleService {
children
.
add
(
child
);
if
(
null
==
minOrderSum
||
null
==
maxOrderSum
)
{
minOrderSum
=
child
.
getOrder
().
getTotal
();
maxOrderSum
=
child
.
getOrder
().
getTotal
();
}
else
{
if
(
child
.
getOrder
().
getTotal
()<
minOrderSum
)
{
minOrderSum
=
child
.
getOrder
().
getTotal
();
if
(
null
==
minOrderSum
||
null
==
maxOrderSum
)
{
minOrderSum
=
child
.
getOrder
().
getTotal
();
maxOrderSum
=
child
.
getOrder
().
getTotal
();
}
else
{
if
(
child
.
getOrder
().
getTotal
()
<
minOrderSum
)
{
minOrderSum
=
child
.
getOrder
().
getTotal
();
}
if
(
child
.
getOrder
().
getTotal
()>
maxOrderSum
)
{
maxOrderSum
=
child
.
getOrder
().
getTotal
();
if
(
child
.
getOrder
().
getTotal
()
>
maxOrderSum
)
{
maxOrderSum
=
child
.
getOrder
().
getTotal
();
}
}
if
(
null
==
minDistance
||
null
==
maxDistance
)
{
minDistance
=
distanceSum
;
maxDistance
=
distanceSum
;
}
else
{
if
(
distanceSum
<
minDistance
)
{
minDistance
=
distanceSum
;
if
(
null
==
minDistance
||
null
==
maxDistance
)
{
minDistance
=
distanceSum
;
maxDistance
=
distanceSum
;
}
else
{
if
(
distanceSum
<
minDistance
)
{
minDistance
=
distanceSum
;
}
if
(
distanceSum
>
maxDistance
)
{
maxDistance
=
distanceSum
;
if
(
distanceSum
>
maxDistance
)
{
maxDistance
=
distanceSum
;
}
}
}
...
...
@@ -267,7 +267,7 @@ public class ScheduleServiceImpl implements ScheduleService {
.
divide
(
new
BigDecimal
(
60
),
2
,
RoundingMode
.
HALF_UP
)
.
stripTrailingZeros
()
+
"时"
);
dynamics
.
setRoadTotalDistance
(
sumDistance
+
"公里"
);
dynamics
.
setRoadTotalDistance
(
sumDistance
/
1000.0
+
"公里"
);
if
(
Objects
.
nonNull
(
engineerBusinessEntity
))
{
dynamics
.
setWorkTime
(
engineerBusinessEntity
.
getWorkOn
()
+
"-"
+
engineerBusinessEntity
.
getWorkOff
());
}
else
{
...
...
@@ -289,7 +289,7 @@ public class ScheduleServiceImpl implements ScheduleService {
item
.
setSkill
(
o
.
getSkill
());
item
.
setOrderStatus
(
o
.
getAppointmentStatus
());
item
.
setOrderStatusName
(
""
);
item
.
setDistance
(
o
.
getArriveDistance
()
);
item
.
setDistance
(
Objects
.
nonNull
(
o
.
getArriveDistance
())
?
o
.
getArriveDistance
()
/
1000.0
+
""
:
null
);
item
.
setTimeType
(
"auto"
);
if
(
Objects
.
nonNull
(
o
.
getArriveElapsed
()))
{
...
...
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