Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeoFlyApi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GeoFly
GeoFlyApi
Commits
7b73d433
Commit
7b73d433
authored
May 20, 2025
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机场新增和查询优化。
parent
2c27e2da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
sample/src/main/java/com/dji/sample/manage/service/impl/DeviceServiceImpl.java
+15
-1
No files found.
sample/src/main/java/com/dji/sample/manage/service/impl/DeviceServiceImpl.java
View file @
7b73d433
...
...
@@ -669,6 +669,11 @@ public class DeviceServiceImpl extends ServiceImpl<IDeviceMapper, DeviceEntity>
}
DeviceDTO
device
=
devicesList
.
get
(
0
);
device
.
setStatus
(
deviceRedisService
.
checkDeviceOnline
(
sn
));
// 查询 无人机
List
<
DeviceDTO
>
childrenList
=
this
.
getDevicesByParams
(
DeviceQueryParam
.
builder
().
deviceSn
(
device
.
getChildDeviceSn
()).
build
());
if
(!
devicesList
.
isEmpty
())
{
device
.
setChildren
(
childrenList
.
get
(
0
));
}
return
Optional
.
of
(
device
);
}
...
...
@@ -1017,9 +1022,17 @@ public class DeviceServiceImpl extends ServiceImpl<IDeviceMapper, DeviceEntity>
// 飞机存在
if
(
StringUtils
.
hasText
(
drone
.
getWorkspaceId
()))
{
// 假如是绑定了其他客户的设备 那么报错
if
(!
drone
.
getWorkspaceId
().
equals
(
dock
.
getWorkspaceId
()))
{
throw
new
RuntimeException
(
"The current drone has been bound"
);
}
}
else
{
// 绑定了自己的设备
// 是否需要改动什么?
}
}
else
{
// 绑定无人机
LambdaUpdateWrapper
<
DeviceEntity
>
updateDroneWrapper
=
new
LambdaUpdateWrapper
<>();
updateDroneWrapper
.
set
(
DeviceEntity:
:
getWorkspaceId
,
dock
.
getWorkspaceId
());
...
...
@@ -1027,6 +1040,7 @@ public class DeviceServiceImpl extends ServiceImpl<IDeviceMapper, DeviceEntity>
int
updateDroneInt
=
mapper
.
update
(
new
DeviceEntity
(),
updateDroneWrapper
);
}
}
}
addDockEntity
.
setWorkspaceId
(
dock
.
getWorkspaceId
());
// 机场sn
...
...
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