| | |
| | | package com.mindskip.xzs.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.mindskip.xzs.viewmodel.admin.question.QuestionEditItemVM; |
| | | import com.alibaba.excel.annotation.write.style.ContentStyle; |
| | | import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
| | | import com.alibaba.excel.enums.poi.VerticalAlignmentEnum; |
| | | import com.mindskip.xzs.domain.vo.QuestionSubjectVO; |
| | | import lombok.Data; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Data |
| | | @ColumnWidth(20) |
| | | @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)//内容样式 |
| | | public class QuestionImportVO { |
| | | |
| | | @ExcelProperty("题目类型") |
| | | private Integer questionType; |
| | | private String questionType; |
| | | |
| | | @ExcelProperty("课目") |
| | | @ExcelProperty("课目(多个用、隔开)") |
| | | private String subjectName; |
| | | |
| | | @ExcelIgnore |
| | | private List<Integer> subjectIds; |
| | | @ExcelIgnore |
| | | private List<String> subjectList; |
| | | |
| | | @ColumnWidth(80) |
| | | @ExcelProperty("题干") |
| | | private String title; |
| | | |
| | | /*** |
| | | * 题目内容 |
| | | */ |
| | | @ExcelIgnore |
| | | private String questionContent; |
| | | |
| | | // 选项内容 |
| | | @ColumnWidth(60) |
| | | @ExcelProperty("选项和答案") |
| | | private List<QuestionEditItemVM> items; |
| | | @ExcelProperty({"题目选项", "选项"}) |
| | | private String optionName; |
| | | |
| | | @ExcelProperty({"题目选项", "选项值"}) |
| | | private String optionValue; |
| | | |
| | | @ExcelProperty("答案(多个用、隔开)") |
| | | private String correct; |
| | | |
| | | // 解析 |
| | | @ColumnWidth(30) |
| | | @ExcelProperty("解析") |
| | | private String analyze; |
| | | |
| | | @ExcelProperty("答案") |
| | | private String correct; |
| | | |
| | | // 题目分数 |
| | | @ExcelProperty("题目分数") |
| | | private String score; |
| | | private Integer score; |
| | | |
| | | // 题目难度 |
| | | @ExcelProperty("题目难度") |
| | | private Integer difficult; |
| | | |
| | | @ExcelProperty("选项A") |
| | | private String a; |
| | | |
| | | @ExcelProperty("选项B") |
| | | private String b; |
| | | |
| | | @ExcelProperty("选项C") |
| | | private String c; |
| | | |
| | | @ExcelProperty("选项D") |
| | | private String d; |
| | | /** |
| | | * 返回该条数据是不是题,因为还有选项。选项的这些值是空的 |
| | | * @return |
| | | */ |
| | | public boolean master() { |
| | | return StringUtils.hasText(questionType) && StringUtils.hasText(subjectName) && StringUtils.hasText(title); |
| | | } |
| | | |
| | | } |