Browse Source

通知、课堂

tags/正式3.14.0
王宁 7 months ago
parent
commit
9d977dbceb

+ 16
- 0
README.md View File

44
 | 16   | 完形填空(复合)、阅读理解(复合)             | 16       | 正常 |
44
 | 16   | 完形填空(复合)、阅读理解(复合)             | 16       | 正常 |
45
 | 17   | 任务型阅读(复合)                     | 17       | 正常 |
45
 | 17   | 任务型阅读(复合)                     | 17       | 正常 |
46
 
46
 
47
+#### 课堂保存类型
48
+
49
+| 序号 | 类型rtype              | 备注 |
50
+| ---- |----------------------|--|
51
+| 1    | startclass                  | 课堂--开始 |
52
+| 2    | stopclass                 | 课堂--结束 |
53
+| 3    | savefile     | 课堂--保存图片 |
54
+| 4    | askteacher             | 互动--发起 |
55
+| 5    | askstudent              | 互动--保存学生作答 |
56
+| 6    | sign             | 学生--签到 |
57
+| 7    | paperteacher            | 堂测--发布 | 
58
+| 8    | paperstudent            | 堂测--学生作答详情 |
59
+| 9    | voteteacher            | 投票-发布 |
60
+| 10   | votestudent | 投票--学生投票 | 
61
+| 11   | profileteacher      | 资料-发布 |
62
+| 12   | profilestudent   | 资料-学生查看 | 

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/controller/notice/NoticeController.java View File

129
     }
129
     }
130
 
130
 
131
     /**
131
     /**
132
-     *功能描述 电子书学生--网页--列表
132
+     *功能描述 学生--网页--列表
133
      * @author WN
133
      * @author WN
134
      * @date 2022/2/22
134
      * @date 2022/2/22
135
      * @param  * @param notice
135
      * @param  * @param notice

+ 3
- 0
sapi/src/main/java/com/xhkjedu/sapi/mapper/notice/NoticeMapper.java View File

79
     int deleteNotice(@Param("noticeid")Integer noticeid);
79
     int deleteNotice(@Param("noticeid")Integer noticeid);
80
 
80
 
81
     Integer getNoticeid(@Param("noticeid")Integer noticeid);
81
     Integer getNoticeid(@Param("noticeid")Integer noticeid);
82
+
83
+    //获取用户所属科目
84
+    String getUserSubjectByUserid(@Param("userid")Integer userid);
82
 }
85
 }

+ 3
- 0
sapi/src/main/java/com/xhkjedu/sapi/model/notice/TNotice.java View File

39
     //通知内容纯文本
39
     //通知内容纯文本
40
     private String noticetxt;
40
     private String noticetxt;
41
 
41
 
42
+    //科目id
43
+    private String subjectid;
44
+
42
     @Transient
45
     @Transient
43
     //班级id集合
46
     //班级id集合
44
     private List<ClassVo> classes;
47
     private List<ClassVo> classes;

+ 14
- 4
sapi/src/main/java/com/xhkjedu/sapi/service/notice/NoticeService.java View File

2
 
2
 
3
 import com.xhkjedu.sapi.listener.MessageSender;
3
 import com.xhkjedu.sapi.listener.MessageSender;
4
 import com.xhkjedu.sapi.mapper.notice.NoticeClassMapper;
4
 import com.xhkjedu.sapi.mapper.notice.NoticeClassMapper;
5
+import com.xhkjedu.sapi.mapper.notice.NoticeFileMapper;
5
 import com.xhkjedu.sapi.mapper.notice.NoticeMapper;
6
 import com.xhkjedu.sapi.mapper.notice.NoticeMapper;
6
 import com.xhkjedu.sapi.mapper.notice.NoticeUserMapper;
7
 import com.xhkjedu.sapi.mapper.notice.NoticeUserMapper;
8
+import com.xhkjedu.sapi.model.notice.TNotice;
7
 import com.xhkjedu.sapi.model.notice.TNoticeClass;
9
 import com.xhkjedu.sapi.model.notice.TNoticeClass;
8
-import com.xhkjedu.sapi.model.notice.TNoticeUser;
9
-import com.xhkjedu.sapi.mapper.notice.*;
10
 import com.xhkjedu.sapi.model.notice.TNoticeFile;
10
 import com.xhkjedu.sapi.model.notice.TNoticeFile;
11
-import com.xhkjedu.sapi.model.notice.TNotice;
11
+import com.xhkjedu.sapi.model.notice.TNoticeUser;
12
 import com.xhkjedu.sapi.vo.notice.NoticeClassVo;
12
 import com.xhkjedu.sapi.vo.notice.NoticeClassVo;
13
-import com.xhkjedu.utils.N_Utils;
14
 import com.xhkjedu.sapi.vo.notice.NoticeVo;
13
 import com.xhkjedu.sapi.vo.notice.NoticeVo;
14
+import com.xhkjedu.utils.N_Utils;
15
 import org.springframework.stereotype.Service;
15
 import org.springframework.stereotype.Service;
16
 import org.springframework.transaction.annotation.Transactional;
16
 import org.springframework.transaction.annotation.Transactional;
17
 
17
 
44
         if (N_Utils.isEmptyInteger(model.getCreatetime())) {
44
         if (N_Utils.isEmptyInteger(model.getCreatetime())) {
45
             model.setCreatetime(N_Utils.getSecondTimestamp());
45
             model.setCreatetime(N_Utils.getSecondTimestamp());
46
         }
46
         }
47
+
48
+        //根据noticetype发布对象为学生时,获取教师科目
49
+        if(model.getNoticetype() == 3){
50
+            //获取教师任教科目
51
+            String subjectid = noticeMapper.getUserSubjectByUserid(model.getCreateid());
52
+            if(N_Utils.isNotEmpty(subjectid)){
53
+                model.setSubjectid(subjectid);
54
+            }
55
+        }
56
+
47
         noticeMapper.insertUseGeneratedKeys(model);
57
         noticeMapper.insertUseGeneratedKeys(model);
48
         model.setNoticeid(model.getId());
58
         model.setNoticeid(model.getId());
49
         //添加通知对象
59
         //添加通知对象

+ 2
- 0
sapi/src/main/java/com/xhkjedu/sapi/vo/notice/NoticeVo.java View File

27
 
27
 
28
     //通知对象1班级2老师3学校师生4学校教师5学校学生
28
     //通知对象1班级2老师3学校师生4学校教师5学校学生
29
     private Integer noticetype;
29
     private Integer noticetype;
30
+
31
+    private String subjectname;//科目
30
 }
32
 }

+ 16
- 3
sapi/src/main/resources/mapper/notice/NoticeMapper.xml View File

61
     </select>
61
     </select>
62
     <!-- 用户通知列表 -->
62
     <!-- 用户通知列表 -->
63
     <select id="listMy" resultType="com.xhkjedu.sapi.vo.notice.NoticeVo">
63
     <select id="listMy" resultType="com.xhkjedu.sapi.vo.notice.NoticeVo">
64
-        select n.noticeid,n.noticetitle,n.noticetxt,n.createtime,u.username createname,IFNULL(nt.readed,0) as readed
64
+        select n.noticeid,n.noticetitle,n.noticetxt,n.createtime,n.subjectname,u.username createname,IFNULL(nt.readed,0) as readed
65
         from t_notice n left join t_user u on n.createid=u.userid
65
         from t_notice n left join t_user u on n.createid=u.userid
66
         left join t_notice_user nt on n.noticeid = nt.noticeid
66
         left join t_notice_user nt on n.noticeid = nt.noticeid
67
+        left join t_subject s on n.subjectid=s.subjectid
67
         where nt.userid=#{notice.createid}
68
         where nt.userid=#{notice.createid}
68
         <if test="notice.readed!=null"> and nt.readed=#{notice.readed}</if>
69
         <if test="notice.readed!=null"> and nt.readed=#{notice.readed}</if>
69
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
70
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
76
         <if test="notice.stoptime!=null and notice.stoptime!=0">
77
         <if test="notice.stoptime!=null and notice.stoptime!=0">
77
             and n.createtime &lt;=#{notice.stoptime}
78
             and n.createtime &lt;=#{notice.stoptime}
78
         </if>
79
         </if>
80
+        <if test="notice.subjectid!=null and notice.subjectid!='' and notice.subjectid!='0'.toString()">
81
+            and n.subjectid=#{notice.subjectid}
82
+        </if>
79
 
83
 
80
         group by n.noticeid order by nt.readed,n.createtime desc
84
         group by n.noticeid order by nt.readed,n.createtime desc
81
         <if test="notice.page==null">
85
         <if test="notice.page==null">
88
     </select>
92
     </select>
89
     <!--学生通知列表-->
93
     <!--学生通知列表-->
90
     <select id="listStudent" resultType="com.xhkjedu.sapi.vo.notice.NoticeVo">
94
     <select id="listStudent" resultType="com.xhkjedu.sapi.vo.notice.NoticeVo">
91
-        select n.noticeid,n.noticetitle,n.noticetxt,n.createtime,u.username createname
95
+        select n.noticeid,n.noticetitle,n.noticetxt,n.createtime,n.subjectid,u.username createname
92
         from t_notice n left join t_user u on n.createid=u.userid
96
         from t_notice n left join t_user u on n.createid=u.userid
93
         left join t_notice_class nc on n.noticeid = nc.noticeid
97
         left join t_notice_class nc on n.noticeid = nc.noticeid
94
         left join t_class_student cs on nc.classid=cs.classid
98
         left join t_class_student cs on nc.classid=cs.classid
102
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
106
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
103
     <!--学生通知列表-->
107
     <!--学生通知列表-->
104
     <select id="listNoticeForStuWeb" resultType="com.xhkjedu.sapi.vo.notice.NoticeVo">
108
     <select id="listNoticeForStuWeb" resultType="com.xhkjedu.sapi.vo.notice.NoticeVo">
105
-        select n.noticeid,n.noticetitle,n.noticecontent,n.noticetxt,n.createtime,u.username createname
109
+        select n.noticeid,n.noticetitle,n.noticecontent,n.noticetxt,s.subjectname,n.createtime,u.username createname
106
         from t_notice n left join t_user u on n.createid=u.userid
110
         from t_notice n left join t_user u on n.createid=u.userid
107
         left join t_notice_class nc on n.noticeid = nc.noticeid
111
         left join t_notice_class nc on n.noticeid = nc.noticeid
108
         left join t_class_student cs on nc.classid=cs.classid
112
         left join t_class_student cs on nc.classid=cs.classid
113
+        left join t_subject s on n.subjectid=s.subjectid
109
         where ((cs.studentid=#{notice.createid} and n.noticetype=1) or (n.noticetype=3 and nc.classid=#{notice.createid}))
114
         where ((cs.studentid=#{notice.createid} and n.noticetype=1) or (n.noticetype=3 and nc.classid=#{notice.createid}))
110
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
115
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
111
             and (n.noticetitle like concat('%', #{notice.noticetitle}, '%')
116
             and (n.noticetitle like concat('%', #{notice.noticetitle}, '%')
117
         <if test="notice.stoptime!=null and notice.stoptime!=0">
122
         <if test="notice.stoptime!=null and notice.stoptime!=0">
118
             and n.createtime&lt;=#{notice.stoptime}
123
             and n.createtime&lt;=#{notice.stoptime}
119
         </if>
124
         </if>
125
+        <if test="notice.subjectid!=null and notice.subjectid!='' and notice.subjectid!='0'.toString()">
126
+            and n.subjectid=#{notice.subjectid}
127
+        </if>
120
         group by n.noticeid order by n.createtime desc
128
         group by n.noticeid order by n.createtime desc
121
     </select>
129
     </select>
122
     <!--根据班级删除通知-->
130
     <!--根据班级删除通知-->
132
     <select id="getNoticeid" resultType="java.lang.Integer">
140
     <select id="getNoticeid" resultType="java.lang.Integer">
133
         select noticeid from t_notice where noticeid=#{noticeid}
141
         select noticeid from t_notice where noticeid=#{noticeid}
134
     </select>
142
     </select>
143
+
144
+    <!--根据用户ID获取用户所属科目-->
145
+    <select id="getUserSubjectByUserid" resultType="java.lang.String">
146
+        select subjectid from t_teacher_powersb where teacherid=#{userid} group by subjectid limit 1
147
+    </select>
135
 </mapper>
148
 </mapper>

+ 1
- 0
sclass/src/main/java/com/xhkjedu/sclass/model/classroom/TClassroomPaperScantron.java View File

45
 
45
 
46
     //选项数量
46
     //选项数量
47
     private Integer optionnum;
47
     private Integer optionnum;
48
+
48
 }
49
 }

+ 2
- 2
sclass/src/main/resources/mapper/classroom/ClassroomMapper.xml View File

180
         ,g.gradeid,g.classname,(select count(*) from t_classroom_sign s where s.userid=#{room.studentid}
180
         ,g.gradeid,g.classname,(select count(*) from t_classroom_sign s where s.userid=#{room.studentid}
181
         and s.roomid=r.roomid) signstate
181
         and s.roomid=r.roomid) signstate
182
         ,(select count(*) from t_classroom_video rv where rv.roomid=r.roomid)videonum
182
         ,(select count(*) from t_classroom_video rv where rv.roomid=r.roomid)videonum
183
-        ,(select count(*) from t_classroom_vote vt where vt.roomid=c.roomid)votenum
184
-        ,(select count(*) from t_classroom_profile p where p.roomid=c.roomid)profilenum
183
+        ,(select count(*) from t_classroom_vote vt where vt.roomid=r.roomid)votenum
184
+        ,(select count(*) from t_classroom_profile p where p.roomid=r.roomid)profilenum
185
         from t_classroom r left join t_user u on r.teacherid=u.userid
185
         from t_classroom r left join t_user u on r.teacherid=u.userid
186
         left join t_subject_book sb on r.lsbid=sb.lsbid
186
         left join t_subject_book sb on r.lsbid=sb.lsbid
187
         left join t_class_student cs on r.classid=cs.classid
187
         left join t_class_student cs on r.classid=cs.classid

Loading…
Cancel
Save