diff --git a/BO/Views/cm/cmregexset.cshtml b/BO/Views/cm/cmregexset.cshtml index eafa1d2..4ab1aaa 100644 --- a/BO/Views/cm/cmregexset.cshtml +++ b/BO/Views/cm/cmregexset.cshtml @@ -5,8 +5,8 @@ if (Model.ESTs != null) { esTsCnt = Model.ESTs.Count; } - - if (Model.CMInnings != null) { + + if (Model.CMInnings.Count > 0) { scdType = Convert.ToInt32(Model.CMInnings.FirstOrDefault().scdtype); } } diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index 247586b..99f1d3c 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -461,6 +461,7 @@ ,null time2 ,null testsdate ,null testedate + ,0 intval11 from (select 1 col1) a where a.col1=0 @@ -476,13 +477,14 @@ ,null time2 ,null testsdate ,null testedate + ,0 intval11 from lect a where a.lectno=#lectno# and a.userno=#userno# union all select b.extype dtype ,b.exname strval,b.exno intval10 - ,case when a.sdate < now() and a.edate > now() then a.attrate else -1 end intval,b.econdition intval2 + ,case when b.testsdate < now() and b.testedate > now() then a.attrate else -1 end intval,b.econdition intval2 ,case when c.eend is null then 0 else 1 end intval3 ,a.attrate intval5 ,null intval4 @@ -493,11 +495,13 @@ ,a.sdate time2 ,b.testsdate ,b.testedate + ,b.cmisno intval11 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 left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno where a.lectno=#lectno# and a.userno=#userno# + and b.cmisno is null union all @@ -514,6 +518,7 @@ ,a.sdate time2 ,null testsdate ,null testedate + ,0 intval11 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 @@ -535,6 +540,7 @@ ,a.sdate time2 ,null testsdate ,null testedate + ,0 intval11 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 @@ -559,6 +565,9 @@ then 1 else 0 end ispass ,c.testsdate ,c.testedate + ,a.cdt lectcdt + ,g.estart scdestart + ,g.eend scdeend from lect a inner join cm b on b.cmno=a.cmno inner join cmex c on c.exno=#exno# @@ -575,6 +584,7 @@ left outer join lectex c2 on c2.exno = b2.exno and c2.lectno = a.lectno where a.lectno = #lectno# ) e on e.lectno = a.lectno + LEFT OUTER JOIN cminningscd g ON g.cmisno = c.cmisno where a.lectno=#lectno# and a.userno=#userno# + + + + diff --git a/Dao/bin/Debug/MyBatis/Maps/CRoom.xml b/Dao/bin/Debug/MyBatis/Maps/CRoom.xml index eb80027..f31174b 100644 --- a/Dao/bin/Debug/MyBatis/Maps/CRoom.xml +++ b/Dao/bin/Debug/MyBatis/Maps/CRoom.xml @@ -461,6 +461,7 @@ ,null time2 ,null testsdate ,null testedate + ,0 intval11 from (select 1 col1) a where a.col1=0 @@ -476,13 +477,14 @@ ,null time2 ,null testsdate ,null testedate + ,0 intval11 from lect a where a.lectno=#lectno# and a.userno=#userno# union all select b.extype dtype ,b.exname strval,b.exno intval10 - ,case when a.sdate < now() and a.edate > now() then a.attrate else -1 end intval,b.econdition intval2 + ,case when b.testsdate < now() and b.testedate > now() then a.attrate else -1 end intval,b.econdition intval2 ,case when c.eend is null then 0 else 1 end intval3 ,a.attrate intval5 ,null intval4 @@ -493,11 +495,13 @@ ,a.sdate time2 ,b.testsdate ,b.testedate + ,b.cmisno intval11 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 left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno where a.lectno=#lectno# and a.userno=#userno# + and b.cmisno is null union all @@ -514,6 +518,7 @@ ,a.sdate time2 ,null testsdate ,null testedate + ,0 intval11 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 @@ -535,6 +540,7 @@ ,a.sdate time2 ,null testsdate ,null testedate + ,0 intval11 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 @@ -559,6 +565,9 @@ then 1 else 0 end ispass ,c.testsdate ,c.testedate + ,a.cdt lectcdt + ,g.estart scdestart + ,g.eend scdeend from lect a inner join cm b on b.cmno=a.cmno inner join cmex c on c.exno=#exno# @@ -575,6 +584,7 @@ left outer join lectex c2 on c2.exno = b2.exno and c2.lectno = a.lectno where a.lectno = #lectno# ) e on e.lectno = a.lectno + LEFT OUTER JOIN cminningscd g ON g.cmisno = c.cmisno where a.lectno=#lectno# and a.userno=#userno# + + + + diff --git a/Dao/bin/Debug/NP.Model.dll b/Dao/bin/Debug/NP.Model.dll index 2e45e86..bb03f17 100644 Binary files a/Dao/bin/Debug/NP.Model.dll and b/Dao/bin/Debug/NP.Model.dll differ diff --git a/Dao/bin/Debug/NP.Model.pdb b/Dao/bin/Debug/NP.Model.pdb index 0f4bffa..168a0a9 100644 Binary files a/Dao/bin/Debug/NP.Model.pdb and b/Dao/bin/Debug/NP.Model.pdb differ diff --git a/FO/Controllers/CRoomController.cs b/FO/Controllers/CRoomController.cs index 10f8755..c5ecd59 100644 --- a/FO/Controllers/CRoomController.cs +++ b/FO/Controllers/CRoomController.cs @@ -472,6 +472,23 @@ namespace NP.FO.Controllers /// public ActionResult Estimation(VMCRoom vm) { + string sqlId = ""; + + #region + 시험응시 집체교육이 선택된게 있는지 확인 + var p3 = new Hashtable() + { + { "lectno", vm.croomlectno }, + { "userno", SUserInfo.UserNo } + }; + + var scd_cmisno = Dao.Get("cr.myestimation.excnt", p3); + if ((int)scd_cmisno.FirstOrDefault() > 0) { + sqlId = "cr.myestimation.ex"; + } else { + sqlId = "cr.myestimation"; + } + #endregion + #region + vm.Datas = cr.myestimation var p1 = new Hashtable() { @@ -482,7 +499,7 @@ namespace NP.FO.Controllers { "discuss"+(vm.tabidx == 0 || vm.tabidx == 3 ? "" : "x"), 1 } }; - vm.Datas = Dao.Get("cr.myestimation", p1); + vm.Datas = Dao.Get(sqlId, p1); #endregion // true일때 lms에서 시험내용으로 진입 가능 diff --git a/FO/Views/CRoom/Estimation.cshtml b/FO/Views/CRoom/Estimation.cshtml index 53ba135..f4792ed 100644 --- a/FO/Views/CRoom/Estimation.cshtml +++ b/FO/Views/CRoom/Estimation.cshtml @@ -1,33 +1,39 @@ @model NP.Model.VMCRoom @{ - /* - * -- Model.Datas의 Dtype - * -1 : lect만 쿼리하고 attrate만 intval5에 담아놓음 - * 1 : 최종평가 - * 2 : 과제 - */ + /* + * -- Model.Datas의 Dtype + * -1 : lect만 쿼리하고 attrate만 intval5에 담아놓음 + * 1 : 최종평가 + * 2 : 과제 + */ - // 1. 하단 문구에서 사용 - // 1-1)최종평가 일때 cm.studytime 값 intval6 - int dType1CmStudyTime = Model.Datas - .Where(w => w.dtype == 1) - .Select(s => s.intval6) - .SingleOrDefault(); + // 1. 하단 문구에서 사용 + // 1-1)최종평가 일때 cm.studytime 값 intval6 + //int dType1CmStudyTime = Model.Datas + //.Where(w => w.dtype == 1) + //.Select(s => s.intval6) + //.SingleOrDefault(); - // 1-2)최종평가 일때 lect.sdate - DateTime dType1LectSDate = Model.Datas - .Where(w => w.dtype == 1) - .Select(s => s.time2) - .SingleOrDefault(); + // 1-2)최종평가 일때 lect.sdate + //DateTime dType1LectSDate = Model.Datas + // .Where(w => w.dtype == 1) + // .Select(s => s.time2) + // .SingleOrDefault(); - // 현재 진도율 - int currentProgresRate = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval5; + //2025-12-30 / KHJ / 추가개발건 + //집체교육이 선택된 시험이 1개도 없을 경우->강좌에 등록된 모든 시험 출력 + //집체교육이 선택된 시험이 1개 이상이나, 내가 선택한 일정에 맞는 시험이 없을 경우 -> 집체교육이 선택되지 않은 모든 시험 출력 + //집체교육이 선택된 시험이 1개 이상이며, 내가 선택한 일정에 맞는 시험이 있을 경우 -> 내 일정에 맞는 시험 출력 - // 현재 과정 수료여부 - int currentLectIsComplete = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval7; - // 시험응시가능여부 - bool isExCheck = ViewBag.exCheck != null ? (bool)ViewBag.exCheck : false; + // 현재 진도율 + int currentProgresRate = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval5; + + // 현재 과정 수료여부 + int currentLectIsComplete = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval7; + + // 시험응시가능여부 + bool isExCheck = ViewBag.exCheck != null ? (bool)ViewBag.exCheck : false; }
- - + @*@dType1CmStudyTime*@ + @*@dType1LectSDate*@ @@ -98,16 +104,15 @@ */ *@ - @if (d.dtype == 1) - { - // 최총 평가일 때 - //if ((currentProgresRate >= d.intval2) // 조건 ① - // && IsDateInRange(d.testsdate, d.testedate) // 조건 ② - // && (ViewBag.exCheck || dType1CmStudyTime == 16)) // 조건 ③ 또는 조건 ④ <-- 요 부분을 다시 물어보자 - if ((currentProgresRate >= d.intval2) // 조건 ① - && IsDateInRange(d.testsdate, d.testedate)) // 조건 ② + @if (d.dtype == 1) { + // 최총 평가일 때(시험응시) + //if ((currentProgresRate >= d.intval2) // 조건 ① + // && IsDateInRange(d.testsdate, d.testedate) // 조건 ② + // && (ViewBag.exCheck || dType1CmStudyTime == 16)) // 조건 ③ 또는 조건 ④ <-- 요 부분을 다시 물어보자 - { + // 2025-12-30 / KHJ / 추가개발건 + // currentProgresRate(현재 진도율) >= intval2(제한시간) && 시험 응시 시작일 ~ 시험 응시 종료일 + if ((currentProgresRate >= d.intval2) && IsDateInRange(d.testsdate, d.testedate)) { - } - else - { + } else { } - } - else - { + } else { // 과제 등... @@ -209,14 +213,14 @@ diff --git a/FO/Views/CRoom/EstimationExam.cshtml b/FO/Views/CRoom/EstimationExam.cshtml index 67f6d23..6b86185 100644 --- a/FO/Views/CRoom/EstimationExam.cshtml +++ b/FO/Views/CRoom/EstimationExam.cshtml @@ -10,7 +10,7 @@ @**@ - + @if (Model.LectEX.estart != null) diff --git a/Model/CM.cs b/Model/CM.cs index f1f2c09..a6baccf 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -3758,6 +3758,12 @@ namespace NP.Model return isbyadmin == 1 ? "관리자등록" : estart == null ? "미응시" : "수강생응시"; } } + /// 강좌 시작일 + public DateTime lectcdt { get; set; } + /// 교육일정 시작일 + public DateTime scdestart { get; set; } + /// 교육일정 종료일 + public DateTime scdeend { get; set; } } [Serializable] public class LectEXQ : LectEX diff --git a/Model/bin/Debug/NP.Model.dll b/Model/bin/Debug/NP.Model.dll index 2e45e86..bb03f17 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 0f4bffa..168a0a9 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 997de32..ac12581 100644 --- a/Model/obj/Debug/Model.csproj.FileListAbsolute.txt +++ b/Model/obj/Debug/Model.csproj.FileListAbsolute.txt @@ -1,6 +1,5 @@ D:\Project\git\git_YNICTE\Model\bin\Debug\NP.Model.dll D:\Project\git\git_YNICTE\Model\bin\Debug\NP.Model.pdb -D:\Project\git\git_YNICTE\Model\obj\Debug\Model.csproj.AssemblyReference.cache 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 diff --git a/Model/obj/Debug/NP.Model.dll b/Model/obj/Debug/NP.Model.dll index 2e45e86..bb03f17 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 0f4bffa..168a0a9 100644 Binary files a/Model/obj/Debug/NP.Model.pdb and b/Model/obj/Debug/NP.Model.pdb differ
@* @@ -116,25 +121,24 @@ + @IsDateInRange(d.testsdate, d.testedate) @GetEvaStatusText(d.intval, d.intval2, d.intval3, d.intval4, currentLectIsComplete) - = d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]") + @*onclick="msg('24년 8월 22일 부터 건설기술진흥법 변경으로
집체교육 당일 교육장에서 시험평가가 진행됩니다.')"*@ + = d.intval2 ? "02" : "01")"> + @(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]") +
@if (Model.tabidx == 0 || Model.tabidx == 1) { // 전체, 시험 탭 - if (dType1CmStudyTime == 16 || dType1LectSDate < Convert.ToDateTime("2024-08-19")) + @*if (dType1CmStudyTime == 16 || dType1LectSDate < Convert.ToDateTime("2024-08-19")) { // 기준이 애매해서 if와 else를 바꿈 (임시사용) } else {

※ 24년 8월 22일 부터 건설기술진흥법 변경으로 집체교육 당일 교육장에서 시험평가가 진행됩니다.

- } + }*@ }

현재 진도율: @currentProgresRate %

평가점수@(Model.LectEX.tpoint + "점")
제한시간@(Model.LectEX.etime == 0 ? "제한없음" : string.Format("{0} 분", Model.LectEX.etime))
응시기간@(Model.LectEX.sdate.Value.ToString("yy-MM-dd hh:mm")) ~ @(Model.LectEX.edate.Value.ToString("yy-MM-dd hh:mm"))까지(진도율 @(Model.LectEX.econdition)%이상 응시가능)
응시기간@(Convert.ToDateTime(Model.LectEX.testsdate).ToString("yyyy-MM-dd hh:mm")) ~ @(Convert.ToDateTime(Model.LectEX.testedate).ToString("yyyy-MM-dd hh:mm"))까지(진도율 @(Model.LectEX.econdition)%이상 응시가능)
응시기간@(Model.LectEX.lectcdt.ToString("yyyy-MM-dd 00:00")) ~ @(Model.LectEX.scdeend.ToString("yyyy-MM-dd hh:mm"))까지(진도율 @(Model.LectEX.econdition)%이상 응시가능)
재응시여부@(Model.LectEX.isreexamable == 0 ? "불가능" : "가능")
응시상태@(Model.LectEX.estart == null ? ("응시전" + (Model.LectEX.recount > 0 ? string.Format(" (재응시승인 {0}회)", Model.LectEX.recount) : "")) : Model.LectEX.eend != null ? "응시완료" : Model.LectEX.rtime < 1 ? "응시시간초과" : ("응시시작 (남은시간 " + Model.LectEX.rtime + "분)" + (Model.LectEX.relaylimit.Value <= Model.LectEX.entercount ? ", [이어보기 초과]" : "")))