|
|
@ -64,26 +64,26 @@ public class PictureImgToLocalTask implements Runnable {
|
|
|
|
if (ObjectUtil.isNotEmpty(picture)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(picture)) {
|
|
|
|
picture.setLocalpictrueurl(pictureImgToLocal.getLocalPath());
|
|
|
|
picture.setLocalpictrueurl(pictureImgToLocal.getLocalPath());
|
|
|
|
picture.setIsdownload(1);
|
|
|
|
picture.setIsdownload(1);
|
|
|
|
// try {
|
|
|
|
try {
|
|
|
|
// picture.setLocalThumbnailUrl(ImageUtils.generateThumbnail(pictureImgToLocal.getLocalPath(),182));
|
|
|
|
picture.setLocalThumbnailUrl(ImageUtils.generateThumbnail(pictureImgToLocal.getLocalPath(),182));
|
|
|
|
// picture.setServerThumbnailUrl(ocrPictureService.getServerUrl()+ImageUtils.getFileName(picture.getLocalThumbnailUrl()));
|
|
|
|
picture.setServerThumbnailUrl(ocrPictureService.getServerUrl()+ImageUtils.getFileName(picture.getLocalThumbnailUrl()));
|
|
|
|
// } catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
// throw new RuntimeException(e);
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// Map<String, String> ocrPictureClassifyAndHash = ocrPictureService.getOcrPictureClassifyAndHash(picture.getLocalpictrueurl());
|
|
|
|
Map<String, String> ocrPictureClassifyAndHash = ocrPictureService.getOcrPictureClassifyAndHash(picture.getLocalpictrueurl());
|
|
|
|
// if(ocrPictureClassifyAndHash!=null){
|
|
|
|
if(ocrPictureClassifyAndHash!=null){
|
|
|
|
// picture.setImgHash(ocrPictureClassifyAndHash.get("hash"));
|
|
|
|
picture.setImgHash(ocrPictureClassifyAndHash.get("hash"));
|
|
|
|
// picture.setClassificationid(ocrPictureClassifyAndHash.get("classId"));
|
|
|
|
picture.setClassificationid(ocrPictureClassifyAndHash.get("classId"));
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// 获取拍照时间
|
|
|
|
// 获取拍照时间
|
|
|
|
// Long timestamp = ocrPictureService.getPhotoDateTime(picture);
|
|
|
|
// Long timestamp = ocrPictureService.getPhotoDateTime(picture);
|
|
|
|
// if(timestamp != 0L){
|
|
|
|
// if(timestamp != 0L){
|
|
|
|
// picture.setPhotoDateTimestamp(timestamp);
|
|
|
|
// picture.setPhotoDateTimestamp(timestamp);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// ocrPictureService.updateById(picture);
|
|
|
|
ocrPictureService.updateById(picture);
|
|
|
|
logger.info("图片本地化,回写数据完成!");
|
|
|
|
logger.info("图片本地化,回写数据完成!");
|
|
|
|
logger.info("开启获取图片信息操作!");
|
|
|
|
logger.info("开启获取图片信息操作!");
|
|
|
|
// ocrPictureService.savePicturesInfo(picture);
|
|
|
|
ocrPictureService.savePicturesInfo(picture);
|
|
|
|
logger.info("获取图片信息操作,结束!");
|
|
|
|
logger.info("获取图片信息操作,结束!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|