Merge remote-tracking branch 'origin/develop_master' into develop_master

This commit is contained in:
yuezhihang
2021-12-07 15:20:05 +08:00
10 changed files with 131 additions and 81 deletions
@@ -161,7 +161,7 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
String saveWordFileName=null;
logger.info("将文件保存至本地");
if(wordFile!=null && !wordFile.isEmpty()){
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename().replace("/","_");
saveWordFilePath=ocrFilePath+saveWordFileName;
logger.info(saveWordFilePath);
//生成保存文件
@@ -175,12 +175,12 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
String saveJsonFilePath=null;
String saveJsonFileName=null;
if(jsonFile!=null && !jsonFile.isEmpty()){
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename().replace("/","_");
saveJsonFilePath=ocrFilePath+saveJsonFileName;
logger.info(saveJsonFilePath);
File saveJsonFile = new File(saveJsonFilePath);
System.out.println(saveJsonFile);
wordFile.transferTo(saveJsonFile);
jsonFile.transferTo(saveJsonFile);
// FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
// savePic(jsonFile.getInputStream(),saveJsonFilePath);
logger.info("Json存储完成");