|
@@ -341,12 +341,15 @@ public class ExamController extends ControllerSupport {
|
|
|
etList.add(ExamType.valueOf(cur));
|
|
|
}
|
|
|
|
|
|
- if (10 < examTypeList.size()) {
|
|
|
- throw new StatusException("E-001120", "too many examTypes");
|
|
|
- }
|
|
|
-
|
|
|
if (CollectionUtils.isNotEmpty(etList)) {
|
|
|
- predicates.add(root.get("examType").in(etList));
|
|
|
+ if (10 < examTypeList.size()) {
|
|
|
+ throw new StatusException("E-001120", "too many examTypes");
|
|
|
+ }
|
|
|
+ if (1 == examTypeList.size()) {
|
|
|
+ predicates.add(cb.equal(root.get("examType"), examTypeList.get(0)));
|
|
|
+ } else {
|
|
|
+ predicates.add(root.get("examType").in(etList));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|