From 3e50bf5cc35ca658e910a84288e9b693c1aac754 Mon Sep 17 00:00:00 2001 From: lch Date: Tue, 29 Jun 2021 05:29:08 +0000 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EA=B0=95=EC=A4=91=EC=9D=B8=20?= =?UTF-8?q?=EA=B3=BC=EC=A0=95=20=EC=A0=95=EB=A0=AC=20=EA=B8=B0=EC=A4=80=20?= =?UTF-8?q?=EC=9E=AC=EC=A0=95=EC=9D=98=201.=20=EC=98=A4=ED=94=84=EB=9D=BC?= =?UTF-8?q?=EC=9D=B8:=20=ED=95=99=EC=8A=B5=EC=9E=90=EB=B3=84=20=EA=B5=90?= =?UTF-8?q?=EC=9C=A1=EA=B8=B0=EA=B0=84=20=20/=20=EC=98=A8=EB=9D=BC?= =?UTF-8?q?=EC=9D=B8:=20=EC=9E=85=EA=B8=88=EC=99=84=EB=A3=8C=EC=9D=BC~?= =?UTF-8?q?=EC=A7=91=EC=B2=B4=EA=B5=90=EC=9C=A1=EC=9D=BC=20=20-=20?= =?UTF-8?q?=EC=A7=84=ED=96=89=EC=A4=91=EC=9D=B8=20=EA=B3=BC=EC=A0=95?= =?UTF-8?q?=EB=A7=8C=20=EC=B6=9C=EB=A0=A5=202.=20=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EC=88=9C=EC=84=9C=20=201)=20=EC=A2=85=EB=A3=8C=EC=9D=BC=20(?= =?UTF-8?q?=EA=B5=90=EC=9C=A1=EA=B8=B0=EA=B0=84=20=EC=A2=85=EB=A3=8C?= =?UTF-8?q?=EC=9D=BCor=EC=A7=91=EC=B2=B4=EA=B5=90=EC=9C=A1=EC=9D=BC)=20?= =?UTF-8?q?=EB=82=B4=EB=A6=BC=EC=B0=A8=EC=88=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dao/MyBatis/Maps/Lect.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 532004b..431c94f 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -1135,12 +1135,14 @@ ,case when a.edate is null then b.setime else a.edate end as time2 ,d.estart time3,d.eend time4 ,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 - inner join cm b on b.cmno=a.cmno and b.sstime < + inner join cm b on b.cmno=a.cmno inner join term c on c.tmno=b.tmno left outer join cminningscd d on a.cmisno = d.cmisno 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) < + order by case when time2 > now() then 1 else 0 end desc ,sortedate desc, time2 desc ) a union all 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 ,cc.ccode studyplace ,cc.cname studyplacename + ,case when scd.eend is not null then scd.eend else a.edate end as sortedate from lect a inner join cm b on b.cmno=a.cmno @@ -1322,6 +1325,7 @@ ,null estart, null eend ,null studyplace ,null studyplacename + ,a.edate as sortedate from pay e 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 < @@ -1343,6 +1347,7 @@ ,null estart, null eend ,null studyplace ,null studyplacename + ,a.edate as sortedate 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 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 where a0.userno=#userno# and a0.status=1 and a0.ischanged=0 and b.cshape=#cshape# - 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