|
@@ -193,13 +193,14 @@ public class StudentReportPlanServiceImpl extends MPJBaseServiceImpl<StudentRepo
|
|
|
* @return 计划id
|
|
* @return 计划id
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public Long getEffectivePlanId(Long teacherId) {
|
|
|
|
|
|
|
+ public Long getEffectivePlanId(Long teacherId, Long classId) {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
List<StudentReportPlan> list = this.selectJoinList(StudentReportPlan.class,
|
|
List<StudentReportPlan> list = this.selectJoinList(StudentReportPlan.class,
|
|
|
new MPJLambdaWrapper<StudentReportPlan>()
|
|
new MPJLambdaWrapper<StudentReportPlan>()
|
|
|
.leftJoin(StudentReportPlanClassRelation.class, StudentReportPlanClassRelation::getStudentReportPlanId, StudentReportPlan::getId)
|
|
.leftJoin(StudentReportPlanClassRelation.class, StudentReportPlanClassRelation::getStudentReportPlanId, StudentReportPlan::getId)
|
|
|
.leftJoin(BaseClass.class, BaseClass::getId, StudentReportPlanClassRelation::getClassId)
|
|
.leftJoin(BaseClass.class, BaseClass::getId, StudentReportPlanClassRelation::getClassId)
|
|
|
.eq(teacherId != null, BaseClass::getTeacherId, teacherId)
|
|
.eq(teacherId != null, BaseClass::getTeacherId, teacherId)
|
|
|
|
|
+ .eq(classId != null, BaseClass::getId, classId)
|
|
|
.eq(StudentReportPlan::getEnabledMark, EnabledMark.ENABLED.getCode())
|
|
.eq(StudentReportPlan::getEnabledMark, EnabledMark.ENABLED.getCode())
|
|
|
.le(StudentReportPlan::getStartTime, now)
|
|
.le(StudentReportPlan::getStartTime, now)
|
|
|
.ge(StudentReportPlan::getEndTime, now)
|
|
.ge(StudentReportPlan::getEndTime, now)
|