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 ec80d8eb
authored
Jul 07, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
025ff340
aba14081
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
ec80d8e
...
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
...
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -50,13 +51,13 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -50,13 +51,13 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
page
=
orgTeamDao
.
findAllByGroupId
(
req
.
getLevelValue
(),
pageable
);
page
=
orgTeamDao
.
findAllByGroupId
(
req
.
getLevelValue
(),
pageable
);
}
}
for
(
OrgTeamEntity
e
:
page
.
getContent
())
{
for
(
OrgTeamEntity
e
:
page
.
getContent
())
{
String
engineers
=
orgTeamEngineerDao
.
findAllByTeamId
(
e
.
getTeamId
()).
stream
().
map
(
e2
->
{
List
<
String
>
engineers
=
orgTeamEngineerDao
.
findAllByTeamId
(
e
.
getTeamId
()).
stream
().
map
(
e2
->
{
return
engineerInfoDao
.
getByEngineerCode
(
e2
.
getEngineerCode
()).
getName
();
return
engineerInfoDao
.
getByEngineerCode
(
e2
.
getEngineerCode
()).
getName
();
}).
collect
(
Collectors
.
toList
())
.
toString
()
;
}).
collect
(
Collectors
.
toList
());
BusinessTeamsDTO
.
Content
content
=
new
BusinessTeamsDTO
.
Content
();
BusinessTeamsDTO
.
Content
content
=
new
BusinessTeamsDTO
.
Content
();
content
.
setTeamId
(
e
.
getTeamId
()).
setTeamName
(
e
.
getTeamName
());
content
.
setTeamId
(
e
.
getTeamId
()).
setTeamName
(
e
.
getTeamName
());
content
.
setWorkdays
(
String
.
join
(
"
,
"
,
getWorkdaysChinese
(
e
.
getWorkdays
())));
content
.
setWorkdays
(
String
.
join
(
"
、
"
,
getWorkdaysChinese
(
e
.
getWorkdays
())));
content
.
setEngineers
(
String
.
join
(
"
,
"
,
engineers
));
content
.
setEngineers
(
String
.
join
(
"
;
"
,
engineers
));
// todo 工作队容量
// todo 工作队容量
OrgWarehouseInfoEntity
warehouse
=
warehouseInfoDao
.
getByTeamAssigned
(
e
.
getTeamId
());
OrgWarehouseInfoEntity
warehouse
=
warehouseInfoDao
.
getByTeamAssigned
(
e
.
getTeamId
());
if
(
warehouse
!=
null
){
if
(
warehouse
!=
null
){
...
@@ -66,7 +67,6 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -66,7 +67,6 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
// ordersNum 当前单数
// ordersNum 当前单数
// pepleMinute 人数/分钟数
// pepleMinute 人数/分钟数
contents
.
add
(
content
);
contents
.
add
(
content
);
}
}
BusinessTeamsDTO
.
Result
rs
=
new
BusinessTeamsDTO
.
Result
();
BusinessTeamsDTO
.
Result
rs
=
new
BusinessTeamsDTO
.
Result
();
rs
.
setContent
(
contents
).
setTotal
(
page
.
getTotalPages
()).
setPageSize
(
page
.
getSize
());
rs
.
setContent
(
contents
).
setTotal
(
page
.
getTotalPages
()).
setPageSize
(
page
.
getSize
());
...
@@ -75,7 +75,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -75,7 +75,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
private
List
<
String
>
getWorkdaysChinese
(
String
workDays
)
{
private
List
<
String
>
getWorkdaysChinese
(
String
workDays
)
{
// 将 1,2,3 转换为 周一、周二、周三
// 将 1,2,3 转换为 周一、周二、周三
return
Arrays
.
stream
(
workDays
.
split
(
","
)).
map
(
e
->
{
List
<
String
>
days
=
Arrays
.
asList
(
workDays
.
split
(
","
));
Collections
.
sort
(
days
);
return
days
.
stream
().
map
(
e
->
{
return
Week
.
of
(
Integer
.
valueOf
(
e
)).
toChinese
(
"周"
);
return
Week
.
of
(
Integer
.
valueOf
(
e
)).
toChinese
(
"周"
);
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
...
...
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