修改法规清单-导入检查重复编号问题

This commit is contained in:
gaosong
2022-08-23 02:08:33 +08:00
parent 3e6213ee94
commit e9a74c4025
@@ -4755,12 +4755,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//存在文档库没有的数据 //存在文档库没有的数据
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList()); List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
List<String> serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList()); List<String> serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList());
if(serialNumbers.size() > 0){
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){ if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加"); throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
}else{ }else{
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added"); throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
} }
} }
}
//2. 验证标准号在法规清单中是否添加过 //2. 验证标准号在法规清单中是否添加过
LambdaQueryWrapper<ProjectLawsInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ProjectLawsInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();