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
0e53f7c2
authored
Dec 29, 2023
by
汪志阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:起床清醒时间判断
parent
7e54fc62
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
5 deletions
server-module/src/main/java/com/makeit/module/controller/elder/PlatElderSleepController.java
server-service/src/main/java/com/makeit/service/platform/elder/PlatElderBreatheAnalysisService.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderBreatheAnalysisServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
server-service/src/main/java/com/makeit/vo/platform/elder/wakeUpAnalysisVO.java
server-module/src/main/java/com/makeit/module/controller/elder/PlatElderSleepController.java
View file @
0e53f7c2
...
@@ -12,6 +12,7 @@ import com.makeit.global.annotation.AuthIgnore;
...
@@ -12,6 +12,7 @@ import com.makeit.global.annotation.AuthIgnore;
import
com.makeit.global.aspect.tenant.TenantIdIgnore
;
import
com.makeit.global.aspect.tenant.TenantIdIgnore
;
import
com.makeit.service.platform.device.PlatDeviceService
;
import
com.makeit.service.platform.device.PlatDeviceService
;
import
com.makeit.service.platform.elder.*
;
import
com.makeit.service.platform.elder.*
;
import
com.makeit.vo.platform.elder.wakeUpAnalysisVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -151,5 +152,14 @@ public class PlatElderSleepController {
...
@@ -151,5 +152,14 @@ public class PlatElderSleepController {
huiNengService
.
bodyAlarm
(
"1712384736845950978"
,
"219A04X1856F6D8"
,
jsonObject
);
huiNengService
.
bodyAlarm
(
"1712384736845950978"
,
"219A04X1856F6D8"
,
jsonObject
);
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@ApiOperation
(
"起床测试"
)
@GetMapping
(
"getup"
)
@AuthIgnore
@TenantIdIgnore
public
ApiResponseEntity
<
List
<
wakeUpAnalysisVO
>>
elderGetUpAnalysisTask
(
@RequestParam
Integer
month
,
@RequestParam
Integer
day
)
{
return
ApiResponseUtils
.
success
(
platElderBreatheAnalysisService
.
elderGetUpAnalysisTask
(
month
,
day
));
}
}
}
server-service/src/main/java/com/makeit/service/platform/elder/PlatElderBreatheAnalysisService.java
View file @
0e53f7c2
...
@@ -2,6 +2,7 @@ package com.makeit.service.platform.elder;
...
@@ -2,6 +2,7 @@ package com.makeit.service.platform.elder;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.makeit.entity.platform.elder.PlatElderBreatheAnalysis
;
import
com.makeit.entity.platform.elder.PlatElderBreatheAnalysis
;
import
com.makeit.vo.platform.elder.wakeUpAnalysisVO
;
import
java.util.List
;
import
java.util.List
;
...
@@ -16,4 +17,6 @@ import java.util.List;
...
@@ -16,4 +17,6 @@ import java.util.List;
public
interface
PlatElderBreatheAnalysisService
extends
IService
<
PlatElderBreatheAnalysis
>
{
public
interface
PlatElderBreatheAnalysisService
extends
IService
<
PlatElderBreatheAnalysis
>
{
List
<
PlatElderBreatheAnalysis
>
elderHeartRespiratoryAnalysisTask
(
Integer
month
,
Integer
day
);
List
<
PlatElderBreatheAnalysis
>
elderHeartRespiratoryAnalysisTask
(
Integer
month
,
Integer
day
);
List
<
wakeUpAnalysisVO
>
elderGetUpAnalysisTask
(
Integer
month
,
Integer
day
);
}
}
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderBreatheAnalysisServiceImpl.java
View file @
0e53f7c2
This diff is collapsed.
Click to expand it.
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
View file @
0e53f7c2
...
@@ -89,11 +89,6 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -89,11 +89,6 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
public
List
<
PlatElderSleepAnalysis
>
elderSleepSleepAnalysisTask
(
Integer
month
,
Integer
day
)
{
public
List
<
PlatElderSleepAnalysis
>
elderSleepSleepAnalysisTask
(
Integer
month
,
Integer
day
)
{
List
<
String
>
dayHourRangeList
=
getLastDayHourRange
(
month
,
day
);
List
<
String
>
dayHourRangeList
=
getLastDayHourRange
(
month
,
day
);
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(new Date());
// calendar.add(Calendar.DAY_OF_MONTH, -1);
// Date previousDate = calendar.getTime();
// String currentDate = DateUtil.format(previousDate, DatePattern.NORM_DATE_PATTERN);
String
currentDate
=
LocalDate
.
now
().
minusDays
(
1
).
toString
();
String
currentDate
=
LocalDate
.
now
().
minusDays
(
1
).
toString
();
if
(
month
!=
null
&&
day
!=
null
){
if
(
month
!=
null
&&
day
!=
null
){
currentDate
=
LocalDate
.
of
(
2023
,
month
,
day
).
minusDays
(
1
).
toString
();
currentDate
=
LocalDate
.
of
(
2023
,
month
,
day
).
minusDays
(
1
).
toString
();
...
@@ -155,6 +150,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -155,6 +150,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
.
filter
(
deviceOperationLogEntity
->
deviceOperationLogEntity
.
getType
().
contains
(
"reportProperty"
))
.
filter
(
deviceOperationLogEntity
->
deviceOperationLogEntity
.
getType
().
contains
(
"reportProperty"
))
.
map
(
deviceOperationLogEntity
->
{
.
map
(
deviceOperationLogEntity
->
{
DeviceInfoContentBreathe
deviceInfoContentBreathe
=
JsonUtil
.
toObj
((
String
)
deviceOperationLogEntity
.
getContent
(),
DeviceInfoContentBreathe
.
class
);
DeviceInfoContentBreathe
deviceInfoContentBreathe
=
JsonUtil
.
toObj
((
String
)
deviceOperationLogEntity
.
getContent
(),
DeviceInfoContentBreathe
.
class
);
assert
deviceInfoContentBreathe
!=
null
;
deviceInfoContentBreathe
.
setReportTime
(
formatLongTime
(
deviceInfoContentBreathe
.
getTimestamp
()));
deviceInfoContentBreathe
.
setReportTime
(
formatLongTime
(
deviceInfoContentBreathe
.
getTimestamp
()));
return
deviceInfoContentBreathe
;
return
deviceInfoContentBreathe
;
})
})
...
...
server-service/src/main/java/com/makeit/vo/platform/elder/wakeUpAnalysisVO.java
0 → 100644
View file @
0e53f7c2
package
com
.
makeit
.
vo
.
platform
.
elder
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @author wangzy
* @description
* @createDate 2023-12-29-14:48
*/
@Data
public
class
wakeUpAnalysisVO
{
private
List
<
LocalDateTime
>
wakeUpList
;
private
List
<
LocalDateTime
>
leaveOverTimeList
;
private
String
elderId
;
private
String
name
;
}
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