From ed5ed86f125e88511e2931ff4cf5430822fbe025 Mon Sep 17 00:00:00 2001 From: KimHanJin Date: Tue, 6 Jan 2026 08:58:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EA=B0=80=EA=B0=9C=EB=B0=9C01/06=5F1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Views/croom/gradeall0.cshtml | 2 +- Base/Controller/ACommonCRoom.cs | 3 +- Dao/MyBatis/Maps/Grade.xml | 219 +++++++++++++++--- Dao/MyBatis/Maps/Lect.xml | 147 ++++++------ Dao/bin/Debug/MyBatis/Maps/Grade.xml | 219 +++++++++++++++--- Dao/bin/Debug/MyBatis/Maps/Lect.xml | 147 ++++++------ Dao/bin/Debug/NP.Model.dll | Bin 468480 -> 468480 bytes Dao/bin/Debug/NP.Model.pdb | Bin 1353216 -> 1353216 bytes FO/Views/CRoom/Estimation.cshtml | 12 +- Model/bin/Debug/NP.Model.dll | Bin 468480 -> 468480 bytes Model/bin/Debug/NP.Model.pdb | Bin 1353216 -> 1353216 bytes .../Debug/Model.csproj.FileListAbsolute.txt | 1 + Model/obj/Debug/NP.Model.dll | Bin 468480 -> 468480 bytes Model/obj/Debug/NP.Model.pdb | Bin 1353216 -> 1353216 bytes 14 files changed, 543 insertions(+), 207 deletions(-) diff --git a/BO/Views/croom/gradeall0.cshtml b/BO/Views/croom/gradeall0.cshtml index 25daadf..6b1b0f0 100644 --- a/BO/Views/croom/gradeall0.cshtml +++ b/BO/Views/croom/gradeall0.cshtml @@ -94,7 +94,7 @@ } @*최종평가*@ - @(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString()) + @(d.ex1cnt < 1 ? "-" : d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString()) @*과제*@ @(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString()) diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index a316a26..1fb8c51 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -516,7 +516,8 @@ namespace NP.Base.Controllers { try { - var ispass = Dao.Get("grade.ispass", new Hashtable() { { "lectno", lect.lectno } }).FirstOrDefault().ispass; + //var ispass = Dao.Get("grade.ispass", new Hashtable() { { "lectno", lect.lectno } }).FirstOrDefault().ispass; + var ispass = Dao.Get("grade.ispass2", new Hashtable() { { "lectno", lect.lectno } }).FirstOrDefault().ispass; if (ispass == 1) { if (lect.iscomplete == 0) diff --git a/Dao/MyBatis/Maps/Grade.xml b/Dao/MyBatis/Maps/Grade.xml index 88a83e5..eb2ff97 100644 --- a/Dao/MyBatis/Maps/Grade.xml +++ b/Dao/MyBatis/Maps/Grade.xml @@ -81,36 +81,39 @@ left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno group by a.lectno union all - select a.lectno - ,0,0,0 - ,count(b.exno),count(c.lectno),avg(ifnull(c.tpoint,0) / b.tpoint * 100) - ,0,0,0 - ,0,0,0 - ,0,0,0 - ,0,0 - from ( - select b.lectno,a.cmno - from cm a - inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0 - and b.lectno=#lectno# - and b.userno=#userno# - and b.attrate <= #attrateunder# - and b.isrebate=#isrebate# - and b.lectno in ($lectnos$) - inner join users c on c.userno=b.userno and c.status < 99 - and c.userid=#userid# - and c.username=#username# - where a.ismaster=0 - and a.cgno=#cgno# - and a.tmno=#tmno# - and a.cmno=#cmno# - and a.cmno in ($cmnos$) - and a.cshape in ($cshapes$) - and a.isdel=0 - ) a - left outer join cmex b on b.cmno=a.cmno and b.extype=1 and b.isdel=0 - left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno - group by a.lectno + + select * + from ( + select a.lectno + ,0 ex0cnt,0 ex0lectcnt,0 ex0lectpoint,count(b.exno) ex1cnt,count(c.lectno) ex1lectcnt,avg(ifnull(c.tpoint, 0) / b.tpoint * 100) ex1lectpoint,0 sd0cnt + ,0 sd0lectcnt,0 sd0lectpoint,0 sd1cnt,0 sd1lectcnt,0 sd1lectpoint,0 rs0cnt,0 rs0lectcnt,0 rs0lectpoint,0 at0cnt,0 at0lectcnt + ,row_number() OVER (PARTITION BY a.lectno ORDER BY (c.estart IS NOT NULL) DESC) rn + from ( + select b.lectno,a.cmno + from cm a + inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0 + and b.lectno=#lectno# + and b.userno=#userno# + and b.attrate <= #attrateunder# + and b.isrebate=#isrebate# + and b.lectno in ($lectnos$) + inner join users c on c.userno=b.userno and c.status < 99 + and c.userid=#userid# + and c.username=#username# + where a.ismaster=0 + and a.cgno=#cgno# + and a.tmno=#tmno# + and a.cmno=#cmno# + and a.cmno in ($cmnos$) + and a.cshape in ($cshapes$) + and a.isdel=0 + ) a + left outer join cmex b on b.cmno=a.cmno and b.extype=1 and b.isdel=0 + left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno + GROUP BY a.lectno,b.exno + ) a + where a.rn = 1 + union all select a.lectno ,0,0,0 @@ -1021,6 +1024,24 @@ LEFT JOIN cmsd sd ON sd.cmno = fl.cmno AND sd.isdel = 0 LEFT JOIN lectsd lsd ON lsd.lectno = fl.lectno AND lsd.sdno = sd.sdno LEFT JOIN cmrs rs ON rs.cmno = fl.cmno AND rs.rstype = 0 AND rs.isdel = 0 LEFT JOIN lectrs lrs ON lrs.lectno = fl.lectno AND lrs.rsno = rs.rsno LEFT JOIN cminning ci ON ci.cmno = fl.cmno AND ci.isonline = 0 AND ci.isscd = 1 LEFT JOIN lectinning li ON li.cmino = ci.cmino AND li.lectno = fl.lectno AND li.istatus = 2 + GROUP BY fl.lectno, fl.cmno, fl.isrebate, fl.attrate + + UNION ALL + + SELECT + fl.lectno, fl.cmno, fl.isrebate, fl.attrate + , COUNT(DISTINCT CASE WHEN ex.extype = 0 THEN ex.exno END) AS ex0cnt, COUNT(DISTINCT CASE WHEN ex.extype = 0 THEN lex.lectno END) AS ex0lectcnt, AVG(CASE WHEN ex.extype = 0 AND ex.tpoint > 0 THEN IFNULL(lex.tpoint, 0) / ex.tpoint * 100 ELSE 0 END) AS ex0lectpoint + , COUNT(DISTINCT CASE WHEN ex.extype = 1 THEN ex.exno END) AS ex1cnt, COUNT(DISTINCT CASE WHEN ex.extype = 1 THEN lex.lectno END) AS ex1lectcnt, AVG(CASE WHEN ex.extype = 1 AND ex.tpoint > 0 THEN IFNULL(lex.tpoint, 0) / ex.tpoint * 100 ELSE 0 END) AS ex1lectpoint + , COUNT(DISTINCT CASE WHEN sd.sdtype = 0 THEN sd.sdno END) AS sd0cnt, COUNT(DISTINCT CASE WHEN sd.sdtype = 0 THEN lsd.lectno END) AS sd0lectcnt, AVG(CASE WHEN sd.sdtype = 0 AND sd.tpoint > 0 THEN IFNULL(lsd.cpoint, 0) / sd.tpoint * 100 ELSE 0 END) AS sd0lectpoint + , COUNT(DISTINCT CASE WHEN sd.sdtype = 1 THEN sd.sdno END) AS sd1cnt, COUNT(DISTINCT CASE WHEN sd.sdtype = 1 THEN lsd.lectno END) AS sd1lectcnt, AVG(CASE WHEN sd.sdtype = 1 AND sd.tpoint > 0 THEN IFNULL(lsd.cpoint, 0) / sd.tpoint * 100 ELSE 0 END) AS sd1lectpoint + , COUNT(DISTINCT CASE WHEN rs.rstype = 0 THEN rs.rsno END) AS rs0cnt, COUNT(DISTINCT CASE WHEN rs.rstype = 0 THEN lrs.lectno END) AS rs0lectcnt + , COUNT(DISTINCT ci.cmino) AS at0cnt, COUNT(DISTINCT li.lectno) AS at0lectcnt + FROM filtered_lect fl + LEFT JOIN cmex ex ON ex.cmno = fl.cmno AND ex.isdel = 0 LEFT JOIN lectex lex ON lex.lectno = fl.lectno AND lex.exno = ex.exno + LEFT JOIN cmsd sd ON sd.cmno = fl.cmno AND sd.isdel = 0 LEFT JOIN lectsd lsd ON lsd.lectno = fl.lectno AND lsd.sdno = sd.sdno + LEFT JOIN cmrs rs ON rs.cmno = fl.cmno AND rs.rstype = 0 AND rs.isdel = 0 LEFT JOIN lectrs lrs ON lrs.lectno = fl.lectno AND lrs.rsno = rs.rsno + LEFT JOIN cminning ci ON ci.cmno = fl.cmno AND ci.isonline = 0 AND ci.isscd = 1 LEFT JOIN lectinning li ON li.cmino = ci.cmino AND li.lectno = fl.lectno AND li.istatus = 2 + WHERE ex.cmisno > 0 GROUP BY fl.lectno, fl.cmno, fl.isrebate, fl.attrate ), final_scores AS ( @@ -1086,6 +1107,7 @@ LEFT OUTER JOIN comcode tg ON tg.ccode = ppl.typegrade LEFT OUTER JOIN comcode tj ON tj.ccode = ppl.typejob WHERE 1=1 + AND fs.ex1cnt < 2 @@ -1989,6 +2011,143 @@ a.lectno = #lectno# + + diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index d35909d..c826ab6 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -1125,80 +1125,85 @@ order by a.rno + + diff --git a/Dao/bin/Debug/MyBatis/Maps/Lect.xml b/Dao/bin/Debug/MyBatis/Maps/Lect.xml index 5b7e46c..cb770c3 100644 --- a/Dao/bin/Debug/MyBatis/Maps/Lect.xml +++ b/Dao/bin/Debug/MyBatis/Maps/Lect.xml @@ -1125,80 +1125,85 @@ order by a.rno @* diff --git a/Model/bin/Debug/NP.Model.dll b/Model/bin/Debug/NP.Model.dll index 3b4857a6ccd785b9cf64ea18ff89601f8b473fb8..f22bbb3d1d58e53a209eb2952d0803a9cbbb6c87 100644 GIT binary patch delta 111 zcmZoTBhzq3Wt=&wm-OR1sEUn$Ft=()}yV(QT1uPbKwYhDW;?#aF zaq1!uo)_ESu(NlF>Hzg*G5`S+5X&$!F!WfnGxW%^GXw>@1WPxi%lO%B^615tXZ1F%@mlwGw#}=! M(3tHDWZ4rq0EKxbB>(^b diff --git a/Model/bin/Debug/NP.Model.pdb b/Model/bin/Debug/NP.Model.pdb index 098b802f3de37ed828db3339214d31373fe716bb..6f213bb9c6c14d598f7c39c44593de8f4561c602 100644 GIT binary patch delta 171 zcmZoT6Vz}fXaftE#NJ8KnT!k!4AM>MGJZCjJo3-y($+1 zoXi*`JTXAF*&(FeA%qc#nShuXh*^M`6^Pk@m>q~YfS41Axqz4(h-A* bfLIWSg@9OiyF-Y`5mB5@*e;VL^28bd?x8xu delta 171 zcmZoT6Vz}fXaftEL`-0KCL;p_!>jPAXZ1F%@mlwGw#}=!(3s6KTyH!%t=&wm-OR1sEUn$Ft=()}yV(QT1uPbKwYhDW;?#aF zaq1!uo)_ESu(NlF>Hzg*G5`S+5X&$!F!WfnGxW%^GXw>@1WPxi%lO%B^615tXZ1F%@mlwGw#}=! M(3tHDWZ4rq0EKxbB>(^b diff --git a/Model/obj/Debug/NP.Model.pdb b/Model/obj/Debug/NP.Model.pdb index 098b802f3de37ed828db3339214d31373fe716bb..6f213bb9c6c14d598f7c39c44593de8f4561c602 100644 GIT binary patch delta 171 zcmZoT6Vz}fXaftE#NJ8KnT!k!4AM>MGJZCjJo3-y($+1 zoXi*`JTXAF*&(FeA%qc#nShuXh*^M`6^Pk@m>q~YfS41Axqz4(h-A* bfLIWSg@9OiyF-Y`5mB5@*e;VL^28bd?x8xu delta 171 zcmZoT6Vz}fXaftEL`-0KCL;p_!>jPAXZ1F%@mlwGw#}=!(3s6KTyH!%