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
80ee6e69
Commit
80ee6e69
authored
Mar 10, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资料提交-管材查询接口修改
parent
040712b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
MaterialDto.java
...com/yeejoin/amos/boot/module/ugp/api/dto/MaterialDto.java
+4
-1
MaterialController.java
...os/boot/module/ugp/biz/controller/MaterialController.java
+1
-1
MaterialServiceImpl.java
...boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
+25
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/MaterialDto.java
View file @
80ee6e69
...
@@ -24,7 +24,7 @@ public class MaterialDto extends BaseDto {
...
@@ -24,7 +24,7 @@ public class MaterialDto extends BaseDto {
@ApiModelProperty
(
value
=
"名称"
)
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"
项目
id"
)
@ApiModelProperty
(
value
=
"
单位
id"
)
private
Long
companyId
;
private
Long
companyId
;
@ApiModelProperty
(
value
=
"管材编号"
)
@ApiModelProperty
(
value
=
"管材编号"
)
...
@@ -66,4 +66,7 @@ public class MaterialDto extends BaseDto {
...
@@ -66,4 +66,7 @@ public class MaterialDto extends BaseDto {
@ApiModelProperty
(
value
=
"单位机构代码"
)
@ApiModelProperty
(
value
=
"单位机构代码"
)
private
String
orgCode
;
private
String
orgCode
;
@ApiModelProperty
(
value
=
"项目id"
)
private
Long
projectId
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/MaterialController.java
View file @
80ee6e69
...
@@ -151,7 +151,7 @@ public class MaterialController extends BaseController {
...
@@ -151,7 +151,7 @@ public class MaterialController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/pageList"
)
@GetMapping
(
value
=
"/pageList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"材料信息表分页查询"
,
notes
=
"材料信息表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"材料信息表分页查询"
,
notes
=
"材料信息表分页查询"
)
public
ResponseModel
<
IPage
<
Material
>>
queryPage
(
int
current
,
int
size
,
Material
material
)
{
public
ResponseModel
<
IPage
<
Material
>>
queryPage
(
int
current
,
int
size
,
Material
Dto
material
)
{
IPage
<
Material
>
page
=
new
Page
<>();
IPage
<
Material
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
View file @
80ee6e69
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto
;
...
@@ -57,6 +58,9 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -57,6 +58,9 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
@Autowired
@Autowired
ProjectServiceImpl
projectService
;
ProjectServiceImpl
projectService
;
@Autowired
ProjectResourceServiceImpl
projectResourceServiceImpl
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -78,14 +82,33 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -78,14 +82,33 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
* 提交资料 获取管材列表(建设单位) 分页查询
* 提交资料 获取管材列表(建设单位) 分页查询
*/
*/
@BusinessIdentify
@BusinessIdentify
public
IPage
<
Material
>
queryMaterialPage
(
IPage
<
Material
>
page
,
Material
material
)
{
public
IPage
<
Material
>
queryMaterialPage
(
IPage
<
Material
>
page
,
Material
Dto
material
)
{
LambdaQueryWrapper
<
Material
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Material
>
wrapper
=
new
LambdaQueryWrapper
<>();
getWrapper
(
wrapper
,
material
);
getWrapper
(
wrapper
,
material
);
wrapper
.
in
(
Material:
:
getCompanyId
,
getCompanyIds
());
wrapper
.
in
(
Material:
:
getCompanyId
,
getCompanyIds
());
return
this
.
page
(
page
,
wrapper
);
return
this
.
page
(
page
,
wrapper
);
}
}
public
void
getWrapper
(
LambdaQueryWrapper
<
Material
>
wrapper
,
Material
material
){
public
void
getWrapper
(
LambdaQueryWrapper
<
Material
>
wrapper
,
MaterialDto
material
){
List
materialIds
=
new
ArrayList
<>();
LambdaQueryWrapper
<
ProjectResource
>
resourceWrapper
=
new
LambdaQueryWrapper
<>();
if
(!
ValidationUtil
.
isEmpty
(
material
.
getProjectId
())){
resourceWrapper
.
eq
(
ProjectResource:
:
getProjectId
,
material
.
getProjectId
())
.
eq
(
ProjectResource:
:
getType
,
ProjectResourceEnum
.
管材资源
.
getCode
());
List
<
ProjectResource
>
list
=
projectResourceServiceImpl
.
list
(
resourceWrapper
);
for
(
ProjectResource
projectResource:
list
)
{
materialIds
.
add
(
projectResource
.
getResourceId
());
}
wrapper
.
in
(
Material:
:
getSequenceNbr
,
materialIds
);
}
else
{
resourceWrapper
.
eq
(
ProjectResource:
:
getType
,
ProjectResourceEnum
.
管材资源
.
getCode
());
List
<
ProjectResource
>
list
=
projectResourceServiceImpl
.
list
(
resourceWrapper
);
for
(
ProjectResource
projectResource:
list
)
{
materialIds
.
add
(
projectResource
.
getResourceId
());
}
wrapper
.
notIn
(
Material:
:
getSequenceNbr
,
materialIds
);
}
if
(!
ValidationUtil
.
isEmpty
(
material
.
getName
())){
if
(!
ValidationUtil
.
isEmpty
(
material
.
getName
())){
wrapper
.
like
(
Material:
:
getName
,
material
.
getName
());
wrapper
.
like
(
Material:
:
getName
,
material
.
getName
());
}
}
...
...
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