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
e68c8873
authored
Nov 07, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修改bug
parent
c3fb9d0f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
db/上线后sql/update.sql
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.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/PlatElderReportMonthServiceImpl.java
db/上线后sql/update.sql
View file @
e68c8873
ALTER
TABLE
`plat_device_other`
ALTER
TABLE
`plat_device_other`
...
...
@@ -14,4 +14,10 @@ ALTER TABLE `plat_elder_report_month`
MODIFY
COLUMN
`fail_count`
int
(
11
)
COMMENT
'跌倒次数'
AFTER
`respiratory_rate`
,
MODIFY
COLUMN
`heart_exception_count`
int
(
11
)
COMMENT
'心率异常次数'
AFTER
`fail_count`
,
MODIFY
COLUMN
`respiratory_exception_count`
int
(
11
)
COMMENT
'呼吸异常次数'
AFTER
`heart_exception_count`
,
MODIFY
COLUMN
`behavior_exception_count`
int
(
11
)
COMMENT
'行为异常次数'
AFTER
`respiratory_exception_count`
;
\ No newline at end of file
MODIFY
COLUMN
`behavior_exception_count`
int
(
11
)
COMMENT
'行为异常次数'
AFTER
`respiratory_exception_count`
;
ALTER
TABLE
`sys_api_secret`
CHANGE
COLUMN
`publicKey`
`public_key`
varchar
(
1024
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
COMMENT
'公钥'
AFTER
`platform`
,
CHANGE
COLUMN
`privateKey`
`private_key`
varchar
(
2048
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
COMMENT
'私钥'
AFTER
`public_key`
,
CHANGE
COLUMN
`orgId`
`org_id`
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
COMMENT
'机构id'
AFTER
`private_key`
;
\ No newline at end of file
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
View file @
e68c8873
...
...
@@ -33,6 +33,7 @@ import java.io.IOException;
import
java.time.*
;
import
java.time.format.DateTimeFormatter
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.TreeMap
;
...
...
@@ -239,6 +240,9 @@ public class IotProductDeviceService extends IotCommonService {
long
timestamp
=
0
;
for
(
DeviceInfoContentBreathe
deviceInfoContentBreathe
:
deviceInfoContentBreathes
)
{
breatheProperties
=
deviceInfoContentBreathe
.
getProperties
();
if
(
breatheProperties
.
getPerson
()
==
0
)
{
continue
;
}
hr
+=
breatheProperties
.
getHr
();
br
+=
breatheProperties
.
getBr
();
bodymove
+=
breatheProperties
.
getBodymove
();
...
...
@@ -255,6 +259,7 @@ public class IotProductDeviceService extends IotCommonService {
}
}
if
(
CollectionUtils
.
isNotEmpty
(
tempList
))
{
tempList
=
tempList
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceInfoContentBreathe:
:
getTimestamp
)).
collect
(
Collectors
.
toList
());
return
tempList
;
}
return
Lists
.
newArrayList
();
...
...
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
e68c8873
...
...
@@ -210,6 +210,12 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
other
!=
null
)
{
other
.
setAttribute
(
dto
.
getAttribute
());
platDeviceOtherService
.
updateById
(
other
);
}
else
{
other
=
new
PlatDeviceOther
();
other
.
setDeviceId
(
db
.
getId
());
other
.
setOriDeviceId
(
db
.
getOriDeviceId
());
other
.
setAttribute
(
dto
.
getAttribute
());
platDeviceOtherService
.
save
(
other
);
}
// 写入设备
...
...
@@ -307,6 +313,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
wechatEdit
(
PlatDeviceEditWechatDTO
dto
)
{
PlatDevice
db
=
getById
(
dto
.
getId
());
...
...
@@ -456,10 +463,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
platDeviceOtherService
.
updateById
(
other
);
}
if
(
dto
.
getRadarMount
()
!=
null
)
{
PlatDevice
platDevice
=
getOne
(
new
QueryWrapper
<
PlatDevice
>().
lambda
().
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
));
//更新区域设置设备安装方式
platRegionSettingService
.
update
(
new
UpdateWrapper
<
PlatRegionSetting
>().
lambda
()
.
set
(
PlatRegionSetting:
:
getInstallType
,
dto
.
getRadarMount
())
.
eq
(
PlatRegionSetting:
:
getDeviceId
,
deviceId
));
.
eq
(
PlatRegionSetting:
:
getDeviceId
,
platDevice
.
getId
()
));
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderReportMonthServiceImpl.java
View file @
e68c8873
...
...
@@ -143,7 +143,7 @@ public class PlatElderReportMonthServiceImpl extends ServiceImpl<PlatElderReport
@Override
@TenantIdIgnore
public
void
reportMonthJob
()
{
LocalDate
nowDate
=
LocalDate
.
now
()
.
minusDays
(
6
)
;
LocalDate
nowDate
=
LocalDate
.
now
();
LocalDate
yesDate
=
nowDate
.
minusDays
(
1
);
LocalDateTime
yesStart
=
LocalDateTimeUtils
.
getDayStart
(
yesDate
);
...
...
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