|
@@ -75,7 +75,7 @@
|
75
|
75
|
<result property="classnum" column="classnum"></result>
|
76
|
76
|
<result property="ytjnum" column="ytjnum"></result>
|
77
|
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="schools" ofType="java.util.Map" javaType="java.util.List"
|
79
|
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"
|
|
@@ -87,17 +87,22 @@
|
87
|
87
|
<result property="gradeid" column="gradeid"></result>
|
88
|
88
|
</collection>
|
89
|
89
|
</resultMap>
|
90
|
|
- <resultMap id="classResult" type="com.xhkjedu.sstudy.vo.paper.PaperClassVo">
|
91
|
|
- <result property="classid" column="classid"></result>
|
92
|
|
- <result property="classname" column="classname"></result>
|
93
|
|
- <result property="gradeid" column="gradeid"></result>
|
94
|
|
- <result property="classnum" column="classnum"></result>
|
95
|
|
- <result property="ytjnum" column="ytjnum"></result>
|
96
|
|
- <result property="ypgnum" column="ypgnum"></result>
|
97
|
|
- <result property="studentname" column="studentname"></result>
|
98
|
|
- <result property="checkid" column="checkid"></result>
|
99
|
|
- <result property="teachername" column="teachername"></result>
|
100
|
|
- <result property="checked" column="checked"></result>
|
|
90
|
+ <resultMap id="classResult" type="java.util.Map">
|
|
91
|
+ <result property="schoolid" column="schoolid"></result>
|
|
92
|
+ <result property="schoolname" column="schoolname"></result>
|
|
93
|
+ <collection property="classes" ofType="com.xhkjedu.sstudy.vo.paper.PaperClassVo" javaType="java.util.List">
|
|
94
|
+ <result property="schoolid" column="schoolid"></result>
|
|
95
|
+ <result property="classid" column="classid"></result>
|
|
96
|
+ <result property="classname" column="classname"></result>
|
|
97
|
+ <result property="gradeid" column="gradeid"></result>
|
|
98
|
+ <result property="classnum" column="classnum"></result>
|
|
99
|
+ <result property="ytjnum" column="ytjnum"></result>
|
|
100
|
+ <result property="ypgnum" column="ypgnum"></result>
|
|
101
|
+ <result property="studentname" column="studentname"></result>
|
|
102
|
+ <result property="checkid" column="checkid"></result>
|
|
103
|
+ <result property="teachername" column="teachername"></result>
|
|
104
|
+ <result property="checked" column="checked"></result>
|
|
105
|
+ </collection>
|
101
|
106
|
</resultMap>
|
102
|
107
|
<!--<select id="listClass" resultMap="classResult">
|
103
|
108
|
select count(*)classnum,ps.classid,c.classname,c.gradeid,pg.checked
|
|
@@ -120,24 +125,45 @@
|
120
|
125
|
</select>-->
|
121
|
126
|
<!--本校作业班级-->
|
122
|
127
|
<select id="listClass" resultMap="classResult">
|
123
|
|
- select count(*) classnum,ps.classid,c.classname,c.gradeid
|
|
128
|
+ select count(*) classnum,ps.classid,c.classname,c.gradeid,c.schoolid,s.schoolname
|
124
|
129
|
,count(distinct case when ps.psstate!=0 then ps.psid else null end)ytjnum
|
125
|
130
|
,count(distinct case when ps.pschecked=1 then ps.psid else null end)ypgnum
|
126
|
131
|
from t_paper_student ps left join t_class c on ps.classid=c.classid
|
127
|
|
- where ps.paperid=#{paperid} and ps.classid in (${classids})
|
|
132
|
+ left join t_school s on c.schoolid = s.schoolid
|
|
133
|
+ where ps.paperid=#{paperid}
|
|
134
|
+ <if test="classids!=null and classids!=''">
|
|
135
|
+ and ps.classid in(${classids})
|
|
136
|
+ </if>
|
128
|
137
|
group by ps.classid order by c.gradeid,c.classtype,c.classorder
|
129
|
138
|
</select>
|
130
|
139
|
<!--本校作业班级批阅人-->
|
131
|
|
- <select id="listPaperCheckStu" resultType="java.util.Map">
|
|
140
|
+ <resultMap id="checkUserResult" type="java.util.Map">
|
|
141
|
+ <result property="schoolid" column="schoolid"></result>
|
|
142
|
+ <result property="schoolname" column="schoolname"></result>
|
|
143
|
+ <result property="checktype" column="checktype"></result>
|
|
144
|
+ <collection property="classes" ofType="java.util.Map" javaType="java.util.List">
|
|
145
|
+ <result property="schoolid" column="schoolid"></result>
|
|
146
|
+ <result property="classid" column="classid"></result>
|
|
147
|
+ <result property="classname" column="classname"></result>
|
|
148
|
+ <result property="gradeid" column="gradeid"></result>
|
|
149
|
+ <collection property="users" ofType="java.util.Map" javaType="java.util.List">
|
|
150
|
+ <result property="userid" column="userid"></result>
|
|
151
|
+ <result property="username" column="username"></result>
|
|
152
|
+ </collection>
|
|
153
|
+ </collection>
|
|
154
|
+ </resultMap>
|
|
155
|
+ <select id="listPaperCheckStu" resultMap="checkUserResult">
|
132
|
156
|
<if test="checktype==1">
|
133
|
|
- select pg.checkid userid,u.username,c.classid,c.classname,c.gradeid from t_paper_class pg
|
|
157
|
+ select pg.checkid userid,u.username,c.classid,c.classname,c.gradeid,pg.schoolid,s.schoolname
|
|
158
|
+ from t_paper_class pg left join t_school s on pg.schoolid=s.schoolid
|
134
|
159
|
left join t_user u on pg.checkid=u.userid
|
135
|
160
|
left join t_class c on pg.classid=c.classid
|
136
|
161
|
where pg.paperid=#{paperid} and pg.schoolid=#{logschoolid}
|
137
|
162
|
order by c.gradeid,c.classtype,c.classorder,convert(u.username using gbk)
|
138
|
163
|
</if>
|
139
|
164
|
<if test="checktype==3">
|
140
|
|
- select ps.checkid userid,u.username,c.classid,c.classname,c.gradeid from t_paper_student ps
|
|
165
|
+ select ps.checkid userid,u.username,c.classid,c.classname,c.gradeid,ps.schoolid,s.schoolname
|
|
166
|
+ from t_paper_student ps left join t_school s on ps.schoolid=s.schoolid
|
141
|
167
|
left join t_user u on ps.checkid=u.userid
|
142
|
168
|
left join t_class c on ps.classid=c.classid
|
143
|
169
|
where ps.paperid=#{paperid} and ps.schoolid=#{logschoolid}
|