|
|
@@ -196,24 +196,24 @@ public class ScanFileServiceImpl extends ServiceImpl<ScanFileMapper, ScanFile>
|
|
|
scanFolder.setFolderName(forderName);
|
|
|
scanFolder.setParentId(parentId);
|
|
|
scanFolder.setIsDeleted(0);
|
|
|
- String folderPath="";
|
|
|
- if(parentId!=0){
|
|
|
- ScanFolder fatherFolder = scanFolderMapper.selectById(parentId);
|
|
|
- if (fatherFolder!=null){
|
|
|
- String fatherPath = fatherFolder.getFolderPath();
|
|
|
- folderPath=fatherPath+"/"+forderName;
|
|
|
- }
|
|
|
- }else {
|
|
|
- folderPath=ROOT_PREFIX+"/"+contractId+"/"+forderName;
|
|
|
- }
|
|
|
- File folder = new File(folderPath);
|
|
|
- if (!folder.exists()) {
|
|
|
- boolean created = folder.mkdirs();
|
|
|
- if (!created) {
|
|
|
- throw new ServiceException("创建文件夹失败");
|
|
|
- }
|
|
|
- }
|
|
|
- scanFolder.setFolderPath(folderPath);
|
|
|
+// String folderPath="";
|
|
|
+// if(parentId!=0){
|
|
|
+// ScanFolder fatherFolder = scanFolderMapper.selectById(parentId);
|
|
|
+// if (fatherFolder!=null){
|
|
|
+// String fatherPath = fatherFolder.getFolderPath();
|
|
|
+// folderPath=fatherPath+"/"+forderName;
|
|
|
+// }
|
|
|
+// }else {
|
|
|
+// folderPath=ROOT_PREFIX+"/"+contractId+"/"+forderName;
|
|
|
+// }
|
|
|
+// File folder = new File(folderPath);
|
|
|
+// if (!folder.exists()) {
|
|
|
+// boolean created = folder.mkdirs();
|
|
|
+// if (!created) {
|
|
|
+// throw new ServiceException("创建文件夹失败");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// scanFolder.setFolderPath(folderPath);
|
|
|
int insert = scanFolderMapper.insert(scanFolder);
|
|
|
return insert == 1;
|
|
|
}
|
|
|
@@ -254,7 +254,7 @@ public class ScanFileServiceImpl extends ServiceImpl<ScanFileMapper, ScanFile>
|
|
|
}
|
|
|
for (ScanFolder folder : scanFolders) {
|
|
|
scanFolderMapper.deleteById(folder.getId());
|
|
|
- this.deleteScanFolderLinux(folder.getId());
|
|
|
+ //this.deleteScanFolderLinux(folder.getId());
|
|
|
}
|
|
|
return true;
|
|
|
}
|