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
aed900b0
authored
Dec 19, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat:放开激活按钮限制
parent
56fa142d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
aed900b0
...
...
@@ -895,7 +895,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
saasPidManageService
.
updateById
(
saasPidManage
);
// 先为了业务测试注释
/*
String active = shengwangHttpUtil.active(platDevice.getOriDeviceId(),saasPidManage.getPid());
String
active
=
shengwangHttpUtil
.
active
(
platDevice
.
getOriDeviceId
(),
saasPidManage
.
getPid
());
ApiResponseEntity
responseEntity
=
JSON
.
parseObject
(
active
,
ApiResponseEntity
.
class
);
if
(
responseEntity
.
getCode
()
!=
200
)
{
throw
new
RuntimeException
(
responseEntity
.
getMessage
());
...
...
@@ -917,7 +917,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
StringUtils
.
isNotEmpty
(
result
))
{
throw
new
RuntimeException
(
result
);
}
}
*/
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
View file @
aed900b0
...
...
@@ -27,6 +27,7 @@ import com.makeit.service.saas.*;
import
com.makeit.utils.data.convert.JsonUtil
;
import
com.makeit.utils.data.convert.StreamUtil
;
import
com.makeit.vo.platform.elder.report.day.PlatSleepRangeVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -49,6 +50,7 @@ import java.util.stream.Collectors;
* @since 2023-09-13
*/
@Service
@Slf4j
public
class
PlatElderSleepServiceImpl
extends
ServiceImpl
<
PlatElderSleepMapper
,
PlatElderSleep
>
implements
PlatElderSleepService
{
private
static
final
DateTimeFormatter
DEFAULT_FORMATTER
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm"
);
...
...
@@ -281,6 +283,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
}
if
(
totalMap
.
isEmpty
())
{
log
.
info
(
"呼吸设备上报的数据为空"
);
continue
;
}
...
...
@@ -482,6 +485,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
Map
<
String
,
List
<
SleepTimeAnalysisVO
>>
sleepMap
=
StreamUtil
.
groupBy
(
sleepTimeAnalysisVOList
,
SleepTimeAnalysisVO:
:
getType
);
List
<
SleepTimeAnalysisVO
>
sleepList
=
sleepMap
.
get
(
SleepTypeEnum
.
SLEEP
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
sleepList
))
{
log
.
info
(
"通过模型分析得出长者没有睡觉"
);
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