WANG 6 years ago
parent
commit
e9ee82763e

+ 6 - 6
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/OrgServiceImpl.java

@@ -284,10 +284,10 @@ public class OrgServiceImpl implements OrgService {
 			try {
 				de = manager.getByName(key);
 			} catch (Exception e) {
-				throw new StatusException("E-001004", "机构属性错误. key=" + key);
+				throw new StatusException("001004", "机构属性错误. key=" + key);
 			}
 			if (!de.isLegal(value)) {
-				throw new StatusException("E-001200", "机构属性值非法. key=" + key);
+				throw new StatusException("001200", "机构属性值非法. key=" + key);
 			}
 			map.put(de, value.trim());
 		}
@@ -299,21 +299,21 @@ public class OrgServiceImpl implements OrgService {
 	public void deleteSubOrg(Long subOrgId, boolean cascade) {
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, subOrgId, OrgEntity.class);
 		if (null == orgEntity.getParentId()) {
-			throw new StatusException("E-001004", "该机构非子机构");
+			throw new StatusException("001004", "该机构非子机构");
 		}
 		Long rootId = orgEntity.getRootId();
 
 		if (0 < orgRepo.countByRootIdAndParentId(rootId, orgEntity.getId())) {
-			throw new StatusException("E-001004", "该机构有子机构");
+			throw new StatusException("001004", "该机构有子机构");
 		}
 
 		if (!cascade) {
 			if (0 < userRepo.countByRootOrgId(rootId)) {
-				throw new StatusException("E-001004", "该机构已关联用户");
+				throw new StatusException("001004", "该机构已关联用户");
 			}
 
 			if (0 < studentRepo.countByRootOrgId(rootId)) {
-				throw new StatusException("E-001004", "该机构已关联学生");
+				throw new StatusException("001004", "该机构已关联学生");
 			}
 		}