Explorar o código

查重按时间排序

xiatian hai 6 meses
pai
achega
cc7639abb6

+ 297 - 227
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/findreduplicatequestion/ExportQuesReduplicateConsumer.java

@@ -1,227 +1,297 @@
-package cn.com.qmth.dp.examcloud.oe.modules.findreduplicatequestion;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.bson.types.ObjectId;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Scope;
-import org.springframework.data.mongodb.core.MongoTemplate;
-import org.springframework.data.mongodb.core.query.Criteria;
-import org.springframework.data.mongodb.core.query.Query;
-import org.springframework.stereotype.Service;
-
-import cn.com.qmth.dp.examcloud.oe.entity.question.Course;
-import cn.com.qmth.dp.examcloud.oe.enums.question.PaperType;
-import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
-import cn.com.qmth.dp.examcloud.oe.multithread.Consumer;
-import cn.com.qmth.dp.examcloud.oe.util.PaperUtil;
-import cn.com.qmth.examcloud.commons.util.DateUtil;
-
-@Service
-@Scope("prototype")
-public class ExportQuesReduplicateConsumer extends Consumer<Course> {
-
-	@Autowired
-	private MongoTemplate mongoTemplate;
-
-	@Override
-	public void consume(Map<String, Object> param, Course c) {
-		String rootOrgId = (String) param.get("rootOrgId");
-//		String paperName = (String) param.get("paperName");
-//		List<PaperDto> papers = findPaper(rootOrgId, c.getCode(), paperName);
-//		if (CollectionUtils.isEmpty(papers)) {
-//			return;
-//		}
-//		List<ObjectId> paperIds = papers.stream().map(e -> new ObjectId(e.getId())).collect(Collectors.toList());
-//		List<UnitDto> units = findUnit(paperIds);
-//		if (CollectionUtils.isEmpty(units)) {
-//			return;
-//		}
-//		List<UnitDto> sin = findUnitByType(units, QuesStructType.SINGLE_ANSWER_QUESTION);
-//		if (CollectionUtils.isNotEmpty(sin)) {
-//			check(sin, c.getName(), c.getCode());
-//		}
-//		List<UnitDto> mut = findUnitByType(units, QuesStructType.MULTIPLE_ANSWER_QUESTION);
-//		if (CollectionUtils.isNotEmpty(mut)) {
-//			check(mut, c.getName(), c.getCode());
-//		}
-//		List<UnitDto> bool = findUnitByType(units, QuesStructType.BOOL_ANSWER_QUESTION);
-//		if (CollectionUtils.isNotEmpty(bool)) {
-//			check(bool, c.getName(), c.getCode());
-//		}
-
-		List<QuestionDto> quess = findQuestion(rootOrgId, c.getCode());
-		if (CollectionUtils.isEmpty(quess)) {
-			return;
-		}
-		Map<QuesStructType,List<QuestionDto>> map=toMap(quess);
-		for(QuesStructType k:map.keySet()) {
-			checkQuestion(map.get(k), c.getName(), c.getCode());
-		}
-		System.out.println("处理完科目:" + c.getCode());
-	}
-
-//	private List<UnitDto> findUnitByType(List<UnitDto> dtos, QuesStructType type) {
-//		List<UnitDto> ret = new ArrayList<>();
-//		for (UnitDto dto : dtos) {
-//			if (type.equals(dto.getQuestionType())) {
-//				ret.add(dto);
-//			}
-//		}
-//		return ret;
-//	}
-
-	private Map<QuesStructType,List<QuestionDto>> toMap(List<QuestionDto> dtos) {
-		Map<QuesStructType,List<QuestionDto>> ret=new HashMap<>();
-		for (QuestionDto dto : dtos) {
-			List<QuestionDto> tem=ret.get(dto.getQuestionType());
-			if(tem==null) {
-				tem=new ArrayList<>();
-				ret.put(dto.getQuestionType(), tem);
-			}
-			tem.add(dto);
-		}
-		return ret;
-	}
-
-//	private List<PaperDto> findPaper(String rootOrgId, String courseCode, String paperName) {
-//		Query query = new Query();
-//		query.addCriteria(Criteria.where("orgId").is(rootOrgId));
-//		query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT.name()));
-//		query.addCriteria(Criteria.where("course.code").is(courseCode));
-//		query.addCriteria(Criteria.where("name").regex(".*?\\.*" + paperName + ".*"));
-//		List<PaperDto> ret = this.mongoTemplate.find(query, PaperDto.class, "paper");
-//		return ret;
-//	}
-
-	private List<QuestionDto> findQuestion(String rootOrgId, String courseCode) {
-		Date day=DateUtil.parse("2024-06-13 00:00:00", "yyyy-MM-dd HH:mm:ss");
-		Query query = new Query();
-		query.addCriteria(Criteria.where("orgId").is(rootOrgId));
-		query.addCriteria(Criteria.where("course.code").is(courseCode));
-		query.addCriteria(Criteria.where("creationBy").is(646523L));
-		query.addCriteria(Criteria.where("creationDate").gt(day));
-		List<QuestionDto> ret = this.mongoTemplate.find(query, QuestionDto.class, "question");
-		return ret;
-	}
-
-//	private List<UnitDto> findUnit(List<ObjectId> paperIds) {
-//		Query query = new Query();
-//		query.addCriteria(Criteria.where("paper.$id").in(paperIds));
-//		List<UnitDto> ret = this.mongoTemplate.find(query, UnitDto.class, "paperDetailUnit");
-//		return ret;
-//	}
-//
-//	private void check(List<UnitDto> dtos, String cname, String ccode) {
-//		Set<String> checkIds = new HashSet<>();
-//		for (UnitDto dto : dtos) {
-//			dto.setExtractText(PaperUtil.getExtractText(dto.getQuestion()));
-//			if (StringUtils.isEmpty(dto.getExtractText())) {
-//				checkIds.add(dto.getId());
-//			}
-//		}
-//		int group = 0;
-//		for (UnitDto dto : dtos) {
-//			if (checkIds.contains(dto.getId())) {
-//				continue;
-//			}
-//			String quesText1 = dto.getExtractText();
-//			boolean hasGroup = false;
-//			for (UnitDto subdto : dtos) {
-//				if (subdto.getId().equals(dto.getId())) {
-//					continue;
-//				}
-//				if (checkIds.contains(subdto.getId())) {
-//					continue;
-//				}
-//				String quesText2 = subdto.getExtractText();
-//				double similarity = StringSimilarityUtils.getSimilarityWithCosinesBySeg(quesText1, quesText2);
-//				if (similarity > 0.95) {
-//					checkIds.add(dto.getId());
-//					checkIds.add(subdto.getId());
-//					if (!hasGroup) {
-//						hasGroup = true;
-//						group++;
-//						RetDto rd = new RetDto(group, ccode, cname, dto.getPaper().getName(),
-//								dto.getQuestionType().getName(), dto.getPaperDetail().getNumber(), dto.getNumber());
-//						addRet(rd);
-//					}
-//					RetDto rd = new RetDto(group, ccode, cname, subdto.getPaper().getName(),
-//							subdto.getQuestionType().getName(), subdto.getPaperDetail().getNumber(),
-//							subdto.getNumber());
-//					addRet(rd);
-//				}
-//			}
-//		}
-//	}
-
-	private void checkQuestion(List<QuestionDto> dtos, String cname, String ccode) {
-		Set<String> checkIds = new HashSet<>();
-		for (QuestionDto dto : dtos) {
-			dto.setExtractText(PaperUtil.getExtractText(dto));
-			if (PaperUtil.hasImg(dto)||StringUtils.isEmpty(dto.getExtractText())) {
-				checkIds.add(dto.getId());
-			}
-		}
-        int length = dtos.size();
-		int group = 0;
-		for (int i = 0; i < length - 1; i++) {
-			QuestionDto dto=dtos.get(i);
-			if (checkIds.contains(dto.getId())) {
-				continue;
-			}
-			String quesText1 = dto.getExtractText();
-			boolean hasGroup = false;
-			for (int j = i + 1; j < length; j++) {
-				QuestionDto subdto=dtos.get(j);
-				if (checkIds.contains(subdto.getId())) {
-					continue;
-				}
-				String quesText2 = subdto.getExtractText();
-//				double similarity = StringSimilarityUtils.getSimilarityWithCosinesBySeg(quesText1, quesText2);
-//				if (similarity > 0.94) {
-				if (StringUtils.equals(quesText1, quesText2)) {
-					checkIds.add(dto.getId());
-					checkIds.add(subdto.getId());
-					if (!hasGroup) {
-						hasGroup = true;
-						group++;
-						RetDto rd = new RetDto(group, ccode, cname, dto.getQuestionType().getName(),dto.getId());
-						rd.setValid("是");
-						fillInfo(rd);
-						addRet(rd);
-					}
-					RetDto rd = new RetDto(group, ccode, cname, subdto.getQuestionType().getName(),subdto.getId());
-					rd.setValid("否");
-					fillInfo(rd);
-					addRet(rd);
-				}
-			}
-		}
-	}
-
-	private void fillInfo(RetDto dto) {
-		UnitDto u=getUnit(dto.getQuestionId());
-		dto.setPaperName(u.getPaper().getName());
-		dto.setDetailNum(u.getPaperDetail().getNumber());
-		dto.setUnitNum(u.getNumber());
-		dto.setUnitId(u.getId());
-	}
-	
-	private UnitDto getUnit(String questionId) {
-		Query query = new Query();
-		query.addCriteria(Criteria.where("question.$id").in(new ObjectId(questionId)));
-		query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT.name()));
-		List<UnitDto> ret = this.mongoTemplate.find(query, UnitDto.class, "paperDetailUnit");
-		return ret.get(0);
-	}
-
-}
+package cn.com.qmth.dp.examcloud.oe.modules.findreduplicatequestion;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.bson.types.ObjectId;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Scope;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Criteria;
+import org.springframework.data.mongodb.core.query.Query;
+import org.springframework.stereotype.Service;
+
+import cn.com.qmth.dp.examcloud.oe.entity.question.Course;
+import cn.com.qmth.dp.examcloud.oe.enums.question.PaperType;
+import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
+import cn.com.qmth.dp.examcloud.oe.multithread.Consumer;
+import cn.com.qmth.dp.examcloud.oe.util.PaperUtil;
+
+@Service
+@Scope("prototype")
+public class ExportQuesReduplicateConsumer extends Consumer<Course> {
+
+    @Autowired
+    private MongoTemplate mongoTemplate;
+
+    @Override
+    public void consume(Map<String, Object> param, Course c) {
+        String rootOrgId = (String) param.get("rootOrgId");
+        // String paperName = (String) param.get("paperName");
+        // List<PaperDto> papers = findPaper(rootOrgId, c.getCode(), paperName);
+        // if (CollectionUtils.isEmpty(papers)) {
+        // return;
+        // }
+        // List<ObjectId> paperIds = papers.stream().map(e -> new
+        // ObjectId(e.getId())).collect(Collectors.toList());
+        // List<UnitDto> units = findUnit(paperIds);
+        // if (CollectionUtils.isEmpty(units)) {
+        // return;
+        // }
+        // List<UnitDto> sin = findUnitByType(units,
+        // QuesStructType.SINGLE_ANSWER_QUESTION);
+        // if (CollectionUtils.isNotEmpty(sin)) {
+        // check(sin, c.getName(), c.getCode());
+        // }
+        // List<UnitDto> mut = findUnitByType(units,
+        // QuesStructType.MULTIPLE_ANSWER_QUESTION);
+        // if (CollectionUtils.isNotEmpty(mut)) {
+        // check(mut, c.getName(), c.getCode());
+        // }
+        // List<UnitDto> bool = findUnitByType(units,
+        // QuesStructType.BOOL_ANSWER_QUESTION);
+        // if (CollectionUtils.isNotEmpty(bool)) {
+        // check(bool, c.getName(), c.getCode());
+        // }
+
+        List<QuestionDto> quess = findQuestion(rootOrgId, c.getCode());
+        if (CollectionUtils.isEmpty(quess)) {
+            return;
+        }
+        Map<QuesStructType, List<QuestionDto>> map = toMap(quess);
+        for (QuesStructType k : map.keySet()) {
+            checkQuestion(map.get(k), c.getName(), c.getCode());
+        }
+        System.out.println("处理完科目:" + c.getCode());
+    }
+
+    // private List<UnitDto> findUnitByType(List<UnitDto> dtos, QuesStructType
+    // type) {
+    // List<UnitDto> ret = new ArrayList<>();
+    // for (UnitDto dto : dtos) {
+    // if (type.equals(dto.getQuestionType())) {
+    // ret.add(dto);
+    // }
+    // }
+    // return ret;
+    // }
+
+    private Map<QuesStructType, List<QuestionDto>> toMap(List<QuestionDto> dtos) {
+        Map<QuesStructType, List<QuestionDto>> ret = new HashMap<>();
+        for (QuestionDto dto : dtos) {
+            List<QuestionDto> tem = ret.get(dto.getQuestionType());
+            if (tem == null) {
+                tem = new ArrayList<>();
+                ret.put(dto.getQuestionType(), tem);
+            }
+            tem.add(dto);
+        }
+        return ret;
+    }
+
+    // private List<PaperDto> findPaper(String rootOrgId, String courseCode,
+    // String paperName) {
+    // Query query = new Query();
+    // query.addCriteria(Criteria.where("orgId").is(rootOrgId));
+    // query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT.name()));
+    // query.addCriteria(Criteria.where("course.code").is(courseCode));
+    // query.addCriteria(Criteria.where("name").regex(".*?\\.*" + paperName +
+    // ".*"));
+    // List<PaperDto> ret = this.mongoTemplate.find(query, PaperDto.class,
+    // "paper");
+    // return ret;
+    // }
+
+    private List<QuestionDto> findQuestion(String rootOrgId, String courseCode) {
+        // Date day=DateUtil.parse("2024-06-13 00:00:00", "yyyy-MM-dd
+        // HH:mm:ss");
+        Query query = new Query();
+        query.addCriteria(Criteria.where("orgId").is(rootOrgId));
+        query.addCriteria(Criteria.where("course.code").is(courseCode));
+        // query.addCriteria(Criteria.where("creationBy").is(646523L));
+        // query.addCriteria(Criteria.where("creationDate").gt(day));
+        List<QuestionDto> ret = this.mongoTemplate.find(query, QuestionDto.class, "question");
+        return ret;
+    }
+
+    // private List<UnitDto> findUnit(List<ObjectId> paperIds) {
+    // Query query = new Query();
+    // query.addCriteria(Criteria.where("paper.$id").in(paperIds));
+    // List<UnitDto> ret = this.mongoTemplate.find(query, UnitDto.class,
+    // "paperDetailUnit");
+    // return ret;
+    // }
+    //
+    // private void check(List<UnitDto> dtos, String cname, String ccode) {
+    // Set<String> checkIds = new HashSet<>();
+    // for (UnitDto dto : dtos) {
+    // dto.setExtractText(PaperUtil.getExtractText(dto.getQuestion()));
+    // if (StringUtils.isEmpty(dto.getExtractText())) {
+    // checkIds.add(dto.getId());
+    // }
+    // }
+    // int group = 0;
+    // for (UnitDto dto : dtos) {
+    // if (checkIds.contains(dto.getId())) {
+    // continue;
+    // }
+    // String quesText1 = dto.getExtractText();
+    // boolean hasGroup = false;
+    // for (UnitDto subdto : dtos) {
+    // if (subdto.getId().equals(dto.getId())) {
+    // continue;
+    // }
+    // if (checkIds.contains(subdto.getId())) {
+    // continue;
+    // }
+    // String quesText2 = subdto.getExtractText();
+    // double similarity =
+    // StringSimilarityUtils.getSimilarityWithCosinesBySeg(quesText1,
+    // quesText2);
+    // if (similarity > 0.95) {
+    // checkIds.add(dto.getId());
+    // checkIds.add(subdto.getId());
+    // if (!hasGroup) {
+    // hasGroup = true;
+    // group++;
+    // RetDto rd = new RetDto(group, ccode, cname, dto.getPaper().getName(),
+    // dto.getQuestionType().getName(), dto.getPaperDetail().getNumber(),
+    // dto.getNumber());
+    // addRet(rd);
+    // }
+    // RetDto rd = new RetDto(group, ccode, cname, subdto.getPaper().getName(),
+    // subdto.getQuestionType().getName(), subdto.getPaperDetail().getNumber(),
+    // subdto.getNumber());
+    // addRet(rd);
+    // }
+    // }
+    // }
+    // }
+
+    private void checkQuestion(List<QuestionDto> dtos, String cname, String ccode) {
+        List<RetDto> ret = new ArrayList<>();
+        Set<String> checkIds = new HashSet<>();
+        for (QuestionDto dto : dtos) {
+            dto.setExtractText(PaperUtil.getExtractText(dto));
+            if (PaperUtil.hasImg(dto) || StringUtils.isEmpty(dto.getExtractText())) {
+                checkIds.add(dto.getId());
+            }
+        }
+        int length = dtos.size();
+        int group = 0;
+        for (int i = 0; i < length - 1; i++) {
+            QuestionDto dto = dtos.get(i);
+            if (checkIds.contains(dto.getId())) {
+                continue;
+            }
+            String quesText1 = dto.getExtractText();
+            boolean hasGroup = false;
+            for (int j = i + 1; j < length; j++) {
+                QuestionDto subdto = dtos.get(j);
+                if (checkIds.contains(subdto.getId())) {
+                    continue;
+                }
+                String quesText2 = subdto.getExtractText();
+                // double similarity =
+                // StringSimilarityUtils.getSimilarityWithCosinesBySeg(quesText1,
+                // quesText2);
+                // if (similarity > 0.94) {
+                if (StringUtils.equals(quesText1, quesText2)) {
+                    checkIds.add(dto.getId());
+                    checkIds.add(subdto.getId());
+                    if (!hasGroup) {
+                        hasGroup = true;
+                        group++;
+                        RetDto rd = new RetDto(group, ccode, cname, dto.getQuestionType().getName(), dto.getId());
+                        rd.setCreationDate(dto.getCreationDate());
+                        // rd.setValid("是");
+                        fillInfo(rd);
+                        ret.add(rd);
+                    }
+                    RetDto rd = new RetDto(group, ccode, cname, subdto.getQuestionType().getName(), subdto.getId());
+                    rd.setCreationDate(subdto.getCreationDate());
+                    // rd.setValid("否");
+                    fillInfo(rd);
+                    // addRet(rd);
+                    ret.add(rd);
+                }
+            }
+        }
+        // 排序
+        Collections.sort(ret, new Comparator<RetDto>() {
+
+            @Override
+            public int compare(RetDto o1, RetDto o2) {
+                Integer d1 = o1.getGroup();
+                Integer d2 = o2.getGroup();
+                if (d1 < d2) {
+                    return -1;
+                } else if (d1 > d2) {
+                    return 1;
+                } else {
+                    Date date1 = o1.getCreationDate();
+                    Date date2 = o2.getCreationDate();
+                    if (date1 == null && date2 == null) {
+                        return 0;
+                    }
+                    if (date1 == null) {
+                        return -1;
+                    }
+                    if (date2 == null) {
+                        return 1;
+                    }
+                    long l1 = date1.getTime();
+                    long l2 = date2.getTime();
+                    if (l1 < l2) {
+                        return -1;
+                    } else if (l1 > l2) {
+                        return 1;
+                    } else {
+                        return 0;
+                    }
+                }
+            }
+
+        });
+
+        Set<Integer> groups = new HashSet<>();
+        for (RetDto dto : ret) {
+            if (!groups.contains(dto.getGroup())) {
+                groups.add(dto.getGroup());
+                dto.setValid("是");
+            } else {
+                dto.setValid("否");
+            }
+        }
+
+        for (RetDto dto : ret) {
+            addRet(dto);
+        }
+    }
+
+    private void fillInfo(RetDto dto) {
+        UnitDto u = getUnit(dto.getQuestionId());
+        dto.setPaperName(u.getPaper().getName());
+        dto.setDetailNum(u.getPaperDetail().getNumber());
+        dto.setUnitNum(u.getNumber());
+        dto.setUnitId(u.getId());
+    }
+
+    private UnitDto getUnit(String questionId) {
+        Query query = new Query();
+        query.addCriteria(Criteria.where("question.$id").in(new ObjectId(questionId)));
+        query.addCriteria(Criteria.where("paperType").is(PaperType.IMPORT.name()));
+        List<UnitDto> ret = this.mongoTemplate.find(query, UnitDto.class, "paperDetailUnit");
+        return ret.get(0);
+    }
+
+}

+ 82 - 70
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/findreduplicatequestion/QuestionDto.java

@@ -1,71 +1,83 @@
-package cn.com.qmth.dp.examcloud.oe.modules.findreduplicatequestion;
-
-import java.util.List;
-
-import javax.persistence.Id;
-
-import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
-
-public class QuestionDto {
-
-	@Id
-	protected String id;
-
-	private QuesStructType questionType;// 试题结构类型
-
-	private String quesBody;
-
-	private List<QuesOptionDto> quesOptions;// 试题选项
-
-	private List<QuestionDto> subQuestions;// 子题目,用于套题
-	private String extractText;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public QuesStructType getQuestionType() {
-		return questionType;
-	}
-
-	public void setQuestionType(QuesStructType questionType) {
-		this.questionType = questionType;
-	}
-
-	public String getQuesBody() {
-		return quesBody;
-	}
-
-	public void setQuesBody(String quesBody) {
-		this.quesBody = quesBody;
-	}
-
-	public List<QuesOptionDto> getQuesOptions() {
-		return quesOptions;
-	}
-
-	public void setQuesOptions(List<QuesOptionDto> quesOptions) {
-		this.quesOptions = quesOptions;
-	}
-
-	public List<QuestionDto> getSubQuestions() {
-		return subQuestions;
-	}
-
-	public void setSubQuestions(List<QuestionDto> subQuestions) {
-		this.subQuestions = subQuestions;
-	}
-
-	public String getExtractText() {
-		return extractText;
-	}
-
-	public void setExtractText(String extractText) {
-		this.extractText = extractText;
-	}
-
+package cn.com.qmth.dp.examcloud.oe.modules.findreduplicatequestion;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.Id;
+
+import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
+
+public class QuestionDto {
+
+    @Id
+    protected String id;
+
+    private QuesStructType questionType;// 试题结构类型
+
+    private String quesBody;
+
+    private List<QuesOptionDto> quesOptions;// 试题选项
+
+    private List<QuestionDto> subQuestions;// 子题目,用于套题
+
+    private String extractText;
+
+    private Date creationDate;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public QuesStructType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuesStructType questionType) {
+        this.questionType = questionType;
+    }
+
+    public String getQuesBody() {
+        return quesBody;
+    }
+
+    public void setQuesBody(String quesBody) {
+        this.quesBody = quesBody;
+    }
+
+    public List<QuesOptionDto> getQuesOptions() {
+        return quesOptions;
+    }
+
+    public void setQuesOptions(List<QuesOptionDto> quesOptions) {
+        this.quesOptions = quesOptions;
+    }
+
+    public List<QuestionDto> getSubQuestions() {
+        return subQuestions;
+    }
+
+    public void setSubQuestions(List<QuestionDto> subQuestions) {
+        this.subQuestions = subQuestions;
+    }
+
+    public String getExtractText() {
+        return extractText;
+    }
+
+    public void setExtractText(String extractText) {
+        this.extractText = extractText;
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
 }

+ 163 - 131
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/findreduplicatequestion/RetDto.java

@@ -1,131 +1,163 @@
-package cn.com.qmth.dp.examcloud.oe.modules.findreduplicatequestion;
-
-import cn.com.qmth.dp.examcloud.oe.excel.ExcelProperty;
-
-public class RetDto {
-	@ExcelProperty(name = "重复分组", width = 15, index = 0)
-	private Integer group;
-	@ExcelProperty(name = "课程代码", width = 15, index = 1)
-	private String courseCode;
-	@ExcelProperty(name = "课程名称", width = 15, index = 2)
-	private String courseName;
-	@ExcelProperty(name = "试卷名称", width = 15, index = 3)
-	private String paperName;
-	@ExcelProperty(name = "题型", width = 15, index = 4)
-	private String type;
-	@ExcelProperty(name = "大题号", width = 15, index = 5)
-	private Integer detailNum;
-	@ExcelProperty(name = "小题号", width = 15, index = 6)
-	private Integer unitNum;
-
-	@ExcelProperty(name = "unit_id", width = 15, index = 7)
-	private String unitId;
-
-	@ExcelProperty(name = "question_id", width = 15, index = 8)
-	private String questionId;
-
-	@ExcelProperty(name = "是否有效", width = 15, index = 9)
-	private String valid;
-
-	public Integer getGroup() {
-		return group;
-	}
-
-	public void setGroup(Integer group) {
-		this.group = group;
-	}
-
-	public String getCourseCode() {
-		return courseCode;
-	}
-
-	public void setCourseCode(String courseCode) {
-		this.courseCode = courseCode;
-	}
-
-	public String getCourseName() {
-		return courseName;
-	}
-
-	public void setCourseName(String courseName) {
-		this.courseName = courseName;
-	}
-
-	public String getPaperName() {
-		return paperName;
-	}
-
-	public void setPaperName(String paperName) {
-		this.paperName = paperName;
-	}
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public Integer getDetailNum() {
-		return detailNum;
-	}
-
-	public void setDetailNum(Integer detailNum) {
-		this.detailNum = detailNum;
-	}
-
-	public Integer getUnitNum() {
-		return unitNum;
-	}
-
-	public void setUnitNum(Integer unitNum) {
-		this.unitNum = unitNum;
-	}
-
-	public RetDto(Integer group, String courseCode, String courseName, String type, String questionId) {
-		super();
-		this.group = group;
-		this.courseCode = courseCode;
-		this.courseName = courseName;
-		this.type = type;
-		this.questionId = questionId;
-	}
-
-	public RetDto(Integer group, String courseCode, String courseName, String paperName, String type, Integer detailNum,
-			Integer unitNum) {
-		super();
-		this.group = group;
-		this.courseCode = courseCode;
-		this.courseName = courseName;
-		this.paperName = paperName;
-		this.type = type;
-		this.detailNum = detailNum;
-		this.unitNum = unitNum;
-	}
-
-	public String getQuestionId() {
-		return questionId;
-	}
-
-	public void setQuestionId(String questionId) {
-		this.questionId = questionId;
-	}
-
-	public String getUnitId() {
-		return unitId;
-	}
-
-	public void setUnitId(String unitId) {
-		this.unitId = unitId;
-	}
-
-	public String getValid() {
-		return valid;
-	}
-
-	public void setValid(String valid) {
-		this.valid = valid;
-	}
-
-}
+package cn.com.qmth.dp.examcloud.oe.modules.findreduplicatequestion;
+
+import java.util.Date;
+
+import cn.com.qmth.dp.examcloud.oe.excel.ExcelProperty;
+
+public class RetDto {
+
+    @ExcelProperty(name = "重复分组", width = 15, index = 0)
+    private Integer group;
+
+    @ExcelProperty(name = "课程代码", width = 15, index = 1)
+    private String courseCode;
+
+    @ExcelProperty(name = "课程名称", width = 15, index = 2)
+    private String courseName;
+
+    @ExcelProperty(name = "试卷名称", width = 15, index = 3)
+    private String paperName;
+
+    @ExcelProperty(name = "题型", width = 15, index = 4)
+    private String type;
+
+    @ExcelProperty(name = "大题号", width = 15, index = 5)
+    private Integer detailNum;
+
+    @ExcelProperty(name = "小题号", width = 15, index = 6)
+    private Integer unitNum;
+
+    @ExcelProperty(name = "unit_id", width = 15, index = 7)
+    private String unitId;
+
+    @ExcelProperty(name = "question_id", width = 15, index = 8)
+    private String questionId;
+
+    @ExcelProperty(name = "是否有效", width = 15, index = 9)
+    private String valid;
+
+    private Date creationDate;
+
+    public Integer getGroup() {
+        return group;
+    }
+
+    public void setGroup(Integer group) {
+        this.group = group;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getPaperName() {
+        return paperName;
+    }
+
+    public void setPaperName(String paperName) {
+        this.paperName = paperName;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Integer getDetailNum() {
+        return detailNum;
+    }
+
+    public void setDetailNum(Integer detailNum) {
+        this.detailNum = detailNum;
+    }
+
+    public Integer getUnitNum() {
+        return unitNum;
+    }
+
+    public void setUnitNum(Integer unitNum) {
+        this.unitNum = unitNum;
+    }
+
+    public RetDto(Integer group, Date creationDate) {
+        super();
+        this.group = group;
+        this.creationDate = creationDate;
+    }
+
+    public RetDto(Integer group, Date creationDate, String questionId) {
+        super();
+        this.group = group;
+        this.creationDate = creationDate;
+        this.questionId = questionId;
+    }
+
+    public RetDto(Integer group, String courseCode, String courseName, String type, String questionId) {
+        super();
+        this.group = group;
+        this.courseCode = courseCode;
+        this.courseName = courseName;
+        this.type = type;
+        this.questionId = questionId;
+    }
+
+    public RetDto(Integer group, String courseCode, String courseName, String paperName, String type, Integer detailNum,
+            Integer unitNum) {
+        super();
+        this.group = group;
+        this.courseCode = courseCode;
+        this.courseName = courseName;
+        this.paperName = paperName;
+        this.type = type;
+        this.detailNum = detailNum;
+        this.unitNum = unitNum;
+    }
+
+    public String getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(String questionId) {
+        this.questionId = questionId;
+    }
+
+    public String getUnitId() {
+        return unitId;
+    }
+
+    public void setUnitId(String unitId) {
+        this.unitId = unitId;
+    }
+
+    public String getValid() {
+        return valid;
+    }
+
+    public void setValid(String valid) {
+        this.valid = valid;
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
+}