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
8383f541
authored
Feb 01, 2024
by
汪志阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:中度睡眠计算
parent
aad41a52
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
View file @
8383f541
...
@@ -888,17 +888,17 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -888,17 +888,17 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
PlatElder
elder
=
platElderService
.
getOne
(
new
QueryWrapper
<
PlatElder
>().
lambda
()
PlatElder
elder
=
platElderService
.
getOne
(
new
QueryWrapper
<
PlatElder
>().
lambda
()
.
eq
(
PlatElder:
:
getBedId
,
bedId
));
.
eq
(
PlatElder:
:
getBedId
,
bedId
));
// || !"1712648603580764161".equals(elder.getId())
// || !"1712648603580764161".equals(elder.getId())
if
(
elder
==
null
||
!
"1712648603580764161"
.
equals
(
elder
.
getId
())
)
{
if
(
elder
==
null
)
{
continue
;
continue
;
}
}
PlatDevice
platDevice
=
platDeviceService
.
getById
(
platRoomBedDevice
.
getDeviceId
());
PlatDevice
platDevice
=
platDeviceService
.
getById
(
platRoomBedDevice
.
getDeviceId
());
// || !"218A00XE2669104".equals(platDevice.getOriDeviceId())
// || !"218A00XE2669104".equals(platDevice.getOriDeviceId())
if
(
platDevice
==
null
||
!
"218A00XE2669104"
.
equals
(
platDevice
.
getOriDeviceId
())
)
{
if
(
platDevice
==
null
)
{
continue
;
continue
;
}
}
String
tenantId
=
elder
.
getTenantId
();
String
tenantId
=
elder
.
getTenantId
();
dayHourRangeList
=
Lists
.
newArrayList
(
"2024-01-29 23:38:00~2024-01-30 01:53:00"
);
//
dayHourRangeList = Lists.newArrayList("2024-01-29 23:38:00~2024-01-30 01:53:00");
for
(
String
hourRange
:
dayHourRangeList
)
{
for
(
String
hourRange
:
dayHourRangeList
)
{
String
[]
hourRangeArray
=
hourRange
.
split
(
"~"
);
String
[]
hourRangeArray
=
hourRange
.
split
(
"~"
);
List
<
DeviceOperationLogEntity
>
deviceOperationLogEntities
=
productDeviceService
.
getDeviceLogByTimeRange
(
platDevice
.
getOriDeviceId
(),
"reportProperty"
,
5000
,
hourRangeArray
[
0
],
hourRangeArray
[
1
]);
List
<
DeviceOperationLogEntity
>
deviceOperationLogEntities
=
productDeviceService
.
getDeviceLogByTimeRange
(
platDevice
.
getOriDeviceId
(),
"reportProperty"
,
5000
,
hourRangeArray
[
0
],
hourRangeArray
[
1
]);
...
@@ -923,8 +923,6 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -923,8 +923,6 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
totalMap
.
putAll
(
statisticsMap
);
totalMap
.
putAll
(
statisticsMap
);
}
}
}
}
// 本地测试用
// totalMap = deviceLogService.getData();
if
(
CollUtil
.
isEmpty
(
totalMap
))
{
if
(
CollUtil
.
isEmpty
(
totalMap
))
{
continue
;
continue
;
}
}
...
...
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