|
@@ -201,6 +201,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
}
|
|
|
String errorLog = "";
|
|
|
String importNo = ServletUtils.getEncoded("IMPORT");
|
|
|
+ int i=10;
|
|
|
for (QuestionImport question : questionList) {
|
|
|
QuestionAddBo bo = new QuestionAddBo();
|
|
|
if(question.getKnowledge()!=null){
|
|
@@ -270,16 +271,17 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
bo.setCreateBy(operName);
|
|
|
bo.setImportNo(importNo);
|
|
|
bo.setPublishStatus(0);
|
|
|
- errorLog = insertByAddBoImport(bo,errorLog);
|
|
|
+ errorLog = insertByAddBoImport(bo,errorLog,i);
|
|
|
+ i++;
|
|
|
}
|
|
|
System.out.println(errorLog);
|
|
|
return errorLog;
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String insertByAddBoImport(QuestionAddBo bo,String errorLog) {
|
|
|
+ public String insertByAddBoImport(QuestionAddBo bo,String errorLog,Integer no) {
|
|
|
Question add = BeanUtil.toBean(bo, Question.class);
|
|
|
- add.setCode(ServletUtils.getEncoded("TM"));
|
|
|
+ add.setCode(ServletUtils.getImportEncoded("TM")+no);
|
|
|
if(bo.getOptionsList()!=null){
|
|
|
add.setJsonStr(JSON.toJSONString(bo.getOptionsList()));
|
|
|
}
|