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
225be5f1
Commit
225be5f1
authored
Jan 08, 2026
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改临时任务保存路径。
parent
68659e0c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
2 deletions
+53
-2
cloud-sdk/src/main/java/com/dji/sdk/cloudapi/control/TakeoffToPointRequest.java
+32
-0
sample/src/main/java/com/dji/sample/control/service/impl/ControlServiceImpl.java
+15
-0
sample/src/main/java/com/dji/sample/media/service/impl/MediaServiceImpl.java
+6
-2
No files found.
cloud-sdk/src/main/java/com/dji/sdk/cloudapi/control/TakeoffToPointRequest.java
View file @
225be5f1
...
@@ -25,6 +25,12 @@ public class TakeoffToPointRequest extends BaseModel {
...
@@ -25,6 +25,12 @@ public class TakeoffToPointRequest extends BaseModel {
@NotNull
@NotNull
private
String
flightId
;
private
String
flightId
;
private
String
flightName
;
private
String
dockSn
;
private
String
dockNickName
;
private
String
orgId
;
private
String
orgId
;
@Min
(-
180
)
@Min
(-
180
)
...
@@ -119,6 +125,32 @@ public class TakeoffToPointRequest extends BaseModel {
...
@@ -119,6 +125,32 @@ public class TakeoffToPointRequest extends BaseModel {
return
this
;
return
this
;
}
}
public
String
getFlightName
()
{
return
flightName
;
}
public
TakeoffToPointRequest
setFlightName
(
String
flightName
)
{
this
.
flightName
=
flightName
;
return
this
;
}
public
String
getDockSn
()
{
return
dockSn
;
}
public
TakeoffToPointRequest
setDockSn
(
String
dockSn
)
{
this
.
dockSn
=
dockSn
;
return
this
;
}
public
String
getDockNickName
()
{
return
dockNickName
;
}
public
TakeoffToPointRequest
setDockNickName
(
String
dockNickName
)
{
this
.
dockNickName
=
dockNickName
;
return
this
;
}
public
String
getOrgId
()
{
public
String
getOrgId
()
{
return
orgId
;
return
orgId
;
}
}
...
...
sample/src/main/java/com/dji/sample/control/service/impl/ControlServiceImpl.java
View file @
225be5f1
...
@@ -37,6 +37,8 @@ import org.springframework.beans.factory.annotation.Qualifier;
...
@@ -37,6 +37,8 @@ import org.springframework.beans.factory.annotation.Qualifier;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -195,6 +197,19 @@ public class ControlServiceImpl implements IControlService {
...
@@ -195,6 +197,19 @@ public class ControlServiceImpl implements IControlService {
param
.
setFlightId
(
UUID
.
randomUUID
().
toString
());
param
.
setFlightId
(
UUID
.
randomUUID
().
toString
());
TakeoffToPointRequest
takeoffToPointRequest
=
mapper
.
convertValue
(
param
,
TakeoffToPointRequest
.
class
);
TakeoffToPointRequest
takeoffToPointRequest
=
mapper
.
convertValue
(
param
,
TakeoffToPointRequest
.
class
);
takeoffToPointRequest
.
setOrgId
(
SecurityUtils
.
getOrgId
());
takeoffToPointRequest
.
setOrgId
(
SecurityUtils
.
getOrgId
());
// 名字
Optional
<
DeviceDTO
>
dockOpt
=
deviceRedisService
.
getDeviceOnline
(
sn
);
DeviceDTO
dockDTO
=
new
DeviceDTO
();
if
(
dockOpt
.
isPresent
())
{
dockDTO
=
dockOpt
.
get
();
}
String
dockNickName
=
dockDTO
.
getNickname
();
takeoffToPointRequest
.
setDockSn
(
sn
);
takeoffToPointRequest
.
setDockNickName
(
dockNickName
);
String
timeStr
=
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyyMMddHHmmss"
));
String
flightName
=
dockNickName
+
"_"
+
timeStr
;
takeoffToPointRequest
.
setFlightName
(
flightName
);
RedisOpsUtils
.
setWithExpire
(
"templateTask:"
+
param
.
getFlightId
(),
takeoffToPointRequest
,
24
*
60
*
60
);
RedisOpsUtils
.
setWithExpire
(
"templateTask:"
+
param
.
getFlightId
(),
takeoffToPointRequest
,
24
*
60
*
60
);
TopicServicesResponse
<
ServicesReplyData
>
response
=
abstractControlService
.
takeoffToPoint
(
TopicServicesResponse
<
ServicesReplyData
>
response
=
abstractControlService
.
takeoffToPoint
(
...
...
sample/src/main/java/com/dji/sample/media/service/impl/MediaServiceImpl.java
View file @
225be5f1
...
@@ -182,11 +182,15 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
...
@@ -182,11 +182,15 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
String
orgId
=
takeoffToPointRequest
.
getOrgId
();
String
orgId
=
takeoffToPointRequest
.
getOrgId
();
String
prePath
=
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
()
+
"/"
+
orgId
+
"/"
+
takeoffToPointRequest
.
getDockNickName
()
+
"/临时任务"
;
if
(
path
.
contains
(
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
()))
{
if
(
path
.
contains
(
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
()))
{
path
=
path
.
replace
(
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
(),
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
()
+
"/"
+
orgId
+
"/临时任务"
);
path
=
path
.
replace
(
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
(),
prePath
);
}
else
{
}
else
{
path
=
path
.
replace
(
OssConfiguration
.
objectDirPrefix
,
OssConfiguration
.
objectDirPrefix
+
"/"
+
device
.
getWorkspaceId
()
+
"/"
+
orgId
+
"/临时任务"
);
path
=
path
.
replace
(
OssConfiguration
.
objectDirPrefix
,
prePath
);
}
}
// 过滤变更名字
path
=
path
.
replace
(
callback
.
getFile
().
getExt
().
getFlightId
(),
takeoffToPointRequest
.
getFlightName
());
String
moveFilePath
=
path
;
String
moveFilePath
=
path
;
file
.
setPath
(
path
);
file
.
setPath
(
path
);
...
...
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