老系统重复文件查询
This commit is contained in:
+6
-21
@@ -3752,27 +3752,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
//获取 所有附件信息 然后判断名称是否重复
|
||||
Set set = new HashSet();
|
||||
List<OldSystem> loreAttacheList = sarStandardsInfoDao.selectOldSystemFile();
|
||||
for (OldSystem src : loreAttacheList) {
|
||||
if(StringUtils.isNotBlank(src.getFileSrc())){
|
||||
// 通过 / 去分割 / 的最后一位
|
||||
String[] split = src.getFileSrc().split("/");
|
||||
List<String> asList = Arrays.asList(split);
|
||||
//集合的最后一个就是名称
|
||||
int size = asList.size();
|
||||
String s = asList.get(size-1);
|
||||
for (OldSystem data: loreAttacheList){
|
||||
//相等证明是数据本身
|
||||
if(!src.getFileId().equals(data.getFileId())) {
|
||||
if (StringUtils.isNotBlank(data.getFileSrc())) {
|
||||
// 通过 / 去分割 / 的最后一位
|
||||
String[] split1 = data.getFileSrc().split("/");
|
||||
List<String> asList1 = Arrays.asList(split1);
|
||||
//集合的最后一个就是名称
|
||||
int size1 = asList1.size();
|
||||
String s1 = asList1.get(size1 - 1);
|
||||
if (s.equals(s1)) {
|
||||
set.add(src.getFileId());
|
||||
}
|
||||
for (OldSystem data : loreAttacheList) {
|
||||
if(StringUtils.isNotBlank(data.getFileSign())){
|
||||
for (OldSystem file : loreAttacheList){
|
||||
if(StringUtils.isNotBlank(file.getFileSign())){
|
||||
if(!data.getFileId().equals(file.getFileId())){
|
||||
set.add(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user