ExamExcelVo.java 4.14 KB
package com.jevon.vo.excel;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;

/**
 * @author chen
 * @version 1.0
 * @date 2019/10/18 0018 8:51
 */
public class ExamExcelVo extends ExcelVo {

    private String questionNumber ;
    private String questionSmallNumber ;
    private String questionType ;
    private String difficult ;
    private String score ;
    private String knowledge ;
    private String ability ;
    private String skill ;
    private String think ;

    public String getQuestionNumber() {
        return questionNumber;
    }

    public void setQuestionNumber(String questionNumber) {
        this.questionNumber = questionNumber;
    }

    public String getQuestionSmallNumber() {
        return questionSmallNumber;
    }

    public void setQuestionSmallNumber(String questionSmallNumber) {
        this.questionSmallNumber = questionSmallNumber;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public String getDifficult() {
        return difficult;
    }

    public void setDifficult(String difficult) {
        this.difficult = difficult;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getKnowledge() {
        return knowledge;
    }

    public void setKnowledge(String knowledge) {
        this.knowledge = knowledge;
    }

    public String getAbility() {
        return ability;
    }

    public void setAbility(String ability) {
        this.ability = ability;
    }

    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }

    public String getThink() {
        return think;
    }

    public void setThink(String think) {
        this.think = think;
    }

    public ExamExcelVo(Row sheetRow) {
        super(sheetRow);
        Cell cell1 = sheetRow.getCell(0);
        if(cell1 != null){
            cell1.setCellType(CellType.STRING);
            this.questionNumber = cell1.getStringCellValue().trim();
        }

        Cell cell2 = sheetRow.getCell(1);
        if(cell2 != null){
            cell2.setCellType(CellType.STRING);
            this.questionSmallNumber = cell2.getStringCellValue().trim();
        }else {
            this.questionSmallNumber = null ;
        }

        Cell cell3 = sheetRow.getCell(2);
        if(cell3 != null){
            cell3.setCellType(CellType.STRING);
            this.questionType = cell3.getStringCellValue().trim();
        }else {
            this.questionType = null ;
        }

        Cell cell4 = sheetRow.getCell(3);
        if(cell4 != null){
            cell4.setCellType(CellType.STRING);
            this.difficult = cell4.getStringCellValue().trim();
        }else {
            this.difficult = null ;
        }

        Cell cell5 = sheetRow.getCell(4);
        if(cell5 != null){
            cell5.setCellType(CellType.STRING);
            this.score = cell5.getStringCellValue().trim();
        }else {
            this.score = null ;
        }

        Cell cell6 = sheetRow.getCell(5);
        if(cell6 != null){
            cell6.setCellType(CellType.STRING);
            this.knowledge = cell6.getStringCellValue().trim();
        }else {
            this.knowledge = null ;
        }

        Cell cell7 = sheetRow.getCell(6);
        if(cell7 != null){
            cell7.setCellType(CellType.STRING);
            this.ability = cell7.getStringCellValue().trim();
        }else {
            this.ability = null ;
        }

        Cell cell8 = sheetRow.getCell(7);
        if(cell8 != null){
            cell8.setCellType(CellType.STRING);
            this.skill = cell8.getStringCellValue().trim();
        }else {
            this.skill = null ;
        }

        Cell cell9 = sheetRow.getCell(8);
        if(cell9 != null){
            cell9.setCellType(CellType.STRING);
            this.think = cell9.getStringCellValue().trim();
        }else {
            this.think = null ;
        }
    }
}