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
9440bb1b
Commit
9440bb1b
authored
Nov 03, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改监管规则列表查询接口
parent
edf2fc43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
SuperviseRuleController.java
...ot/module/ugp/biz/controller/SuperviseRuleController.java
+3
-2
SuperviseRuleServiceImpl.java
...module/ugp/biz/service/impl/SuperviseRuleServiceImpl.java
+28
-9
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/SuperviseRuleController.java
View file @
9440bb1b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl
;
...
@@ -140,13 +141,13 @@ public class SuperviseRuleController extends BaseController {
...
@@ -140,13 +141,13 @@ public class SuperviseRuleController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"监管区域规则表分页查询"
,
notes
=
"监管区域规则表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"监管区域规则表分页查询"
,
notes
=
"监管区域规则表分页查询"
)
public
ResponseModel
<
Page
<
SuperviseRuleDto
>>
queryForPage
(
public
ResponseModel
<
I
Page
<
SuperviseRuleDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
SuperviseRule
superviseRule
SuperviseRule
superviseRule
)
{
)
{
//this.current = current;
//this.current = current;
Page
<
SuperviseRuleDto
>
page
=
new
Page
<>();
Page
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/SuperviseRuleServiceImpl.java
View file @
9440bb1b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.ISuperviseRuleService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.ISuperviseRuleService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SuperviseRuleDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SuperviseRuleDto
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -25,22 +31,35 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
...
@@ -25,22 +31,35 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
SuperviseRuleDto
>
queryForSuperviseRulePage
(
Page
<
SuperviseRuleDto
>
page
,
SuperviseRule
superviseRule
)
{
public
IPage
<
SuperviseRuleDto
>
queryForSuperviseRulePage
(
IPage
page
,
SuperviseRule
superviseRule
)
{
Integer
adminRegionCode
=
superviseRule
.
getAdminRegionCode
();
Integer
adminRegionCode
=
superviseRule
.
getAdminRegionCode
();
Long
superviseDeptId
=
superviseRule
.
getSuperviseDeptId
();
Long
superviseDeptId
=
superviseRule
.
getSuperviseDeptId
();
Long
inspectionUnitId
=
superviseRule
.
getInspectionUnitId
();
Long
inspectionUnitId
=
superviseRule
.
getInspectionUnitId
();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
page
=
this
.
queryForPage
(
page
,
null
,
false
,
adminRegionCode
,
superviseDeptId
,
inspectionUnitId
);
if
(!
ValidationUtil
.
isEmpty
(
adminRegionCode
)){
List
<
SuperviseRuleDto
>
superviseRuleDtoList
=
page
.
getRecords
();
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
adminRegionCode
);
}
for
(
SuperviseRuleDto
superviseRuleDto:
superviseRuleDtoList
){
if
(!
ValidationUtil
.
isEmpty
(
superviseDeptId
)){
superviseRuleDto
.
setSuperviseDept
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
superviseRuleDto
.
getSuperviseDeptId
())).
getBizOrgName
());
wrapper
.
like
(
SuperviseRule:
:
getSuperviseDeptId
,
superviseDeptId
);
superviseRuleDto
.
setInspectionUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
superviseRuleDto
.
getInspectionUnitId
())).
getBizOrgName
());
}
superviseRuleDto
.
setCreateUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
superviseRuleDto
.
getCreateUnitId
())).
getBizOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
inspectionUnitId
)){
wrapper
.
like
(
SuperviseRule:
:
getInspectionUnitId
,
inspectionUnitId
);
}
}
page
=
this
.
page
(
page
,
wrapper
);
List
<
SuperviseRule
>
superviseRuleList
=
page
.
getRecords
();
List
<
SuperviseRuleDto
>
superviseRuleDtoList
=
new
ArrayList
<>();
for
(
SuperviseRule
rule:
superviseRuleList
){
SuperviseRuleDto
superviseRuleDto
=
new
SuperviseRuleDto
();
BeanUtils
.
copyProperties
(
rule
,
superviseRuleDto
);
superviseRuleDto
.
setSuperviseDept
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
rule
.
getSuperviseDeptId
())).
getBizOrgName
());
superviseRuleDto
.
setInspectionUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
rule
.
getInspectionUnitId
())).
getBizOrgName
());
superviseRuleDto
.
setCreateUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
rule
.
getCreateUnitId
())).
getBizOrgName
());
superviseRuleDtoList
.
add
(
superviseRuleDto
);
}
page
.
setRecords
(
superviseRuleDtoList
);
return
page
;
return
page
;
}
}
...
...
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