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 9e1bf66b
authored
Jul 07, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
47ca589f
7d7ea8db
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/BusinessController.java
project-order/src/main/java/com/dituhui/pea/order/dto/BusinessTeamsDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/controller/BusinessController.java
View file @
9e1bf66
...
...
@@ -29,7 +29,7 @@ public class BusinessController {
return
res
;
}
@GetMapping
(
"/business/warehouse/list"
)
@GetMapping
(
"/business/
team/
warehouse/list"
)
public
Result
<?>
getWarehouses
(
@Validated
BusinessWarehousesDTO
.
Request
reqDTO
)
{
Result
<?>
res
=
null
;
try
{
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/BusinessTeamsDTO.java
View file @
9e1bf66
...
...
@@ -26,19 +26,19 @@ public class BusinessTeamsDTO {
/**
* 当前页码
*/
private
String
pageCurrent
;
private
Integer
pageCurrent
;
/**
* 总页数
*/
private
String
pages
;
private
Integer
pages
;
/**
* 每业条数
*/
private
String
pageSize
;
private
Integer
pageSize
;
/**
* 总条数
*/
private
String
total
;
private
Integer
total
;
}
@lombok
.
Data
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
9e1bf66
...
...
@@ -42,11 +42,11 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
@Override
public
Result
<?>
getTeams
(
BusinessTeamsDTO
.
Request
req
)
{
List
<
BusinessTeamsDTO
.
Content
>
contens
=
new
ArrayList
<>();
List
<
BusinessTeamsDTO
.
Content
>
conten
t
s
=
new
ArrayList
<>();
Pageable
pageable
=
PageRequest
.
of
(
req
.
getPage
()
-
1
,
req
.
getSize
());
Page
<
OrgTeamEntity
>
teams
=
orgTeamDao
.
findAllByGroupId
(
req
.
getLevelValue
(),
pageable
);
List
<
String
>
teamIds
=
teams
.
stream
().
map
(
OrgTeamEntity:
:
getTeamId
).
collect
(
Collectors
.
toList
());
for
(
OrgTeamEntity
e:
teams
){
Page
<
OrgTeamEntity
>
page
=
orgTeamDao
.
findAllByGroupId
(
req
.
getLevelValue
(),
pageable
);
List
<
String
>
teamIds
=
page
.
getContent
()
.
stream
().
map
(
OrgTeamEntity:
:
getTeamId
).
collect
(
Collectors
.
toList
());
for
(
OrgTeamEntity
e:
page
.
getContent
()
){
String
engineers
=
orgTeamEngineerDao
.
findAllByTeamId
(
e
.
getTeamId
()).
stream
().
map
(
e2
->{
return
engineerInfoDao
.
getByEngineerCode
(
e2
.
getEngineerCode
()).
getName
();
}).
collect
(
Collectors
.
toList
()).
toString
();
...
...
@@ -56,7 +56,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
content
.
setEngineers
(
engineers
);
// todo 工作队容量
}
return
Result
.
success
(
new
BusinessTeamsDTO
.
Result
().
setContent
(
contens
));
BusinessTeamsDTO
.
Result
rs
=
new
BusinessTeamsDTO
.
Result
();
rs
.
setContent
(
contents
).
setTotal
(
page
.
getTotalPages
()).
setPageSize
(
page
.
getSize
());
return
Result
.
success
(
rs
);
}
private
List
<
String
>
getWorkdaysChinese
(
String
workDays
){
...
...
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