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 7d7ea8db
authored
Jul 07, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
page方式
1 parent
69594d07
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 @
7d7ea8d
...
@@ -29,7 +29,7 @@ public class BusinessController {
...
@@ -29,7 +29,7 @@ public class BusinessController {
return
res
;
return
res
;
}
}
@GetMapping
(
"/business/warehouse/list"
)
@GetMapping
(
"/business/
team/
warehouse/list"
)
public
Result
<?>
getWarehouses
(
@Validated
BusinessWarehousesDTO
.
Request
reqDTO
)
{
public
Result
<?>
getWarehouses
(
@Validated
BusinessWarehousesDTO
.
Request
reqDTO
)
{
Result
<?>
res
=
null
;
Result
<?>
res
=
null
;
try
{
try
{
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/BusinessTeamsDTO.java
View file @
7d7ea8d
...
@@ -26,19 +26,19 @@ public class BusinessTeamsDTO {
...
@@ -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
@lombok
.
Data
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
7d7ea8d
...
@@ -42,11 +42,11 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -42,11 +42,11 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
@Override
@Override
public
Result
<?>
getTeams
(
BusinessTeamsDTO
.
Request
req
)
{
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
());
Pageable
pageable
=
PageRequest
.
of
(
req
.
getPage
()
-
1
,
req
.
getSize
());
Page
<
OrgTeamEntity
>
teams
=
orgTeamDao
.
findAllByGroupId
(
req
.
getLevelValue
(),
pageable
);
Page
<
OrgTeamEntity
>
page
=
orgTeamDao
.
findAllByGroupId
(
req
.
getLevelValue
(),
pageable
);
List
<
String
>
teamIds
=
teams
.
stream
().
map
(
OrgTeamEntity:
:
getTeamId
).
collect
(
Collectors
.
toList
());
List
<
String
>
teamIds
=
page
.
getContent
()
.
stream
().
map
(
OrgTeamEntity:
:
getTeamId
).
collect
(
Collectors
.
toList
());
for
(
OrgTeamEntity
e:
teams
){
for
(
OrgTeamEntity
e:
page
.
getContent
()
){
String
engineers
=
orgTeamEngineerDao
.
findAllByTeamId
(
e
.
getTeamId
()).
stream
().
map
(
e2
->{
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
()).
toString
();
...
@@ -56,7 +56,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -56,7 +56,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
content
.
setEngineers
(
engineers
);
content
.
setEngineers
(
engineers
);
// todo 工作队容量
// 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
){
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