瀏覽代碼

修改导入试卷,试题属性为空不能导入的bug

weiwenhai 7 年之前
父節點
當前提交
692104c161
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      cqb-paper/src/main/java/com/qmth/cqb/paper/service/ImportPaperService.java

+ 4 - 1
cqb-paper/src/main/java/com/qmth/cqb/paper/service/ImportPaperService.java

@@ -882,7 +882,7 @@ public class ImportPaperService {
 			}
 		}
 		//一级属性有值,二级属性为空
-		else {
+		else if(StringUtils.isNotBlank(firstProperty) && StringUtils.isBlank(secondProperty)){
 			//根据课程查询所有课程属性树
 			List<CourseProperty> courseProperties = coursePropertyRepo.findByCourseCode(paper.getCourse().getCode());
 			if(courseProperties == null || courseProperties.size()<1){
@@ -915,6 +915,9 @@ public class ImportPaperService {
 		    		throw new PaperException(importPaperCheck.errorInfo);
 				}
 			}
+		}//一级,二级都为空
+		else {
+			
 		}
 	}