diff --git a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java index f3faddcb..c6ac96e0 100644 --- a/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java @@ -3960,18 +3960,34 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl allImgList, String fileNowPath) { for(FileSplitValImgExportDto imgExportDto : allImgList){ - String oldPath = uploadCospath + "/" + imgExportDto.getImgPath(); - String newPath = fileNowPath + File.separator + imgExportDto.getImgName(); - if (MinioUtil.doesObjectExist(oldPath)){ - try (InputStream in = MinioUtil.download(oldPath);) { - copyFile1(in, newPath); + String imgName = imgExportDto.getImgName(); + String fileName = imgExportDto.getImgPath(); + String oldPath = getPath(fileName); + String newPath = fileNowPath + File.separator + imgName; + try (InputStream in = ObsBootUtil.getOssFile(oldPath)) { + copyFile1(in, newPath); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + String fileNameTranslation = imgExportDto.getImgPathTranslation(); + if (StringUtils.isNotBlank(fileNameTranslation)){ + String imgNameTranslation = imgName.substring(0,imgName.indexOf("."))+"translation.png"; + String oldPathTranslation = getPath(fileNameTranslation); + String newPathTranslation = fileNowPath + File.separator + imgNameTranslation; + try (InputStream in = ObsBootUtil.getOssFile(oldPathTranslation)) { + copyFile1(in, newPathTranslation); } catch (IOException e) { - e.printStackTrace(); log.error(e.getMessage(), e); } } } + } + private String getPath(String fileName){ + if (!fileName.contains("temp")){ + fileName = "temp\\" + fileName; + } + return fileName.replace("\\\\", "\\"); } @Override @@ -3979,13 +3995,10 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl startRow) { for(int cellNum = 0; cellNum < fieldList.size(); cellNum++) { - if (!"item_content".equals(fieldList.get(cellNum))) { + String s = fieldList.get(cellNum); + if (!"item_content".equals(s) && !"translation".equals(s)) { sheetItems.addMergedRegion(new CellRangeAddress(startRow, allRow, cellNum, cellNum)); } }