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 3b4857a..f22bbb3 100644 Binary files a/Model/bin/Debug/NP.Model.dll and b/Model/bin/Debug/NP.Model.dll differ diff --git a/Model/bin/Debug/NP.Model.pdb b/Model/bin/Debug/NP.Model.pdb index 098b802..6f213bb 100644 Binary files a/Model/bin/Debug/NP.Model.pdb and b/Model/bin/Debug/NP.Model.pdb differ diff --git a/Model/obj/Debug/Model.csproj.FileListAbsolute.txt b/Model/obj/Debug/Model.csproj.FileListAbsolute.txt index ac12581..42eeac8 100644 --- a/Model/obj/Debug/Model.csproj.FileListAbsolute.txt +++ b/Model/obj/Debug/Model.csproj.FileListAbsolute.txt @@ -3,3 +3,4 @@ D:\Project\git\git_YNICTE\Model\bin\Debug\NP.Model.pdb D:\Project\git\git_YNICTE\Model\obj\Debug\Model.csproj.CoreCompileInputs.cache D:\Project\git\git_YNICTE\Model\obj\Debug\NP.Model.dll D:\Project\git\git_YNICTE\Model\obj\Debug\NP.Model.pdb +D:\Project\git\git_YNICTE\Model\obj\Debug\Model.csproj.AssemblyReference.cache diff --git a/Model/obj/Debug/NP.Model.dll b/Model/obj/Debug/NP.Model.dll index 3b4857a..f22bbb3 100644 Binary files a/Model/obj/Debug/NP.Model.dll and b/Model/obj/Debug/NP.Model.dll differ diff --git a/Model/obj/Debug/NP.Model.pdb b/Model/obj/Debug/NP.Model.pdb index 098b802..6f213bb 100644 Binary files a/Model/obj/Debug/NP.Model.pdb and b/Model/obj/Debug/NP.Model.pdb differ