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 ec45ea8c
authored
Jun 16, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
1 parent
3ebc5005
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/ScheduleServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/ScheduleServiceImpl.java
View file @
ec45ea8
...
...
@@ -142,18 +142,22 @@ public class ScheduleServiceImpl implements ScheduleService {
timelines
.
add
(
item
);
}
Map
<
String
,
List
<
OrderAppointment
>>
statusGroup
=
orderAppointments
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderAppointment:
:
getStatus
));
List
<
OrderAppointment
>
empty
=
new
ArrayList
<>();
Integer
countPending
=
statusGroup
.
getOrDefault
(
"ASSIGNED"
,
empty
).
size
()
+
statusGroup
.
getOrDefault
(
"CONTACTED"
,
empty
).
size
()
+
statusGroup
.
getOrDefault
(
"DEPARTED"
,
empty
).
size
();
List
<
ScheduleEngineerOverviewResp
.
Dynamic
>
dynamics
=
new
ArrayList
<>();
dynamics
.
add
(
this
.
packDynamic
(
"姓名"
,
engineer
.
getName
()));
dynamics
.
add
(
this
.
packDynamic
(
"日期"
,
date
));
dynamics
.
add
(
this
.
packDynamic
(
"状态"
,
"上班"
));
dynamics
.
add
(
this
.
packDynamic
(
"待服务"
,
"5"
));
dynamics
.
add
(
this
.
packDynamic
(
"服务中"
,
"1"
));
dynamics
.
add
(
this
.
packDynamic
(
"已完成"
,
"2"
));
dynamics
.
add
(
this
.
packDynamic
(
"已取消"
,
"2"
));
dynamics
.
add
(
this
.
packDynamic
(
"已改约"
,
"3"
));
dynamics
.
add
(
this
.
packDynamic
(
"待服务"
,
Integer
.
toString
(
countPending
)
));
dynamics
.
add
(
this
.
packDynamic
(
"服务中"
,
Integer
.
toString
(
statusGroup
.
getOrDefault
(
"STARTED"
,
empty
).
size
())
));
dynamics
.
add
(
this
.
packDynamic
(
"已完成"
,
Integer
.
toString
(
statusGroup
.
getOrDefault
(
"FINISHED"
,
empty
).
size
())
));
dynamics
.
add
(
this
.
packDynamic
(
"已取消"
,
Integer
.
toString
(
statusGroup
.
getOrDefault
(
"CANCELED"
,
empty
).
size
())
));
dynamics
.
add
(
this
.
packDynamic
(
"已改约"
,
Integer
.
toString
(
statusGroup
.
getOrDefault
(
"RESCHEDULED"
,
empty
).
size
())
));
dynamics
.
add
(
this
.
packDynamic
(
"预计总耗时"
,
"6小时"
));
dynamics
.
add
(
this
.
packDynamic
(
"公里数"
,
"42公里"
));
dynamics
.
add
(
this
.
packDynamic
(
"工作时间"
,
"08:00-1
9
:00"
));
dynamics
.
add
(
this
.
packDynamic
(
"工作时间"
,
"08:00-1
8
:00"
));
dynamics
.
add
(
this
.
packDynamic
(
"交通工具"
,
"电动车"
));
List
<
String
>
orderIds
=
orderAppointments
.
stream
().
map
(
OrderAppointment:
:
getOrderId
).
collect
(
Collectors
.
toList
());
...
...
@@ -168,12 +172,11 @@ public class ScheduleServiceImpl implements ScheduleService {
item
.
setOrderStatus
(
o
.
getAppointmentStatus
());
item
.
setOrderStatusName
(
""
);
item
.
setDistance
(
3000
);
item
.
setArriveTime
(
""
);
item
.
setTimeType
(
""
);
item
.
setExpectArriveDuration
(
""
);
item
.
setArriveTime
(
""
);
item
.
setWorkDuration
(
""
);
item
.
setExpectWorkDuration
(
""
);
item
.
setTimeType
(
"auto"
);
item
.
setExpectArriveDuration
(
"10分钟"
);
item
.
setArriveTime
(
"10分钟"
);
item
.
setExpectWorkDuration
(
"30分钟"
);
item
.
setWorkDuration
(
"30分钟"
);
orders
.
add
(
item
);
}
...
...
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