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
b2048f88
authored
Oct 11, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 修复
parent
edb9d060
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
View file @
b2048f88
...
@@ -450,8 +450,26 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -450,8 +450,26 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
List
<
PlatDevice
>
deviceListSpace
=
getSpaceDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
List
<
PlatDevice
>
deviceListSpace
=
getSpaceDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
List
<
PlatDevice
>
deviceListFall
=
getFallDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
List
<
PlatDevice
>
deviceListFall
=
getFallDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
int
count
=
20
;
for
(
PlatDevice
platDevice
:
deviceListSpace
)
{
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
PlatElderCoordinateVO
vo
=
new
PlatElderCoordinateVO
();
int
distance
=
RandomUtils
.
nextInt
(
1
,
1000
);
int
angle
=
RandomUtils
.
nextInt
(
1
,
180
)
-
120
;
// vo.setX(new BigDecimal(distance).multiply(new BigDecimal(Math.cos(angle) + "")).setScale(2, RoundingMode.HALF_UP));
// vo.setY(new BigDecimal(distance).multiply(new BigDecimal(Math.sin(angle) + "")).setScale(2, RoundingMode.HALF_UP));
if
(
CollectionUtils
.
isNotEmpty
(
deviceListSpace
))
{
vo
.
setDistance
(
distance
);
vo
.
setAngle
(
angle
);
vo
.
setDeviceId
(
platDevice
.
getId
());
vo
.
setOriDeviceId
(
platDevice
.
getOriDeviceId
());
voList
.
add
(
vo
);
}
}
/* if (CollectionUtils.isNotEmpty(deviceListSpace)) {
deviceListSpace.forEach(e -> {
deviceListSpace.forEach(e -> {
DeviceInfoContentSpace i = iotProductDeviceService.getLastDeviceLogSpace(e.getOriDeviceId(), 10);
DeviceInfoContentSpace i = iotProductDeviceService.getLastDeviceLogSpace(e.getOriDeviceId(), 10);
if (i == null) {
if (i == null) {
...
@@ -491,7 +509,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -491,7 +509,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
voList.add(vo);
voList.add(vo);
});
});
}
}
*/
return
voList
;
return
voList
;
}
}
...
...
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