<기능개선>

1. PMS NO : 7326,7324,7323 외 성적처리 중간 저장(일부)
2. (주요)작업내용 
(1) 일괄 커밋
This commit is contained in:
jity7777 2023-01-19 00:25:31 +00:00
parent 9cbc567ca9
commit 5b95807cab
16 changed files with 380 additions and 175 deletions

View File

@ -523,7 +523,7 @@ namespace NP.BO.Controllers
return ExportExcel(
new String[] { "No", "아이디", "교육생이름", "교육생 전화번호", "이메일", "과정명", "기술인분류", "교육목적", "등급", "교육시작일", "교육종료일", "출석일", "집합교육출석여부", "수료여부" },
new String[] { "rnorvt", "userid", "username", "mobile", "email", "cname", "zstring0", "zstring1", "zstring2", "sdatestr", "edatestr", "stimestr", "istatusname", "iscompletename" },
new String[] { "rnorvt", "userid", "username", "mobile", "email", "cname", "zstring0", "zstring1", "zstring2", "sdatestr", "edatestr", "zstring3", "istatusname", "iscompletename" },
vm.Lects,
"attscds_" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day);
}
@ -719,6 +719,7 @@ namespace NP.BO.Controllers
var ht = SetHash(vm);
ht.Add("edate", vm.stringval);
ht.Add("edate2", vm.stringval12);
ht.Add("cshape", vm.stringval2);
ht.Add("cname", vm.stringval3);
ht.Add("cnamestr", vm.stringval3);
@ -879,7 +880,7 @@ namespace NP.BO.Controllers
String pstatusall = null;
if (vm.stringval3 != null)
{
pstatusall = " and ((p.pstatus in (" +vm.stringval3+") and pr.rstatus is null and p.rstatus = 0)";
pstatusall = " and ((p.pstatus in (" +vm.stringval3+") and (pr.rstatus is null or p.rstatus = 0))";
}
if (vm.stringval4 != null)
{

View File

@ -106,8 +106,8 @@
{
<td>@d.edate.Value.ToShortDateString()</td>
}
<td>@d.stimestr</td>
<td>@d.istatusname</td>
<td>@(string.IsNullOrWhiteSpace(d.zstring3) ? "-" : d.zstring3)</td>
<td>@d.istatusname</td>@d.stimestr
@if (!ViewBag.IsSubAdmin96)
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
@ -160,6 +160,7 @@
var amsg;
function save(no) {
let attrdate = $("#stringval").val();
if (no == 2) { amsg = "출석"; }
else if (no == 0) { amsg = "결석"; }
else { amsg = "미입력"; }
@ -181,7 +182,7 @@
if (cuis != "") {
msg(cuis + "교육생들은 " + amsg + "처리가 불가능합니다.");
} else {
capp("/acommon/offattscdsave", { userinfos: userinfos, istatus: no }, "cboffattscdsave");
capp("/acommon/offattscdsave", { userinfos: userinfos, istatus: no, attrdate: attrdate, attr: no }, "cboffattscdsave");
}
}
}

View File

@ -1,5 +1,5 @@
@model NP.Model.VMLect
@{
@model NP.Model.VMLect
@{
var ev = Model.Lects.FirstOrDefault() ?? new NP.Model.Lect() { };
}
<form id="mform" method="post">
@ -103,7 +103,7 @@
<tr>
<th><input type="checkbox" onclick="javascript: checkall('excel1', this);" /></th>
<th width="20">No</th>
@if (Model.CMEV.cshape == 2)
@if(Model.CMEV.cshape == 2)
{
<th width="30">운영기수</th>
}
@ -118,7 +118,7 @@
<th>과제(@ev.sd0cnt)</th>
<th style="display:none;">토론(@ev.sd1cnt)</th>
<th>환산점수</th>
@if (Model.CMEV.isoffabs == 1)
@if(Model.CMEV.isoffabs == 1)
{
<th>집합교육출석여부</th>
}
@ -130,64 +130,67 @@
<tbody class="data" id="tbody1">
@foreach (var d in Model.Lects)
{
<tr>
<td><input type="checkbox" class="autocheck" value="@d.lectno" data-userno="@d.userno" /></td>
<td>@d.rnorvt</td>
@if (Model.CMEV.cshape == 2)
<tr>
<td><input type="checkbox" class="autocheck" value="@d.lectno" data-userno="@d.userno" /></td>
<td>@d.rnorvt</td>
@if(Model.CMEV.cshape == 2)
{
<td>@d.sseq</td>
}
<td>@d.isrebatename</td>
<td>@d.asname</td>
<td>@d.usernameid</td>
<td>@((Model.CM.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString())</td>
@if(Model.CMEV.cshape == 2)
{
if(d.iscomplete != 1)
{
<td>@d.sseq</td>
}
<td>@d.isrebatename</td>
<td>@d.asname</td>
<td>@d.usernameid</td>
<td>@((Model.CM.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString())</td>
@if (Model.CMEV.cshape == 2)
{
if (d.iscomplete != 1)
{
<td class="link text-center"><a href="#" onclick="javascript: openScd(@Model.CM.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
}
else
{
<td>@d.eend.ToShortDateString()</td>
}
<td class="link text-center">[1] <a href="#" onclick="javascript: openScd(@Model.CM.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
}
else
{
<td>@d.edate.Value.ToShortDateString()</td>
<td>[2] @d.eend.ToShortDateString()</td>
}
@if (!ViewBag.IsSubAdmin96)
{
<td class="link text-center"><a onclick="viewatt(@d.lectno)" href="#">@d.attrate %</a></td>
}
else
{
<td class="link text-center">@d.attrate %</td>
}
@*<td>@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>*@
<td>@(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
<td>@(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
<td style="display:none;">@( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>
<td>@(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString())</td>
@*<td>@((d.isrebate == 1 && Model.CMEV.midrfd < 1) || (d.isrebate == 0 && Model.CMEV.mid < 1) ? "-" : d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.finalrfd < 1) || (d.isrebate == 0 && Model.CMEV.final < 1) ? "-" : d.ex1cnt < 1 ? "-" : d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.subjectrfd < 1) || (d.isrebate == 0 && Model.CMEV.subject < 1) ? "-" : d.sd0cnt < 1 ? "-" : d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.discussrfd < 1) || (d.isrebate == 0 && Model.CMEV.discuss < 1) ? "-" : d.sd1cnt < 1 ? "-" : d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>*@
@if (Model.CMEV.isoffabs == 1)
{
<td class="link text-center"><a href="#" onclick="save4();">@d.istatusname</a></td>
}
<td>@(d.rs0lectcnt) / @(d.rs0cnt)</td>
@if (!ViewBag.IsSubAdmin96)
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
}
else
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename)</td>
}
@*<td><a style="@(d.iscomplete == 1 ? "":"display:none;")" href="#" class="btn btn-select btn-xxs" onclick="changecompt('@(d.completetime != null ? d.completetime.Value.ToString("yyyy-MM-dd") : "0001-01-01")','@d.username','@d.userid',@d.lectno,'@d.cshape')">변경</a></td>*@
</tr>
}
else
{
<td>[3] @d.edate.Value.ToShortDateString()</td>
}
@if (!ViewBag.IsSubAdmin96)
{
<td class="link text-center">[4] <a onclick="viewatt(@d.lectno)" href="#">@d.attrate %</a></td>
}
else
{
<td class="link text-center">[5] @d.attrate %</td>
}
@*<td>@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>*@
<td>[6] @(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
<td>[7] @(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
<td style="display:none;">[8] @( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>
<td>
[9] @(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString())
// @(d.apoint) @(d.mpoint) @(d.fpoint) @(d.spoint) @(d.dpoint)
</td>
@*<td>@((d.isrebate == 1 && Model.CMEV.midrfd < 1) || (d.isrebate == 0 && Model.CMEV.mid < 1) ? "-" : d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.finalrfd < 1) || (d.isrebate == 0 && Model.CMEV.final < 1) ? "-" : d.ex1cnt < 1 ? "-" : d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.subjectrfd < 1) || (d.isrebate == 0 && Model.CMEV.subject < 1) ? "-" : d.sd0cnt < 1 ? "-" : d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.discussrfd < 1) || (d.isrebate == 0 && Model.CMEV.discuss < 1) ? "-" : d.sd1cnt < 1 ? "-" : d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>*@
@if (Model.CMEV.isoffabs == 1)
{
<td class="link text-center">[10] <a href="#" onclick="save4();">@d.istatusname</a></td>
}
<td>[11] @(d.rs0lectcnt) / @(d.rs0cnt)</td>
@if (!ViewBag.IsSubAdmin96)
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">[12] @Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
}
else
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">[13] @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename)</td>
}
@*<td><a style="@(d.iscomplete == 1 ? "":"display:none;")" href="#" class="btn btn-select btn-xxs" onclick="changecompt('@(d.completetime != null ? d.completetime.Value.ToString("yyyy-MM-dd") : "0001-01-01")','@d.username','@d.userid',@d.lectno,'@d.cshape')">변경</a></td>*@
</tr>
}
</tbody>
</table>
@ -219,7 +222,7 @@
<h4><i class="fa fa-bars"></i> <span id="pcap">OFF출결관리</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
<br />
<table class="regtable">
<colgroup><col width="100" /><col /></colgroup>
<colgroup><col width="100"/><col/></colgroup>
<tr style="display:none;">
<th>회차선택</th>
<td>
@ -247,7 +250,7 @@
<td colspan="2">
<select id="cmisno" class="form-control" onchange="getoff()">
<option value="">신청교육일</option>
@foreach (var d in Model.CMinningscds)
@foreach(var d in Model.CMinningscds)
{
<option value="@d.cmisno">@d.estart.ToString("yyyy-MM-dd")</option>
}
@ -389,7 +392,7 @@
msg2("수료일자를 변경했습니다.", null, null, null, true);
submit("mform", 500, true);
} else { msgadmin2(); }
}
}
function save4() {
bglayer(); $("#thisbox2").slideDown("fast", function () { $("#thisbox2").scrollTop(0); });
if ($("#cmino option").length > 1) {

View File

@ -73,7 +73,7 @@ else
<td class="link text-center">
@if (d.estart != null)
{
<a style="color:#fff" onclick="reexam(@d.exno, @d.lectno)" href="#" class="btn btn-select btn-xxs">재응시</a>
<a style="color:#fff" onclick="reexam(@d.exno, @d.lectno, @d.extype)" href="#" class="btn btn-select btn-xxs">재응시</a>
}
</td>
<td class="link text-center">
@ -221,14 +221,14 @@ else
"</tr>").format(d.lectno, d.userno, d.rnorvt, d.isrebatename, getdb(d.asname)
, d.usernameid, d.estartymdhm, getdb(d.eend) == "" ? "" : "({0})".format(d.eendymdhm), d.eseterm, getdb(d.eip)
, d.estate, d.estatename, d.exno, d.tpoint
, (getdb(d.estart) != "") ? ("<a style=\"color:#fff;\" onclick=\"reexam({12}, {0})\" href=\"#\" class=\"btn btn-select btn-xxs\">재응시</a>") : "",(i+1)));
, (getdb(d.estart) != "") ? ("<a style=\"color:#fff;\" onclick=\"reexam({12}, {0}, " + d.extype +")\" href=\"#\" class=\"btn btn-select btn-xxs\">재응시</a>") : "",(i+1)));
});
if (_isprenext) {
viewex($("#tbody1 tr:eq(" + (_ridx + _saveidx - 1) + ")").attr("data-exno"), $("#tbody1 tr:eq(" + (_ridx + _saveidx - 1) + ")").attr("data-lectno"), _ridx + _saveidx);
}
}
function reexam(exno, lectno) {
capp("/acommon/reexam", { exno: exno, lectno: lectno }, "cbreexam");
function reexam(exno, lectno, extype) {
capp("/acommon/reexam", { exno: exno, lectno: lectno, extype: extype }, "cbreexam");
}
function cbreexam() {
if (capResult.code == 1000) {

View File

@ -80,7 +80,7 @@
<td>@d.usernameid</td>
<td class="estate@(d.sdstate)">@d.sdstatename</td>
<td><a class="btn btn-xxs btn-select" onclick="viewsd(@d.sdno, @d.lectno, @(idx++))" href="#">@d.cpoint2</a></td>
<td>@d.feedbox</td>
<td>@d.feedbox [@d.orgname]</td>
<td><a class="btn btn-xxs btn-select iscopy@(d.iscopy)" onclick="viewcopy(@d.sdno, @d.lectno)" href="#">@d.copyratename</a></td>
<td>@Html.Raw(d.submittimeip)</td>
<td>@Html.Raw(d.checktimeip)</td>

View File

@ -16,8 +16,9 @@
<tr>
<th>교육종료일</th>
<td>
<div class="col-md-6">
<div class="col-md-12">
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval) ? (DateTime?)null : Convert.ToDateTime(Model.stringval), new ViewDataDictionary { { "name", "stringval" } })
~ @Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval12) ? (DateTime?)null : Convert.ToDateTime(Model.stringval12), new ViewDataDictionary { { "name", "stringval12" } })
</div>
<input type="hidden" name="searchGo" value="1" />
</td>
@ -129,7 +130,23 @@
}
@section scripts{
<script>
function listgo() {
let eduEndDate1 = $("#stringval").val()
let eduEndDate2 = $("#stringval12").val()
if (eduEndDate1 != "" || eduEndDate2 != "") {
if (eduEndDate1 != "" && eduEndDate2 == "") {
msg("교육종료일 종료일자를 입력하세요")
return false;
}
if (eduEndDate1 == "" && eduEndDate2 != "") {
msg("교육종료일 시작일자를 입력하세요")
return false;
}
}
/*
let chkVal = $("#stringval").val()
let chkVal2 = $("#stringval3").val()

View File

@ -55,8 +55,8 @@
<!--<add key="talk" value="https://alimtalk-api.bizmsg.kr/v2/sender/send,?,?,?,?,?,023103312" />-->
<!--<add key="configpath" value="Product" />-->
<add key="configpath" value="ProductDev" />
<!--<add key="configpath" value="staging" />-->
<!--<add key="configpath" value="ProductDev" />-->
<add key="configpath" value="staging" />
<add key="lgdacomConfigPath" value="D:\3rdparti\lgdacomyicte" />

View File

@ -607,7 +607,7 @@ namespace NP.Base.Controllers
/// <param name="userinfos"></param>
/// <returns></returns>
[HttpPost]
public JsonResult offattscdsave(int istatus,String userinfos)
public JsonResult offattscdsave(int istatus,String userinfos, int attr = -999)
{
var lectnos = "";
var cmi = new CMInning() { Ds = new List<CMInning>() { }, uno = SUserInfo.UserNo, uip = GetUserIP() };
@ -624,7 +624,34 @@ namespace NP.Base.Controllers
}
cmi.lectnos = lectnos.Substring(1);
}
return JsonOK(Dao.Save("att.scd.save", cmi));
if(attr > -999)
{
//var kk = new Hashtable() { { "attrdate", attrdate } };
//return JsonOK(0);
//string cminos = "";
//foreach (var item in cmi.Ds)
//{
// cminos += (cminos == "" ? "" : ",") + item.cmino;
//}
//cmi.lectnos = lectnos;
cmi.uno = SUserInfo.UserNo;
cmi.uip = GetUserIP();
cmi.zstring0 = attr.ToString();
if (attr == 2)
{
return JsonOK(Dao.Save("att.scd.nowdate", cmi));
}
else
{
return JsonOK(Dao.Save("att.scd.attrnull", cmi));
}
}
else
{
return JsonOK(Dao.Save("att.scd.save", cmi));
}
}
/// <summary>
/// 강제출석처리
@ -697,9 +724,9 @@ namespace NP.Base.Controllers
/// <param name="lectno"></param>
/// <returns></returns>
[HttpPost]
public JsonResult ReExam(int exno, Int64 lectno)
public JsonResult ReExam(int exno, Int64 lectno, int extype)
{
return JsonOK(Dao.Save("lect.reexam", new Hashtable() { { "exno", exno }, { "lectno", lectno }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }) > 1 ? 1 : 0);
return JsonOK(Dao.Save("lect.reexam", new Hashtable() { { "exno", exno }, { "lectno", lectno }, { "extype", extype }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }) > 1 ? 1 : 0);
}
/// <summary>
/// 재응시처리로그
@ -740,7 +767,7 @@ namespace NP.Base.Controllers
/// <param name="cpoint"></param>
/// <returns></returns>
[HttpPost]
public JsonResult LectEXQPoint(int exno, Int64 lectno, int eqno, int cpoint)
public JsonResult LectEXQPoint(int exno, Int64 lectno, int eqno, int cpoint, int extype = 1)
{
IList<QuestionItem> qis = Dao.Get<QuestionItem>("lect.eqno.listforcheck", new Hashtable() { { "lectno", lectno }, { "eqno", eqno }, { "exno", exno } });
int? iscorrect = null;
@ -761,7 +788,7 @@ namespace NP.Base.Controllers
}
}
return JsonOK(Dao.Save("lect.lectexq.point", new Hashtable() { { "lectno", lectno }, { "exno", exno }, { "eqno", eqno },{"iscorrect"+(iscorrect == null ? "x" : ""),iscorrect }, { "cpoint", cpoint }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
return JsonOK(Dao.Save("lect.lectexq.point", new Hashtable() { { "lectno", lectno }, { "exno", exno }, { "eqno", eqno }, { "extype", extype }, {"iscorrect"+(iscorrect == null ? "x" : ""),iscorrect }, { "cpoint", cpoint }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
}
/// <summary>
/// KFCF잔재

View File

@ -70,6 +70,7 @@ namespace NP.Base.Controllers
}
var qis = Dao.Get<QuestionItem>("cr.questionitem.listforcheck", qnos);
var ue = new LectEX() {lectno=lectno, userno = SUserInfo.UserNo, uno = SUserInfo.UserNo, uip = GetUserIP(), exno = Exam.exno, cblock = cblock };
ue.extype = Exam.extype;
//ue.sip = SIP;
ue.UED = new List<LectEXQ>() { };
foreach (String sss in savedata.Split(';'))
@ -229,10 +230,10 @@ namespace NP.Base.Controllers
}
[HttpPost]
public JsonResult ReExamForUser(int exno, Int64 lectno)
public JsonResult ReExamForUser(int exno, Int64 lectno, int extype)
{
//재응시로그추가로인해 업데이트건 3개일때부터 정상처리
return JsonOK(Dao.Save("lect.reexam", new System.Collections.Hashtable() { { "exno", exno }, { "lectno", lectno }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }) > 2 ? 1 : 0);
return JsonOK(Dao.Save("lect.reexam", new System.Collections.Hashtable() { { "exno", exno }, { "lectno", lectno }, { "extype", extype }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }) > 2 ? 1 : 0);
}

View File

@ -126,8 +126,46 @@
,a.ispcs=case when a.ispcs is null then 1 else a.ispcs end
,a.ispce=case when a.ispce is null then 1 else a.ispce end;
</update>
<update id="att.scd.nowdate" parameterClass="cminning">
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
select a.lectno,b.cmino,0,<include refid="sql.now"></include>,<include refid="sql.now"></include>,2,<include refid="sql.now"></include>,null,#uno#,<include refid="sql.inv"></include>
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 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 (
<iterate property="Ds" open="" conjunction="union all" close=""> select #Ds[].lectno# lectno,#Ds[].cmino# cmino,#Ds[].istatus# istatus </iterate>
) a on lni.lectno = a.lectno and lni.cmino = a.cmino
set lni.stime=now(),lni.etime=now(), lni.istatus = 2
where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1;
</update>
<update id="att.scd.attrnull" parameterClass="cminning">
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
select a.lectno,b.cmino,0,<include refid="sql.now"></include>,<include refid="sql.now"></include>,2,<include refid="sql.now"></include>,null,#uno#,<include refid="sql.inv"></include>
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 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 (
<iterate property="Ds" open="" conjunction="union all" close=""> select #Ds[].lectno# lectno,#Ds[].cmino# cmino,#Ds[].istatus# istatus </iterate>
) a on lni.lectno = a.lectno and lni.cmino = a.cmino
set lni.stime=null,lni.etime=null
<isEqual property="zstring0" compareValue="-1">, lni.istatus = null</isEqual>
<isEqual property="zstring0" compareValue="0">, lni.istatus = 0</isEqual>
where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1
</update>
<update id="att.att.in" parameterClass="hashtable">
update lectinning set <include refid="sql.up"></include>
,lectno=#lectno#,cmino=#cmino#,totstudy=0
@ -184,22 +222,26 @@
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
select a.lectno,#cmino#,0,<include refid="sql.now"></include>,<include refid="sql.now"></include>,2,<include refid="sql.now"></include>,#statusreason#,#uno#,<include refid="sql.inv"></include>
from lect a
left outer join lectinning b on b.lectno=a.lectno and b.cmino=#cmino#
where a.lectno=#lectno# and a.status=1 and a.ischanged=0 and b.lectno is null;
from lect a
left outer join lectinning b on b.lectno=a.lectno and b.cmino=#cmino#
where a.lectno=#lectno# and a.status=1 and a.ischanged=0 and b.lectno is null;
update lect a
inner join (
select a.lectno,convert(100*count(c.lectno)/count(b.cmino), int) attrate
from lectinning a
inner join lect a2 on a2.lectno=a.lectno
inner join cminning b on b.cmno=a2.cmno and ifnull(b.isscd,0)=0
left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino and c.istatus=2
where a.lectno=#lectno# and a.cmino=#cmino# and a.istatus=2
group by a.lectno
) b on b.lectno=a.lectno
set a.attrate=b.attrate
,a.stime=case when a.stime is null then <include refid="sql.now"></include> else a.stime end
<!--진도율, lect.apoint, 진도율 환산점수 update #xodus-->
update lect a
inner join (
select a.lectno,convert(100*count(c.lectno)/count(b.cmino), int) attrate
from lectinning a
inner join lect a2 on a2.lectno=a.lectno
inner join cminning b on b.cmno=a2.cmno and ifnull(b.isscd,0)=0
left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino and c.istatus=2
where a.lectno=#lectno# and a.cmino=#cmino# and a.istatus=2
group by a.lectno
) b on b.lectno=a.lectno
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.stime=case when a.stime is null then <include refid="sql.now"></include> else a.stime end
,a.etime=case when a.etime is null then <include refid="sql.now"></include> else a.etime end
,a.sip=case when a.sip is null then #uip# else a.sip end
,a.eip=case when a.eip is null then #uip# else a.eip end

View File

@ -308,25 +308,30 @@
,a.etime=now()
,a.istatus=case when a.istatus &lt;&gt; 2 and c.atime * 60 &lt;= d.totstudy then 2 else a.istatus end
,a.finishtime=case when a.finishtime is null and c.atime * 60 &lt;= d.totstudy then now() else a.finishtime end
,a.eip=#uip#,a.ispce=#ispc#
,a.psec=#psec#
where a.lectno=#lectno# and a.cmino=#cmino#;
,a.eip=#uip#,a.ispce=#ispc#
,a.psec=#psec#
where a.lectno=#lectno# and a.cmino=#cmino#;
update lect a
inner join (
select a.lectno,truncate(count(c.lectno) / count(b.cmino) * 100, 0) attrate
from lect a
inner join cminning b on b.cmno=a.cmno and ifnull(b.isscd,0)=0
left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino and c.istatus=2
where a.lectno=#lectno# and a.userno=#userno#
group by a.lectno
) b on b.lectno=a.lectno
set a.attrate=b.attrate
,a.etime=now()
,a.eip=#uip#
,a.ispce=#ispc#
,udt=now(),uno=#uno#,uip=#uip#
where a.lectno=#lectno# and a.userno=#userno#;
<!--진도율, lect.apoint, 진도율 환산점수 update #xodus-->
update lect a
inner join (
select a.lectno,truncate(count(c.lectno) / count(b.cmino) * 100, 0) attrate
from lect a
inner join cminning b on b.cmno=a.cmno and ifnull(b.isscd,0)=0
left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino and c.istatus=2
where a.lectno=#lectno# and a.userno=#userno#
group by a.lectno
) b on b.lectno=a.lectno
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.etime=now()
,a.eip=#uip#
,a.ispce=#ispc#
,a.tpoint
,udt=now(),uno=#uno#,uip=#uip#
where a.lectno=#lectno# and a.userno=#userno#;
</update>
<select id="cr.inningchange.pre" parameterClass="hashtable" resultClass="lectinning">
select a.cmino,b.isseq,c.istatus,d.istatus preistatus,a.isrebate,a.iseq,a2.cmino precmino
@ -573,10 +578,10 @@
<isNotNull property="orderby">order by $orderby$</isNotNull>
</select>
<select id="cr.userexam.detailforexamforsubmit" parameterClass="hashtable" resultClass="cmex">
select a.exno,a.exname,a2.sstime,a2.setime,a.tpoint,a.etime,a.qcount,b.estart,a.edesc,TIMESTAMPDIFF(MINUTE, now(), date_add(ifnull(b.estart, now()), interval a.etime MINUTE)) rtime
from cmex a
inner join cm a2 on a2.cmno=a.cmno
inner join lectex b on b.lectno=#lectno# and b.exno=a.exno and b.eend is null and (a.etime = 0 or date_add(ifnull(b.estart, now()), interval (a.etime + 1) MINUTE) &gt; now())
select a.exno,a.exname,a2.sstime,a2.setime,a.tpoint,a.etime,a.qcount,b.estart,a.edesc, a.extype,TIMESTAMPDIFF(MINUTE, now(), date_add(ifnull(b.estart, now()), interval a.etime MINUTE)) rtime
from cmex a
inner join cm a2 on a2.cmno=a.cmno
inner join lectex b on b.lectno=#lectno# and b.exno=a.exno and b.eend is null and (a.etime = 0 or date_add(ifnull(b.estart, now()), interval (a.etime + 1) MINUTE) &gt; now())
inner join lect c on c.lectno=b.lectno and c.userno=#userno#
where a.exno=#exno#
</select>
@ -587,37 +592,62 @@
where a.qno in ($qnos$) and a.isright=1 and a.isdel=0
order by a.qno, a.qino
</select>
<update id="cr.examsubmit" parameterClass="lectex">
update lectexq a
inner join lectex d on d.lectno=a.lectno and d.exno=a.exno and d.eend is null
inner join lect d2 on d2.lectno=d.lectno and d2.userno=#userno#
inner join cmex c on c.exno=a.exno
inner join (
<iterate property="UED" open="" conjunction="union all" close="">
select #exno# exno, #UED[].eqno# eqno, #UED[].atext# atext, #UED[].qinos# qinos, #UED[].iscorrect# iscorrect
</iterate>
) b on b.exno=a.exno and b.eqno=a.eqno
set a.atext=b.atext, a.qinos=b.qinos,a.udt=now(),a.uno=#uno#,a.uip=#uip#
,a.cpoint=case when b.iscorrect = 1 then a.dpoint else 0 end
,a.iscorrect=b.iscorrect
where a.lectno=#lectno# and a.exno=#exno#;
<!--시험제출-->
<update id="cr.examsubmit" parameterClass="lectex">
update lectexq a
inner join lectex d on d.lectno=a.lectno and d.exno=a.exno and d.eend is null
inner join lect d2 on d2.lectno=d.lectno and d2.userno=#userno#
inner join cmex c on c.exno=a.exno
inner join (
<iterate property="UED" open="" conjunction="union all" close="">
select #exno# exno, #UED[].eqno# eqno, #UED[].atext# atext, #UED[].qinos# qinos, #UED[].iscorrect# iscorrect
</iterate>
) b on b.exno=a.exno and b.eqno=a.eqno
set a.atext=b.atext, a.qinos=b.qinos,a.udt=now(),a.uno=#uno#,a.uip=#uip#
,a.cpoint=case when b.iscorrect = 1 then a.dpoint else 0 end
,a.iscorrect=b.iscorrect
where a.lectno=#lectno# and a.exno=#exno#;
update lectex a
inner join lect a2 on a2.lectno=a.lectno and a2.userno=#userno#
inner join (
select a.exno, sum(ifnull(a.cpoint, 0)) tpoint
from lectexq a
where a.lectno=#lectno# and a.exno=#exno#
group by a.exno
) b on b.exno=a.exno
inner join cmex c on c.exno=a.exno
set a.udt=now(),a.uno=#userno#,a.uip=#uip#
<isEqual property="issubmit" compareValue="1">,a.eend=now()</isEqual>
, a.tpoint=b.tpoint
<!--, a.overtime=case when #zstring20# is null then a.overtime else now() end-->
,a.cblock=#cblock#
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null
update lectex a
inner join lect a2 on a2.lectno=a.lectno and a2.userno=#userno#
inner join (
select a.exno, sum(ifnull(a.cpoint, 0)) tpoint
from lectexq a
where a.lectno=#lectno# and a.exno=#exno#
group by a.exno
) b on b.exno=a.exno
inner join cmex c on c.exno=a.exno
set a.udt=now(),a.uno=#userno#,a.uip=#uip#
<isEqual property="issubmit" compareValue="1">,a.eend=now()</isEqual>
, a.tpoint=b.tpoint
<!--, a.overtime=case when #zstring20# is null then a.overtime else now() end-->
,a.cblock=#cblock#
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null;
<!--최종평가, lect.fpoint, 진도율 환산점수 update #xodus-->
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
<isEqual property="extype" compareValue="1">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.fpoint = round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)
,a.tpoint = (round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)) + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0)
where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#;
</isEqual>
<isEqual property="extype" compareValue="0">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.mpoint = round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)
,a.tpoint = (round((le.tpoint / ce.tpoint * 100) * cv.final / 100,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#;
</isEqual>
</update>
<!--시험 임시저장-->
<update id="cr.examsubmitbackup" parameterClass="lectex">
update lectexq a
inner join lect a2 on a2.lectno=a.lectno and a2.userno=#userno#
@ -645,7 +675,30 @@
set a.udt=now(),a.uno=#userno#
, a.tpoint=b.tpoint
<!--, a.overtime=case when #zstring20# is null then a.overtime else now() end-->
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null;
<!--최종평가, lect.fpoint, 진도율 환산점수 update #xodus-->
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
<isEqual property="extype" compareValue="1">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.fpoint = round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)
,a.tpoint = (round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)) + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0)
where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#;
</isEqual>
<isEqual property="extype" compareValue="0">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.mpoint = round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)
,a.tpoint = (round((le.tpoint / ce.tpoint * 100) * cv.final / 100,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#;
</isEqual>
</update>
<select id="cr.lectsd" parameterClass="hashtable" resultClass="lectsd">
select a.lectno,a.attrate,a.cmno,a.sdate,a.edate
@ -1321,7 +1374,7 @@
<isNotEmpty property="pstatus" prepend="and">
<isEqual property="pstatus" compareValue="p21">(p.pstatus in (21) and p.rstatus = 0)</isEqual>
<isEqual property="pstatus" compareValue="p22">(p.pstatus in (22) and p.rstatus = 0)</isEqual>
<isEqual property="pstatus" compareValue="p1">(p.pstatus in (1) and p.rstatus = 0 and pri.pino is null)</isEqual>
<isEqual property="pstatus" compareValue="p1">(p.pstatus in (1) and (p.rstatus = 0 or pri.pino is null))</isEqual>
<isEqual property="pstatus" compareValue="rf1">(pr.rfdno is not null and pr.rstatus = 0)</isEqual>
<isEqual property="pstatus" compareValue="r1">(pi.rstatus=1 and p.payamt>p.refundamt)</isEqual>
<isEqual property="pstatus" compareValue="r2">(p.rstatus > 0 and p.payamt=p.refundamt)</isEqual>

View File

@ -1062,7 +1062,8 @@
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) &gt;= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) &lt;= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') >= #edate#</isNotNull>
<isNotNull property="edate2" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') &lt;= #edate2#</isNotNull>
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>

View File

@ -774,7 +774,7 @@
from (
select a.lectno,c.cmino,c.cmno,c.cshape,c.cname,b2.isoffabs
,a.isrebate,p.payoktime,a.iscomplete, a.stime
,a.sdate,a.edate
,a.sdate,a.edate, date_format(g.stime, '%Y-%m-%d') zstring3
,a.cmisno
,c.sseq,f.cname studyplacename
,c.estart,c.eend
@ -863,12 +863,12 @@
from (
select a.lectno,c.cmino,c.cmno,c.cshape,c.cname,b2.isoffabs
,a.isrebate,p.payoktime,a.iscomplete, a.stime
,a.sdate,a.edate
,a.sdate,a.edate, date_format(g.stime, '%Y-%m-%d') zstring3
,a.cmisno
,c.sseq,f.cname studyplacename
,c.estart,c.eend
,e.userno,e.userid, e.username
,CAST(AES_DECRYPT(UNHEX(e.mobile), <include refid="sql.digest"></include>) AS char) mobile
,CAST(AES_DECRYPT(UNHEX(e.mobile), <include refid="sql.digest"></include>) AS char) mobile
,CAST(AES_DECRYPT(UNHEX(e.email), <include refid="sql.digest"></include>) AS char) email
,g.istatus
,cc.cname zstring0
@ -1033,14 +1033,14 @@
<!--order by cdt desc-->
</select>
<select id="lect.lectexes" parameterClass="hashtable" resultClass="lectex">
select a.*
from (
select a.lectno,a.userno,a.cmno,a.isrebate
,b.exno
,c.estart,c.eend,c.eip,c.tpoint,c.recount,c.entercount,c.cblock
,d.username,d.userid
,e.asname
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">d.username</isNull>) rno
select a.*
from (
select a.lectno,a.userno,a.cmno,a.isrebate
,b.exno
,c.estart,c.eend,c.eip,c.tpoint,c.recount,c.entercount,c.cblock
,d.username,d.userid
,e.asname, b.extype
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">d.username</isNull>) rno
,count(a.cdt) over() pagetotalcount
from lect a
inner join cmex b on b.isdel=0 <isNotNull property="exno">and b.exno=#exno#</isNotNull>
@ -1089,7 +1089,8 @@
<isNotNull property="extype">and b.extype = #extype#</isNotNull>
<isNotNull property="cmno">and a.cmno = #cmno#</isNotNull>
<isNotNull property="isrebate">and a.isrebate=#isrebate#</isNotNull>
<isNotNull property="edate">and (date_format((case when b2.cshape = 2 and f.eend is not null then f.eend else a.edate end),'%Y-%m-%d') = #edate#)</isNotNull>
<isNotNull property="edate">and (date_format((case when b2.cshape = 2 and f.eend is not null then f.eend else a.edate end),'%Y-%m-%d') >= #edate#)</isNotNull>
<isNotNull property="edate2">and (date_format((case when b2.cshape = 2 and f.eend is not null then f.eend else a.edate end),'%Y-%m-%d') &lt;= #edate2#)</isNotNull>
<isNotNull property="cshape">and b2.cshape = #cshape#</isNotNull>
<isNotEmpty property="cname">and b2.cname like concat('%',#cname#,'%')</isNotEmpty>
<isNotEmpty property="cnamestr">and b2.cname like concat('%',#cname#,'%')</isNotEmpty>
@ -1130,6 +1131,28 @@
set a.atext=null,a.qinos=null,a.cpoint=0,a.iscorrect=null
where a.lectno=#lectno# and a.exno=#exno#;
<!--최종평가, lect.fpoint, 진도율 환산점수 update #xodus-->
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
<isEqual property="extype" compareValue="1">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,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)
where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#;
</isEqual>
<isEqual property="extype" compareValue="0">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,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)
where ce.extype = 0 and a.lectno=#lectno# and le.exno = #exno#;
</isEqual>
<!--delete from lectexq where lectno=#lectno# and exno=#exno# and eqno in (
select a.eqno
from (
@ -1336,8 +1359,31 @@
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.tpoint=b.tpoint
,a.rechecktime=<include refid="sql.now"></include>
where a.lectno=#lectno# and a.exno=#exno#
</update>
where a.lectno=#lectno# and a.exno=#exno#;
<!--최종평가, lect.fpoint, 진도율 환산점수 update #xodus-->
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
<isEqual property="extype" compareValue="1">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.fpoint = round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)
,a.tpoint = (round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)) + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0)
where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#;
</isEqual>
<isEqual property="extype" compareValue="0">
update lect a
inner join lectex le on a.lectno = le.lectno
inner join cmex ce on a.cmno = ce.cmno and ce.isdel = 0
inner join cmev cv on a.cmno = cv.cmno
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
,a.mpoint = round((le.tpoint / ce.tpoint * 100) * cv.final / 100,0)
,a.tpoint = (round((le.tpoint / ce.tpoint * 100) * cv.final / 100,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#;
</isEqual>
</update>
<select id="lect.lectsds" parameterClass="hashtable" resultClass="lectsd">
select a.lectno,a.userno,a.cmno,a.isrebate
,b.sdno
@ -1392,7 +1438,10 @@
left outer join comcode i on i.ccode = h.studyplace and i.isuse=1
where a.status=1 and a.ischanged=0
<isNotNull property="edate">
<isNotEmpty property="edate">and date_format((case when g.cshape = 2 and h.eend is not null then h.eend else a.edate end),'%Y-%m-%d') = #edate#</isNotEmpty>
<isNotEmpty property="edate">and date_format((case when g.cshape = 2 and h.eend is not null then h.eend else a.edate end),'%Y-%m-%d') >= #edate#</isNotEmpty>
</isNotNull>
<isNotNull property="edate2">
<isNotEmpty property="edate">and date_format((case when g.cshape = 2 and h.eend is not null then h.eend else a.edate end),'%Y-%m-%d') &lt;= #edate2#</isNotEmpty>
</isNotNull>
<isNotNull property="cshape">
<isNotEmpty property="cshape">and g.cshape = #cshape#</isNotEmpty>

View File

@ -18,7 +18,7 @@
}
</table>
<ul class="lctBtn col1">
@if(Model.LectEX.eend == null && (Model.LectEX.estart == null || Model.LectEX.relaylimit.Value >= Model.LectEX.entercount))
@if (Model.LectEX.eend == null && (Model.LectEX.estart == null || Model.LectEX.relaylimit.Value >= Model.LectEX.entercount))
{
<li><a href="#" class="bk" onclick="goexam()">응시하기</a></li>
}
@ -29,8 +29,9 @@
}
@if (Model.LectEX.edate > DateTime.Now && Model.LectEX.estart != null && Model.LectEX.isreexamable == 1 && Model.LectEX.iscomplete != 1)
{
<li><a href="#" class="bk" onclick="javascript:reexam(@Model.LectEX.exno,@Model.LectEX.lectno)">재응시</a></li>
<li><a href="#" class="bk" onclick="javascript:reexam(@Model.LectEX.exno,@Model.LectEX.lectno,@Model.LectEX.extype)">재응시</a></li>
}
</ul>
<form id="mform" action="/CRoom/Estimation?@Model.croomparam" method="get">
@Html.HiddenFor(m => m.croomlectno)
@ -81,11 +82,11 @@
}
}
}
function reexam(exno, lectno) {
confirmtoggle(true, "이전 시험기록을 초기화하고 다시 시험에 응시하시겠습니까? ", "gogo(" + exno + "," + lectno + ")");
function reexam(exno, lectno, extype) {
confirmtoggle(true, "이전 시험기록을 초기화하고 다시 시험에 응시하시겠습니까? ", "gogo(" + exno + "," + lectno + "," + extype + ")");
}
function gogo(exno, lectno) {
capp("/fcommon/reexamforuser", { exno: exno, lectno: lectno }, "cbreexam");
function gogo(exno, lectno, extype) {
capp("/fcommon/reexamforuser", { exno: exno, lectno: lectno, extype: extype }, "cbreexam");
}
function cbreexam() {
if (capResult.code == 1000) {

View File

@ -41,8 +41,8 @@
<add key="daokey" value="ynictelms2020" />
<!--<add key="configpath" value="Product" />-->
<add key="configpath" value="ProductDev" />
<!--<add key="configpath" value="Staging" />-->
<!--<add key="configpath" value="ProductDev" />-->
<add key="configpath" value="Staging" />
<add key="thumbnailexe" value="D:\\dev_tool\\ffmpeg.exe" />

View File

@ -1341,9 +1341,18 @@ namespace NP.Model
{
get
{
return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실";
if(string.IsNullOrWhiteSpace(zstring3))
{
return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실";
}
else
{
return "출석";
}
}
}
public int? scdtype { get; set; }
public int? isoffabs { get; set; }
public String ex0point