Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
f75e7df6
Commit
f75e7df6
authored
Nov 02, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改根据type查询项目资源接口
parent
2cab712f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+25
-9
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectResourceServiceImpl.java
View file @
f75e7df6
...
...
@@ -60,6 +60,12 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
@Autowired
SuperviseRuleServiceImpl
superviseRuleService
;
@Autowired
MaterialServiceImpl
materialService
;
@Autowired
EquipmentServiceImpl
equipmentService
;
/**
* 分页查询
*/
...
...
@@ -206,7 +212,8 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
public
IPage
getResourceInfo
(
String
type
,
IPage
page
){
List
<
Project
>
projectList
=
this
.
getProjectList
();
List
<
Long
>
projectIdList
=
new
ArrayList
<>();
List
<
Long
>
welderIdList
=
new
ArrayList
<>();
List
<
Long
>
idList
=
new
ArrayList
<>();
List
list
=
new
ArrayList
<>();
for
(
Project
project:
projectList
){
projectIdList
.
add
(
project
.
getSequenceNbr
());
}
...
...
@@ -216,16 +223,26 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
IPage
<
ProjectResource
>
projectResourceList
=
this
.
page
(
page
,
projectResourceWrapper
);
for
(
ProjectResource
projectResource
:
projectResourceList
.
getRecords
()){
welderI
dList
.
add
(
projectResource
.
getResourceId
());
i
dList
.
add
(
projectResource
.
getResourceId
());
}
}
List
<
Map
>
mapList
=
new
ArrayList
<>();
for
(
Long
welderId:
welderIdList
){
mapList
.
add
(
orgService
.
getdetialInfo
(
String
.
valueOf
(
welderId
)));
if
(
焊工资源
.
getCode
().
equals
(
type
)){
List
<
Map
>
mapList
=
new
ArrayList
<>();
for
(
Long
welderId:
idList
){
mapList
.
add
(
orgService
.
getdetialInfo
(
String
.
valueOf
(
welderId
)));
}
page
.
setRecords
(
mapList
);
}
else
if
(
管材资源
.
getCode
().
equals
(
type
)){
for
(
Long
id:
idList
){
list
.
add
(
materialService
.
getById
(
id
));
}
page
.
setRecords
(
list
);
}
else
{
for
(
Long
id:
idList
){
list
.
add
(
equipmentService
.
getById
(
id
));
}
page
.
setRecords
(
list
);
}
page
.
setRecords
(
mapList
);
return
page
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment