<기능개선>

통합테스트목록 - {503}
FO/Views/CRoom/EstimationExam.cshtml
Dao/MyBatis/Maps/CRoom.xml - "cr.lectex"
This commit is contained in:
kdh0120 2021-11-09 23:53:57 +00:00
parent ed8de3ed36
commit bd794db687
2 changed files with 54 additions and 59 deletions

View File

@ -244,68 +244,63 @@
<select id="grade.lectgrades" parameterClass="hashtable" resultClass="lect">
select a.*
from (
select a.*
select a.lectno,b.userno
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">c.cname,c.cmno,u.username</isNull> ) rno
,count(a.lectno) over() pagetotalcount
,b.isrebate,ua.asname,u.username,u.userid,b.iscomplete,b.completetime,b.sdate,b.edate
,b.cmisno
,p.payoktime
,c.cshape,c.sstime,c.cmno,c.cname,c.classno
,d.isoffabs
,b.attrate
,a.apoint
,a.ex0cnt,a.ex0lectcnt,a.ex0lectpoint,a.mpoint
,a.ex1cnt,a.ex1lectcnt,a.ex1lectpoint,a.fpoint
,a.sd0cnt,a.sd0lectcnt,a.sd0lectpoint,a.spoint
,a.sd1cnt,a.sd1lectcnt,a.sd1lectpoint,a.dpoint
,a.rs0cnt,a.rs0lectcnt,a.rs0lectpoint
,a.ispassat
,e.sseq,e.estart,e.eend,e.studyplace
,f.istatus
,cc.cname studyplacename
,date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') edatestring
from (
select a.lectno,b.userno
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">c.cname,c.cmno,u.username</isNull> ) rno
,count(a.lectno) over() pagetotalcount
,b.isrebate,ua.asname,u.username,u.userid,b.iscomplete,b.completetime,b.sdate,b.edate
,b.cmisno
,p.payoktime
,c.cshape,c.sstime,c.cmno,c.cname,c.classno
,d.isoffabs
,b.attrate
,a.apoint
,a.ex0cnt,a.ex0lectcnt,a.ex0lectpoint,a.mpoint
,a.ex1cnt,a.ex1lectcnt,a.ex1lectpoint,a.fpoint
,a.sd0cnt,a.sd0lectcnt,a.sd0lectpoint,a.spoint
,a.sd1cnt,a.sd1lectcnt,a.sd1lectpoint,a.dpoint
,a.rs0cnt,a.rs0lectcnt,a.rs0lectpoint
,a.ispassat
,e.sseq,e.estart,e.eend,e.studyplace
,f.istatus
,cc.cname studyplacename
,date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') edatestring
from (
<include refid="grade.query"></include>
) a
inner join lect b on b.lectno=a.lectno
inner join pay p on p.payno=b.payno
inner join users u on u.userno=b.userno <isNotNull property="ustatus">and u.status=#ustatus#</isNotNull>
left outer join assign ua on ua.asno=u.asno
inner join cm c on c.cmno=b.cmno
inner join cm c2 on c2.cmno=c.pcmno
inner join cmev d on d.cmno=c.cmno
left outer join cminningscd e on e.cmisno = b.cmisno
left outer join lectinning f on f.lectno = b.lectno and f.cmino = e.cmino
left outer join comcode cc on cc.ccode = e.studyplace and cc.isuse=1
<dynamic prepend="where">
<isNotNull property="cshape" prepend="and">c.cshape = #cshape#</isNotNull>
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
<isNotNull property="est1not" prepend="and">a.ex0lectcnt &lt; a.ex0cnt</isNotNull>
<isNotNull property="est2not" prepend="and">a.ex1lectcnt &lt; a.ex1cnt</isNotNull>
<isNotNull property="est11not" prepend="and">a.sd0lectcnt &lt; a.sd0cnt</isNotNull>
<isNotNull property="est12not" prepend="and">a.sd1lectcnt &lt; a.sd1cnt</isNotNull>
<isNotNull property="est21not" prepend="and">a.rs0lectcnt &lt; a.rs0cnt</isNotNull>
<isNotNull property="cname" prepend="and">c2.cname like concat('%',#cname#,'%')</isNotNull>
<isNotNull property="cnamestr" prepend="and">c.cname like concat('%',#cnamestr#,'%')</isNotNull>
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull>
<isNotNull property="ispasss" prepend="and">((a.sd0cnt &gt; 0 and a.sd0lectcnt &gt; 0))</isNotNull>
<isNotNull property="ispassa" prepend="and">a.ispassa = #ispassa#</isNotNull>
<isNotNull property="ispassex" prepend="and">(a.ispassm = #ispassex# and a.ispassf = #ispassex#) </isNotNull>
<isNotNull property="usernamestr" prepend="and">u.username like concat('%',#usernamestr#,'%')</isNotNull>
<isNotNull property="useridstr" prepend="and">u.userid like concat('%',#useridstr#,'%')</isNotNull>
<isNotEmpty property="usernameid" prepend="and">(u.userid like concat('%',#usernameid#,'%') or u.username like concat('%',#usernameid#,'%') or u.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
<isNotEmpty property="sdateall" prepend="and">(case when c.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) &gt;= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
<isNotEmpty property="edateall" prepend="and">(case when c.cshape = 2 then e.eend else b.edate end) &lt;= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
<isNotNull property="asname" prepend="and">ua.asname like concat('%',#asname#,'%')</isNotNull>
</dynamic>
<include refid="grade.query"></include>
) a
inner join lect b on b.lectno=a.lectno
inner join pay p on p.payno=b.payno
inner join users u on u.userno=b.userno <isNotNull property="ustatus">and u.status=#ustatus#</isNotNull>
left outer join assign ua on ua.asno=u.asno
inner join cm c on c.cmno=b.cmno
inner join cm c2 on c2.cmno=c.pcmno
inner join cmev d on d.cmno=c.cmno
left outer join cminningscd e on e.cmisno = b.cmisno
left outer join lectinning f on f.lectno = b.lectno and f.cmino = e.cmino
left outer join comcode cc on cc.ccode = e.studyplace and cc.isuse=1
<dynamic prepend="where">
<isNotNull property="edate" prepend="and">a.edatestring = #edate#</isNotNull>
<isNotNull property="cshape" prepend="and">c.cshape = #cshape#</isNotNull>
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
<isNotNull property="est1not" prepend="and">a.ex0lectcnt &lt; a.ex0cnt</isNotNull>
<isNotNull property="est2not" prepend="and">a.ex1lectcnt &lt; a.ex1cnt</isNotNull>
<isNotNull property="est11not" prepend="and">a.sd0lectcnt &lt; a.sd0cnt</isNotNull>
<isNotNull property="est12not" prepend="and">a.sd1lectcnt &lt; a.sd1cnt</isNotNull>
<isNotNull property="est21not" prepend="and">a.rs0lectcnt &lt; a.rs0cnt</isNotNull>
<isNotNull property="cname" prepend="and">c2.cname like concat('%',#cname#,'%')</isNotNull>
<isNotNull property="cnamestr" prepend="and">c.cname like concat('%',#cnamestr#,'%')</isNotNull>
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull>
<isNotNull property="ispasss" prepend="and">((a.sd0cnt &gt; 0 and a.sd0lectcnt &gt; 0))</isNotNull>
<isNotNull property="ispassa" prepend="and">a.ispassa = #ispassa#</isNotNull>
<isNotNull property="ispassex" prepend="and">(a.ispassm = #ispassex# and a.ispassf = #ispassex#) </isNotNull>
<isNotNull property="usernamestr" prepend="and">u.username like concat('%',#usernamestr#,'%')</isNotNull>
<isNotNull property="useridstr" prepend="and">u.userid like concat('%',#useridstr#,'%')</isNotNull>
<isNotEmpty property="usernameid" prepend="and">(u.userid like concat('%',#usernameid#,'%') or u.username like concat('%',#usernameid#,'%') or u.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
<isNotEmpty property="sdateall" prepend="and">(case when c.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) &gt;= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
<isNotEmpty property="edateall" prepend="and">(case when c.cshape = 2 then e.eend else b.edate end) &lt;= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
<isNotNull property="asname" prepend="and">ua.asname like concat('%',#asname#,'%')</isNotNull>
<isNotNull property="edate" prepend="and">date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
</dynamic>
) a
) a
<include refid="sql.pagedynamic"></include>
order by a.rno
</select>

View File

@ -70,7 +70,7 @@
}
}
function showexam() {
if (@Model.LectEX.ispass == 1) {
if (@Model.LectEX.ispass == 0) {
msg("수료기준을 통과하지 못하여 비공개처리되었습니다.");
} else {
//응시결과창