feat(文档拆分): 导入导出增加附件层级
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||
private String interpretPersonId;
|
||||
/**译文*/
|
||||
@ApiModelProperty(value = "译文")
|
||||
@Excel(name = "译文", width = 15)
|
||||
// @Excel(name = "译文", width = 15)
|
||||
private String translation;
|
||||
/**是否与上一版相同(字典:1:是,0:否)*/
|
||||
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class FlowImportExcel {
|
||||
private String itemContent;
|
||||
/**译文*/
|
||||
@ApiModelProperty(value = "译文")
|
||||
@Excel(name = "译文", width = 15)
|
||||
// @Excel(name = "译文", width = 15)
|
||||
private String translation;
|
||||
/**是否与上一版相同(字典:1:是,0:否)*/
|
||||
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
||||
|
||||
@@ -242,6 +242,9 @@ public class FileUnZip {
|
||||
* @return
|
||||
*/
|
||||
public static List<File> readFileByFilename(String path,String filename) {
|
||||
if (filename.contains("/")){
|
||||
filename = filename.substring(filename.lastIndexOf("/") + 1, filename.length());
|
||||
}
|
||||
List<File> resultlist = new ArrayList<>();
|
||||
if (StringUtil.isNotEmpty(path)){
|
||||
File file = new File(path);
|
||||
|
||||
+18
-10
@@ -1879,7 +1879,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
i = 0;
|
||||
datasUpdate.add(sarStandImportDto);
|
||||
}
|
||||
String unzipfilepath = zipEntryName;
|
||||
String unzipfilepath = zipEntryName + File.separator + "附件";
|
||||
Result<?> message = importSplitItemsData(datasUpdate,menuId,unzipfilepath,infoId,cut,getSheetTableList);
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
@@ -3965,16 +3965,20 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
@Override
|
||||
public void downLoadImgList(List<FileSplitValImgExportDto> 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);) {
|
||||
String oldPath = "temp\\" + imgExportDto.getImgPath();
|
||||
String newPath = fileNowPath + File.separator + "附件" + File.separator + imgExportDto.getImgName();
|
||||
// if (MinioUtil.doesObjectExist(oldPath)){
|
||||
try (InputStream in = ObsBootUtil.getOssFile(oldPath);) {
|
||||
File file = new File(fileNowPath + File.separator + "附件");
|
||||
if (!file.exists()){
|
||||
file.mkdir();
|
||||
}
|
||||
copyFile1(in, newPath);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3983,15 +3987,19 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
public void downLoadFileList(List<OSSFile> allRelevFileList, String fileNowPath) {
|
||||
for(OSSFile fileExportDto : allRelevFileList){
|
||||
String oldPath = fileExportDto.getUrl();
|
||||
String newPath = fileNowPath + File.separator + fileExportDto.getFileName();
|
||||
if (MinioUtil.doesObjectExist(oldPath)){
|
||||
try (InputStream in = MinioUtil.download(oldPath);) {
|
||||
String newPath = fileNowPath + File.separator + "附件" + File.separator + fileExportDto.getFileName();
|
||||
// if (MinioUtil.doesObjectExist(oldPath)){
|
||||
try (InputStream in = ObsBootUtil.getOssFile(oldPath)) {
|
||||
File file = new File(fileNowPath + File.separator + "附件");
|
||||
if (!file.exists()){
|
||||
file.mkdir();
|
||||
}
|
||||
copyFile1(in, newPath);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user