瀏覽代碼

查询状态

chengpeng 5 年之前
父節點
當前提交
cc895f62fe

+ 4 - 0
mec-education/src/main/java/com/ym/mec/education/req/HomeWorkReq.java

@@ -18,4 +18,8 @@ public class HomeWorkReq extends BaseQuery {
     private String musicGroupId;
 
     private Long courseScheduleId;
+
+    private String workDate;
+
+    private String status;
 }

+ 6 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java

@@ -260,7 +260,12 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
         PageResponse response = new PageResponse();
 
         IPage<StudentAttendance> page = new Page<>(req.getPageNo(),req.getPageSize());
-        IPage<StudentAttendance> studentAttendanceIPage = this.page(page,new QueryWrapper<StudentAttendance>().eq("course_schedule_id_",req.getCourseScheduleId()));
+        QueryWrapper<StudentAttendance> queryWrapper = new QueryWrapper<StudentAttendance>();
+        queryWrapper.eq("course_schedule_id_",req.getCourseScheduleId());
+        if(req.getStatus() != null){
+            queryWrapper.eq("status_",req.getStatus());
+        }
+        IPage<StudentAttendance> studentAttendanceIPage = this.page(page,queryWrapper);
 
         List<CallStudentResp> callStudentResps = new ArrayList<>();
         List<StudentAttendance> studentAttendanceList = studentAttendanceIPage.getRecords();

+ 6 - 0
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -16,6 +16,7 @@ import com.ym.mec.education.resp.HomeWrokDetailResp;
 import com.ym.mec.education.resp.HomeWrokResp;
 import com.ym.mec.education.resp.HomeworkReplyResp;
 import com.ym.mec.education.service.*;
+import com.ym.mec.education.utils.DateUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -162,6 +163,11 @@ public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseH
         PageResponse response = new PageResponse();
         IPage ipage = new Page(req.getPageNo() == null ? 1: req.getPageNo(),req.getPageSize() == null ? 10:req.getPageSize());
         QueryWrapper<CourseHomework> queryWrapper = new QueryWrapper<>();
+        if(req != null && req.getWorkDate() != null){
+            String strDateStr = req.getWorkDate() + " 00:00:00";
+            String endDateStr = req.getWorkDate() + " 23:59:59";
+            queryWrapper.between("create_time_",strDateStr,endDateStr);
+        }
         IPage<CourseHomework> courseScheduleIPage = courseHomeworkService.page(ipage,queryWrapper);
 
         List<CourseHomework> courseSchedules = courseScheduleIPage.getRecords();