|
@@ -856,6 +856,31 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
return map;
|
|
return map;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Map<String, Object> importExcelQuestionV3NotInBankFromOld(List<QuestionImportV3> questionList, Boolean isUpdateSupport, String operName) {
|
|
|
|
|
+ System.out.println(questionList);
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
+ if (Validator.isNull(questionList) || questionList.size() == 0) {
|
|
|
|
|
+ throw new CustomException("导入数据不能为空!");
|
|
|
|
|
+ }
|
|
|
|
|
+ String errorLog = "";
|
|
|
|
|
+ String importNo = ServletUtils.getEncoded("IMPORT");
|
|
|
|
|
+ int i = 10;
|
|
|
|
|
+ Long nowTime = DateUtils.getNowTime();
|
|
|
|
|
+ List<QuestionImportV3> errorList = new ArrayList<>();
|
|
|
|
|
+ //案例附属题数组
|
|
|
|
|
+ List<QuestionAddBo> attList = new ArrayList<>();
|
|
|
|
|
+ List<QuestionAddBo> nqList = new ArrayList<>();
|
|
|
|
|
+ boolean isAnLi = false; // 是否案例题
|
|
|
|
|
+ // Map<String,Object> dataList =
|
|
|
|
|
+ for (QuestionImportV3 question : questionList) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ map.put("errorList",errorList);
|
|
|
|
|
+ map.put("questionList",nqList);
|
|
|
|
|
+ return map;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private Map<String,Object> getOptionsList(int startIndex,List<QuestionImportContent> list,int type){
|
|
private Map<String,Object> getOptionsList(int startIndex,List<QuestionImportContent> list,int type){
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
String answerQuestion = "";
|
|
String answerQuestion = "";
|
|
@@ -890,6 +915,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
return map;
|
|
return map;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<GoodsUserQuestionVo> listGoodsUserQuestionVo(GoodsQueryBo bo) {
|
|
public List<GoodsUserQuestionVo> listGoodsUserQuestionVo(GoodsQueryBo bo) {
|
|
|
return baseMapper.listGoodsUserQuestionVo(bo);
|
|
return baseMapper.listGoodsUserQuestionVo(bo);
|
|
@@ -2240,6 +2267,21 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public Integer findTypeV3(String type) {
|
|
|
|
|
+ if ("单选题".equals(type)) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else if ("多选题".equals(type)) {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ } else if ("判断题".equals(type)) {
|
|
|
|
|
+ return 3;
|
|
|
|
|
+ } else if ("问答题".equals(type)) {
|
|
|
|
|
+ return 5;
|
|
|
|
|
+ } else if ("案例题".equals(type)) {
|
|
|
|
|
+ return 4;
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
private String dealImportAnswer(String Answer) {
|
|
private String dealImportAnswer(String Answer) {
|
|
|
String[] itemArray = Answer.split("");
|
|
String[] itemArray = Answer.split("");
|