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 097ea0ac
authored
Oct 10, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:代码格式化
1 parent
75e91158
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 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 @
097ea0a
...
...
@@ -69,7 +69,7 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
}
}
if
(
ListUtils
.
isNotEmpty
(
reqDTO
.
getEngineerCodes
()))
{
if
(
ListUtils
.
isNotEmpty
(
reqDTO
.
getEngineerCodes
()))
{
lqw
.
and
(
w
->
w
.
in
(
OrderInfo:
:
getEngineerCode
,
reqDTO
.
getEngineerCodes
())
.
or
()
...
...
@@ -156,42 +156,42 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
private
Map
<
String
,
String
>
getEngineerNames
(
List
<
OrderInfo
>
orders
)
{
// 获取技术员姓名
Set
<
String
>
engineerCodes
=
new
HashSet
<>();
for
(
OrderInfo
r:
orders
)
{
if
(
StringUtils
.
isNotEmpty
(
r
.
getEngineerCode
()))
{
for
(
OrderInfo
r
:
orders
)
{
if
(
StringUtils
.
isNotEmpty
(
r
.
getEngineerCode
()))
{
engineerCodes
.
add
(
r
.
getEngineerCode
());
}
if
(
StringUtils
.
isNotEmpty
(
r
.
getEngineerCodeSub
()))
{
if
(
StringUtils
.
isNotEmpty
(
r
.
getEngineerCodeSub
()))
{
engineerCodes
.
add
(
r
.
getEngineerCodeSub
());
}
}
if
(
engineerCodes
.
isEmpty
())
{
if
(
engineerCodes
.
isEmpty
())
{
return
new
HashMap
<>();
}
List
<
EngineerInfoEntity
>
engineers
=
engineerInfoDao
.
findByEngineerCodeIn
(
new
ArrayList
<>(
engineerCodes
));
return
engineers
.
stream
().
collect
(
Collectors
.
toMap
(
EngineerInfoEntity:
:
getEngineerCode
,
EngineerInfoEntity:
:
getName
));
}
private
Map
<
String
,
String
>
getBranchNames
(
List
<
OrderInfo
>
orders
)
{
private
Map
<
String
,
String
>
getBranchNames
(
List
<
OrderInfo
>
orders
)
{
// 获取branch名称
Set
<
String
>
branches
=
new
HashSet
<>();
for
(
OrderInfo
r:
orders
)
{
if
(
StringUtils
.
isNotEmpty
(
r
.
getOrgBranchId
()))
{
for
(
OrderInfo
r
:
orders
)
{
if
(
StringUtils
.
isNotEmpty
(
r
.
getOrgBranchId
()))
{
branches
.
add
(
r
.
getOrgBranchId
());
}
}
if
(
branches
.
isEmpty
())
{
if
(
branches
.
isEmpty
())
{
return
new
HashMap
<>();
}
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
)
{
private
List
<
String
>
getOrderEngineerNames
(
String
engineerCode
,
String
engineerCodeSub
,
Map
<
String
,
String
>
engineerNames
)
{
// 获取订单技术员姓名信息
List
<
String
>
names
=
new
ArrayList
<>();
for
(
String
code:
List
.
of
(
engineerCode
,
engineerCodeSub
))
{
for
(
String
code
:
List
.
of
(
engineerCode
,
engineerCodeSub
))
{
String
name
=
engineerNames
.
getOrDefault
(
code
,
""
);
if
(
StringUtils
.
isNotEmpty
(
name
))
{
if
(
StringUtils
.
isNotEmpty
(
name
))
{
names
.
add
(
name
);
}
}
...
...
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