|
|
@@ -19,7 +19,9 @@ import com.dji.sample.media.dao.IFileSumMapper;
|
|
|
import com.dji.sample.media.model.*;
|
|
|
import com.dji.sample.media.service.IFileService;
|
|
|
import com.dji.sample.media.service.IMediaDirService;
|
|
|
+import com.dji.sample.wayline.dao.IWaylineJobMapper;
|
|
|
import com.dji.sample.wayline.model.dto.WaylineJobDTO;
|
|
|
+import com.dji.sample.wayline.model.entity.WaylineJobEntity;
|
|
|
import com.dji.sample.wayline.service.IWaylineFileService;
|
|
|
import com.dji.sample.wayline.service.IWaylineJobService;
|
|
|
import com.dji.sdk.cloudapi.device.DeviceEnum;
|
|
|
@@ -66,6 +68,9 @@ public class FileServiceImpl implements IFileService {
|
|
|
@Autowired
|
|
|
private IFileMapper mapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IWaylineJobMapper waylineJobMapper;
|
|
|
+
|
|
|
@Autowired
|
|
|
private IFileSumMapper sumMapper;
|
|
|
|
|
|
@@ -81,9 +86,6 @@ public class FileServiceImpl implements IFileService {
|
|
|
@Autowired
|
|
|
private IWaylineFileService waylineFileService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private IWaylineJobService waylineJobService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private IGroupElementService groupElementService;
|
|
|
|
|
|
@@ -449,7 +451,7 @@ public class FileServiceImpl implements IFileService {
|
|
|
|
|
|
private String getWaylineName(String workspaceId, String jobId) {
|
|
|
if(StringUtils.hasText(jobId)) {
|
|
|
- Optional<WaylineJobDTO> wlJobOpt = waylineJobService.getJobByJobId(workspaceId,jobId);
|
|
|
+ Optional<WaylineJobEntity> wlJobOpt = getJobByJobId(workspaceId,jobId);
|
|
|
if(wlJobOpt.isPresent()) {
|
|
|
Optional<GetWaylineListResponse> wlOpt = waylineFileService.getWaylineByWaylineId(workspaceId, wlJobOpt.get().getFileId());
|
|
|
if(wlOpt.isPresent()) {
|
|
|
@@ -467,6 +469,14 @@ public class FileServiceImpl implements IFileService {
|
|
|
// return "";
|
|
|
}
|
|
|
|
|
|
+ public Optional<WaylineJobEntity> getJobByJobId(String workspaceId, String jobId) {
|
|
|
+ WaylineJobEntity jobEntity = waylineJobMapper.selectOne(
|
|
|
+ new LambdaQueryWrapper<WaylineJobEntity>()
|
|
|
+ .eq(WaylineJobEntity::getWorkspaceId, workspaceId)
|
|
|
+ .eq(WaylineJobEntity::getJobId, jobId));
|
|
|
+ return Optional.ofNullable(jobEntity);
|
|
|
+ }
|
|
|
+
|
|
|
//path:DJI_202406241424_027_项目编号0001-新建面状航线2
|
|
|
private String getDirName(String waylineName,String path) {
|
|
|
if(StringUtils.hasText(path)) {
|