diff --git a/web/src/main/java/com/ibeetl/jlw/entity/StudentHandsOnTaskTheory.java b/web/src/main/java/com/ibeetl/jlw/entity/StudentHandsOnTaskTheory.java index df273d11..831f1117 100644 --- a/web/src/main/java/com/ibeetl/jlw/entity/StudentHandsOnTaskTheory.java +++ b/web/src/main/java/com/ibeetl/jlw/entity/StudentHandsOnTaskTheory.java @@ -88,6 +88,11 @@ public class StudentHandsOnTaskTheory extends BaseEntity{ */ private Integer isCourseCentre; + /** + * 资源id + */ + private Long resourcesQuestionId; + public StudentHandsOnTaskTheory(){ } @@ -301,4 +306,12 @@ public class StudentHandsOnTaskTheory extends BaseEntity{ public void setIsCourseCentre(Integer isCourseCentre) { this.isCourseCentre = isCourseCentre; } + + public Long getResourcesQuestionId() { + return resourcesQuestionId; + } + + public void setResourcesQuestionId(Long resourcesQuestionId) { + this.resourcesQuestionId = resourcesQuestionId; + } } diff --git a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java index 23fa3279..7994febd 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskTheoryService.java @@ -420,7 +420,7 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService v.getOrgId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())) + StudentHandsOnTaskTheory taskTheory = theoryList.stream().filter(v -> ObjectUtil.equals(v.getResourcesQuestionId(),resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId()) || v.getOrgId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())) .filter(v -> v.getStudentId().equals(student.getStudentId())).filter(v -> v.getHandsOnTaskId().equals(taskId)).findFirst().orElse(null); if (taskTheory == null) { resourcesQuestion.set("myOptions", ""); @@ -501,7 +501,7 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService v.getOrgId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())) + StudentHandsOnTaskTheory taskTheory = theoryList.stream().filter(v ->ObjectUtil.equals(v.getResourcesQuestionId(),resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId()) || v.getOrgId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())) .filter(v -> v.getStudentId().equals(student.getStudentId())).filter(v -> v.getHandsOnTaskId().equals(taskId)).findFirst().orElse(null); if (taskTheory == null) { resourcesQuestion.set("myOptions", ""); @@ -582,7 +582,7 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService v.getOrgId().equals(resourcesQuestion.getResourcesQuestionId())) + StudentHandsOnTaskTheory taskTheory = theoryList.stream().filter(v -> ObjectUtil.equals(v.getResourcesQuestionId(), resourcesQuestion.getResourcesQuestionId()) || v.getOrgId().equals(resourcesQuestion.getResourcesQuestionId())) .filter(v -> v.getStudentId().equals(student.getStudentId())).filter(v -> v.getHandsOnTaskId().equals(taskId)).findFirst().orElse(null); if (taskTheory == null) { resourcesQuestion.set("myOptions", ""); @@ -666,7 +666,7 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService v.getOrgId().equals(resourcesQuestion.getResourcesQuestionId())) + StudentHandsOnTaskTheory taskTheory = theoryList.stream().filter(v -> ObjectUtil.equals(v.getResourcesQuestionId(),resourcesQuestion.getResourcesQuestionId()) || v.getOrgId().equals(resourcesQuestion.getResourcesQuestionId())) .filter(v -> v.getStudentId().equals(student.getStudentId())).filter(v -> v.getHandsOnTaskId().equals(taskId)).findFirst().orElse(null); if (taskTheory == null) { resourcesQuestion.set("myOptions", ""); @@ -711,7 +711,7 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService v.getOrgId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())) + StudentHandsOnTaskTheory taskTheory = theoryList.stream().filter(v -> ObjectUtil.equals(v.getOrgId(),resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId()) || v.getOrgId().equals(resourcesQuestion.getTeacherOpenCourseMergeResourcesQuestionId())) .filter(v -> v.getStudentId().equals(student.getStudentId())).filter(v -> v.getHandsOnTaskId().equals(taskId)).findFirst().orElse(null); if (taskTheory == null) { resourcesQuestion.set("myOptions", ""); @@ -781,7 +781,7 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService editDo(List teacherOpenCourseMergeResourcesQuestionQueries, CoreUser coreUser, int i) { @@ -887,7 +887,9 @@ public class StudentHandsOnTaskTheoryService extends CoreBaseService handsOns = ObjectUtil.isEmpty(handsOnSimulationTasks.getHandsOnId()) ? new ArrayList<>() : handsOnDao.getByIds(handsOnSimulationTasks.getHandsOnId().toString()); StudentHandsOnTaskTheory taskTheory = new StudentHandsOnTaskTheory(); + taskTheory.setResourcesQuestionId(resourcesQuestion.getResourcesQuestionId()); taskTheory.setCourseType(courseType); taskTheory.setTeacherOpenCourseId(CollectionUtils.isEmpty(handsOns) ? null : handsOns.get(0).getCourseInfoId()); taskTheory.setHandsOnId(handsOnSimulationTasks.getHandsOnId()); diff --git a/web/src/main/java/com/ibeetl/jlw/web/query/StudentHandsOnTaskTheoryQuery.java b/web/src/main/java/com/ibeetl/jlw/web/query/StudentHandsOnTaskTheoryQuery.java index 20cdedc0..e2c2707d 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/query/StudentHandsOnTaskTheoryQuery.java +++ b/web/src/main/java/com/ibeetl/jlw/web/query/StudentHandsOnTaskTheoryQuery.java @@ -91,6 +91,11 @@ public class StudentHandsOnTaskTheoryQuery extends PageParam { */ private Integer isCourseCentre; + /** + * 资源id + */ + private Long resourcesQuestionId; + public Long getStudentHandsOnTaskTheoryId(){ return studentHandsOnTaskTheoryId; } @@ -201,6 +206,7 @@ public class StudentHandsOnTaskTheoryQuery extends PageParam { pojo.setStudentId(this.getStudentId()); pojo.setCourseType(this.getCourseType()); pojo.setIsCourseCentre(this.getIsCourseCentre()); + pojo.setResourcesQuestionId(this.getResourcesQuestionId()); return pojo; } @@ -280,4 +286,12 @@ public class StudentHandsOnTaskTheoryQuery extends PageParam { public void setIsCourseCentre(Integer isCourseCentre) { this.isCourseCentre = isCourseCentre; } + + public Long getResourcesQuestionId() { + return resourcesQuestionId; + } + + public void setResourcesQuestionId(Long resourcesQuestionId) { + this.resourcesQuestionId = resourcesQuestionId; + } }