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

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

20
         count(distinct case when ps1.psstate!=0 then ps1.psid else null end) commitnum,
20
         count(distinct case when ps1.psstate!=0 then ps1.psid else null end) commitnum,
21
         count(distinct case when ps1.psstate!=0 and ps1.pschecked=1 then ps1.psid else null end) checknum
21
         count(distinct case when ps1.psstate!=0 and ps1.pschecked=1 then ps1.psid else null end) checknum
22
         FROM t_paper p LEFT JOIN t_subject s ON p.subjectid=s.subjectid
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
         LEFT JOIN t_paper_student ps1 ON p.paperid=ps1.paperid and ps1.classid=pg.classid
24
         LEFT JOIN t_paper_student ps1 ON p.paperid=ps1.paperid and ps1.classid=pg.classid
25
         LEFT JOIN t_class c ON pg.classid=c.classid
25
         LEFT JOIN t_class c ON pg.classid=c.classid
26
         LEFT JOIN T_USER U ON p.createid=u.userid
26
         LEFT JOIN T_USER U ON p.createid=u.userid
40
         count(distinct case when pg.starttime<=#{sparams.timestamp} then ps1.psid else null end)stunum,
40
         count(distinct case when pg.starttime<=#{sparams.timestamp} then ps1.psid else null end)stunum,
41
         count(distinct case when ps1.psstate!=0 then ps1.psid else null end) commitnum,
41
         count(distinct case when ps1.psstate!=0 then ps1.psid else null end) commitnum,
42
         count(distinct case when ps1.psstate!=0 and ps1.pschecked=1 then ps1.psid else null end) checknum
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
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
44
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
45
         left join t_class c on c.classid=pg.classid
45
         left join t_class c on c.classid=pg.classid
46
         where p.schoolid=#{sparams.schoolid} and p.paperstate=22 and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
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
         ,sum(ps.userscore)uscore
107
         ,sum(ps.userscore)uscore
108
         ,ifnull(truncate(sum(ps.userscore)*100/sum(case when pg.starttime<=#{type.createtime} then ps.paperscore else 0 end),2),0)zqrate
108
         ,ifnull(truncate(sum(ps.userscore)*100/sum(case when pg.starttime<=#{type.createtime} then ps.paperscore else 0 end),2),0)zqrate
109
         ,from_unixtime(p.createtime,'%Y-%m-%d')begindate,count(distinct p.paperid)fbnum
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
         left join t_paper_student ps on ps.paperid=p.paperid and ps.classid=pg.classid
111
         left join t_paper_student ps on ps.paperid=p.paperid and ps.classid=pg.classid
112
         left join t_class c on pg.classid=c.classid
112
         left join t_class c on pg.classid=c.classid
113
         left join t_school s on p.schoolid=s.schoolid
113
         left join t_school s on p.schoolid=s.schoolid

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

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

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

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

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

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

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

68
     <select id="listPaperCommitMonth" resultType="com.xhkjedu.sapi.vo.region.SWorkVo">
68
     <select id="listPaperCommitMonth" resultType="com.xhkjedu.sapi.vo.region.SWorkVo">
69
         select c.gradeid,s.subjectname,count(distinct pg.paperid)num,s.subjectorder
69
         select c.gradeid,s.subjectname,count(distinct pg.paperid)num,s.subjectorder
70
         ,truncate(count(distinct case when ps.psstate!=0 then ps.psid else null end)*100/count(distinct ps.psid),2)numrate
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
         left join t_subject s on p.subjectid=s.subjectid
72
         left join t_subject s on p.subjectid=s.subjectid
73
         left join t_class c on pg.classid=c.classid
73
         left join t_class c on pg.classid=c.classid
74
         left join t_paper_student ps on ps.paperid=pg.paperid
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
 import com.github.pagehelper.PageHelper;
3
 import com.github.pagehelper.PageHelper;
4
 import com.github.pagehelper.PageInfo;
4
 import com.github.pagehelper.PageInfo;
5
 import com.xhkjedu.sstudy.model.paper.TPaper;
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
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
7
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
8
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
8
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
9
 import com.xhkjedu.sstudy.service.paper.PaperAnalyzeService;
9
 import com.xhkjedu.sstudy.service.paper.PaperAnalyzeService;
164
     }
164
     }
165
 
165
 
166
     @PostMapping("/paper_class_student")
166
     @PostMapping("/paper_class_student")
167
-    public ResultVo paperClassStudent(@RequestBody TPaperGroup paper){
167
+    public ResultVo paperClassStudent(@RequestBody TPaperClass paper){
168
         Integer paperid = paper.getPaperid();
168
         Integer paperid = paper.getPaperid();
169
         Integer classid = paper.getClassid();
169
         Integer classid = paper.getClassid();
170
         N_Utils.validation(new Object[]{paperid,"作业id",1,classid,"班级id",1});
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
 import com.github.pagehelper.PageHelper;
3
 import com.github.pagehelper.PageHelper;
4
 import com.github.pagehelper.PageInfo;
4
 import com.github.pagehelper.PageInfo;
5
 import com.xhkjedu.sstudy.model.paper.TPaper;
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
 import com.xhkjedu.sstudy.service.paperreport.PaperReportService;
7
 import com.xhkjedu.sstudy.service.paperreport.PaperReportService;
8
 import com.xhkjedu.utils.N_Utils;
8
 import com.xhkjedu.utils.N_Utils;
9
 import com.xhkjedu.utils.PageUtil;
9
 import com.xhkjedu.utils.PageUtil;
37
      * @return com.xhkjedu.vo.ResultVo
37
      * @return com.xhkjedu.vo.ResultVo
38
      **/
38
      **/
39
     @PostMapping("gpr")
39
     @PostMapping("gpr")
40
-    public ResultVo generatePaperReport(@RequestBody TPaperGroup paper) {
40
+    public ResultVo generatePaperReport(@RequestBody TPaperClass paper) {
41
         Integer paperid = paper.getPaperid();
41
         Integer paperid = paper.getPaperid();
42
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
42
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
43
         paperReportService.generatePaperReport(paperid);
43
         paperReportService.generatePaperReport(paperid);
52
      * @return com.xhkjedu.vo.ResultVo
52
      * @return com.xhkjedu.vo.ResultVo
53
      **/
53
      **/
54
     @PostMapping("po")
54
     @PostMapping("po")
55
-    public ResultVo getPaperOverview(@RequestBody TPaperGroup paper) {
55
+    public ResultVo getPaperOverview(@RequestBody TPaperClass paper) {
56
         Integer paperid = paper.getPaperid();
56
         Integer paperid = paper.getPaperid();
57
         Integer classid = paper.getClassid();
57
         Integer classid = paper.getClassid();
58
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
58
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
68
      * @return com.xhkjedu.vo.ResultVo
68
      * @return com.xhkjedu.vo.ResultVo
69
      **/
69
      **/
70
     @PostMapping("pd")
70
     @PostMapping("pd")
71
-    public ResultVo getPaperDetail(@RequestBody TPaperGroup paper) {
71
+    public ResultVo getPaperDetail(@RequestBody TPaperClass paper) {
72
         Integer paperid = paper.getPaperid();
72
         Integer paperid = paper.getPaperid();
73
         Integer classid = paper.getClassid();
73
         Integer classid = paper.getClassid();
74
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
74
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
84
      * @return com.xhkjedu.vo.ResultVo
84
      * @return com.xhkjedu.vo.ResultVo
85
      **/
85
      **/
86
     @PostMapping("list_wtjstu")
86
     @PostMapping("list_wtjstu")
87
-    public ResultVo listWtjStu(@RequestBody TPaperGroup paper) {
87
+    public ResultVo listWtjStu(@RequestBody TPaperClass paper) {
88
         Integer paperid = paper.getPaperid();
88
         Integer paperid = paper.getPaperid();
89
         Integer classid = paper.getClassid();
89
         Integer classid = paper.getClassid();
90
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
90
         N_Utils.validation(new Object[]{paperid, "作业id", 1, classid, "班级id", 1});
124
      * @return com.xhkjedu.vo.ResultVo
124
      * @return com.xhkjedu.vo.ResultVo
125
      **/
125
      **/
126
     @PostMapping("p")
126
     @PostMapping("p")
127
-    public ResultVo getPaper(@RequestBody TPaperGroup paper) {
127
+    public ResultVo getPaper(@RequestBody TPaperClass paper) {
128
         Integer paperid = paper.getPaperid();
128
         Integer paperid = paper.getPaperid();
129
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
129
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
130
         Map map = paperReportService.getPaper(paperid);
130
         Map map = paperReportService.getPaper(paperid);

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

3
 import com.github.pagehelper.PageHelper;
3
 import com.github.pagehelper.PageHelper;
4
 import com.github.pagehelper.PageInfo;
4
 import com.github.pagehelper.PageInfo;
5
 import com.xhkjedu.sstudy.model.paper.TPaper;
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
 import com.xhkjedu.sstudy.model.question.TQuestionClass;
7
 import com.xhkjedu.sstudy.model.question.TQuestionClass;
8
 import com.xhkjedu.sstudy.service.paper.PaperTeaAppService;
8
 import com.xhkjedu.sstudy.service.paper.PaperTeaAppService;
9
 import com.xhkjedu.sstudy.vo.paper.PQuestionVo;
9
 import com.xhkjedu.sstudy.vo.paper.PQuestionVo;
58
     }
58
     }
59
 
59
 
60
     @PostMapping("/paper_detail")
60
     @PostMapping("/paper_detail")
61
-    public ResultVo paperDetail(@RequestBody TPaperGroup pg) {
61
+    public ResultVo paperDetail(@RequestBody TPaperClass pg) {
62
         Integer paperid = pg.getPaperid();
62
         Integer paperid = pg.getPaperid();
63
         Integer checkid = pg.getCheckid();
63
         Integer checkid = pg.getCheckid();
64
         Integer schoolid = pg.getSchoolid();
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
 package com.xhkjedu.sstudy.controller.paperstudent;
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
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupParam;
5
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupParam;
6
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo;
6
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo;
7
 import com.xhkjedu.utils.N_Utils;
7
 import com.xhkjedu.utils.N_Utils;
23
  **/
23
  **/
24
 @RestController
24
 @RestController
25
 @RequestMapping("/pg")
25
 @RequestMapping("/pg")
26
-public class PaperGroupController {
26
+public class PaperClassController {
27
     @Autowired
27
     @Autowired
28
-    private PaperGroupService paperGroupService;
28
+    private PaperClassService paperClassService;
29
 
29
 
30
     /**
30
     /**
31
      *功能描述  发布作业
31
      *功能描述  发布作业
37
     @PostMapping("/save")
37
     @PostMapping("/save")
38
     public ResultVo save(@RequestBody PaperGroupParam paperGroupParam){
38
     public ResultVo save(@RequestBody PaperGroupParam paperGroupParam){
39
         N_Utils.validation(new Object[]{paperGroupParam.getPaperid(),"作业id",1,paperGroupParam.getShowtype(),"公布答案",1,paperGroupParam.getClasslst(),"班级",1});
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
     @PostMapping("/save2")
44
     @PostMapping("/save2")
45
     public ResultVo save2(@RequestBody PaperGroupParam paperGroupParam){
45
     public ResultVo save2(@RequestBody PaperGroupParam paperGroupParam){
46
         N_Utils.validation(new Object[]{paperGroupParam.getPaperid(),"作业id",1,paperGroupParam.getShowtype(),"公布答案",1,paperGroupParam.getSelclass(),"班级",1});
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
     @PostMapping("/paper_student_list")
51
     @PostMapping("/paper_student_list")
52
-    public ResultVo listPaperStudent(@RequestBody TPaperGroup group) {
52
+    public ResultVo listPaperStudent(@RequestBody TPaperClass group) {
53
         Integer paperid = group.getPaperid();
53
         Integer paperid = group.getPaperid();
54
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
54
         N_Utils.validation(new Object[]{paperid, "作业id", 1});
55
-        List<PaperGroupVo> list = paperGroupService.listPaperStudent(paperid);
55
+        List<PaperGroupVo> list = paperClassService.listPaperStudent(paperid);
56
         return new ResultVo(0, "获取参与作业学生列表成功", list);
56
         return new ResultVo(0, "获取参与作业学生列表成功", list);
57
     }
57
     }
58
 
58
 
59
     //作业发布对象
59
     //作业发布对象
60
     @PostMapping("/list_object")
60
     @PostMapping("/list_object")
61
-    public ResultVo listObject(@RequestBody TPaperGroup group) {
61
+    public ResultVo listObject(@RequestBody TPaperClass group) {
62
         Integer paperid = group.getPaperid();
62
         Integer paperid = group.getPaperid();
63
         Integer createid = group.getCreateid();
63
         Integer createid = group.getCreateid();
64
         Integer papertype = group.getPapertype();
64
         Integer papertype = group.getPapertype();
65
         Integer schoolid = group.getSchoolid();
65
         Integer schoolid = group.getSchoolid();
66
         N_Utils.validation(new Object[]{paperid, "试卷id", 1, createid, "发布人id", 1
66
         N_Utils.validation(new Object[]{paperid, "试卷id", 1, createid, "发布人id", 1
67
                 , papertype, "作业类型", 1, schoolid, "学校id", 1});
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
         return new ResultVo(0, "获取发布对象成功", list);
69
         return new ResultVo(0, "获取发布对象成功", list);
70
     }
70
     }
71
 
71
 
77
      * @return com.xhkjedu.vo.ResultVo
77
      * @return com.xhkjedu.vo.ResultVo
78
      **/
78
      **/
79
     @PostMapping("/list_gs")
79
     @PostMapping("/list_gs")
80
-    public ResultVo listGroupStudent(@RequestBody TPaperGroup group) {
80
+    public ResultVo listGroupStudent(@RequestBody TPaperClass group) {
81
         Integer paperid = group.getPaperid();
81
         Integer paperid = group.getPaperid();
82
         Integer papertype = group.getPapertype();
82
         Integer papertype = group.getPapertype();
83
         Integer groupid = group.getGroupid();
83
         Integer groupid = group.getGroupid();
84
         N_Utils.validation(new Object[]{paperid, "试卷id", 1, papertype, "作业类型", 1
84
         N_Utils.validation(new Object[]{paperid, "试卷id", 1, papertype, "作业类型", 1
85
                 , groupid, "分组id", 1});
85
                 , groupid, "分组id", 1});
86
-        List<Map> list = paperGroupService.listGroupStudent(paperid, papertype, groupid);
86
+        List<Map> list = paperClassService.listGroupStudent(paperid, papertype, groupid);
87
         return new ResultVo(0, "获取发布对象成功", list);
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
 import com.xhkjedu.base.TkMapper;
3
 import com.xhkjedu.base.TkMapper;
4
 import com.xhkjedu.sstudy.model.paper.TPaper;
4
 import com.xhkjedu.sstudy.model.paper.TPaper;
5
 import com.xhkjedu.sstudy.model.paper.TPaperAnalyze;
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
 import com.xhkjedu.sstudy.vo.gradeclass.CStudentVo;
7
 import com.xhkjedu.sstudy.vo.gradeclass.CStudentVo;
8
 import com.xhkjedu.sstudy.vo.paper.AStudentPaperVo;
8
 import com.xhkjedu.sstudy.vo.paper.AStudentPaperVo;
9
 import com.xhkjedu.sstudy.vo.paper.AnalyzeQuestionVo;
9
 import com.xhkjedu.sstudy.vo.paper.AnalyzeQuestionVo;
201
      * @Date 2020/9/24 10:05
201
      * @Date 2020/9/24 10:05
202
      * @return java.util.List<com.xhkjedu.vo.gradeclass.CStudentVo>
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
     List<PaperGAnalyzeVo> listUser(@Param("paper") AnalyzeSearchVo paper);
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
 package com.xhkjedu.sstudy.mapper.paperstudent;
1
 package com.xhkjedu.sstudy.mapper.paperstudent;
2
 
2
 
3
 import com.xhkjedu.base.TkMapper;
3
 import com.xhkjedu.base.TkMapper;
4
-import com.xhkjedu.sstudy.model.paperstudent.TPaperGroup;
4
+import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
5
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo;
5
 import com.xhkjedu.sstudy.vo.paperstudent.PaperGroupVo;
6
 import com.xhkjedu.sstudy.vo.question.QuestionVo;
6
 import com.xhkjedu.sstudy.vo.question.QuestionVo;
7
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
17
  * Date 2020/6/9 11:00
17
  * Date 2020/6/9 11:00
18
  **/
18
  **/
19
 @Repository
19
 @Repository
20
-public interface PaperGroupMapper extends TkMapper<TPaperGroup> {
20
+public interface PaperClassMapper extends TkMapper<TPaperClass> {
21
 
21
 
22
     /**
22
     /**
23
      * 根据作业、分组id获取作业班级详情
23
      * 根据作业、分组id获取作业班级详情
24
      * @Param [paperid, groupid]
24
      * @Param [paperid, groupid]
25
      * @Author ywx
25
      * @Author ywx
26
      * @Date 2020/6/11 10:09
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
      * @Author ywx
63
      * @Author ywx
64
      * @Date 2020/10/14 11:04
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
     Integer getPaperClassChecked(@Param("paperid") Long paperid, @Param("classid") Integer classid);
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
 import java.util.ArrayList;
9
 import java.util.ArrayList;
10
 import java.util.List;
10
 import java.util.List;
11
 
11
 
12
-@Table(name = "t_paper_group")
12
+@Table(name = "t_paper_class")
13
 @Data
13
 @Data
14
-public class TPaperGroup extends BaseBean {
14
+public class TPaperClass extends BaseBean {
15
     //作业班级表
15
     //作业班级表
16
     @Id
16
     @Id
17
-    private Integer pgid;
17
+    private Integer pcid;
18
 
18
 
19
     //作业id
19
     //作业id
20
     private Integer paperid;
20
     private Integer paperid;
41
     //批改人
41
     //批改人
42
     private Integer checkid;
42
     private Integer checkid;
43
 
43
 
44
+    //是否分层0不分层1分层
45
+    private Integer hasfc;
46
+
44
     //创建人id
47
     //创建人id
45
     private Integer createid;
48
     private Integer createid;
46
 
49
 

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

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

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

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

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

4
 import com.xhkjedu.sstudy.mapper.paper.PaperAnalyzeMapper;
4
 import com.xhkjedu.sstudy.mapper.paper.PaperAnalyzeMapper;
5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
6
 import com.xhkjedu.sstudy.mapper.paper.PaperScantronMapper;
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
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
8
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentScantronMapper;
10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentScantronMapper;
11
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
11
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
12
 import com.xhkjedu.sstudy.model.paper.TPaper;
12
 import com.xhkjedu.sstudy.model.paper.TPaper;
13
 import com.xhkjedu.sstudy.model.paper.TPaperScantron;
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
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
15
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
16
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
16
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
17
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentScantron;
17
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentScantron;
53
     @Resource
53
     @Resource
54
     private QuestionClassService questionClassService;
54
     private QuestionClassService questionClassService;
55
     @Resource
55
     @Resource
56
-    private PaperGroupMapper paperGroupMapper;
56
+    private PaperClassMapper paperClassMapper;
57
 
57
 
58
     @Autowired
58
     @Autowired
59
     private PaperStudentScantronService paperStudentScantronService;
59
     private PaperStudentScantronService paperStudentScantronService;
325
             TPaperStudent paperStudentBean = new TPaperStudent();
325
             TPaperStudent paperStudentBean = new TPaperStudent();
326
             paperStudentBean.setPsid(psid);
326
             paperStudentBean.setPsid(psid);
327
             int nowTime = N_Utils.getSecondTimestamp();
327
             int nowTime = N_Utils.getSecondTimestamp();
328
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
328
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
329
             if (pg.getStoptime() < nowTime) paperStudentBean.setPsstate(2);
329
             if (pg.getStoptime() < nowTime) paperStudentBean.setPsstate(2);
330
             else paperStudentBean.setPsstate(1);
330
             else paperStudentBean.setPsstate(1);
331
 
331
 
368
      * @return java.lang.Integer
368
      * @return java.lang.Integer
369
      **/
369
      **/
370
     @Transactional(rollbackFor = Exception.class)
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
         Integer result = null;
372
         Integer result = null;
373
         try {
373
         try {
374
             //把学生未做的题设置分值为0,状态为已批改
374
             //把学生未做的题设置分值为0,状态为已批改
699
             TPaperStudent paperStudentBean = new TPaperStudent();
699
             TPaperStudent paperStudentBean = new TPaperStudent();
700
             paperStudentBean.setPsid(psid);
700
             paperStudentBean.setPsid(psid);
701
             int nowTime = N_Utils.getSecondTimestamp();
701
             int nowTime = N_Utils.getSecondTimestamp();
702
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
702
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
703
             if (pg.getStoptime() < nowTime) paperStudentBean.setPsstate(2);
703
             if (pg.getStoptime() < nowTime) paperStudentBean.setPsstate(2);
704
             else paperStudentBean.setPsstate(1);
704
             else paperStudentBean.setPsstate(1);
705
             paperStudentBean.setStoptime(nowTime);
705
             paperStudentBean.setStoptime(nowTime);
738
      * @return java.lang.Integer
738
      * @return java.lang.Integer
739
      **/
739
      **/
740
     @Transactional(rollbackFor = Exception.class)
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
         Integer result = null;
742
         Integer result = null;
743
         try {
743
         try {
744
             //把学生未做的题设置分值为0,状态为已批改
744
             //把学生未做的题设置分值为0,状态为已批改
858
      * @return java.lang.Integer
858
      * @return java.lang.Integer
859
      **/
859
      **/
860
     public Integer getCheckedByPsId(Integer psid){
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
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
5
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
6
 import com.xhkjedu.sstudy.mapper.paper.PaperQtypeQuestionMapper;
6
 import com.xhkjedu.sstudy.mapper.paper.PaperQtypeQuestionMapper;
7
 import com.xhkjedu.sstudy.mapper.paper.PaperScantronMapper;
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
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
9
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentMapper;
10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
10
 import com.xhkjedu.sstudy.mapper.paperstudent.PaperStudentQuestionMapper;
11
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
11
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
12
 import com.xhkjedu.sstudy.model.paper.TPaperFile;
12
 import com.xhkjedu.sstudy.model.paper.TPaperFile;
13
 import com.xhkjedu.sstudy.model.paper.TPaperScantron;
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
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
15
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudent;
16
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
16
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentQuestion;
17
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentScantron;
17
 import com.xhkjedu.sstudy.model.paperstudent.TPaperStudentScantron;
51
     @Resource
51
     @Resource
52
     private QuestionClassService questionClassService;
52
     private QuestionClassService questionClassService;
53
     @Resource
53
     @Resource
54
-    private PaperGroupMapper paperGroupMapper;
54
+    private PaperClassMapper paperClassMapper;
55
 
55
 
56
     @Autowired
56
     @Autowired
57
     private PaperStudentScantronService paperStudentScantronService;
57
     private PaperStudentScantronService paperStudentScantronService;
164
             Integer paperid = psq.getPaperid();
164
             Integer paperid = psq.getPaperid();
165
             Integer classid = paper.getClassid();
165
             Integer classid = paper.getClassid();
166
             int nowTime = N_Utils.getSecondTimestamp();
166
             int nowTime = N_Utils.getSecondTimestamp();
167
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
167
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
168
             if (pg.getStoptime() < nowTime){
168
             if (pg.getStoptime() < nowTime){
169
                 ps.setPsstate(2);
169
                 ps.setPsstate(2);
170
             } else {
170
             } else {
348
             Integer paperid = pss.getPaperid();
348
             Integer paperid = pss.getPaperid();
349
             Integer classid = paper.getClassid();
349
             Integer classid = paper.getClassid();
350
             int nowTime = N_Utils.getSecondTimestamp();
350
             int nowTime = N_Utils.getSecondTimestamp();
351
-            TPaperGroup pg = paperGroupMapper.selectByPaperAndClassId(paperid, classid);
351
+            TPaperClass pg = paperClassMapper.selectByPaperAndClassId(paperid, classid);
352
             if (pg.getStoptime() < nowTime){
352
             if (pg.getStoptime() < nowTime){
353
                 ps.setPsstate(2);
353
                 ps.setPsstate(2);
354
             } else {
354
             } else {

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

4
 import com.xhkjedu.sstudy.config.ConfigKey;
4
 import com.xhkjedu.sstudy.config.ConfigKey;
5
 import com.xhkjedu.sstudy.listener.MessageSender;
5
 import com.xhkjedu.sstudy.listener.MessageSender;
6
 import com.xhkjedu.sstudy.mapper.paper.PaperMapper;
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
 import com.xhkjedu.sstudy.mapper.question.QuestionClassMapper;
8
 import com.xhkjedu.sstudy.mapper.question.QuestionClassMapper;
9
 import com.xhkjedu.sstudy.mapper.question.QuestionExplainMapper;
9
 import com.xhkjedu.sstudy.mapper.question.QuestionExplainMapper;
10
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
10
 import com.xhkjedu.sstudy.mapper.question.QuestionMapper;
43
     @Resource
43
     @Resource
44
     private QuestionExplainMapper questionExplainMapper;
44
     private QuestionExplainMapper questionExplainMapper;
45
     @Resource
45
     @Resource
46
-    private PaperGroupMapper paperGroupMapper;
46
+    private PaperClassMapper paperClassMapper;
47
     @Resource
47
     @Resource
48
     private QuestionStudentService questionStudentService;
48
     private QuestionStudentService questionStudentService;
49
     @Resource
49
     @Resource

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

1
 package com.xhkjedu.sstudy.vo.paperstudent;
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
 import lombok.Data;
4
 import lombok.Data;
5
 
5
 
6
 import java.util.ArrayList;
6
 import java.util.ArrayList;
34
     private Integer schoolid;
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
     private List<PaperClassParam> selclass = new ArrayList<>();//发布作业选中的班级集合
39
     private List<PaperClassParam> selclass = new ArrayList<>();//发布作业选中的班级集合
40
 
40
 

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

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

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

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

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

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

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

160
     <select id="getPaper" resultType="java.util.Map">
160
     <select id="getPaper" resultType="java.util.Map">
161
         select p.papername,p.papertype,p.paperclass,p.createtime
161
         select p.papername,p.papertype,p.paperclass,p.createtime
162
         ,pg.starttime,pg.stoptime,pg.showtype
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
         where p.paperid=#{paperid} limit 1
164
         where p.paperid=#{paperid} limit 1
165
     </select>
165
     </select>
166
 </mapper>
166
 </mapper>

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

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

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

16
         ,pg.starttime,pg.stoptime,pg.showtype,ps.showanswer,u.username createname,p.papertype,d.directorname
16
         ,pg.starttime,pg.stoptime,pg.showtype,ps.showanswer,u.username createname,p.papertype,d.directorname
17
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
17
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
18
         left join t_director d on p.directorid=d.directorid
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
         left join t_user u on p.createid = u.userid
20
         left join t_user u on p.createid = u.userid
21
         where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
21
         where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
44
         select ps.psid,p.paperid,p.papername,p.paperclass,ps.psstate,ps.pschecked
44
         select ps.psid,p.paperid,p.papername,p.paperclass,ps.psstate,ps.pschecked
45
         ,pg.starttime,pg.stoptime,u.username createname,s.subjectname,p.papertype,pg.checked
45
         ,pg.starttime,pg.stoptime,u.username createname,s.subjectname,p.papertype,pg.checked
46
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
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
         left join t_user u on p.createid = u.userid
48
         left join t_user u on p.createid = u.userid
49
         left join t_subject s on p.subjectid = s.subjectid
49
         left join t_subject s on p.subjectid = s.subjectid
50
         where ps.checkid=#{ps.checkid} and ps.psstate!=0 and ps.pschecked!=1
50
         where ps.checkid=#{ps.checkid} and ps.psstate!=0 and ps.pschecked!=1
53
     <!--作业说明-->
53
     <!--作业说明-->
54
     <select id="getPaperComm" resultType="com.xhkjedu.sstudy.vo.paperstudent.PaperCommVo">
54
     <select id="getPaperComm" resultType="com.xhkjedu.sstudy.vo.paperstudent.PaperCommVo">
55
         select ps.psid,p.papername,ps.papernum,ps.paperscore,p.paperclass,p.comm,pg.starttime,pg.stoptime,pg.showtype
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
         left join t_paper p on pg.paperid = p.paperid
57
         left join t_paper p on pg.paperid = p.paperid
58
         where ps.psid=#{psid}
58
         where ps.psid=#{psid}
59
     </select>
59
     </select>
90
     <!--详情退回学生作业使用-->
90
     <!--详情退回学生作业使用-->
91
     <select id="findById2" resultType="com.xhkjedu.sstudy.model.paperstudent.TPaperStudent">
91
     <select id="findById2" resultType="com.xhkjedu.sstudy.model.paperstudent.TPaperStudent">
92
         select s.psid,s.paperid,s.classid,s.studentid,s.psstate,s.pschecked,pg.checked
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
         where s.psid=#{psid} limit 1
94
         where s.psid=#{psid} limit 1
95
     </select>
95
     </select>
96
 
96
 
154
         update t_paper_student set checkid=#{checkid} where paperid=#{paperid}
154
         update t_paper_student set checkid=#{checkid} where paperid=#{paperid}
155
     </update>
155
     </update>
156
     <update id="updateCheckId2">
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
         <trim prefix="set" suffixOverrides=",">
158
         <trim prefix="set" suffixOverrides=",">
159
             <trim prefix="pg.checkid = CASE " suffix="END,">
159
             <trim prefix="pg.checkid = CASE " suffix="END,">
160
                 <foreach collection="params" index="index" item="item">
160
                 <foreach collection="params" index="index" item="item">
178
     </select>
178
     </select>
179
 
179
 
180
     <update id="updateShowanswer">
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
         set ps.showanswer=1 where pg.pgstate=22 AND pg.showtype=1 and ps.showanswer=0 and pg.stoptime <![CDATA[ <= ]]> #{stoptime}
182
         set ps.showanswer=1 where pg.pgstate=22 AND pg.showtype=1 and ps.showanswer=0 and pg.stoptime <![CDATA[ <= ]]> #{stoptime}
183
     </update>
183
     </update>
184
 
184
 
191
         ,pg.starttime,pg.stoptime,ps.showanswer,u.username createname,p.papertype,s.subjectname
191
         ,pg.starttime,pg.stoptime,ps.showanswer,u.username createname,p.papertype,s.subjectname
192
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
192
         from t_paper_student ps join t_paper p on p.paperid = ps.paperid
193
         left join t_subject s on p.subjectid=s.subjectid
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
         left join t_user u on p.createid = u.userid
195
         left join t_user u on p.createid = u.userid
196
         where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
196
         where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
197
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
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
     <!--获取作业学生列表-->
73
     <!--获取作业学生列表-->
74
     <select id="listPaperStudent" resultMap="teacherClass">
74
     <select id="listPaperStudent" resultMap="teacherClass">
75
         select pg.classid,c.classname,c.gradeid,c.classnum,cs.studentid,u.username studentname,u.headpic
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
         left join t_class_student cs on c.classid = cs.classid
77
         left join t_class_student cs on c.classid = cs.classid
78
         left join t_user u on cs.studentid=u.userid
78
         left join t_user u on cs.studentid=u.userid
79
         where pg.paperid=#{paperid} order by c.gradeid,c.classtype,c.classorder,convert(u.username using gbk)
79
         where pg.paperid=#{paperid} order by c.gradeid,c.classtype,c.classorder,convert(u.username using gbk)
90
     </resultMap>
90
     </resultMap>
91
     <select id="listPaperTeacher" resultMap="paperTeacher">
91
     <select id="listPaperTeacher" resultMap="paperTeacher">
92
         select pg.classid,c.classname,c.gradeid,ct.teacherid,u.username teachername
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
         left join t_class_teacher ct on c.classid=ct.classid
94
         left join t_class_teacher ct on c.classid=ct.classid
95
         right join t_teacher_powersb tp on tp.teacherid=ct.teacherid
95
         right join t_teacher_powersb tp on tp.teacherid=ct.teacherid
96
         right join t_subject_book sb on sb.lsbid=tp.lsbid and sb.subjectid=#{subjectid}
96
         right join t_subject_book sb on sb.lsbid=tp.lsbid and sb.subjectid=#{subjectid}

Loading…
Cancel
Save