huangtf преди 8 месеца
родител
ревизия
bd0be9b655
променени са 1 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 8 1
      blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

+ 8 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -227,7 +227,14 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 					aa.setStorageTimeValue("3".equals(aa.getStorageTime()) ? "永久" : ("2".equals(aa.getStorageTime()) ? "30年" : "10年"));
 				}
 				if (StringUtils.isNotBlank(aa.getSecretLevel())) {
-					aa.setSecretLevelValue("1".equals(aa.getSecretLevel()) ? "机密" : ("2".equals(aa.getSecretLevel()) ? "绝密" : "秘密"));
+					Map<String, String> secretLevelMap = new HashMap<>();
+					secretLevelMap.put("1", "机密");
+					secretLevelMap.put("2", "绝密");
+					secretLevelMap.put("3", "秘密");
+					secretLevelMap.put("4", "公开");
+
+					aa.setSecretLevelValue(secretLevelMap.getOrDefault(aa.getSecretLevel(), "秘密"));
+					//aa.setSecretLevelValue("1".equals(aa.getSecretLevel()) ? "机密" : ("2".equals(aa.getSecretLevel()) ? "绝密" : "秘密"));
 				}
 			});
 		}