wuwen 3 лет назад
Родитель
Сommit
3d71c16784

+ 118 - 0
src/main/java/com/ssj/bean/kmt/kmt/domain/KmtHomeworkWrongQuestionBackup.java

@@ -0,0 +1,118 @@
+package com.ssj.bean.kmt.kmt.domain;
+
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Entity
+@Table(name = "kmt_homework_wrong_question_backup")
+public class KmtHomeworkWrongQuestionBackup extends BaseEntity {
+
+    private static final long serialVersionUID = 3061402905883944457L;
+
+    private String homeworkId;  //作业id
+    private String homeworkPictureId;//作业图片id
+    private String questionId;//错题题目id
+    private String spaceIndex;//错空编号
+    private String correctSpaceIndex; //对空编号
+    private String studentId;//学生id
+    private Integer type;//错题类型:1为答错,2为未完成
+    private Boolean isDelete;
+    private Date updateTime;//更新时间
+    private Date createTime;//创建时间
+    /**
+     * 用于家长端错题本错题是否显示
+     */
+    private boolean isWrongQuesDelete;
+    @Column( updatable = false)
+    public String getHomeworkId() {
+        return homeworkId;
+    }
+
+    public void setHomeworkId(String homeworkId) {
+        this.homeworkId = homeworkId;
+    }
+    @Column( updatable = false)
+    public String getHomeworkPictureId() {
+        return homeworkPictureId;
+    }
+
+    public void setHomeworkPictureId(String homeworkPictureId) {
+        this.homeworkPictureId = homeworkPictureId;
+    }
+
+    public String getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(String questionId) {
+        this.questionId = questionId;
+    }
+
+    public String getSpaceIndex() {
+        return spaceIndex;
+    }
+
+    public void setSpaceIndex(String spaceIndex) {
+        this.spaceIndex = spaceIndex;
+    }
+
+    public String getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(String studentId) {
+        this.studentId = studentId;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Boolean getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Boolean isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public boolean getIsWrongQuesDelete() {
+        return isWrongQuesDelete;
+    }
+
+    public void setIsWrongQuesDelete(boolean wrongQuesDelete) {
+        isWrongQuesDelete = wrongQuesDelete;
+    }
+
+    public String getCorrectSpaceIndex() {
+        return correctSpaceIndex;
+    }
+
+    public void setCorrectSpaceIndex(String correctSpaceIndex) {
+        this.correctSpaceIndex = correctSpaceIndex;
+    }
+}

+ 169 - 0
src/main/java/com/ssj/bean/sys/homework/domain/HomeworkHowDetailBackup.java

@@ -0,0 +1,169 @@
+package com.ssj.bean.sys.homework.domain;
+
+
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Entity
+@Table(name = "scon_homework_how_details_backup")
+public class HomeworkHowDetailBackup extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	@Column(name = "wrong_question_id")
+    private String wrongQuestionId;
+
+    @Column(name = "homework_id")
+    private String homeworkId;
+
+    @Column(name = "homework_picture_id")
+    private String homeworkPictureId;
+
+    @Column(name = "how_detail_id")
+    private String howDetailId;
+
+    private String module;
+
+    /**
+     * 作业类型,1错题知识点,2作业知识点
+     */
+    @Column(name = "work_detail_type")
+    private Integer workDetailType;
+
+    @Column(name = "detail_count")
+    private Integer detailCount;
+    private int knowledgeVersion = 1;//知识点版本
+    private Date createTime;
+    private Integer totalCount = 1;
+    /**
+     * 用于家长端错题本错题是否显示
+     */
+    private boolean isWrongQuesDelete;
+
+    private String grade;
+
+    private int semester;
+
+    public boolean getIsWrongQuesDelete() {
+        return isWrongQuesDelete;
+    }
+
+    public void setIsWrongQuesDelete(boolean wrongQuesDelete) {
+        isWrongQuesDelete = wrongQuesDelete;
+    }
+
+    public String getWrongQuestionId() {
+        return wrongQuestionId;
+    }
+
+    public void setWrongQuestionId(String wrongQuestionId) {
+        this.wrongQuestionId = wrongQuestionId;
+    }
+    @Column( updatable = false)
+    public String getHomeworkId() {
+        return homeworkId;
+    }
+
+    public void setHomeworkId(String homeworkId) {
+        this.homeworkId = homeworkId;
+    }
+    @Column( updatable = false)
+    public String getHomeworkPictureId() {
+        return homeworkPictureId;
+    }
+
+    public void setHomeworkPictureId(String homeworkPictureId) {
+        this.homeworkPictureId = homeworkPictureId;
+    }
+
+    public String getHowDetailId() {
+        return howDetailId;
+    }
+
+    public void setHowDetailId(String howDetailId) {
+        this.howDetailId = howDetailId;
+    }
+
+    public String getModule() {
+        return module;
+    }
+
+    public void setModule(String module) {
+        this.module = module;
+    }
+
+    public Integer getWorkDetailType() {
+        return workDetailType;
+    }
+
+    public void setWorkDetailType(Integer workDetailType) {
+        this.workDetailType = workDetailType;
+    }
+
+    public Integer getDetailCount() {
+        return detailCount;
+    }
+
+    public void setDetailCount(Integer detailCount) {
+        this.detailCount = detailCount;
+    }
+
+    public int getKnowledgeVersion() {
+        return knowledgeVersion;
+    }
+
+    public void setKnowledgeVersion(int knowledgeVersion) {
+        this.knowledgeVersion = knowledgeVersion;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade;
+    }
+
+    public int getSemester() {
+        return semester;
+    }
+
+    public void setSemester(int semester) {
+        this.semester = semester;
+    }
+
+    @Override
+    public String toString() {
+        return "HomeworkHowDetail{" +
+                "wrongQuestionId='" + wrongQuestionId + '\'' +
+                ", homeworkId='" + homeworkId + '\'' +
+                ", homeworkPictureId='" + homeworkPictureId + '\'' +
+                ", howDetailId='" + howDetailId + '\'' +
+                ", module='" + module + '\'' +
+                ", workDetailType=" + workDetailType +
+                ", detailCount=" + detailCount +
+                ", knowledgeVersion='" + knowledgeVersion + '\'' +
+                ", createTime=" + createTime +
+                '}';
+    }
+}

+ 32 - 6
src/main/java/com/ssj/bean/sys/homework/domain/SconTeacherCorrectRecord.java

@@ -29,13 +29,12 @@ public class SconTeacherCorrectRecord extends BaseEntity {
      */
     private Date createTime;
 
-    public String getTeacherId() {
-        return teacherId;
-    }
 
-    public void setTeacherId(String teacherId) {
-        this.teacherId = teacherId;
-    }
+    private String homeworkWrongQuestionJson;
+    
+    private String homeworkHowDetailJson;
+    
+    
     @Column( updatable = false)
     public String getHomeworkPictureId() {
         return homeworkPictureId;
@@ -60,4 +59,31 @@ public class SconTeacherCorrectRecord extends BaseEntity {
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
+
+	public String getHomeworkWrongQuestionJson() {
+		return homeworkWrongQuestionJson;
+	}
+
+	public void setHomeworkWrongQuestionJson(String homeworkWrongQuestionJson) {
+		this.homeworkWrongQuestionJson = homeworkWrongQuestionJson;
+	}
+
+	public String getHomeworkHowDetailJson() {
+		return homeworkHowDetailJson;
+	}
+
+	public void setHomeworkHowDetailJson(String homeworkHowDetailJson) {
+		this.homeworkHowDetailJson = homeworkHowDetailJson;
+	}
+
+	public String getTeacherId() {
+		return teacherId;
+	}
+
+	public void setTeacherId(String teacherId) {
+		this.teacherId = teacherId;
+	}
+    
+    
+    
 }

+ 6 - 0
src/main/java/com/ssj/service/kmt/correctsys/KmtCorrectHomeworkServiceImpl.java

@@ -104,12 +104,16 @@ public class KmtCorrectHomeworkServiceImpl implements KmtCorrectHomeworkService
     private void correctionSaving4Checker (CorrectionRequest correction, HomeworkPicture homeworkPicture)  throws CommonException {
         Date nowDateTime = new Date();
 
+        String homeworkWrongQuestionJson="";
+        String homeworkHowDetailJson="";
         //保存勾选的对错题
         if (CollectionUtils.isNotEmpty(correction.getAnswerList())){
             List<KmtHomeworkWrongQuestion> wrongQuestions = kmtHomeworkWrongQuestionService.findList(homeworkPicture.getId(), false);
             List<HomeworkHowDetail> homeworkHowDetails = homeworkHowDetailsService.findHowDetailsByHomeworkPictureId(homeworkPicture.getId());
             logger.info("保存对错题前对错题记录{}", JSON.toJSON(wrongQuestions));
             logger.info("报错错题知识点前的知识点记录{}", JSON.toJSON(homeworkHowDetails));
+            homeworkWrongQuestionJson=JSON.toJSON(wrongQuestions).toString();
+            homeworkHowDetailJson=JSON.toJSON(homeworkHowDetails).toString();
             kmtHomeworkWrongQuestionService.deleteByHomeworkPictureId(homeworkPicture.getId());
             homeworkHowDetailsService.deleteExerciseByHomeworkPictureId(homeworkPicture.getId());
             this.saveExerciseCorretion(correction, homeworkPicture);
@@ -122,6 +126,8 @@ public class KmtCorrectHomeworkServiceImpl implements KmtCorrectHomeworkService
             sconTeacherCorrectRecord.setCorrected_picture_url(homeworkPicture.getCorrectedPictureUrl());
             sconTeacherCorrectRecord.setHomeworkPictureId(homeworkPicture.getId());
             sconTeacherCorrectRecord.setTeacherId(homeworkPicture.getTeacherId());
+            sconTeacherCorrectRecord.setHomeworkWrongQuestionJson(homeworkWrongQuestionJson);
+            sconTeacherCorrectRecord.setHomeworkHowDetailJson(homeworkHowDetailJson);
             sconTeacherCorrectRecord.setCreateTime(nowDateTime);
             sconTeacherCorrectRecordService.save(sconTeacherCorrectRecord);
         }