Explorar o código

改试题导入业务功能,问卷题库去除分数答案难度等级

zhaosongshan hai 7 meses
pai
achega
0bf07055ec

+ 1 - 2
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/impl/QuestionServiceImpl.java

@@ -454,9 +454,8 @@ public class QuestionServiceImpl extends BaseServiceImpl<Question> implements Qu
 
     @Transactional(rollbackFor = Exception.class)
     public JSONObject saveFromLoad(List<QuestionExcel> questionOKList, String userId, JSONObject result) {
-        List<String> saveIds = new ArrayList<>(); // 保存成功的序号ID
         for(QuestionExcel okExcel : questionOKList){
-            if(okExcel.getIsContent() && !saveIds.contains(okExcel.getId())){
+            if(okExcel.getIsContent()){
                 // 题目内容 条
                 List<QuestionExcel> itemList = questionOKList.stream().filter(item -> item.getId().equals(okExcel.getId())).collect(Collectors.toList());
                 List<String> correct = itemList.stream().map(QuestionExcel::getCorrectContent).filter(Objects::nonNull).collect(Collectors.toList());