|
@@ -7,6 +7,7 @@ import java.util.Map;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.jfinal.kit.PropKit;
|
|
|
|
|
|
import okhttp3.FormBody;
|
|
|
import okhttp3.OkHttpClient;
|
|
@@ -27,9 +28,9 @@ public class DataService {
|
|
|
* @param instutionId
|
|
|
* @param number
|
|
|
*/
|
|
|
- public JSONArray getExamList(String instutionId, Integer number) {
|
|
|
+ public JSONArray getExamList(Integer number) {
|
|
|
Map <String,String> map = new HashMap<String,String>();
|
|
|
- map.put("institution_id", instutionId);
|
|
|
+ map.put("institution_id", PropKit.get("institution_id"));
|
|
|
map.put("num", number.toString());
|
|
|
String content = postWithParameters(GET_EXAM_URL, map);
|
|
|
JSONObject jsonObject = JSON.parseObject(content);
|
|
@@ -37,6 +38,8 @@ public class DataService {
|
|
|
return null;
|
|
|
}
|
|
|
JSONArray jsonArray = JSON.parseArray(jsonObject.getString("data"));
|
|
|
+ System.out.println(jsonArray);
|
|
|
+
|
|
|
return jsonArray;
|
|
|
|
|
|
}
|
|
@@ -80,9 +83,9 @@ public class DataService {
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
Map <String,String> map = new HashMap<String,String>();
|
|
|
- map.put("institution_id", "24100002");
|
|
|
+ map.put("institution_id", "47600001");
|
|
|
map.put("num", "10");
|
|
|
- postWithParameters(SAVE_REPORT_URL, map);
|
|
|
+ postWithParameters(GET_EXAM_URL, map);
|
|
|
}
|
|
|
|
|
|
}
|