추가개발01/02_1

This commit is contained in:
김한진 2026-01-02 14:05:48 +09:00
parent 7a6a46bd51
commit 248e3ac511
12 changed files with 146 additions and 51 deletions

View File

@ -462,6 +462,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from (select 1 col1) a
where a.col1=0
@ -478,13 +480,15 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from lect a
where a.lectno=#lectno# and a.userno=#userno#
<isNotNull property="exam">
union all
select b.extype dtype
,b.exname strval,b.exno intval10
,case when b.testsdate &lt; now() and b.testedate &gt; now() then a.attrate else -1 end intval,b.econdition intval2
,case when a.cdt &lt; now() and a.edate &gt; 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
@ -495,7 +499,9 @@
,a.sdate time2
,b.testsdate
,b.testedate
,b.cmisno intval11
,ifnull(b.cmisno,0) intval11
,a.cdt time3
,a.edate time4
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
@ -519,6 +525,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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
@ -541,6 +549,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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
@ -563,6 +573,7 @@
,case when
case when case when a.isrebate = 1 then f.midcutrfd else f.midcut end &lt;= ifnull(e.ex0lectpoint,0) then 1 else 0 end = 1 and case when case when a.isrebate = 1 then f.finalcutrfd else f.finalcut end &lt;= ifnull(e.ex1lectpoint,0) then 1 else 0 end = 1
then 1 else 0 end ispass
,ifnull(c.cmisno, 0) scdcmisno
,c.testsdate
,c.testedate
,a.cdt lectcdt
@ -1999,6 +2010,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from (select 1 col1) a
where a.col1=0
@ -2015,6 +2028,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from lect a
where a.lectno=#lectno# and a.userno=#userno#
<isNotNull property="exam">
@ -2033,6 +2048,8 @@
,b.testsdate
,b.testedate
,b.cmisno intval11
,a.cdt time3
,a.edate time4
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
@ -2056,6 +2073,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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
@ -2078,6 +2097,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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

View File

@ -462,6 +462,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from (select 1 col1) a
where a.col1=0
@ -478,13 +480,15 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from lect a
where a.lectno=#lectno# and a.userno=#userno#
<isNotNull property="exam">
union all
select b.extype dtype
,b.exname strval,b.exno intval10
,case when b.testsdate &lt; now() and b.testedate &gt; now() then a.attrate else -1 end intval,b.econdition intval2
,case when a.cdt &lt; now() and a.edate &gt; 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
@ -495,7 +499,9 @@
,a.sdate time2
,b.testsdate
,b.testedate
,b.cmisno intval11
,ifnull(b.cmisno,0) intval11
,a.cdt time3
,a.edate time4
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
@ -519,6 +525,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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
@ -541,6 +549,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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
@ -563,6 +573,7 @@
,case when
case when case when a.isrebate = 1 then f.midcutrfd else f.midcut end &lt;= ifnull(e.ex0lectpoint,0) then 1 else 0 end = 1 and case when case when a.isrebate = 1 then f.finalcutrfd else f.finalcut end &lt;= ifnull(e.ex1lectpoint,0) then 1 else 0 end = 1
then 1 else 0 end ispass
,ifnull(c.cmisno, 0) scdcmisno
,c.testsdate
,c.testedate
,a.cdt lectcdt
@ -1999,6 +2010,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from (select 1 col1) a
where a.col1=0
@ -2015,6 +2028,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
from lect a
where a.lectno=#lectno# and a.userno=#userno#
<isNotNull property="exam">
@ -2033,6 +2048,8 @@
,b.testsdate
,b.testedate
,b.cmisno intval11
,a.cdt time3
,a.edate time4
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
@ -2056,6 +2073,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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
@ -2078,6 +2097,8 @@
,null testsdate
,null testedate
,0 intval11
,null time3
,null time4
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

Binary file not shown.

Binary file not shown.

View File

@ -481,6 +481,7 @@ namespace NP.FO.Controllers
{ "userno", SUserInfo.UserNo }
};
//시험일정이 있는지 체크
var scd_cmisno = Dao.Get<int>("cr.myestimation.excnt", p3);
if ((int)scd_cmisno.FirstOrDefault() > 0) {
sqlId = "cr.myestimation.ex";

View File

@ -112,6 +112,8 @@
// 2025-12-30 / KHJ / 추가개발건
// currentProgresRate(현재 진도율) >= intval2(제한시간) && 시험 응시 시작일 ~ 시험 응시 종료일
// testsdate(시험응시 시작일), testedate(시험응시 종료일), inval11(교육일정코드_cmisno), strval2(강의시작일), strval3(강의종료일)
if (d.intval11 > 0) { // 교육일정코드_cmisno 있을 시
if ((currentProgresRate >= d.intval2) && IsDateInRange(d.testsdate, d.testedate)) {
<td>
<input type="hidden" name="cmEcondition" value="@d.intval2" />
@ -121,7 +123,6 @@
<input type="hidden" name="lectSDate" value="@d.testsdate" />
<input type="hidden" name="lectEDate" value="@d.testedate" />
<input type="hidden" name="isDateInRange" value="@IsDateInRange(d.testsdate, d.testedate).ToString()" />
@IsDateInRange(d.testsdate, d.testedate)
<a href="javascript:;" onclick="eva(@d.dtype, @d.intval10, @(d.intval4 == 1 ? 4 : d.intval3 == 1 ? 3 : d.intval3 == 0 && d.intval >= d.intval2 ? 2 : 1))"
class="@GetEvaTypeClass(d.intval, d.intval2, d.intval3, d.intval4, currentLectIsComplete)">@GetEvaStatusText(d.intval, d.intval2, d.intval3, d.intval4, currentLectIsComplete)
</a>
@ -138,6 +139,33 @@
</a>
</td>
}
} else {
if ((currentProgresRate >= d.intval2) && IsDateInRange(d.time3, d.time4)) {
<td>
<input type="hidden" name="cmEcondition" value="@d.intval2" />
@*<input type="hidden" name="lectSDate" value="@d.time2" />
<input type="hidden" name="lectEDate" value="@d.time" />*@
@*<input type="hidden" name="isDateInRange" value="@IsDateInRange(d.time2, d.time).ToString()" />*@
<input type="hidden" name="lectSDate" value="@d.time3" />
<input type="hidden" name="lectEDate" value="@d.time4" />
<input type="hidden" name="isDateInRange" value="@IsDateInRange(d.time3, d.time4).ToString()" />
<a href="javascript:;" onclick="eva(@d.dtype, @d.intval10, @(d.intval4 == 1 ? 4 : d.intval3 == 1 ? 3 : d.intval3 == 0 && d.intval >= d.intval2 ? 2 : 1))"
class="@GetEvaTypeClass(d.intval, d.intval2, d.intval3, d.intval4, currentLectIsComplete)">@GetEvaStatusText(d.intval, d.intval2, d.intval3, d.intval4, currentLectIsComplete)
</a>
</td>
} else {
<td>
<input type="hidden" name="cmEcondition" value="@d.intval2" />
<input type="hidden" name="lectSDate" value="@d.time2" />
<input type="hidden" name="lectEDate" value="@d.time" />
<input type="hidden" name="isDateInRange" value="@IsDateInRange(d.time2, d.time).ToString()" />
@*onclick="msg('24년 8월 22일 부터 건설기술진흥법 변경으로 <br>집체교육 당일 교육장에서 시험평가가 진행됩니다.')"*@
<a href="javascript:;" class="evaType@(d.intval4 == 1 ? "04" : d.intval3 == 1 ? "03" : d.intval3 == 0 && d.intval >= d.intval2 ? "02" : "01")">
@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")
</a>
</td>
}
}
} else {
// 과제 등...

View File

@ -1,6 +1,12 @@
@model NP.Model.VMCRoom
@{
string exDate = "";
if (Model.LectEX.scdcmisno > 0) {
exDate = Model.LectEX.lectcdt.ToString("yyyy-MM-dd 00:00") + " ~ " + Model.LectEX.scdeend.ToString("yyyy-MM-dd hh:mm") + "까지(진도율 " + Model.LectEX.econdition + "%이상 응시가능)";
} else {
exDate = Model.LectEX.lectcdt.ToString("yyyy-MM-dd 00:00") + " ~ " + Model.LectEX.edate.Value.ToString("yyyy-MM-dd hh:mm") + "까지(진도율 " + Model.LectEX.econdition + "%이상 응시가능)";
}
}
<h3 class="lctTitle3">시험안내</h3>
<table class="evaDetail">
@ -10,7 +16,7 @@
<tr><th>평가점수</th><td>@(Model.LectEX.tpoint + "점")</td></tr>
<tr><th>제한시간</th><td>@(Model.LectEX.etime == 0 ? "제한없음" : string.Format("{0} 분", Model.LectEX.etime))</td></tr>
@*<tr><th>응시기간</th><td>@(Model.LectEX.sdate.Value.ToString("yy-MM-dd hh:mm")) ~ @(Model.LectEX.edate.Value.ToString("yy-MM-dd hh:mm"))까지(진도율 @(Model.LectEX.econdition)%이상 응시가능)</td></tr>*@
<tr><th>응시기간</th><td>@(Model.LectEX.lectcdt.ToString("yyyy-MM-dd 00:00")) ~ @(Model.LectEX.scdeend.ToString("yyyy-MM-dd hh:mm"))까지(진도율 @(Model.LectEX.econdition)%이상 응시가능)</td></tr>
<tr><th>응시기간</th><td>@exDate</td></tr>
<tr><th>재응시여부</th><td>@(Model.LectEX.isreexamable == 0 ? "불가능" : "가능")</td></tr>
<tr><th>응시상태</th><td>@(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 ? ", [이어보기 초과]" : "")))</td></tr>
@if (Model.LectEX.estart != null)
@ -57,6 +63,24 @@
var openedexam = false;
function goexam() {
if (@(Model.LectEX.eend == null && (Model.LectEX.estart == null || Model.LectEX.relaylimit.Value >= Model.LectEX.entercount) ? 1 : 0) == 1) {
if (@(Model.LectEX.scdcmisno) == 0) {
if (@(Model.LectEX.sdate.Value > DateTime.Now || Convert.ToDateTime(Model.LectEX.edate.Value.ToString("yyyy-MM-dd")).AddDays(1).AddSeconds(-1) < DateTime.Now?0:1)== 0) {
msg("응시기간이 아닙니다.");
} else if (@Model.LectEX.rtime < 1 && @Model.LectEX.etime > 0) {
msg("응시시간이 초과되었습니다.");
} else {
if (@((bool)(ViewBag.IsPortalAppBrowser??false)?1:0) == 1) {
msg("Naver, Daum 등의 앱브라우저는 원활한 시험 진행이 어렵습니다. 모바일 브라우저로 시험에 응시해주세요.");
} else {
openedexam = true;
if (!ismobile()) {
window.open("/CRoom/Exam?croomlectno=@Model.LectEX.lectno&estno=@(Model.LectEX.exno)", 'croomexam', 'height=' + (screen.height - 130) + ',width=' + screen.width + ',menubar=no,toolbar=no,location=no,resizable=no, status=no,scrollbars=no,top=0,left=0, fullscreen=yes');
} else {
window.open("/CRoom/Exam?croomlectno=@Model.LectEX.lectno&estno=@(Model.LectEX.exno)");
}
}
}
} else { //배포 이후 교육일정 코드가 있을 경우...
if (@(Convert.ToDateTime(Model.LectEX.testsdate) > DateTime.Now
|| Convert.ToDateTime(Convert.ToDateTime(Model.LectEX.testedate).ToString("yyyy-MM-dd")).AddDays(1).AddSeconds(-1) < DateTime.Now ? 0 : 1) == 0) {
msg("응시기간이 아닙니다.");
@ -65,19 +89,18 @@
} else {
if (@((bool)(ViewBag.IsPortalAppBrowser??false)?1:0) == 1) {
msg("Naver, Daum 등의 앱브라우저는 원활한 시험 진행이 어렵습니다. 모바일 브라우저로 시험에 응시해주세요.");
}
else {
} else {
openedexam = true;
if (!ismobile()) {
window.open("/CRoom/Exam?croomlectno=@Model.LectEX.lectno&estno=@(Model.LectEX.exno)", 'croomexam', 'height=' + (screen.height - 130) + ',width=' + screen.width + ',menubar=no,toolbar=no,location=no,resizable=no, status=no,scrollbars=no,top=0,left=0, fullscreen=yes');
}
else {
} else {
window.open("/CRoom/Exam?croomlectno=@Model.LectEX.lectno&estno=@(Model.LectEX.exno)");
}
}
}
}
}
}
// 아래 주석은 2025-03 이후에 다시 사용 예정
function showexam() {

View File

@ -3483,7 +3483,7 @@ namespace NP.Model
/// <summary>
/// 응시시작
/// </summary>
public DateTime? estart { get; set; }
//public DateTime? estart { get; set; }
public String estartymd
{
@ -3650,7 +3650,7 @@ namespace NP.Model
public String studyplacename{get; set;}
public String cname { get; set; }
public DateTime payoktime { get; set; }
public Int64 cmisno { get; set; }
//public Int64 cmisno { get; set; }
public String leststr
{
get
@ -3764,6 +3764,7 @@ namespace NP.Model
public DateTime scdestart { get; set; }
/// <summary>교육일정 종료일</summary>
public DateTime scdeend { get; set; }
public int scdcmisno { get; set; }
}
[Serializable]
public class LectEXQ : LectEX

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.