|
@@ -180,17 +180,38 @@ public class MetadataClassificationServiceImpl
|
|
public List<MetadataClassificationVO> getMetadataFile(Long fileId) {
|
|
public List<MetadataClassificationVO> getMetadataFile(Long fileId) {
|
|
List<HashMap<String, Object>> metadataMapList = baseMapper.getMetadaFileByFileId(fileId);
|
|
List<HashMap<String, Object>> metadataMapList = baseMapper.getMetadaFileByFileId(fileId);
|
|
if (metadataMapList != null && metadataMapList.size() > 0) {
|
|
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);
|
|
Map<String, Object> map = metadataMapList.get(0);
|
|
QueryWrapper<MetadataClassification> metadata = new QueryWrapper<>();
|
|
QueryWrapper<MetadataClassification> metadata = new QueryWrapper<>();
|
|
metadata.lambda().eq(MetadataClassification::getIsDeleted, 0);
|
|
metadata.lambda().eq(MetadataClassification::getIsDeleted, 0);
|
|
List<MetadataClassification> metadataClassifications = baseMapper.selectList(metadata);
|
|
List<MetadataClassification> metadataClassifications = baseMapper.selectList(metadata);
|
|
if (metadataClassifications != null && metadataClassifications.size() > 0) {
|
|
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));
|
|
List<MetadataClassificationVO> metadataClassificationVOS = Objects.requireNonNull(BeanUtil.copy(metadataClassifications, MetadataClassificationVO.class));
|
|
for (MetadataClassificationVO vo : metadataClassificationVOS) {
|
|
for (MetadataClassificationVO vo : metadataClassificationVOS) {
|
|
|
|
+ if(!vo.getFileStorageType().contains(storageType)){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
vo.setKeyValue(map.get(vo.getFieldKey()) == null ? null : map.get(vo.getFieldKey()).toString());
|
|
vo.setKeyValue(map.get(vo.getFieldKey()) == null ? null : map.get(vo.getFieldKey()).toString());
|
|
vo.setFileId(fileId);
|
|
vo.setFileId(fileId);
|
|
|
|
+ list.add(vo);
|
|
}
|
|
}
|
|
- return metadataClassificationVOS;
|
|
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
@@ -287,6 +308,9 @@ public class MetadataClassificationServiceImpl
|
|
if (byId.getArchiveId() != null) {
|
|
if (byId.getArchiveId() != null) {
|
|
ArchivesAuto archivesAuto = archiveAutoClient.saveArchiveAutoById(byId.getArchiveId());
|
|
ArchivesAuto archivesAuto = archiveAutoClient.saveArchiveAutoById(byId.getArchiveId());
|
|
keyValue.put("密级", archivesAuto.getSecretLevel());
|
|
keyValue.put("密级", archivesAuto.getSecretLevel());
|
|
|
|
+
|
|
|
|
+ /**档号**/
|
|
|
|
+ keyValue.put("档号",archivesAuto.getFileNumber());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|