|
@@ -0,0 +1,528 @@
|
|
|
+package com.miaxis.test;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.miaxis.ZzjsApplication;
|
|
|
+import com.miaxis.feign.service.IKtService;
|
|
|
+import com.miaxis.question.domain.QuestionInfoKtGet;
|
|
|
+import com.miaxis.question.service.IQuestionInfoKtGetService;
|
|
|
+import org.junit.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.LinkedHashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@SpringBootTest(classes = ZzjsApplication.class)
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+public class KtTest2 {
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IKtService ktService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IQuestionInfoKtGetService questionInfoGetService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取一点通题库
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ public void test() {
|
|
|
+ QuestionInfoKtGet questionInfoKt = new QuestionInfoKtGet();
|
|
|
+ questionInfoKt.setNumber(150511l);
|
|
|
+ int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKt);
|
|
|
+ System.out.println(count);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getInfo() {
|
|
|
+
|
|
|
+ List<Map<String, String>> mapList = this.getMap();
|
|
|
+ for (Map<String, String> m : mapList) {
|
|
|
+
|
|
|
+ String time = String.valueOf(System.currentTimeMillis() / 1000);
|
|
|
+ System.out.println(m.get("model")+","+m.get("subject"));
|
|
|
+ String result = ktService.getInfo(m.get("model"), m.get("subject"), time);
|
|
|
+ JSONObject json = JSONObject.parseObject(result);
|
|
|
+ JSONArray data = json.getJSONArray("data");
|
|
|
+
|
|
|
+ for (int i = 0; i < data.size(); i++) {
|
|
|
+ JSONObject n1 = (JSONObject) data.get(i);
|
|
|
+ String countid = n1.getString("id");
|
|
|
+ String title = n1.getString("title");
|
|
|
+ String model = n1.getString("model");
|
|
|
+ String subject = n1.getString("subject");
|
|
|
+ System.out.println(countid + "," + title + "," + model);
|
|
|
+ String result2 = ktService.getQuestion(model, countid, title, subject, time);
|
|
|
+ JSONObject json2 = JSONObject.parseObject(result2);
|
|
|
+ JSONArray data2 = json2.getJSONArray("data");
|
|
|
+ List<QuestionInfoKtGet> addList = new ArrayList<QuestionInfoKtGet>();
|
|
|
+ List<QuestionInfoKtGet> upList = new ArrayList<QuestionInfoKtGet>();
|
|
|
+ for (int j = 0; j < data2.size(); j++) {
|
|
|
+ JSONObject n2 = (JSONObject) data2.get(j);
|
|
|
+ String id2 = n2.getString("id"); //快通ID
|
|
|
+ String idYdt = n2.getString("idYdt"); //一点通ID
|
|
|
+ String number = n2.getString("number"); //一点通ID
|
|
|
+ String type = n2.getString("type"); // 1:判断题 2:选择题 3:多选题
|
|
|
+ String answer = n2.getString("answer"); //答案
|
|
|
+ String answerkeyword = n2.getString("answerkeyword");//答案关键词
|
|
|
+ String explainGif = n2.getString("explainGif"); //技巧讲解图片URL
|
|
|
+ String explainJq = n2.getString("explainJq"); //技巧讲解说明
|
|
|
+ String explainJs = n2.getString("explainJs"); //官方解释
|
|
|
+ String explainMp3 = n2.getString("explainMp3"); //技巧讲解语音URL
|
|
|
+ String image = n2.getString("image"); //题目图片URL
|
|
|
+ String imageYdt = n2.getString("imageYdt"); //题目图片URL2
|
|
|
+ String issue = n2.getString("issue"); //题目
|
|
|
+ String model2 = n2.getString("model"); //车型
|
|
|
+ String opts = n2.getString("opts"); //答案选项
|
|
|
+ String skillkeyword = n2.getString("skillkeyword"); //答题技巧关键词
|
|
|
+ String subject2 = n2.getString("subject"); // 科目与分类
|
|
|
+ String titlekeyword = n2.getString("titlekeyword"); // 题目关键词
|
|
|
+ String issuemp3 = n2.getString("issuemp3"); //读题语音URL
|
|
|
+ String answermp3 = n2.getString("answermp3"); //答案语音URL
|
|
|
+ String explainjsmp3 = n2.getString("explainjsmp3"); //读题+答案语音URL
|
|
|
+
|
|
|
+ //查询当前是否数据是否存在
|
|
|
+ QuestionInfoKtGet questionInfoKtQuery = new QuestionInfoKtGet();
|
|
|
+ questionInfoKtQuery.setId(Long.parseLong(id2));
|
|
|
+ int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKtQuery);
|
|
|
+ if(count==0) {
|
|
|
+ QuestionInfoKtGet questionInfoKt = new QuestionInfoKtGet();
|
|
|
+ questionInfoKt.setId(Long.parseLong(id2));
|
|
|
+ questionInfoKt.setIdYdt(idYdt==null?null:Long.parseLong(idYdt));
|
|
|
+ questionInfoKt.setNumber(number==null?null:Long.parseLong(number));
|
|
|
+ questionInfoKt.setQuestionType(type==null?null:Long.parseLong(type));
|
|
|
+ questionInfoKt.setAnswer(answer);
|
|
|
+ questionInfoKt.setAnswerkeyword(answerkeyword);
|
|
|
+ questionInfoKt.setExplainGif(explainGif);
|
|
|
+ questionInfoKt.setExplainJq(explainJq);
|
|
|
+ questionInfoKt.setExplainJs(explainJs);
|
|
|
+ questionInfoKt.setExplainMp3(explainMp3);
|
|
|
+ questionInfoKt.setImage(image);
|
|
|
+ questionInfoKt.setImageYdt(imageYdt);
|
|
|
+ questionInfoKt.setIssue(issue);
|
|
|
+ questionInfoKt.setOpts(opts);
|
|
|
+ questionInfoKt.setSkillkeyword(skillkeyword);
|
|
|
+ questionInfoKt.setTitlekeyword(titlekeyword);
|
|
|
+ questionInfoKt.setIssuemp3(issuemp3);
|
|
|
+ questionInfoKt.setAnswermp3(answermp3);
|
|
|
+ questionInfoKt.setExplainjsmp3(explainjsmp3);
|
|
|
+
|
|
|
+ if ("cart".equals(m.get("model"))) { //小车
|
|
|
+ questionInfoKt.setLiceCar("1");
|
|
|
+ } else if ("bus".equals(m.get("model"))) { //客车
|
|
|
+ questionInfoKt.setLiceBus("1");
|
|
|
+ } else if ("truck".equals(m.get("model"))) { //货车
|
|
|
+ questionInfoKt.setLiceTruck("1");
|
|
|
+ } else if ("mtc".equals(m.get("model"))) { //摩托车
|
|
|
+ questionInfoKt.setLiceMoto("1");
|
|
|
+ }
|
|
|
+
|
|
|
+ if ("k1".equals(m.get("subject"))) { //科目一 顺序练习
|
|
|
+ questionInfoKt.setSubject(1l);
|
|
|
+ questionInfoKt.setSequeIssue(countid);
|
|
|
+ questionInfoKt.setSequeIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setSequeSort(sort);
|
|
|
+ } else if ("k1_2".equals(m.get("subject"))) { // 科目一 精选必考题
|
|
|
+ questionInfoKt.setSubject(1l);
|
|
|
+ questionInfoKt.setExcellIssue(countid);
|
|
|
+ questionInfoKt.setExcellIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setExcellSort(sort);
|
|
|
+ } else if ("k1_3".equals(m.get("subject"))) { // 科目一 分类练习
|
|
|
+ questionInfoKt.setSubject(1l);
|
|
|
+ questionInfoKt.setClassIssue(countid);
|
|
|
+ questionInfoKt.setClassIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setClassSort(sort);
|
|
|
+ } else if ("k1_4".equals(m.get("subject"))) { //科目一 地方题库
|
|
|
+ questionInfoKt.setSubject(1l);
|
|
|
+ questionInfoKt.setPlaceIssue(countid);
|
|
|
+ questionInfoKt.setPlaceIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setPlaceSort(sort);
|
|
|
+ } else if ("k4".equals(m.get("subject"))) { //科目四 顺序练习
|
|
|
+ questionInfoKt.setSubject(4l);
|
|
|
+ questionInfoKt.setSequeIssue(countid);
|
|
|
+ questionInfoKt.setSequeIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setSequeSort(sort);
|
|
|
+ } else if ("k4_2".equals(m.get("subject"))) { // 科目四 精选必考题
|
|
|
+ questionInfoKt.setSubject(4l);
|
|
|
+ questionInfoKt.setExcellIssue(countid);
|
|
|
+ questionInfoKt.setExcellIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setExcellSort(sort);
|
|
|
+ } else if ("k4_3".equals(m.get("subject"))) { // 科目四 分类练习
|
|
|
+ questionInfoKt.setSubject(4l);
|
|
|
+ questionInfoKt.setClassIssue(countid);
|
|
|
+ questionInfoKt.setClassIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setClassSort(sort);
|
|
|
+ } else if ("k4_4".equals(m.get("subject"))) { //科目四 地方题库
|
|
|
+ questionInfoKt.setSubject(4l);
|
|
|
+ questionInfoKt.setPlaceIssue(countid);
|
|
|
+ questionInfoKt.setPlaceIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKt.setPlaceSort(sort);
|
|
|
+ }
|
|
|
+
|
|
|
+ addList.add(questionInfoKt);
|
|
|
+ // questionInfoGetService.save(questionInfoKt);
|
|
|
+ } else {
|
|
|
+ List<QuestionInfoKtGet> list=questionInfoGetService.selectQuestionInfoKtGetList(questionInfoKtQuery);
|
|
|
+ QuestionInfoKtGet questionInfoKtGet= list.get(0);
|
|
|
+
|
|
|
+ questionInfoKtGet.setId(Long.parseLong(id2));
|
|
|
+ questionInfoKtGet.setIdYdt(idYdt==null?null:Long.parseLong(idYdt));
|
|
|
+ questionInfoKtGet.setNumber(number==null?null:Long.parseLong(number));
|
|
|
+ questionInfoKtGet.setQuestionType(type==null?null:Long.parseLong(type));
|
|
|
+ questionInfoKtGet.setAnswer(answer);
|
|
|
+ questionInfoKtGet.setAnswerkeyword(answerkeyword);
|
|
|
+ questionInfoKtGet.setExplainGif(explainGif);
|
|
|
+ questionInfoKtGet.setExplainJq(explainJq);
|
|
|
+ questionInfoKtGet.setExplainJs(explainJs);
|
|
|
+ questionInfoKtGet.setExplainMp3(explainMp3);
|
|
|
+ questionInfoKtGet.setImage(image);
|
|
|
+ questionInfoKtGet.setImageYdt(imageYdt);
|
|
|
+ questionInfoKtGet.setIssue(issue);
|
|
|
+ questionInfoKtGet.setOpts(opts);
|
|
|
+ questionInfoKtGet.setSkillkeyword(skillkeyword);
|
|
|
+ questionInfoKtGet.setTitlekeyword(titlekeyword);
|
|
|
+ questionInfoKtGet.setIssuemp3(issuemp3);
|
|
|
+ questionInfoKtGet.setAnswermp3(answermp3);
|
|
|
+ questionInfoKtGet.setExplainjsmp3(explainjsmp3);
|
|
|
+
|
|
|
+ if ("cart".equals(m.get("model"))) { //小车
|
|
|
+ questionInfoKtGet.setLiceCar("1");
|
|
|
+ } else if ("bus".equals(m.get("model"))) { //客车
|
|
|
+ questionInfoKtGet.setLiceBus("1");
|
|
|
+ } else if ("truck".equals(m.get("model"))) { //货车
|
|
|
+ questionInfoKtGet.setLiceTruck("1");
|
|
|
+ } else if ("mtc".equals(m.get("model"))) { //摩托车
|
|
|
+ questionInfoKtGet.setLiceMoto("1");
|
|
|
+ }
|
|
|
+
|
|
|
+ if ("k1".equals(m.get("subject"))) { //科目一 顺序练习
|
|
|
+ questionInfoKtGet.setSubject(1l);
|
|
|
+ questionInfoKtGet.setSequeIssue(countid);
|
|
|
+ questionInfoKtGet.setSequeIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setSequeSort(sort);
|
|
|
+ } else if ("k1_2".equals(m.get("subject"))) { // 科目一 精选必考题
|
|
|
+ questionInfoKtGet.setSubject(1l);
|
|
|
+ questionInfoKtGet.setExcellIssue(countid);
|
|
|
+ questionInfoKtGet.setExcellIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setExcellSort(sort);
|
|
|
+ } else if ("k1_3".equals(m.get("subject"))) { // 科目一 分类练习
|
|
|
+ questionInfoKtGet.setSubject(1l);
|
|
|
+ questionInfoKtGet.setClassIssue(countid);
|
|
|
+ questionInfoKtGet.setClassIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setClassSort(sort);
|
|
|
+ } else if ("k1_4".equals(m.get("subject"))) { //科目一 地方题库
|
|
|
+ questionInfoKtGet.setSubject(1l);
|
|
|
+ questionInfoKtGet.setPlaceIssue(countid);
|
|
|
+ questionInfoKtGet.setPlaceIssueName(title);
|
|
|
+ long sort = j + 1;
|
|
|
+ questionInfoKtGet.setPlaceSort(sort);
|
|
|
+ } else if ("k4".equals(m.get("subject"))) { //科目四 顺序练习
|
|
|
+ questionInfoKtGet.setSubject(4l);
|
|
|
+ questionInfoKtGet.setSequeIssue(countid);
|
|
|
+ questionInfoKtGet.setSequeIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setSequeSort(sort);
|
|
|
+ } else if ("k4_2".equals(m.get("subject"))) { // 科目四 精选必考题
|
|
|
+ questionInfoKtGet.setSubject(4l);
|
|
|
+ questionInfoKtGet.setExcellIssue(countid);
|
|
|
+ questionInfoKtGet.setExcellIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setExcellSort(sort);
|
|
|
+ } else if ("k4_3".equals(m.get("subject"))) { // 科目四 分类练习
|
|
|
+ questionInfoKtGet.setSubject(4l);
|
|
|
+ questionInfoKtGet.setClassIssue(countid);
|
|
|
+ questionInfoKtGet.setClassIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setClassSort(sort);
|
|
|
+ } else if ("k4_4".equals(m.get("subject"))) { //科目四 地方题库
|
|
|
+ questionInfoKtGet.setSubject(4l);
|
|
|
+ questionInfoKtGet.setPlaceIssue(countid);
|
|
|
+ questionInfoKtGet.setPlaceIssueName(title);
|
|
|
+ long sort = j+1;
|
|
|
+ questionInfoKtGet.setPlaceSort(sort);
|
|
|
+ }
|
|
|
+
|
|
|
+ upList.add(questionInfoKtGet);
|
|
|
+ //questionInfoGetService.updateById(questionInfoKtGet);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ questionInfoGetService.saveBatch(addList);
|
|
|
+ questionInfoGetService.updateBatchById(upList);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public List<Map<String, String>> getMap() {
|
|
|
+
|
|
|
+ //小车 科目一
|
|
|
+ Map<String, String> cart_k1 = new LinkedHashMap(); // k1:顺序练习
|
|
|
+ cart_k1.put("model", "cart");
|
|
|
+ cart_k1.put("subject", "k1");
|
|
|
+ Map<String, String> cart_k1_2 = new LinkedHashMap(); // k1_2:精选必考题
|
|
|
+ cart_k1_2.put("model", "cart");
|
|
|
+ cart_k1_2.put("subject", "k1_2");
|
|
|
+ Map<String, String> cart_k1_3 = new LinkedHashMap(); // k1_3:分类练习
|
|
|
+ cart_k1_3.put("model", "cart");
|
|
|
+ cart_k1_3.put("subject", "k1_3");
|
|
|
+ Map<String, String> cart_k1_4 = new LinkedHashMap(); // k1_4:地方题库
|
|
|
+ cart_k1_4.put("model", "cart");
|
|
|
+ cart_k1_4.put("subject", "k1_4");
|
|
|
+
|
|
|
+ //客车 科目一
|
|
|
+ Map<String, String> bus_k1 = new LinkedHashMap(); // k1:顺序练习
|
|
|
+ bus_k1.put("model", "bus");
|
|
|
+ bus_k1.put("subject", "k1");
|
|
|
+ Map<String, String> bus_k1_2 = new LinkedHashMap(); // k1_2:精选必考题
|
|
|
+ bus_k1_2.put("model", "bus");
|
|
|
+ bus_k1_2.put("subject", "k1_2");
|
|
|
+ Map<String, String> bus_k1_3 = new LinkedHashMap(); // k1_3:分类练习
|
|
|
+ bus_k1_3.put("model", "bus");
|
|
|
+ bus_k1_3.put("subject", "k1_3");
|
|
|
+ Map<String, String> bus_k1_4 = new LinkedHashMap(); // k1_4:地方题库
|
|
|
+ bus_k1_4.put("model", "bus");
|
|
|
+ bus_k1_4.put("subject", "k1_4");
|
|
|
+
|
|
|
+
|
|
|
+ //货车 科目一
|
|
|
+ Map<String, String> truck_k1 = new LinkedHashMap(); // k1:顺序练习
|
|
|
+ truck_k1.put("model", "truck");
|
|
|
+ truck_k1.put("subject", "k1");
|
|
|
+ Map<String, String> truck_k1_2 = new LinkedHashMap(); // k1_2:精选必考题
|
|
|
+ truck_k1_2.put("model", "truck");
|
|
|
+ truck_k1_2.put("subject", "k1_2");
|
|
|
+ Map<String, String> truck_k1_3 = new LinkedHashMap(); // k1_3:分类练习
|
|
|
+ truck_k1_3.put("model", "truck");
|
|
|
+ truck_k1_3.put("subject", "k1_3");
|
|
|
+ Map<String, String> truck_k1_4 = new LinkedHashMap(); // k1_4:地方题库
|
|
|
+ truck_k1_4.put("model", "truck");
|
|
|
+ truck_k1_4.put("subject", "k1_4");
|
|
|
+
|
|
|
+ //摩托车 科目一
|
|
|
+ Map<String, String> mtc_k1 = new LinkedHashMap(); // k1:顺序练习
|
|
|
+ mtc_k1.put("model", "mtc");
|
|
|
+ mtc_k1.put("subject", "k1");
|
|
|
+ Map<String, String> mtc_k1_2 = new LinkedHashMap(); // k1_2:精选必考题
|
|
|
+ mtc_k1_2.put("model", "mtc");
|
|
|
+ mtc_k1_2.put("subject", "k1_2");
|
|
|
+ Map<String, String> mtc_k1_3 = new LinkedHashMap(); // k1_3:分类练习
|
|
|
+ mtc_k1_3.put("model", "mtc");
|
|
|
+ mtc_k1_3.put("subject", "k1_3");
|
|
|
+ Map<String, String> mtc_k1_4 = new LinkedHashMap(); // k1_4:地方题库
|
|
|
+ mtc_k1_4.put("model", "mtc");
|
|
|
+ mtc_k1_4.put("subject", "k1_4");
|
|
|
+
|
|
|
+
|
|
|
+ //小车 科目四
|
|
|
+ Map<String, String> cart_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ cart_k4.put("model", "cart");
|
|
|
+ cart_k4.put("subject", "k4");
|
|
|
+ Map<String, String> cart_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ cart_k4_2.put("model", "cart");
|
|
|
+ cart_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> cart_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ cart_k4_3.put("model", "cart");
|
|
|
+ cart_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> cart_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ cart_k4_4.put("model", "cart");
|
|
|
+ cart_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+ //客车 科目四
|
|
|
+ Map<String, String> bus_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ bus_k4.put("model", "bus");
|
|
|
+ bus_k4.put("subject", "k4");
|
|
|
+ Map<String, String> bus_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ bus_k4_2.put("model", "bus");
|
|
|
+ bus_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> bus_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ bus_k4_3.put("model", "bus");
|
|
|
+ bus_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> bus_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ bus_k4_4.put("model", "bus");
|
|
|
+ bus_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+
|
|
|
+ //货车 科目四
|
|
|
+ Map<String, String> truck_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ truck_k4.put("model", "truck");
|
|
|
+ truck_k4.put("subject", "k4");
|
|
|
+ Map<String, String> truck_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ truck_k4_2.put("model", "truck");
|
|
|
+ truck_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> truck_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ truck_k4_3.put("model", "truck");
|
|
|
+ truck_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> truck_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ truck_k4_4.put("model", "truck");
|
|
|
+ truck_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+ //摩托车 科目四
|
|
|
+ Map<String, String> mtc_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ mtc_k4.put("model", "mtc");
|
|
|
+ mtc_k4.put("subject", "k4");
|
|
|
+ Map<String, String> mtc_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ mtc_k4_2.put("model", "mtc");
|
|
|
+ mtc_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> mtc_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ mtc_k4_3.put("model", "mtc");
|
|
|
+ mtc_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> mtc_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ mtc_k4_4.put("model", "mtc");
|
|
|
+ mtc_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ List<Map<String, String>> mapList = new ArrayList<Map<String, String>>();
|
|
|
+ //小车 科目一
|
|
|
+ mapList.add(cart_k1);
|
|
|
+ mapList.add(cart_k1_2);
|
|
|
+ mapList.add(cart_k1_3);
|
|
|
+ mapList.add(cart_k1_4);
|
|
|
+ //客车 科目一
|
|
|
+ mapList.add(bus_k1);
|
|
|
+ mapList.add(bus_k1_2);
|
|
|
+ mapList.add(bus_k1_3);
|
|
|
+ mapList.add(bus_k1_4);
|
|
|
+ //货车 科目一
|
|
|
+ mapList.add(truck_k1);
|
|
|
+ mapList.add(truck_k1_2);
|
|
|
+ mapList.add(truck_k1_3);
|
|
|
+ mapList.add(truck_k1_4);
|
|
|
+ //摩托车 科目一
|
|
|
+ mapList.add(mtc_k1);
|
|
|
+ mapList.add(mtc_k1_2);
|
|
|
+ mapList.add(mtc_k1_3);
|
|
|
+ mapList.add(mtc_k1_4);
|
|
|
+
|
|
|
+ //小车 科目四
|
|
|
+ mapList.add(cart_k4);
|
|
|
+ mapList.add(cart_k4_2);
|
|
|
+ mapList.add(cart_k4_3);
|
|
|
+ mapList.add(cart_k4_4);
|
|
|
+ //客车 科目四
|
|
|
+ mapList.add(bus_k4);
|
|
|
+ mapList.add(bus_k4_2);
|
|
|
+ mapList.add(bus_k4_3);
|
|
|
+ mapList.add(bus_k4_4);
|
|
|
+ //货车 科目四
|
|
|
+ mapList.add(truck_k4);
|
|
|
+ mapList.add(truck_k4_2);
|
|
|
+ mapList.add(truck_k4_3);
|
|
|
+ mapList.add(truck_k4_4);
|
|
|
+ //摩托车 科目四
|
|
|
+ mapList.add(mtc_k4);
|
|
|
+ mapList.add(mtc_k4_2);
|
|
|
+ mapList.add(mtc_k4_3);
|
|
|
+ mapList.add(mtc_k4_4);
|
|
|
+
|
|
|
+ return mapList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public List<Map<String, String>> get4Map() {
|
|
|
+
|
|
|
+ //小车 科目四
|
|
|
+ Map<String, String> cart_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ cart_k4.put("model", "cart");
|
|
|
+ cart_k4.put("subject", "k4");
|
|
|
+ Map<String, String> cart_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ cart_k4_2.put("model", "cart");
|
|
|
+ cart_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> cart_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ cart_k4_3.put("model", "cart");
|
|
|
+ cart_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> cart_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ cart_k4_4.put("model", "cart");
|
|
|
+ cart_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+ //客车 科目四
|
|
|
+ Map<String, String> bus_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ bus_k4.put("model", "bus");
|
|
|
+ bus_k4.put("subject", "k4");
|
|
|
+ Map<String, String> bus_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ bus_k4_2.put("model", "bus");
|
|
|
+ bus_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> bus_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ bus_k4_3.put("model", "bus");
|
|
|
+ bus_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> bus_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ bus_k4_4.put("model", "bus");
|
|
|
+ bus_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+
|
|
|
+ //货车 科目四
|
|
|
+ Map<String, String> truck_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ truck_k4.put("model", "truck");
|
|
|
+ truck_k4.put("subject", "k4");
|
|
|
+ Map<String, String> truck_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ truck_k4_2.put("model", "truck");
|
|
|
+ truck_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> truck_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ truck_k4_3.put("model", "truck");
|
|
|
+ truck_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> truck_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ truck_k4_4.put("model", "truck");
|
|
|
+ truck_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+ //摩托车 科目四
|
|
|
+ Map<String, String> mtc_k4 = new LinkedHashMap(); // k4:顺序练习
|
|
|
+ mtc_k4.put("model", "mtc");
|
|
|
+ mtc_k4.put("subject", "k4");
|
|
|
+ Map<String, String> mtc_k4_2 = new LinkedHashMap(); // k4_2:精选必考题
|
|
|
+ mtc_k4_2.put("model", "mtc");
|
|
|
+ mtc_k4_2.put("subject", "k4_2");
|
|
|
+ Map<String, String> mtc_k4_3 = new LinkedHashMap(); // k4_3:分类练习
|
|
|
+ mtc_k4_3.put("model", "mtc");
|
|
|
+ mtc_k4_3.put("subject", "k4_3");
|
|
|
+ Map<String, String> mtc_k4_4 = new LinkedHashMap(); // k4_4:地方题库
|
|
|
+ mtc_k4_4.put("model", "mtc");
|
|
|
+ mtc_k4_4.put("subject", "k4_4");
|
|
|
+
|
|
|
+
|
|
|
+ List<Map<String, String>> mapList = new ArrayList<Map<String, String>>();
|
|
|
+ //小车 科目四
|
|
|
+ mapList.add(cart_k4);
|
|
|
+ mapList.add(cart_k4_2);
|
|
|
+ mapList.add(cart_k4_3);
|
|
|
+ mapList.add(cart_k4_4);
|
|
|
+ //客车 科目四
|
|
|
+ mapList.add(bus_k4);
|
|
|
+ mapList.add(bus_k4_2);
|
|
|
+ mapList.add(bus_k4_3);
|
|
|
+ mapList.add(bus_k4_4);
|
|
|
+ //货车 科目四
|
|
|
+ mapList.add(truck_k4);
|
|
|
+ mapList.add(truck_k4_2);
|
|
|
+ mapList.add(truck_k4_3);
|
|
|
+ mapList.add(truck_k4_4);
|
|
|
+ //摩托车 科目四
|
|
|
+ mapList.add(mtc_k4);
|
|
|
+ mapList.add(mtc_k4_2);
|
|
|
+ mapList.add(mtc_k4_3);
|
|
|
+ mapList.add(mtc_k4_4);
|
|
|
+
|
|
|
+ return mapList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|