错题分类优化
parent
75763435ba
commit
86f663e55f
|
@ -45,8 +45,11 @@ public class Constants {
|
||||||
//多选题
|
//多选题
|
||||||
public static String QUESTION_TYPE_THREE = "3";
|
public static String QUESTION_TYPE_THREE = "3";
|
||||||
|
|
||||||
//字典表题目分类标识
|
//字典表题目科一分类标识
|
||||||
public static String QUESTION_CATEGORY = "QusetionCategory";
|
public static String QUESTION_CATEGORY_OF_SUBJECT_ONE = "QusetionCategoryOfSubjectOne";
|
||||||
|
|
||||||
|
//字典表题目科四分类标识
|
||||||
|
public static String QUESTION_CATEGORY_OF_SUBJECT_FOUR = "QusetionCategoryOfSubjectFour";
|
||||||
|
|
||||||
//微信支付
|
//微信支付
|
||||||
public static String WECHAT_PAY = "weChatPay";
|
public static String WECHAT_PAY = "weChatPay";
|
||||||
|
|
|
@ -183,8 +183,17 @@ public class TdQuestionServiceImpl extends ServiceImpl<TdQuestionMapper, TdQuest
|
||||||
if (CollectionUtil.isEmpty(tdQuestionVos)) {
|
if (CollectionUtil.isEmpty(tdQuestionVos)) {
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Integer carTypeId = tdQuestionVos.get(0).getCarTypeId();
|
||||||
|
final String subject = tdQuestionVos.get(0).getSubject();
|
||||||
//获取分类
|
//获取分类
|
||||||
List<TdSysConfigList> categoryList = configListService.querySysConfigList(Constants.QUESTION_CATEGORY, Constants.DEFAULT_CARTYPE_ID);
|
List<TdSysConfigList> categoryList = new ArrayList<>();
|
||||||
|
if (StrUtil.equals(Constants.SUBJECT_ONE,subject)){
|
||||||
|
categoryList = configListService.querySysConfigList(Constants.QUESTION_CATEGORY_OF_SUBJECT_ONE, carTypeId);
|
||||||
|
} else if (StrUtil.equals(Constants.SUBJECT_FOUR,subject)){
|
||||||
|
categoryList = configListService.querySysConfigList(Constants.QUESTION_CATEGORY_OF_SUBJECT_FOUR, carTypeId);
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, String> categoryMap = categoryList.stream().collect(Collectors.toMap(TdSysConfigList::getConfigItemCode, TdSysConfigList::getConfigItemName, (v1, v2) -> v1));
|
Map<String, String> categoryMap = categoryList.stream().collect(Collectors.toMap(TdSysConfigList::getConfigItemCode, TdSysConfigList::getConfigItemName, (v1, v2) -> v1));
|
||||||
Map<String, Integer> totalMap = new HashMap<>();
|
Map<String, Integer> totalMap = new HashMap<>();
|
||||||
Map<String, List<Long>> errorQuestionIdMap = new HashMap<>();
|
Map<String, List<Long>> errorQuestionIdMap = new HashMap<>();
|
||||||
|
|
Loading…
Reference in New Issue