|
|
@@ -248,6 +248,7 @@ public class FileServiceImpl implements IFileService {
|
|
|
fileEntity.setSubFileType(MediaSubFileTypeEnum.PANORAMA.getType());
|
|
|
}
|
|
|
if(exif.getCreateTime() != null) {
|
|
|
+ log.info("******exif pictureTime***********" + exif.getCreateTime());
|
|
|
fileEntity.setPictureTime(exif.getCreateTime());
|
|
|
}
|
|
|
|
|
|
@@ -411,7 +412,6 @@ public class FileServiceImpl implements IFileService {
|
|
|
// String dirName = getDirName(waylineName, file.getPath());
|
|
|
String dirName = file.getPath();
|
|
|
MediaDirDTO dirDto = null;
|
|
|
-
|
|
|
synchronized(dirName.intern()) {
|
|
|
dirDto = mediaDirService.getMediaDirByName(workspaceId, dirName, null);
|
|
|
//文件夹不存在,则创建文件夹
|
|
|
@@ -436,7 +436,9 @@ public class FileServiceImpl implements IFileService {
|
|
|
|
|
|
if (file != null) {
|
|
|
|
|
|
-
|
|
|
+ log.info("******媒体文件保存***********");
|
|
|
+ log.info("******当前时区***********" + ZoneId.systemDefault());
|
|
|
+ log.info("******pictureTime***********" + (file.getMetadata().getCreatedTime() != null ? file.getMetadata().getCreatedTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli() : null));
|
|
|
//经纬度转换
|
|
|
//AMap aMap = CoordinateUtil.transform(file.getMetadata().getShootPosition().getLng(),file.getMetadata().getShootPosition().getLat());
|
|
|
//AMap aMap = CoordinateUtil.transform(exif.getLongitude(),exif.getLatitude());
|
|
|
@@ -461,7 +463,7 @@ public class FileServiceImpl implements IFileService {
|
|
|
.absoluteAltitude(BigDecimal.valueOf(CoordinateUtil.checkValidVal(file.getMetadata().getAbsoluteAltitude())).setScale(6, RoundingMode.DOWN))
|
|
|
.relativeAltitude(BigDecimal.valueOf(CoordinateUtil.checkValidVal(file.getMetadata().getRelativeAltitude())).setScale(6, RoundingMode.DOWN))
|
|
|
// .size(ossService.getObjectSize(OssConfiguration.bucket, file.getObjectKey()))
|
|
|
- .pictureTime(file.getMetadata().getCreatedTime() != null ? file.getMetadata().getCreatedTime().atZone(ZoneId.of("UTC+0")).toInstant().toEpochMilli() : null)
|
|
|
+ .pictureTime(file.getMetadata().getCreatedTime() != null ? file.getMetadata().getCreatedTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli() : null)
|
|
|
// .longitudeRef(exif.getLongitudeRef())
|
|
|
// .latitudeRef(exif.getLatitudeRef())
|
|
|
// .mediaType(exif.getPictureType())
|
|
|
@@ -541,6 +543,10 @@ public class FileServiceImpl implements IFileService {
|
|
|
MediaDirDTO mediaDirDTO = mediaDirService.getMediaDirById(null,String.valueOf(entity.getDirId()));
|
|
|
taskName = mediaDirDTO.getDirName();
|
|
|
}
|
|
|
+ log.info("******媒体文件查询***********");
|
|
|
+ log.info("******当前时区***********" + ZoneId.systemDefault());
|
|
|
+ log.info("******entity.getCreateTime()***********" + entity.getCreateTime());
|
|
|
+ log.info("******LocalDateTime.ofInstant(Instant.ofEpochMilli(entity.getCreateTime()), ZoneId.systemDefault())***********" + LocalDateTime.ofInstant(Instant.ofEpochMilli(entity.getCreateTime()), ZoneId.systemDefault()));
|
|
|
MediaTypeEnum mediaTypeEnum = convertMediaType(entity);
|
|
|
String url = ossService.getObjectUrl(OssConfiguration.bucket, entity.getObjectKey()).toString();
|
|
|
String thumbnailURL = getThumbnailURL(entity);
|
|
|
@@ -1062,6 +1068,4 @@ public class FileServiceImpl implements IFileService {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|