From 0774733ebceed4aa44827baf18f4fcd2a9e84a5e Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 19 Jan 2021 06:57:17 +0000 Subject: [PATCH] =?UTF-8?q?=EC=83=81=EC=8B=9C=EC=8B=A0=EC=B2=AD=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=9E=91=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Controllers/HomeController.cs | 2 +- BO/Views/Home/Index.cshtml | 2 +- BO/Views/cm/cmreg.cshtml | 67 +++++++++++++++---- BO/Views/croom/cmlects.cshtml | 108 +++++++++++++++++++++---------- Base/Controller/ACommonCM.cs | 10 +++ Base/Controller/ACommonCRoom.cs | 9 +++ Dao/MyBatis/Maps/CM.xml | 14 ++-- Dao/MyBatis/Maps/Lect.xml | 25 ++++--- Model/CM.cs | 18 ++++-- 9 files changed, 187 insertions(+), 68 deletions(-) diff --git a/BO/Controllers/HomeController.cs b/BO/Controllers/HomeController.cs index 88cbafc..38196a5 100644 --- a/BO/Controllers/HomeController.cs +++ b/BO/Controllers/HomeController.cs @@ -22,7 +22,7 @@ namespace NP.BO.Controllers return RedirectToAction(nameof(userController.users), "user"); } vm.Data = Dao.Get("common.home", SUserInfo.UserNo).First(); - vm.CMs = Dao.Get("cm.cms", new System.Collections.Hashtable() { { "ismaster", 0 },{ "isuse", 1 },{"cname",vm.stringval },{ "iscurrent",1 },{ "orderby", "t.tyear desc,t.tseq desc,a.cname,a.classno"} }); + vm.CMs = Dao.Get("cm.cms", new System.Collections.Hashtable() { { "ismaster", 0 },{ "isuse", 1 },{"cname",vm.stringval },{ "iscurrent",1 },{ "orderby", "a.setime desc,t.tyear desc,t.tseq desc,a.cname,a.classno" } }); return View(vm); } } diff --git a/BO/Views/Home/Index.cshtml b/BO/Views/Home/Index.cshtml index f07bb6e..0eefe42 100644 --- a/BO/Views/Home/Index.cshtml +++ b/BO/Views/Home/Index.cshtml @@ -76,7 +76,7 @@ + } diff --git a/BO/Views/croom/cmlects.cshtml b/BO/Views/croom/cmlects.cshtml index f89f96f..3295735 100644 --- a/BO/Views/croom/cmlects.cshtml +++ b/BO/Views/croom/cmlects.cshtml @@ -10,7 +10,11 @@
- @(Model.CM.rsrename) (@(Model.CM.sssename)) (@(Model.CM.ssseterm)일) + @(Model.CM.rsrename) (@(Model.CM.sssename)) + @if (Model.CM.retimeymd != "2099-12-31") + { + (@(Model.CM.ssseterm)일) + }
@@ -67,26 +71,26 @@ - @foreach (var d in Model.Lects) - { - - - @d.rnorvt - @d.asname - @(d.cnoname)(@d.cnoid) - @d.username@Html.Raw(string.IsNullOrEmpty(d.fileurl) ? "" : (" ")) - @d.cdtymd - @d.statusname - @d.pstatusname - @if (d.cshape == 2 && d.estart != null && d.estart > Convert.ToDateTime("1900-01-01") && d.estart >= DateTime.Now) //혼합모드라면 - { - @d.estart.ToShortDateString() - } - else - { - - - } - + @foreach (var d in Model.Lects) + { + + + @d.rnorvt + @d.asname + @(d.cnoname)(@d.cnoid) + @d.username@Html.Raw(string.IsNullOrEmpty(d.fileurl) ? "" : (" ")) + @d.cdtymd + @d.statusname + @d.pstatusname + @if (d.cshape == 2 && d.estart != null && d.estart > Convert.ToDateTime("1900-01-01") && d.estart >= DateTime.Now) //혼합모드라면 + { + @d.estart.ToShortDateString() + } + else + { + - + } + } @@ -97,7 +101,7 @@
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
-
+

교육생 정보닫기

@@ -106,13 +110,14 @@ @*@if(Model.CM.cgno != 10) - { - - }*@ + { + + }*@ @**@ @**@ +
이름(ID)
직위
공정거래업무경력
공정거래업무경력
이메일
회사전화번호
휴대전화번호
연합회 교육이력
교육기간@Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "sdate" } }) ~ @Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "edate" } })저장
경력증명서
심사여부@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "3:신청중;4:승인;5:미승인" }, { "checked", 3 }, { "name", "status" } })
@@ -138,21 +143,36 @@
@section styles{ } @section scriptsHeader{ @Html.Partial("./Partial/semscript") + @Html.Partial("./Partial/ScriptDate") } @section scripts{ - + } diff --git a/Base/Controller/ACommonCM.cs b/Base/Controller/ACommonCM.cs index 9cedc9c..e1e7b5e 100644 --- a/Base/Controller/ACommonCM.cs +++ b/Base/Controller/ACommonCM.cs @@ -115,6 +115,16 @@ namespace NP.Base.Controllers vm.CM.retime = Convert.ToDateTime(vm.CM.retimeymd + " 23:59:59"); vm.CM.setime = Convert.ToDateTime(vm.CM.setimeymd + " 23:59:59"); vm.CM.getime = Convert.ToDateTime(vm.CM.getimeymd + " 23:59:59"); + if (vm.CM.retimeymd == "2099-12-31") + { + vm.CM.sstime = null; + vm.CM.setime = null; + } + if (vm.CM.retime.Value.ToString("yyyyMMdd") == "20991231") + { + vm.CM.rstime = Convert.ToDateTime(DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd 00:00:00")); + vm.CM.gstime = Convert.ToDateTime(DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd 00:00:00")); + } } if (vm.CM.isrefund == 0) { diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index 6c90c8a..a07472f 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -23,6 +23,15 @@ namespace NP.Base.Controllers return JsonOK(1); } [HttpPost] + public JsonResult LectSEDateChange(Int64 lectno, string sdate, string edate, int pstatus, int rstatus) + { + if (pstatus != 1 || rstatus != 0) + { + return JsonBack(new JsonRtn() { code = -1 }); + } + return JsonOK(Dao.Save("lect.sedate.change", new Hashtable() { { "lectno", lectno }, { "sdate", sdate }, { "edate", edate + " 23:59:59" }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); + } + [HttpPost] public JsonResult LectStatus(Int64 lectno, int status,int pstatus) { if(pstatus == 1) diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index b8c2a2f..3da8598 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -122,7 +122,7 @@ ,a.tmno,a.classno,a.rstime,a.retime,a.sstime,a.setime,a.gstime,a.getime ,a.cshape,a.infee,a.outfee,a.quota,a.accommofee ,a.introhtml,a.targethtml,a.goalhtml,a.contenthtml - ,a.studytime,a.studyplace,a.certcc,a.certgradecc,a.jobcc,a.jobpositiongrade,a.difficulty,a.isrefund,a.isuse,a.isseq,a.fgnocm + ,a.studytime,a.studyplace,a.certcc,a.certgradecc,a.jobcc,a.jobpositiongrade,a.difficulty,a.isrefund,a.isuse,a.isseq,a.fgnocm,a.studydays ,a.typeman,a.typeedu,a.typegrade,a.typejob,a.iscertificate ,b.pcgno,b.cgcode cgcode ,b.cgname,c.cgname pcgname @@ -130,8 +130,9 @@ ,t.tyear,t.tseq ,d.cname pcname ,e.ccode,e.cname studyplacename - ,f.cnt lectcnt + ,(select count(l.lectno) cnt from lect l where l.cmno = a.cmno and l.status =1 and l.ischanged=0) lectcnt ,a.ischkatt + ,case when date_format(a.retime,'%Y%m%d') = '20991231' then 1 else 0 end isalldays ,a.cdt,a.udt ,a.cmno value,a.cname text ,row_number() over(order by $orderby$a.udt desc) rno @@ -142,7 +143,6 @@ left outer join term t on t.tmno=a.tmno left outer join cm d on a.ismaster=0 and d.cmno=a.pcmno left outer join comcode e on a.studyplace = e.ccode - left outer join (select count(a.lectno) cnt from lect a where a.cmno=#cmno# and a.status =1 and a.ischanged=0) f on 1 = 1 where a.isdel=0 and a.cmno=#cmno# and a.cmno <> #notcmno# @@ -159,7 +159,7 @@ and a.cname like concat('%',#cname#,'%') and a.ismaster=#ismaster# and a.ismaster in (0,2) - a.isuse=#isuse# + and a.isuse=#isuse# t.tyear=#tyear# t.tseq=#tseq# a.tmno=#tmno# @@ -167,12 +167,13 @@ a.sstime >= #sstime# a.setime <= #setime# and b.cgcode=#cgcode# + and (date_format(a.retime,'%Y%m%d') != '20991231' and a.rstime < now() and a.getime > now()) or date_format(a.retime,'%Y%m%d') = '20991231' and a.isuse=#isuse# ) a - order by a.rno + order by a.isalldays, a.rno + + update lect set ,sdate =#sdate#,edate=#edate# where lectno=#lectno# and status = 1 + update lect set ,status=#status#,oktime=case when oktime is null and #status# = 4 and status<>4 then now() else oktime end where lectno=#lectno# and status in (3,4,5); diff --git a/Model/CM.cs b/Model/CM.cs index 1130b73..b42c1ba 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -156,7 +156,7 @@ namespace NP.Model { get { - return rstime == null && retime == null ? "" : string.Format("{0} ~ {1}", rstime == null ? "" : rstime.Value.ToString("yyyy-MM-dd"), retime == null ? "" : retime.Value.ToString("yyyy-MM-dd")); + return retimeymd == "2099-12-31" ? string.Format("신청일로부터 {0} 일", Convert.ToInt32(studydays)) : rstime == null && retime == null ? "" : string.Format("{0} ~ {1}", rstime == null ? "" : rstime.Value.ToString("yyyy-MM-dd"), retime == null ? "" : retime.Value.ToString("yyyy-MM-dd")); } } @@ -227,21 +227,28 @@ namespace NP.Model { get { - return sstime == null || setime == null ? 0 : (Convert.ToInt32((setime.Value - sstime.Value).TotalDays) + 1); + return retimeymd == "2099-12-31" ? Convert.ToInt32(studydays) : sstime == null || setime == null ? 0 : (Convert.ToInt32((setime.Value - sstime.Value).TotalDays) + 1); + } + } + public String sssetermname + { + get + { + return retimeymd == "2099-12-31" ? Convert.ToInt32(studydays) + " 일" : sstime == null && setime == null ? "" : string.Format("{0}~{1}", sstime == null ? "" : sstime.Value.ToString("yyyy-MM-dd"), setime == null ? "" : setime.Value.ToString("yyyy-MM-dd")); } } public String sssename { get { - return sstime == null && setime == null ? "" : string.Format("{0}~{1}", sstime == null ? "" : sstime.Value.ToString("yy.MM.dd"), setime == null ? "" : setime.Value.ToString("yy.MM.dd")); + return retimeymd == "2099-12-31" ? "상시" : sstime == null && setime == null ? "" : string.Format("{0}~{1}", sstime == null ? "" : sstime.Value.ToString("yy.MM.dd"), setime == null ? "" : setime.Value.ToString("yy.MM.dd")); } } public String sssename2 { get { - return sstime == null && setime == null ? "" : string.Format("{0}~{1}", sstime == null ? "" : sstime.Value.ToString("yyyy-MM-dd"), setime == null ? "" : setime.Value.ToString("yyyy-MM-dd")); + return retimeymd == "2099-12-31" ? "" : sstime == null && setime == null ? "" : string.Format("{0}~{1}", sstime == null ? "" : sstime.Value.ToString("yyyy-MM-dd"), setime == null ? "" : setime.Value.ToString("yyyy-MM-dd")); } } public String sssename3 @@ -251,6 +258,7 @@ namespace NP.Model return sstime == null && setime == null ? "" : string.Format("{0}~{1}", sstime == null ? "" : sstime.Value.ToString("yyyy.MM.dd"), setime == null ? "" : setime.Value.ToString("yyyy.MM.dd")); } } + public Double? studydays { get; set; } /// /// 성적처리시작 /// @@ -1014,6 +1022,8 @@ namespace NP.Model public DateTime payoktime { get; set; } public DateTime? stime { get; set; } public DateTime? etime { get; set; } + public DateTime? sdate { get; set; } + public DateTime? edate { get; set; } public String sip { get; set; } public String eip { get; set; } public int ispaied { get; set; }