Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
247f2613
Commit
247f2613
authored
Dec 01, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业管理列表优化
parent
7869b8d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
5 deletions
+59
-5
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+3
-3
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+4
-0
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+52
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
247f2613
...
...
@@ -161,11 +161,11 @@ public class CompanyController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@
Pos
tMapping
(
value
=
"/page"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@
Ge
tMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表分页查询"
,
notes
=
"企业信息表分页查询"
)
public
ResponseModel
<
IPage
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
Company
company
)
{
(
value
=
"size"
)
int
size
,
Company
company
)
{
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
queryCompanyPage
(
current
,
size
,
company
));
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
247f2613
...
...
@@ -386,5 +386,9 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
Map
>
getConstructionInfo
(){
return
ResponseHelper
.
buildResponse
(
orgServiceImpl
.
getConstructionInfo
());
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
247f2613
...
...
@@ -2,11 +2,15 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.ICompanyService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
...
...
@@ -51,6 +55,8 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
@Autowired
OrgServiceImpl
orgServiceImpl
;
@Autowired
private
SuperviseRuleMapper
superviseRuleMapper
;
/**
* 列表查询 示例
...
...
@@ -64,11 +70,55 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
* 分页查询+筛选
*/
@Override
@BusinessIdentify
public
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
IPage
<
Company
Dto
>
page
=
new
Page
<>();
IPage
<
Company
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
return
companyMapper
.
queryCompanyPage
(
page
,
company
);
IPage
<
CompanyDto
>
page1
=
new
Page
<>();
page1
.
setSize
(
size
);
page1
.
setCurrent
(
current
);
ArrayList
<
CompanyDto
>
list
=
Lists
.
newArrayList
(
);
String
companyType
=
orgService
.
getReginParams
(
).
getBusinessInfo
(
).
getCompanyType
(
);
Long
companySequenceNbr
=
orgService
.
getReginParams
(
).
getBusinessInfo
(
).
getCompanySequenceNbr
(
);
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>(
);
if
(!
ValidationUtil
.
isEmpty
(
companyType
))
{
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleMapper
.
selectList
(
wrapper
);
superviseRules
.
forEach
(
s
->{
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>(
);
wrapper1
.
eq
(
Company:
:
getRegionCode
,
s
.
getAdminRegionCode
())
.
like
(!
ValidationUtil
.
isEmpty
(
company
.
getName
()),
Company:
:
getName
,
company
.
getName
());
IPage
<
Company
>
companyIPage
=
companyMapper
.
selectPage
(
page
,
wrapper1
);
companyIPage
.
getRecords
().
forEach
(
company1
->
{
CompanyDto
companyDto
=
new
CompanyDto
(
);
BeanUtils
.
copyProperties
(
company1
,
companyDto
);
list
.
add
(
companyDto
);
});
});
page1
.
setRecords
(
list
);
return
page1
;
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
)){
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleMapper
.
selectList
(
wrapper
);
superviseRules
.
forEach
(
s
->{
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>(
);
wrapper1
.
eq
(
Company:
:
getRegionCode
,
s
.
getAdminRegionCode
())
.
like
(!
ValidationUtil
.
isEmpty
(
company
.
getName
()),
Company:
:
getName
,
company
.
getName
());
IPage
<
Company
>
companyIPage
=
companyMapper
.
selectPage
(
page
,
wrapper1
);
companyIPage
.
getRecords
().
forEach
(
company1
->
{
CompanyDto
companyDto
=
new
CompanyDto
(
);
BeanUtils
.
copyProperties
(
company1
,
companyDto
);
list
.
add
(
companyDto
);
});
});
page1
.
setRecords
(
list
);
return
page1
;
}
}
return
page1
;
}
/**
...
...
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