This commit is contained in:
parent
648caf938e
commit
0e1de85fae
|
|
@ -182,6 +182,20 @@ namespace NP.Base.Controllers
|
|||
}
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult LectComplete(Int64 lectno)
|
||||
{
|
||||
var ispass = Dao.Get<Lect>("grade.ispass", new Hashtable() { { "lectno", lectno } } ).FirstOrDefault().ispass;
|
||||
if (ispass == 1)
|
||||
{
|
||||
return JsonOK(Dao.Save("grade.lectcomplete2", new Hashtable() { { "lectno", lectno }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
|
||||
}
|
||||
else
|
||||
{
|
||||
return JsonBack(new JsonRtn() { code = 1, msg = "수료조건이 충족되지 않았습니다. 수료조건을 충족한 이후 요청해주세요" });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<resultMaps></resultMaps>
|
||||
<statements>
|
||||
<select id="cr.main.mygrade" parameterClass="hashtable" resultClass="lect">
|
||||
select b.isrebate,b.iscomplete,b.attrate
|
||||
select b.lectno, b.isrebate,b.iscomplete,b.attrate
|
||||
,a.apoint
|
||||
,a.ex0cnt,a.ex0lectcnt,a.ex0lectpoint,a.mpoint
|
||||
,a.ex1cnt,a.ex1lectcnt,a.ex1lectpoint,a.fpoint
|
||||
|
|
|
|||
|
|
@ -385,7 +385,9 @@
|
|||
left outer join comcode tm on tm.isuse=1 and tm.ccode = pl.typeman
|
||||
left outer join comcode te on te.isuse=1 and te.ccode = pl.typeedu
|
||||
left outer join cminningscd cs on cs.cmisno = pl.cmisno
|
||||
where l.lectno in ($lectnos$)
|
||||
where 1=1
|
||||
<isNotNull property="lectnos">and l.lectno in ($lectnos$)</isNotNull>
|
||||
<isNotNull property="lectno">and l.lectno =#lectno#</isNotNull>
|
||||
) t1
|
||||
left outer join (
|
||||
select date_format(l.cdt, '%Y') cyear,max(substring(l.completeno, -6)) seqNo
|
||||
|
|
@ -432,6 +434,16 @@
|
|||
where c.status=1 and c.ischanged=0 and a2.cmno in ($cmnos$)
|
||||
group by b.cmno,c.lectno
|
||||
</select>
|
||||
|
||||
<select id="grade.ispass" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
<include refid="grade.query"></include>
|
||||
) a
|
||||
<dynamic prepend="where">
|
||||
<isNotNull property="lectno" prepend="and">a.lectno = #lectno#</isNotNull>
|
||||
</dynamic>
|
||||
</select>
|
||||
</statements>
|
||||
</sqlMap>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
@{
|
||||
|
||||
}
|
||||
<h3 class="grdTitle">수료여부 : <span>@(Model.Lect.iscomplete == null ? "처리중" : Model.Lect.iscompletename)</span></h3>
|
||||
|
||||
<h3 class="grdTitle">
|
||||
수료여부 : <span>@(Model.Lect.iscomplete == null || Model.Lect.iscomplete == 0 ? "미수료" : "수료")</span>
|
||||
<span style="color:black">@(Model.Lect.iscomplete == null || Model.Lect.iscomplete == 0 ? "(나의성적이 수료기준을 충족하였을 경우 아래 수료요청 버튼을 클릭해주세요)" : "")</span>
|
||||
</h3>
|
||||
<table class="evaTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -36,22 +40,21 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>나의성적</td>
|
||||
@if (Model.Lect.iscomplete == null)
|
||||
{
|
||||
<td colspan="6">공개전</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@(Model.Lect.attrate)%(@(Model.Lect.attrate)점)</td>
|
||||
<td>@(Model.Lect.ex0lectpoint)점</td>
|
||||
<td>@(Model.Lect.ex1lectpoint)점</td>
|
||||
<td>@(Model.Lect.sd0lectpoint)점</td>
|
||||
<td>@(Model.Lect.sd1lectpoint)점</td>
|
||||
<td class="red">@(Model.Lect.apoint + Model.Lect.mpoint + Model.Lect.fpoint + Model.Lect.spoint + Model.Lect.dpoint)점</td>
|
||||
}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@if (Model.Lect.iscomplete == null || Model.Lect.iscomplete == 0)
|
||||
{
|
||||
<div class="notiBtn bot">
|
||||
<a href="#" onclick="save()">수료 요청</a>
|
||||
</div>
|
||||
}
|
||||
@section styles{
|
||||
|
||||
}
|
||||
|
|
@ -64,5 +67,21 @@ else
|
|||
|
||||
});
|
||||
|
||||
function save() {
|
||||
if (confirm("수료 요청하시겠습니까?")) {
|
||||
capp("/fcommon/lectcomplete", { lectno: @Model.Lect.lectno}, "cbsave");
|
||||
}
|
||||
}
|
||||
function cbsave() {
|
||||
if (capResult.code == 1000) {
|
||||
msg("수료 처리했습니다.", 0, null, null, "reload()");
|
||||
} else {
|
||||
msg(capResult.msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
function reload() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
|
@ -1168,6 +1168,7 @@ namespace NP.Model
|
|||
}
|
||||
public String pgkey { get; set; }
|
||||
public String itemname { get; set; }
|
||||
public int? ispass { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 자격검정시험
|
||||
|
|
|
|||
Loading…
Reference in New Issue