From 3db612f6995d3dc8aa6a3e76e0533526d2d646e3 Mon Sep 17 00:00:00 2001 From: hyunho Date: Fri, 26 Mar 2021 05:07:12 +0000 Subject: [PATCH] --- BO/Controllers/croomController.cs | 8 ++++++-- BO/Views/croom/cmlects.cshtml | 5 +---- BO/Views/croom/lectcms.cshtml | 2 +- Base/Controller/ACommonCRoom.cs | 5 ++++- Dao/MyBatis/Maps/Lect.xml | 12 +++++++++--- FO/Views/My/Document.cshtml | 4 ++-- Model/CM.cs | 2 +- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/BO/Controllers/croomController.cs b/BO/Controllers/croomController.cs index 5a7f434..ebe39b1 100644 --- a/BO/Controllers/croomController.cs +++ b/BO/Controllers/croomController.cs @@ -22,8 +22,8 @@ namespace NP.BO.Controllers { if (!IsPost()) { - vm.stringval5 = DateTime.Now.AddMonths(-2).ToString("yyyy-MM-01"); - vm.stringval6 = Convert.ToDateTime(vm.stringval5).AddMonths(3).AddSeconds(-1).ToString("yyyy-MM-dd"); + vm.stringval5 = null; + vm.stringval6 = null; } var ht = SetHash(vm, false); @@ -252,6 +252,10 @@ namespace NP.BO.Controllers { ht.Add("statusin", "5,8,9"); } + else if (vm.addstringval == "3") + { + ht.Add("statusin", "6"); + } else { ht.Add("status", vm.addstringval); diff --git a/BO/Views/croom/cmlects.cshtml b/BO/Views/croom/cmlects.cshtml index 12fbe6a..ddc94a8 100644 --- a/BO/Views/croom/cmlects.cshtml +++ b/BO/Views/croom/cmlects.cshtml @@ -398,7 +398,7 @@ } function setScd2() { - capp("/acommon/GetScdForMixEdu", { cmno: @Model.CM.cmno }, "renderScd2"); + capp("/acommon/GetScdForMixEdu", { cmno: @Model.CM.cmno, iscmlects : 1 }, "renderScd2"); } function renderScd2() { var divedudate = $("#divedudate"); @@ -406,8 +406,6 @@ divedudate.empty(); select.append(""); $.each(capResult.obj, function (i, d) { - if (d.estartday >= @DateTime.Now.DayOfYear) - { if (@Model.addstringval4.ToString() != "2099-12-31") { if (d.estartShortDateString == "@Model.addstringval4") { select.append(" "); @@ -419,7 +417,6 @@ else { select.append(" "); } - } }); divedudate.append(select); } diff --git a/BO/Views/croom/lectcms.cshtml b/BO/Views/croom/lectcms.cshtml index c9d5eb2..5d620f5 100644 --- a/BO/Views/croom/lectcms.cshtml +++ b/BO/Views/croom/lectcms.cshtml @@ -66,7 +66,7 @@ @d.ssrename @(d.cshape != 0 ? d.studyplacename : "-") @d.quotastr - @d.countsuccess + @d.countsuccessstr @*@d.countstanbyaccept / @d.countstanbypay / @d.countstanbydraw*@ @d.countstanbyacceptstr @*@string.Format("( {0} / {1} / {2} / {3} )", d.countlect.ToString("#,0"),d.countsuccess.ToString("#,0"),d.countstanbydraw.ToString("#,0"),d.countstanbypay.ToString("#,0"))*@ diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index 1027157..978b73c 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -1008,7 +1008,7 @@ namespace NP.Base.Controllers } [HttpPost] - public JsonResult GetScdForMixEdu(int cmno) + public JsonResult GetScdForMixEdu(int cmno, int iscmlects = 0) { var result = Dao.Get("cm.cminningscds.applyedu", new System.Collections.Hashtable() { { "cmno", cmno }}); foreach (var item in result) @@ -1018,6 +1018,9 @@ namespace NP.Base.Controllers item.isEnd = true; } + if (iscmlects == 1) + return JsonBack(result.OrderByDescending(o => o.estart)); + return JsonBack(result); } diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 2124b72..d680693 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -126,14 +126,20 @@ a.tyear=#tyear# a.tmno=#tmno# b.isdel=0 and (u.status in (1,99) or u.status is null) - + + + date_format(b.sstime,'%Y%m%d') >= date_format(#sstime#,'%Y%m%d') or date_format(b.retime,'%Y%m%d') = '20991231' + + + date_format(b.setime,'%Y%m%d') <= date_format(#setime#,'%Y%m%d') or date_format(b.retime,'%Y%m%d') = '20991231' + group by b.cmno having sum(d.iscomplete) < 1 @@ -1495,7 +1501,7 @@