From 648caf938e554f99c6e855459263bd3ea7937324 Mon Sep 17 00:00:00 2001 From: hyunho Date: Wed, 27 Jan 2021 08:23:51 +0000 Subject: [PATCH] --- Dao/MyBatis/Maps/CRoom.xml | 13 +++++++++---- FO/Views/CRoom/Estimation.cshtml | 4 ++-- FO/Views/CRoom/Index.cshtml | 25 ++++++++++++------------- FO/Views/CRoom/Innings.cshtml | 13 ++++++++++--- FO/Views/CRoom/Research.cshtml | 31 +++++++++++++++---------------- FO/Views/My/Ready.cshtml | 9 +++++---- Model/CM.cs | 2 ++ 7 files changed, 55 insertions(+), 42 deletions(-) diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index 51bd798..c769d19 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -59,7 +59,7 @@ ,2 intval,c.iseq intval2,b.classno intval3,0 intval4,0 intval5,0 intval6,a.cmno intval7 ,a.lectno longval ,b.cname strval,b.studyplace strval2,concat(date_format(c.idate,'%m/%d'),' ',left(c.ist,2),':',right(c.ist,2),' ~ ',left(c.iet,2),':',right(c.iet,2)) strval3,bc.cname strval4 - ,b.sstime time,b.setime time2 + ,a.sdate time,a.edate time2 ,row_number() over(partition by a.cmno order by c.iseq) rno2 ,row_number() over(order by b.setime) rno from lect a @@ -81,7 +81,7 @@ ,3 intval,0 intval2,b.classno intval3,c.extype intval4,0 intval5,0 intval6,a.cmno intval7 ,a.lectno longval ,b.cname strval,b.studyplace strval2,null strval3,bc.cname strval4 - ,b.sstime time,b.setime time2 + ,a.sdate time,a.edate time2 ,row_number() over(partition by a.cmno order by c.extype,c.cdt) rno2 ,row_number() over(order by b.setime) rno from lect a @@ -103,7 +103,7 @@ ,4 intval,0 intval2,b.classno intval3,0 intval4,0 intval5,0 intval6,a.cmno intval7 ,a.lectno longval ,b.cname strval,b.studyplace strval2,null strval3,bc.cname strval4 - ,b.sstime time,b.setime time2 + ,a.sdate time,a.edate time2 ,row_number() over(partition by a.cmno order by c.cdt) rno2 ,row_number() over(order by b.setime) rno from lect a @@ -125,7 +125,7 @@ ,5 intval,0 intval2,b.classno intval3,0 intval4,0 intval5,0 intval6,a.cmno intval7 ,a.lectno longval ,b.cname strval,b.studyplace strval2,null strval3,bc.cname strval4 - ,b.sstime time,b.setime time2 + ,a.sdate time,a.edate time2 ,row_number() over(partition by a.cmno order by c.cdt) rno2 ,row_number() over(order by b.setime) rno from lect a @@ -372,6 +372,7 @@ select distinct a.lectno,a.attrate ,b.rsno,b.cmno,b.rscno,b.rstype,b.rsname,b.rscondition ,case when c.lectno is null then 0 else 1 end isrsok + ,a.edate from lect a inner join cmrs b on b.cmno=a.cmno and b.isdel=0 left outer join lectrs c on c.lectno=a.lectno and c.rsno=b.rsno @@ -428,6 +429,7 @@ ,null strval,0 intval10 ,0 intval,0 intval2,0 intval3,0 intval4 ,0 rno + ,null time from (select 1 col1) a where a.col1=0 @@ -439,6 +441,7 @@ ,case when c.eend is null then 0 else 1 end intval3 ,null intval4 ,row_number() over (partition by b.extype order by b.extype, b.cdt) rno + ,a.edate time from lect a inner join cm a2 on a2.cmno=a.cmno inner join cmex b on b.cmno=a.cmno and b.isdel=0 @@ -454,6 +457,7 @@ ,case when c.submittime is null then 0 else 1 end intval3 ,case when c.checktime is null then 0 else 1 end intval4 ,row_number() over (order by b.cdt) rno + ,a.edate time from lect a inner join cm a2 on a2.cmno=a.cmno inner join cmsd b on b.cmno=a.cmno and b.sdtype=0 and b.isdel=0 @@ -469,6 +473,7 @@ ,case when count(d.bno) > 0 then 1 else 0 end intval3 ,case when c.checktime is null then 0 else 1 end intval4 ,row_number() over (order by b.cdt) rno + ,a.edate time from lect a inner join cm a2 on a2.cmno=a.cmno inner join cmsd b on b.cmno=a.cmno and b.sdtype=1 and b.isdel=0 diff --git a/FO/Views/CRoom/Estimation.cshtml b/FO/Views/CRoom/Estimation.cshtml index 42bfa04..93144ef 100644 --- a/FO/Views/CRoom/Estimation.cshtml +++ b/FO/Views/CRoom/Estimation.cshtml @@ -20,7 +20,7 @@
@(d.dtype == 0 ? "진행평가":d.dtype==1?"최종평가":d.dtype == 2?"과제":d.dtype==3?"토론":"") @d.strval
-

참여조건 : 진도율 @(d.intval2)% 이상

+

참여조건 : 진도율 @(d.intval2)% 이상 / 수강 종료일 (@d.time.ToShortDateString()) 이내

=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]") @@ -59,7 +59,7 @@ } function eva(type, no, status) { if (status == 1) { - msg("진도율 조건을 충족시키지 못하여 참여하실 수 없습니다."); + msg("진도율 조건에 맞지않거나 수강일이 종료되어 참여하실 수 없습니다."); } else { setv("estno", no); $("#mform").attr("action", "/CRoom/Estimation" + (type < 2 ?"Exam":type==2?"Subject":"Discuss")).submit(); diff --git a/FO/Views/CRoom/Index.cshtml b/FO/Views/CRoom/Index.cshtml index f0805a1..421d5b2 100644 --- a/FO/Views/CRoom/Index.cshtml +++ b/FO/Views/CRoom/Index.cshtml @@ -21,19 +21,12 @@ 나의성적 - @if (Model.Lect.iscomplete == null) - { - 공개전 - } - else - { - @(Model.Lect.attrate)%(@(Model.Lect.attrate)점) - @(Model.Lect.ex0lectpoint)점 - @(Model.Lect.ex1lectpoint)점 - @(Model.Lect.sd0lectpoint)점 - @(Model.Lect.sd1lectpoint)점 - @(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점 - } + @(Model.Lect.attrate)%(@(Model.Lect.attrate)점) + @(Model.Lect.ex0lectpoint)점 + @(Model.Lect.ex1lectpoint)점 + @(Model.Lect.sd0lectpoint)점 + @(Model.Lect.sd1lectpoint)점 + @(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점 @*@(Model.Lect.attrate)%(@(Model.Lect.apoint)점) @(Model.Lect.mpoint)점 @(Model.Lect.fpoint)점 @@ -50,6 +43,12 @@ @(Model.Lect.dcut)점이상 @(Model.Lect.cut)점이상 + + @if (Model.Lect.iscomplete == null) + { + ※ 나의성적이 수료기준을 충족하였을 경우 성적 화면에서 수료요청을 해주셔야 합니다. + } + diff --git a/FO/Views/CRoom/Innings.cshtml b/FO/Views/CRoom/Innings.cshtml index a0fbeb1..3a99e04 100644 --- a/FO/Views/CRoom/Innings.cshtml +++ b/FO/Views/CRoom/Innings.cshtml @@ -17,10 +17,17 @@
[@(d.iseq)회] @d.ititle
@(d.isonline == 0 && d.istatus == 2 ? "출석완료" : d.isonline == 0 && d.idate < DateTime.Now ? "결석" : d.isonline == 0 ? "출석전" : d.stime == null ? "학습전(0%)" : d.istatus == 2 ? "학습완료" : string.Format("학습중({0}%)", d.sttime > 0 ? (d.totstudy * 100 / (d.sttime * 60)) : 0))
-
@(d.isonline == 0 ? "강의시작일" : "강의기간") : @(d.isonline == 0 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : (d.sstime.ToString("MM/dd") + " ~ " + d.setime.ToString("MM/dd")))
+
@(d.isonline == 0 ? (d.cshape != 2 ? "강의시작일" : "집체교육") : "강의기간") : @(d.isonline == 0 ? (d.cshape != 2 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : d.eend.ToString("MM/dd")) : (d.sdate.ToString("MM/dd") + " ~ " + d.edate.ToString("MM/dd")))
@if (d.isonline == 0) { -
강의실 : @(d.icontent ?? "-")
+ if (d.cshape != 2) + { +
강의실 : @(d.icontent ?? "-")
+ } + else + { +
장소 : @(d.cname ?? "-")
+ } }
@@ -40,7 +47,7 @@ @if (d.isonline == 1) { //학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25 - 학습하기 + 학습하기 } diff --git a/FO/Views/CRoom/Research.cshtml b/FO/Views/CRoom/Research.cshtml index 74f5a5b..40acddf 100644 --- a/FO/Views/CRoom/Research.cshtml +++ b/FO/Views/CRoom/Research.cshtml @@ -10,22 +10,21 @@ foreach (var d in Model.CMRSes) { - - -
@d.rstypename
-

참여조건 : 진도율 @(d.rscondition)% 이상 , 수강 기간내

- - - @if (ViewBag.isres > 0) - { - @(d.rscondition > d.attrate ? "참여불가" : d.isrsok == 1 ? "참여완료" : "참여") - } - else - { - 참여불가 - } - - + + +
@d.rstypename
+

참여조건 : 진도율 @(d.rscondition)% 이상 / 수강 종료일 (@d.edate.ToShortDateString()) 이내

+ + + @if (ViewBag.isres > 0) + { + @(d.rscondition > d.attrate ? "참여불가" : d.isrsok == 1 ? "참여완료" : "참여가능") + } + else + { + 참여불가 + } + } } else diff --git a/FO/Views/My/Ready.cshtml b/FO/Views/My/Ready.cshtml index 9662dc0..60fa23d 100644 --- a/FO/Views/My/Ready.cshtml +++ b/FO/Views/My/Ready.cshtml @@ -40,11 +40,12 @@
@(d.pstatus == 55 ? "승인대기" : d.pstatus == 51 ? "심사중" : d.pstatus == 21 ? "결제대기" : d.pstatus == 22 ? "입금대기" : d.pstatus == 1 && d.rfdstatus > 0 ? "환불요청" : d.pstatus == 1 ? "결제완료" : d.rstatus == 1 ? "부분환불" : d.rstatus == 2 ? "전액환불" : "-")
- 수강기간 : @d.sdate.ToString("yy-MM-dd") ~ @d.edate.ToString("yy-MM-dd") - @if (d.cshape == 2) - { + 신청기간 : @(d.retime.Value.Year == 2099 ? "상시운영" : d.rstime.Value.ToString("yy/MM/dd") + " ~ " + d.retime.Value.ToString("yy/MM/dd")) + @*수강기간 : @d.sdate.ToString("yy-MM-dd") ~ @d.edate.ToString("yy-MM-dd")*@ + @if (d.cshape == 2) + { @:| 집체교육기간 : @(d.cmisno == null ? "미정" : ("[" + d.studyplacename + "] " + string.Format("{0}", d.cmiestart.ToString("yy-MM-dd")))) - } + }
diff --git a/Model/CM.cs b/Model/CM.cs index 6c2dcb7..77ab34e 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -2183,6 +2183,8 @@ namespace NP.Model public int rscondition {get;set;} public int attrate { get; set; } public int isrsok { get; set; } + public DateTime sdate { get; set; } + public DateTime edate { get; set; } } [Serializable]