From 0483aef5dcb67259ba8488fc209c204904e5ddc6 Mon Sep 17 00:00:00 2001 From: shjang Date: Wed, 10 Aug 2022 00:34:44 +0000 Subject: [PATCH] =?UTF-8?q?<=EA=B8=B0=EB=8A=A5=EA=B0=9C=EC=84=A0>=201.=20P?= =?UTF-8?q?MS=20NO=20:=202.=20(=EC=A3=BC=EC=9A=94)=EC=9E=91=EC=97=85?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20:=20=EC=88=98=EA=B0=95=EC=8B=A0=EC=B2=AD?= =?UTF-8?q?=EC=8B=9C=20=EA=B5=90=EC=9C=A1=EC=9D=BC=EC=A0=95=20=EC=8B=9C?= =?UTF-8?q?=EC=9E=91=20=EC=A2=85=EB=A3=8C=EC=9D=98=20=EA=B0=92=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20lect=EC=97=90=20=EB=84=A3=EA=B8=B0,=20=EA=B5=90?= =?UTF-8?q?=EC=9C=A1=EC=9D=BC=EC=A0=95=EB=B3=80=EA=B2=BD=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=09/Base/Controller/FCommonPay.cs=20=09/Dao/MyBatis?= =?UTF-8?q?/Maps/Lect.xml=20=09/Dao/MyBatis/Maps/Pay.xml=20=09/FO/Controll?= =?UTF-8?q?ers/CourseController.cs=20=09/FO/Controllers/FOBaseController.c?= =?UTF-8?q?s=20=09/FO/Controllers/MyController.cs=20=09/FO/Views/Course/Ap?= =?UTF-8?q?plyPay.cshtml=20=09/FO/Views/Course/SmartSearch.cshtml=20=09/FO?= =?UTF-8?q?/Views/Course/XpayREQ.cshtml=20=09/FO/Views/My/LectureOn.cshtml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/Controller/FCommonPay.cs | 5 ++ Dao/MyBatis/Maps/Lect.xml | 5 +- Dao/MyBatis/Maps/Pay.xml | 120 +++++++++++++++++++++-------- FO/Controllers/CourseController.cs | 61 +++++++-------- FO/Controllers/FOBaseController.cs | 1 + FO/Controllers/MyController.cs | 15 +++- FO/Views/Course/ApplyPay.cshtml | 1 - FO/Views/Course/SmartSearch.cshtml | 36 ++------- FO/Views/Course/XpayREQ.cshtml | 4 +- FO/Views/My/LectureOn.cshtml | 91 ++++++++++++++++++++-- 10 files changed, 233 insertions(+), 106 deletions(-) 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)*@ } - - + +