Bläddra i källkod

档案-四性检测
检测报错空指针处理

LHB 1 dag sedan
förälder
incheckning
7f69bf7461

+ 1 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml

@@ -352,7 +352,7 @@
             and (find_in_set(#{vo.nodeIds},m.ancestors) or m.id = #{vo.nodeIds})
         </if>
         <if test="vo.authCode != null and vo.authCode != ''">
-            AND (m.tree_code = #{authCode} or m.tree_code = #{contractId} or m.parent_id = 0)
+            AND (m.tree_code = #{vo.authCode} or m.tree_code = #{vo.contractId} or m.parent_id = 0)
         </if>
         <if test="vo.queryValueSize != null and vo.queryValueSize != ''">
             <choose>

+ 9 - 4
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveExaminingReportImpl.java

@@ -213,10 +213,15 @@ public class ArchiveExaminingReportImpl extends BaseServiceImpl<ArchiveExamining
                 List<MetadataClassification> metadataClassification = metadataClassificationClient.getMetadataClassification();
                 //组装数据,节点与元数据配置型的映射关系
                 HashMap<Long, List<MetadataClassification>> longStringHashMap = new HashMap<>();
-                archiveTreeContractListByList.forEach(f -> {
-                    List<MetadataClassification> collect1 = metadataClassification.stream().filter(e -> e.getFileStorageType().contains(storageTypeMap.get(f.getStorageType()))).collect(Collectors.toList());
-                    longStringHashMap.put(f.getId(),collect1);
-                });
+                if(CollectionUtil.isNotEmpty(metadataClassification)){
+                    archiveTreeContractListByList.forEach(f -> {
+                        if(f.getStorageType() == null){
+                            return;
+                        }
+                        List<MetadataClassification> collect1 = metadataClassification.stream().filter(e -> StringUtils.isNotEmpty(e.getFileStorageType()) && e.getFileStorageType().contains(storageTypeMap.get(f.getStorageType()))).collect(Collectors.toList());
+                        longStringHashMap.put(f.getId(),collect1);
+                    });
+                }
                 //开始检测
                 JSONObject json = bladeRedis.get(REDIS_STR + id);
                 if(json == null){