Browse Source

ai背诵、作业、学生预习、课堂回顾模块,允许学校管理员查看所有教师发布的信息,允许查看、下载、删除、统计

导入文件过大提示
tags/正式3.13.0
雍文秀 1 year ago
parent
commit
93fc857035

+ 21
- 1
sclass/src/main/java/com/xhkjedu/sclass/controller/classroom/ClassroomController.java View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
4 4
 import com.github.pagehelper.PageHelper;
5 5
 import com.github.pagehelper.PageInfo;
6 6
 import com.xhkjedu.annotation.Action;
7
+import com.xhkjedu.sclass.mapper.system.UserMapper;
7 8
 import com.xhkjedu.sclass.model.classroom.*;
8 9
 import com.xhkjedu.sclass.model.paperstudent.TPaperStudent;
9 10
 import com.xhkjedu.sclass.model.paperstudent.TPaperStudentScantron;
@@ -18,6 +19,7 @@ import com.xhkjedu.utils.N_Utils;
18 19
 import com.xhkjedu.utils.PageUtil;
19 20
 import com.xhkjedu.vo.PageResult;
20 21
 import com.xhkjedu.vo.ResultVo;
22
+import com.xhkjedu.vo.system.UserVo;
21 23
 import lombok.extern.slf4j.Slf4j;
22 24
 import org.springframework.web.bind.annotation.PostMapping;
23 25
 import org.springframework.web.bind.annotation.RequestBody;
@@ -40,6 +42,8 @@ public class ClassroomController {
40 42
     private ClassroomService classroomService;
41 43
     @Resource
42 44
     private ClassroomPaperService classroomPaperService;
45
+    @Resource
46
+    private UserMapper userMapper;
43 47
 
44 48
     /**
45 49
      * 批量保存课堂数据
@@ -464,8 +468,9 @@ public class ClassroomController {
464 468
         Integer pageSize = room.getPageSize();
465 469
         N_Utils.validation(new Object[]{teacherid, "教师id", 1, page, "显示页码", 1, pageSize, "显示条数", 1});
466 470
         try {
471
+            UserVo userVo = userMapper.getUserInfoForHandleLog(teacherid);
467 472
             PageHelper.startPage(page, pageSize);
468
-            List<Map> list = classroomService.listClassByDirectorId(room);
473
+            List<Map> list = classroomService.listClassByDirectorId(room, userVo);
469 474
             PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
470 475
             return new ResultVo(0, "获取课堂回顾列表成功", pageResult);
471 476
         } catch (Exception e) {
@@ -474,6 +479,21 @@ public class ClassroomController {
474 479
         }
475 480
     }
476 481
 
482
+    /**
483
+     * @Description 删除
484
+     * @Date 2023/11/17 14:26
485
+     * @Author YWX
486
+     * @Param [room]
487
+     * @Return com.xhkjedu.vo.ResultVo
488
+     **/
489
+    @PostMapping("/delete")
490
+    public ResultVo delete(@RequestBody TClassroom room) {
491
+        Long roomid = room.getRoomid();
492
+        N_Utils.validation(new Object[]{roomid, "课堂id", 1});
493
+        classroomService.deleteById(roomid);
494
+        return new ResultVo(0, "删除成功");
495
+    }
496
+
477 497
     /**
478 498
      * 课堂回顾详情
479 499
      *

+ 12
- 5
sclass/src/main/java/com/xhkjedu/sclass/service/classroom/ClassroomService.java View File

@@ -2,7 +2,6 @@ package com.xhkjedu.sclass.service.classroom;
2 2
 
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.sclass.mapper.classroom.*;
5
-import com.xhkjedu.sclass.mapper.system.UserMapper;
6 5
 import com.xhkjedu.sclass.model.classroom.*;
7 6
 import com.xhkjedu.sclass.utils.ArithUtil;
8 7
 import com.xhkjedu.sclass.vo.classroom.*;
@@ -53,8 +52,6 @@ public class ClassroomService {
53 52
     private ClassroomFileMapper classroomFileMapper;
54 53
     @Resource
55 54
     private ClassroomVideoMapper classroomVideoMapper;
56
-    @Resource
57
-    private UserMapper userMapper;
58 55
 
59 56
     /**
60 57
      * 开始课堂
@@ -410,8 +407,7 @@ public class ClassroomService {
410 407
      * @Author ywx
411 408
      * @Date 2020/6/15 9:19
412 409
      **/
413
-    public List<Map> listClassByDirectorId(TClassroom room) {
414
-        UserVo userVo = userMapper.getUserInfoForHandleLog(room.getTeacherid());
410
+    public List<Map> listClassByDirectorId(TClassroom room, UserVo userVo) {
415 411
         List<Map> rooms = classroomMapper.listClassByDirectorId(room,userVo);
416 412
         classRoomForList(rooms,1);
417 413
         return rooms;
@@ -859,4 +855,15 @@ public class ClassroomService {
859 855
     public Integer getSchoolYearBySchoolid(Integer schoolid){
860 856
         return classroomMapper.getSchoolYearBySchoolid(schoolid);
861 857
     }
858
+
859
+    /**
860
+     * @Description 删除
861
+     * @Date 2023/11/17 14:25
862
+     * @Author YWX
863
+     * @Param [roomid]
864
+     * @Return void
865
+     **/
866
+    public void deleteById(Long roomid) {
867
+        classroomMapper.deleteByPrimaryKey(roomid);
868
+    }
862 869
 }

+ 2
- 0
scommons/src/main/java/com/xhkjedu/exception/ErrorAdivceController.java View File

@@ -45,6 +45,8 @@ public class ErrorAdivceController {
45 45
         String msg = ex.getMessage();
46 46
         if (N_Utils.isNotEmpty(msg) && msg.indexOf("JSON parse error") != -1){
47 47
             return new ResultVo(1,"json格式不对");
48
+        } else if (N_Utils.isNotEmpty(msg) && msg.indexOf("Maximum upload size exceeded") != -1) {
49
+            return new ResultVo(1, "文件过大");
48 50
         }
49 51
         return new ResultVo(1, "程序处理异常");
50 52
     }

+ 13
- 6
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
4 4
 import com.github.pagehelper.PageHelper;
5 5
 import com.github.pagehelper.PageInfo;
6 6
 import com.xhkjedu.annotation.Action;
7
+import com.xhkjedu.sstudy.mapper.system.UserMapper;
7 8
 import com.xhkjedu.sstudy.model.paper.*;
8 9
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
9 10
 import com.xhkjedu.sstudy.service.gradeclass.ClassService;
@@ -16,6 +17,7 @@ import com.xhkjedu.utils.N_Utils;
16 17
 import com.xhkjedu.utils.PageUtil;
17 18
 import com.xhkjedu.vo.PageResult;
18 19
 import com.xhkjedu.vo.ResultVo;
20
+import com.xhkjedu.vo.system.UserVo;
19 21
 import org.springframework.web.bind.annotation.*;
20 22
 
21 23
 import javax.annotation.Resource;
@@ -39,6 +41,8 @@ public class PaperController {
39 41
     private ClassService classService;
40 42
     @Resource
41 43
     private SchoolService schoolService;
44
+    @Resource
45
+    private UserMapper userMapper;
42 46
 
43 47
     /**
44 48
      * 功能描述  答题卡作业--保存
@@ -214,13 +218,16 @@ public class PaperController {
214 218
         Integer page = paper.getPage();
215 219
         Integer pageSize = paper.getPageSize();
216 220
         N_Utils.validation(new Object[]{lsbid,"教材关联关系id",2,createid,"教师id",1,page,"显示页码",1,pageSize,"显示条数",1});
217
-        //获取当前教师权限班级
218
-        Map classMap = classService.getQxClassidsByTeacherid(createid, null);
219
-        String bxclassids = classMap.get("bxclassids").toString();//本校权限班级
220
-        paper.setBxclassids(bxclassids);
221
-        paper.setClassids(classMap.get("classids").toString());
221
+        UserVo userVo = userMapper.getUserInfoForHandleLog(createid);
222
+        if (userVo != null && !userVo.getUsertype().equals(0)) {
223
+            //获取当前教师权限班级
224
+            Map classMap = classService.getQxClassidsByTeacherid(createid, null);
225
+            String bxclassids = classMap.get("bxclassids").toString();//本校权限班级
226
+            paper.setBxclassids(bxclassids);
227
+            paper.setClassids(classMap.get("classids").toString());
228
+        }
222 229
         PageHelper.startPage(page,pageSize);
223
-        List<PaperListVo> list = paperService.findAll(paper);
230
+        List<PaperListVo> list = paperService.findAll(paper, userVo);
224 231
         PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
225 232
         return new ResultVo(0,"获取作业列表成功",pageResult);
226 233
     }

+ 8
- 3
sstudy/src/main/java/com/xhkjedu/sstudy/controller/recite/ReciteController.java View File

@@ -3,6 +3,7 @@ package com.xhkjedu.sstudy.controller.recite;
3 3
 import com.github.pagehelper.PageHelper;
4 4
 import com.github.pagehelper.PageInfo;
5 5
 import com.xhkjedu.annotation.Action;
6
+import com.xhkjedu.sstudy.mapper.system.UserMapper;
6 7
 import com.xhkjedu.sstudy.model.recite.TRecite;
7 8
 import com.xhkjedu.sstudy.service.gradeclass.ClassService;
8 9
 import com.xhkjedu.sstudy.service.recite.ReciteService;
@@ -33,6 +34,8 @@ public class ReciteController {
33 34
     private ReciteService reciteService;
34 35
     @Resource
35 36
     private ClassService classService;
37
+    @Resource
38
+    private UserMapper userMapper;
36 39
 
37 40
     /**
38 41
      *功能描述  发布背诵
@@ -112,15 +115,17 @@ public class ReciteController {
112 115
      */
113 116
     @PostMapping("list")
114 117
     public ResultVo list(@RequestBody TRecite recite) {
118
+        Integer createid = recite.getCreateid();
115 119
         N_Utils.validation(new Object[]{
116 120
                 recite.getPage(), "显示页码", 1, recite.getPageSize(), "显示条数", 1,
117
-                recite.getCreateid(), "创建人", 1,recite.getSchoolid(),"学校id",1});
118
-        Map classmap = classService.getQxClassidsByTeacherid(recite.getCreateid(), null);
121
+                createid, "创建人", 1,recite.getSchoolid(),"学校id",1});
122
+        Map classmap = classService.getQxClassidsByTeacherid(createid, null);
119 123
         recite.setClassids(classmap.get("classids").toString());
120 124
         recite.setBxclassids(classmap.get("bxclassids").toString());
125
+        Integer usertype = userMapper.getUsertypeByUserid(createid);
121 126
         PageHelper.startPage(recite.getPage(), recite.getPageSize());
122 127
         recite.setNowtime(N_Utils.getSecondTimestamp());
123
-        List<Map> list = reciteService.listRecites(recite);
128
+        List<Map> list = reciteService.listRecites(recite, usertype);
124 129
         PageResult pageResult = PageUtil.getPageResult(new PageInfo(list));
125 130
         return new ResultVo(0, "获取列表成功", pageResult);
126 131
     }

+ 13
- 6
sstudy/src/main/java/com/xhkjedu/sstudy/controller/resource/GuideController.java View File

@@ -3,6 +3,7 @@ package com.xhkjedu.sstudy.controller.resource;
3 3
 import com.github.pagehelper.PageHelper;
4 4
 import com.github.pagehelper.PageInfo;
5 5
 import com.xhkjedu.annotation.Action;
6
+import com.xhkjedu.sstudy.mapper.system.UserMapper;
6 7
 import com.xhkjedu.sstudy.model.resource.TGuide;
7 8
 import com.xhkjedu.sstudy.service.gradeclass.ClassService;
8 9
 import com.xhkjedu.sstudy.service.resource.GuideService;
@@ -13,6 +14,7 @@ import com.xhkjedu.utils.N_Utils;
13 14
 import com.xhkjedu.utils.PageUtil;
14 15
 import com.xhkjedu.vo.PageResult;
15 16
 import com.xhkjedu.vo.ResultVo;
17
+import com.xhkjedu.vo.system.UserVo;
16 18
 import lombok.extern.slf4j.Slf4j;
17 19
 import org.springframework.util.CollectionUtils;
18 20
 import org.springframework.web.bind.annotation.PostMapping;
@@ -38,6 +40,8 @@ public class GuideController {
38 40
     private GuideService guideService;
39 41
     @Resource
40 42
     private ClassService classService;
43
+    @Resource
44
+    private UserMapper userMapper;
41 45
 
42 46
     //教师网页端预习列表
43 47
     @PostMapping("/teaweb")
@@ -48,14 +52,17 @@ public class GuideController {
48 52
         String subjectid = guide.getSubjectid();
49 53
         N_Utils.validation(new Object[]{page,"显示页码",1,pageSize,"显示条数",1,createid,"教师id",1
50 54
                 ,subjectid,"科目",2});
51
-        Map<String, String> map = classService.getQxClassidsByTeacherid(createid, null);
52
-        guide.setClassids(map.get("classids"));
53
-        guide.setBxclassids(map.get("bxclassids"));
54
-        if (N_Utils.isEmpty(guide.getSchoolid())) {
55
-            guide.setSchoolid(N_Utils.str2Int(map.get("userschoolid")));
55
+        UserVo userVo = userMapper.getUserInfoForHandleLog(createid);
56
+        if (userVo != null && !userVo.getUsertype().equals(0)) {
57
+            Map<String, String> map = classService.getQxClassidsByTeacherid(createid, null);
58
+            guide.setClassids(map.get("classids"));
59
+            guide.setBxclassids(map.get("bxclassids"));
60
+            if (N_Utils.isEmpty(guide.getSchoolid())) {
61
+                guide.setSchoolid(N_Utils.str2Int(map.get("userschoolid")));
62
+            }
56 63
         }
57 64
         PageHelper.startPage(page, pageSize);
58
-        List<GuideVo> list = guideService.listGuidesForTeacherWeb(guide);
65
+        List<GuideVo> list = guideService.listGuidesForTeacherWeb(guide, userVo);
59 66
         PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
60 67
         return new ResultVo(0,"获取教师预习列表成功",pageResult);
61 68
     }

+ 3
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperMapper.java View File

@@ -7,6 +7,7 @@ import com.xhkjedu.sstudy.vo.paper.*;
7 7
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupParam;
8 8
 import com.xhkjedu.sstudy.vo.paperstudent.PaperSearchVo;
9 9
 import com.xhkjedu.sstudy.vo.question.QuestionVo;
10
+import com.xhkjedu.vo.system.UserVo;
10 11
 import org.apache.ibatis.annotations.Param;
11 12
 import org.springframework.stereotype.Repository;
12 13
 
@@ -67,10 +68,10 @@ public interface PaperMapper extends TkMapper<TPaper> {
67 68
      * @Date 2020/6/11 16:06
68 69
      * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
69 70
      **/
70
-    List<PaperListVo> listAll(@Param("paper") PaperSearchVo paper);
71
+    List<PaperListVo> listAll(@Param("paper") PaperSearchVo paper,@Param("userVo") UserVo userVo);
71 72
 
72 73
     //作业列表--未发布
73
-    List<PaperListVo> listWfbPapers(@Param("paper") PaperSearchVo paper);
74
+    List<PaperListVo> listWfbPapers(@Param("paper") PaperSearchVo paper,@Param("userVo") UserVo userVo);
74 75
 
75 76
     /**
76 77
      * 设置批改方式

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/resource/GuideMapper.java View File

@@ -6,6 +6,7 @@ import com.xhkjedu.sstudy.vo.paper.AStudentPaperVo;
6 6
 import com.xhkjedu.sstudy.vo.paper.AnalyzeSearchVo;
7 7
 import com.xhkjedu.sstudy.vo.resource.GuideAnalyzeVo;
8 8
 import com.xhkjedu.sstudy.vo.resource.GuideVo;
9
+import com.xhkjedu.vo.system.UserVo;
9 10
 import org.apache.ibatis.annotations.Param;
10 11
 
11 12
 import java.util.List;
@@ -20,7 +21,7 @@ import java.util.Map;
20 21
 public interface GuideMapper extends TkMapper<TGuide> {
21 22
 
22 23
     //学生预习列表--教师网页
23
-    List<GuideVo> listGuidesForTeacherWeb(@Param("guide") TGuide guide);
24
+    List<GuideVo> listGuidesForTeacherWeb(@Param("guide") TGuide guide,@Param("userVo") UserVo userVo);
24 25
     //学生预习列表--教师app
25 26
     List<Map> listGuidesForTeacherApp(@Param("guide") TGuide guide);
26 27
 

+ 4
- 3
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

@@ -18,6 +18,7 @@ import com.xhkjedu.sstudy.vo.question.QuestionVo;
18 18
 import com.xhkjedu.sstudy.vo.subjectbook.PointVo;
19 19
 import com.xhkjedu.utils.N_Utils;
20 20
 import com.xhkjedu.vo.ResultVo;
21
+import com.xhkjedu.vo.system.UserVo;
21 22
 import lombok.extern.slf4j.Slf4j;
22 23
 import org.springframework.beans.factory.annotation.Autowired;
23 24
 import org.springframework.stereotype.Service;
@@ -1056,13 +1057,13 @@ public class PaperService {
1056 1057
      * @Date 2020/6/11 16:30
1057 1058
      * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
1058 1059
      **/
1059
-    public List<PaperListVo> findAll(PaperSearchVo paper) {
1060
+    public List<PaperListVo> findAll(PaperSearchVo paper, UserVo userVo) {
1060 1061
         if(paper.getPsstate()!=null && paper.getPsstate() == 21){
1061 1062
             //未布置作业
1062
-            return paperMapper.listWfbPapers(paper);
1063
+            return paperMapper.listWfbPapers(paper, userVo);
1063 1064
         }else{
1064 1065
             //全部作业
1065
-            List<PaperListVo>  list = paperMapper.listAll(paper);
1066
+            List<PaperListVo>  list = paperMapper.listAll(paper, userVo);
1066 1067
             return StudyUtil.getPaperListVo(list);
1067 1068
         }
1068 1069
     }

+ 2
- 8
sstudy/src/main/java/com/xhkjedu/sstudy/service/recite/ReciteService.java View File

@@ -5,13 +5,11 @@ import com.xhkjedu.sstudy.mapper.recite.ReciteGroupMapper;
5 5
 import com.xhkjedu.sstudy.mapper.recite.ReciteMapper;
6 6
 import com.xhkjedu.sstudy.mapper.recite.ReciteStudentMapper;
7 7
 import com.xhkjedu.sstudy.mapper.system.SchoolMapper;
8
-import com.xhkjedu.sstudy.mapper.system.UserMapper;
9 8
 import com.xhkjedu.sstudy.model.recite.TRecite;
10 9
 import com.xhkjedu.sstudy.model.recite.TReciteGroup;
11 10
 import com.xhkjedu.sstudy.model.recite.TReciteStudent;
12 11
 import com.xhkjedu.utils.N_Utils;
13 12
 import com.xhkjedu.vo.ResultVo;
14
-import com.xhkjedu.vo.system.UserVo;
15 13
 import lombok.extern.slf4j.Slf4j;
16 14
 import org.apache.commons.lang3.StringUtils;
17 15
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,8 +44,6 @@ public class ReciteService {
46 44
 
47 45
     @Resource
48 46
     private SchoolMapper schoolMapper;
49
-    @Resource
50
-    private UserMapper userMapper;
51 47
 
52 48
     @Transactional(rollbackFor = Exception.class)
53 49
     public ResultVo save(TRecite recite){
@@ -192,10 +188,8 @@ public class ReciteService {
192 188
      * @author WN
193 189
      * @date 2020/6/10
194 190
      */
195
-    public List<Map> listRecites(TRecite recite) {
196
-        UserVo userVo = userMapper.getUserInfoForHandleLog(recite.getCreateid());
197
-
198
-        List<Map> list = reciteMapper.listRecites(recite,userVo.getUsertype());
191
+    public List<Map> listRecites(TRecite recite, Integer usertype) {
192
+        List<Map> list = reciteMapper.listRecites(recite, usertype);
199 193
         for(Map map : list){
200 194
             List<Map> reciteStus = (List<Map>) map.get("reciteStus");//背诵关联学生
201 195
             Integer hashb = Integer.parseInt(map.get("hashb").toString());

+ 3
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/resource/GuideService.java View File

@@ -14,6 +14,7 @@ import com.xhkjedu.sstudy.vo.resource.GuideAnalyzeVo;
14 14
 import com.xhkjedu.sstudy.vo.resource.GuideVo;
15 15
 import com.xhkjedu.utils.N_Utils;
16 16
 import com.xhkjedu.vo.ResultVo;
17
+import com.xhkjedu.vo.system.UserVo;
17 18
 import lombok.extern.slf4j.Slf4j;
18 19
 import org.apache.commons.lang3.StringUtils;
19 20
 import org.springframework.beans.factory.annotation.Autowired;
@@ -57,8 +58,8 @@ public class GuideService {
57 58
     private ConvertUtil convertUtil;
58 59
 
59 60
     //学生预习列表--教师网页端
60
-    public List<GuideVo> listGuidesForTeacherWeb(TGuide guide){
61
-        return guideMapper.listGuidesForTeacherWeb(guide);
61
+    public List<GuideVo> listGuidesForTeacherWeb(TGuide guide, UserVo userVo){
62
+        return guideMapper.listGuidesForTeacherWeb(guide, userVo);
62 63
     }
63 64
     //学生预习列表--教师app
64 65
     public List<Map> listGuidesForTeacherApp(TGuide guide){

+ 17
- 5
sstudy/src/main/resources/mapper/paper/PaperMapper.xml View File

@@ -198,9 +198,15 @@
198 198
         from t_paper p left join t_user u on p.createid=u.userid
199 199
         left join t_paper_class pg on p.paperid=pg.paperid
200 200
         left join t_director d on p.directorid=d.directorid
201
-        where (d.disabled=0 or p.directorid is null) and p.lsbid=#{paper.lsbid} and (p.createid=#{paper.createid} or pg.checkid=#{paper.createid} or
202
-        (p.hashb=1 and p.schoolid=#{paper.schoolid} and pg.classid in (${paper.classids})) or
203
-        (pg.classid in (${paper.bxclassids})))
201
+        where (d.disabled=0 or p.directorid is null) and p.lsbid=#{paper.lsbid}
202
+        <if test="userVo.usertype!=null and userVo.usertype==0">
203
+            and p.schoolid=#{userVo.schoolid}
204
+        </if>
205
+        <if test="userVo.usertype!=0">
206
+            and (p.createid=#{paper.createid} or pg.checkid=#{paper.createid} or
207
+            (p.hashb=1 and p.schoolid=#{paper.schoolid} and pg.classid in (${paper.classids})) or
208
+            (pg.classid in (${paper.bxclassids})))
209
+        </if>
204 210
         <if test="paper.directorid!=null and paper.directorid!='0'.toString() and paper.directorid!=''">
205 211
             and p.directorid=#{paper.directorid}
206 212
         </if>
@@ -227,7 +233,13 @@
227 233
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime,p.createid,p.hasreport,p.schoolid
228 234
         ,(select u.username from t_user u where u.userid=p.createid)createname
229 235
         from t_paper p left join t_director d on p.directorid=d.directorid
230
-        where (d.disabled=0 or p.directorid is null) and p.lsbid=#{paper.lsbid} and p.createid=#{paper.createid} and p.paperstate=21
236
+        where (d.disabled=0 or p.directorid is null) and p.lsbid=#{paper.lsbid} and p.paperstate=21
237
+        <if test="userVo.usertype!=null and userVo.usertype==0">
238
+            and p.schoolid=#{userVo.schoolid}
239
+        </if>
240
+        <if test="userVo.usertype!=0">
241
+            and p.createid=#{paper.createid}
242
+        </if>
231 243
         <if test="paper.directorid!=null and paper.directorid!='0'.toString() and paper.directorid!=''">
232 244
             and p.directorid=#{paper.directorid}
233 245
         </if>
@@ -265,7 +277,7 @@
265 277
         left join t_paper_class pg on p.paperid=pg.paperid
266 278
         left join t_paper_student ps on p.paperid=ps.paperid and pg.classid=ps.classid
267 279
         left join t_director d on p.directorid=d.directorid
268
-        where (d.disabled=0 or p.directorid is null) and p.checktype=1
280
+        where (d.disabled=0 or p.directorid is null)
269 281
         and (p.createid=#{checkid} or ps.checkid=#{checkid}) and ps.psstate in (1,2) and ps.pschecked!=1
270 282
         group by p.paperid order by p.createtime desc
271 283
     </select>

+ 7
- 2
sstudy/src/main/resources/mapper/resource/GuideMapper.xml View File

@@ -24,8 +24,13 @@
24 24
         left join t_guide_group gg on g.guideid = gg.guideid
25 25
         left join t_director d on g.directorid=d.directorid
26 26
         where d.disabled=0 and g.subjectid=#{guide.subjectid}
27
-        and ((g.hashb=1 and g.schoolid=#{guide.schoolid} and gg.classid in (${guide.classids})) or
28
-        (gg.classid in (${guide.bxclassids})) or g.createid=#{guide.createid})
27
+        <if test="userVo.usertype!=null and userVo.usertype==0">
28
+            and g.schoolid=#{userVo.schoolid}
29
+        </if>
30
+        <if test="userVo.usertype!=0">
31
+            and ((g.hashb=1 and g.schoolid=#{guide.schoolid} and gg.classid in (${guide.classids})) or
32
+            (gg.classid in (${guide.bxclassids})) or g.createid=#{guide.createid})
33
+        </if>
29 34
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
30 35
             and g.lsbid = #{guide.lsbid}
31 36
         </if>

Loading…
Cancel
Save