Browse Source

更换t_paper_group为t_paper_class

tags/正式3.9.0
王宁 1 year ago
parent
commit
ef9b028f97
28 changed files with 128 additions and 125 deletions
  1. 1
    1
      sapi/src/main/resources/mapper/analyze/SchoolSummaryMapper.xml
  2. 2
    2
      sapi/src/main/resources/mapper/analyze/SchoolTaskMapper.xml
  3. 1
    1
      sapi/src/main/resources/mapper/classreport/ClassReportMapper.xml
  4. 2
    2
      sapi/src/main/resources/mapper/itemtool/StudentTodoMapper.xml
  5. 2
    2
      sapi/src/main/resources/mapper/region/RPaperAnalyzeMapper.xml
  6. 2
    2
      sapi/src/main/resources/mapper/region/RegionAnalyzeMapper.xml
  7. 1
    1
      sapi/src/main/resources/mapper/region/SAnalyzeMapper.xml
  8. 2
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperAnalyzeController.java
  9. 6
    6
      sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperReportController.java
  10. 2
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperTeaAppController.java
  11. 12
    12
      sstudy/src/main/java/com/xhkjedu/sstudy/controller/paperstudent/PaperClassController.java
  12. 2
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperAnalyzeMapper.java
  13. 5
    5
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperClassMapper.java
  14. 6
    3
      sstudy/src/main/java/com/xhkjedu/sstudy/model/paperstudent/TPaperClass.java
  15. 2
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperAnalyzeService.java
  16. 3
    3
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperreport/PaperReportService.java
  17. 21
    21
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperClassService.java
  18. 8
    8
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java
  19. 5
    5
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java
  20. 2
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionClassService.java
  21. 2
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperGroupParam.java
  22. 10
    10
      sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml
  23. 10
    10
      sstudy/src/main/resources/mapper/paper/PaperMapper.xml
  24. 2
    2
      sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml
  25. 1
    1
      sstudy/src/main/resources/mapper/paperreport/PaperReportMapper.xml
  26. 7
    7
      sstudy/src/main/resources/mapper/paperstudent/PaperClassMapper.xml
  27. 7
    7
      sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml
  28. 2
    2
      suser/src/main/resources/mapper/gradeclass/ClassTeacherMapper.xml

+ 1
- 1
sapi/src/main/resources/mapper/analyze/SchoolSummaryMapper.xml View File

@@ -22,7 +22,7 @@
22 22
         count(distinct case when pg.starttime<=#{sparams.timestamp} then ps.psid else null end)pstunum,
23 23
         count(distinct case when ps.psstate!=0 then ps.psid else null end)pcommitnum,
24 24
         count(distinct case when ps.psstate!=0 and ps.pschecked=1 then ps.psid else null end)pchecknum
25
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
25
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
26 26
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
27 27
         left join t_class c on pg.classid=c.classid
28 28
         where p.paperstate=22 and p.schoolid=#{sparams.schoolid}

+ 2
- 2
sapi/src/main/resources/mapper/analyze/SchoolTaskMapper.xml View File

@@ -20,7 +20,7 @@
20 20
         count(distinct case when ps1.psstate!=0 then ps1.psid else null end) commitnum,
21 21
         count(distinct case when ps1.psstate!=0 and ps1.pschecked=1 then ps1.psid else null end) checknum
22 22
         FROM t_paper p LEFT JOIN t_subject s ON p.subjectid=s.subjectid
23
-        left join t_paper_group pg on p.paperid=pg.paperid
23
+        left join t_paper_class pg on p.paperid=pg.paperid
24 24
         LEFT JOIN t_paper_student ps1 ON p.paperid=ps1.paperid and ps1.classid=pg.classid
25 25
         LEFT JOIN t_class c ON pg.classid=c.classid
26 26
         LEFT JOIN T_USER U ON p.createid=u.userid
@@ -40,7 +40,7 @@
40 40
         count(distinct case when pg.starttime<=#{sparams.timestamp} then ps1.psid else null end)stunum,
41 41
         count(distinct case when ps1.psstate!=0 then ps1.psid else null end) commitnum,
42 42
         count(distinct case when ps1.psstate!=0 and ps1.pschecked=1 then ps1.psid else null end) checknum
43
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
43
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
44 44
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
45 45
         left join t_class c on c.classid=pg.classid
46 46
         where p.schoolid=#{sparams.schoolid} and p.paperstate=22 and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}

+ 1
- 1
sapi/src/main/resources/mapper/classreport/ClassReportMapper.xml View File

@@ -107,7 +107,7 @@
107 107
         ,sum(ps.userscore)uscore
108 108
         ,ifnull(truncate(sum(ps.userscore)*100/sum(case when pg.starttime<=#{type.createtime} then ps.paperscore else 0 end),2),0)zqrate
109 109
         ,from_unixtime(p.createtime,'%Y-%m-%d')begindate,count(distinct p.paperid)fbnum
110
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
110
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
111 111
         left join t_paper_student ps on ps.paperid=p.paperid and ps.classid=pg.classid
112 112
         left join t_class c on pg.classid=c.classid
113 113
         left join t_school s on p.schoolid=s.schoolid

+ 2
- 2
sapi/src/main/resources/mapper/itemtool/StudentTodoMapper.xml View File

@@ -30,7 +30,7 @@
30 30
             <if test="todo.todotype=='paper'">
31 31
                 select 'paper' todotype,count(distinct p.paperid)num,#{todo.subjectid} subjectid
32 32
                 from t_paper_student s join t_paper p on p.paperid = s.paperid
33
-                left join t_paper_group pg on s.paperid = pg.paperid and s.classid=pg.classid
33
+                left join t_paper_class pg on s.paperid = pg.paperid and s.classid=pg.classid
34 34
                 where pg.starttime&lt;=#{timestamp} and s.studentid=#{todo.studentid} and s.psstate=0
35 35
                 <if test="todo.subjectid!=null and todo.subjectid!='0'.toString() and todo.subjectid!=''">
36 36
                     and p.subjectid=#{todo.subjectid}
@@ -73,7 +73,7 @@
73 73
             <if test="todo.todotype=='checkpaper'">
74 74
                 select 'checkpaper' todotype,count(distinct p.paperid)num,#{todo.subjectid} subjectid
75 75
                 from t_paper_student ps join t_paper p on p.paperid = ps.paperid
76
-                left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
76
+                left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
77 77
                 where ps.checkid=#{todo.studentid} and ps.psstate!=0 and ps.pschecked!=1
78 78
                 <if test="todo.showtime!=null and todo.showtime!=0">
79 79
                     and pg.starttime>=#{todo.showtime}

+ 2
- 2
sapi/src/main/resources/mapper/region/RPaperAnalyzeMapper.xml View File

@@ -4,7 +4,7 @@
4 4
 
5 5
     <!--作业数量统计——作业数量-->
6 6
     <select id="getRegionPaperNumPaper" resultType="java.lang.Integer">
7
-      select count(DISTINCT pg.paperid) from t_paper_group pg left join t_paper p on pg.paperid=p.paperid
7
+      select count(DISTINCT pg.paperid) from t_paper_class pg left join t_paper p on pg.paperid=p.paperid
8 8
         LEFT JOIN t_school s on p.schoolid=s.schoolid
9 9
         left join t_class c on c.classid=pg.classid
10 10
         where s.schoollevel=#{param.level}
@@ -91,7 +91,7 @@
91 91
         count(case when ps.psstate!=0 then ps.psid else null end) commitnum,
92 92
         count(case when ps.psstate=1 then ps.psid else null end) commitasnum,
93 93
         count(case when ps.psstate!=0 and ps.pschecked=1 then ps.psid else null end) checknum
94
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
94
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
95 95
         left join t_paper_student ps on ps.paperid=p.paperid and ps.classid=pg.classid
96 96
         left join t_school s on p.schoolid=s.schoolid
97 97
         left join t_class c on c.classid=pg.classid

+ 2
- 2
sapi/src/main/resources/mapper/region/RegionAnalyzeMapper.xml View File

@@ -81,7 +81,7 @@
81 81
         count(distinct ps.psid)stunum,
82 82
         count(distinct case when ps.psstate!=0 then ps.psid else null end)commitnum,
83 83
         count(distinct case when ps.psstate!=0 and ps.pschecked=1 then ps.psid else null end)checknum
84
-        from t_paper_group pg
84
+        from t_paper_class pg
85 85
         right join t_school s on pg.schoolid=s.schoolid and pg.pgstate=22
86 86
         and pg.starttime between #{param.begintime} and #{param.endtime}
87 87
         left join t_paper_student ps on ps.paperid=pg.paperid
@@ -151,7 +151,7 @@
151 151
     <!--布置作业统计_布置作业次数-->
152 152
     <select id="listPapernumMonth" resultType="com.xhkjedu.sapi.vo.region.WorkVo">
153 153
         select s.schoolid,s.schoolname,s.shortname,count(distinct pg.paperid) num
154
-        from t_paper_group pg left join t_class c on c.classid=pg.classid
154
+        from t_paper_class pg left join t_class c on c.classid=pg.classid
155 155
         right join t_school s on pg.schoolid=s.schoolid and pg.pgstate=22
156 156
         and pg.createtime between #{param.begintime} and #{param.endtime}
157 157
         where s.schoolstate=1

+ 1
- 1
sapi/src/main/resources/mapper/region/SAnalyzeMapper.xml View File

@@ -68,7 +68,7 @@
68 68
     <select id="listPaperCommitMonth" resultType="com.xhkjedu.sapi.vo.region.SWorkVo">
69 69
         select c.gradeid,s.subjectname,count(distinct pg.paperid)num,s.subjectorder
70 70
         ,truncate(count(distinct case when ps.psstate!=0 then ps.psid else null end)*100/count(distinct ps.psid),2)numrate
71
-        from t_paper_group pg right join t_paper p on pg.paperid=p.paperid
71
+        from t_paper_class pg right join t_paper p on pg.paperid=p.paperid
72 72
         left join t_subject s on p.subjectid=s.subjectid
73 73
         left join t_class c on pg.classid=c.classid
74 74
         left join t_paper_student ps on ps.paperid=pg.paperid

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperAnalyzeController.java View File

@@ -3,7 +3,7 @@ package com.xhkjedu.sstudy.controller.paper;
3 3
 import com.github.pagehelper.PageHelper;
4 4
 import com.github.pagehelper.PageInfo;
5 5
 import com.xhkjedu.sstudy.model.paper.TPaper;
6
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
6
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
7 7
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
8 8
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
9 9
 import com.xhkjedu.sstudy.service.paper.PaperAnalyzeService;
@@ -164,7 +164,7 @@ public class PaperAnalyzeController {
164 164
     }
165 165
 
166 166
     @PostMapping("/paper_class_student")
167
-    public ResultVo paperClassStudent(@RequestBody TPaperGroup paper){
167
+    public ResultVo paperClassStudent(@RequestBody TPaperClass paper){
168 168
         Integer paperid = paper.getPaperid();
169 169
         Integer classid = paper.getClassid();
170 170
         N_Utils.validation(new Object[]{paperid,"作业id",1,classid,"班级id",1});

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

@@ -3,7 +3,7 @@ package com.xhkjedu.sstudy.controller.paper;
3 3
 import com.github.pagehelper.PageHelper;
4 4
 import com.github.pagehelper.PageInfo;
5 5
 import com.xhkjedu.sstudy.model.paper.TPaper;
6
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
6
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
7 7
 import com.xhkjedu.sstudy.service.paperreport.PaperReportService;
8 8
 import com.xhkjedu.utils.N_Utils;
9 9
 import com.xhkjedu.utils.PageUtil;
@@ -37,7 +37,7 @@ public class PaperReportController {
37 37
      * @return com.xhkjedu.vo.ResultVo
38 38
      **/
39 39
     @PostMapping("gpr")
40
-    public ResultVo generatePaperReport(@RequestBody TPaperGroup paper) {
40
+    public ResultVo generatePaperReport(@RequestBody TPaperClass paper) {
41 41
         Integer paperid = paper.getPaperid();
42 42
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
43 43
         paperReportService.generatePaperReport(paperid);
@@ -52,7 +52,7 @@ public class PaperReportController {
52 52
      * @return com.xhkjedu.vo.ResultVo
53 53
      **/
54 54
     @PostMapping("po")
55
-    public ResultVo getPaperOverview(@RequestBody TPaperGroup paper) {
55
+    public ResultVo getPaperOverview(@RequestBody TPaperClass paper) {
56 56
         Integer paperid = paper.getPaperid();
57 57
         Integer classid = paper.getClassid();
58 58
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
@@ -68,7 +68,7 @@ public class PaperReportController {
68 68
      * @return com.xhkjedu.vo.ResultVo
69 69
      **/
70 70
     @PostMapping("pd")
71
-    public ResultVo getPaperDetail(@RequestBody TPaperGroup paper) {
71
+    public ResultVo getPaperDetail(@RequestBody TPaperClass paper) {
72 72
         Integer paperid = paper.getPaperid();
73 73
         Integer classid = paper.getClassid();
74 74
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
@@ -84,7 +84,7 @@ public class PaperReportController {
84 84
      * @return com.xhkjedu.vo.ResultVo
85 85
      **/
86 86
     @PostMapping("list_wtjstu")
87
-    public ResultVo listWtjStu(@RequestBody TPaperGroup paper) {
87
+    public ResultVo listWtjStu(@RequestBody TPaperClass paper) {
88 88
         Integer paperid = paper.getPaperid();
89 89
         Integer classid = paper.getClassid();
90 90
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
@@ -124,7 +124,7 @@ public class PaperReportController {
124 124
      * @return com.xhkjedu.vo.ResultVo
125 125
      **/
126 126
     @PostMapping("p")
127
-    public ResultVo getPaper(@RequestBody TPaperGroup paper) {
127
+    public ResultVo getPaper(@RequestBody TPaperClass paper) {
128 128
         Integer paperid = paper.getPaperid();
129 129
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
130 130
         Map map = paperReportService.getPaper(paperid);

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperTeaAppController.java View File

@@ -3,7 +3,7 @@ package com.xhkjedu.sstudy.controller.paper;
3 3
 import com.github.pagehelper.PageHelper;
4 4
 import com.github.pagehelper.PageInfo;
5 5
 import com.xhkjedu.sstudy.model.paper.TPaper;
6
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
6
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
7 7
 import com.xhkjedu.sstudy.model.question.TQuestionClass;
8 8
 import com.xhkjedu.sstudy.service.paper.PaperTeaAppService;
9 9
 import com.xhkjedu.sstudy.vo.paper.PQuestionVo;
@@ -58,7 +58,7 @@ public class PaperTeaAppController {
58 58
     }
59 59
 
60 60
     @PostMapping("/paper_detail")
61
-    public ResultVo paperDetail(@RequestBody TPaperGroup pg) {
61
+    public ResultVo paperDetail(@RequestBody TPaperClass pg) {
62 62
         Integer paperid = pg.getPaperid();
63 63
         Integer checkid = pg.getCheckid();
64 64
         Integer schoolid = pg.getSchoolid();

sstudy/src/main/java/com/xhkjedu/sstudy/controller/paperstudent/PaperGroupController.java → sstudy/src/main/java/com/xhkjedu/sstudy/controller/paperstudent/PaperClassController.java View File

@@ -1,7 +1,7 @@
1 1
 package com.xhkjedu.sstudy.controller.paperstudent;
2 2
 
3
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
4
-import com.xhkjedu.sstudy.service.paperstudent.PaperGroupService;
3
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
4
+import com.xhkjedu.sstudy.service.paperstudent.PaperClassService;
5 5
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupParam;
6 6
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo;
7 7
 import com.xhkjedu.utils.N_Utils;
@@ -23,9 +23,9 @@ import java.util.Map;
23 23
  **/
24 24
 @RestController
25 25
 @RequestMapping("/pg")
26
-public class PaperGroupController {
26
+public class PaperClassController {
27 27
     @Autowired
28
-    private PaperGroupService paperGroupService;
28
+    private PaperClassService paperClassService;
29 29
 
30 30
     /**
31 31
      *功能描述  发布作业
@@ -37,35 +37,35 @@ public class PaperGroupController {
37 37
     @PostMapping("/save")
38 38
     public ResultVo save(@RequestBody PaperGroupParam paperGroupParam){
39 39
         N_Utils.validation(new Object[]{paperGroupParam.getPaperid(),"作业id",1,paperGroupParam.getShowtype(),"公布答案",1,paperGroupParam.getClasslst(),"班级",1});
40
-        return paperGroupService.savePaperGroup(paperGroupParam);
40
+        return paperClassService.savePaperGroup(paperGroupParam);
41 41
     }
42 42
 
43 43
     //发布作业(兼容靶向作业)
44 44
     @PostMapping("/save2")
45 45
     public ResultVo save2(@RequestBody PaperGroupParam paperGroupParam){
46 46
         N_Utils.validation(new Object[]{paperGroupParam.getPaperid(),"作业id",1,paperGroupParam.getShowtype(),"公布答案",1,paperGroupParam.getSelclass(),"班级",1});
47
-        return paperGroupService.savePaperClassStu(paperGroupParam);
47
+        return paperClassService.savePaperClassStu(paperGroupParam);
48 48
     }
49 49
 
50 50
 
51 51
     @PostMapping("/paper_student_list")
52
-    public ResultVo listPaperStudent(@RequestBody TPaperGroup group) {
52
+    public ResultVo listPaperStudent(@RequestBody TPaperClass group) {
53 53
         Integer paperid = group.getPaperid();
54 54
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
55
-        List<PaperGroupVo> list = paperGroupService.listPaperStudent(paperid);
55
+        List<PaperGroupVo> list = paperClassService.listPaperStudent(paperid);
56 56
         return new ResultVo(0, "获取参与作业学生列表成功", list);
57 57
     }
58 58
 
59 59
     //作业发布对象
60 60
     @PostMapping("/list_object")
61
-    public ResultVo listObject(@RequestBody TPaperGroup group) {
61
+    public ResultVo listObject(@RequestBody TPaperClass group) {
62 62
         Integer paperid = group.getPaperid();
63 63
         Integer createid = group.getCreateid();
64 64
         Integer papertype = group.getPapertype();
65 65
         Integer schoolid = group.getSchoolid();
66 66
         N_Utils.validation(new Object[]{paperid, "试卷id", 1, createid, "发布人id", 1
67 67
                 , papertype, "作业类型", 1, schoolid, "学校id", 1});
68
-        Map list = paperGroupService.listObject(paperid, createid, papertype, schoolid);
68
+        Map list = paperClassService.listObject(paperid, createid, papertype, schoolid);
69 69
         return new ResultVo(0, "获取发布对象成功", list);
70 70
     }
71 71
 
@@ -77,13 +77,13 @@ public class PaperGroupController {
77 77
      * @return com.xhkjedu.vo.ResultVo
78 78
      **/
79 79
     @PostMapping("/list_gs")
80
-    public ResultVo listGroupStudent(@RequestBody TPaperGroup group) {
80
+    public ResultVo listGroupStudent(@RequestBody TPaperClass group) {
81 81
         Integer paperid = group.getPaperid();
82 82
         Integer papertype = group.getPapertype();
83 83
         Integer groupid = group.getGroupid();
84 84
         N_Utils.validation(new Object[]{paperid, "试卷id", 1, papertype, "作业类型", 1
85 85
                 , groupid, "分组id", 1});
86
-        List<Map> list = paperGroupService.listGroupStudent(paperid, papertype, groupid);
86
+        List<Map> list = paperClassService.listGroupStudent(paperid, papertype, groupid);
87 87
         return new ResultVo(0, "获取发布对象成功", list);
88 88
     }
89 89
 }

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

@@ -3,7 +3,7 @@ package com.xhkjedu.sstudy.mapper.paper;
3 3
 import com.xhkjedu.base.TkMapper;
4 4
 import com.xhkjedu.sstudy.model.paper.TPaper;
5 5
 import com.xhkjedu.sstudy.model.paper.TPaperAnalyze;
6
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
6
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
7 7
 import com.xhkjedu.sstudy.vo.gradeclass.CStudentVo;
8 8
 import com.xhkjedu.sstudy.vo.paper.AStudentPaperVo;
9 9
 import com.xhkjedu.sstudy.vo.paper.AnalyzeQuestionVo;
@@ -201,7 +201,7 @@ public interface PaperAnalyzeMapper extends TkMapper<TPaperAnalyze> {
201 201
      * @Date 2020/9/24 10:05
202 202
      * @return java.util.List<com.xhkjedu.vo.gradeclass.CStudentVo>
203 203
      **/
204
-    List<CStudentVo> listPaperClassStudent(@Param("paper") TPaperGroup paper);
204
+    List<CStudentVo> listPaperClassStudent(@Param("paper") TPaperClass paper);
205 205
 
206 206
     //作业统计:年级下教师列表
207 207
     List<PaperGAnalyzeVo> listUser(@Param("paper") AnalyzeSearchVo paper);

sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperGroupMapper.java → sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperClassMapper.java View File

@@ -1,7 +1,7 @@
1 1
 package com.xhkjedu.sstudy.mapper.paperstudent;
2 2
 
3 3
 import com.xhkjedu.base.TkMapper;
4
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
4
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
5 5
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo;
6 6
 import com.xhkjedu.sstudy.vo.question.QuestionVo;
7 7
 import org.apache.ibatis.annotations.Param;
@@ -17,16 +17,16 @@ import java.util.Map;
17 17
  * Date 2020/6/9 11:00
18 18
  **/
19 19
 @Repository
20
-public interface PaperGroupMapper extends TkMapper<TPaperGroup> {
20
+public interface PaperClassMapper extends TkMapper<TPaperClass> {
21 21
 
22 22
     /**
23 23
      * 根据作业、分组id获取作业班级详情
24 24
      * @Param [paperid, groupid]
25 25
      * @Author ywx
26 26
      * @Date 2020/6/11 10:09
27
-     * @return com.xhkjedu.model.paperstudent.TPaperGroup
27
+     * @return com.xhkjedu.model.paperstudent.TPaperClass
28 28
      **/
29
-    TPaperGroup selectByPaperAndClassId(Integer paperid, Integer classid);
29
+    TPaperClass selectByPaperAndClassId(Integer paperid, Integer classid);
30 30
 
31 31
     /**
32 32
      * 获取参与作业学生列表
@@ -63,7 +63,7 @@ public interface PaperGroupMapper extends TkMapper<TPaperGroup> {
63 63
      * @Author ywx
64 64
      * @Date 2020/10/14 11:04
65 65
      **/
66
-    Integer getWpyNum(@Param("pg") TPaperGroup pg);
66
+    Integer getWpyNum(@Param("pg") TPaperClass pg);
67 67
 
68 68
     //获取班级作业是否结束批阅
69 69
     Integer getPaperClassChecked(@Param("paperid") Long paperid, @Param("classid") Integer classid);

sstudy/src/main/java/com/xhkjedu/sstudy/model/paperstudent/TPaperGroup.java → sstudy/src/main/java/com/xhkjedu/sstudy/model/paperstudent/TPaperClass.java View File

@@ -9,12 +9,12 @@ import javax.persistence.Transient;
9 9
 import java.util.ArrayList;
10 10
 import java.util.List;
11 11
 
12
-@Table(name = "t_paper_group")
12
+@Table(name = "t_paper_class")
13 13
 @Data
14
-public class TPaperGroup extends BaseBean {
14
+public class TPaperClass extends BaseBean {
15 15
     //作业班级表
16 16
     @Id
17
-    private Integer pgid;
17
+    private Integer pcid;
18 18
 
19 19
     //作业id
20 20
     private Integer paperid;
@@ -41,6 +41,9 @@ public class TPaperGroup extends BaseBean {
41 41
     //批改人
42 42
     private Integer checkid;
43 43
 
44
+    //是否分层0不分层1分层
45
+    private Integer hasfc;
46
+
44 47
     //创建人id
45 48
     private Integer createid;
46 49
 

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperAnalyzeService.java View File

@@ -9,7 +9,7 @@ import com.xhkjedu.sstudy.mapper.system.SchoolMapper;
9 9
 import com.xhkjedu.sstudy.model.paper.TPaper;
10 10
 import com.xhkjedu.sstudy.model.paper.TPaperAnalyze;
11 11
 import com.xhkjedu.sstudy.model.paper.TPaperFile;
12
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
12
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
13 13
 import com.xhkjedu.sstudy.utils.StudyUtil;
14 14
 import com.xhkjedu.sstudy.vo.gradeclass.CStudentVo;
15 15
 import com.xhkjedu.sstudy.vo.paper.*;
@@ -244,7 +244,7 @@ public class PaperAnalyzeService {
244 244
      * @Date 2020/9/24 10:10
245 245
      * @return java.util.Map
246 246
      **/
247
-    public Map listPaperClassStudent(TPaperGroup paper) {
247
+    public Map listPaperClassStudent(TPaperClass paper) {
248 248
         Map map = new HashMap();
249 249
         List<CStudentVo> list = paperAnalyzeMapper.listPaperClassStudent(paper);
250 250
         List<String> ytjstus = new ArrayList<>();

+ 3
- 3
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperreport/PaperReportService.java View File

@@ -5,7 +5,7 @@ import com.xhkjedu.sstudy.mapper.paper.PaperAnalyzeMapper;
5 5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
6 6
 import com.xhkjedu.sstudy.mapper.paper.PaperQtypeQuestionMapper;
7 7
 import com.xhkjedu.sstudy.mapper.paperreport.*;
8
-import com.xhkjedu.sstudy.mapper.paperstudent.PaperGroupMapper;
8
+import com.xhkjedu.sstudy.mapper.paperstudent.PaperClassMapper;
9 9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
10 10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
11 11
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentScantronMapper;
@@ -65,7 +65,7 @@ public class PaperReportService {
65 65
     @Resource
66 66
     private QuestionClassMapper questionClassMapper;
67 67
     @Resource
68
-    private PaperGroupMapper paperGroupMapper;
68
+    private PaperClassMapper paperClassMapper;
69 69
     @Resource
70 70
     private PaperReportMapper paperReportMapper;
71 71
 
@@ -178,7 +178,7 @@ public class PaperReportService {
178 178
             if (N_Utils.isListNotEmpty(list)) {
179 179
                 questionClassMapper.insertList(list);
180 180
             }
181
-            paperGroupMapper.updateChecked(pid, classid);
181
+            paperClassMapper.updateChecked(pid, classid);
182 182
         }
183 183
     }
184 184
 

sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperGroupService.java → sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperClassService.java View File

@@ -5,12 +5,12 @@ import com.xhkjedu.sstudy.mapper.gradeclass.ClassMapper;
5 5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
6 6
 import com.xhkjedu.sstudy.mapper.paper.PaperQtypeQuestionMapper;
7 7
 import com.xhkjedu.sstudy.mapper.paper.PaperScantronMapper;
8
-import com.xhkjedu.sstudy.mapper.paperstudent.PaperGroupMapper;
8
+import com.xhkjedu.sstudy.mapper.paperstudent.PaperClassMapper;
9 9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
10 10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
11 11
 import com.xhkjedu.sstudy.model.paper.TPaper;
12 12
 import com.xhkjedu.sstudy.model.paper.TPaperQtypeQuestion;
13
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
13
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
14 14
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
15 15
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
16 16
 import com.xhkjedu.sstudy.utils.ArithUtil;
@@ -42,9 +42,9 @@ import java.util.stream.Collectors;
42 42
  **/
43 43
 @Slf4j
44 44
 @Service
45
-public class PaperGroupService {
45
+public class PaperClassService {
46 46
     @Autowired
47
-    private PaperGroupMapper paperGroupMapper;
47
+    private PaperClassMapper paperClassMapper;
48 48
     @Autowired
49 49
     private ClassMapper classMapper;
50 50
     @Autowired
@@ -74,7 +74,7 @@ public class PaperGroupService {
74 74
             TPaper paper = paperMapper.selectByPrimaryKey(paperGroupParam.getPaperid());
75 75
             if (paper.getPaperstate() == 22) return new ResultVo(0,"保存成功");
76 76
             //班级
77
-            List<TPaperGroup> classlst = paperGroupParam.getClasslst().stream().distinct().collect(Collectors.toList());
77
+            List<TPaperClass> classlst = paperGroupParam.getClasslst().stream().distinct().collect(Collectors.toList());
78 78
             List<Map> jtrclist = paperGroupParam.getJtrclist();
79 79
 
80 80
             if (N_Utils.isListEmpty(classlst) && N_Utils.isListEmpty(jtrclist)) {
@@ -113,8 +113,8 @@ public class PaperGroupService {
113 113
         return resultVo;
114 114
     }
115 115
 
116
-    private ResultVo savePaperStudent(PaperGroupParam paperGroupParam, List<TPaperGroup> classlst, TPaper paper) {
117
-        List<TPaperGroup> savegroup = new ArrayList<>();//班级分组
116
+    private ResultVo savePaperStudent(PaperGroupParam paperGroupParam, List<TPaperClass> classlst, TPaper paper) {
117
+        List<TPaperClass> savegroup = new ArrayList<>();//班级分组
118 118
         List<TPaperStudent> saveps = new ArrayList<>();//班级分组学生
119 119
 
120 120
         Integer schoolid = paperGroupParam.getSchoolid();
@@ -125,7 +125,7 @@ public class PaperGroupService {
125 125
         Integer createid = paperGroupParam.getCreateid();
126 126
         Integer papernum = paper.getPapernum();
127 127
         Double paperscore = paper.getPaperscore();
128
-        for (TPaperGroup pg : classlst) {
128
+        for (TPaperClass pg : classlst) {
129 129
             List<Integer> groups = pg.getGroups();
130 130
             Integer classid = pg.getClassid();
131 131
             //处理作业分组数据
@@ -149,7 +149,7 @@ public class PaperGroupService {
149 149
 
150 150
         //批量保存作业班级,作业班级学生信息
151 151
         try {
152
-            paperGroupMapper.insertList(savegroup);
152
+            paperClassMapper.insertList(savegroup);
153 153
         } catch (Exception e) {
154 154
             if (e instanceof DuplicateKeyException) {
155 155
                 return new ResultVo(0, "保存成功");
@@ -160,12 +160,12 @@ public class PaperGroupService {
160 160
     }
161 161
 
162 162
     //处理作业分组数据
163
-    private void setPaperGroup(List<TPaperGroup> savegroup, List<TPaperStudent> saveps
163
+    private void setPaperGroup(List<TPaperClass> savegroup, List<TPaperStudent> saveps
164 164
             , Integer schoolid, Integer paperid, Integer starttime, Integer stoptime
165 165
             , Integer showtype, Integer createid, Integer papernum, Double paperscore
166 166
             , Integer classid, List<Integer> groups) {
167 167
         if (N_Utils.isListNotEmpty(groups)) {
168
-            TPaperGroup pg = new TPaperGroup();
168
+            TPaperClass pg = new TPaperClass();
169 169
             pg.setClassid(classid);
170 170
             pg.setPaperid(paperid);
171 171
             pg.setPgstate(22);//布置作业
@@ -207,7 +207,7 @@ public class PaperGroupService {
207 207
      * @Date 2020/7/24 14:52
208 208
      **/
209 209
     public List<PaperGroupVo> listPaperStudent(Integer paperid) {
210
-        return paperGroupMapper.listPaperStudent(paperid);
210
+        return paperClassMapper.listPaperStudent(paperid);
211 211
     }
212 212
 
213 213
     /**
@@ -220,7 +220,7 @@ public class PaperGroupService {
220 220
      **/
221 221
     public Map listObject(Integer paperid, Integer createid, Integer papertype, Integer schoolid) {
222 222
         Map paper = new HashMap();
223
-        List<Map> groups = paperGroupMapper.listGroupByTeacherId(createid, schoolid);//教师权限分组
223
+        List<Map> groups = paperClassMapper.listGroupByTeacherId(createid, schoolid);//教师权限分组
224 224
         //20230217过滤无学生分组,出现groupnum大于0,但是实际关联表没有学生
225 225
         groups = groups.stream().filter(m -> m.get("studentid") != null).collect(Collectors.toList());
226 226
 
@@ -228,10 +228,10 @@ public class PaperGroupService {
228 228
                 , LinkedHashMap::new, Collectors.toList()));
229 229
         List<Integer> studentids = groups.stream().map(m -> (Integer) m.get("studentid")).distinct().collect(Collectors.toList());
230 230
 
231
-        List<Map> users = paperGroupMapper.listUserByIds(studentids);
231
+        List<Map> users = paperClassMapper.listUserByIds(studentids);
232 232
         Map<Integer, Map> userMap = users.stream().collect(Collectors.toMap(m -> (Integer) m.get("userid"), m -> m));
233 233
         if (papertype == 3) {//靶向作业
234
-            List<QuestionVo> questions = paperGroupMapper.listPaperQuestions(paperid);
234
+            List<QuestionVo> questions = paperClassMapper.listPaperQuestions(paperid);
235 235
             for (QuestionVo question : questions) {
236 236
                 String qstemtxt = question.getQstemtxt();
237 237
                 if(N_Utils.isNotEmpty(qstemtxt)){
@@ -245,7 +245,7 @@ public class PaperGroupService {
245 245
             }
246 246
             paper.put("questions", questions);
247 247
             List<String> questionids = questions.stream().map(QuestionVo::getQuestionid).collect(Collectors.toList());
248
-            List<Map> stuQuestions = paperGroupMapper.listStuQuestion(questionids, studentids);
248
+            List<Map> stuQuestions = paperClassMapper.listStuQuestion(questionids, studentids);
249 249
             for (Integer studentid : studentids) {
250 250
                 List<String> stuQuestionIds = new ArrayList<>();//学生未收到或未得满分的试题ids
251 251
                 Double paperscore = 0.0;//试卷总分
@@ -392,7 +392,7 @@ public class PaperGroupService {
392 392
             , Integer papernum, Double paperscore, Integer classid, List<PaperStudentParam> students) {
393 393
         List<TPaperStudentQuestion> savestuque=new ArrayList<>();
394 394
         if (N_Utils.isListNotEmpty(students)) {
395
-            TPaperGroup pg = new TPaperGroup();
395
+            TPaperClass pg = new TPaperClass();
396 396
             pg.setPaperid(paperid);
397 397
             pg.setClassid(classid);
398 398
             pg.setPgstate(22);
@@ -403,7 +403,7 @@ public class PaperGroupService {
403 403
             pg.setSchoolid(schoolid);
404 404
             pg.setCreatetime(timestamp);
405 405
             pg.setChecked(0);
406
-            paperGroupMapper.insertSelective(pg);
406
+            paperClassMapper.insertSelective(pg);
407 407
 
408 408
             //根据studentid集合去重
409 409
             List<PaperStudentParam> students2 = students.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(PaperStudentParam::getStudentid))), ArrayList::new));
@@ -478,12 +478,12 @@ public class PaperGroupService {
478 478
 
479 479
     //伙伴学校作业发布对象
480 480
     public List<Map> listGroupStudent(Integer paperid, Integer papertype, Integer groupid) {
481
-        List<Map> students = paperGroupMapper.listGroupStudent(groupid);//教师权限集团校分组
481
+        List<Map> students = paperClassMapper.listGroupStudent(groupid);//教师权限集团校分组
482 482
         List<Integer> studentids = students.stream().map(m -> (Integer) m.get("studentid")).distinct().collect(Collectors.toList());
483 483
         if (papertype == 3) {//靶向作业
484
-            List<QuestionVo> questions = paperGroupMapper.listPaperPQuestions(paperid);//获取作业母题列表
484
+            List<QuestionVo> questions = paperClassMapper.listPaperPQuestions(paperid);//获取作业母题列表
485 485
             List<String> questionids = questions.stream().map(QuestionVo::getQuestionid).collect(Collectors.toList());
486
-            List<Map> stuQuestions = paperGroupMapper.listStuQuestion(questionids, studentids);
486
+            List<Map> stuQuestions = paperClassMapper.listStuQuestion(questionids, studentids);
487 487
             for (Map student : students) {
488 488
                 Object studentid = student.get("studentid");
489 489
                 List<String> stuQuestionIds = new ArrayList<>();//学生未收到或未得满分的试题ids

+ 8
- 8
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java View File

@@ -4,14 +4,14 @@ import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.sstudy.mapper.paper.PaperAnalyzeMapper;
5 5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
6 6
 import com.xhkjedu.sstudy.mapper.paper.PaperScantronMapper;
7
-import com.xhkjedu.sstudy.mapper.paperstudent.PaperGroupMapper;
7
+import com.xhkjedu.sstudy.mapper.paperstudent.PaperClassMapper;
8 8
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
9 9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
10 10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentScantronMapper;
11 11
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
12 12
 import com.xhkjedu.sstudy.model.paper.TPaper;
13 13
 import com.xhkjedu.sstudy.model.paper.TPaperScantron;
14
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
14
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
15 15
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
16 16
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
17 17
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentScantron;
@@ -53,7 +53,7 @@ public class PaperStudentService {
53 53
     @Resource
54 54
     private QuestionClassService questionClassService;
55 55
     @Resource
56
-    private PaperGroupMapper paperGroupMapper;
56
+    private PaperClassMapper paperClassMapper;
57 57
 
58 58
     @Autowired
59 59
     private PaperStudentScantronService paperStudentScantronService;
@@ -325,7 +325,7 @@ public class PaperStudentService {
325 325
             TPaperStudent paperStudentBean = new TPaperStudent();
326 326
             paperStudentBean.setPsid(psid);
327 327
             int nowTime = N_Utils.getSecondTimestamp();
328
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
328
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
329 329
             if (pg.getStoptime() < nowTime) paperStudentBean.setPsstate(2);
330 330
             else paperStudentBean.setPsstate(1);
331 331
 
@@ -368,7 +368,7 @@ public class PaperStudentService {
368 368
      * @return java.lang.Integer
369 369
      **/
370 370
     @Transactional(rollbackFor = Exception.class)
371
-    public Integer updatePaper(Integer psid, TPaperStudent paperStudentBean, TPaperGroup pg) throws Exception {
371
+    public Integer updatePaper(Integer psid, TPaperStudent paperStudentBean, TPaperClass pg) throws Exception {
372 372
         Integer result = null;
373 373
         try {
374 374
             //把学生未做的题设置分值为0,状态为已批改
@@ -699,7 +699,7 @@ public class PaperStudentService {
699 699
             TPaperStudent paperStudentBean = new TPaperStudent();
700 700
             paperStudentBean.setPsid(psid);
701 701
             int nowTime = N_Utils.getSecondTimestamp();
702
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
702
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
703 703
             if (pg.getStoptime() < nowTime) paperStudentBean.setPsstate(2);
704 704
             else paperStudentBean.setPsstate(1);
705 705
             paperStudentBean.setStoptime(nowTime);
@@ -738,7 +738,7 @@ public class PaperStudentService {
738 738
      * @return java.lang.Integer
739 739
      **/
740 740
     @Transactional(rollbackFor = Exception.class)
741
-    public Integer updateSPaper(Integer psid, TPaperStudent paperStudentBean, TPaperGroup pg) throws Exception {
741
+    public Integer updateSPaper(Integer psid, TPaperStudent paperStudentBean, TPaperClass pg) throws Exception {
742 742
         Integer result = null;
743 743
         try {
744 744
             //把学生未做的题设置分值为0,状态为已批改
@@ -858,7 +858,7 @@ public class PaperStudentService {
858 858
      * @return java.lang.Integer
859 859
      **/
860 860
     public Integer getCheckedByPsId(Integer psid){
861
-        return paperGroupMapper.getCheckedByPsId(psid);
861
+        return paperClassMapper.getCheckedByPsId(psid);
862 862
     }
863 863
 
864 864
     //学生作业退回

+ 5
- 5
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java View File

@@ -5,13 +5,13 @@ import com.xhkjedu.sstudy.mapper.paper.PaperAnalyzeMapper;
5 5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
6 6
 import com.xhkjedu.sstudy.mapper.paper.PaperQtypeQuestionMapper;
7 7
 import com.xhkjedu.sstudy.mapper.paper.PaperScantronMapper;
8
-import com.xhkjedu.sstudy.mapper.paperstudent.PaperGroupMapper;
8
+import com.xhkjedu.sstudy.mapper.paperstudent.PaperClassMapper;
9 9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
10 10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
11 11
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
12 12
 import com.xhkjedu.sstudy.model.paper.TPaperFile;
13 13
 import com.xhkjedu.sstudy.model.paper.TPaperScantron;
14
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
14
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
15 15
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
16 16
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
17 17
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentScantron;
@@ -51,7 +51,7 @@ public class PaperStudentWebService {
51 51
     @Resource
52 52
     private QuestionClassService questionClassService;
53 53
     @Resource
54
-    private PaperGroupMapper paperGroupMapper;
54
+    private PaperClassMapper paperClassMapper;
55 55
 
56 56
     @Autowired
57 57
     private PaperStudentScantronService paperStudentScantronService;
@@ -164,7 +164,7 @@ public class PaperStudentWebService {
164 164
             Integer paperid = psq.getPaperid();
165 165
             Integer classid = paper.getClassid();
166 166
             int nowTime = N_Utils.getSecondTimestamp();
167
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
167
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
168 168
             if (pg.getStoptime() < nowTime){
169 169
                 ps.setPsstate(2);
170 170
             } else {
@@ -348,7 +348,7 @@ public class PaperStudentWebService {
348 348
             Integer paperid = pss.getPaperid();
349 349
             Integer classid = paper.getClassid();
350 350
             int nowTime = N_Utils.getSecondTimestamp();
351
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
351
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
352 352
             if (pg.getStoptime() < nowTime){
353 353
                 ps.setPsstate(2);
354 354
             } else {

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionClassService.java View File

@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.sstudy.config.ConfigKey;
5 5
 import com.xhkjedu.sstudy.listener.MessageSender;
6 6
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
7
-import com.xhkjedu.sstudy.mapper.paperstudent.PaperGroupMapper;
7
+import com.xhkjedu.sstudy.mapper.paperstudent.PaperClassMapper;
8 8
 import com.xhkjedu.sstudy.mapper.question.QuestionClassMapper;
9 9
 import com.xhkjedu.sstudy.mapper.question.QuestionExplainMapper;
10 10
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
@@ -43,7 +43,7 @@ public class QuestionClassService {
43 43
     @Resource
44 44
     private QuestionExplainMapper questionExplainMapper;
45 45
     @Resource
46
-    private PaperGroupMapper paperGroupMapper;
46
+    private PaperClassMapper paperClassMapper;
47 47
     @Resource
48 48
     private QuestionStudentService questionStudentService;
49 49
     @Resource

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperGroupParam.java View File

@@ -1,6 +1,6 @@
1 1
 package com.xhkjedu.sstudy.vo.paperstudent;
2 2
 
3
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
3
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
4 4
 import lombok.Data;
5 5
 
6 6
 import java.util.ArrayList;
@@ -34,7 +34,7 @@ public class PaperGroupParam {
34 34
     private Integer schoolid;
35 35
 
36 36
     //布置作业对象
37
-    private List<TPaperGroup> classlst = new ArrayList<>();
37
+    private List<TPaperClass> classlst = new ArrayList<>();
38 38
 
39 39
     private List<PaperClassParam> selclass = new ArrayList<>();//发布作业选中的班级集合
40 40
 

+ 10
- 10
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml View File

@@ -44,7 +44,7 @@
44 44
         ,p.createtime,pg.starttime,pg.stoptime,pg.showtype
45 45
         ,(case when ps.psstate=0 then 0 when ps.pschecked=1 then 2 else 1 end)pschecked
46 46
         from t_paper p left join t_paper_student ps on p.paperid = ps.paperid
47
-        left join t_paper_group pg on pg.paperid=p.paperid and pg.classid=#{classid}
47
+        left join t_paper_class pg on pg.paperid=p.paperid and pg.classid=#{classid}
48 48
         where p.paperid=#{paperid} and ps.classid=#{classid}
49 49
     </select>
50 50
     <select id="getPeopleAnalyze" resultType="com.xhkjedu.sstudy.vo.paper.AnalyzeStudentVo">
@@ -287,13 +287,13 @@
287 287
     <select id="listClass" resultType="com.xhkjedu.sstudy.vo.paper.PaperClassVo">
288 288
         select count(*)classnum,c.classname,c.gradeid,pg.classid
289 289
         ,(select count(*) from t_paper_student ps where ps.paperid=pg.paperid and ps.classid=pg.classid and ps.psstate!=0)ytjnum
290
-        from t_paper_group pg left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid
290
+        from t_paper_class pg left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid
291 291
         left join t_class c on pg.classid=c.classid
292 292
         where pg.paperid=#{paperid} group by pg.classid order by c.gradeid,c.classtype,c.classorder
293 293
     </select>
294 294
     <select id="listCommitAnalyze" resultMap="commitAnalyze">
295 295
         select p.paperid,p.papername,pg.starttime
296
-        from t_paper p left join t_paper_group pg on p.paperid = pg.paperid
296
+        from t_paper p left join t_paper_class pg on p.paperid = pg.paperid
297 297
         where p.createid=#{createid}
298 298
         group by p.paperid order by pg.starttime desc limit #{papernum}
299 299
     </select>
@@ -310,7 +310,7 @@
310 310
     </resultMap>
311 311
     <select id="listPaperClass" resultMap="schoolMap">
312 312
         select pg.classid,c.classname,c.gradeid,pg.checked,s.schoolid,s.schoolname
313
-        from t_paper_group pg left join t_class c on pg.classid = c.classid
313
+        from t_paper_class pg left join t_class c on pg.classid = c.classid
314 314
         left join t_school s on c.schoolid = s.schoolid
315 315
         where pg.paperid=#{paperid}
316 316
         group by pg.classid order by c.schoolid <![CDATA[ <> ]]> #{schoolid},c.gradeid,c.classtype,c.classorder
@@ -332,7 +332,7 @@
332 332
         ,ps.psstate,ps.pschecked,count(distinct case when ps2.userscore>ps.userscore then ps2.psid else null end)+1 `rank`,count(distinct ps2.psid)stunum
333 333
         from t_paper_student ps left join t_paper p on ps.paperid = p.paperid
334 334
         left join t_paper_student ps2 on ps2.paperid=ps.paperid and ps2.classid=ps.classid
335
-        left join t_paper_group pg on pg.paperid=ps.paperid and pg.classid=ps.classid
335
+        left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
336 336
         left join t_user u on p.createid=u.userid
337 337
         where ps.psid=#{psid} limit 1
338 338
     </select>
@@ -372,7 +372,7 @@
372 372
         select p.createid as teacherid,count(distinct p.paperid)fbnum,count(distinct case when pg.starttime&lt;=#{paper.timestamp} then ps.psid else null end)ytjnum,
373 373
         count(distinct case when ps.psstate!=0 then ps.psid else null end)commitnum,
374 374
         count(distinct case when ps.psstate!=0 and ps.pschecked=1 then ps.psid else null end)checknum
375
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
375
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
376 376
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
377 377
         left join t_class c on pg.classid=c.classid
378 378
         where p.paperstate=22 and c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
@@ -414,7 +414,7 @@
414 414
         </if>
415 415
         group by cs2.studentid)cs
416 416
         left join t_paper_student ps on ps.studentid=cs.studentid
417
-        left join t_paper_group pg on pg.paperid=ps.paperid and pg.classid=ps.classid
417
+        left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
418 418
         left join t_paper p on ps.paperid=p.paperid and p.paperstate=22
419 419
         <if test="paper.starttime!=null and paper.starttime!=0">
420 420
             and pg.starttime>=#{paper.starttime}
@@ -442,7 +442,7 @@
442 442
         ,count(distinct ps.psid)sdnum,count(distinct case when ps.psstate!=0 then ps.psid else null end)commitnum
443 443
         ,sum(ps.userscore)userscore,sum(ps.paperscore)paperscore
444 444
         from t_paper_student ps left join t_class c on ps.classid=c.classid
445
-        left join t_paper_group pg on pg.paperid=ps.paperid and pg.classid=ps.classid
445
+        left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
446 446
         left join t_paper p on ps.paperid=p.paperid
447 447
         left join t_subject s on p.subjectid=s.subjectid
448 448
         where ps.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and
@@ -468,7 +468,7 @@
468 468
     <select id="listPaperStuExport" resultType="com.xhkjedu.sstudy.vo.paper.AStudentPaperVo">
469 469
         select ps.studentid,p.subjectid,ps.psstate,ps.userscore,ps.paperscore
470 470
         from t_paper_student ps left join t_class c on ps.classid=c.classid
471
-        left join t_paper_group pg on pg.paperid=ps.paperid and pg.classid=ps.classid
471
+        left join t_paper_class pg on pg.paperid=ps.paperid and pg.classid=ps.classid
472 472
         left join t_paper p on ps.paperid=p.paperid
473 473
         where ps.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and p.paperstate=22
474 474
         <if test="paper.starttime!=null and paper.starttime!=0">
@@ -492,7 +492,7 @@
492 492
     <select id="listPaperAllClassStu" resultType="com.xhkjedu.sstudy.vo.paper.AStudentPaperVo">
493 493
         select ps.studentid,p.subjectid,ps.psstate,ps.userscore,ps.paperscore
494 494
         from t_paper_student ps left join t_class c on ps.classid=c.classid
495
-        left join t_paper_group pg on ps.paperid=pg.paperid and ps.classid=pg.classid
495
+        left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
496 496
         left join t_paper p on pg.paperid=p.paperid
497 497
         where c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and p.paperstate=22
498 498
         <if test="paper.starttime!=null and paper.starttime!=0">

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

@@ -50,7 +50,7 @@
50 50
     <select id="findById" resultType="com.xhkjedu.sstudy.vo.paper.PaperVo">
51 51
         select p.paperid,p.papername,p.papernum,p.paperscore,p.createtime,u.username createname,
52 52
         p.papertype,p.comm,p.paperclass,p.directorid,p.paperstate,p.hearfile
53
-        ,(select showtype from t_paper_group pg where pg.paperid=p.paperid limit 1)showtype
53
+        ,(select showtype from t_paper_class pg where pg.paperid=p.paperid limit 1)showtype
54 54
         from t_paper p left join t_user u on u.userid=p.createid
55 55
         where p.paperid=#{paperid} limit 1
56 56
     </select>
@@ -110,7 +110,7 @@
110 110
         <if test="checktype==1">
111 111
         ,pg.checkid,(select group_concat(distinct u.username) from t_user u where pg.checkid=u.userid)teachername
112 112
         </if>
113
-        from t_paper_group pg left join t_class c on pg.classid=c.classid
113
+        from t_paper_class pg left join t_class c on pg.classid=c.classid
114 114
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
115 115
         where pg.paperid=#{paperid}
116 116
         <if test="checkid!=null and checkid!=0 and checkid!=createid">
@@ -129,7 +129,7 @@
129 129
     <!--本校作业班级批阅人-->
130 130
     <select id="listPaperCheckStu" resultType="java.util.Map">
131 131
          <if test="checktype==1">
132
-           select pg.checkid userid,u.username,c.classid,c.classname,c.gradeid from t_paper_group pg
132
+           select pg.checkid userid,u.username,c.classid,c.classname,c.gradeid from t_paper_class pg
133 133
            left join t_user u on pg.checkid=u.userid
134 134
            left join t_class c on pg.classid=c.classid
135 135
            where pg.paperid=#{paperid} and pg.schoolid=#{logschoolid}
@@ -153,7 +153,7 @@
153 153
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime,p.schoolid,p.hasreport,
154 154
         #{paper.schoolid} logschoolid,u.username createname,pg.starttime,pg.stoptime,pg.showtype,p.papernum,p.createid,#{paper.createid} checkid
155 155
         from t_paper p left join t_user u on p.createid=u.userid
156
-        left join t_paper_group pg on p.paperid=pg.paperid
156
+        left join t_paper_class pg on p.paperid=pg.paperid
157 157
         where p.lsbid=#{paper.lsbid} and (p.createid=#{paper.createid} or pg.checkid=#{paper.createid} or
158 158
         (p.hashb=1 and pg.classid in (${paper.classids})) or
159 159
         (p.hashb=0 and pg.classid in (${paper.bxclassids})))
@@ -204,7 +204,7 @@
204 204
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime,p.createid,#{checkid} checkid,p.schoolid as logschoolid
205 205
         ,u.username createname,pg.starttime,pg.stoptime,p.papernum
206 206
         from t_paper p left join t_user u on p.createid=u.userid
207
-        left join t_paper_group pg on p.paperid=pg.paperid
207
+        left join t_paper_class pg on p.paperid=pg.paperid
208 208
         left join t_paper_student ps on p.paperid=ps.paperid and pg.classid=ps.classid
209 209
         where p.checktype=1 and ps.checkid=#{checkid} and ps.psstate!=0 and ps.pschecked!=1
210 210
         group by p.paperid order by p.createtime desc
@@ -263,7 +263,7 @@
263 263
         ,pg.starttime,pg.stoptime,p.papernum,p.createid,#{paper.teacherid} checkid,p.schoolid,#{paper.schoolid} logschoolid
264 264
         ,pg.showtype,p.hasreport
265 265
         ,(select u.username from t_user u where u.userid=p.createid)createname
266
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
266
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
267 267
         left join t_class c on pg.classid=c.classid
268 268
         where p.createid=#{paper.teacherid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
269 269
         <if test="paper.starttime!=null and paper.starttime!=0">
@@ -321,7 +321,7 @@
321 321
     </resultMap>
322 322
     <select id="listPaperClass" resultMap="schoolMap">
323 323
         select pg.classid,c.classname,c.gradeid,pg.checked,c.schoolid,s.schoolname
324
-        from t_paper_group pg left join t_class c on pg.classid = c.classid
324
+        from t_paper_class pg left join t_class c on pg.classid = c.classid
325 325
         left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid
326 326
         left join t_school s on c.schoolid = s.schoolid
327 327
         where pg.paperid=#{paperid} and ps.psstate!=0
@@ -374,7 +374,7 @@
374 374
     <!--作业发布班级和学校-->
375 375
     <select id="listSchoolClassByPaperid" resultType="java.util.Map">
376 376
         select s.schoolid,s.schoolname,pg.classid,c.classname,c.gradeid,c.year,p.subjectid
377
-        from t_paper_group pg
377
+        from t_paper_class pg
378 378
         left join t_class c on pg.classid=c.classid
379 379
         left join t_school s on s.schoolid=c.schoolid
380 380
         left join t_paper p on pg.paperid=p.paperid
@@ -386,7 +386,7 @@
386 386
         left join t_teacher_powersb tp on ct.teacherid=tp.teacherid
387 387
         left join t_user u on u.userid=ct.teacherid
388 388
         left join t_class c on ct.classid=c.classid
389
-        left join t_paper_group pg on u.schoolid=pg.schoolid
389
+        left join t_paper_class pg on u.schoolid=pg.schoolid
390 390
         where tp.subjectid=#{param.subjectid} and u.userstate=1 and u.usertype=1 and pg.paperid=#{param.paperid}
391 391
         and c.classstate=1 and c.year=#{param.year} and c.classtype in (1,2) and c.gradeid=#{param.gradeid}
392 392
         group by ct.teacherid order by c.classtype,c.classorder, convert(u.username using gbk)
@@ -409,7 +409,7 @@
409 409
     <!--获取作业学生列表-->
410 410
     <select id="listPaperStudentsByPaperid" resultMap="paperStudentList">
411 411
         select u.schoolid,s.schoolname, pg.classid,c.classname,c.gradeid,c.classnum,cs.studentid,u.username studentname
412
-        from t_paper_group pg left join t_class c on pg.classid=c.classid
412
+        from t_paper_class pg left join t_class c on pg.classid=c.classid
413 413
         left join t_class_student cs on c.classid = cs.classid
414 414
         left join t_user u on cs.studentid=u.userid
415 415
         left join t_school s on s.schoolid=u.schoolid

+ 2
- 2
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml View File

@@ -28,7 +28,7 @@
28 28
         select p.paperid,p.papername,p.papernum,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createid,#{paper.teacherid} checkid
29 29
         ,min(pg.starttime)starttime,min(pg.stoptime)stoptime,pg.checked,p.subjectid,p.paperscore,p.schoolid,#{paper.schoolid} logschoolid
30 30
         ,group_concat(pg.classid) classids
31
-        from t_paper p left join t_paper_group pg on p.paperid=pg.paperid
31
+        from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
32 32
         where (p.createid=#{paper.teacherid} or pg.checkid=#{paper.teacherid} or
33 33
         (p.hashb=1 and pg.classid in (${paper.classids})) or
34 34
         (p.hashb=0 and pg.classid in (${paper.bxclassids})))
@@ -69,7 +69,7 @@
69 69
     <select id="getPaperDetail" resultMap="paperDetailResult">
70 70
         select pg.classid,c.classname,c.gradeid,pg.checked,pg.paperid,pg.schoolid gschoolid,#{schoolid} schoolid
71 71
         ,pg.checkid,u.username checkname
72
-        from t_paper_group pg left join t_class c on pg.classid=c.classid
72
+        from t_paper_class pg left join t_class c on pg.classid=c.classid
73 73
         left join t_user u on pg.checkid=u.userid
74 74
         where pg.paperid=#{paperid} and pg.classid in(${classids})
75 75
         <!--<if test="checkid!=null and checkid!=0">

+ 1
- 1
sstudy/src/main/resources/mapper/paperreport/PaperReportMapper.xml View File

@@ -160,7 +160,7 @@
160 160
     <select id="getPaper" resultType="java.util.Map">
161 161
         select p.papername,p.papertype,p.paperclass,p.createtime
162 162
         ,pg.starttime,pg.stoptime,pg.showtype
163
-        from t_paper p left join t_paper_group pg on p.paperid = pg.paperid
163
+        from t_paper p left join t_paper_class pg on p.paperid = pg.paperid
164 164
         where p.paperid=#{paperid} limit 1
165 165
     </select>
166 166
 </mapper>

sstudy/src/main/resources/mapper/paperstudent/PaperGroupMapper.xml → sstudy/src/main/resources/mapper/paperstudent/PaperClassMapper.xml View File

@@ -1,10 +1,10 @@
1 1
 <?xml version="1.0" encoding="UTF-8" ?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.xhkjedu.sstudy.mapper.paperstudent.PaperGroupMapper">
3
+<mapper namespace="com.xhkjedu.sstudy.mapper.paperstudent.PaperClassMapper">
4 4
     <!--详情-->
5
-    <select id="selectByPaperAndClassId" resultType="com.xhkjedu.sstudy.model.paperstudent.TPaperGroup">
5
+    <select id="selectByPaperAndClassId" resultType="com.xhkjedu.sstudy.model.paperstudent.TPaperClass">
6 6
         select pg.paperid,pg.classid,pg.stoptime,pg.showtype
7
-        from t_paper_group pg
7
+        from t_paper_class pg
8 8
         where pg.paperid=#{paperid} and pg.classid=#{classid} limit 1
9 9
     </select>
10 10
     <resultMap id="groupClass" type="com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo">
@@ -21,19 +21,19 @@
21 21
     <!--获取参与作业学生列表-->
22 22
     <select id="listPaperStudent" resultMap="groupClass">
23 23
         select ps.classid,c.classname,c.gradeid,ps.studentid,u.username studentname,pg.starttime,pg.stoptime
24
-        from t_paper_group pg left join t_paper_student ps on ps.paperid = pg.paperid and pg.classid=ps.classid
24
+        from t_paper_class pg left join t_paper_student ps on ps.paperid = pg.paperid and pg.classid=ps.classid
25 25
         left join t_user u on ps.studentid=u.userid
26 26
         left join t_class c on ps.classid=c.classid
27 27
         where pg.paperid=#{paperid} order by c.gradeid,c.classtype,c.classorder,convert(u.username using gbk)
28 28
     </select>
29 29
     <!--批阅完成-->
30 30
     <update id="updateChecked">
31
-        update t_paper_group set checked=1 where paperid=#{paperid} and classid=#{classid}
31
+        update t_paper_class set checked=1 where paperid=#{paperid} and classid=#{classid}
32 32
     </update>
33 33
     <!--根据学生作业id获取作业是否完成批阅-->
34 34
     <select id="getCheckedByPsId" resultType="java.lang.Integer">
35 35
         select pg.checked from t_paper_student ps
36
-        left join t_paper_group pg on ps.paperid=pg.paperid and ps.classid=pg.classid
36
+        left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
37 37
         where ps.psid=#{psid}
38 38
     </select>
39 39
 
@@ -43,7 +43,7 @@
43 43
     </select>
44 44
     <!--获取班级作业是否结束批阅-->
45 45
     <select id="getPaperClassChecked" resultType="java.lang.Integer">
46
-        select pg.checked from t_paper_group pg where pg.paperid=#{paperid} and pg.classid=#{classid}
46
+        select pg.checked from t_paper_class pg where pg.paperid=#{paperid} and pg.classid=#{classid}
47 47
     </select>
48 48
     <!--教师权限分组-->
49 49
     <select id="listGroupByTeacherId" resultType="java.util.Map">

+ 7
- 7
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml View File

@@ -16,7 +16,7 @@
16 16
         ,pg.starttime,pg.stoptime,pg.showtype,ps.showanswer,u.username createname,p.papertype,d.directorname
17 17
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
18 18
         left join t_director d on p.directorid=d.directorid
19
-        left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
19
+        left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
20 20
         left join t_user u on p.createid = u.userid
21 21
         where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
22 22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
@@ -44,7 +44,7 @@
44 44
         select ps.psid,p.paperid,p.papername,p.paperclass,ps.psstate,ps.pschecked
45 45
         ,pg.starttime,pg.stoptime,u.username createname,s.subjectname,p.papertype,pg.checked
46 46
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
47
-        left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
47
+        left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
48 48
         left join t_user u on p.createid = u.userid
49 49
         left join t_subject s on p.subjectid = s.subjectid
50 50
         where ps.checkid=#{ps.checkid} and ps.psstate!=0 and ps.pschecked!=1
@@ -53,7 +53,7 @@
53 53
     <!--作业说明-->
54 54
     <select id="getPaperComm" resultType="com.xhkjedu.sstudy.vo.paperstudent.PaperCommVo">
55 55
         select ps.psid,p.papername,ps.papernum,ps.paperscore,p.paperclass,p.comm,pg.starttime,pg.stoptime,pg.showtype
56
-        from t_paper_student ps left join t_paper_group pg on ps.paperid=pg.paperid and ps.classid=pg.classid
56
+        from t_paper_student ps left join t_paper_class pg on ps.paperid=pg.paperid and ps.classid=pg.classid
57 57
         left join t_paper p on pg.paperid = p.paperid
58 58
         where ps.psid=#{psid}
59 59
     </select>
@@ -90,7 +90,7 @@
90 90
     <!--详情退回学生作业使用-->
91 91
     <select id="findById2" resultType="com.xhkjedu.sstudy.model.paperstudent.TPaperStudent">
92 92
         select s.psid,s.paperid,s.classid,s.studentid,s.psstate,s.pschecked,pg.checked
93
-        from t_paper_student s left join t_paper_group pg on s.paperid=pg.paperid and s.classid=pg.classid
93
+        from t_paper_student s left join t_paper_class pg on s.paperid=pg.paperid and s.classid=pg.classid
94 94
         where s.psid=#{psid} limit 1
95 95
     </select>
96 96
 
@@ -154,7 +154,7 @@
154 154
         update t_paper_student set checkid=#{checkid} where paperid=#{paperid}
155 155
     </update>
156 156
     <update id="updateCheckId2">
157
-        update t_paper_group pg left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid
157
+        update t_paper_class pg left join t_paper_student ps on pg.paperid=ps.paperid and pg.classid=ps.classid
158 158
         <trim prefix="set" suffixOverrides=",">
159 159
             <trim prefix="pg.checkid = CASE " suffix="END,">
160 160
                 <foreach collection="params" index="index" item="item">
@@ -178,7 +178,7 @@
178 178
     </select>
179 179
 
180 180
     <update id="updateShowanswer">
181
-        update t_paper_student ps left join t_paper_group pg on ps.paperid=pg.paperid
181
+        update t_paper_student ps left join t_paper_class pg on ps.paperid=pg.paperid
182 182
         set ps.showanswer=1 where pg.pgstate=22 AND pg.showtype=1 and ps.showanswer=0 and pg.stoptime <![CDATA[ <= ]]> #{stoptime}
183 183
     </update>
184 184
 
@@ -191,7 +191,7 @@
191 191
         ,pg.starttime,pg.stoptime,ps.showanswer,u.username createname,p.papertype,s.subjectname
192 192
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
193 193
         left join t_subject s on p.subjectid=s.subjectid
194
-        left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
194
+        left join t_paper_class pg on ps.paperid = pg.paperid and ps.classid=pg.classid
195 195
         left join t_user u on p.createid = u.userid
196 196
         where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
197 197
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">

+ 2
- 2
suser/src/main/resources/mapper/gradeclass/ClassTeacherMapper.xml View File

@@ -73,7 +73,7 @@
73 73
     <!--获取作业学生列表-->
74 74
     <select id="listPaperStudent" resultMap="teacherClass">
75 75
         select pg.classid,c.classname,c.gradeid,c.classnum,cs.studentid,u.username studentname,u.headpic
76
-        from t_paper_group pg left join t_class c on pg.classid=c.classid
76
+        from t_paper_class pg left join t_class c on pg.classid=c.classid
77 77
         left join t_class_student cs on c.classid = cs.classid
78 78
         left join t_user u on cs.studentid=u.userid
79 79
         where pg.paperid=#{paperid} order by c.gradeid,c.classtype,c.classorder,convert(u.username using gbk)
@@ -90,7 +90,7 @@
90 90
     </resultMap>
91 91
     <select id="listPaperTeacher" resultMap="paperTeacher">
92 92
         select pg.classid,c.classname,c.gradeid,ct.teacherid,u.username teachername
93
-        from t_paper_group pg left join t_class c on pg.classid=c.classid
93
+        from t_paper_class pg left join t_class c on pg.classid=c.classid
94 94
         left join t_class_teacher ct on c.classid=ct.classid
95 95
         right join t_teacher_powersb tp on tp.teacherid=ct.teacherid
96 96
         right join t_subject_book sb on sb.lsbid=tp.lsbid and sb.subjectid=#{subjectid}

Loading…
Cancel
Save