Răsfoiți Sursa

完善云阅卷摘取数据接口相关代码,待调试

lideyin 5 ani în urmă
părinte
comite
061ff1d201

+ 419 - 20
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamQuestionOuterServiceProvider.java

@@ -1,38 +1,46 @@
 package cn.com.qmth.examcloud.exchange.outer.api.provider;
 
 import cn.com.qmth.examcloud.commons.exception.StatusException;
-import cn.com.qmth.examcloud.commons.util.StringUtil;
-import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreObtainQueueCloudService;
-import cn.com.qmth.examcloud.core.oe.admin.api.request.DeleteExamScoreQueueReq;
-import cn.com.qmth.examcloud.core.oe.admin.api.request.GetTopExamScoreQueueReq;
-import cn.com.qmth.examcloud.core.oe.admin.api.response.GetTopExamScoreQueueResp;
-import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
-import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
-import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
-import cn.com.qmth.examcloud.examwork.api.response.GetExamResp;
+import cn.com.qmth.examcloud.commons.util.RegExpUtil;
+import cn.com.qmth.examcloud.core.oe.admin.api.ExamRecordCloudService;
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.PagedToBeMarkExamRecordBean;
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.PagedToBeMarkSubjectiveAnswerBean;
+import cn.com.qmth.examcloud.core.oe.admin.api.request.GetPagedToBeMarkExamRecordReq;
+import cn.com.qmth.examcloud.core.oe.admin.api.response.GetPagedToBeMarkExamRecordResp;
 import cn.com.qmth.examcloud.exchange.outer.api.ExamQuestionOuterService;
-import cn.com.qmth.examcloud.exchange.outer.api.ScoreQueueService;
-import cn.com.qmth.examcloud.exchange.outer.api.request.OuterDeleteScoreQueueTopReq;
-import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetScoreQueueTopReq;
+import cn.com.qmth.examcloud.exchange.outer.api.bean.*;
 import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetSubjectivePaperStructReq;
 import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetSubjectiveQuestionReq;
-import cn.com.qmth.examcloud.exchange.outer.api.response.OuterDeleteScoreQueueTopResp;
 import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetScoreQueueTopResp;
 import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetSubjectivePaperStructResp;
 import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetSubjectiveQuestionResp;
+import cn.com.qmth.examcloud.question.commons.core.question.AnswerType;
+import cn.com.qmth.examcloud.question.commons.core.question.QuestionType;
+import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import cn.com.qmth.examcloud.web.support.StatusResponse;
+import com.google.common.collect.Maps;
 import com.mysql.cj.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
  * @Description 考试作答服务
  * @Author lideyin
@@ -46,6 +54,9 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
 
     private static final long serialVersionUID = 7607495598308348018L;
 
+    @Autowired
+    ExamRecordCloudService examRecordCloudService;
+
     /**
      * 获取主观题试卷结构
      *
@@ -67,24 +78,412 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
     @PostMapping("/getSubjectiveQuestion")
     @Override
     public OuterGetSubjectiveQuestionResp getSubjectiveQuestion(OuterGetSubjectiveQuestionReq req) {
-        if (null == req.getExamId()) {
+        Long examId = req.getExamId();
+        if (null == examId) {
             throw new StatusException("101001", "考试id不允许为空");
         }
 
-        if (StringUtils.isNullOrEmpty(req.getSubjectCode())) {
+        String subjectCode = req.getSubjectCode();
+        if (StringUtils.isNullOrEmpty(subjectCode)) {
             throw new StatusException("101002", "科目代码不允许为空");
         }
 
-        if (null == req.getStartId()) {
-            throw new StatusException("101003", "考试记录id不允许为空");
+        Long startId = req.getStartId();
+        if (null == startId) {
+            throw new StatusException("101003", "考生id不允许为空");
         }
 
-        if (null == req.getSize()) {
+        Integer size = req.getSize();
+        if (null == size) {
             throw new StatusException("101004", "数据量大小不允许为空");
         }
 
+        if (size.intValue() > 500) {
+            throw new StatusException("101005", "数据量最大不得超过500");
+        }
 
+        GetPagedToBeMarkExamRecordReq pagedReq = new GetPagedToBeMarkExamRecordReq();
+        pagedReq.setExamId(examId);
+        pagedReq.setSubjectCode(subjectCode);
+        pagedReq.setStartId(startId);
+        pagedReq.setSize(size);
+        GetPagedToBeMarkExamRecordResp pagedResp = examRecordCloudService.getPagedToBeMarkExamRecord(pagedReq);
 
-        return null;
+        OuterGetSubjectiveQuestionResp resp = new OuterGetSubjectiveQuestionResp();
+        resp.setNextId(pagedResp.getNextId());
+        resp.setDataList(getOuterExamRecordBean(pagedResp.getToBeMarkExamRecordBeanList()));
+
+        return resp;
+    }
+
+    /**
+     * 构造满足条件的考试记录集合
+     *
+     * @param toBeMarkExamRecordBeanList
+     * @return
+     */
+    private List<OuterExamRecordBean> getOuterExamRecordBean(List<PagedToBeMarkExamRecordBean> toBeMarkExamRecordBeanList) {
+        if (null == toBeMarkExamRecordBeanList || toBeMarkExamRecordBeanList.isEmpty()) {
+            return null;
+        }
+
+        List<OuterExamRecordBean> resultList = new ArrayList<>();
+        for (PagedToBeMarkExamRecordBean pb : toBeMarkExamRecordBeanList) {
+            OuterExamRecordBean resultBean = new OuterExamRecordBean();
+            resultBean.setExamId(pb.getExamId());
+            resultBean.setStudentCode(pb.getStudentCode());
+            resultBean.setName(pb.getStudentName());
+            resultBean.setCollege(pb.getGrade());
+            resultBean.setClassName(null);
+            resultBean.setTeacher(null);
+            resultBean.setSubjectCode(pb.getCourseCode());
+            resultBean.setSubjectName(pb.getCourseName());
+            resultBean.setExamNumber(String.valueOf(pb.getExamRecordDataId()));
+
+            resultBean.setSubjectives(getSubjectives(pb.getExamId(), pb.getSubjectiveAnswerList()));
+
+            resultList.add(resultBean);
+        }
+
+        return resultList;
+    }
+
+    /**
+     * 构造满足条件的主观题集合
+     *
+     * @param subjectiveAnswerList
+     * @return
+     */
+    private List<OuterSubjectiveQuestionRecordBean> getSubjectives(Long examId,
+                                                                   List<PagedToBeMarkSubjectiveAnswerBean> subjectiveAnswerList) {
+        List<OuterSubjectiveQuestionRecordBean> resultList = new ArrayList<>();
+
+        for (PagedToBeMarkSubjectiveAnswerBean pb : subjectiveAnswerList) {
+            OuterSubjectiveQuestionRecordBean resultBean = new OuterSubjectiveQuestionRecordBean();
+            resultBean.setMainNumber(pb.getMainNumber());
+            resultBean.setSubNumber(pb.getOrder());
+            resultBean.setQuestionId(pb.getQuestionId());
+
+            resultBean.setAnswer(getFormattedAnswer(pb.getAnswer()));
+            resultBean.setStudentAnswer(
+                    getFormattedStudentAnswer(pb.getStudentAnswer(), pb.getAnswerType(), pb.getQuestionType(), examId));
+            resultBean.setBody(getFormattedBody(pb.getBody()));
+            resultBean.setParentBody(getFormattedParentBody(pb.getParentBody()));
+
+            resultList.add(resultBean);
+        }
+
+        return resultList;
+    }
+
+    /**
+     * 格式化父题干
+     *
+     * @param parentBody
+     * @return
+     */
+    private OuterSectionCollectionBean getFormattedParentBody(String parentBody) {
+        if (StringUtils.isNullOrEmpty(parentBody)) {
+            return null;
+        }
+
+        return getBodyOrAnswer(parentBody);
+    }
+
+    /**
+     * 格式化小题题干
+     *
+     * @param body
+     * @return
+     */
+    private OuterSectionCollectionBean getFormattedBody(String body) {
+        if (StringUtils.isNullOrEmpty(body)) {
+            return null;
+        }
+
+        return getBodyOrAnswer(body);
+    }
+
+    /**
+     * 格式化学生答案
+     *
+     * @param studentAnswer
+     * @return
+     */
+    private OuterSectionCollectionBean getFormattedStudentAnswer(String studentAnswer,
+                                                                 AnswerType answerType,
+                                                                 QuestionType questionType, Long examId) {
+        String transformedAnswerType = getTransformedAnswerType(answerType, questionType, examId);
+        String transformedStudentAnswer = getTransformedStudentAnswer(studentAnswer);
+
+        List<OuterSectionBean> sectionBeanList = new ArrayList<>();
+        List<OuterBlockBean> blockBeanList = new ArrayList<>();
+
+        //校验答案格式,校验成功才追加至集合,否则不追加
+        if (validateAnswer(transformedAnswerType, transformedStudentAnswer)) {
+            //图片文件特殊处理
+            if (!StringUtils.isNullOrEmpty(transformedStudentAnswer) && "image".equals(transformedAnswerType)) {
+                if (transformedStudentAnswer.indexOf("|") > -1) {
+
+                    String[] imgAnswers = transformedStudentAnswer.split("\\|");
+
+                    for (int i = 0; i < imgAnswers.length; i++) {
+                        OuterBlockBean blockBean = new OuterBlockBean();
+                        blockBean.setType(transformedAnswerType);
+                        blockBean.setValue(getSimpleTransformedAnswer(transformedAnswerType, imgAnswers[i]));
+
+                        //又拍云图片的宽*高
+                        String imgWH = RegExpUtil.find(imgAnswers[i], "(\\d+)x(\\d+)");
+                        if (!StringUtils.isNullOrEmpty(imgWH)) {
+                            Map<String, Object> paramMap = new HashMap<>();
+                            paramMap.put("width", Integer.valueOf(imgWH.split("x")[0]));
+                            paramMap.put("height", Integer.valueOf(imgWH.split("x")[1]));
+                            blockBean.setParam(paramMap);
+                        }
+
+                        blockBeanList.add (blockBean);
+                    }
+
+                }
+            } else {
+                OuterBlockBean blockBean = new OuterBlockBean();
+                blockBean.setType(transformedAnswerType);
+                blockBean.setValue(getSimpleTransformedAnswer(transformedAnswerType, transformedStudentAnswer));
+                blockBeanList.add(blockBean);
+            }
+        }
+
+        OuterSectionBean sectionBean = new OuterSectionBean();
+        sectionBean.setBlocks(blockBeanList);
+        sectionBeanList.add(sectionBean);
+
+        OuterSectionCollectionBean resultBean = new OuterSectionCollectionBean();
+        resultBean.setSections(sectionBeanList);
+        return resultBean;
+    }
+
+    /**
+     * 格式化标准答案
+     *
+     * @param answer
+     * @return
+     */
+    private OuterSectionCollectionBean getFormattedAnswer(String answer) {
+        if (StringUtils.isNullOrEmpty(answer)) {
+            return null;
+        }
+
+        return getBodyOrAnswer(answer);
+    }
+
+    /**
+     * 根据原始作答类型和学生实际作答推断出真实的作答类型
+     *
+     * @param answerType   原始作答类型
+     * @param questionType 题型
+     * @param examId       考试id
+     * @return
+     */
+    private String getTransformedAnswerType(AnswerType answerType, QuestionType questionType, Long examId) {
+        //如果题型为问答题,且作答类型不为音频作答,且开启微信作答,则此题为图片作答题
+        if (questionType == QuestionType.ESSAY &&
+                (null == answerType || (null != answerType && answerType != AnswerType.SINGLE_AUDIO))) {
+            if (ExamCacheTransferHelper.weixinAnswerEnabled(examId)) {
+                return "image";
+            }
+        }
+
+        if (null != answerType && answerType == AnswerType.SINGLE_AUDIO) {
+            return "audio";
+        }
+
+        return "text";
+    }
+
+    /**
+     * 转化过的作答
+     *
+     * @param studentAnswer
+     * @return
+     */
+    private String getTransformedStudentAnswer(String studentAnswer) {
+        if (StringUtils.isNullOrEmpty(studentAnswer)) {
+            return studentAnswer;
+        }
+
+        //图片题特殊处理(因为图片作答题中有html标签)
+        Document doc = Jsoup.parse(studentAnswer);
+        Elements imgElements = doc.select("img[src]");
+        String imgStudentAnswer = "";
+        for (Element el : imgElements) {
+            String src = el.attr("src");
+            if (!StringUtils.isNullOrEmpty(src)) {
+                imgStudentAnswer += src + "|";
+            }
+        }
+        if (!StringUtils.isNullOrEmpty(imgStudentAnswer)) {
+            return imgStudentAnswer.substring(0, imgStudentAnswer.length() - 1);
+        }
+
+        return studentAnswer;
+    }
+
+    /**
+     * 单个答案再次格式化,去除地址中的多余后缀
+     * @param answerType
+     * @param studentAnswer
+     * @return
+     */
+    private String getSimpleTransformedAnswer(String answerType, String studentAnswer) {
+        if ("image".equals(answerType)) {
+            String regExp = "(ftp|https?)\\:\\/\\/([\\w\\_\\-]+)\\.([\\w\\-]+[\\.]?)*[\\w]+\\.[a-zA-Z]{2,10}(.*)\\.(png|jpg|gif|jpeg)";
+            return RegExpUtil.find(studentAnswer, regExp);
+        }
+        return studentAnswer;
+    }
+
+    /**
+     * 获取格式化后后的题干或标准答案
+     *
+     * @param str
+     * @return
+     */
+    private OuterSectionCollectionBean getBodyOrAnswer(String str) {
+        OuterSectionCollectionBean body = new OuterSectionCollectionBean();
+        List<OuterSectionBean> sections = new ArrayList<>();
+        // 得到小题题干或者答案行数
+        if (org.apache.commons.lang3.StringUtils.isBlank(str)) {
+            return body;
+        }
+        String[] questionRowStrings = str.split("</p>");
+        for (int i = 0; i < questionRowStrings.length; i++) {
+            List<OuterBlockBean> blocks = disposeQuestionBodyOrOption(questionRowStrings[i]);
+            if (blocks != null && blocks.size() > 0) {
+                OuterSectionBean section = new OuterSectionBean();
+                // 将小题题干拆分为Block集合
+                section.setBlocks(blocks);
+                sections.add(section);
+            }
+        }
+        body.setSections(sections);
+        return body;
+    }
+
+    private List<OuterBlockBean> disposeQuestionBodyOrOption(String questionRow) {
+        List<OuterBlockBean> blocks = new ArrayList<>();
+        // 去掉每行里面的<p>,<span>,</span>标签
+        questionRow = questionRow.replaceAll("<p>", "").replaceAll("</p>", "").replaceAll("<span>", "")
+                .replaceAll("</span>", "").replaceAll("</a>", "");
+        String[] questionRowStrings = questionRow.split("<|/>|>");
+        for (int i = 0; i < questionRowStrings.length; i++) {
+            OuterBlockBean block = new OuterBlockBean();
+            String rowStr = questionRowStrings[i];
+            // 判断是否有图片
+            if (rowStr.startsWith("img")) {
+                rowStr = "<" + rowStr + ">";
+                Map<String, Object> param = new HashMap<>();
+                // 需要继续做截取,取到Parma
+                block.setType("image");
+                // 获取图片的路径
+                List<String> strSrcList = getImg(rowStr, "src");
+                if (strSrcList.size() > 0) {
+                    String strSrc = strSrcList.get(0).replaceAll("src=\"", "").replaceAll("\"", "");
+                    block.setValue(strSrc);
+                }
+                // 获取图片的高度
+                List<String> strHeightList = getImg(rowStr, "height");
+                if (strHeightList.size() > 0) {
+                    String strHeight = strHeightList.get(0).replaceAll("height=\"", "").replaceAll("\"", "");
+                    param.put("height", strHeight);
+                }
+                // 获取图片的宽度
+                List<String> strWidthList = getImg(rowStr, "width");
+                if (strHeightList.size() > 0) {
+                    String strWidth = strWidthList.get(0).replaceAll("width=\"", "").replaceAll("\"", "");
+                    param.put("width", strWidth);
+                }
+                block.setParam(param);
+                blocks.add(block);
+            } else if (rowStr.startsWith("a") && rowStr.contains("id") && rowStr.contains("name")) { // 处理音频
+                rowStr = "<" + rowStr + ">";
+                block.setPlayTime(1);
+                block.setType("audio");
+                block.setValue(this.getAttrValue(rowStr, "id"));
+                blocks.add(block);
+            } else {
+                block.setType("text");
+                rowStr = rowStr.replace("&nbsp;", "");// 消除空格
+                rowStr = rowStr.replace("&quot;", "\"");// 将&quot;转换成\"
+                rowStr = rowStr.replace("&lt;", "<");// 将&lt;转换成<
+                rowStr = rowStr.replace("&gt;", ">");// 将&gt;转换成>
+                rowStr = rowStr.replace("&amp;", "&");// 将&amp;转换成&
+                if (org.apache.commons.lang3.StringUtils.isNotBlank(rowStr)) {
+                    block.setValue(rowStr);
+                    blocks.add(block);
+                }
+            }
+        }
+
+        return blocks;
+    }
+
+    /**
+     * 获取图片里面的路径,长度,宽度
+     */
+    private List<String> getImg(String s, String str) {
+        String regex;
+        List<String> list = new ArrayList<>();
+        regex = str + "=\"(.*?)\"";
+        Pattern pa = Pattern.compile(regex, Pattern.DOTALL);
+        Matcher ma = pa.matcher(s);
+        while (ma.find()) {
+            list.add(ma.group());
+        }
+        return list;
+    }
+
+    private String getAttrValue(String questionStr, String attrName) {
+        Pattern aPattern = Pattern.compile("a.*");
+        Matcher aMatcher = aPattern.matcher(questionStr);
+
+        if (aMatcher.find()) {
+            String idRegex = attrName + "=\".*?\"";
+            Pattern idPattern = Pattern.compile(idRegex);
+            Matcher idMatcher = idPattern.matcher(aMatcher.group());
+            if (idMatcher.find()) {
+                return idMatcher.group()
+                        .replaceAll(attrName + "=\"", "")
+                        .replaceAll("\"", "");
+            }
+        }
+
+        return "";
+    }
+
+    /**
+     * 校验答案格式是否正确
+     *
+     * @param realAnswerType
+     * @param studentAnswer
+     * @return
+     */
+    private boolean validateAnswer(String realAnswerType, String studentAnswer) {
+        if (StringUtils.isNullOrEmpty(studentAnswer)) {
+            return false;
+        }
+
+        String regExp;
+        switch (realAnswerType) {
+            case "image":
+                //图片必须包含.png|jpg|gif|jpeg
+                regExp = "^(ftp|https?)\\:\\/\\/([\\w\\_\\-]+)\\.([\\w\\-]+[\\.]?)*[\\w]+\\.[a-zA-Z]{2,10}(.*)\\.(png|jpg|gif|jpeg).*$";
+                return studentAnswer.matches(regExp);
+            case "audio":
+                //音频必须包含.mp3
+                regExp = "^(ftp|https?)\\:\\/\\/([\\w\\_\\-]+)\\.([\\w\\-]+[\\.]?)*[\\w]+\\.[a-zA-Z]{2,10}(.*)\\.(mp3)";
+                return studentAnswer.matches(regExp);
+        }
+
+        return true;
     }
 }

+ 3 - 3
examcloud-exchange-outer-api/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/bean/OuterSubjectiveQuestionRecordBean.java

@@ -18,7 +18,7 @@ public class OuterSubjectiveQuestionRecordBean implements JsonSerializable{
 	private Integer mainNumber;
 
 	@ApiModelProperty(value = "小题号", example = "XX", required = true)
-	private String subNumber;
+	private Integer subNumber;
 
 	@ApiModelProperty(value = "试题id,String,一个套题共用一个questionId", example = "1", required = true)
 	private String questionId;
@@ -43,11 +43,11 @@ public class OuterSubjectiveQuestionRecordBean implements JsonSerializable{
 		this.mainNumber = mainNumber;
 	}
 
-	public String getSubNumber() {
+	public Integer getSubNumber() {
 		return subNumber;
 	}
 
-	public void setSubNumber(String subNumber) {
+	public void setSubNumber(Integer subNumber) {
 		this.subNumber = subNumber;
 	}
 

+ 33 - 33
examcloud-exchange-outer-api/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/request/OuterGetSubjectiveQuestionReq.java

@@ -11,49 +11,49 @@ import io.swagger.annotations.ApiModelProperty;
  */
 public class OuterGetSubjectiveQuestionReq extends EnterpriseRequest {
 
-	private static final long serialVersionUID = 8303860788475413215L;
+    private static final long serialVersionUID = 8303860788475413215L;
 
-	@ApiModelProperty(value = "考试ID", example = "128", required = true)
-	private Long examId;
+    @ApiModelProperty(value = "考试ID", example = "128", required = true)
+    private Long examId;
 
-	@ApiModelProperty(value = "科目代码", example = "128", required = true)
-	private String subjectCode;
+    @ApiModelProperty(value = "科目代码", example = "128", required = true)
+    private String subjectCode;
 
-	@ApiModelProperty(value = "考生id,Long,第一次调用传0,下次调用,用返回的nextId", example = "0", required = true)
-	private Long startId;
+    @ApiModelProperty(value = "考生id,Long,第一次调用传0,下次调用,用返回的nextId", example = "0", required = true)
+    private Long startId;
 
-	@ApiModelProperty(value = "考试记录集合大小,最大不得超过500", example = "200", required = true)
-	private Long size;
+    @ApiModelProperty(value = "考试记录集合大小,最大不得超过500", example = "200", required = true)
+    private Integer size;
 
-	public Long getExamId() {
-		return examId;
-	}
+    public Long getExamId() {
+        return examId;
+    }
 
-	public void setExamId(Long examId) {
-		this.examId = examId;
-	}
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
 
-	public String getSubjectCode() {
-		return subjectCode;
-	}
+    public String getSubjectCode() {
+        return subjectCode;
+    }
 
-	public void setSubjectCode(String subjectCode) {
-		this.subjectCode = subjectCode;
-	}
+    public void setSubjectCode(String subjectCode) {
+        this.subjectCode = subjectCode;
+    }
 
-	public Long getStartId() {
-		return startId;
-	}
+    public Long getStartId() {
+        return startId;
+    }
 
-	public void setStartId(Long startId) {
-		this.startId = startId;
-	}
+    public void setStartId(Long startId) {
+        this.startId = startId;
+    }
 
-	public Long getSize() {
-		return size;
-	}
+    public Integer getSize() {
+        return size;
+    }
 
-	public void setSize(Long size) {
-		this.size = size;
-	}
+    public void setSize(Integer size) {
+        this.size = size;
+    }
 }