|
@@ -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>
|