|
@@ -2,6 +2,7 @@ package restcontroller.webmanage.saletool.courseware;
|
|
|
|
|
|
|
|
import beans.department.Department;
|
|
import beans.department.Department;
|
|
|
import beans.salearea.SaleArea;
|
|
import beans.salearea.SaleArea;
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.gson.JsonArray;
|
|
import com.google.gson.JsonArray;
|
|
@@ -43,10 +44,21 @@ public class coursewaretesthead extends Controller {
|
|
|
|
|
|
|
|
ArrayList<Long> sat_courseware_testlibraryids = new ArrayList<>();
|
|
ArrayList<Long> sat_courseware_testlibraryids = new ArrayList<>();
|
|
|
|
|
|
|
|
- //yonglai
|
|
|
|
|
- int iscreate = content.getIntValue("iscreate", 0);
|
|
|
|
|
|
|
+ //前端需要的逻辑处理是否跳过下方的验证
|
|
|
|
|
+ boolean isJump = false;
|
|
|
|
|
+ for (Object object : sat_courseware_classids) {
|
|
|
|
|
+ if (object instanceof JSONArray) {
|
|
|
|
|
+ JSONArray jsonArray = (JSONArray) object;
|
|
|
|
|
+ for (Object o : jsonArray) {
|
|
|
|
|
+ if (o.toString().contains("9999")) {
|
|
|
|
|
+ isJump = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- if (testaddmode == 1 && iscreate == 0) {
|
|
|
|
|
|
|
+ if (testaddmode == 1 && !isJump) {
|
|
|
if (num <= 0) {
|
|
if (num <= 0) {
|
|
|
return getErrReturnObject().setErrMsg("出题方式为系统随机时题目设置数量需大于0").toString();
|
|
return getErrReturnObject().setErrMsg("出题方式为系统随机时题目设置数量需大于0").toString();
|
|
|
}
|
|
}
|