From 37c92988b859091e993c41a7e40b408c5b2a21d9 Mon Sep 17 00:00:00 2001 From: iyak Date: Mon, 16 Jun 2025 00:53:54 +0000 Subject: [PATCH] =?UTF-8?q?=EB=82=B4=EC=9A=A9=20=EB=AA=A8=EB=A5=B4?= =?UTF-8?q?=EA=B3=98=EC=9D=8C=20=EC=98=A4=EB=9E=98=EB=90=9C=EA=B2=83=20?= =?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/Controllers/croomController.cs | 137 ++++++++++++------------------ BO/Views/croom/gradeall.cshtml | 27 ++---- BO/Views/croom/gradeall0.cshtml | 28 +++--- BO/Views/croom/gradeall0_1.cshtml | 37 +++----- FO/Controllers/MyController.cs | 11 ++- FO/Views/My/Index.cshtml | 4 +- Model/CRoom.cs | 2 + 7 files changed, 97 insertions(+), 149 deletions(-) diff --git a/BO/Controllers/croomController.cs b/BO/Controllers/croomController.cs index 0eede6a..598680a 100644 --- a/BO/Controllers/croomController.cs +++ b/BO/Controllers/croomController.cs @@ -658,17 +658,7 @@ namespace NP.BO.Controllers if (searchCheck) { - if (true) // SUserInfo.UserNo != 27460 && SUserInfo.UserNo != 31049 && SUserInfo.UserNo != 110 && SUserInfo.UserNo != 163 - { - vm.Lects = Dao.Get("grade.lectgradesToAll", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); - //vm.Lects = Dao.Get("grade.lectgrades", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); - } - else - { - // 사용안함 - vm.Lects = Dao.Get("grade.lectgradesToAll2", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); - } - + vm.Lects = Dao.Get("grade.lectgradesToAll", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } }); } else { @@ -751,6 +741,12 @@ namespace NP.BO.Controllers return View(vm); } + /// + /// 교육운영 > 성적처리 (전체) + /// + /// + /// + /// public ActionResult gradeall(VMLect vm, string searchGo) { searchGo = string.IsNullOrWhiteSpace(searchGo) ? "" : (searchGo == "1" ? "T" : "F"); @@ -793,6 +789,7 @@ namespace NP.BO.Controllers if (!string.IsNullOrEmpty(vm.stringval11)) { var mobile_temp = vm.stringval11.Replace("-", ""); + if (mobile_temp.Length == 10) { vm.stringval11 = mobile_temp.Substring(0, 3) + "-" + mobile_temp.Substring(3, 3) + "-" + mobile_temp.Substring(6); @@ -801,14 +798,27 @@ namespace NP.BO.Controllers { vm.stringval11 = mobile_temp.Substring(0, 3) + "-" + mobile_temp.Substring(3, 4) + "-" + mobile_temp.Substring(7); } + ht["mobile"] = vm.stringval11; } // [메일 이슈 - 박상완] 성적처리(전체)화면에서 기본값 제거 : 클릭시 전체현황 조회되는거 없애주세요. 클릭해야 검색할수 있도록 // 검색이 모두 빈 값이면 상태 param 0 으로 처리. - if (String.IsNullOrEmpty(vm.stringval) && String.IsNullOrEmpty(vm.stringval2) && String.IsNullOrEmpty(vm.stringval3) && String.IsNullOrEmpty(vm.stringval4) - && String.IsNullOrEmpty(vm.stringval5) && String.IsNullOrEmpty(vm.stringval6) && String.IsNullOrEmpty(vm.stringval7) && String.IsNullOrEmpty(vm.stringval8) - && String.IsNullOrEmpty(vm.stringval9) && String.IsNullOrEmpty(vm.stringval10) && String.IsNullOrEmpty(vm.stringval11)) + + // hs - 가독성이 좋지않아 if문에서 bool로 추출 + bool isStringValEmpty = string.IsNullOrEmpty(vm.stringval) && + string.IsNullOrEmpty(vm.stringval2) && + string.IsNullOrEmpty(vm.stringval3) && + string.IsNullOrEmpty(vm.stringval4) && + string.IsNullOrEmpty(vm.stringval5) && + string.IsNullOrEmpty(vm.stringval6) && + string.IsNullOrEmpty(vm.stringval7) && + string.IsNullOrEmpty(vm.stringval8) && + string.IsNullOrEmpty(vm.stringval9) && + string.IsNullOrEmpty(vm.stringval10) && + string.IsNullOrEmpty(vm.stringval11); + + if (isStringValEmpty) { ht.Add("ustatus", 0); } @@ -829,76 +839,49 @@ namespace NP.BO.Controllers vm.excellog.userip = GetUserIP(); } ViewBag.userno = SUserInfo.UserNo; + if ((searchGo == "T" || vm.isexceldown == 1 && SUserInfo.UserType != 97) || SUserInfo.UserType == 97) { switch (vm.tabidx) { case 0: - - //ht.Add("ustatus", 1); ht.Add("orderby", "ua.asname,ua.asno,u.username"); - if (true) // SUserInfo.UserNo != 27460 && SUserInfo.UserNo != 31049 && SUserInfo.UserNo != 110 && SUserInfo.UserNo != 163 + vm.Lects = Dao.Get("grade.lectgradesToAll", ht); + + // pms6473 => 엑셀다운로드에서 수료번호의 "제" 와 "호" 글자를 제거해달라는 요청 + if (vm.Lects.Any()) { - vm.Lects = Dao.Get("grade.lectgradesToAll", ht); - - // pms6473 => 엑셀다운로드에서 수료번호의 "제" 와 "호" 글자를 제거해달라는 요청 - if (vm.Lects.Any()) + vm.Lects = vm.Lects.Select(x => { - vm.Lects = vm.Lects.Select(x => - { - x.completeno = (x.completeno != null) ? x.completeno.Replace("제", "").Replace("호", "") : ""; - return x; - }).ToList(); - } + x.completeno = (x.completeno != null) ? x.completeno.Replace("제", "").Replace("호", "") : ""; + return x; + }).ToList(); + } - if (vm.isexceldown == 1) - { - return ExportExcel( - new String[] { "순번","결제번호", "사용자ID", "이름","주민번호","교육생연락처","교육유형","교육구분" + if (vm.isexceldown == 1) + { + return ExportExcel( + new String[] { "순번","결제번호", "사용자ID", "이름","주민번호","교육생연락처","교육유형","교육구분" , "기술인분류", "직무분야","전문분야","교육목적","등급", "교육시작일", "교육종료일", "집체교육 출석일", "과정명","수료번호","교육이수시간" , "진도율", "평가점수", "과제점수", "총점", "온라인집체교육출석여부", "강의평가" ,"업체명","업체주소","사업자등록번호","고용보험관리번호","업태","종목","대표자","학력","직위","업체담당자","업체담당자 연락처" ,"교육비","환급여부","환급액","환급은행명","환급계좌","환급계좌예금주","계산서이메일","소속협회" ,"교육상위분류","교육하위분류","교육장소","교육연도", "수료여부" - } - , new String[] { "rno","payno", "userid", "username","userpno", "mobile","cshapename","edukind" + } + , new String[] { "rno","payno", "userid", "username","userpno", "mobile","cshapename","edukind" , "typemanname","typejobname", "zstring0","typeeduname","typegradename", "sdatestr", "edatestr", "zstring3", "cname","completeno","studytime" , "attrate", "ex1point", "sd0point", "tpointstr", "isoffabsstr", "rs0point" ,"asname","addr","brno","eino","btype","bkind","ceoname","slevelName","uduty","mname","mphone" ,"payamt","isrebatename","rbankamt","rbank","rbankaccnum","rbankuser","taxemail","association" ,"pcgname","cgname","studyplacename","tyear", "iscompletename" - } - , vm.Lects - , $"성적처리전체{DateTime.Now.Year}{DateTime.Now.Month}{DateTime.Now.Day}" - , null - , ",2,4" - , vm.excellog); - } + } + , vm.Lects + , $"성적처리전체{DateTime.Now.Year}{DateTime.Now.Month}{DateTime.Now.Day}" + , null + , ",2,4" + , vm.excellog); } - else - { - //사용안함 - vm.Lects = Dao.Get("grade.lectgradesToAll2", ht); - if (vm.isexceldown == 1) - { - return ExportExcel( - new String[] { "순번","결제번호", "사용자ID", "이름","주민번호","교육생연락처","교육유형","교육구분" - , "기술인분류", "직무분야","교육목적","등급", "교육시작일", "교육종료일", "집체교육 출석일", "과정명","수료번호","교육이수시간" - , "진도율", "평가점수", "과제점수", "총점", "온라인집체교육출석여부", "강의평가" - ,"업체명","업체주소","사업자등록번호","고용보험관리번호","업태","종목","대표자","학력","직위","업체담당자","업체담당자 연락처" - ,"교육비","환급여부","환급액","환급은행명","환급계좌","환급계좌예금주","계산서이메일","소속협회" - ,"교육상위분류","교육하위분류","교육장소","교육연도", "수료여부"}, - new String[] { "rno","payno", "userid", "username","userpno", "mobile","cshapename","edukind" - , "typemanname","typejobname","typeeduname","typegradename", "sdatestr", "edatestr", "zstring3", "cname","completeno","studytime" - , "attrate", "exfpoint", "subjectpoint", "tpointstr", "isoffabsstr", "rsCount" - ,"asname","addr","brno","eino","btype","bkind","ceoname","slevelName","uduty","mname","mphone" - ,"payamt","isrebatename","rbankamt","rbank","rbankaccnum","rbankuser","taxemail","association" - ,"pcgname","cgname","studyplacename","tyear", "iscompletename" }, - vm.Lects, - "성적처리전체" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day, null, ",2,4", vm.excellog); - } - } vm.pagetotalcount = GetCount(vm.Lects.FirstOrDefault()); break; case 2: @@ -954,15 +937,8 @@ namespace NP.BO.Controllers { vm.Lect = Dao.Get("lect.lects", new System.Collections.Hashtable() { { "lectno", vm.longval } }).First(); vm.LectInningPages = Dao.Get("lect.lectinningpages", new System.Collections.Hashtable() { { "lectno", vm.Lect.lectno }, { "isscd", 0 } }); - - // [이슈_602 / 박상완] 활동이력 탭에서 '검색' 시 데이터 로드 할 수 있도록 변경 - // 파라미터 userno 를 -1으로 변경 - // [이슈 404 오류] 첫 페이지 조회시 쿼리문 조회 불필요 - //vm.PageLogs = Dao.Get("lect.pagelogs", new System.Collections.Hashtable() { { "start", vm.Lect.sstime }, { "end", vm.Lect.setime.Value.ToString("yyyy-MM-dd 23:59:59") }, { "userno", -1 }, { "logsite", 1 } }); - - // [이슈_602 / 박상완] YYYY-MM-DD 로 검색하는 부분을 조회일 하루로 기본값 부탁드립니다. 예) 오늘 조회 시 : 2021-12-27 ~ 2021-12-27 - vm.Lect.sstime = DateTime.Now; // (검색) 시작일 - 현재시간 - vm.Lect.setime = DateTime.Now.AddHours(1); // (검색) 종료일 - 현재시간 + 1시간 + vm.Lect.sstime = DateTime.Now; // (검색) 시작일 - 현재시간 + vm.Lect.setime = DateTime.Now.AddHours(1); // (검색) 종료일 - 현재시간 + 1시간 return View(vm); } @@ -971,28 +947,19 @@ namespace NP.BO.Controllers if (!IsPost()) { vm.pagerowcount = 50; - vm.stringval4 = "1"; - //vm.stringval = DateTime.Now.ToString("yyyy-MM-01"); - //vm.stringval2 = Convert.ToDateTime(vm.stringval).AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd"); + vm.stringval4 = "1"; } + if (vm.isexceldown == 1) { vm.pagerowcount = 1000000; } var ht = SetHash(vm, false); - - //if (vm.stringval == null) - //{ - // vm.stringval = DateTime.Now.AddDays(-6).ToString("yyyy-MM-dd"); - // vm.stringval2 = DateTime.Now.ToString("yyyy-MM-dd"); - //} ht.Add("cdts", vm.stringval); ht.Add("cdte", string.IsNullOrEmpty(vm.stringval2) ? null : (vm.stringval2 + " 23:59:59")); - //ht.Add("pstatusin", vm.stringval3); - //ht.Add("isrefundcall", string.IsNullOrEmpty(vm.stringval4) ? null : "1"); - //ht.Add("rstatusin", vm.stringval5); - String pstatusall = null; + + string pstatusall = null; if (vm.stringval3 != null) { pstatusall = " and ((p.pstatus in (" + vm.stringval3 + ") and (pr.rstatus is null or p.rstatus = 0))"; diff --git a/BO/Views/croom/gradeall.cshtml b/BO/Views/croom/gradeall.cshtml index 359f26d..855a931 100644 --- a/BO/Views/croom/gradeall.cshtml +++ b/BO/Views/croom/gradeall.cshtml @@ -2,7 +2,6 @@
- @*@Html.Partial("./Partial/SearchCaption")*@
@@ -81,9 +80,9 @@ - - @**@ + @@ -94,31 +92,33 @@ { } - @**@ @*최종평가*@ - + @*과제*@ - + @*토론*@ @*환산점수*@ - - @if (d.isoffabs == 1) + + + + + @*@if (d.isoffabs == 1) { } else { - } - @**@ + }*@ + @if (!ViewBag.IsSubAdmin96) { diff --git a/BO/Views/croom/gradeall0_1.cshtml b/BO/Views/croom/gradeall0_1.cshtml index e9c5aab..5ed05ea 100644 --- a/BO/Views/croom/gradeall0_1.cshtml +++ b/BO/Views/croom/gradeall0_1.cshtml @@ -6,9 +6,9 @@
교육생 평가현황
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } }) - @Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1" : "0;0") + ";1;1;0;평가안내") - @*엑셀다운로드*@ - 엑셀다운로드 + @Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1" : "0;0") + ";1;1;0;평가안내") + 엑셀다운로드 + @if (Model.IsAdmin) { 수료확인 @@ -36,8 +36,7 @@
- - @**@ + @@ -97,8 +96,6 @@ } - @**@ - @*최종평가*@ @@ -114,15 +111,16 @@ - @if (d.isoffabs == 1) + @*@if (d.isoffabs == 1) { } else { - } - @**@ + }*@ + + @if (!ViewBag.IsSubAdmin96) { @@ -168,11 +166,7 @@ @@ -273,8 +267,7 @@ capp("/acommon/authkey", { authtype: _authtype, jobkey: lectno }, "cbauthkey"); } function cbauthkey() { - if (capResult.code == 1000) { - @*var pop = window.open('@ViewBag.fronturl/Open/CertPrint?userno=@ViewBag.SSUserNo&authtype=' + _authtype + '&randkey=' + capResult.obj, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");*@ + if (capResult.code == 1000) { var pop = window.open('@ViewBag.reporturl/certification.aspx?lectno='+_lectno, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0"); if (pop == null) { msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요."); @@ -364,17 +357,12 @@ } var lis = ""; $.each($("#tbodyoff tr"), function (i, r) { - //if ($(r).find("input.att:checked").val() != $(r).attr("data-attorg")) { lis += ";" + $(r).attr("data-no") + ":" + $(r).find("input.att:checked").val(); - //} }); - //if (lis == "") { - // msg2("저장했습니다."); - //} else { + data.append("lis", lis.substr(1)); data.append("fgnooff", _fgno); capfile("/acommon/offattsave", data, "cboffattsave", false, null, true, true); - //} } } function cboffattsave() { @@ -382,5 +370,4 @@ msgf2("저장했습니다.", "submit('mform', 0, true)"); } else { msgdev(true); } } - - + \ No newline at end of file diff --git a/FO/Controllers/MyController.cs b/FO/Controllers/MyController.cs index aac75d4..08b7460 100644 --- a/FO/Controllers/MyController.cs +++ b/FO/Controllers/MyController.cs @@ -254,20 +254,29 @@ namespace NP.FO.Controllers return View(vm); } + + /// + /// 마이페이지 > 나의강의실 > 교육일정변경 + /// + /// + /// public ActionResult LectureOn(VMMy vm) { - vm.cmm = Dao.Get("cm.cms", new System.Collections.Hashtable()).FirstOrDefault(); + vm.cmm = Dao.Get("cm.cms", new Hashtable()).FirstOrDefault(); + Hashtable hsData = new Hashtable(); hsData.Add("userno", SUserInfo.UserNo); hsData.Add("cgcode", vm.intval > 0 ? TestCode3 : null); //hsData.Add("cshape", 2); hsData.Add("issubtable", 1); + vm.Lects = Dao.Get("lect.mylectures2", hsData); foreach (var item in vm.Lects) { item.intv1 = 0; + if ((item.iscomplete == null || item.iscomplete == 0) && item.edate < DateTime.Now) { item.lectStatus = "미수료"; diff --git a/FO/Views/My/Index.cshtml b/FO/Views/My/Index.cshtml index 1a1cf92..ec7b71f 100644 --- a/FO/Views/My/Index.cshtml +++ b/FO/Views/My/Index.cshtml @@ -255,8 +255,8 @@ if (Model.CRoomLectSdInfo != null) { lectsdInfo = Model.CRoomLectSdInfo - .Where(x => x.lectno == d.longval) - .SingleOrDefault(); + .Where(x => x.lectno == d.longval && x.cmno == d.intval7) + .FirstOrDefault(); } if (lectsdInfo != null && lectsdInfo.lectno > 0) diff --git a/Model/CRoom.cs b/Model/CRoom.cs index ec85e1a..5f05540 100644 --- a/Model/CRoom.cs +++ b/Model/CRoom.cs @@ -33,5 +33,7 @@ namespace NP.Model public DateTime checktime { get; set; } /// 현재 기간내 수강여부 public bool iscurrentlecture { get; set; } + /// 과정번호 (과정키) + public int cmno { get; set; } } } \ No newline at end of file
집합교육 - @{ + @{ Dictionary attendance = new Dictionary() - { + { { 0, "전체"} , { 1, "해당없음"} , { 2, "대상자(미입력/출석/결석)"} @@ -130,16 +129,12 @@ } - @*Html.Partial("gradeall" + (Model.tabidx == 2 || Model.tabidx == 3 ? 2 : Model.tabidx), Model)*@ @{ string callpage = "gradeall" + (Model.tabidx == 2 || Model.tabidx == 3 ? 2 : Model.tabidx); - //List usernos = new List() { 27460, 31049, 110, 163 }; - //if (usernos.Contains(ViewBag.userno) && Model.tabidx == 0) - //{ - // callpage += "_1"; - //} } + + @Html.Partial(callpage, Model) -} +} \ No newline at end of file diff --git a/BO/Views/croom/gradeall0.cshtml b/BO/Views/croom/gradeall0.cshtml index 220635f..25daadf 100644 --- a/BO/Views/croom/gradeall0.cshtml +++ b/BO/Views/croom/gradeall0.cshtml @@ -6,8 +6,7 @@
교육생 평가현황
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } }) - @Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1" : "0;0") + ";1;1;0;평가안내") - @*엑셀다운로드*@ + @Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1" : "0;0") + ";1;1;0;평가안내") 엑셀다운로드 @if (Model.IsAdmin) { @@ -36,8 +35,7 @@
핸드폰 교육시작일 교육종료일진도율진행평가진도율 최종평가 과제 토론@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())@(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())@(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())@(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())@(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())@( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString()) - @(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString()) - - + @(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString()) + + -@(d.rs0lectcnt) / @(d.rs0cnt)@(d.rs0lectcnt > 0 ? 1 : 0) / @(d.rs0cnt > 0 ? 1 : 0) 핸드폰 교육시작일 교육종료일진도율진행평가진도율 최종평가 과제 토론@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())@(d.exfpoint) -@(d.rs0lectcnt) / @(d.rs0cnt)@d.rsCount