diff --git a/Base/Controller/FCommonPay.cs b/Base/Controller/FCommonPay.cs index 2c3ef7f..a5929f7 100644 --- a/Base/Controller/FCommonPay.cs +++ b/Base/Controller/FCommonPay.cs @@ -168,6 +168,7 @@ namespace NP.Base.Controllers { return JsonBack(new JsonRtn() { code = 1000, msg = "승인된 승인대기신청데이터가 아닙니다.", obj = 0 }); } + vm.PayItems = new List() { }; if (vm.payno > 0) { @@ -250,6 +251,7 @@ namespace NP.Base.Controllers }); } } + if (vm.isgroup == 1) { @@ -288,6 +290,7 @@ namespace NP.Base.Controllers } } } + //교재확인 if (!vm.ispaycert && vm.PayItems.Where(w => w.ptype == 2).Count() > 0) { @@ -303,6 +306,7 @@ namespace NP.Base.Controllers pi.orgamt = pi.payamt = b.price * (pi.pcnt < 1 ? 1 : pi.pcnt); } } + if (vm.ispaycert) { //자격증강좌 결제 시작 @@ -438,6 +442,7 @@ namespace NP.Base.Controllers { vm.Pay.ptype = 1; } + if (Dao.PayIn(vm.Pay) > 0) { var pginfos = GetConfig("pginfo").Split('|'); diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 103f7fc..931226d 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -1603,10 +1603,11 @@ left outer join cminningscd scd on scd.cmisno = a.cmisno left outer join cminning ci on ci.cmino = scd.cmino left outer join comcode cc on cc.ccode = b.studyplace - where a.userno=#userno# and a.status=1 and a.ischanged=0 and a.sdate < + where a.userno=#userno# and a.status=1 and a.ischanged=0 + and b.cshape=#cshape# - and (ifnull(a.iscomplete,0) = 0 and b.cshape = 2 and scd.estart > '1900-01-01' and scd.eend > '1900-01-01' + and (ifnull(a.iscomplete,0) = 0 and scd.estart > '1900-01-01' and scd.eend > '1900-01-01' and date_add(a.cdt, interval +1 year) >= date_format(now(),'%Y-%m-%d 23:59:59')) diff --git a/Dao/MyBatis/Maps/Pay.xml b/Dao/MyBatis/Maps/Pay.xml index ef50bcf..76d179b 100644 --- a/Dao/MyBatis/Maps/Pay.xml +++ b/Dao/MyBatis/Maps/Pay.xml @@ -46,10 +46,16 @@ update lect a inner join cm b on a.cmno = b.cmno - inner join pay c on a.payno = c.payno + left outer join cminningscd d on d.cmisno = a.cmisno set - a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00') + a.sdate = + case + when b.cshape = 1 then date_format(d.estart,'%Y-%m-%d 00:00:00') + else date_format(a.cdt,'%Y-%m-%d 00:00:00') + end + , a.edate = date_format(d.eend,'%Y-%m-%d 00:00:00') + ,a.udt=now(),a.uno=#uno#,a.uip=#uip# - where a.payno = #payno# and c.pstatus = 1 + where a.payno = #payno#; + select a.payno,a.ptype,a.isgroup,a.isexam,a.userno,a.pstatus,a.payamt,a.rstatus,a.refundamt,a.ispg,a.paylimit @@ -432,10 +453,16 @@ update lect a inner join cm b on a.cmno = b.cmno - inner join pay c on a.payno = c.payno + left outer join cminningscd d on d.cmisno = a.cmisno set - a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00') + a.sdate = + case + when b.cshape = 1 then date_format(d.estart,'%Y-%m-%d 00:00:00') + else date_format(a.cdt,'%Y-%m-%d 00:00:00') + end + , a.edate = date_format(d.eend,'%Y-%m-%d 00:00:00') + + where a.payno = #payno#; + left outer join cminningscd d on d.cmisno = a.cmisno set - a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00') + a.sdate = + case + when b.cshape = 1 then date_format(d.estart,'%Y-%m-%d 00:00:00') + else date_format(a.cdt,'%Y-%m-%d 00:00:00') + end + , a.edate = date_format(d.eend,'%Y-%m-%d 00:00:00') + + where a.payno = #payno#; + left outer join cminningscd d on d.cmisno = a.cmisno set - a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00') + a.sdate = + case + when b.cshape = 1 then date_format(d.estart,'%Y-%m-%d 00:00:00') + else date_format(a.cdt,'%Y-%m-%d 00:00:00') + end + , a.edate = date_format(d.eend,'%Y-%m-%d 00:00:00') + + where a.payno = #payno#; + update examuser a @@ -1025,10 +1067,16 @@ update lect a inner join cm b on a.cmno = b.cmno - inner join pay c on a.payno = c.payno + left outer join cminningscd d on d.cmisno = a.cmisno set - a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00') + a.sdate = + case + when b.cshape = 1 then date_format(d.estart,'%Y-%m-%d 00:00:00') + else date_format(a.cdt,'%Y-%m-%d 00:00:00') + end + , a.edate = date_format(d.eend,'%Y-%m-%d 00:00:00') + + where a.payno = #payno#; + update pay @@ -1053,10 +1102,16 @@ update lect a inner join cm b on a.cmno = b.cmno - inner join pay c on a.payno = c.payno + left outer join cminningscd d on d.cmisno = a.cmisno set - a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00') + a.sdate = + case + when b.cshape = 1 then date_format(d.estart,'%Y-%m-%d 00:00:00') + else date_format(a.cdt,'%Y-%m-%d 00:00:00') + end + , a.edate = date_format(d.eend,'%Y-%m-%d 00:00:00') + + where a.payno = #payno#; + " + strStudyPlacename + " " + radioEduDay + " checked> " + d.scdInfoSummary + ""); + pData.append(aApplyClass); } else { spanApplyClass.text("수강신청"); @@ -474,12 +477,6 @@ pData.html(""); pData.append(aApplyClass); } - //if (seq == 0) { - // li.append(""); - //} - //else { - // li.append(""); - //} } } else { @@ -489,29 +486,12 @@ else { pData.html(""); } - //if (seq == 0) { - // li.append(""); - //} - //else { - // li.append(""); - //} } } - - //aApplyClass.append(spanApplyClass); - //pData.append(aApplyClass); li.append(pData); - //li.append(aApplyClass); ulScd.append(li); - - //ulScd.append(li2); }); - //20220726 - //alert("model.cmisno" + model.cmisno); - //if (model.cmisno != null) { - // $("input:radio[name='rdoScds'][value='" + model.cmisno + "']").click(); - //} } //20220729 교육장별 교육일정 정보 조회 @@ -530,7 +510,7 @@ //else { // $("#divPlace_" + cmno).hide(); //} - capp("/focommon/GetScdForMixEdu", { cmno: cmno, studyPlace: studyPlace}, "renderScdInning(0, " + cshape + "," + cmno + "," + studyPlace + ")"); + capp("/focommon/GetScdForMixEdu", { cmno: cmno, studyPlace: studyPlace}, "renderScdInning(0, " + cshape + "," + cmno + ")"); } } diff --git a/FO/Views/Course/XpayREQ.cshtml b/FO/Views/Course/XpayREQ.cshtml index a2d5a58..893b5a3 100644 --- a/FO/Views/Course/XpayREQ.cshtml +++ b/FO/Views/Course/XpayREQ.cshtml @@ -19,8 +19,8 @@ else
@*@(data.Key + "-" + data.Value)*@ } - - + +