Explorar o código

Merge branch 'feature/0427-school' into master_saas

liujc %!s(int64=2) %!d(string=hai) anos
pai
achega
fde78cf94f

+ 150 - 125
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,153 @@
+POST http://127.0.0.1:8005/studentManage/userPage
+Authorization: bearer b897da27-5a37-47df-8e76-54d80a61a55d
+Content-Type: application/json
+coopId: 25
+Content-Length: 137
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "一",
+//    "musicGroupId": 23050516201200001,
+  //  "subjectId": 2,
+  //  "vipFlag": true,
+//  "studentId": 2248340
+
+}
+
+<> 2023-06-02T201036.200.json
+
+###
+
+POST http://127.0.0.1:8005/studentManage/userDetail
+Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
+Content-Type: application/json
+coopId: 25
+Content-Length: 63
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "studentId": 2248340,
+  "musicGroupId": 23042419330600001
+}
+
+<> 2023-06-02T201028.200.json
+
+###
+
+POST http://127.0.0.1:8005/studentManage/userPage
+Authorization: bearer b897da27-5a37-47df-8e76-54d80a61a55d
+Content-Type: application/json
+coopId: 25
+Content-Length: 137
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "一",
+//    "musicGroupId": 23050516201200001,
+  //  "subjectId": 2,
+  //  "vipFlag": true,
+//  "studentId": 2248340
+
+}
+
+<> 2023-06-02T195056.200.json
+
+###
+
+POST http://127.0.0.1:8005/studentManage/userPage
+Authorization: bearer b897da27-5a37-47df-8e76-54d80a61a55d
+Content-Type: application/json
+coopId: 14
+Content-Length: 137
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "一",
+//    "musicGroupId": 23050516201200001,
+  //  "subjectId": 2,
+  //  "vipFlag": true,
+//  "studentId": 2248340
+
+}
+
+<> 2023-06-02T194927.200.json
+
+###
+
+POST http://127.0.0.1:8005/studentManage/userPage
+Authorization: bearer b897da27-5a37-47df-8e76-54d80a61a55d
+Content-Type: application/json
+coopId: 14
+Content-Length: 137
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "一",
+//    "musicGroupId": 23050516201200001,
+  //  "subjectId": 2,
+  //  "vipFlag": true,
+//  "studentId": 2248340
+
+}
+
+<> 2023-06-02T194743.200.json
+
+###
+
+POST http://127.0.0.1:8005/studentManage/userPage
+Authorization: bearer b897da27-5a37-47df-8e76-54d80a61a55d
+Content-Type: application/json
+coopId: 14
+Content-Length: 137
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "一",
+//    "musicGroupId": 23050516201200001,
+  //  "subjectId": 2,
+  //  "vipFlag": true,
+//  "studentId": 2248340
+
+}
+
+<> 2023-06-02T194634.200.json
+
+###
+
+POST http://127.0.0.1:8005/studentManage/userPage
+Authorization: bearer 3f804d4e-b7f0-41ad-8dbf-119a0c54becc
+Content-Type: application/json
+coopId: 14
+Content-Length: 137
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+//  "keyword": "一",
+//    "musicGroupId": 23050516201200001,
+  //  "subjectId": 2,
+  //  "vipFlag": true,
+//  "studentId": 2248340
+
+}
+
+<> 2023-06-02T194506.200.json
+
+###
+
 GET http://127.0.0.1:8005/schoolActivity/detail/16
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
@@ -693,128 +843,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-POST http://127.0.0.1:8005/imGroup/updateImGroup
-Authorization: bearer 0360886c-f5e4-40c4-ad35-d63a1f5995c6
-Content-Type: application/json
-Content-Length: 54
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-	"name": "考虑图",
-	"id": "1660958104046542850"
-}
-
-<> 2023-06-01T144835.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer e19ed0c6-c024-4378-bf4e-789e0379eab6
-Content-Type: application/json
-Content-Length: 152
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23053118101300001",
-  "lockFlag": false
-}
-
-<> 2023-06-01T095232.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer e19ed0c6-c024-4378-bf4e-789e0379eab6
-Content-Type: application/json
-Content-Length: 152
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23053118101300001",
-  "lockFlag": false
-}
-
-<> 2023-06-01T095217.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 07bef4ad-6d9e-46e0-8fd3-c24a2fd11332
-Content-Type: application/json
-Content-Length: 152
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23053118101300001",
-  "lockFlag": false
-}
-
-<> 2023-06-01T095044.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 07bef4ad-6d9e-46e0-8fd3-c24a2fd11332
-Content-Type: application/json
-Content-Length: 152
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23053118101300001",
-  "lockFlag": false
-}
-
-<> 2023-06-01T095011.200.json
-
-###
-
-POST http://127.0.0.1:8005/schoolStaff/updateAccount
-Authorization: bearer 6882e681-2f9a-4f8f-aee1-79b1e42de850
-Content-Type: application/json
-Content-Length: 71
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"coopId":19,"phone":"19900990111","staffId":1839,"userType":"TEACHER"}
-
-<> 2023-05-30T145725.200.json
-
-###
-
-POST http://127.0.0.1:8005/schoolStaff/updateAccount
-Authorization: bearer 6882e681-2f9a-4f8f-aee1-79b1e42de850
-Content-Type: application/json
-Content-Length: 71
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{"coopId":16,"phone":"19900990111","staffId":1820,"userType":"TEACHER"}
-
-<> 2023-05-30T145417.200.json
-
-###
-

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java

@@ -1388,6 +1388,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
         studentAttendanceQuery.setEndTime(DateUtil.toDateTime(endTerm + " 23:59:59"));
         studentAttendanceQuery.setMusicGroupId(queryInfo.getMusicGroupId());
         studentAttendanceQuery.setMusicGroupIds(musicGroupIds);
+
         studentAttendanceData(studentLists, studentAttendanceQuery);
 
         // 查询作业
@@ -1580,6 +1581,10 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
                     // 请假数
                     Integer leave = 0;
                     for (StudentAttendance studentAttendance1 : studentAttendances) {
+                        if (studentAttendance1.getStatus() == null) {
+                            truant++;
+                            continue;
+                        }
                         switch (studentAttendance1.getStatus()) {
                             case NORMAL:
                                 narmal++;

+ 10 - 7
mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml

@@ -699,26 +699,29 @@
     </select>
 
     <select id="getStudentAttendance" resultMap="StudentAttendance">
-        select  *
-        from student_attendance
+        select  cssp.user_id_ as user_id_,sa.status_,sa.id_
+        from course_schedule cs
+        left join course_schedule_student_payment cssp on cs.id_ = cssp.course_schedule_id_
+        left join  student_attendance sa on sa.course_schedule_id_ = cs.id_ and sa.user_id_ = cssp.user_id_
         <where>
+            and cs.status_ = 'OVER'
             <if test="param.musicGroupId != null">
-                and music_group_id_ = #{param.musicGroupId}
+                and cs.music_group_id_ = #{param.musicGroupId}
             </if>
             <if test="param.studentIds != null and param.studentIds.size() != 0">
-                and user_id_ in
+                and cssp.user_id_ in
                 <foreach collection="param.studentIds" item="studentId" separator="," open="(" close=")">
                     #{studentId}
                 </foreach>
             </if>
             <if test="param.startTime != null">
-                and create_time_ &gt;= #{param.startTime}
+                and cs.class_date_ &gt;= #{param.startTime}
             </if>
             <if test="param.endTime != null">
-                and create_time_ &lt;= #{param.endTime}
+                and cs.class_date_ &lt;= #{param.endTime}
             </if>
             <if test="param.musicGroupIds != null and param.musicGroupIds.size() != 0">
-                and music_group_id_ in
+                and cs.music_group_id_ in
                 <foreach collection="param.musicGroupIds" close=")" open="(" separator="," item="item">
                     #{item}
                 </foreach>