From daa1270a05f50ae60ddcda500e3a70efc10a5f7d Mon Sep 17 00:00:00 2001 From: jity7777 Date: Mon, 10 Jul 2023 05:18:15 +0000 Subject: [PATCH] =?UTF-8?q?<=EA=B8=B0=EB=8A=A5=EA=B0=9C=EC=84=A0>=201.=20P?= =?UTF-8?q?MS=20NO=20:=208022=202.=20(=EC=A3=BC=EC=9A=94)=EC=9E=91?= =?UTF-8?q?=EC=97=85=EB=82=B4=EC=9A=A9=20(1)=20fo/bo=20=EC=9D=BC=EA=B4=84?= =?UTF-8?q?=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/BO.csproj | 2 ++ BO/Controllers/BatchController.cs | 18 +++++++++++ BO/Controllers/cmController.cs | 7 +++++ BO/Views/Shared/Partial/ScdScript.cshtml | 8 ++--- BO/Views/cm/cmregeduschedule.cshtml | 15 ++++++++-- BO/Views/croom/attscds.cshtml | 2 +- BO/Views/croom/cmlects.cshtml | 2 +- BO/Views/croom/completions.cshtml | 2 +- BO/Views/croom/grade0.cshtml | 2 +- BO/Views/croom/gradeall0.cshtml | 2 +- BO/Views/croom/payview.cshtml | 2 +- BO/Views/user/ur.cshtml | 2 +- Base/Controller/ACommonCRoom.cs | 16 +++++++++- Base/Controller/FOCommon.cs | 38 ++++++++++++++++++++++-- Dao/MyBatis/Maps/CM.xml | 15 ++++++++-- Dao/MyBatis/Maps/Grade.xml | 38 ++++++++++++------------ FO/Views/Course/ApplyPay.cshtml | 14 +++++---- FO/Views/My/LectureOn.cshtml | 22 +++++++++++--- Model/BaseModel.cs | 6 ++-- Model/VMCM.cs | 1 + 20 files changed, 164 insertions(+), 50 deletions(-) create mode 100644 BO/Controllers/BatchController.cs diff --git a/BO/BO.csproj b/BO/BO.csproj index ccc2b6b..2817f2e 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -195,6 +195,7 @@ + @@ -709,6 +710,7 @@ + diff --git a/BO/Controllers/BatchController.cs b/BO/Controllers/BatchController.cs new file mode 100644 index 0000000..7e0f03b --- /dev/null +++ b/BO/Controllers/BatchController.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace NP.BO.Controllers +{ + public class BatchController : NP.Base.BaseController + { + public ActionResult lectinninmove(String batchKey, bool isTest = true) + { + + return Content("ok"); + } + + } +} \ No newline at end of file diff --git a/BO/Controllers/cmController.cs b/BO/Controllers/cmController.cs index 004d88d..df7d053 100644 --- a/BO/Controllers/cmController.cs +++ b/BO/Controllers/cmController.cs @@ -266,6 +266,13 @@ namespace NP.BO.Controllers { vm.CMInningscds = Dao.Get("cm.cminningscds", new System.Collections.Hashtable() { { "cmino", vm.CMInnings[0].cmino } }); } + + if (vm.CMInningscds.Count() > 0) + { + long cmino = vm.CMInningscds.First().cmino; + vm.CMInningscds2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "cmino", cmino } }); + } + vm.ComCodes = GetComCodes("studyplace"); vm.CMPRs = Dao.Get("cm.cmprs", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno } }); ViewBag.fronturl = GetConfig("fronturl"); diff --git a/BO/Views/Shared/Partial/ScdScript.cshtml b/BO/Views/Shared/Partial/ScdScript.cshtml index 753d176..88bbfca 100644 --- a/BO/Views/Shared/Partial/ScdScript.cshtml +++ b/BO/Views/Shared/Partial/ScdScript.cshtml @@ -57,10 +57,10 @@ } else { if (seq == 0) { - li.append(""); + li.append(""); } else { - li.append(""); + li.append(""); } } } @@ -111,8 +111,8 @@ $("#completion_estart").val(scdDate); $("#bglayer2").hide(); $("#scdbox").hide(); - //var data = { value: $(this).val(), text: $(this).data("text"), estart: $(this).data("estart") }; - var data = { value: $("input:radio[name=rdoScds]:checked").val(), text: scdInfoSummary, estart: scdDate }; + //var data = { value: $(this).val(), text: $(this).data("text"), estart: $(this).data("estart") }; + var data = { value: $("input:radio[name=rdoScds]:checked").val(), text: scdInfoSummary, estart: scdDate }; bindCMScd(data); break; default: diff --git a/BO/Views/cm/cmregeduschedule.cshtml b/BO/Views/cm/cmregeduschedule.cshtml index 84b3a8c..085ff1f 100644 --- a/BO/Views/cm/cmregeduschedule.cshtml +++ b/BO/Views/cm/cmregeduschedule.cshtml @@ -1,6 +1,7 @@ @model NP.Model.VMCM @{ int studyplaceseq = 0; + int tempInt = 0; }
    @@ -66,9 +67,16 @@
+ @{ + long cmino = 0; + if(Model.CMInningscds.Count() > 0) + { + cmino = Model.CMInningscds.First().cmino; + } + }
-
교육일정등록
+
교육일정등록 @(cmino)
@@ -78,7 +86,7 @@ - + @@ -87,13 +95,14 @@ { foreach (var item in Model.CMInningscds) { + tempInt = Model.CMInningscds2.Where(c => c.cmino == item.cmino && c.cmisno == item.cmisno && c.intv1 == 2).Count(); - + } diff --git a/BO/Views/croom/attscds.cshtml b/BO/Views/croom/attscds.cshtml index 6b519dc..7c43525 100644 --- a/BO/Views/croom/attscds.cshtml +++ b/BO/Views/croom/attscds.cshtml @@ -125,7 +125,7 @@ @Html.Partial("./Partial/ExcelCommentBox") -
+

교육일정변경닫기

    diff --git a/BO/Views/croom/cmlects.cshtml b/BO/Views/croom/cmlects.cshtml index 2b8d7eb..fda3825 100644 --- a/BO/Views/croom/cmlects.cshtml +++ b/BO/Views/croom/cmlects.cshtml @@ -252,7 +252,7 @@

    -
    +

    교육일정변경닫기

      diff --git a/BO/Views/croom/completions.cshtml b/BO/Views/croom/completions.cshtml index a056aac..c981308 100644 --- a/BO/Views/croom/completions.cshtml +++ b/BO/Views/croom/completions.cshtml @@ -404,7 +404,7 @@ -
      +

      교육일정변경닫기

        diff --git a/BO/Views/croom/grade0.cshtml b/BO/Views/croom/grade0.cshtml index 2b22334..afb847e 100644 --- a/BO/Views/croom/grade0.cshtml +++ b/BO/Views/croom/grade0.cshtml @@ -209,7 +209,7 @@


        -
        +

        교육일정변경닫기

          diff --git a/BO/Views/croom/gradeall0.cshtml b/BO/Views/croom/gradeall0.cshtml index 8d9f7d6..220635f 100644 --- a/BO/Views/croom/gradeall0.cshtml +++ b/BO/Views/croom/gradeall0.cshtml @@ -137,7 +137,7 @@ @Html.Partial("./Partial/ExcelCommentBox") -
          +

          교육일정변경닫기

            diff --git a/BO/Views/croom/payview.cshtml b/BO/Views/croom/payview.cshtml index 564992f..5318019 100644 --- a/BO/Views/croom/payview.cshtml +++ b/BO/Views/croom/payview.cshtml @@ -448,7 +448,7 @@

            -
            +

            교육일정변경닫기

              diff --git a/BO/Views/user/ur.cshtml b/BO/Views/user/ur.cshtml index 4d255c0..f9fc2ab 100644 --- a/BO/Views/user/ur.cshtml +++ b/BO/Views/user/ur.cshtml @@ -423,7 +423,7 @@ -
              +

              교육일정변경닫기

                diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index ed8b173..336d1cb 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -513,7 +513,6 @@ namespace NP.Base.Controllers var cancelcount = 0; foreach (var lect in lects) { - // #수료확인 #xodus 작업범위아님 var ispass = Dao.Get("grade.ispass", new Hashtable() { { "lectno", lect.lectno } }).FirstOrDefault().ispass; if (ispass == 1) { @@ -1818,11 +1817,26 @@ namespace NP.Base.Controllers { var result = Dao.Get("cm.cminningscds.applyedu.admin" + (scdallCheck > 0 ? "2" : ""), new System.Collections.Hashtable() { { "cmno", cmno } }); //var result = Dao.Get("cm.cminningscds.applyedu.admin", new System.Collections.Hashtable() { { "cmno", cmno } }); + + IList result2 = new List(); + if (result.Count() > 0) + { + long cmino = result.First().cmino; + result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino } }); + } + foreach (var item in result) { item.scdInfoSummary = string.Format("[{0}] {1}", item.studyplacename, item.estart.ToString("yyyy년 MM월 dd일 ddd요일 HH:mm")); if (item.estart < DateTime.Now) item.isEnd = true; + + if(result2.Count() > 0) + { + item.intv1 = result2.Where(c => c.cmino == item.cmino && c.cmisno == item.cmisno && c.intv1 == 2).Count(); + item.remainPeople += item.intv1; + } + } if (iscmlects == 1) diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index 8c1ad73..7f8ef8a 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -538,9 +538,17 @@ namespace NP.Base.Controllers hsData.Add("studyplace", studyPlace); var result = Dao.Get("cm.cminningscds.applyedu" + (lectno != null ? ".lectno" : ""), hsData); + IList result2 = new List(); + if (result.Count() > 0) + { + long cmino = result.First().cmino; + result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino } }); + } + hsData.Clear(); hsData.Add("cmno", cmno); var resultTmp = Dao.Get("cm.cms", hsData).FirstOrDefault(); + //var result = Dao.Get("cm.cminningscds.applyedu"+(lectno != null ? ".lectno" : ""), new System.Collections.Hashtable() { { "cmno", cmno },{"lectno",lectno }, { "month", (month == null) ? null : month } }); DateTime now = DateTime.Now; result = result.Where(c => c.estart > now.AddYears(-1) && c.estart < now.AddYears(1)).ToList(); @@ -560,6 +568,12 @@ namespace NP.Base.Controllers if (item.estart < Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"))) item.isEnd = true; + + if (result2.Count() > 0) + { + item.intv1 = result2.Where(c => c.cmino == item.cmino && c.cmisno == item.cmisno && c.intv1 == 2).Count(); + item.remainPeople += item.intv1; + } } return JsonBack(result); @@ -659,9 +673,17 @@ where t1.status = 1 and t4.pstatus= 1 /// /// [HttpPost] - public JsonResult CheckQtyScd(int cmisno) + public JsonResult CheckQtyScd(int cmno, int cmino, int cmisno) { var pass = Dao.Get("cm.cminningscdcheck", new System.Collections.Hashtable() { { "cmisno", cmisno }}).First(); + IList result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino }, { "cmisno", cmisno } }); + + if(result2.Count() > 0) + { + int addPass = result2.Where(c => c.intv1 == 2).Count(); + pass += addPass; + } + if (pass == 0) { return JsonBack(new JsonRtn() { code = 0, msg = "해당 일정은 모집 인원이 마감되었습니다." }); @@ -681,9 +703,21 @@ where t1.status = 1 and t4.pstatus= 1 /// /// [HttpPost] - public JsonResult UpdateScd(int cmisno, int lectno) + public JsonResult UpdateScd(int cmno, int cmino, int cmisno, int lectno) { var pass = Dao.Get("cm.cminningscdcheck", new System.Collections.Hashtable() { { "cmisno", cmisno } }).First(); + + IList result2 = new List(); + + result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino } }); + + if (result2.Count() > 0) + { + int tempInt = result2.Where(c => c.cmino == cmino && c.cmisno == cmisno && c.intv1 == 2).Count(); + pass += tempInt; + } + + if (pass == 0) return JsonBack(new JsonRtn() { code = 0, msg = "해당 일정은 모집 인원이 마감되었습니다." }); else if (pass > 0) diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 3533cdb..6f1283e 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -1919,7 +1919,7 @@ and a.remainPeople > 0--> order by a.estart - + + + + diff --git a/Dao/MyBatis/Maps/Grade.xml b/Dao/MyBatis/Maps/Grade.xml index 84d3217..5bc74c2 100644 --- a/Dao/MyBatis/Maps/Grade.xml +++ b/Dao/MyBatis/Maps/Grade.xml @@ -20,27 +20,27 @@ ,a.sd1cnt,a.sd1lectcnt,a.sd1lectpoint,(a.sd1lectpoint / 100) * (case when b.isrebate=1 then d.discussrfd else d.discuss end / 100) * 100 dpoint ,a.rs0cnt,a.rs0lectcnt,a.rs0lectpoint - ,case when case when b.isrebate=1 then d.attendcutrfd else d.attendcut end <= b.attrate then 1 else 0 end ispassa - ,case when case when b.isrebate=1 then d.midcutrfd else d.midcut end <= a.ex0lectpoint then 1 else 0 end ispassm - ,case when case when b.isrebate=1 then d.finalcutrfd else d.finalcut end <= a.ex1lectpoint then 1 else 0 end ispassf - ,case when case when b.isrebate=1 then d.subjectcutrfd else d.subjectcut end <= a.sd0lectpoint then 1 else 0 end ispasss - ,case when case when b.isrebate=1 then d.discusscutrfd else d.discusscut end <= a.sd1lectpoint then 1 else 0 end ispassd - ,case when case when ifnull(d.isoffabs,0)=1 then ifnull(a.at0cnt,0) else 0 end <= ifnull(a.at0lectcnt,0) then 1 else 0 end ispassat + ,(case when (case when b.isrebate=1 then d.attendcutrfd else d.attendcut end) <= b.attrate then 1 else 0 end) ispassa + ,(case when (case when b.isrebate=1 then d.midcutrfd else d.midcut end) <= a.ex0lectpoint then 1 else 0 end) ispassm + ,(case when (case when b.isrebate=1 then d.finalcutrfd else d.finalcut end) <= a.ex1lectpoint then 1 else 0 end) ispassf + ,(case when (case when b.isrebate=1 then d.subjectcutrfd else d.subjectcut end) <= a.sd0lectpoint then 1 else 0 end) ispasss + ,(case when (case when b.isrebate=1 then d.discusscutrfd else d.discusscut end) <= a.sd1lectpoint then 1 else 0 end) ispassd + ,(case when (case when ifnull(d.isoffabs,0)=1 then ifnull(a.at0cnt,0) else 0 end) <= ifnull(a.at0lectcnt,0) then 1 else 0 end) ispassat - ,case when - case when case when ifnull(d.isoffabs,0)=1 then ifnull(a.at0cnt,0) else 0 end <= ifnull(a.at0lectcnt,0) then 1 else 0 end = 1 and - case when case when b.isrebate=1 then d.attendcutrfd else d.attendcut end <= b.attrate then 1 else 0 end =1 and - case when case when b.isrebate=1 then d.midcutrfd else d.midcut end <= a.ex0lectpoint then 1 else 0 end =1 and - case when case when b.isrebate=1 then d.finalcutrfd else d.finalcut end <= a.ex1lectpoint then 1 else 0 end =1 and - case when case when b.isrebate=1 then d.subjectcutrfd else d.subjectcut end <= a.sd0lectpoint then 1 else 0 end =1 and - case when case when b.isrebate=1 then d.discusscutrfd else d.discusscut end <= a.sd1lectpoint then 1 else 0 end =1 and + ,(case when + (case when (case when ifnull(d.isoffabs,0)=1 then ifnull(a.at0cnt,0) else 0 end) <= ifnull(a.at0lectcnt,0) then 1 else 0 end) = 1 and + (case when (case when b.isrebate=1 then d.attendcutrfd else d.attendcut end) <= b.attrate then 1 else 0 end) =1 and + (case when (case when b.isrebate=1 then d.midcutrfd else d.midcut end) <= a.ex0lectpoint then 1 else 0 end) =1 and + (case when (case when b.isrebate=1 then d.finalcutrfd else d.finalcut end) <= a.ex1lectpoint then 1 else 0 end) =1 and + (case when (case when b.isrebate=1 then d.subjectcutrfd else d.subjectcut end) <= a.sd0lectpoint then 1 else 0 end) =1 and + (case when (case when b.isrebate=1 then d.discusscutrfd else d.discusscut end) <= a.sd1lectpoint then 1 else 0 end) =1 and - case when case when b.isrebate=1 then d.cutrfd else d.cut end <= - ((b.attrate / 100) * (case when b.isrebate=1 then d.attendrfd else d.attend end / 100 * 100)) - +((a.ex0lectpoint / 100) * (case when b.isrebate=1 then d.midrfd else d.mid end / 100)* 100) - +((a.ex1lectpoint / 100) * (case when b.isrebate=1 then d.finalrfd else d.final end / 100)* 100) - +((a.sd0lectpoint / 100) * (case when b.isrebate=1 then d.subjectrfd else d.subject end / 100)* 100) - +((a.sd1lectpoint / 100) * (case when b.isrebate=1 then d.discussrfd else d.discuss end / 100)* 100) then 1 else 0 end = 1 then 1 else 0 end ispass + (case when (case when b.isrebate=1 then d.cutrfd else d.cut end) <= + ((b.attrate / 100) * ((case when b.isrebate=1 then d.attendrfd else d.attend end) / 100 * 100)) + +((a.ex0lectpoint / 100) * ((case when b.isrebate=1 then d.midrfd else d.mid end) / 100)* 100) + +((a.ex1lectpoint / 100) * ((case when b.isrebate=1 then d.finalrfd else d.final end) / 100)* 100) + +((a.sd0lectpoint / 100) * ((case when b.isrebate=1 then d.subjectrfd else d.subject end) / 100)* 100) + +((a.sd1lectpoint / 100) * ((case when b.isrebate=1 then d.discussrfd else d.discuss end) / 100)* 100) then 1 else 0 end) = 1 then 1 else 0 end) ispass from ( select a.lectno ,sum(ex0cnt) ex0cnt,sum(ex0lectcnt) ex0lectcnt,sum(ex0lectpoint) ex0lectpoint diff --git a/FO/Views/Course/ApplyPay.cshtml b/FO/Views/Course/ApplyPay.cshtml index 6c4593f..55216c7 100644 --- a/FO/Views/Course/ApplyPay.cshtml +++ b/FO/Views/Course/ApplyPay.cshtml @@ -256,7 +256,7 @@ @Html.Partial("./Partial/ScriptDate") } - + diff --git a/FO/Views/My/LectureOn.cshtml b/FO/Views/My/LectureOn.cshtml index 5e745ea..b07b544 100644 --- a/FO/Views/My/LectureOn.cshtml +++ b/FO/Views/My/LectureOn.cshtml @@ -117,7 +117,9 @@ $('#layermessage') msg("■ 일정변경은 같은 교육과정에서만 가능합니다

                - 일정변경 가능

                설계시공 최초 전문B교육 -> 설계시공 최초 전문B교육

                - 일정변경 불가

                설계시공 최초 전문B교육 -> 설계시공 최초 전문A교육

                ■ 변경 할 일정이 접수마감 인 경우 해당 일정으로 변경이 불가능 합니다."); } - var vLectno; + var vLectno; + var _cmno = 0; + var _cmino = 0; function pc(lectno,userno) { if (lectno < 1) { @@ -132,6 +134,7 @@ function openScd(cmno, lectno, cshape) { vLectno = lectno $(".mpgPop").show(); + _cmno = cmno; setScd(cmno, cshape); } function setScd(cmno, cshape) { @@ -196,6 +199,10 @@ $.each(capResult.obj, function (i, d) { var li = $("
              • "); + if (d.cmisno == 12763) { + var kk = "13"; + } + if (dateStyle == "style2") { d.scdInfoSummary = d.scdInfoSummary + "까지" } @@ -206,6 +213,9 @@ } var pData = $("

                "); + _cmno = d.cmno; + _cmino = d.cmino; + //var aApplyClass = $("", { "onclick": "javascript:applyClassEdu(" + d.cmno + ", " + d.pcmno + ", " + d.cmino + ", " + d.cmisno + ");" }); /*var spanApplyClass = $("", { "class": "smtlChkBtn smtlChk03", "style": "font-size:18px" });*/ /*var spanApplyClass = $("", { "style": "font-size:18px" });*/ @@ -231,12 +241,12 @@ if (d.isselected == 1) { //spanApplyClass.text("수강신청"); //aApplyClass.append(spanApplyClass); - pData.html(""); + pData.html(""); } else { //spanApplyClass.text("수강신청"); //aApplyClass.append(spanApplyClass); - pData.html(""); + pData.html(""); //pData.append(aApplyClass); } } @@ -263,6 +273,8 @@ ulScd.append(li); noDisPlay = false; notContentsCheck = true; + _cmino = 0; + _cmno = 0; } li.append(pData); @@ -275,6 +287,8 @@ li.append(""); ulScd.append(li); notContentsCheck = true; + _cmino = 0; + _cmno = 0; } if (notContentsCheck) { @@ -342,7 +356,7 @@ msg("선택한 일정이 없습니다."); return; } - capp("/focommon/UpdateScd", { cmisno: cmisno, lectno: lectno }, "scdSave"); + capp("/focommon/UpdateScd", { cmisno: cmisno, lectno: lectno, cmno: _cmno, cmino: _cmino }, "scdSave"); } } function scdSave() { diff --git a/Model/BaseModel.cs b/Model/BaseModel.cs index 9e26311..d6dfddd 100644 --- a/Model/BaseModel.cs +++ b/Model/BaseModel.cs @@ -164,9 +164,9 @@ namespace NP.Model //public String fgkey { get; set; } //public DateTime? date1 { get; set; } //public DateTime? date2 { get; set; } - //public int intv1 { get; set; } - //public int intv2 { get; set; } - //public int intv3 { get; set; } + public int intv1 { get; set; } + public int intv2 { get; set; } + public int intv3 { get; set; } //public Int64? longv1 { get; set; } //public Int64? longv2 { get; set; } //public Int64? longv3 { get; set; } diff --git a/Model/VMCM.cs b/Model/VMCM.cs index 8a16af5..c3d8c41 100644 --- a/Model/VMCM.cs +++ b/Model/VMCM.cs @@ -22,6 +22,7 @@ namespace NP.Model public IList CMInnings { get; set; } public IList Books { get; set; } public IList CMInningscds { get; set; } + public IList CMInningscds2 { get; set; } public Book Book { get; set; } public CMEV CMEV { get; set; } public IList ESTs { get; set; }

              • 교육장소 교육종료일 제한인원등록인원(완료/대기)등록인원(완료/대기/출결완료) 최근수정일
                @item.scdseq @item.sseq @item.studyplacename @item.quotastr@item.regmem / @item.zstring0@item.regmem / @item.zstring0 / @tempInt @item.udt