瀏覽代碼

完成才返回提交时间

liujc 2 年之前
父節點
當前提交
74bd5d2906

+ 30 - 30
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,33 @@
+GET http://127.0.0.1:9002/extracurricularExercises/queryTeacherServeHomeworkDetail/v2?startTime=2023-06-10&endTime=2023-06-16&type=HOMEWORK&classType=&homeWorkStatus=&page=1&rows=20&musicGroupId=
+Authorization: bearer 72033b9d-e8b7-461f-8dd9-ba35312a351d
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-16T142153.200.json
+
+###
+
+GET http://127.0.0.1:9002/extracurricularExercises/queryTeacherServeHomeworkDetail/v2?startTime=2023-06-10&endTime=2023-06-16&type=HOMEWORK&classType=&homeWorkStatus=&page=1&rows=20&musicGroupId=
+Authorization: bearer 72033b9d-e8b7-461f-8dd9-ba35312a351d
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-16T142126.200.json
+
+###
+
+GET http://127.0.0.1:9002/extracurricularExercises/queryTeacherServeHomeworkDetail/v2?startTime=2023-06-10&endTime=2023-06-16&type=HOMEWORK&classType=&homeWorkStatus=&page=1&rows=20&musicGroupId=
+Authorization: bearer 139a014d-1193-419b-82ff-823d0ad9b154
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-06-16T142059.200.json
+
+###
+
 GET http://127.0.0.1:9002/extracurricularExercises/queryTeacherServeHomeworkDetail/v2?startTime=2023-04-10&endTime=2023-06-16&type=HOMEWORK&classType=&homeWorkStatus=&page=1&rows=20&musicGroupId=
 Authorization: bearer 139a014d-1193-419b-82ff-823d0ad9b154
 Connection: Keep-Alive
@@ -839,33 +869,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-GET http://127.0.0.1:9001/studentVipGroup/joinLiveRoomByShare?courseScheduleId=2179
-Authorization: bearer 093517b0-c9a4-407b-b558-0d71bf157b16
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-06-12T095323.200.json
-
-###
-
-GET http://127.0.0.1:9001/studentVipGroup/joinLiveRoomByShare?courseScheduleId=2179
-Authorization: bearer 093517b0-c9a4-407b-b558-0d71bf157b16
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-06-12T095238.200.json
-
-###
-
-GET http://127.0.0.1:9001/studentVipGroup/joinLiveRoomByShare?courseScheduleId=2179
-Authorization: bearer 093517b0-c9a4-407b-b558-0d71bf157b16
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-06-12T095217.200.json
-
-###
-

+ 14 - 5
mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java

@@ -3,6 +3,7 @@ package com.ym.mec.web.controller;
 import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.ELessonTrainingType;
+import com.ym.mec.biz.dal.enums.StandardEnum;
 import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.CourseHomeworkService;
@@ -76,8 +77,8 @@ public class TeacherController extends BaseController {
     public HttpResponseResult<PageInfo<Teacher>> queryPage(TeacherQueryInfo queryInfo) {
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         if(queryInfo.getTenantId() == 28){
-        	queryInfo.setTenantId(1);
-        	queryInfo.setOrganId(null);
+            queryInfo.setTenantId(1);
+            queryInfo.setOrganId(null);
         }
         return succeed(teacherService.queryPageDetail(queryInfo));
     }
@@ -116,7 +117,7 @@ public class TeacherController extends BaseController {
         organId = organizationService.getEmployeeOrgan(organId);
         demissionFlag = false;
         if(isForzenWithQueryCondition == null){
-        	isForzenWithQueryCondition = false;
+            isForzenWithQueryCondition = false;
         }
         return succeed(teacherService.findTeachers(organId,demissionFlag,isForzenWithQueryCondition));
     }
@@ -236,14 +237,22 @@ public class TeacherController extends BaseController {
     @ApiOperation(value = "根据课程计划获取需要交作业的学生-公用")
     @PostMapping("/findCourseStudentsPublic/v2")
     public HttpResponseResult<List<StudentCourseHomework>> findCourseStudentsPublicV2(@Validated @RequestBody StudentLessonTrainingDetailWrapper.StudentLessonTrainingQuery query){
+        List<StudentCourseHomework>  result = new ArrayList<>();
         if(ELessonTrainingType.HOMEWORK.equals(query.getType())){
             if (Objects.isNull(query.getCourseScheduleId())) {
                 throw new BizException("请指定课程");
             }
-            return succeed(studentCourseHomeworkService.findStudentCourseHomeworkByCourseV2(query));
+            result = studentCourseHomeworkService.findStudentCourseHomeworkByCourseV2(query);
         }else{
-            return succeed(studentCourseHomeworkService.findExtraExerciseStudentsV2(query));
+            result = studentCourseHomeworkService.findExtraExerciseStudentsV2(query);
         }
+        // 完成才返回提交时间
+        for (StudentCourseHomework studentCourseHomework : result) {
+            if (!StandardEnum.STANDARD.equals(studentCourseHomework.getStandardFlag())) {
+                studentCourseHomework.setSubmitTime(null);
+            }
+        }
+        return succeed(result);
     }