From f494cb2b1bdbee9a0219335163fe1064f992ecc2 Mon Sep 17 00:00:00 2001 From: KimHanJin Date: Wed, 31 Dec 2025 12:38:04 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EA=B0=80=EA=B0=9C=EB=B0=9C12/31=5F2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Controllers/cmController.cs | 10 +++++++++- BO/Views/cm/cmregex.cshtml | 20 +++++++++++++++++++- BO/Views/cm/qp.cshtml | 15 ++++++++++++--- Base/Controller/ACommonCM.cs | 11 +++++++++++ Dao/MyBatis/Maps/CM.xml | 13 +++++++++++++ Dao/bin/Debug/MyBatis/Maps/CM.xml | 16 ++++++++++++++++ 6 files changed, 80 insertions(+), 5 deletions(-) diff --git a/BO/Controllers/cmController.cs b/BO/Controllers/cmController.cs index d03c3da..df8dc6a 100644 --- a/BO/Controllers/cmController.cs +++ b/BO/Controllers/cmController.cs @@ -802,6 +802,14 @@ namespace NP.BO.Controllers vm.ComCodes = GetComCodes("ccdiff,cc1,cc2,cc3,cc4,cc5"); vm.CMs = Dao.Get("cm.cms", new System.Collections.Hashtable() { { "ismaster", 1 }, { "orderby", "a.cname" } }); vm.ComGroups = Dao.Get("sys.comcode.glist", new System.Collections.Hashtable() { { "orderby", "cgroupname" } }); + + //교강사 조회 + #region + 기본정보 담당자/교강사 [vm.Datas] Get: cm.cmdatas + var p1 = new System.Collections.Hashtable(); + p1.Add("stringval16", vm.stringval16); + vm.Datas = Dao.Get("cm.cmdatas2", p1); + #endregion + var ht = new System.Collections.Hashtable(); if (IsPost()) { @@ -821,7 +829,7 @@ namespace NP.BO.Controllers if (!string.IsNullOrEmpty(vm.stringval9)) { ht.Add("ecount", GetInt(vm.stringval9)); } if (!string.IsNullOrEmpty(vm.stringval10)) { ht.Add("rrate", GetInt(vm.stringval10)); } if (!string.IsNullOrEmpty(vm.stringval15)) { ht.Add("instuctorName", vm.stringval15); } - if (!string.IsNullOrEmpty(vm.stringval16)) { ht.Add("scdinstuctor", vm.stringval16); } + if (!string.IsNullOrEmpty(vm.stringval14)) { ht.Add("scdinstuctor", vm.stringval14); } vm.Qs = Dao.Get("cm.questions2", ht); } vm.Qs = vm.Qs ?? new List(); diff --git a/BO/Views/cm/cmregex.cshtml b/BO/Views/cm/cmregex.cshtml index b6ba700..bd92a4f 100644 --- a/BO/Views/cm/cmregex.cshtml +++ b/BO/Views/cm/cmregex.cshtml @@ -331,8 +331,26 @@ this.value = "59"; // 최대값으로 보정 } } - }); + }); + + //2025-12-31 / KHJ / 교육일정 선택 시 이전 시험에 해당 일정이 등록 된게 있는지 확인해서 막는다. + $(document).on("change", "#cmisno", function () { + capp("/acommon/CmisnoExist", { cmno: $("#cmno").val(), cmisno: $(this).val() }, "excmisno"); + }); }); + + function excmisno() { + console.log("capResult", capResult); + if (capResult.code == 1000) { + if (capResult.obj > 0) { + msg("시험 추가가 된 교육일정이 있습니다. 다른 교육일정을 선택해주세요."); + $("#cmisno").val(""); + return; + } + } + } + + function cartesianProductOf() { return _.reduce(arguments, function (a, b) { return _.flatten(_.map(a, function (x) { diff --git a/BO/Views/cm/qp.cshtml b/BO/Views/cm/qp.cshtml index afd2e00..2888817 100644 --- a/BO/Views/cm/qp.cshtml +++ b/BO/Views/cm/qp.cshtml @@ -1,6 +1,6 @@ @model NP.Model.VMCM @{ - Layout = "~/Views/Shared/_PopupLayout.cshtml"; + Layout = "~/Views/Shared/_PopupLayout.cshtml"; }
@@ -14,8 +14,17 @@ @Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc3"), new ViewDataDictionary { { "name", "StringVal5" }, { "selected", Model.stringval5 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc3").First().cgroupname } }) @Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc4"), new ViewDataDictionary { { "name", "StringVal6" }, { "selected", Model.stringval6 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc4").First().cgroupname } }) @Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc5"), new ViewDataDictionary { { "name", "StringVal7" }, { "selected", Model.stringval7 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc5").First().cgroupname } }) - @Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc6"), new ViewDataDictionary { { "name", "StringVal14" }, { "selected", Model.stringval14 }, { "cssclass", "searchcon " }, { "df", "교강사" } }) - @Html.TextBox("stringval15", Model.stringval15, new { @class = "form-control", @style = "width: 120px;" }) + + + @Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" }) diff --git a/Base/Controller/ACommonCM.cs b/Base/Controller/ACommonCM.cs index c44a528..32422a4 100644 --- a/Base/Controller/ACommonCM.cs +++ b/Base/Controller/ACommonCM.cs @@ -1154,5 +1154,16 @@ namespace NP.Base.Controllers return JsonOK(Dao.SaveExam(vm.CMEX), false); } + + /// + /// 교육일정 선택 시 중복 여부(강좌설정 > 시험설정 > 최종평가 등록) + /// + /// + /// + /// + public JsonResult CmisnoExist(int cmno, int cmisno) { + var scd = Dao.Get("cm.cmisno.exists", new Hashtable() { { "cmno", cmno}, { "cmisno", cmisno } }); + return JsonOK(scd.FirstOrDefault()); + } } } \ No newline at end of file diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 33ae02b..785aa66 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -2336,5 +2336,18 @@ where a.cmno=#cmno# and a.isdel=0 order by rsno + + + + \ No newline at end of file diff --git a/Dao/bin/Debug/MyBatis/Maps/CM.xml b/Dao/bin/Debug/MyBatis/Maps/CM.xml index 42244c8..daaeb2a 100644 --- a/Dao/bin/Debug/MyBatis/Maps/CM.xml +++ b/Dao/bin/Debug/MyBatis/Maps/CM.xml @@ -2338,6 +2338,22 @@ where a.cmno=#cmno# and a.isdel=0 order by rsno +<<<<<<< HEAD >>>>>>> ca8967d (추가개발1) +======= + + + + +>>>>>>> d8fa423 (추가개발12/31_2) \ No newline at end of file