瀏覽代碼

元数据bug

“zhifk” 2 年之前
父節點
當前提交
c170a445d3

+ 1 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/ArchiveFileVO.java

@@ -90,7 +90,7 @@ public class ArchiveFileVO extends ArchiveFile {
      */
     private Integer isUpdateUrl;
     //所有的意见
-    private String allOpinion;
+    private String allopinion;
     /**
      * 案卷题名
      */

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/ArchiveFileServiceImpl.java

@@ -85,7 +85,7 @@ public class ArchiveFileServiceImpl extends BaseServiceImpl<ArchiveFileMapper, A
                             vos.setArchiveName(map.get("ArchiveName").toString());
                         }
                         if (map.get("allOpinion") != null) {
-                            vos.setAllOpinion(map.get("allOpinion").toString());
+                            vos.setAllopinion(map.get("allOpinion").toString());
                         }
                     }
 

+ 25 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/MetadataClassificationServiceImpl.java

@@ -180,17 +180,38 @@ public class MetadataClassificationServiceImpl
     public List<MetadataClassificationVO> getMetadataFile(Long fileId) {
         List<HashMap<String, Object>> metadataMapList = baseMapper.getMetadaFileByFileId(fileId);
         if (metadataMapList != null && metadataMapList.size() > 0) {
+            Map<String,String> storageTypeMap = new HashMap<>();
+            storageTypeMap.put("1","a");
+            storageTypeMap.put("2","b");
+            storageTypeMap.put("3","c");
+            storageTypeMap.put("4","d");
+            storageTypeMap.put("5","e");
+            storageTypeMap.put("7","f");
+            storageTypeMap.put("6","g");
+            storageTypeMap.put("8","h");
+            storageTypeMap.put("9","i");
             Map<String, Object> map = metadataMapList.get(0);
             QueryWrapper<MetadataClassification> metadata = new QueryWrapper<>();
             metadata.lambda().eq(MetadataClassification::getIsDeleted, 0);
             List<MetadataClassification> metadataClassifications = baseMapper.selectList(metadata);
             if (metadataClassifications != null && metadataClassifications.size() > 0) {
+                ArchiveFile byId = iArchiveFileService.getById(fileId);
+                ArchiveTreeContract archiveTreeContractById = archiveTreeContractClient.getArchiveTreeContractById(Long.parseLong(byId.getNodeId()));
+                String storageType ="";
+                if(archiveTreeContractById.getStorageType() != null) {
+                    storageType = storageTypeMap.get(archiveTreeContractById.getStorageType().toString());
+                }
+                List<MetadataClassificationVO> list = new ArrayList<>();
                 List<MetadataClassificationVO> metadataClassificationVOS = Objects.requireNonNull(BeanUtil.copy(metadataClassifications, MetadataClassificationVO.class));
                 for (MetadataClassificationVO vo : metadataClassificationVOS) {
+                    if(!vo.getFileStorageType().contains(storageType)){
+                        continue;
+                    }
                     vo.setKeyValue(map.get(vo.getFieldKey()) == null ? null : map.get(vo.getFieldKey()).toString());
                     vo.setFileId(fileId);
+                    list.add(vo);
                 }
-                return metadataClassificationVOS;
+                return list;
             }
         }
         return null;
@@ -287,6 +308,9 @@ public class MetadataClassificationServiceImpl
             if (byId.getArchiveId() != null) {
                 ArchivesAuto archivesAuto = archiveAutoClient.saveArchiveAutoById(byId.getArchiveId());
                 keyValue.put("密级", archivesAuto.getSecretLevel());
+
+                /**档号**/
+                keyValue.put("档号",archivesAuto.getFileNumber());
             }