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
302baa34
authored
Sep 28, 2023
by
朱淼
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix bug
parent
4657e37c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
59 deletions
server-service/src/main/java/com/makeit/service/platform/workstation/impl/WorkStationServiceImpl.java
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderCenterWechatServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/workstation/impl/WorkStationServiceImpl.java
View file @
302baa34
...
@@ -254,29 +254,24 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -254,29 +254,24 @@ public class WorkStationServiceImpl implements WorkStationService {
r
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
r
.
getElderId
()));
r
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
r
.
getElderId
()));
}
}
if
(
StringUtil
.
isNotEmpty
(
r
.
getOriDeviceId
())){
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
platElderIdDTO
.
setElderId
(
r
.
getElderId
());
platElderIdDTO
.
setElderId
(
r
.
getElderId
());
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
platElderIdDTO
.
setDeviceId
(
r
.
getOriDeviceId
());
if
(
nowStatus
.
getStatus
()!=
null
){
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
DeviceInfoContentBreathe
deviceInfoContentBreathe
=
getNowDataBreathe
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
if
(
nowStatus
.
getStatus
()!=
null
){
//离床:雷达状态上报无人
DeviceInfoContentBreathe
deviceInfoContentBreathe
=
getNowDataBreathe
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
//翻身:雷达上报的数据符合IOT平台睡眠质量分析模型中配置的翻身规则
//离床:雷达状态上报无人
//睡眠:雷达上报的数据符合IOT平台睡眠质量分析模型中的入睡时间,状态变更为睡眠
//翻身:雷达上报的数据符合IOT平台睡眠质量分析模型中配置的翻身规则
//静息:雷达上报有人,且非睡眠
//睡眠:雷达上报的数据符合IOT平台睡眠质量分析模型中的入睡时间,状态变更为睡眠
if
(
DeviceInfoContentBreatheEnum
.
PersonStateEnum
.
NOBODY
.
getValue
().
equals
(
nowStatus
.
getStatus
())){
//静息:雷达上报有人,且非睡眠
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
OUT
.
getValue
());
if
(
DeviceInfoContentBreatheEnum
.
PersonStateEnum
.
NOBODY
.
getValue
().
equals
(
nowStatus
.
getStatus
())){
}
else
if
(
nowStatus
.
getBodyMove
()!=
null
&&
nowStatus
.
getBodyMove
()
>
turnedThreshold
){
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
OUT
.
getValue
());
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
TURNED
.
getValue
());
}
else
if
(
nowStatus
.
getBodyMove
()!=
null
&&
nowStatus
.
getBodyMove
()
>
turnedThreshold
){
}
else
{
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
TURNED
.
getValue
());
List
<
PlatElderCoordinateVO
>
coordinateList
=
platElderDayReportDayService
.
coordinateList
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
(),
start
,
now
);
}
else
{
nowStatusRest
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
,
coordinateList
);
List
<
PlatElderCoordinateVO
>
coordinateList
=
platElderDayReportDayService
.
coordinateList
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
(),
start
,
now
);
nowStatusSleep
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
);
nowStatusRest
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
,
coordinateList
);
nowStatusSleep
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
);
}
}
}
}
}
}
}
}
}
...
@@ -395,8 +390,10 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -395,8 +390,10 @@ public class WorkStationServiceImpl implements WorkStationService {
typeMap
.
put
(
a
.
getAlarmType
(),
a
.
getRemark
());
typeMap
.
put
(
a
.
getAlarmType
(),
a
.
getRemark
());
}
}
}
else
{
}
else
if
(
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
FALL
.
getValue
().
equals
(
a
.
getAlarmType
())){
typeMap
.
put
(
a
.
getAlarmType
(),
""
);
typeMap
.
put
(
a
.
getAlarmType
(),
PlatAlarmRecordType
.
FALL
.
getName
());
}
else
if
(
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
BEHAVIOR
.
getValue
().
equals
(
a
.
getAlarmType
())){
typeMap
.
put
(
a
.
getAlarmType
(),
PlatAlarmRecordType
.
BEHAVIOR
.
getName
());
}
}
map
.
put
(
e
,
typeMap
);
map
.
put
(
e
,
typeMap
);
}
}
...
@@ -529,15 +526,13 @@ public class WorkStationServiceImpl implements WorkStationService {
...
@@ -529,15 +526,13 @@ public class WorkStationServiceImpl implements WorkStationService {
vo
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
vo
.
getElderId
()));
vo
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
vo
.
getElderId
()));
}
}
if
(
StringUtil
.
isNotEmpty
(
vo
.
getOriDeviceId
())){
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
platElderIdDTO
.
setElderId
(
vo
.
getElderId
());
platElderIdDTO
.
setElderId
(
vo
.
getElderId
());
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
platElderIdDTO
.
setDeviceId
(
vo
.
getOriDeviceId
());
vo
.
setElderStatus
(
nowStatus
.
getStatus
());
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
vo
.
setHeartRate
(
nowStatus
.
getHeartRate
());
vo
.
setElderStatus
(
nowStatus
.
getStatus
());
vo
.
setRespiratoryRate
(
nowStatus
.
getRespiratoryRate
());
vo
.
setHeartRate
(
nowStatus
.
getHeartRate
());
vo
.
setRespiratoryRate
(
nowStatus
.
getRespiratoryRate
());
}
}
}
}
}
return
PageUtil
.
toPageVO
(
pages
);
return
PageUtil
.
toPageVO
(
pages
);
...
...
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderCenterWechatServiceImpl.java
View file @
302baa34
...
@@ -117,15 +117,12 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
...
@@ -117,15 +117,12 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
vo
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
vo
.
getElderId
()));
vo
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
vo
.
getElderId
()));
}
}
if
(
StringUtil
.
isNotEmpty
(
vo
.
getOriDeviceId
())){
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
platElderIdDTO
.
setElderId
(
vo
.
getElderId
());
platElderIdDTO
.
setElderId
(
vo
.
getElderId
());
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
platElderIdDTO
.
setDeviceId
(
vo
.
getOriDeviceId
());
vo
.
setElderStatus
(
nowStatus
.
getStatus
());
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
vo
.
setHeartRate
(
nowStatus
.
getHeartRate
());
vo
.
setElderStatus
(
nowStatus
.
getStatus
());
vo
.
setRespiratoryRate
(
nowStatus
.
getRespiratoryRate
());
vo
.
setHeartRate
(
nowStatus
.
getHeartRate
());
vo
.
setRespiratoryRate
(
nowStatus
.
getRespiratoryRate
());
}
}
}
}
}
homeVo
.
setElderNumber
(
elders
.
size
());
homeVo
.
setElderNumber
(
elders
.
size
());
...
@@ -199,24 +196,20 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
...
@@ -199,24 +196,20 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
r
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
r
.
getElderId
()));
r
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
r
.
getElderId
()));
}
}
if
(
StringUtil
.
isNotEmpty
(
r
.
getOriDeviceId
()))
{
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
PlatElderIdDTO
platElderIdDTO
=
new
PlatElderIdDTO
();
platElderIdDTO
.
setElderId
(
r
.
getElderId
());
platElderIdDTO
.
setElderId
(
r
.
getElderId
());
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
platElderIdDTO
.
setDeviceId
(
r
.
getOriDeviceId
());
if
(
nowStatus
.
getStatus
()!=
null
){
PlatElderRealTimeNowVO
nowStatus
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
DeviceInfoContentBreathe
deviceInfoContentBreathe
=
workStationService
.
getNowDataBreathe
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
if
(
nowStatus
.
getStatus
()!=
null
){
if
(
DeviceInfoContentBreatheEnum
.
PersonStateEnum
.
NOBODY
.
getValue
().
equals
(
nowStatus
.
getStatus
()))
{
DeviceInfoContentBreathe
deviceInfoContentBreathe
=
workStationService
.
getNowDataBreathe
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
OUT
.
getValue
());
if
(
DeviceInfoContentBreatheEnum
.
PersonStateEnum
.
NOBODY
.
getValue
().
equals
(
nowStatus
.
getStatus
()))
{
}
else
if
(
nowStatus
.
getBodyMove
()
!=
null
&&
nowStatus
.
getBodyMove
()
>
turnedThreshold
)
{
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
OUT
.
getValue
());
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
TURNED
.
getValue
());
}
else
if
(
nowStatus
.
getBodyMove
()
!=
null
&&
nowStatus
.
getBodyMove
()
>
turnedThreshold
)
{
}
else
{
r
.
setElderStatus
(
WorkStationStatusEnum
.
NowStatus
.
TURNED
.
getValue
());
List
<
PlatElderCoordinateVO
>
coordinateList
=
platElderDayReportDayService
.
coordinateList
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
(),
start
,
now
);
}
else
{
workStationService
.
nowStatusRest
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
,
coordinateList
);
List
<
PlatElderCoordinateVO
>
coordinateList
=
platElderDayReportDayService
.
coordinateList
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
(),
start
,
now
);
workStationService
.
nowStatusSleep
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
);
workStationService
.
nowStatusRest
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
,
coordinateList
);
workStationService
.
nowStatusSleep
(
r
,
platElderIdDTO
,
deviceInfoContentBreathe
);
}
}
}
}
}
}
}
}
}
...
...
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