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
64277d6b
Commit
64277d6b
authored
Feb 09, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分页查询时顶级父节点查所有的列表
parent
55893207
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
FireStationMapper.java
...amos/boot/module/common/api/mapper/FireStationMapper.java
+2
-2
FireStationServiceImpl.java
...odule/common/biz/service/impl/FireStationServiceImpl.java
+6
-2
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+4
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FireStationMapper.java
View file @
64277d6b
...
...
@@ -29,7 +29,7 @@ public interface FireStationMapper extends BaseMapper<FireStation> {
+
"<if test='par.bizCompanyCode!=null'> and a.biz_company_code like CONCAT('',#{par.bizCompanyCode},'%') </if>"
+
"<if test='par.address!=null'> and a.address like CONCAT('',#{par.address},'%') </if>"
+
"<if test='par.bizOrgCode != null'> and a.biz_org_code like CONCAT(#{par.bizOrgCode},'%') </if>"
+
"<if test='nodeIds != null' > AND where_building_id
`
in <foreach collection='nodeIds' item='buildingId' open='(' close=')' separator=','> #{buildingId} </foreach></if>"
+
"<if test='nodeIds != null' > AND where_building_id in <foreach collection='nodeIds' item='buildingId' open='(' close=')' separator=','> #{buildingId} </foreach></if>"
+
" order by a.rec_date desc limit #{pageNum},#{pageSize}"
+
"</script>"
)
List
<
FireStationDto
>
getFireStation
(
@Param
(
"pageNum"
)
int
pageNum
,
@Param
(
"pageSize"
)
int
pageSize
,
@Param
(
"par"
)
FireStationDto
par
,
List
<
String
>
nodeIds
);
...
...
@@ -40,7 +40,7 @@ public interface FireStationMapper extends BaseMapper<FireStation> {
+
"<if test='par.bizCompanyCode!=null'> and cb_fire_station.biz_company_code like CONCAT('',#{par.bizCompanyCode},'%') </if>"
+
"<if test='par.address!=null'> and cb_fire_station.address like CONCAT('',#{par.address},'%') </if>"
+
"<if test='par.bizOrgCode != null'> and biz_org_code like CONCAT(#{par.bizOrgCode},'%') </if>"
+
"<if test='nodeIds != null' > AND where_building_id
`
in <foreach collection='nodeIds' item='buildingId' open='(' close=')' separator=','> #{buildingId} </foreach></if>"
+
"<if test='nodeIds != null' > AND where_building_id in <foreach collection='nodeIds' item='buildingId' open='(' close=')' separator=','> #{buildingId} </foreach></if>"
+
"</script>"
)
Map
<
String
,
Long
>
getFireStationCount
(
@Param
(
"par"
)
FireStationDto
par
,
List
<
String
>
nodeIds
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireStationServiceImpl.java
View file @
64277d6b
...
...
@@ -81,8 +81,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
@Override
public
Page
<
FireStationDto
>
getFirefighters
(
int
pageNum
,
int
pageSize
,
FireStationDto
par
)
{
List
<
FireStationDto
>
list
=
fireStationMapper
.
getFireStation
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
par
,
getNodeAllnodeIds
(
par
.
getWhereBuildingId
()));
Map
<
String
,
Long
>
num
=
fireStationMapper
.
getFireStationCount
(
par
,
getNodeAllnodeIds
(
par
.
getWhereBuildingId
()));
List
<
String
>
ids
=
null
;
if
(!
"-1"
.
equals
(
par
.
getWhereBuildingId
()))
{
ids
=
getNodeAllnodeIds
(
par
.
getWhereBuildingId
());
}
List
<
FireStationDto
>
list
=
fireStationMapper
.
getFireStation
((
pageNum
-
1
)
*
pageSize
,
pageSize
,
par
,
ids
);
Map
<
String
,
Long
>
num
=
fireStationMapper
.
getFireStationCount
(
par
,
ids
);
Page
<
FireStationDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
,
num
.
get
(
"num"
));
return
pageBean
.
setRecords
(
list
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/KeySiteServiceImpl.java
View file @
64277d6b
...
...
@@ -87,7 +87,10 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
*/
public
IPage
<
KeySiteDto
>
getPageList
(
Page
<
KeySiteDto
>
page
,
String
name
,
Long
buildingId
,
String
fireEnduranceRate
,
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
)
{
List
<
Long
>
ids
=
getNodeAllnodeIds
(
buildingId
);
List
<
Long
>
ids
=
null
;
if
(
buildingId
.
intValue
()!=
-
1
)
{
ids
=
getNodeAllnodeIds
(
buildingId
);
}
return
keySiteMapper
.
getPageList
(
page
,
name
,
ids
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
);
}
...
...
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