WANG 6 سال پیش
والد
کامیت
8690ee4d0a

+ 6 - 6
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/HandleSyncCloudServiceProvider.java

@@ -62,16 +62,16 @@ public class HandleSyncCloudServiceProvider extends ControllerSupport
 		Boolean enable = req.getEnable();
 
 		if (StringUtils.isBlank(courseName)) {
-			throw new StatusException("B-100001", "courseName is null");
+			throw new StatusException("100001", "courseName is null");
 		}
 		if (null == courseId) {
-			throw new StatusException("B-100002", "courseId is null");
+			throw new StatusException("100002", "courseId is null");
 		}
 		if (StringUtils.isBlank(courseLevel)) {
-			throw new StatusException("B-100003", "courseLevel is null");
+			throw new StatusException("100003", "courseLevel is null");
 		}
 		if (null == rootOrgId) {
-			throw new StatusException("B-100004", "rootOrgId is null");
+			throw new StatusException("100004", "rootOrgId is null");
 		}
 
 		examStudentRepo.updateCourse(courseName, courseLevel, courseId);
@@ -98,10 +98,10 @@ public class HandleSyncCloudServiceProvider extends ControllerSupport
 		String studentCode = req.getStudentCode();
 
 		if (StringUtils.isBlank(name)) {
-			throw new StatusException("B-100001", "name is null");
+			throw new StatusException("100001", "name is null");
 		}
 		if (null == id) {
-			throw new StatusException("B-100002", "id is null");
+			throw new StatusException("100002", "id is null");
 		}
 
 		examStudentRepo.updateStudent(name, studentCode, id);

+ 4 - 4
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -406,15 +406,15 @@ public class ExamServiceImpl implements ExamService {
 		try {
 			lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(file), 1, 6);
 		} catch (Exception e) {
-			throw new StatusException("B-200110", "Excel 解析失败");
+			throw new StatusException("200110", "Excel 解析失败");
 		}
 
 		if (CollectionUtils.isEmpty(lineList)) {
-			throw new StatusException("B-200111", "Excel无内容");
+			throw new StatusException("200111", "Excel无内容");
 		}
 
 		if (10001 < lineList.size()) {
-			throw new StatusException("B-200112", "数据行数不能超过10000");
+			throw new StatusException("200112", "数据行数不能超过10000");
 		}
 
 		List<Map<String, Object>> failRecords = Collections
@@ -425,7 +425,7 @@ public class ExamServiceImpl implements ExamService {
 			String[] line = lineList.get(i);
 			if (0 == i) {
 				if (headerError(line)) {
-					throw new StatusException("B-100111", "Excel表头错误");
+					throw new StatusException("100111", "Excel表头错误");
 				}
 				continue;
 			}