From 5a688cee61bfdf5b6e6c4550b56972a6c67281a6 Mon Sep 17 00:00:00 2001 From: lch Date: Thu, 6 May 2021 02:26:19 +0000 Subject: [PATCH] =?UTF-8?q?1.=20=ED=99=98=EA=B8=89=20:=20=ED=9A=8C?= =?UTF-8?q?=EC=82=AC=EC=A0=95=EB=B3=B4=20=EC=B6=9C=EB=A0=A5=20=20-=20'?= =?UTF-8?q?=EA=B0=9C=EC=9D=B8'=EC=9C=BC=EB=A1=9C=20=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=ED=95=98=EC=97=AC=20=ED=9A=8C=EC=82=AC=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=EA=B0=80=20=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0,=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=B4=88=EA=B8=B0=20=EC=A7=84?= =?UTF-8?q?=EC=9E=85=20=EC=8B=9C=20=ED=9A=8C=EC=82=AC=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EC=B0=BD=EC=97=90=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=EC=9D=B4=20=EC=95=88=EB=90=9C=20=EC=83=81=ED=83=9C=EB=A1=9C=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=20=20-=20'=ED=9A=8C=EC=82=AC=EB=AA=85'?= =?UTF-8?q?=EC=9D=80=20=EB=B0=98=EB=93=9C=EC=8B=9C=20=EA=B2=80=EC=83=89?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9E=85=EB=A0=A5=20=20-=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EB=B0=8F=20=EC=84=A0=ED=83=9D=20=EC=8B=9C=20?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=20=ED=9A=8C=EC=82=AC=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=EA=B0=80=20=EC=95=84=EB=9E=98=20=EA=B8=B0=EC=9E=85=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=EC=97=90=20=EC=A0=81=EC=9A=A9.=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20=EA=B0=80=EB=8A=A5=20=20-=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80>=EC=A0=95=EB=B3=B4=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=97=90=20=EC=84=A0=ED=83=9D=ED=95=9C=20=EC=A7=81=EC=9E=A5?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EB=93=B1=EB=A1=9D=202.=20=EB=B9=84?= =?UTF-8?q?=ED=99=98=EA=B8=89=20:=20=EC=86=8C=EC=86=8D=EC=97=85=EC=B2=B4?= =?UTF-8?q?=EB=AA=85=20(=EC=97=85=EC=B2=B4/=EA=B0=9C=EC=9D=B8=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EC=B0=BD)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 뒤로가기 버튼 클릭시 이전 입력정보 유지하게 수정 --- Base/Controller/FCommon.cs | 54 ++++--- Dao/MyBatis/Maps/User.xml | 2 +- FO/Controllers/CourseController.cs | 26 ++- FO/Views/Course/ApplyEdu.cshtml | 193 +++++++++++++++++------ FO/Views/Course/ApplyPay.cshtml | 17 ++ FO/Views/Shared/Partial/BoxAssign.cshtml | 14 +- Model/VMCourse.cs | 3 + 7 files changed, 236 insertions(+), 73 deletions(-) diff --git a/Base/Controller/FCommon.cs b/Base/Controller/FCommon.cs index 10d5362..c0e8a2d 100644 --- a/Base/Controller/FCommon.cs +++ b/Base/Controller/FCommon.cs @@ -24,9 +24,9 @@ namespace NP.Base.Controllers else { filterContext.Result = new RedirectResult("/Account/Error?_code=" + NP.Base.ENUM.JSONCode.Error + "&_msg=알수없는오류"); } } [HttpPost] - public JsonResult FileDel(Int64 fileno = 0, String filename = "", Int64 fgno = 0, int issinglefile = 0, String log = "",String datakey=null) + public JsonResult FileDel(Int64 fileno = 0, String filename = "", Int64 fgno = 0, int issinglefile = 0, String log = "", String datakey = null) { - var rtn = DropFile(fileno, filename,datakey); + var rtn = DropFile(fileno, filename, datakey); if (rtn < 1) { throw new System.ArgumentNullException("nodata"); @@ -55,12 +55,12 @@ namespace NP.Base.Controllers { //신청가능확인(기간,제한인원,동일강좌,유사강좌) var cms = Dao.Get("cm.cmcheck.forbuy", new Hashtable() { { "cmno", cmno }, { "userno", SUserInfo.UserNo } }); - if (cms.Where(w=>w.rno == 1).Count() < 1) + if (cms.Where(w => w.rno == 1).Count() < 1) { //수강신청기간이 아님 return JsonOK(0, true); } - else if (cms.Where(w=>w.rno == 1).First().lectstatus > 0) + else if (cms.Where(w => w.rno == 1).First().lectstatus > 0) { //1: 수강중, 3:심사중, 4: 승인(결제대기) return JsonOK(cms.Where(w => w.rno == 1).First().lectstatus); @@ -69,23 +69,23 @@ namespace NP.Base.Controllers { return JsonOK(999); } - else if (cms.Where(w=>w.rno == 2).Count() > 0) + else if (cms.Where(w => w.rno == 2).Count() > 0) { return JsonOK(1000); } return JsonOK(11); } [HttpPost] - public JsonResult AssignSave(String brno, String asname,String ceoname) + public JsonResult AssignSave(String brno, String asname, String ceoname) { - var ht = new Hashtable() { { "asno", 0}, { "isjoin", 0 }, { "joinprice", 0 }, { "asname", asname }, { "brno", brno.Replace("-", "") },{"ceoname",ceoname }, { "salesamount", 0 }, { "mcount", 0 }, { "status", 1 }, { "isdel", 0 }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }; + var ht = new Hashtable() { { "asno", 0 }, { "isjoin", 0 }, { "joinprice", 0 }, { "asname", asname }, { "brno", brno.Replace("-", "") }, { "ceoname", ceoname }, { "salesamount", 0 }, { "mcount", 0 }, { "status", 1 }, { "isdel", 0 }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }; Dao.Insert("users.assign.in", ht); return JsonOK(GetInt(ht["asno"])); } [HttpPost] public JsonResult UserFind(int asno, String username, String email, int? pno) { - return JsonBack(Dao.Get("users.users", new Hashtable() { { "asno", asno }, { "username", username == "" ? null : username }, { "email", email==""?null:email }, { "pagenum", pno }, { "pagerowsize", 10 } })); + return JsonBack(Dao.Get("users.users", new Hashtable() { { "asno", asno }, { "username", username == "" ? null : username }, { "email", email == "" ? null : email }, { "pagenum", pno }, { "pagerowsize", 10 } })); } [HttpPost] public JsonResult UserGet(int userno) @@ -273,20 +273,21 @@ namespace NP.Base.Controllers { ppllog.cgno = !string.IsNullOrEmpty(vm.stringval3) ? Convert.ToInt32(vm.stringval3) : (int?)null; } - - ppllog.cmisno = !string.IsNullOrEmpty(Request["cmisno"]) ? Convert.ToInt64(Request["cmisno"]) : (long?)null ; + + ppllog.cmisno = !string.IsNullOrEmpty(Request["cmisno"]) ? Convert.ToInt64(Request["cmisno"]) : (long?)null; ppllog.isrebate = !string.IsNullOrEmpty(Request["isrebate"]) ? Convert.ToInt32(Request["isrebate"]) : (int?)null; - + if (ppllog.isrebate == 1) - { - ppllog.rbankname = !string.IsNullOrEmpty(Request["rbankname"]) ? Request["rbankname"].ToString() : null; - ppllog.rbankacc = !string.IsNullOrEmpty(Request["rbankacc"]) ? Request["rbankacc"].ToString() : null; + { + ppllog.rbankname = !string.IsNullOrEmpty(Request["rbankname"]) ? Request["rbankname"].ToString() : null; + ppllog.rbankacc = !string.IsNullOrEmpty(Request["rbankacc"]) ? Request["rbankacc"].ToString() : null; ppllog.rbankowner = !string.IsNullOrEmpty(Request["rbankowner"]) ? Request["rbankowner"].ToString() : null; } ppllog.isaccommodation = !string.IsNullOrEmpty(Request["isaccommodation"]) ? Convert.ToInt32(Request["isaccommodation"].ToString()) : (int?)null; //강의유형 온라인 or 혼합(온+오프) or (교육장 and 비환급): - if (ppllog.cshape == 0 || (ppllog.cshape == 1 && ppllog.isrebate == 0) || ppllog.cshape == 2) { + if (ppllog.cshape == 0 || (ppllog.cshape == 1 && ppllog.isrebate == 0) || ppllog.cshape == 2) + { var isCompany = !string.IsNullOrEmpty(Request["isCompany"]) ? Convert.ToInt32(Request["isCompany"]) : (int?)null; if (isCompany == 0) //개인 { @@ -295,7 +296,7 @@ namespace NP.Base.Controllers } else if (isCompany == 1) //업체 { - if(vm.Assign != null && vm.Assign.asno != vm.asno) //기존 등록된 회사랑 소속업체명에서 선택한 회사가 다르면 소속업체명에서 선택한 회사로 변경 + if (vm.Assign != null && vm.Assign.asno != vm.asno) //기존 등록된 회사랑 소속업체명에서 선택한 회사가 다르면 소속업체명에서 선택한 회사로 변경 { ppllog.asno = vm.asno; vm.Assign = Dao.Get("cm.assign.applyedu.byasno", new Hashtable() { { "asno", vm.asno } }).FirstOrDefault(); @@ -313,7 +314,7 @@ namespace NP.Base.Controllers string[] taxemailArr = vm.Assign.taxemail.Split('@'); vm.Assign.taxemail1 = taxemailArr.Length > 0 ? taxemailArr[0] : string.Empty; vm.Assign.taxemail2 = taxemailArr.Length > 1 ? taxemailArr[1] : string.Empty; - } + } } } } @@ -354,7 +355,7 @@ namespace NP.Base.Controllers ppllog.isassignuser = vm.User.isassignuser; ppllog.uduty = vm.User.uduty; ppllog.slevel = vm.User.slevel; - + if (ppllog.asno != null) { //ppllog.asno 값이 중간에 변경이 안되었을 때만 호출 @@ -369,6 +370,21 @@ namespace NP.Base.Controllers return JsonOK(rtn); } + [HttpPost] + public JsonResult GetAssign(int asno) + { + if (asno != 0) + { + var assign = Dao.Get("users.assigns2", new System.Collections.Hashtable() { { "asno", asno }, { "orderby", "a.asname" } }) + .Select( s => new { s.brno, s.ceoname, s.post, s.address1, s.address2, s.btype, s.bkind, s.eino, s.mname, s.mphone, s.taxemail, s.fgnobno }) + .FirstOrDefault(); + return JsonBack(assign); + } + else + { + return JsonOK(0); + } + } } - + } \ No newline at end of file diff --git a/Dao/MyBatis/Maps/User.xml b/Dao/MyBatis/Maps/User.xml index f1cc79d..6c35006 100644 --- a/Dao/MyBatis/Maps/User.xml +++ b/Dao/MyBatis/Maps/User.xml @@ -85,7 +85,7 @@ ,a.asname,a.asno value,a.asname text,a.isjoin,a.joinyear,a.joinprice,a.ascode,a.joindate ,year(a.joindate) joindateyear, a.exitdate,a.aday,a.status,a.ceoname $excel1$ - ,a.address1,a.address2,concat(a.address1, a.address2) adr1,a.grno,a.btype,a.bkind,a.salesamount,a.homeurl,a.mcount + ,a.post,a.address1,a.address2,concat(a.address1, a.address2) adr1,a.grno,a.btype,a.bkind,a.salesamount,a.homeurl,a.mcount ,a.fgnobno,a.fgnobank,a.issite ,a.subdomain,a.sitename,a.sitelogo,a.sitefooter ,a.eino, a.mname diff --git a/FO/Controllers/CourseController.cs b/FO/Controllers/CourseController.cs index 489e732..c4524a9 100644 --- a/FO/Controllers/CourseController.cs +++ b/FO/Controllers/CourseController.cs @@ -784,10 +784,9 @@ namespace NP.FO.Controllers return View(vm); } - + [NP.Base.Auth.CFilter] public ActionResult ApplyEdu(VMCourse vm) { - vm.CM = Dao.Get("cm.cms", new System.Collections.Hashtable() { { "cmno", vm.cmno } }).FirstOrDefault(); vm.CM.applicableCM = (vm.CM.quota != 0 && vm.CM.quota - vm.CM.lectcnt <= 0) ? "대기접수" : "정상접수"; vm.CMInningscds = Dao.Get("cm.cminningscds.applyedu", new System.Collections.Hashtable() { { "cmno", vm.cmno },{"month", (vm.scdMonth == null)? DateTime.Now.Year : vm.scdMonth } }); @@ -817,6 +816,10 @@ namespace NP.FO.Controllers vm.FileList = GetFiles(vm.Assign.fgnobno.Value); } } + else + { + vm.Assign = new Assign() { }; + } vm.User = Dao.Get("cm.user.applyedu", new Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault(); if (!string.IsNullOrEmpty(vm.User.MobileFormat) && vm.User.MobileFormat.IndexOf("-") >= 0) { @@ -844,11 +847,15 @@ namespace NP.FO.Controllers vm.User.email2 = emailArr.Length > 1 ? emailArr[1] : string.Empty; } + if (vm.pplno != 0) + { + vm.PPLog = Dao.Get("pay.pplogs", new Hashtable() { { "pplno", vm.pplno }, { "userno", SUserInfo.UserNo } }).FirstOrDefault(); + } return View(vm); } - + [NP.Base.Auth.CFilter] public ActionResult ApplyPay(VMCourse vm) - { + { if (vm.payno > 0) { //신청대기 => 승인 => 결제진입 @@ -1106,7 +1113,16 @@ namespace NP.FO.Controllers //nptech 추가 파라미터 vm.payParams.Add("items", Request["items"]); vm.payParams.Add("pplno", Request["pplno"]); - vm.payParams.Add("rsMsg", ""); + vm.payParams.Add("rsMsg", ""); + vm.payParams.Add("cmno", Request["cmno"]); + vm.payParams.Add("stringval", Request["stringval"]); + vm.payParams.Add("stringval2", Request["stringval2"]); + vm.payParams.Add("stringval3", Request["stringval3"]); + vm.payParams.Add("stringval4", Request["stringval4"]); + vm.payParams.Add("stringval5", Request["stringval5"]); + vm.payParams.Add("stringval6", Request["stringval6"]); + vm.payParams.Add("selMonth", Request["selMonth"]); + vm.payParams.Add("isCompany", Request["isCompany"]); Session.Add("PAYREQ_MAP", vm.payParams); diff --git a/FO/Views/Course/ApplyEdu.cshtml b/FO/Views/Course/ApplyEdu.cshtml index c5427d1..fbc72aa 100644 --- a/FO/Views/Course/ApplyEdu.cshtml +++ b/FO/Views/Course/ApplyEdu.cshtml @@ -2,13 +2,17 @@ @{ var isallday = Model.CM.retimeymd == "2099-12-31" ? true : false; } -
- @*법정교육/기타교육*@ - @*교육유형*@ - @*기술인분류*@ - @*교육목적*@ - @*등급*@ - @*직무분야*@ + + @*강좌번호*@ + @*법정교육/기타교육*@ + @*교육유형*@ + @*기술인분류*@ + @*교육목적*@ + @*등급*@ + @*직무분야*@ + @*pplno*@ + @*교육일정선택(selMonth)*@ + @*업체/개인 선택*@
@*강좌번호*@ @@ -20,7 +24,6 @@ @*직무분야*@ -

신청강좌

    @@ -98,10 +101,10 @@

    합숙여부

    • - +
    • - +

    환급여부선택

    @@ -128,7 +131,7 @@ 업체/개인 선택 - +    @@ -146,15 +149,15 @@ *은행명 - + *계좌번호 - + *예금주 - + @@ -171,7 +174,10 @@ *회사명 - @Html.TextBoxFor(x => x.Assign.asname, new { @class = "apylpt", @maxlength = "100" }) + + @Html.TextBoxFor(x => x.Assign.asname, new { @class = "apylpt", @maxlength = "100" }) + 검색 + *사업자등록번호 @@ -350,7 +356,7 @@ -
      + @Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" } }) +@section styles{ + +} @section scriptsHeader{ @Html.Partial("./Partial/ScriptPost") @Html.Partial("./Partial/filescript") } \ No newline at end of file + diff --git a/FO/Views/Course/ApplyPay.cshtml b/FO/Views/Course/ApplyPay.cshtml index a6193e1..d83dd8b 100644 --- a/FO/Views/Course/ApplyPay.cshtml +++ b/FO/Views/Course/ApplyPay.cshtml @@ -2,6 +2,18 @@ @{ var isallday = Model.CM.retimeymd == "2099-12-31" ? true : false; } +
      + @*강좌번호*@ + @*법정교육/기타교육*@ + @*교육유형*@ + @*기술인분류*@ + @*교육목적*@ + @*등급*@ + @*직무분야*@ + @*pplno*@ + @*교육일정선택(selMonth)*@ + @*업체/개인 선택*@ +
      @Html.HiddenFor(m => m.payno) @*강좌번호*@ @@ -108,6 +120,7 @@ @Html.HiddenFor(m => m.payno) @Html.HiddenFor(m => m.exno) @@ -159,6 +172,10 @@ $(".cashnot").addClass("hide"); } }); + $("#btnback").on("click", function () { + $("#historyForm").attr("action", "/Course/ApplyEdu"); + $("#historyForm").submit(); + }); }); function save() { $("#cashrcthp").val(""); diff --git a/FO/Views/Shared/Partial/BoxAssign.cshtml b/FO/Views/Shared/Partial/BoxAssign.cshtml index 79ee09d..8423b39 100644 --- a/FO/Views/Shared/Partial/BoxAssign.cshtml +++ b/FO/Views/Shared/Partial/BoxAssign.cshtml @@ -43,6 +43,7 @@