From 9694c617e49401754ecdd0086c62c3d2f86881e9 Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 17 Nov 2020 08:36:55 +0000 Subject: [PATCH] --- Base/Controller/FCommonPay.cs | 27 +++ Dao/MyBatis/Maps/Pay.xml | 17 +- FO/Controllers/MyController.cs | 21 +- FO/Views/My/PayInfo.cshtml | 353 ++++++++++++++++++--------------- Model/Pay.cs | 4 + 5 files changed, 260 insertions(+), 162 deletions(-) diff --git a/Base/Controller/FCommonPay.cs b/Base/Controller/FCommonPay.cs index 0096fa9..422a591 100644 --- a/Base/Controller/FCommonPay.cs +++ b/Base/Controller/FCommonPay.cs @@ -452,6 +452,33 @@ namespace NP.Base.Controllers return JsonBack(new JsonRtn() { code = 1000, obj = Dao.Get("users.users.foroffby", usernos) }); } + [HttpPost] + public JsonResult PayRfdSaveFinal(PayRfd p) + { + p.uno = SUserInfo.UserNo; p.uip = GetUserIP(); + Int64? fgnor = (Int64?)null; + if (Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) + { + fgnor = SetFile(Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payrfd", "fgnor"); + } + Int64? fgnob = (Int64?)null; + if (Request.Files.GetMultiple("file3").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0) + { + fgnob = SetFile(Request.Files.GetMultiple("file3").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payrfd", "fgnob"); + } + p.fgnor = fgnor; + p.fgnob = fgnob; + return JsonOK(Dao.Save("pay.payrfd.up", p)); + } + + [HttpPost] + public JsonResult PayRfdSelfCancel(PayRfd p) + { + p.uno = SUserInfo.UserNo; p.uip = GetUserIP(); + p.rstatus = 4; //자진취소 + return JsonOK(Dao.Save("pay.payrfdcancel.up", p)); + } + } diff --git a/Dao/MyBatis/Maps/Pay.xml b/Dao/MyBatis/Maps/Pay.xml index 7191554..d861120 100644 --- a/Dao/MyBatis/Maps/Pay.xml +++ b/Dao/MyBatis/Maps/Pay.xml @@ -670,6 +670,7 @@ from payrfd a a.payno=#payno# + a.rstatus><#rstatus# order by a.cdt desc @@ -760,10 +761,12 @@ order by d.rfdno,b.rstatus,ispast,b.pino - insert into payrfd(payno,rtext,bankname,bankno,bankowner,isowner,rstatus,) + insert into payrfd(payno,rtext,bankname,bankno,bankowner,isowner,rstatus,ruser,rphone,rreason,fgnor,fgnob,) select distinct #payno#,#rtext#,#bankname# ,HEX(AES_ENCRYPT(#bankno#, )) - ,#bankowner#,#isowner#,#rstatus#, + ,#bankowner#,#isowner#,#rstatus#,#ruser# + ,HEX(AES_ENCRYPT(#rphone#, )) + ,#rreason#,#fgnor#,#fgnob#, from pay a inner join payitem b on b.payno=a.payno and b.pino in ($pinos$) and a.pstatus=1 and a.rstatus=0 left outer join cm c0 on b.ptype in (0,4) and c0.cmno=b.itemno and ifnull(c0.retime,date_add(now(), interval 1 day)) > now() @@ -782,6 +785,16 @@ left outer join exam c3 on b.ptype=3 and c3.exno=b.itemno and c3.retime > now() where a.payno=#payno# and a.userno=#uno# and a.pstatus=1 and a.rstatus < 2 and (b.ptype=2 or c0.cmno is not null or c3.exno is not null) + + update payrfd + set fgnor=#fgnor#,fgnob=#fgnob#,udt=now(),uno=#uno#,uip=#uip# + where payno=#payno# + + + update payrfd + set rstatus=#rstatus#,udt=now(),uno=#uno#,uip=#uip# + where payno=#payno# + update examuser a inner join pay b on b.payno=a.payno and b.pstatus=22 and b.ptype=3 and b.ispg=1 and b.isunpay is null and b.userno=a.userno diff --git a/FO/Controllers/MyController.cs b/FO/Controllers/MyController.cs index d337727..83d8789 100644 --- a/FO/Controllers/MyController.cs +++ b/FO/Controllers/MyController.cs @@ -245,10 +245,29 @@ namespace NP.FO.Controllers vm.PayItems = Dao.Get("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }); vm.PayItem = Dao.Get("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }).FirstOrDefault(); vm.intval3 = Dao.Get("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno },{ "rstatus", 0} }).Count(); + vm.PayRfd = null; if (vm.intval3 > 0) { - vm.PayRfd = Dao.Get("pay.mypayrfdinfo", new System.Collections.Hashtable() {{ "payno", vm.payno } }).FirstOrDefault(); + vm.PayRfd = Dao.Get("pay.mypayrfdinfo", new System.Collections.Hashtable() {{ "payno", vm.payno }, { "rstatus", 4 } }).FirstOrDefault(); + vm.FileList = new List() { }; + if (vm.PayRfd.fgnor != null) + { + var fgnos = ""; + if (vm.PayRfd.fgnor != null) + { + fgnos += "," + vm.PayRfd.fgnor; + } + if (vm.PayRfd.fgnob != null) + { + fgnos += "," + vm.PayRfd.fgnob; + } + if (fgnos != "") + { + vm.FileList = GetFiles(fgnos.Substring(1)); + } + } } + return View(vm); } public ActionResult QNAs(VMCC vm) diff --git a/FO/Views/My/PayInfo.cshtml b/FO/Views/My/PayInfo.cshtml index a68491e..ff66aef 100644 --- a/FO/Views/My/PayInfo.cshtml +++ b/FO/Views/My/PayInfo.cshtml @@ -4,7 +4,7 @@ }

주문상품 정보

@@ -17,7 +17,7 @@ 강좌 @Model.PayItem.cshapename @Html.Raw(Model.PayItem.isrebate == 1 ? "환급" : "") - @Model.PayItem.itemname + @Model.PayItem.itemname
학습기간 : @(Convert.ToDateTime(Model.PayItem.sstime).ToShortDateString()) ~ @(Convert.ToDateTime(Model.PayItem.setime).ToShortDateString())
@@ -58,21 +58,24 @@ 환불상태 - @if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null)) + @if (Model.intval3 > 0) { - [서류등록/취소] [신청서출력] - } - else if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) - { - [상세내용조회/취소] [신청서출력] - } - else if (Model.PayRfd.rstatus == 1 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) - { - [상세내용조회] [신청서출력] - } - else if (Model.PayRfd.rstatus == 2 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) - { - [상세내용조회] [신청서출력] + if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null)) + { + [서류등록/취소] [신청서출력] + } + else if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) + { + [상세내용조회/취소] [신청서출력] + } + else if (Model.PayRfd.rstatus == 1 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) + { + [상세내용조회] [신청서출력] + } + else if (Model.PayRfd.rstatus == 2 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) + { + [상세내용조회] [신청서출력] + } } @@ -94,7 +97,15 @@ } @if (Model.Pay.pstatus == 1 && Model.Pay.rstatus != 2 && Model.PayItems.Where(w => w.rstatus == 0).Count() > 0) { -
  • 환불요청
  • + if (Model.intval3 > 0 && (Model.PayRfd.rstatus == 0 || Model.PayRfd.rstatus == 1)) + { +
  • + } + else + { +
  • 환불요청
  • + } + } @if (Model.Pay.rstatus < 2 && Model.Pay.pstatus == 22) { @@ -218,22 +229,22 @@
    - @*ptype은 0만 쓰기로*@ +

    환불정보

    - + - + - + - +
    환불은행
    예금주
    환불계좌
    개인계좌여부 @@ -270,132 +281,103 @@
    -

    - ※ 위 신청서를 작성한 이후, 신청서를 날인/스캔하여 통장사본과 같이 업로드를 해주셔야 합니다. -

    -

    환불규정

    -
    평생교육법 제28조 제4항에 따른 학습비의 반환사유가 발생할 때에는 평생교육시행령 23조의 별표 3의 반환기준에 따라 학습 비 등을 반환사유가 발생한 날부터 5일 이내에 반환하여야 한다.
    -
    -
    -
    - - - - - - - - + @section scriptsHeader{ - + @Html.Partial("./Partial/filescript") } @section scripts{ } \ No newline at end of file diff --git a/Model/Pay.cs b/Model/Pay.cs index 504df82..6a876e8 100644 --- a/Model/Pay.cs +++ b/Model/Pay.cs @@ -973,6 +973,10 @@ namespace NP.Model /// 환불통장사본 /// public long? fgnob { get; set; } + /// + /// 환불검토의견 + /// + public String rback { get; set; } } //[Serializable]