Quellcode durchsuchen

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

tags/正式3.9.0
王宁 vor 1 Jahr
Ursprung
Commit
da0e40d5b2

+ 3
- 3
sapi/src/main/resources/mapper/analyze/SchoolSummaryMapper.xml Datei anzeigen

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

+ 12
- 6
sapi/src/main/resources/mapper/analyze/SchoolTaskMapper.xml Datei anzeigen

@@ -24,7 +24,8 @@
24 24
         LEFT JOIN t_paper_student ps1 ON p.paperid=ps1.paperid and ps1.classid=pg.classid
25 25
         LEFT JOIN t_class c ON pg.classid=c.classid
26 26
         LEFT JOIN T_USER U ON p.createid=u.userid
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 29
         <if test="sparams.starttime!=null and sparams.starttime!=0">
29 30
             AND p.createtime<![CDATA[ >= ]]>#{sparams.starttime}
30 31
         </if>
@@ -43,7 +44,8 @@
43 44
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
44 45
         left join t_paper_student ps1 on ps1.paperid=pg.paperid and ps1.classid=pg.classid
45 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 49
         <if test="sparams.starttime!=null and sparams.starttime!=0">
48 50
             AND p.createtime<![CDATA[ >= ]]>#{sparams.starttime}
49 51
         </if>
@@ -65,7 +67,8 @@
65 67
          LEFT JOIN t_class c ON ggs.classid=c.classid
66 68
          LEFT JOIN t_subject s ON g.subjectid=s.subjectid
67 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 72
         <if test="sparams.starttime!=null and sparams.starttime!=0">
70 73
             AND g.createtime<![CDATA[ >= ]]>#{sparams.starttime}
71 74
         </if>
@@ -80,7 +83,8 @@
80 83
         count(distinct case when ggs.costtime!=0 then ggs.rgsid else null end) commitnum
81 84
         from t_guide g left join t_guide_group_student ggs on ggs.guideid=g.guideid
82 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 88
         <if test="sparams.starttime!=null and sparams.starttime!=0">
85 89
             AND g.createtime<![CDATA[ >= ]]>#{sparams.starttime}
86 90
         </if>
@@ -103,7 +107,8 @@
103 107
          LEFT JOIN t_recite_student rs ON r.reciteid=rs.reciteid
104 108
          LEFT JOIN t_class c ON rs.classid=c.classid
105 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 112
         <if test="sparams.starttime!=null and sparams.starttime!=0">
108 113
             AND r.createtime<![CDATA[ >= ]]>#{sparams.starttime}
109 114
         </if>
@@ -120,7 +125,8 @@
120 125
         count(distinct case when rs.rsstate!=0 then rs.rsid else null end) commitnum
121 126
         from t_recite r left join t_recite_student rs on rs.reciteid=r.reciteid
122 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 130
         <if test="sparams.starttime!=null and sparams.starttime!=0">
125 131
             AND r.createtime<![CDATA[ >= ]]>#{sparams.starttime}
126 132
         </if>

+ 2
- 1
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml Datei anzeigen

@@ -375,7 +375,8 @@
375 375
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
376 376
         left join t_paper_student ps on ps.paperid=pg.paperid and ps.classid=pg.classid
377 377
         left join t_class c on pg.classid=c.classid
378
-        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 380
         <if test="paper.starttime!=null and paper.starttime!=0">
380 381
             and pg.starttime>=#{paper.starttime}
381 382
         </if>

+ 9
- 5
sstudy/src/main/resources/mapper/paper/PaperMapper.xml Datei anzeigen

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

+ 2
- 2
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml Datei anzeigen

@@ -32,8 +32,8 @@
32 32
         ,(select u.username from t_user u where u.userid=p.createid)createname
33 33
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
34 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 37
         <if test="paper.lsbid!=null and paper.lsbid!='0'.toString() and paper.lsbid!=''">
38 38
             and p.lsbid=#{paper.lsbid}
39 39
         </if>

Laden…
Abbrechen
Speichern