From 04d24fe4530c9a37d13f767c17054b92c58f6f11 Mon Sep 17 00:00:00 2001 From: jity7777 Date: Wed, 8 Feb 2023 00:45:00 +0000 Subject: [PATCH] =?UTF-8?q?<=EA=B8=B0=EB=8A=A5=EA=B0=9C=EC=84=A0>=201.=20P?= =?UTF-8?q?MS=20NO=20:=202.=20(=EC=A3=BC=EC=9A=94)=EC=9E=91=EC=97=85?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20(1)=20=EA=B3=BC=EC=A0=9C,=EC=B5=9C?= =?UTF-8?q?=EC=A2=85=ED=8F=89=EA=B0=80,=EC=B6=9C=EA=B2=B0=20lect=EC=9D=98?= =?UTF-8?q?=20=EA=B0=81=20point=EC=97=90=20=EC=83=81=EB=8C=80=20=EC=A0=90?= =?UTF-8?q?=EC=88=98=20=EA=B8=B0=EB=A1=9D=20=EB=B0=8F=20=EC=84=B1=EC=A0=81?= =?UTF-8?q?=EC=B2=98=EB=A6=AC(=EC=A0=84=EC=B2=B4=20=ED=8F=AC=ED=95=A8)?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EB=B0=98=EC=98=81=20=EC=BF=BC?= =?UTF-8?q?=EB=A6=AC=20=EA=B0=9C=EC=84=A0=20(=EC=9D=BC=EA=B4=84=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Controllers/croomController.cs | 21 +++- BO/Views/cm/cmregeduschedule.cshtml | 4 +- BO/Views/croom/attscds.cshtml | 2 +- BO/Views/croom/grade0.cshtml | 6 +- BO/Views/croom/grade4.cshtml | 72 ++++++------ BO/Views/croom/gradeall0.cshtml | 121 ++++++++++---------- Base/Controller/ACommonCRoom.cs | 40 ++++++- Dao/MyBatis/Maps/Attend.xml | 42 ++++++- Dao/MyBatis/Maps/CM.xml | 15 +-- Dao/MyBatis/Maps/CRoom.xml | 6 +- Dao/MyBatis/Maps/Grade.xml | 166 ++++++++++++++++++++++++++++ Dao/MyBatis/Maps/Lect.xml | 41 ++++++- FO/Web.config | 4 +- Model/CM.cs | 17 +-- 14 files changed, 424 insertions(+), 133 deletions(-) diff --git a/BO/Controllers/croomController.cs b/BO/Controllers/croomController.cs index 0d3ffb7..0b2d80b 100644 --- a/BO/Controllers/croomController.cs +++ b/BO/Controllers/croomController.cs @@ -620,8 +620,16 @@ namespace NP.BO.Controllers if (searchCheck) { - vm.Lects = Dao.Get("grade.lectgradesToAll", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); - //vm.Lects = Dao.Get("grade.lectgrades", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); + if (SUserInfo.UserNo != 27460) + { + vm.Lects = Dao.Get("grade.lectgradesToAll", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); + //vm.Lects = Dao.Get("grade.lectgrades", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); + } + else + { + vm.Lects = Dao.Get("grade.lectgradesToAll2", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); + } + } else { @@ -777,7 +785,14 @@ namespace NP.BO.Controllers //ht.Add("ustatus", 1); ht.Add("orderby", "ua.asname,ua.asno,u.username"); - vm.Lects = Dao.Get("grade.lectgradesToAll", ht); + if (SUserInfo.UserNo != 27460) + { + vm.Lects = Dao.Get("grade.lectgradesToAll", ht); + } + else + { + vm.Lects = Dao.Get("grade.lectgradesToAll2", ht); + } if (vm.isexceldown == 1) { return ExportExcel( diff --git a/BO/Views/cm/cmregeduschedule.cshtml b/BO/Views/cm/cmregeduschedule.cshtml index af2605c..84b3a8c 100644 --- a/BO/Views/cm/cmregeduschedule.cshtml +++ b/BO/Views/cm/cmregeduschedule.cshtml @@ -78,7 +78,7 @@ 교육장소 교육종료일 제한인원 - 등록인원 + 등록인원(완료/대기) 최근수정일 @@ -93,7 +93,7 @@ @item.studyplacename @item.estart ~ @item.eend @item.quotastr - @item.regmem + @item.regmem / @item.zstring0 @item.udt } diff --git a/BO/Views/croom/attscds.cshtml b/BO/Views/croom/attscds.cshtml index daf4da5..725c660 100644 --- a/BO/Views/croom/attscds.cshtml +++ b/BO/Views/croom/attscds.cshtml @@ -60,7 +60,7 @@ @Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } }) 출석처리 결석처리 - 미입력처리 + 미입력처리 엑셀 다운로드
diff --git a/BO/Views/croom/grade0.cshtml b/BO/Views/croom/grade0.cshtml index 5a83690..1673889 100644 --- a/BO/Views/croom/grade0.cshtml +++ b/BO/Views/croom/grade0.cshtml @@ -180,7 +180,11 @@ { [10] @d.istatusname } - [11] @(d.rs0lectcnt) / @(d.rs0cnt) + + [11] @(d.rs0cnt == 0 ? 0 : 1) / @(d.rs0cnt == 0 ? 0 :(d.rs0cnt/ d.rs0cnt)) + | + @(d.rs0lectcnt) / @(d.rs0cnt) + @if (!ViewBag.IsSubAdmin96) { [12] @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename) diff --git a/BO/Views/croom/grade4.cshtml b/BO/Views/croom/grade4.cshtml index 4a45d21..27be259 100644 --- a/BO/Views/croom/grade4.cshtml +++ b/BO/Views/croom/grade4.cshtml @@ -97,42 +97,42 @@

개별 과제제출 내용닫기


@*
제목
*@ - - - - - - - - - - - - - - - - - - - - - - - - - -
제출자
제출내용
첨부파일 - -
-
-
점수
피드백
참고사항
+ + + + + + + + + + + + + + + + + + + + + + + + + +
제출자
제출내용
첨부파일 + +
+
+
점수
피드백
참고사항



◀이전 diff --git a/BO/Views/croom/gradeall0.cshtml b/BO/Views/croom/gradeall0.cshtml index da5c782..dff9e3e 100644 --- a/BO/Views/croom/gradeall0.cshtml +++ b/BO/Views/croom/gradeall0.cshtml @@ -50,71 +50,72 @@ @foreach (var d in Model.Lects) { - - - @d.rnorvt - @if (d.cshape == 2) + + + @d.rnorvt + @if (d.cshape == 2) + { + @d.sseq + } + else + { + - + } + @d.isrebatename + @d.asname + @d.studyplacename + @d.cname + @d.username + @d.userid + @d.mobile + @((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString()) + @if (d.cshape > 0) + { + if (d.iscomplete != 1) { - @d.sseq + @d.eend.ToShortDateString() } else { - - + @d.eend.ToShortDateString() } - @d.isrebatename - @d.asname - @d.studyplacename - @d.cname - @d.username - @d.userid - @d.mobile - @((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString()) - @if (d.cshape > 0) - { - if (d.iscomplete != 1) - { - @d.eend.ToShortDateString() - } - else - { - @d.eend.ToShortDateString() - } - } - else - { - @d.edate.Value.ToShortDateString() - } - @if (!ViewBag.IsSubAdmin96) - { - @d.attrate % - } - else - { - @d.attrate % - } - @*@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.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()) - @( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString()) - @(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString()) - @if (d.isoffabs == 1) - { - @d.istatusname - } - else - { - - - } - @(d.rs0lectcnt) / @(d.rs0cnt) - @if (!ViewBag.IsSubAdmin96) - { - @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename) - } - else - { - @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename) - } - + } + else + { + @d.edate.Value.ToShortDateString() + } + @if (!ViewBag.IsSubAdmin96) + { + @d.attrate % + } + else + { + @d.attrate % + } + @*@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.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()) + @( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString()) + @(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString()) + @if (d.isoffabs == 1) + { + @d.istatusname + } + else + { + - + } + @*@(d.rs0lectcnt) / @(d.rs0cnt)*@ + @(d.rs0lectcnt > 0 ? 1 : 0) / @(d.rs0cnt > 0 ? 1 : 0) + @if (!ViewBag.IsSubAdmin96) + { + @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename) + } + else + { + @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename) + } + } diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index 10ae51e..4793581 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -609,6 +609,7 @@ namespace NP.Base.Controllers [HttpPost] public JsonResult offattscdsave(int istatus,String userinfos, int attr = -999) { + bool attrUpdateCheck = false; // 데이터 처리여부 var lectnos = ""; var cmi = new CMInning() { Ds = new List() { }, uno = SUserInfo.UserNo, uip = GetUserIP() }; if (string.IsNullOrEmpty(userinfos)) @@ -639,13 +640,43 @@ namespace NP.Base.Controllers cmi.uip = GetUserIP(); cmi.zstring0 = attr.ToString(); - if (attr == 2) + switch(attr) { - return JsonOK(Dao.Save("att.scd.nowdate", cmi)); + case 0: + // 결석처리 + cmi.istatus = attr; + attrUpdateCheck = true; + break; + case 1: + // 미입력처리 + cmi.istatus = null; + attrUpdateCheck = true; + break; + case 2: + // 출석처리 + cmi.istatus = attr; + attrUpdateCheck = true; + break; + default: + // 결석처리 + attrUpdateCheck = false; + break; + } + + if (attrUpdateCheck) + { + if(attr == 2) + { + return JsonOK(Dao.Save("att.scd.setattr", cmi)); + } + else + { + return JsonOK(Dao.Save("att.scd.setattrnull", cmi)); + } } else { - return JsonOK(Dao.Save("att.scd.attrnull", cmi)); + return JsonOK(0); } } else @@ -901,7 +932,8 @@ namespace NP.Base.Controllers [HttpPost] public JsonResult LectSDSaveToAdmin(LectSD d) { - d.uno = SUserInfo.UserNo; d.uip = GetUserIP(); + d.uno = SUserInfo.UserNo; + d.uip = GetUserIP(); d.isproduct = GetConfig("isstaging") == "1" ? (int?)null : 1; if (Request.Files.GetMultiple("fgno").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) { diff --git a/Dao/MyBatis/Maps/Attend.xml b/Dao/MyBatis/Maps/Attend.xml index a5a7056..55b60d3 100644 --- a/Dao/MyBatis/Maps/Attend.xml +++ b/Dao/MyBatis/Maps/Attend.xml @@ -127,7 +127,43 @@ ,a.ispce=case when a.ispce is null then 1 else a.ispce end; - + + insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,) + select a.lectno,b.cmino,0,,,#istatus#,,null,#uno#, + from lect a + inner join cminning b on b.cmno=a.cmno + left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino + where a.lectno in ($lectnos$) and a.status=1 and b.isonline = 0 and b.isscd = 1 and a.ischanged=0 and c.lectno is null; + + update lectinning lni + inner join lect l on lni.lectno = l.lectno + inner join cminning cmi on lni.cmino = cmi.cmino + inner join ( + select #Ds[].lectno# lectno,#Ds[].cmino# cmino,#Ds[].istatus# istatus + ) a on lni.lectno = a.lectno and lni.cmino = a.cmino + set lni.stime=now(),lni.etime=now(), lni.istatus = #istatus# + where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1; + + + + insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,) + select a.lectno,b.cmino,0,null,null,#istatus#,,null,#uno#, + from lect a + inner join cminning b on b.cmno=a.cmno + left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino + where a.lectno in ($lectnos$) and a.status=1 and b.isonline = 0 and b.isscd = 1 and a.ischanged=0 and c.lectno is null; + + update lectinning lni + inner join lect l on lni.lectno = l.lectno + inner join cminning cmi on lni.cmino = cmi.cmino + inner join ( + select #Ds[].lectno# lectno,#Ds[].cmino# cmino,#Ds[].istatus# istatus + ) a on lni.lectno = a.lectno and lni.cmino = a.cmino + set lni.stime=null,lni.etime=null, lni.istatus = #istatus# + where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1; + + + update lectinning set @@ -240,7 +276,7 @@ inner join cmev ce on a.cmno = ce.cmno set a.attrate=b.attrate ,a.apoint = (((b.attrate / 100) * ce.attend / 100)* 100) - ,a.tpoint = (((b.attrate / 100) * ce.attend / 100)* 100) + ifnull(a.mpoint, 0) + ifnull(a.fpoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ,a.tpoint = round((((b.attrate / 100) * ce.attend / 100)* 100) + ifnull(a.mpoint, 0) + ifnull(a.fpoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0),0) ,a.stime=case when a.stime is null then else a.stime end ,a.etime=case when a.etime is null then else a.etime end ,a.sip=case when a.sip is null then #uip# else a.sip end diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index d9d3a4d..3533cdb 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -544,12 +544,13 @@ + + update lect set diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 8f34e88..c46bc99 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -1145,7 +1145,7 @@ inner join cmev cv on a.cmno = cv.cmno set a.udt=,a.uno=#uno#,a.uip=#uip# ,a.fpoint = 0 - ,a.tpoint = 0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0) + ,a.tpoint = round(0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0),0) where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#; @@ -1155,7 +1155,7 @@ inner join cmev cv on a.cmno = cv.cmno set a.udt=,a.uno=#uno#,a.uip=#uip# ,a.mpoint = 0 - ,a.tpoint = 0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.fpoint, 0) + ,a.tpoint = round(0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.fpoint, 0)) where ce.extype = 0 and a.lectno=#lectno# and le.exno = #exno#; + update lect l + inner join cm c on l.cmno = c.cmno and c.isdel = 0 + inner join users u on l.userno = u.userno and u.status = 1 + left outer join cmsd cs on cs.cmno=c.cmno and cs.sdtype=0 and cs.isdel=0 + inner join cmev ce on c.cmno = ce.cmno + left outer join ( + select lectno, avg(cpoint) as cpoint + from lectsd ls + INNER JOIN cmsd cs ON ls.sdno = cs.sdno AND cs.isdel = 0 + where lectno = #lectno# + ) ls on l.lectno=ls.lectno + set l.udt = now(), l.uno=#uno#, l.uip=#uip# + ,l.spoint = round(((ifnull(ls.cpoint,0) / 100) * ce.subject),0) + ,l.tpoint = round(((ifnull(ls.cpoint,0) / 100) * ce.subject),0) + ifnull(l.apoint, 0) + ifnull(l.fpoint, 0) + ifnull(l.dpoint, 0) + ifnull(l.mpoint, 0) + where cs.sdtype = 0 and l.lectno = #lectno#; + + + update lect l + inner join cm c on l.cmno = c.cmno and c.isdel = 0 + inner join users u on l.userno = u.userno and u.status = 1 + left outer join cmsd cs on cs.cmno=c.cmno and cs.sdtype=1 and cs.isdel=0 + inner join cmev ce on c.cmno = ce.cmno + left outer join ( + select lectno, avg(cpoint) as cpoint + from lectsd ls + INNER JOIN cmsd cs ON ls.sdno = cs.sdno AND cs.isdel = 0 + where lectno = #lectno# + ) ls on l.lectno=ls.lectno + set l.udt = now(), l.uno=#uno#, l.uip=#uip# + ,l.spoint = round(((ifnull(ls.cpoint,0) / 100) * ce.discuss),0) + ,l.tpoint = round(((ifnull(ls.cpoint,0) / 100) * ce.discuss),0) + ifnull(l.apoint, 0) + ifnull(l.fpoint, 0) + ifnull(l.dpoint, 0) + ifnull(l.mpoint, 0) + where cs.sdtype = 1 and l.lectno = #lectno#; + update lectsd set diff --git a/FO/Web.config b/FO/Web.config index edcdb65..17520dd 100644 --- a/FO/Web.config +++ b/FO/Web.config @@ -41,8 +41,8 @@ - - + + diff --git a/Model/CM.cs b/Model/CM.cs index 80688f9..62be8f1 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -1341,14 +1341,15 @@ namespace NP.Model { get { - if(string.IsNullOrWhiteSpace(zstring3)) - { - return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실"; - } - else - { - return "출석"; - } + return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실"; + //if (string.IsNullOrWhiteSpace(zstring3)) + //{ + // return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실"; + //} + //else + //{ + // return "출석"; + //} } }