This commit is contained in:
hyunho 2021-01-26 08:26:54 +00:00
parent e0dd43df9b
commit b59ae90027
8 changed files with 31 additions and 9 deletions

View File

@ -434,8 +434,10 @@
union all union all
select b.extype dtype select b.extype dtype
,b.exname strval,b.exno intval10 ,b.exname strval,b.exno intval10
,case when a2.sstime &lt; now() and a2.setime &gt; now() then a.attrate else -1 end intval,b.econdition intval2 <!--,case when a2.sstime &lt; now() and a2.setime &gt; now() then a.attrate else -1 end intval,b.econdition intval2-->
,case when c.eend is null then 0 else 1 end intval3,null intval4 ,case when a.sdate &lt; now() and a.edate &gt; now() then a.attrate else -1 end intval,b.econdition intval2
,case when c.eend is null then 0 else 1 end intval3
,null intval4
,row_number() over (partition by b.extype order by b.extype, b.cdt) rno ,row_number() over (partition by b.extype order by b.extype, b.cdt) rno
from lect a from lect a
inner join cm a2 on a2.cmno=a.cmno inner join cm a2 on a2.cmno=a.cmno
@ -447,7 +449,10 @@
union all union all
select 2 dtype select 2 dtype
,b.sdname strval,b.sdno intval10 ,b.sdname strval,b.sdno intval10
,case when a2.sstime &lt; now() and a2.setime &gt; now() then a.attrate else -1 end intval,b.sdcondition intval2,case when c.submittime is null then 0 else 1 end intval3,case when c.checktime is null then 0 else 1 end intval4 <!--,case when a2.sstime &lt; now() and a2.setime &gt; now() then a.attrate else -1 end intval,b.sdcondition intval2-->
,case when a.sdate &lt; now() and a.edate &gt; now() then a.attrate else -1 end intval,b.sdcondition intval2
,case when c.submittime is null then 0 else 1 end intval3
,case when c.checktime is null then 0 else 1 end intval4
,row_number() over (order by b.cdt) rno ,row_number() over (order by b.cdt) rno
from lect a from lect a
inner join cm a2 on a2.cmno=a.cmno inner join cm a2 on a2.cmno=a.cmno
@ -459,7 +464,8 @@
union all union all
select 3 dtype select 3 dtype
,b.sdname strval,b.sdno intval10 ,b.sdname strval,b.sdno intval10
,case when a2.sstime &lt; now() and a2.setime &gt; now() then a.attrate else -1 end intval,b.sdcondition intval2 <!--,case when a2.sstime &lt; now() and a2.setime &gt; now() then a.attrate else -1 end intval,b.sdcondition intval2-->
,case when a.sdate &lt; now() and a.edate &gt; now() then a.attrate else -1 end intval,b.sdcondition intval2
,case when count(d.bno) &gt; 0 then 1 else 0 end intval3 ,case when count(d.bno) &gt; 0 then 1 else 0 end intval3
,case when c.checktime is null then 0 else 1 end intval4 ,case when c.checktime is null then 0 else 1 end intval4
,row_number() over (order by b.cdt) rno ,row_number() over (order by b.cdt) rno

View File

@ -506,6 +506,8 @@
,case when max(e.rfdno) &gt; 0 then 1 else 0 end rfdstatus ,case when max(e.rfdno) &gt; 0 then 1 else 0 end rfdstatus
,lect.cmisno ,lect.cmisno
,cmis.estart cmiestart,cmis.eend cmieend ,cmis.estart cmiestart,cmis.eend cmieend
,case when lect.sdate is null then c.sstime else lect.sdate end as sdate
,case when lect.edate is null then c.setime else lect.edate end as edate
from pay a from pay a
inner join payitem b on b.payno=a.payno and b.ptype in (0,1,4) and b.pstatus in (1,21,22,51,55) inner join payitem b on b.payno=a.payno and b.ptype in (0,1,4) and b.pstatus in (1,21,22,51,55)
inner join cm c on c.cmno=b.itemno and c.rstime &lt; now() and c.retime &gt; now() inner join cm c on c.cmno=b.itemno and c.rstime &lt; now() and c.retime &gt; now()

View File

@ -63,6 +63,8 @@ namespace NP.FO.Controllers
public ActionResult Research() public ActionResult Research()
{ {
vm.CMRSes = Dao.Get<CMRS>("cr.mycmrs", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo} }); vm.CMRSes = Dao.Get<CMRS>("cr.mycmrs", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo} });
Lect lect = Dao.Get<Lect>("cr.checklectdate", new System.Collections.Hashtable() { { "lectno", vm.croomlectno } }).First();
ViewBag.isres = DateTime.Now <= lect.edate? 1 : -1;
return CView(); return CView();
} }
public ActionResult Grade() public ActionResult Grade()

View File

@ -34,7 +34,7 @@ namespace NP.FO.Controllers
ViewBag.mpgContclass = ""; ViewBag.mpgContclass = "";
vm.Assign = Dao.Get<Assign>("users.users.assign", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault(); vm.Assign = Dao.Get<Assign>("users.users.assign", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault();
//신청중,수강중,나의할일,나의알림 //신청중,수강중,나의할일,나의알림
vm.Datas = Dao.Get<Data>("lect.mydata", SUserInfo.UserNo); vm.Datas = Dao.Get<Data>("lect.mydata", SUserInfo.UserNo).Where(x => x.time2 >= DateTime.Now).ToList(); //수강종료일이 지난건 노출하지않도록
var sd = Request.Url.Host.Split('.')[0]; var sd = Request.Url.Host.Split('.')[0];
if (GetConfig("isdevtest") != "" && Request.Url.Host != "ynicte.nptc.kr" && Request.Url.Host != "222.122.63.91" && MainSubDomain.ToUpper() != sd.ToUpper()) if (GetConfig("isdevtest") != "" && Request.Url.Host != "ynicte.nptc.kr" && Request.Url.Host != "222.122.63.91" && MainSubDomain.ToUpper() != sd.ToUpper())
{ {

View File

@ -22,7 +22,8 @@
<h5><b>@(d.dtype == 0 ? "진행평가":d.dtype==1?"최종평가":d.dtype == 2?"과제":d.dtype==3?"토론":"")</b><span> @d.strval</span></h5> <h5><b>@(d.dtype == 0 ? "진행평가":d.dtype==1?"최종평가":d.dtype == 2?"과제":d.dtype==3?"토론":"")</b><span> @d.strval</span></h5>
<p>참여조건 : 진도율 @(d.intval2)% 이상</p> <p>참여조건 : 진도율 @(d.intval2)% 이상</p>
</th> </th>
<td><a href="#" onclick="eva(@d.dtype, @d.intval10, @(d.intval4==1?4:d.intval3==1?3:d.intval3==0 && d.intval >=d.intval2?2:1))" class="evaType@(d.intval4==1?"04":d.intval3==1?"03":d.intval3==0 && d.intval >=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]")</a></td> <td><a href="#" onclick="eva(@d.dtype, @d.intval10, @(d.intval4==1?4:d.intval3==1?3:d.intval3==0 && d.intval >=d.intval2?2:1))"
class="evaType@(d.intval4==1?"04":d.intval3==1?"03":d.intval3==0 && d.intval >=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]")</a></td>
</tr> </tr>
} }
@if (Model.Datas.Count() < 1) @if (Model.Datas.Count() < 1)

View File

@ -13,9 +13,18 @@
<tr> <tr>
<th> <th>
<h5><span>@d.rstypename</span></h5> <h5><span>@d.rstypename</span></h5>
<p>참여조건 : 진도율 @(d.rscondition)% 이상</p> <p>참여조건 : 진도율 @(d.rscondition)% 이상 , 수강 기간내</p>
</th> </th>
<td><a href="#" data-rsno="@(d.attrate >= d.rscondition && d.isrsok == 0?d.rsno:0)" class="evaType@(d.rscondition > d.attrate ? "01": d.isrsok == 1 ? "03" : "02")">@(d.rscondition > d.attrate ? "참여불가" : d.isrsok == 1 ? "참여완료" : "참여")</a></td> <td>
@if (ViewBag.isres > 0)
{
<a href="#" data-rsno="@(d.attrate >= d.rscondition && d.isrsok == 0 ? d.rsno : 0)" class="evaType@(d.rscondition > d.attrate ? "01" : d.isrsok == 1 ? "03" : "02")">@(d.rscondition > d.attrate ? "참여불가" : d.isrsok == 1 ? "참여완료" : "참여")</a>
}
else
{
<a href="#" class="evaType02">참여불가</a>
}
</td>
</tr> </tr>
} }
} }

View File

@ -40,7 +40,7 @@
<dl class="ltaDl"> <dl class="ltaDl">
<dt class="@(d.pstatus == 1 && d.rfdstatus < 1 ? "ltaDlbk":"ltaDlred")">@(d.pstatus == 55 ? "승인대기" : d.pstatus == 51 ? "심사중" : d.pstatus == 21 ? "결제대기" : d.pstatus == 22 ? "입금대기" : d.pstatus == 1 && d.rfdstatus > 0 ? "환불요청" : d.pstatus == 1 ? "결제완료" : d.rstatus == 1 ? "부분환불" : d.rstatus == 2 ? "전액환불" : "-")</dt> <dt class="@(d.pstatus == 1 && d.rfdstatus < 1 ? "ltaDlbk":"ltaDlred")">@(d.pstatus == 55 ? "승인대기" : d.pstatus == 51 ? "심사중" : d.pstatus == 21 ? "결제대기" : d.pstatus == 22 ? "입금대기" : d.pstatus == 1 && d.rfdstatus > 0 ? "환불요청" : d.pstatus == 1 ? "결제완료" : d.rstatus == 1 ? "부분환불" : d.rstatus == 2 ? "전액환불" : "-")</dt>
<dd> <dd>
수강기간 : @d.sstime.ToString("yy-MM-dd") ~ @d.setime.ToString("yy-MM-dd") 수강기간 : @d.sdate.ToString("yy-MM-dd") ~ @d.edate.ToString("yy-MM-dd")
@if (d.cshape == 2) @if (d.cshape == 2)
{ {
@:| 집체교육기간 : @(d.cmisno == null ? "미정" : ("[" + d.studyplacename + "] " + string.Format("{0}", d.cmiestart.ToString("yy-MM-dd")))) @:| 집체교육기간 : @(d.cmisno == null ? "미정" : ("[" + d.studyplacename + "] " + string.Format("{0}", d.cmiestart.ToString("yy-MM-dd"))))

View File

@ -488,6 +488,8 @@ namespace NP.Model
public String studyplacename { get; set; } public String studyplacename { get; set; }
public DateTime cmiestart { get; set; } public DateTime cmiestart { get; set; }
public DateTime cmieend { get; set; } public DateTime cmieend { get; set; }
public DateTime sdate { get; set; }
public DateTime edate { get; set; }
} }
/// <summary> /// <summary>