Răsfoiți Sursa

密级修改

huangtf 8 luni în urmă
părinte
comite
bd0be9b655

+ 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()) ? "绝密" : "秘密"));
 				}
 			});
 		}