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 6e4f4d74
authored
Jun 14, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
1 parent
d7ca567e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/DispatchServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/DispatchServiceImpl.java
View file @
6e4f4d7
...
...
@@ -103,7 +103,7 @@ public class DispatchServiceImpl implements DispatchService {
// 获取engineerCodes
List
<
String
>
engineerCodes
=
engineers
.
stream
().
map
(
EngineerInfo:
:
getEngineerCode
).
collect
(
Collectors
.
toList
());
// 获取技术员
订单ID列表HashMap<engineerCode, List<orderId>>
// 获取技术员
已指派单列表
Map
<
String
,
List
<
OrderAppointment
>>
engineerOrders
=
this
.
queryEngineerOrders
(
engineerCodes
,
date
);
// 获取订单ID
...
...
@@ -114,10 +114,11 @@ public class DispatchServiceImpl implements DispatchService {
}
}
// 获取
订
单列表
// 获取
服务单/工
单列表
Map
<
String
,
List
<
OrderRequest
>>
orders
=
this
.
queryOrderRequestByOrderIds
(
new
ArrayList
<>(
orderIds
)).
stream
().
collect
(
Collectors
.
groupingBy
(
OrderRequest:
:
getOrderId
));
// 获取技术员已指派单列表
List
<
DispatchEngineerOrderListResp
.
EngineerInfo
>
egs
=
new
ArrayList
<>();
for
(
EngineerInfo
e
:
engineers
)
{
...
...
@@ -126,8 +127,10 @@ public class DispatchServiceImpl implements DispatchService {
// 技术员已指派的订单列表
List
<
OrderAppointment
>
records
=
engineerOrders
.
getOrDefault
(
e
.
getEngineerCode
(),
List
.
of
());
for
(
OrderAppointment
r
:
records
)
{
DispatchEngineerOrderListResp
.
OrderInfo
item
=
new
DispatchEngineerOrderListResp
.
OrderInfo
();
// 获取订单信息
// 获取对应的工单信息
OrderRequest
o
=
orders
.
get
(
r
.
getOrderId
()).
get
(
0
);
item
.
setOrderId
(
r
.
getOrderId
());
...
...
@@ -207,7 +210,6 @@ public class DispatchServiceImpl implements DispatchService {
lqw
.
in
(
OrderAppointment:
:
getEngineerCode
,
engineerCodes
);
lqw
.
ge
(
OrderAppointment:
:
getExpectTime
,
this
.
getTimestampFromDate
(
date
,
"00:00:00"
));
lqw
.
le
(
OrderAppointment:
:
getExpectTime
,
this
.
getTimestampFromDate
(
date
,
"23:59:59"
));
lqw
.
select
(
OrderAppointment:
:
getEngineerCode
,
OrderAppointment:
:
getOrderId
);
lqw
.
orderByAsc
(
OrderAppointment:
:
getEngineerCode
);
lqw
.
orderByAsc
(
OrderAppointment:
:
getExpectTime
);
...
...
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