<신규개발>

1. PMS NO : NULL
2. (주요)작업내용 
(1) Base/Controller/FCommonCRoom.cs
    BO/Views/cm/cmregex.cshtml
    Dao/DB/DB1.Scheme.txt
    Dao/MyBatis/Maps/CM.xml
    Dao/MyBatis/Maps/CRoom.xml
    FO/Views/CRoom/EstimationExam.cshtml
    Model/CM.cs
 -  사용자 재응시기능 추가

<기능개선>
1. PMS NO : NULL
2. (주요)작업내용 
(1) FO/Controllers/AccountController.cs
 -  가상계좌 입금 로그 정리(테스트용으로 쓴부분)
This commit is contained in:
kdh0120 2021-05-17 01:14:33 +00:00
parent 32a885406d
commit 4a1c5c0d64
8 changed files with 38 additions and 11 deletions

View File

@ -143,6 +143,10 @@
<label class="col-sm-4 col-md-2 control-label">이어보기설정</label> <label class="col-sm-4 col-md-2 control-label">이어보기설정</label>
<div class="col-sm-8 col-md-10" @Html.Partial("./Partial/Radio", ":무제한;1:1회;2:2회;0:미허용", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMEX.relaylimit" }, { "checked", Model.CMEX.relaylimit }, { "disabled", Model.examsavable } }) (시험응시화면이 닫혔을 경우, 제한시간 내 다시 응시할 수 있는 기준을 설정)</div> <div class="col-sm-8 col-md-10" @Html.Partial("./Partial/Radio", ":무제한;1:1회;2:2회;0:미허용", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMEX.relaylimit" }, { "checked", Model.CMEX.relaylimit }, { "disabled", Model.examsavable } }) (시험응시화면이 닫혔을 경우, 제한시간 내 다시 응시할 수 있는 기준을 설정)</div>
</div> </div>
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">재응시허용</label>
<div class="col-sm-8 col-md-10" @Html.Partial("./Partial/Radio", "1:예;0:아니오", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMEX.isreexamable" }, { "checked", Model.CMEX.exno < 1 ? 1 : Model.CMEX.isreexamable } })</div>
</div>
<div class="line line-dashed line-lg pull-in"></div><div class="form-group"> <div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label">시험결과공개</label> <label class="col-sm-4 col-md-2 control-label">시험결과공개</label>
<div class="col-sm-8 col-md-10" @Html.Partial("./Partial/Radio", "0:비공개;1:공개", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMEX.isresultopen" }, { "checked", Model.CMEX.isresultopen } })</div> <div class="col-sm-8 col-md-10" @Html.Partial("./Partial/Radio", "0:비공개;1:공개", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMEX.isresultopen" }, { "checked", Model.CMEX.isresultopen } })</div>

View File

@ -196,6 +196,11 @@ namespace NP.Base.Controllers
} }
} }
[HttpPost]
public JsonResult ReExamForUser(int exno, Int64 lectno)
{
return JsonOK(Dao.Save("lect.reexam", new System.Collections.Hashtable() { { "exno", exno }, { "lectno", lectno }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }) > 1 ? 1 : 0);
}
} }

View File

@ -532,6 +532,7 @@ create table cmex (
,isusebackup tinyint not null ,isusebackup tinyint not null
,isseq tinyint not null ,isseq tinyint not null
,isresultopen tinyint not null default 0 ,isresultopen tinyint not null default 0
,isreexamable tinyint not null default 0
,isdel tinyint not null ,isdel tinyint not null
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
,primary key(exno)); ,primary key(exno));

View File

@ -704,7 +704,7 @@
<select id="cm.cmexes" parameterClass="hashtable" resultClass="cmex"> <select id="cm.cmexes" parameterClass="hashtable" resultClass="cmex">
select a.* select a.*
from ( from (
select a.exno,a.cmno,a.extype,a.exname,a.edesc,a.etime,a.econdition,a.evtype,a.eqtype,a.israndq,a.israndqi,a.qcount,a.isblur,a.tpoint,a.relaylimit,a.isusebackup,a.isseq,a.isresultopen,a.cdt,a.udt select a.exno,a.cmno,a.extype,a.exname,a.edesc,a.etime,a.econdition,a.evtype,a.eqtype,a.israndq,a.israndqi,a.qcount,a.isblur,a.tpoint,a.relaylimit,a.isusebackup,a.isseq,a.isresultopen,a.isreexamable,a.cdt,a.udt
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.cdt</isNull>) rno ,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.cdt</isNull>) rno
,count(a.cno) over() pagetotalcount ,count(a.cno) over() pagetotalcount
from cmex a from cmex a
@ -780,7 +780,7 @@
</select> </select>
<update id="cm.cmex.savetop" parameterClass="cmex"> <update id="cm.cmex.savetop" parameterClass="cmex">
UPDATE cmex SET <include refid="sql.up"></include>,exname=#exname#,edesc=#edesc#,econdition=#econdition#,isblur=#isblur#,isusebackup=#isusebackup# UPDATE cmex SET <include refid="sql.up"></include>,exname=#exname#,edesc=#edesc#,econdition=#econdition#,isblur=#isblur#,isusebackup=#isusebackup#
,isseq=#isseq#,isresultopen=#isresultopen#,etime=#etime# ,isseq=#isseq#,isreexamable=#isreexamable#,isresultopen=#isresultopen#,etime=#etime#
where exno=#exno# where exno=#exno#
</update> </update>
<select id="cm.cmex.extype1count" parameterClass="hashtable" resultClass="int"> <select id="cm.cmex.extype1count" parameterClass="hashtable" resultClass="int">
@ -790,8 +790,8 @@
</select> </select>
<insert id="cm.cmex.in" parameterClass="cmex"> <insert id="cm.cmex.in" parameterClass="cmex">
INSERT INTO cmex INSERT INTO cmex
(cmno,extype,exname,edesc,etime,econdition,evtype,eqtype,israndq,israndqi,qcount,isblur,tpoint,relaylimit,isusebackup,isseq,isresultopen,isdel,<include refid="sql.inc"></include>) (cmno,extype,exname,edesc,etime,econdition,evtype,eqtype,israndq,israndqi,qcount,isblur,tpoint,relaylimit,isusebackup,isseq,isreexamable,isresultopen,isdel,<include refid="sql.inc"></include>)
values (#cmno#,#extype#,#exname#,#edesc#,#etime#,#econdition#,#evtype#,#eqtype#,#israndq#,#israndqi#,#qcount#,#isblur#,#tpoint#,#relaylimit#,#isusebackup#,#isseq#,#isresultopen#,0,<include refid="sql.inv"></include>) values (#cmno#,#extype#,#exname#,#edesc#,#etime#,#econdition#,#evtype#,#eqtype#,#israndq#,#israndqi#,#qcount#,#isblur#,#tpoint#,#relaylimit#,#isusebackup#,#isseq#,#isreexamable#,#isresultopen#,0,<include refid="sql.inv"></include>)
<selectKey type="post" property="exno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey> <selectKey type="post" property="exno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
</insert> </insert>
<update id="cm.cmex.up" parameterClass="cmex"> <update id="cm.cmex.up" parameterClass="cmex">
@ -811,6 +811,7 @@
,relaylimit =#relaylimit# ,relaylimit =#relaylimit#
,isusebackup =#isusebackup# ,isusebackup =#isusebackup#
,isseq =#isseq# ,isseq =#isseq#
,isreexamable =#isreexamable#
,isresultopen=#isresultopen# ,isresultopen=#isresultopen#
where exno=#exno# where exno=#exno#
</update> </update>

View File

@ -486,9 +486,9 @@
order by a.dtype,a.rno order by a.dtype,a.rno
</select> </select>
<select id="cr.lectex" parameterClass="hashtable" resultClass="lectex"> <select id="cr.lectex" parameterClass="hashtable" resultClass="lectex">
select a.lectno,a.attrate select a.lectno,a.attrate,a.iscomplete
,b.sstime,b.setime ,b.sstime,b.setime
,c.exno,c.exname,c.extype,c.edesc,c.econdition,c.etime,c.evtype,c.eqtype,c.israndq,c.israndqi,c.qcount,c.isblur,c.tpoint,ifnull(c.relaylimit,999) relaylimit,c.isusebackup,c.isseq,c.isresultopen ,c.exno,c.exname,c.extype,c.edesc,c.econdition,c.etime,c.evtype,c.eqtype,c.israndq,c.israndqi,c.qcount,c.isblur,c.tpoint,ifnull(c.relaylimit,999) relaylimit,c.isusebackup,c.isseq,c.isreexamable,c.isresultopen
,d.lectno exlectno,d.estart,d.eend,d.tpoint,d.recount,d.rechecktime,ifnull(d.entercount,0) entercount,d.cblock ,d.lectno exlectno,d.estart,d.eend,d.tpoint,d.recount,d.rechecktime,ifnull(d.entercount,0) entercount,d.cblock
,case when a.etime = 0 then 99999999 else TIMESTAMPDIFF(MINUTE, now(), date_add(ifnull(d.estart, now()), interval c.etime MINUTE)) end rtime ,case when a.etime = 0 then 99999999 else TIMESTAMPDIFF(MINUTE, now(), date_add(ifnull(d.estart, now()), interval c.etime MINUTE)) end rtime
,d.recount ,d.recount

View File

@ -891,7 +891,6 @@ namespace NP.FO.Controllers
public String XPayVBankMoney() public String XPayVBankMoney()
{ {
SetError("Account : XPAYVBankMoney");
var x = new Xpay(); var x = new Xpay();
x.LGD_RESPCODE = Request.Params.Get("LGD_RESPCODE"); x.LGD_RESPCODE = Request.Params.Get("LGD_RESPCODE");
x.LGD_RESPMSG = Request.Params.Get("LGD_RESPMSG"); x.LGD_RESPMSG = Request.Params.Get("LGD_RESPMSG");
@ -956,7 +955,6 @@ namespace NP.FO.Controllers
try try
{ {
SetError("Account : XPAYVBankMoney : 959");
// (3) Init_TX: 메모리에 mall.conf, lgdacom.conf 할당 및 트랜잭션의 고유한 키 TXID 생성 // (3) Init_TX: 메모리에 mall.conf, lgdacom.conf 할당 및 트랜잭션의 고유한 키 TXID 생성
xpay.Init_TX(x.LGD_MID); xpay.Init_TX(x.LGD_MID);
x.LGD_HASHDATA2 = xpay.GetHashDataCas(x.LGD_MID, x.LGD_OID, x.LGD_AMOUNT, x.LGD_RESPCODE, x.LGD_TIMESTAMP); x.LGD_HASHDATA2 = xpay.GetHashDataCas(x.LGD_MID, x.LGD_OID, x.LGD_AMOUNT, x.LGD_RESPCODE, x.LGD_TIMESTAMP);
@ -978,7 +976,6 @@ namespace NP.FO.Controllers
String resultMSG = "결제결과 상점 DB처리(LGD_CASNOTEURL) 결과값을 입력해 주시기 바랍니다."; String resultMSG = "결제결과 상점 DB처리(LGD_CASNOTEURL) 결과값을 입력해 주시기 바랍니다.";
if (x.LGD_HASHDATA2.Equals(x.LGD_HASHDATA)) if (x.LGD_HASHDATA2.Equals(x.LGD_HASHDATA))
{ //해쉬값 검증이 성공이면 { //해쉬값 검증이 성공이면
SetError("Account : XPAYVBankMoney : 981 : "+x.LGD_RESPCODE);
if (("0000".Equals(x.LGD_RESPCODE))) if (("0000".Equals(x.LGD_RESPCODE)))
{ //결제가 성공이면 { //결제가 성공이면
if ("R".Equals(x.LGD_CASFLAG)) if ("R".Equals(x.LGD_CASFLAG))
@ -1009,7 +1006,6 @@ namespace NP.FO.Controllers
}; };
if (Dao.Save("pay.paylect.vbankin", payvbankin) < 3) if (Dao.Save("pay.paylect.vbankin", payvbankin) < 3)
{ {
SetError("Account : XPAYVBankMoney : 1009");
//상품구매완료 처리 (최소 3건 업데이트 (payvbankin, pay) //상품구매완료 처리 (최소 3건 업데이트 (payvbankin, pay)
return "FAIL"; return "FAIL";
} }
@ -1032,7 +1028,6 @@ namespace NP.FO.Controllers
* "OK" * "OK"
*/ */
//if( 결제실패 상점처리결과 성공 ) //if( 결제실패 상점처리결과 성공 )
SetError("Account : XPAYVBankMoney : 1032");
return "FAIL"; return "FAIL";
} }
} }

View File

@ -9,6 +9,7 @@
<tr><th>시험내용</th><td>@Html.Raw((Model.LectEX.edesc??"").Replace(System.Environment.NewLine, "<br />"))</td></tr> <tr><th>시험내용</th><td>@Html.Raw((Model.LectEX.edesc??"").Replace(System.Environment.NewLine, "<br />"))</td></tr>
<tr><th>제한시간</th><td>@(Model.LectEX.etime == 0 ? "제한없음" : string.Format("{0} 분", Model.LectEX.etime))</td></tr> <tr><th>제한시간</th><td>@(Model.LectEX.etime == 0 ? "제한없음" : string.Format("{0} 분", Model.LectEX.etime))</td></tr>
<tr><th>응시시간</th><td>@Model.LectEX.sstime.ToString("yy-MM-dd") 00:00 ~ @Model.LectEX.setime.ToString("yy-MM-dd") 23:59</td></tr> <tr><th>응시시간</th><td>@Model.LectEX.sstime.ToString("yy-MM-dd") 00:00 ~ @Model.LectEX.setime.ToString("yy-MM-dd") 23:59</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> <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) @if (Model.LectEX.estart != null)
{ {
@ -17,6 +18,10 @@
</table> </table>
<ul class="lctBtn col1"> <ul class="lctBtn col1">
<li><a href="#" class="bk" onclick="goexam()">@(Model.LectEX.eend == null && (Model.LectEX.estart == null || Model.LectEX.relaylimit.Value >= Model.LectEX.entercount) ? "응시하기" : "결과보기")</a></li> <li><a href="#" class="bk" onclick="goexam()">@(Model.LectEX.eend == null && (Model.LectEX.estart == null || Model.LectEX.relaylimit.Value >= Model.LectEX.entercount) ? "응시하기" : "결과보기")</a></li>
@if (Model.LectEX.setime > 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>
}
</ul> </ul>
<form id="mform" action="/CRoom/Estimation?@Model.croomparam" method="get"> <form id="mform" action="/CRoom/Estimation?@Model.croomparam" method="get">
@Html.HiddenFor(m => m.croomlectno) @Html.HiddenFor(m => m.croomlectno)
@ -62,5 +67,19 @@
} }
} }
} }
function reexam(exno, lectno) {
confirmtoggle(true, "이전 시험기록을 초기화하고 다시 시험에 응시하시겠습니까? ", "gogo(" + exno + "," + lectno + ")");
}
function gogo(exno, lectno) {
capp("/fcommon/reexamforuser", { exno: exno, lectno: lectno }, "cbreexam");
}
function cbreexam() {
if (capResult.code == 1000) {
msg("재응시 처리했습니다.", null, null, null, true);
setTimeout(function () {
refresh();
}, 1000);
}
}
</script> </script>
} }

View File

@ -1821,6 +1821,7 @@ namespace NP.Model
/// 시험결과공개여부 /// 시험결과공개여부
/// </summary> /// </summary>
public int isresultopen { get; set; } public int isresultopen { get; set; }
public int isreexamable { get; set; }
public IList<CMEXLayer> cmexlayers { get; set; } public IList<CMEXLayer> cmexlayers { get; set; }
public IList<CMEXQ> cmexqs { get; set; } public IList<CMEXQ> cmexqs { get; set; }
@ -3166,6 +3167,7 @@ namespace NP.Model
public Int64 exlectno { get; set; } public Int64 exlectno { get; set; }
public IList<LectEXQ> UED { get; set; } public IList<LectEXQ> UED { get; set; }
public int issubmit { get; set; } public int issubmit { get; set; }
public int? iscomplete { get; set; }
} }
[Serializable] [Serializable]
public class LectEXQ : LectEX public class LectEXQ : LectEX