From 452a96849ad4d458d6d399a43b4b799b23fa69ef Mon Sep 17 00:00:00 2001 From: hyunho Date: Thu, 5 Nov 2020 08:02:05 +0000 Subject: [PATCH] --- Base/Controller/FOCommon.cs | 1 + Dao/MyBatis/Maps/CM.xml | 24 ++ FO/Controllers/CourseController.cs | 9 + FO/Views/Course/ApplyEdu.cshtml | 528 +++++++++++++++-------------- FO/Views/Course/SmartSearch.cshtml | 8 +- FO/Views/Home/Index.cshtml | 13 + Model/CM.cs | 13 + Model/VMBase.cs | 1 + Model/VMCourse.cs | 1 + 9 files changed, 347 insertions(+), 251 deletions(-) diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index 5537a12..6fb80fd 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -379,6 +379,7 @@ namespace NP.Base.Controllers var result = Dao.Get("cm.cmuser", new System.Collections.Hashtable() { { "cmno", cmno } }); return JsonBack(result); } + } } \ No newline at end of file diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 9c581db..606d77b 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -128,6 +128,8 @@ ,c.cgcode pcgcode ,t.tyear,t.tseq ,d.cname pcname + ,e.ccode,e.cname studyplacename + ,f.cnt lectcnt ,a.cdt,a.udt ,a.cmno value,a.cname text ,row_number() over(order by $orderby$a.udt desc) rno @@ -137,6 +139,8 @@ inner join cg c on c.cgno=b.pcgno left outer join term t on t.tmno=a.tmno left outer join cm d on a.ismaster=0 and d.cmno=a.pcmno + left outer join comcode e on a.studyplace = e.ccode + left outer join (select count(a.lectno) cnt from lect a where a.cmno=#cmno# and a.status =1 and a.ischanged=0) f on 1 = 1 where a.isdel=0 and a.cmno=#cmno# and a.cmno <> #notcmno# @@ -1783,5 +1787,25 @@ and a.cmno=#cmno# and a.studyplace=#studyplace# + \ No newline at end of file diff --git a/FO/Controllers/CourseController.cs b/FO/Controllers/CourseController.cs index c9e858f..247f920 100644 --- a/FO/Controllers/CourseController.cs +++ b/FO/Controllers/CourseController.cs @@ -756,6 +756,7 @@ namespace NP.FO.Controllers { vm.ComCodes = GetComCodes("typeman,typeedu,typegrade,typejob,studyplace"); vm.CMsEtc = Dao.Get("cm.cgetc", new System.Collections.Hashtable() { { "cgcode", "2" } });//cgcode = 기타교육 // 기타교육 cgcode 바뀌면 파라미터도 변경해야함 + if (vm.stringval == "0" || string.IsNullOrEmpty(vm.stringval)) { vm.CMs = Dao.Get("cm.cms", new System.Collections.Hashtable() { { "ismaster", "1" }, { "cshape", vm.stringval2 }, { "typeman", vm.stringval3 }, { "typeedu", vm.stringval4 }, { "typegrade", vm.stringval5 }, { "typejob", vm.stringval6 } }); @@ -769,6 +770,14 @@ namespace NP.FO.Controllers 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 - 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 } }); + foreach (var item in vm.CMInningscds) + { + item.scdInfoSummary = string.Format("[{0}] {1}",item.studyplacename, item.estart.ToString("yyyy년 MM월 dd일 ddd요일 HH:mm")); + item.remainPeople = Convert.ToInt32(item.quota) - Convert.ToInt32(item.regmem); + } return View(vm); } diff --git a/FO/Views/Course/ApplyEdu.cshtml b/FO/Views/Course/ApplyEdu.cshtml index 4519dfb..372ec99 100644 --- a/FO/Views/Course/ApplyEdu.cshtml +++ b/FO/Views/Course/ApplyEdu.cshtml @@ -1,258 +1,290 @@ -
-

교육신청

-
+@model NP.Model.VMCourse +
+ @*강좌번호*@ + @*법정교육/기타교육*@ + @*교육유형*@ + @*기술인분류*@ + @*교육목적*@ + @*등급*@ + @*직무분야*@ + @*교육일정 month*@ +

신청강좌

+
    +
  • +
      +
    • + @if (Model.CM.cshape == 0) + { +

      + } + else if (Model.CM.cshape == 1) + { +

      + } + else if (Model.CM.cshape == 2) + { +

      + } + @if (Model.CM.applicableCM == "정상접수") + { + 정상접수 + } + else + { + 대기접수 + } +
    • +
    +
    + 결제금액 : @Model.CM.infee 원 +
    +
  • +
-

신청강좌

-