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 3e26cadb
authored
Jul 24, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
1 parent
11e5ee57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
View file @
3e26cad
...
@@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -21,7 +21,6 @@ import org.springframework.transaction.annotation.Transactional;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -36,13 +35,7 @@ interface GroupTag {
...
@@ -36,13 +35,7 @@ interface GroupTag {
public
class
DispatchServiceImpl
implements
DispatchService
{
public
class
DispatchServiceImpl
implements
DispatchService
{
@Autowired
@Autowired
private
OrderInfoMPDao
orderInfoMPDao
;
private
OrderInfoMPDao
orderInfoMPDao
;
@Autowired
private
OrderRequestMPDao
orderRequestMPDao
;
@Autowired
private
OrderAppointmentMPDao
orderAppointmentMPDao
;
@Autowired
@Autowired
private
OrgTeamMPDao
orgTeamMPDao
;
private
OrgTeamMPDao
orgTeamMPDao
;
...
@@ -163,10 +156,10 @@ public class DispatchServiceImpl implements DispatchService {
...
@@ -163,10 +156,10 @@ public class DispatchServiceImpl implements DispatchService {
}
}
// 获取服务单/工单列表
// 获取服务单/工单列表
Map
<
String
,
List
<
Order
Request
>>
orders
=
new
HashMap
<>();
Map
<
String
,
List
<
Order
Info
>>
orders
=
new
HashMap
<>();
if
(!
orderIds
.
isEmpty
())
{
if
(!
orderIds
.
isEmpty
())
{
orders
=
order
RequestMPDao
.
selectByOrderIds
(
new
ArrayList
<>(
orderIds
)).
stream
().
collect
(
orders
=
order
InfoMPDao
.
selectByDtAndOrderIds
(
date
,
new
ArrayList
<>(
orderIds
)).
stream
().
collect
(
Collectors
.
groupingBy
(
Order
Request
:
:
getOrderId
));
Collectors
.
groupingBy
(
Order
Info
:
:
getOrderId
));
}
}
// 获取技术员已指派单列表
// 获取技术员已指派单列表
...
@@ -182,7 +175,7 @@ public class DispatchServiceImpl implements DispatchService {
...
@@ -182,7 +175,7 @@ public class DispatchServiceImpl implements DispatchService {
if
(
ListUtils
.
isEmpty
(
orders
.
get
(
r
.
getOrderId
())))
{
if
(
ListUtils
.
isEmpty
(
orders
.
get
(
r
.
getOrderId
())))
{
continue
;
continue
;
}
}
Order
Request
o
=
orders
.
get
(
r
.
getOrderId
()).
get
(
0
);
Order
Info
o
=
orders
.
get
(
r
.
getOrderId
()).
get
(
0
);
DispatchEngineerOrderListResp
.
OrderInfo
item
=
new
DispatchEngineerOrderListResp
.
OrderInfo
();
DispatchEngineerOrderListResp
.
OrderInfo
item
=
new
DispatchEngineerOrderListResp
.
OrderInfo
();
...
@@ -271,7 +264,7 @@ public class DispatchServiceImpl implements DispatchService {
...
@@ -271,7 +264,7 @@ public class DispatchServiceImpl implements DispatchService {
wrapper
.
eq
(
OrderInfo:
:
getDt
,
localDate
);
wrapper
.
eq
(
OrderInfo:
:
getDt
,
localDate
);
wrapper
.
in
(
OrderInfo:
:
getOrderId
,
orderIds
);
wrapper
.
in
(
OrderInfo:
:
getOrderId
,
orderIds
);
List
<
OrderInfo
>
orders
=
orderInfoMPDao
.
selectList
(
wrapper
);
List
<
OrderInfo
>
orders
=
orderInfoMPDao
.
selectList
(
wrapper
);
if
(
ListUtils
.
isEmpty
(
orders
)){
if
(
ListUtils
.
isEmpty
(
orders
))
{
throw
new
BusinessException
(
"订单不存在"
);
throw
new
BusinessException
(
"订单不存在"
);
}
}
...
@@ -333,7 +326,7 @@ public class DispatchServiceImpl implements DispatchService {
...
@@ -333,7 +326,7 @@ public class DispatchServiceImpl implements DispatchService {
}
}
}
}
if
(
ListUtils
.
isNotEmpty
(
reqDTO
.
getEngineerCodes
())){
if
(
ListUtils
.
isNotEmpty
(
reqDTO
.
getEngineerCodes
()))
{
lqw
.
and
(
w
->
lqw
.
and
(
w
->
w
.
in
(
OrderInfo:
:
getEngineerCode
,
reqDTO
.
getEngineerCodes
())
w
.
in
(
OrderInfo:
:
getEngineerCode
,
reqDTO
.
getEngineerCodes
())
.
or
()
.
or
()
...
...
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