Browse Source

Merge remote-tracking branch 'origin/ywx' into wn

tags/正式3.9.0
王宁 1 year ago
parent
commit
da0e40d5b2

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

25
         from t_paper p left join t_paper_class 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} and pg.schoolid=#{sparams.schoolid}
29
         and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
29
         and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
30
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
30
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
31
             and p.subjectid=#{sparams.subjectid}
31
             and p.subjectid=#{sparams.subjectid}
94
         count(distinct case when ggs.costtime!=0 then ggs.rgsid else null end)yxcomitnum
94
         count(distinct case when ggs.costtime!=0 then ggs.rgsid else null end)yxcomitnum
95
         from t_guide g left join t_guide_group_student ggs on ggs.guideid=g.guideid
95
         from t_guide g left join t_guide_group_student ggs on ggs.guideid=g.guideid
96
         left join t_class c on c.classid=ggs.classid
96
         left join t_class c on c.classid=ggs.classid
97
-        where g.schoolid=#{sparams.schoolid}
97
+        where g.schoolid=#{sparams.schoolid} and ggs.schoolid=#{sparams.schoolid}
98
         and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
98
         and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
99
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
99
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
100
             and g.subjectid=#{sparams.subjectid}
100
             and g.subjectid=#{sparams.subjectid}
114
         count(distinct case when rs.rsstate!=0 then rs.rsid else null end)bscomitnum
114
         count(distinct case when rs.rsstate!=0 then rs.rsid else null end)bscomitnum
115
         from t_recite r left join t_recite_student rs on rs.reciteid=r.reciteid
115
         from t_recite r left join t_recite_student rs on rs.reciteid=r.reciteid
116
         left join t_class c on c.classid=rs.classid
116
         left join t_class c on c.classid=rs.classid
117
-        where r.schoolid=#{sparams.schoolid}
117
+        where r.schoolid=#{sparams.schoolid} and rs.schoolid=#{sparams.schoolid}
118
         and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
118
         and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
119
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
119
         <if test="sparams.subjectid!=null and sparams.subjectid!='0'.toString() and sparams.subjectid!=''">
120
             and r.subjectid=#{sparams.subjectid}
120
             and r.subjectid=#{sparams.subjectid}

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

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
27
-        WHERE p.paperstate=22 AND p.schoolid=#{sparams.schoolid} AND c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year} AND u.userstate=1
27
+        WHERE p.paperstate=22 AND p.schoolid=#{sparams.schoolid} AND pg.schoolid=#{sparams.schoolid}
28
+        AND c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year} AND u.userstate=1
28
         <if test="sparams.starttime!=null and sparams.starttime!=0">
29
         <if test="sparams.starttime!=null and sparams.starttime!=0">
29
             AND p.createtime<![CDATA[ >= ]]>#{sparams.starttime}
30
             AND p.createtime<![CDATA[ >= ]]>#{sparams.starttime}
30
         </if>
31
         </if>
43
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
44
         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
45
         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
46
         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}
47
+        where p.schoolid=#{sparams.schoolid} and p.paperstate=22 and pg.schoolid=#{sparams.schoolid}
48
+        and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
47
         <if test="sparams.starttime!=null and sparams.starttime!=0">
49
         <if test="sparams.starttime!=null and sparams.starttime!=0">
48
             AND p.createtime<![CDATA[ >= ]]>#{sparams.starttime}
50
             AND p.createtime<![CDATA[ >= ]]>#{sparams.starttime}
49
         </if>
51
         </if>
65
          LEFT JOIN t_class c ON ggs.classid=c.classid
67
          LEFT JOIN t_class c ON ggs.classid=c.classid
66
          LEFT JOIN t_subject s ON g.subjectid=s.subjectid
68
          LEFT JOIN t_subject s ON g.subjectid=s.subjectid
67
          LEFT JOIN T_USER U ON g.createid=u.userid
69
          LEFT JOIN T_USER U ON g.createid=u.userid
68
-         WHERE g.schoolid=#{sparams.schoolid} AND c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year} and u.userstate=1
70
+         WHERE g.schoolid=#{sparams.schoolid} AND ggs.schoolid=#{sparams.schoolid}
71
+        AND c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year} and u.userstate=1
69
         <if test="sparams.starttime!=null and sparams.starttime!=0">
72
         <if test="sparams.starttime!=null and sparams.starttime!=0">
70
             AND g.createtime<![CDATA[ >= ]]>#{sparams.starttime}
73
             AND g.createtime<![CDATA[ >= ]]>#{sparams.starttime}
71
         </if>
74
         </if>
80
         count(distinct case when ggs.costtime!=0 then ggs.rgsid else null end) commitnum
83
         count(distinct case when ggs.costtime!=0 then ggs.rgsid else null end) commitnum
81
         from t_guide g left join t_guide_group_student ggs on ggs.guideid=g.guideid
84
         from t_guide g left join t_guide_group_student ggs on ggs.guideid=g.guideid
82
         left join t_class c on c.classid=ggs.classid
85
         left join t_class c on c.classid=ggs.classid
83
-        where g.schoolid=#{sparams.schoolid} and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
86
+        where g.schoolid=#{sparams.schoolid} and ggs.schoolid=#{sparams.schoolid}
87
+        and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
84
         <if test="sparams.starttime!=null and sparams.starttime!=0">
88
         <if test="sparams.starttime!=null and sparams.starttime!=0">
85
             AND g.createtime<![CDATA[ >= ]]>#{sparams.starttime}
89
             AND g.createtime<![CDATA[ >= ]]>#{sparams.starttime}
86
         </if>
90
         </if>
103
          LEFT JOIN t_recite_student rs ON r.reciteid=rs.reciteid
107
          LEFT JOIN t_recite_student rs ON r.reciteid=rs.reciteid
104
          LEFT JOIN t_class c ON rs.classid=c.classid
108
          LEFT JOIN t_class c ON rs.classid=c.classid
105
          LEFT JOIN T_USER U ON r.createid=u.userid
109
          LEFT JOIN T_USER U ON r.createid=u.userid
106
-         WHERE r.recitestate=22 AND r.schoolid=#{sparams.schoolid} AND c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year} AND u.userstate=1
110
+         WHERE r.recitestate=22 AND r.schoolid=#{sparams.schoolid} AND rs.schoolid=#{sparams.schoolid}
111
+        AND c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year} AND u.userstate=1
107
         <if test="sparams.starttime!=null and sparams.starttime!=0">
112
         <if test="sparams.starttime!=null and sparams.starttime!=0">
108
             AND r.createtime<![CDATA[ >= ]]>#{sparams.starttime}
113
             AND r.createtime<![CDATA[ >= ]]>#{sparams.starttime}
109
         </if>
114
         </if>
120
         count(distinct case when rs.rsstate!=0 then rs.rsid else null end) commitnum
125
         count(distinct case when rs.rsstate!=0 then rs.rsid else null end) commitnum
121
         from t_recite r left join t_recite_student rs on rs.reciteid=r.reciteid
126
         from t_recite r left join t_recite_student rs on rs.reciteid=r.reciteid
122
         left join t_class c on c.classid=rs.classid
127
         left join t_class c on c.classid=rs.classid
123
-        where r.schoolid=#{sparams.schoolid} and r.recitestate=22 and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
128
+        where r.schoolid=#{sparams.schoolid} and r.recitestate=22 and rs.schoolid=#{sparams.schoolid}
129
+        and c.gradeid=#{sparams.gradeid} and c.year=#{sparams.year}
124
         <if test="sparams.starttime!=null and sparams.starttime!=0">
130
         <if test="sparams.starttime!=null and sparams.starttime!=0">
125
             AND r.createtime<![CDATA[ >= ]]>#{sparams.starttime}
131
             AND r.createtime<![CDATA[ >= ]]>#{sparams.starttime}
126
         </if>
132
         </if>

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

375
         from t_paper p left join t_paper_class 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 p.schoolid=#{paper.schoolid} and pg.schoolid=#{paper.schoolid}
379
+        and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
379
         <if test="paper.starttime!=null and paper.starttime!=0">
380
         <if test="paper.starttime!=null and paper.starttime!=0">
380
             and pg.starttime>=#{paper.starttime}
381
             and pg.starttime>=#{paper.starttime}
381
         </if>
382
         </if>

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

76
         <result property="ytjnum" column="ytjnum"></result>
76
         <result property="ytjnum" column="ytjnum"></result>
77
         <result property="ypgnum" column="ypgnum"></result>
77
         <result property="ypgnum" column="ypgnum"></result>
78
         <collection property="classes" ofType="com.xhkjedu.sstudy.vo.paper.PaperClassVo" javaType="java.util.List"
78
         <collection property="classes" ofType="com.xhkjedu.sstudy.vo.paper.PaperClassVo" javaType="java.util.List"
79
-                    select="listClass" column="{paperid=paperid,createid=createid,checkid=checkid,checktype=checktype,logschoolid=logschoolid}">
79
+                    select="listClass" column="{paperid=paperid,createid=createid,checkid=checkid,checktype=checktype,logschoolid=logschoolid,classids=classids}">
80
         </collection>
80
         </collection>
81
         <collection property="checklist" ofType="java.util.Map" javaType="java.util.List"
81
         <collection property="checklist" ofType="java.util.Map" javaType="java.util.List"
82
                     select="listPaperCheckStu" column="{paperid=paperid,checktype=checktype,logschoolid=logschoolid}">
82
                     select="listPaperCheckStu" column="{paperid=paperid,checktype=checktype,logschoolid=logschoolid}">
124
         ,count(distinct case when ps.psstate!=0 then ps.psid else null end)ytjnum
124
         ,count(distinct case when ps.psstate!=0 then ps.psid else null end)ytjnum
125
         ,count(distinct case when ps.pschecked=1 then ps.psid else null end)ypgnum
125
         ,count(distinct case when ps.pschecked=1 then ps.psid else null end)ypgnum
126
         from t_paper_student ps left join t_class c on ps.classid=c.classid
126
         from t_paper_student ps left join t_class c on ps.classid=c.classid
127
-        where ps.paperid=#{paperid} and ps.schoolid=#{logschoolid} group by ps.classid order by c.gradeid,c.classtype,c.classorder
127
+        where ps.paperid=#{paperid} and ps.classid in (${classids})
128
+        group by ps.classid order by c.gradeid,c.classtype,c.classorder
128
     </select>
129
     </select>
129
     <!--本校作业班级批阅人-->
130
     <!--本校作业班级批阅人-->
130
     <select id="listPaperCheckStu" resultType="java.util.Map">
131
     <select id="listPaperCheckStu" resultType="java.util.Map">
152
     <select id="listAll" resultMap="paperResult">
153
     <select id="listAll" resultMap="paperResult">
153
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime,p.schoolid,p.hasreport,
154
         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
155
         #{paper.schoolid} logschoolid,u.username createname,pg.starttime,pg.stoptime,pg.showtype,p.papernum,p.createid,#{paper.createid} checkid
156
+        ,group_concat(pg.classid) classids
155
         from t_paper p left join t_user u on p.createid=u.userid
157
         from t_paper p left join t_user u on p.createid=u.userid
156
         left join t_paper_class pg on p.paperid=pg.paperid
158
         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
159
         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
159
-        (p.hashb=0 and pg.classid in (${paper.bxclassids})))
160
+        (p.hashb=1 and p.schoolid=#{paper.schoolid} and pg.classid in (${paper.classids})) or
161
+        (pg.classid in (${paper.bxclassids})))
160
         <if test="paper.directorid!=null and paper.directorid!='0'.toString() and paper.directorid!=''">
162
         <if test="paper.directorid!=null and paper.directorid!='0'.toString() and paper.directorid!=''">
161
             and p.directorid=#{paper.directorid}
163
             and p.directorid=#{paper.directorid}
162
         </if>
164
         </if>
203
     <select id="correctList" resultMap="paperResult">
205
     <select id="correctList" resultMap="paperResult">
204
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime,p.createid,#{checkid} checkid,p.schoolid as logschoolid
206
         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
207
         ,u.username createname,pg.starttime,pg.stoptime,p.papernum
208
+        ,group_concat(pg.classid) classids
206
         from t_paper p left join t_user u on p.createid=u.userid
209
         from t_paper p left join t_user u on p.createid=u.userid
207
         left join t_paper_class pg on p.paperid=pg.paperid
210
         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
211
         left join t_paper_student ps on p.paperid=ps.paperid and pg.classid=ps.classid
261
     <select id="listPaper" resultMap="paperResult">
264
     <select id="listPaper" resultMap="paperResult">
262
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime
265
         select p.paperid,p.papername,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createtime
263
         ,pg.starttime,pg.stoptime,p.papernum,p.createid,#{paper.teacherid} checkid,p.schoolid,#{paper.schoolid} logschoolid
266
         ,pg.starttime,pg.stoptime,p.papernum,p.createid,#{paper.teacherid} checkid,p.schoolid,#{paper.schoolid} logschoolid
264
-        ,pg.showtype,p.hasreport
267
+        ,pg.showtype,p.hasreport,group_concat(pg.classid) classids
265
         ,(select u.username from t_user u where u.userid=p.createid)createname
268
         ,(select u.username from t_user u where u.userid=p.createid)createname
266
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
269
         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
270
         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}
271
         where p.createid=#{paper.teacherid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
272
+        and pg.schoolid=#{paper.schoolid}
269
         <if test="paper.starttime!=null and paper.starttime!=0">
273
         <if test="paper.starttime!=null and paper.starttime!=0">
270
             and p.createtime>=#{paper.starttime}
274
             and p.createtime>=#{paper.starttime}
271
         </if>
275
         </if>

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

32
         ,(select u.username from t_user u where u.userid=p.createid)createname
32
         ,(select u.username from t_user u where u.userid=p.createid)createname
33
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
33
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
34
         where (p.createid=#{paper.teacherid} or pg.checkid=#{paper.teacherid} or
34
         where (p.createid=#{paper.teacherid} or pg.checkid=#{paper.teacherid} or
35
-        (p.hashb=1 and pg.classid in (${paper.classids})) or
36
-        (p.hashb=0 and pg.classid in (${paper.bxclassids})))
35
+        (p.hashb=1 and p.schoolid=#{paper.schoolid} and pg.classid in (${paper.classids})) or
36
+        (pg.classid in (${paper.bxclassids})))
37
         <if test="paper.lsbid!=null and paper.lsbid!='0'.toString() and paper.lsbid!=''">
37
         <if test="paper.lsbid!=null and paper.lsbid!='0'.toString() and paper.lsbid!=''">
38
             and p.lsbid=#{paper.lsbid}
38
             and p.lsbid=#{paper.lsbid}
39
         </if>
39
         </if>

Loading…
Cancel
Save