Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2f9c11b2
authored
Nov 10, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:空返回PageVO.emptyPage()
parent
5e346a75
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
18 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/dataScreen/impl/DataScreenServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderChildrenInfoServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRoomBedDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/workstation/impl/WorkStationServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
View file @
2f9c11b2
...
@@ -126,7 +126,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
...
@@ -126,7 +126,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
List
<
PlatElderChildrenInfo
>
platElderChildrenInfoList
=
getPlatElderChildrenInfosByOpenid
(
platElderChildrenInfo
.
getOpenid
());
List
<
PlatElderChildrenInfo
>
platElderChildrenInfoList
=
getPlatElderChildrenInfosByOpenid
(
platElderChildrenInfo
.
getOpenid
());
log
.
info
(
"子女端账号:{}"
,
JSON
.
toJSONString
(
platElderChildrenInfo
));
log
.
info
(
"子女端账号:{}"
,
JSON
.
toJSONString
(
platElderChildrenInfo
));
if
(
CollectionUtils
.
isEmpty
(
platElderChildrenInfoList
)){
if
(
CollectionUtils
.
isEmpty
(
platElderChildrenInfoList
)){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
elderIdList
=
platElderChildrenInfoList
.
stream
().
map
(
PlatElderChildrenInfo:
:
getElderId
).
collect
(
Collectors
.
toList
());
List
<
String
>
elderIdList
=
platElderChildrenInfoList
.
stream
().
map
(
PlatElderChildrenInfo:
:
getElderId
).
collect
(
Collectors
.
toList
());
PlatAlarmRecordQueryDTO
data
=
dto
.
getData
();
PlatAlarmRecordQueryDTO
data
=
dto
.
getData
();
...
...
server-service/src/main/java/com/makeit/service/platform/dataScreen/impl/DataScreenServiceImpl.java
View file @
2f9c11b2
...
@@ -429,7 +429,7 @@ public class DataScreenServiceImpl implements DataScreenService {
...
@@ -429,7 +429,7 @@ public class DataScreenServiceImpl implements DataScreenService {
//获取该账号的权限组织
//获取该账号的权限组织
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
dto
.
getType
());
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
dto
.
getType
());
if
(
orgs
.
isEmpty
()){
if
(
orgs
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
...
@@ -440,7 +440,7 @@ public class DataScreenServiceImpl implements DataScreenService {
...
@@ -440,7 +440,7 @@ public class DataScreenServiceImpl implements DataScreenService {
.
in
(
PlatOrg:
:
getId
,
dto
.
getOrgIds
())
.
in
(
PlatOrg:
:
getId
,
dto
.
getOrgIds
())
.
eq
(
PlatOrg:
:
getType
,
dto
.
getType
()));
.
eq
(
PlatOrg:
:
getType
,
dto
.
getType
()));
if
(
platOrgs
.
isEmpty
()){
if
(
platOrgs
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
orgIdList
=
platOrgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIdList
=
platOrgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setOrgIds
(
orgIdList
);
dto
.
setOrgIds
(
orgIdList
);
...
@@ -507,7 +507,7 @@ public class DataScreenServiceImpl implements DataScreenService {
...
@@ -507,7 +507,7 @@ public class DataScreenServiceImpl implements DataScreenService {
//获取该账号的权限组织
//获取该账号的权限组织
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
dto
.
getType
());
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
dto
.
getType
());
if
(
orgs
.
isEmpty
()){
if
(
orgs
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
...
@@ -518,7 +518,7 @@ public class DataScreenServiceImpl implements DataScreenService {
...
@@ -518,7 +518,7 @@ public class DataScreenServiceImpl implements DataScreenService {
.
in
(
PlatOrg:
:
getId
,
dto
.
getOrgIds
())
.
in
(
PlatOrg:
:
getId
,
dto
.
getOrgIds
())
.
eq
(
PlatOrg:
:
getType
,
dto
.
getType
()));
.
eq
(
PlatOrg:
:
getType
,
dto
.
getType
()));
if
(
platOrgs
.
isEmpty
()){
if
(
platOrgs
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
orgIdList
=
platOrgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIdList
=
platOrgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setOrgIds
(
orgIdList
);
dto
.
setOrgIds
(
orgIdList
);
...
@@ -534,7 +534,7 @@ public class DataScreenServiceImpl implements DataScreenService {
...
@@ -534,7 +534,7 @@ public class DataScreenServiceImpl implements DataScreenService {
Page
<
PlatDeviceListVO
>
page
=
platDeviceService
.
getDevices
(
dto
,
p
);
Page
<
PlatDeviceListVO
>
page
=
platDeviceService
.
getDevices
(
dto
,
p
);
List
<
PlatDeviceListVO
>
voList
=
page
.
getRecords
();
List
<
PlatDeviceListVO
>
voList
=
page
.
getRecords
();
if
(
CollectionUtils
.
isEmpty
(
voList
)){
if
(
CollectionUtils
.
isEmpty
(
voList
)){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
spaceIdList
=
voList
.
stream
().
flatMap
(
vo
->
{
List
<
String
>
spaceIdList
=
voList
.
stream
().
flatMap
(
vo
->
{
...
...
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
2f9c11b2
...
@@ -135,7 +135,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -135,7 +135,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
//List<PlatDeviceListVO> voList = BeanDtoVoUtils.listVo(records, PlatDeviceListVO.class);
//List<PlatDeviceListVO> voList = BeanDtoVoUtils.listVo(records, PlatDeviceListVO.class);
if
(
CollectionUtils
.
isEmpty
(
records
))
{
if
(
CollectionUtils
.
isEmpty
(
records
))
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
spaceIdList
=
records
.
stream
().
flatMap
(
vo
->
{
List
<
String
>
spaceIdList
=
records
.
stream
().
flatMap
(
vo
->
{
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderChildrenInfoServiceImpl.java
View file @
2f9c11b2
...
@@ -103,7 +103,7 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
...
@@ -103,7 +103,7 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
List
<
PlatElderChildrenInfoListVO
>
voList
=
BeanDtoVoUtils
.
listVo
(
voPage
.
getRecords
(),
PlatElderChildrenInfoListVO
.
class
);
List
<
PlatElderChildrenInfoListVO
>
voList
=
BeanDtoVoUtils
.
listVo
(
voPage
.
getRecords
(),
PlatElderChildrenInfoListVO
.
class
);
if
(
CollectionUtils
.
isEmpty
(
voList
))
{
if
(
CollectionUtils
.
isEmpty
(
voList
))
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
openIdList
=
voList
.
stream
().
map
(
PlatElderChildrenInfoListVO:
:
getOpenid
).
collect
(
Collectors
.
toList
());
List
<
String
>
openIdList
=
voList
.
stream
().
map
(
PlatElderChildrenInfoListVO:
:
getOpenid
).
collect
(
Collectors
.
toList
());
List
<
PlatElderChildrenInfo
>
platElderChildrenInfos
=
list
(
new
QueryWrapper
<
PlatElderChildrenInfo
>().
lambda
()
List
<
PlatElderChildrenInfo
>
platElderChildrenInfos
=
list
(
new
QueryWrapper
<
PlatElderChildrenInfo
>().
lambda
()
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRoomBedDeviceServiceImpl.java
View file @
2f9c11b2
...
@@ -315,7 +315,7 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
...
@@ -315,7 +315,7 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
});
});
return
PageUtil
.
toPageVO
(
data
,
pages
);
return
PageUtil
.
toPageVO
(
data
,
pages
);
}
else
{
}
else
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/workstation/impl/WorkStationServiceImpl.java
View file @
2f9c11b2
...
@@ -175,7 +175,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -175,7 +175,7 @@ public class WorkStationServiceImpl implements WorkStationService {
//获取该账号的权限组织
//获取该账号的权限组织
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
PlatOrgEnum
.
OrgTypeEnum
.
INSTITUTION
.
getValue
());
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
PlatOrgEnum
.
OrgTypeEnum
.
INSTITUTION
.
getValue
());
if
(
orgs
.
isEmpty
())
{
if
(
orgs
.
isEmpty
())
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setOrgIds
(
orgIds
);
dto
.
setOrgIds
(
orgIds
);
...
@@ -185,7 +185,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -185,7 +185,7 @@ public class WorkStationServiceImpl implements WorkStationService {
List
<
String
>
orgIds
=
orgs
.
stream
().
filter
(
t
->
PlatOrgEnum
.
OrgTypeEnum
.
INSTITUTION
.
getValue
().
equals
(
t
.
getType
()))
List
<
String
>
orgIds
=
orgs
.
stream
().
filter
(
t
->
PlatOrgEnum
.
OrgTypeEnum
.
INSTITUTION
.
getValue
().
equals
(
t
.
getType
()))
.
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
.
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
orgIds
.
isEmpty
()){
if
(
orgIds
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
dto
.
setOrgIds
(
orgIds
);
dto
.
setOrgIds
(
orgIds
);
}
}
...
@@ -194,7 +194,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -194,7 +194,7 @@ public class WorkStationServiceImpl implements WorkStationService {
spaces
=
platSpaceService
.
list
(
new
QueryWrapper
<
PlatSpace
>().
lambda
()
spaces
=
platSpaceService
.
list
(
new
QueryWrapper
<
PlatSpace
>().
lambda
()
.
in
(
PlatSpace:
:
getOrgId
,
dto
.
getOrgIds
()));
.
in
(
PlatSpace:
:
getOrgId
,
dto
.
getOrgIds
()));
if
(
spaces
.
isEmpty
())
{
if
(
spaces
.
isEmpty
())
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
spaceIds
=
spaces
.
stream
().
map
(
PlatSpace:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
spaceIds
=
spaces
.
stream
().
map
(
PlatSpace:
:
getId
).
collect
(
Collectors
.
toList
());
...
@@ -222,7 +222,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -222,7 +222,7 @@ public class WorkStationServiceImpl implements WorkStationService {
});
});
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
elderIdList
.
isEmpty
()){
if
(
elderIdList
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
dto
.
setElderIds
(
elderIdList
);
dto
.
setElderIds
(
elderIdList
);
}
}
...
@@ -233,7 +233,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -233,7 +233,7 @@ public class WorkStationServiceImpl implements WorkStationService {
new
Page
<>(
page
.
getPage
(),
page
.
getLimit
()),
page
.
getData
());
new
Page
<>(
page
.
getPage
(),
page
.
getLimit
()),
page
.
getData
());
List
<
WorkStationInstitutionRoomVO
>
roomVOList
=
pages
.
getRecords
();
List
<
WorkStationInstitutionRoomVO
>
roomVOList
=
pages
.
getRecords
();
if
(
roomVOList
.
isEmpty
())
{
if
(
roomVOList
.
isEmpty
())
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
roomIds
=
roomVOList
.
stream
().
map
(
WorkStationInstitutionRoomVO:
:
getRoomId
).
collect
(
Collectors
.
toList
());
List
<
String
>
roomIds
=
roomVOList
.
stream
().
map
(
WorkStationInstitutionRoomVO:
:
getRoomId
).
collect
(
Collectors
.
toList
());
//获取床号及长者/设备
//获取床号及长者/设备
...
@@ -482,7 +482,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -482,7 +482,7 @@ public class WorkStationServiceImpl implements WorkStationService {
//获取该账号的权限组织
//获取该账号的权限组织
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
PlatOrgEnum
.
OrgTypeEnum
.
HOME
.
getValue
());
List
<
PlatOrg
>
orgs
=
belongToScopeList
(
PlatOrgEnum
.
OrgTypeEnum
.
HOME
.
getValue
());
if
(
orgs
.
isEmpty
())
{
if
(
orgs
.
isEmpty
())
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setOrgIds
(
orgIds
);
dto
.
setOrgIds
(
orgIds
);
...
@@ -492,7 +492,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -492,7 +492,7 @@ public class WorkStationServiceImpl implements WorkStationService {
List
<
String
>
orgIds
=
orgs
.
stream
().
filter
(
t
->
PlatOrgEnum
.
OrgTypeEnum
.
HOME
.
getValue
().
equals
(
t
.
getType
()))
List
<
String
>
orgIds
=
orgs
.
stream
().
filter
(
t
->
PlatOrgEnum
.
OrgTypeEnum
.
HOME
.
getValue
().
equals
(
t
.
getType
()))
.
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
.
map
(
PlatOrg:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
orgIds
.
isEmpty
()){
if
(
orgIds
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
dto
.
setOrgIds
(
orgIds
);
dto
.
setOrgIds
(
orgIds
);
}
}
...
@@ -515,7 +515,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -515,7 +515,7 @@ public class WorkStationServiceImpl implements WorkStationService {
}
}
if
(
spaces
.
isEmpty
())
{
if
(
spaces
.
isEmpty
())
{
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
List
<
String
>
elderIdList
=
new
ArrayList
<>();
List
<
String
>
elderIdList
=
new
ArrayList
<>();
List
<
PlatAlarmRecord
>
alarmRecords
=
platAlarmRecordService
.
list
(
List
<
PlatAlarmRecord
>
alarmRecords
=
platAlarmRecordService
.
list
(
...
@@ -534,7 +534,7 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -534,7 +534,7 @@ public class WorkStationServiceImpl implements WorkStationService {
});
});
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
StringUtil
.
isNotEmpty
(
dto
.
getAlarmType
())){
if
(
elderIdList
.
isEmpty
()){
if
(
elderIdList
.
isEmpty
()){
return
new
PageVO
<>
();
return
PageVO
.
emptyPage
();
}
}
dto
.
setElderIds
(
elderIdList
);
dto
.
setElderIds
(
elderIdList
);
}
}
...
...
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