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 b541b2d8
authored
Aug 03, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MybatisPlus to JPA
1 parent
4c834af9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceListServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderServiceListServiceImpl.java
View file @
b541b2d
...
...
@@ -28,10 +28,10 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
private
OrderInfoMPDao
orderInfoMPDao
;
@Autowired
private
EngineerInfo
MPDao
engineerInfoMP
Dao
;
private
EngineerInfo
Dao
engineerInfo
Dao
;
@Autowired
private
OrgBranch
MPDao
orgBranchMP
Dao
;
private
OrgBranch
Dao
orgBranch
Dao
;
@Transactional
@Override
...
...
@@ -167,8 +167,8 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
if
(
engineerCodes
.
isEmpty
()){
return
new
HashMap
<>();
}
List
<
EngineerInfo
>
engineers
=
engineerInfoMPDao
.
selectByEngineerCodes
(
new
ArrayList
<>(
engineerCodes
));
return
engineers
.
stream
().
collect
(
Collectors
.
toMap
(
EngineerInfo
:
:
getEngineerCode
,
EngineerInfo
:
:
getName
));
List
<
EngineerInfo
Entity
>
engineers
=
engineerInfoDao
.
findByEngineerCodeIn
(
new
ArrayList
<>(
engineerCodes
));
return
engineers
.
stream
().
collect
(
Collectors
.
toMap
(
EngineerInfo
Entity:
:
getEngineerCode
,
EngineerInfoEntity
:
:
getName
));
}
private
Map
<
String
,
String
>
getBranchNames
(
List
<
OrderInfo
>
orders
){
...
...
@@ -182,10 +182,8 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
if
(
branches
.
isEmpty
()){
return
new
HashMap
<>();
}
LambdaQueryWrapper
<
OrgBranch
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
in
(
OrgBranch:
:
getBranchId
,
new
ArrayList
<>(
branches
));
List
<
OrgBranch
>
records
=
orgBranchMPDao
.
selectList
(
lqw
);
return
records
.
stream
().
collect
(
Collectors
.
toMap
(
OrgBranch:
:
getBranchId
,
OrgBranch:
:
getBranchName
));
List
<
OrgBranchEntity
>
records
=
orgBranchDao
.
findByBranchIdIn
(
new
ArrayList
<>(
branches
));
return
records
.
stream
().
collect
(
Collectors
.
toMap
(
OrgBranchEntity:
:
getBranchId
,
OrgBranchEntity:
:
getBranchName
));
}
private
List
<
String
>
getOrderEngineerNames
(
String
engineerCode
,
String
engineerCodeSub
,
Map
<
String
,
String
>
engineerNames
){
...
...
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