Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
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
王衍超
cloud-fb
Commits
2ada3539
Commit
2ada3539
authored
Mar 24, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
场站列表增加场站状态的筛选条件
parent
a40579be
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
StationDao.java
....biz/src/main/java/com/xyst/dinas/biz/dao/StationDao.java
+1
-1
StationDaoImpl.java
.../java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
+4
-1
StationServiceImpl.java
...m/xyst/dinas/biz/internal/service/StationServiceImpl.java
+2
-2
StationService.java
.../main/java/com/xyst/dinas/biz/service/StationService.java
+1
-1
StationController.java
...c/main/java/com/xyst/dinas/biz/web/StationController.java
+4
-5
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/dao/StationDao.java
View file @
2ada3539
...
...
@@ -11,7 +11,7 @@ public interface StationDao extends BaseDao {
KObject
load
(
UUID
id
);
Page
<
KObject
>
listStationInfoPaging
(
Page
<
KObject
>
page
);
Page
<
KObject
>
listStationInfoPaging
(
Page
<
KObject
>
page
,
Integer
stationStatus
);
UUID
create
(
KObject
kObject
);
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
View file @
2ada3539
...
...
@@ -31,12 +31,15 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
}
@Override
public
Page
<
KObject
>
listStationInfoPaging
(
Page
<
KObject
>
page
)
{
public
Page
<
KObject
>
listStationInfoPaging
(
Page
<
KObject
>
page
,
Integer
stationStatus
)
{
// UUID departmentId = AminoContextHolder.getContext().getStaff().get("department").getUuid("id");
KClass
bean
=
Amino
.
getStaticMetadataContext
().
getBean
(
StationConstant
.
ENTITY
,
KClass
.
class
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
// detachedCriteria.add(Restrictions.eq("department.id", departmentId));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
if
(
null
!=
stationStatus
){
detachedCriteria
.
add
(
Restrictions
.
eq
(
"stationStatus"
,
stationStatus
));
}
int
offset
=
page
.
getPageSize
()
*
(
page
.
getPageNo
()
-
1
);
List
<
KObject
>
list
=
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
,
offset
,
page
.
getPageSize
());
page
.
setDatas
(
list
);
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/service/StationServiceImpl.java
View file @
2ada3539
...
...
@@ -18,11 +18,11 @@ public class StationServiceImpl implements StationService {
private
StationDao
stationDao
;
@Override
public
Page
<
KObject
>
queryByPaging
(
Page
<
KObject
>
page
)
throws
Exception
{
public
Page
<
KObject
>
queryByPaging
(
Page
<
KObject
>
page
,
Integer
stationStatus
)
throws
Exception
{
if
(
page
.
getPageNo
()==
0
||
page
.
getPageSize
()==
0
)
{
throw
new
Exception
(
"pageSize or offset is null"
);
}
return
stationDao
.
listStationInfoPaging
(
page
);
return
stationDao
.
listStationInfoPaging
(
page
,
stationStatus
);
}
@Override
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/service/StationService.java
View file @
2ada3539
...
...
@@ -7,7 +7,7 @@ import java.util.UUID;
public
interface
StationService
{
Page
<
KObject
>
queryByPaging
(
Page
<
KObject
>
page
)
throws
Exception
;
Page
<
KObject
>
queryByPaging
(
Page
<
KObject
>
page
,
Integer
stationStatus
)
throws
Exception
;
UUID
addStation
(
KObject
kObject
);
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/web/StationController.java
View file @
2ada3539
...
...
@@ -29,18 +29,17 @@ public class StationController {
@Autowired
private
StationService
stationService
;
@RequestMapping
(
value
=
"list/page"
,
method
=
RequestMethod
.
GET
)
public
ResponseObj
getListPage
(
@RequestParam
(
name
=
"pageNo"
,
required
=
false
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
Integer
pageSize
)
throws
Exception
{
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
name
=
"stationStatus"
,
required
=
false
)
Integer
stationStatus
)
throws
Exception
{
Page
<
KObject
>
objectPage
=
new
Page
<>();
objectPage
.
setPageNo
(
pageNo
);
objectPage
.
setPageSize
(
pageSize
);
return
ResponseObj
.
success
(
"查询成功"
,
stationService
.
queryByPaging
(
objectPage
));
return
ResponseObj
.
success
(
"查询成功"
,
stationService
.
queryByPaging
(
objectPage
,
stationStatus
));
}
...
...
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