From 93cfa94a95cb47879b71126e3bbacb0aadadf702 Mon Sep 17 00:00:00 2001 From: swpark Date: Wed, 17 Nov 2021 00:36:41 +0000 Subject: [PATCH] =?UTF-8?q?#=20<=EC=9A=94=EC=B2=AD=EC=82=AC=ED=95=AD>=2020?= =?UTF-8?q?21.11.17=20=EB=B0=95=EC=83=81=EC=99=84=20(swpark@nptc.kr)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 성적처리(전체) 핸드폰 검색 기능 추가 2. 텝 별 엑셀 다운로드 추가 3. 컬럼 변경 (이름과 아이디 분리 및 핸드폰 추가) # 커밋 파일 BO\Controllers\croomController.cs BO\Views\croom\gradeall.cshtml BO\Views\croom\gradeall0.cshtml BO\Views\croom\gradeall2.cshtml BO\Views\croom\gradeall4.cshtml Dao\MyBatis\Maps\Grade.xml Dao\MyBatis\Maps\Lect.xml Model\CM.cs # 테스트 결과 - 이상없음 # 특이사항 및 이슈사항 - 이상없음 --- BO/Controllers/croomController.cs | 22 +++++- BO/Views/croom/gradeall.cshtml | 8 ++ BO/Views/croom/gradeall0.cshtml | 18 +++-- BO/Views/croom/gradeall2.cshtml | 11 ++- BO/Views/croom/gradeall4.cshtml | 9 ++- Dao/MyBatis/Maps/Grade.xml | 1 + Dao/MyBatis/Maps/Lect.xml | 4 + Model/CM.cs | 117 ++++++++++++++++++++++++++++++ 8 files changed, 178 insertions(+), 12 deletions(-) diff --git a/BO/Controllers/croomController.cs b/BO/Controllers/croomController.cs index 8c90cc8..4a3a5c3 100644 --- a/BO/Controllers/croomController.cs +++ b/BO/Controllers/croomController.cs @@ -657,6 +657,7 @@ namespace NP.BO.Controllers ht.Add("sdateall", vm.stringval8); ht.Add("edateall", vm.stringval9); ht.Add("asname", vm.stringval10); + ht.Add("mobile", vm.stringval11); if (!string.IsNullOrEmpty(vm.stringval6)) { ht.Add(vm.stringval6, vm.stringval7); @@ -670,8 +671,8 @@ namespace NP.BO.Controllers if (vm.isexceldown == 1) { return ExportExcel( - new String[] { "No", "운영기수", "구분", "고객사", "교육장", "과정명", "교육생(ID)","연락처", "교육시작일", "교육종료일", "진도율", "진행평가", "최종평가", "과제", "환산점수", "집합교육출석여부", "강의평가", "수료여부"}, - new String[] { "rno", "sseqname", "isrebatename", "asname", "studyplacename", "cname", "usernameid","mobile", "sdatestr", "edatestr", "attrate", "ex0point", "ex1point", "sd0point", "tpointstr", "isoffabsstr", "rs0point", "iscompletename" }, + new String[] { "No", "운영기수", "구분", "고객사", "교육장", "과정명", "교육생", "ID", "핸드폰", "교육시작일", "교육종료일", "진도율", "진행평가", "최종평가", "과제", "환산점수", "집합교육출석여부", "강의평가", "수료여부"}, + new String[] { "rno", "sseqname", "isrebatename", "asname", "studyplacename", "cname", "username", "userid", "mobile", "sdatestr", "edatestr", "attrate", "ex0point", "ex1point", "sd0point", "tpointstr", "isoffabsstr", "rs0point", "iscompletename" }, vm.Lects, "성적처리전체" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day); } @@ -683,6 +684,14 @@ namespace NP.BO.Controllers ht.Add("extype", vm.tabidx == 2 ? 0 : 1); ht.Add("estate", vm.addstringval2); vm.LectEXes = Dao.Get("lect.lectexes.all", ht); + if (vm.isexceldown == 1) + { + return ExportExcel( + new String[] { "No", "운영기수", "구분", "고객사", "교육장", "과정명", "시험명", "교육생", "ID", "핸드폰", "교육시작일", "교육종료일", "응시일자(제출일자)","경과시간", "IP", "응시상태", "총점", "관리", "수료여부" }, + new String[] { "rno", "sseq", "isrebatename", "asname", "studyplacename", "cname", "exname", "username", "userid", "mobile", "leststr", "leestrExcel", "estarteend", "eseterm", "eip", "estatename", "tpoint", "estartyn", "iscompletename" }, + vm.LectEXes, + "성적처리평가" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day); + } vm.pagetotalcount = GetCount(vm.LectEXes.FirstOrDefault()); } break; @@ -693,6 +702,15 @@ namespace NP.BO.Controllers ht.Add("sdstate", vm.addstringval2); ht.Add("isproduct" + (GetConfig("isstaging") == "1" ? "x" : ""), 1); vm.LectSDs = Dao.Get("lect.lectsds.all", ht); + /*to-do*/ + if (vm.isexceldown == 1) + { + return ExportExcel( + new String[] { "No", "운영기수", "교육장", "과정명", "교육생", "ID", "핸드폰", "교육시작일", "교육종료일", "상태", "점수", "첨삭", "모사", "최근제출일(IP)", "최근평가일(IP)","수료여부" }, + new String[] { "rno", "sseq", "studyplacename", "cname", "username", "userid", "mobile", "leststr", "leestrExcel", "sdstatename", "cpoint2", "feedbox", "copyratename", "submittimeip", "checktimeip", "iscompletename" }, + vm.LectSDs, + "성적처리과제" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day); + } vm.pagetotalcount = GetCount(vm.LectSDs.FirstOrDefault()); } break; diff --git a/BO/Views/croom/gradeall.cshtml b/BO/Views/croom/gradeall.cshtml index adcad30..f06399d 100644 --- a/BO/Views/croom/gradeall.cshtml +++ b/BO/Views/croom/gradeall.cshtml @@ -70,6 +70,14 @@ + + 핸드폰 + +
+ @Html.Partial("./Partial/Text", Model.stringval11, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval11", Style = "width:70%; display:inline-block;", Value = Model.stringval11, CssClass = "ff" })) +
+ + diff --git a/BO/Views/croom/gradeall0.cshtml b/BO/Views/croom/gradeall0.cshtml index 1338333..5ece2d3 100644 --- a/BO/Views/croom/gradeall0.cshtml +++ b/BO/Views/croom/gradeall0.cshtml @@ -30,7 +30,9 @@ 고객사 교육장 과정명 - 교육생(ID) + 교육생 + ID + 핸드폰 교육시작일 교육종료일 진도율 @@ -50,7 +52,7 @@ @d.rnorvt - @if(d.cshape == 2) + @if (d.cshape == 2) { @d.sseq } @@ -62,11 +64,13 @@ @d.asname @d.studyplacename @d.cname - @d.usernameid + @d.username + @d.userid + @d.mobile @((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString()) - @if(d.cshape == 2) + @if (d.cshape == 2) { - if(d.iscomplete != 1) + if (d.iscomplete != 1) { @d.eend.ToShortDateString() } @@ -95,7 +99,9 @@ @if (d.isoffabs == 1) { @d.istatusname - }else{ + } + else + { - } @(d.rs0lectcnt) / @(d.rs0cnt) diff --git a/BO/Views/croom/gradeall2.cshtml b/BO/Views/croom/gradeall2.cshtml index 619ef94..ca7eabb 100644 --- a/BO/Views/croom/gradeall2.cshtml +++ b/BO/Views/croom/gradeall2.cshtml @@ -8,7 +8,9 @@
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-응시상태;2:응시완료;1:응시중;0:미응시" }, { "name", "addstringval2" }, { "selected", Model.addstringval2 }, { "onchange", "submit()" } }) @Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } }) + 엑셀다운로드 @Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1;1" : "0;0;0") + ";1;right;평가안내") +
@@ -22,7 +24,9 @@ - + + + @@ -53,7 +57,10 @@ - + + + + @if (d.cshape == 2) { diff --git a/BO/Views/croom/gradeall4.cshtml b/BO/Views/croom/gradeall4.cshtml index 6d4038a..bc9fe0e 100644 --- a/BO/Views/croom/gradeall4.cshtml +++ b/BO/Views/croom/gradeall4.cshtml @@ -7,6 +7,7 @@
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-응시상태;1:제출;0:미제출" }, { "name", "addstringval2" }, { "selected", Model.addstringval2}, { "onchange", "findme()" } }) @Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } }) + 엑셀다운로드 @Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;11;" : "0;0;0") + ";1;right;평가안내")
@@ -18,7 +19,9 @@
- + + + @@ -46,7 +49,9 @@ } - + + + @if (d.cshape == 2) { diff --git a/Dao/MyBatis/Maps/Grade.xml b/Dao/MyBatis/Maps/Grade.xml index 7727bda..3ec9c2d 100644 --- a/Dao/MyBatis/Maps/Grade.xml +++ b/Dao/MyBatis/Maps/Grade.xml @@ -300,6 +300,7 @@ (case when c.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')ua.asname like concat('%',#asname#,'%')date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate# + cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%') ) a diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 7c22e30..46d3461 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -845,6 +845,7 @@ ,a.iscomplete ,row_number() over(order by $orderby$d.username) rno ,count(a.cdt) over() pagetotalcount + ,cast(AES_DECRYPT(UNHEX(d.mobile), 'np123@!' ) as char) as mobile from lect a inner join cmex b on b.isdel=0 and b.cmno = a.cmno inner join cm b2 on b2.cmno = b.cmno @@ -878,6 +879,7 @@ and (case when b2.cshape = 0 and a.isrebate = 0 then p.payoktime else a.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')and (case when b2.cshape = 2 then f.eend else a.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')and e.asname like concat('%',#asname#,'%') + cast(AES_DECRYPT(UNHEX(d.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%') ) a order by a.rno @@ -1083,6 +1085,7 @@ ,b.sdno,b.tpoint ,c.atext,round((f.MAX_SCORE/100)) copyrate,c.iscopy,c.cpoint,c.feedb,c.submittime,c.submitip,c.checktime,c.checkip ,d.username,d.userid,d.usertype + ,cast(AES_DECRYPT(UNHEX(d.mobile), 'np123@!' ) as char) as mobile ,e.asname ,h.cmisno,h.estart lestart,h.eend leend,h.sseq ,i.cname studyplacename @@ -1124,6 +1127,7 @@ and (case when g.cshape = 0 and a.isrebate = 0 then p.payoktime else a.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')and (case when g.cshape = 2 then h.eend else a.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')and e.asname like concat('%',#asname#,'%') + cast(AES_DECRYPT(UNHEX(d.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%') ) a order by rno diff --git a/Model/CM.cs b/Model/CM.cs index 001d48e..aacb518 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -1222,6 +1222,7 @@ namespace NP.Model /// 교육일정종료일 /// public DateTime eend { get; set; } + /// /// 직위 /// @@ -3248,6 +3249,14 @@ namespace NP.Model /// 응시시작 /// public DateTime? estart { get; set; } + + public String estartymd + { + get + { + return estart == null ? "" : estart.Value.ToString("yyyy-MM-dd"); + } + } public String estartymdhm { get @@ -3259,6 +3268,14 @@ namespace NP.Model /// 응시종료 /// public DateTime? eend { get; set; } + public String eendymd + { + get + { + return eend == null ? "" : eend.Value.ToString("yyyy-MM-dd"); + } + } + public String eendymdhm { get @@ -3273,6 +3290,35 @@ namespace NP.Model return estart == null || eend == null ? "" : string.Format("{0}분", Convert.ToInt32((eend - estart).Value.TotalMinutes)); } } + + + /// + /// 응시일자(제츨일자) + /// + public String estarteend { + + get + { + String estartymdhm = estart == null ? "" : estart.Value.ToString("yyyy-MM-dd HH:mm"); + String eendymdhm = eend == null ? "" : eend.Value.ToString("yyyy-MM-dd HH:mm"); + + return string.Format("{0}({1})", estartymdhm, eendymdhm); + } + + } + + /// + /// 관리 - 재응시 여부 + /// + public String estartyn + { + get + { + return estart == null ? "" : "재응시"; + } + } + + /// /// 총점 /// @@ -3307,6 +3353,10 @@ namespace NP.Model } public String asname { get; set; } public String username { get; set; } + /// + /// 핸드폰 번호 + /// + public String mobile { get; set; } public String usernameid { get @@ -3401,6 +3451,36 @@ namespace NP.Model } } } + + public String leestrExcel + { + get + { + if (cshape == 2) + { + if (iscomplete != null) + { + return leend.ToShortDateString(); + } + else + { + return "-"; + } + } + else + { + if (edate != null) + { + return edate.Value.ToShortDateString(); + } + else + { + return "-"; + } + } + } + } + public int usertype { get; set; } public String scomplete { @@ -3603,6 +3683,10 @@ namespace NP.Model } public String asname { get; set; } public String username { get; set; } + /// + /// 핸드폰 번호 + /// + public String mobile { get; set; } public String usernameid { get @@ -3722,6 +3806,39 @@ namespace NP.Model } } public int? isproduct { get; set; } + + /// + /// (엑셀) 교육종료일 + /// + public String leestrExcel + { + get + { + if (cshape == 2) + { + if (leend != null) + { + return leend.ToShortDateString(); + } + else + { + return "-"; + } + + } + else + { + if (edate != null) + { + return edate.Value.ToShortDateString(); + } + else + { + return "-"; + } + } + } + } } /// /// 토론글
교육장 과정명 시험명교육생(ID)교육생ID핸드폰 교육시작일 교육종료일 응시일자
(제출일자)
@d.studyplacename @d.cname @d.exname@d.usernameid@d.username@d.userid@d.mobile@((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString()) 운영기수 교육장 과정명교육생(ID)교육생ID핸드폰 교육시작일 교육종료일 상태@d.studyplacename @d.cname@d.usernameid@d.username@d.userid@d.mobile @((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString())