From 8bd3b3017ebbd63cff8b5e983e0b92873b1080d2 Mon Sep 17 00:00:00 2001 From: hyunho Date: Fri, 6 Nov 2020 02:20:26 +0000 Subject: [PATCH] --- Dao/MyBatis/Maps/CM.xml | 24 +++++ FO/Controllers/CourseController.cs | 39 ++++++++ FO/Views/Course/ApplyEdu.cshtml | 140 +++++++++++++++-------------- FO/Views/Course/SmartSearch.cshtml | 2 - Model/Users.cs | 20 +++++ Model/VMCourse.cs | 1 + 6 files changed, 156 insertions(+), 70 deletions(-) diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 606d77b..0512b61 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -1807,5 +1807,29 @@ order by a.estart desc + + \ No newline at end of file diff --git a/FO/Controllers/CourseController.cs b/FO/Controllers/CourseController.cs index 247f920..5bad244 100644 --- a/FO/Controllers/CourseController.cs +++ b/FO/Controllers/CourseController.cs @@ -6,6 +6,8 @@ using System.Web.Mvc; using NP.Model; using NP.Base; +using System.Collections; + namespace NP.FO.Controllers { public class CourseController : FOOpenBaseController @@ -778,6 +780,43 @@ namespace NP.FO.Controllers 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); } + vm.Assign = Dao.Get("cm.assign.applyedu", new Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault(); + if (!string.IsNullOrEmpty(vm.Assign.MphoneFormat) && vm.Assign.MphoneFormat.IndexOf("-") >= 0) + { + string[] mphoneArr = vm.Assign.MphoneFormat.Split('-'); + vm.Assign.mphone1 = mphoneArr.Length > 0 ? mphoneArr[0] : string.Empty; + vm.Assign.mphone2 = mphoneArr.Length > 1 ? mphoneArr[1] : string.Empty; + vm.Assign.mphone3 = mphoneArr.Length > 2 ? mphoneArr[2] : string.Empty; + } + if (!string.IsNullOrEmpty(vm.Assign.taxemail) && vm.Assign.taxemail.IndexOf("@") >= 0) + { + 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; + } + + vm.User = Dao.Get("cm.user.applyedu", new Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault(); + if (!string.IsNullOrEmpty(vm.User.MobileFormat) && vm.User.MobileFormat.IndexOf("-") >= 0) + { + string[] mobileArr = vm.User.MobileFormat.Split('-'); + vm.User.mobile1 = mobileArr.Length > 0 ? mobileArr[0] : string.Empty; + vm.User.mobile2 = mobileArr.Length > 1 ? mobileArr[1] : string.Empty; + vm.User.mobile3 = mobileArr.Length > 2 ? mobileArr[2] : string.Empty; + } + if (!string.IsNullOrEmpty(vm.User.userpno) && vm.User.userpno.Length == 13) + { + string userpnoString = string.Format("{0}-{1}", vm.User.userpno.Substring(0, 6), vm.User.userpno.Substring(6, 7)); + string[] userpnoArr = userpnoString.Split('-'); + vm.User.userpno1 = userpnoArr.Length > 0 ? userpnoArr[0] : string.Empty; + vm.User.userpno2 = userpnoArr.Length > 1 ? userpnoArr[1] : string.Empty; + } + if (!string.IsNullOrEmpty(vm.User.email) && vm.User.email.IndexOf("@") >= 0) + { + string[] emailArr = vm.User.email.Split('@'); + vm.User.email1 = emailArr.Length > 0 ? emailArr[0] : string.Empty; + vm.User.email2 = emailArr.Length > 1 ? emailArr[1] : string.Empty; + } + return View(vm); } diff --git a/FO/Views/Course/ApplyEdu.cshtml b/FO/Views/Course/ApplyEdu.cshtml index 635c6e1..93be7e7 100644 --- a/FO/Views/Course/ApplyEdu.cshtml +++ b/FO/Views/Course/ApplyEdu.cshtml @@ -42,7 +42,7 @@ - @if (Model.CM.cshape == 2) + @if (Model.CM.cshape == 2 && Model.CM.applicableCM == "정상접수") {

교육일정선택

+ 계좌번호 - + 예금주 - + @@ -103,23 +103,29 @@ 회사명 - + @Html.TextBoxFor(x=>x.Assign.asname, new { @class = "apylpt"}) 사업자등록번호 - + @Html.TextBoxFor(x => x.Assign.brno, new { @class = "apylpt" }) 대표자성명 - + @Html.TextBoxFor(x => x.Assign.ceoname, new { @class = "apylpt" }) 주소 -
    -
  • -
  • -
  • +
      +
    • + @Html.TextBoxFor(x => x.Assign.post, new { @class = "postno", @style = "background-color:#ddd;", @readonly = true }) +
    • +
    • + @Html.TextBoxFor(x => x.Assign.address1, new { @class = "postadr", @style = "background-color:#ddd;", @readonly = true, @placeholder = "주소입력" }) +
    • +
    • + @Html.TextBoxFor(x => x.Assign.address2, new { @class = "postadrsub", @style = "background-color:#ddd;", @placeholder = "나머지 주소입력" }) +
    • 우편번호검색
    • @@ -128,50 +134,38 @@ 업태 - + @Html.TextBoxFor(x => x.Assign.btype, new { @class = "apylpt" }) 종목 - + @Html.TextBoxFor(x => x.Assign.bkind, new { @class = "apylpt" }) 고용보험관리번호 - + @Html.TextBoxFor(x => x.Assign.eino, new { @class = "apylpt" }) 담당자성명 - + @Html.TextBoxFor(x => x.Assign.mname, new { @class = "apylpt" }) 담당자연락처
        -
      • - -
      • +
      • @Html.TextBoxFor(x => x.Assign.mphone1)
      • -
      • -
      • +
      • @Html.TextBoxFor(x => x.Assign.mphone2)
      • -
      • -
      • +
      • @Html.TextBoxFor(x => x.Assign.mphone3)
      - 계산서받을 이메일
        -
      • -
      • -
      • -
      • - -
      • +
      • @Html.TextBoxFor(x => x.Assign.taxemail1)
      • +
      • +
      • @Html.TextBoxFor(x => x.Assign.taxemail2)
      @@ -183,32 +177,26 @@ 이름 -

      홍길동

      +

      @Html.TextBoxFor(x => x.User.username, new { @class = "apylpt" })

      주민등록번호
        -
      • +
      • @Html.TextBoxFor(x => x.User.userpno1)
      • -
      • -
      • -
      - +
    • @Html.TextBoxFor(x => x.User.userpno2)
    • +
    휴대전화
      -
    • - -
    • +
    • @Html.TextBoxFor(x => x.User.mobile1)
    • -
    • -
    • +
    • @Html.TextBoxFor(x => x.User.mobile2)
    • -
    • -
    • +
    • @Html.TextBoxFor(x => x.User.mobile3)
    @@ -216,25 +204,25 @@ 이메일
      -
    • -
    • -
    • -
    • - -
    • +
    • @Html.TextBoxFor(x => x.User.email1)
    • +
    • +
    • @Html.TextBoxFor(x => x.User.email2)
    주소 -
      -
    • -
    • -
    • +
        +
      • + @Html.TextBoxFor(x => x.User.post, new { @class = "postno", @style = "background-color:#ddd;", @readonly = true }) +
      • +
      • + @Html.TextBoxFor(x => x.User.address1, new { @class = "postadr", @style = "background-color:#ddd;", @readonly = true, @placeholder = "주소입력" }) +
      • +
      • + @Html.TextBoxFor(x => x.User.address2, new { @class = "postadrsub", @style = "background-color:#ddd;", @placeholder = "나머지 주소입력" }) +
      • 우편번호검색
      • @@ -245,24 +233,40 @@ 채용형태
          -
        • -
        • +
        • + @Html.RadioButtonFor(model => model.User.isassignuser, "1", new { @name = "recruit", @checked = "checked" })정규직 +
        • +
        • + @Html.RadioButtonFor(model => model.User.isassignuser, "0", new { @name = "recruit" })비정규직 +
        직위 - + + @Html.TextBoxFor(x => x.User.uduty, new { @class = "apylpt"}) + 학력
          -
        • -
        • -
        • -
        • -
        • +
        • + @Html.RadioButtonFor(model => model.User.slevel, "0", new { @name = "eduGrade", @checked = "checked" })기타 +
        • +
        • + @Html.RadioButtonFor(model => model.User.slevel, "1", new { @name = "eduGrade" })고졸 +
        • +
        • + @Html.RadioButtonFor(model => model.User.slevel, "2", new { @name = "eduGrade" })학사 +
        • +
        • + @Html.RadioButtonFor(model => model.User.slevel, "3", new { @name = "eduGrade" })석사 +
        • +
        • + @Html.RadioButtonFor(model => model.User.slevel, "4", new { @name = "eduGrade" })박사 +
        @@ -296,7 +300,7 @@ setScd(); refundAccountShowHide(); }, 300); - + } function refundAccountShowHide() { if ($("#rdoRefund01").prop("checked")) { diff --git a/FO/Views/Course/SmartSearch.cshtml b/FO/Views/Course/SmartSearch.cshtml index 626313c..d0cf1d5 100644 --- a/FO/Views/Course/SmartSearch.cshtml +++ b/FO/Views/Course/SmartSearch.cshtml @@ -225,8 +225,6 @@ var ulSubCm = $("#ulSubCm_" + cmno); ulSubCm.empty(); var applyClass = "
      • ※ 대기접수는 해당 교육과정의 정원이 마감되어 교육입교 확정은 아니지만 결원 발생 시 대기신청 차례에 따라 교육생 연락처로 연락 드리는 시스템 입니다

      • "; - - $.each(capResult.obj, function (i, d) { var li = $("
      • "); var p = $("

        "); diff --git a/Model/Users.cs b/Model/Users.cs index 0a95ddc..3ec0cbb 100644 --- a/Model/Users.cs +++ b/Model/Users.cs @@ -67,6 +67,8 @@ namespace NP.Model /// 200 uiusersemail ev50 이메일 userid, email cross unique check /// public String email { get; set; } + public String email1 { get; set; } + public String email2 { get; set; } ///

        /// 이메일정보수신 /// @@ -79,6 +81,9 @@ namespace NP.Model /// 200 ev50 모바일번호 "-"생성 /// public String mobile { get; set; } + public String mobile1 { get; set; } + public String mobile2 { get; set; } + public String mobile3 { get; set; } /// /// 200 ev50 일반전화 고객사담당자의 Dir.Number와 공용"-"생성 /// @@ -117,6 +122,8 @@ namespace NP.Model /// 200 ev50 주민등록번호 /// public String userpno { get; set; } + public String userpno1 { get; set; } + public String userpno2 { get; set; } /// /// 50 은행 /// @@ -521,10 +528,22 @@ namespace NP.Model /// 담당자연락처 /// public String mphone { get; set; } + public String mphone1 { get; set; } + public String mphone2 { get; set; } + public String mphone3 { get; set; } + public String MphoneFormat + { + get + { + return string.IsNullOrEmpty(mphone) || mphone.Replace("-", "").Length < 10 ? (mphone ?? "") : mphone.Replace("-", "").Length == 10 ? string.Format("{0}-{1}-{2}", mphone.Replace("-", "").Substring(0, 3), mphone.Replace("-", "").Substring(3, 3), mphone.Replace("-", "").Substring(6)) : string.Format("{0}-{1}-{2}", mphone.Replace("-", "").Substring(0, 3), mphone.Replace("-", "").Substring(3, 4), mphone.Replace("-", "").Substring(7)); + } + } /// /// 계산서 수신 이메일 /// public String taxemail { get; set; } + public String taxemail1 { get; set; } + public String taxemail2 { get; set; } } @@ -610,6 +629,7 @@ namespace NP.Model /// ev50 모바일번호 /// public String mobile {get;set;} + /// /// ev50 전화번호 /// diff --git a/Model/VMCourse.cs b/Model/VMCourse.cs index 4bde361..2f668ed 100644 --- a/Model/VMCourse.cs +++ b/Model/VMCourse.cs @@ -26,6 +26,7 @@ namespace NP.Model public int iscart { get; set; } public int iscert { get; set; } public IList CMInningscds { get; set; } + public Assign Assign { get; set; } /// /// 0: 개인결제, 1: 단체결제 ///