수강중인 과정 정렬 기준 재정의
1. 오프라인: 학습자별 교육기간 / 온라인: 입금완료일~집체교육일 - 진행중인 과정만 출력 2. 정렬 순서 1) 종료일 (교육기간 종료일or집체교육일) 내림차순
This commit is contained in:
parent
17f1f92a7c
commit
3e50bf5cc3
|
|
@ -1135,12 +1135,14 @@
|
||||||
,case when a.edate is null then b.setime else a.edate end as time2
|
,case when a.edate is null then b.setime else a.edate end as time2
|
||||||
,d.estart time3,d.eend time4
|
,d.estart time3,d.eend time4
|
||||||
,row_number() over(order by b.setime desc) rno
|
,row_number() over(order by b.setime desc) rno
|
||||||
|
,case when d.eend is not null then d.eend else a.edate end as sortedate
|
||||||
from lect a
|
from lect a
|
||||||
inner join cm b on b.cmno=a.cmno and b.sstime < <include refid="sql.now"></include>
|
inner join cm b on b.cmno=a.cmno
|
||||||
inner join term c on c.tmno=b.tmno
|
inner join term c on c.tmno=b.tmno
|
||||||
left outer join cminningscd d on a.cmisno = d.cmisno
|
left outer join cminningscd d on a.cmisno = d.cmisno
|
||||||
where a.userno=#userno# and a.status=1 and a.ischanged=0
|
where a.userno=#userno# and a.status=1 and a.ischanged=0
|
||||||
order by case when time2 > now() then 1 else 0 end desc , time2 desc
|
and (case when a.sdate is null then b.sstime else a.sdate end) < <include refid="sql.now"></include>
|
||||||
|
order by case when time2 > now() then 1 else 0 end desc ,sortedate desc, time2 desc
|
||||||
) a
|
) a
|
||||||
union all
|
union all
|
||||||
select a.dtype,a.intval,a.intval2,a.intval3,a.intval4,a.intval5,a.intval6,a.intval7,a.intval8
|
select a.dtype,a.intval,a.intval2,a.intval3,a.intval4,a.intval5,a.intval6,a.intval7,a.intval8
|
||||||
|
|
@ -1298,6 +1300,7 @@
|
||||||
,scd.estart,scd.eend
|
,scd.estart,scd.eend
|
||||||
,cc.ccode studyplace
|
,cc.ccode studyplace
|
||||||
,cc.cname studyplacename
|
,cc.cname studyplacename
|
||||||
|
,case when scd.eend is not null then scd.eend else a.edate end as sortedate
|
||||||
from lect a
|
from lect a
|
||||||
inner join cm b on b.cmno=a.cmno <!--and b.sstime < <include refid="sql.now"></include>-->
|
inner join cm b on b.cmno=a.cmno <!--and b.sstime < <include refid="sql.now"></include>-->
|
||||||
<!--inner join cm pc on pc.cmno=case when a.ispc=1 then a.pcno else a.cmno end and pc.sstime < <include refid="sql.now"></include>-->
|
<!--inner join cm pc on pc.cmno=case when a.ispc=1 then a.pcno else a.cmno end and pc.sstime < <include refid="sql.now"></include>-->
|
||||||
|
|
@ -1322,6 +1325,7 @@
|
||||||
,null estart, null eend
|
,null estart, null eend
|
||||||
,null studyplace
|
,null studyplace
|
||||||
,null studyplacename
|
,null studyplacename
|
||||||
|
,a.edate as sortedate
|
||||||
from pay e
|
from pay e
|
||||||
inner join lect a on a.payno=e.payno and a.status=1 and a.ischanged=0
|
inner join lect a on a.payno=e.payno and a.status=1 and a.ischanged=0
|
||||||
inner join cm b on b.cmno=a.cmno and b.sstime < <include refid="sql.now"></include>
|
inner join cm b on b.cmno=a.cmno and b.sstime < <include refid="sql.now"></include>
|
||||||
|
|
@ -1343,6 +1347,7 @@
|
||||||
,null estart, null eend
|
,null estart, null eend
|
||||||
,null studyplace
|
,null studyplace
|
||||||
,null studyplacename
|
,null studyplacename
|
||||||
|
,a.edate as sortedate
|
||||||
from lect a0
|
from lect a0
|
||||||
inner join pay e on e.payno=a0.payno and e.isgroup=1 and e.userno<>#userno# and e.pstatus=1
|
inner join pay e on e.payno=a0.payno and e.isgroup=1 and e.userno<>#userno# and e.pstatus=1
|
||||||
inner join lect a on a.payno=e.payno and a.status=1 and a.ischanged=0
|
inner join lect a on a.payno=e.payno and a.status=1 and a.ischanged=0
|
||||||
|
|
@ -1353,7 +1358,7 @@
|
||||||
left outer join assign ua on ua.asno=u.asno
|
left outer join assign ua on ua.asno=u.asno
|
||||||
where a0.userno=#userno# and a0.status=1 and a0.ischanged=0
|
where a0.userno=#userno# and a0.status=1 and a0.ischanged=0
|
||||||
<isNotNull property="cshape">and b.cshape=#cshape#</isNotNull>
|
<isNotNull property="cshape">and b.cshape=#cshape#</isNotNull>
|
||||||
order by case when setime < now() then 0 else 1 end desc,setime desc,payno
|
order by case when setime < now() then 0 else 1 end desc,sortedate desc, edate desc,payno
|
||||||
</select>
|
</select>
|
||||||
<select id="lect.myexams" parameterClass="hashtable" resultClass="examuser">
|
<select id="lect.myexams" parameterClass="hashtable" resultClass="examuser">
|
||||||
select a.exno,a.userno,a.status,a.payno,a.pino,a.pstatus,a.epoint1,a.epoint2,a.epoint3,a.avrg,a.ispass,a.certdate,a.certindate
|
select a.exno,a.userno,a.status,a.payno,a.pino,a.pstatus,a.epoint1,a.epoint2,a.epoint3,a.avrg,a.ispass,a.certdate,a.certindate
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue