This commit is contained in:
parent
13812a8b08
commit
1a8a7d52c6
|
|
@ -160,8 +160,11 @@
|
|||
</select>
|
||||
<select id="cr.cminnings" parameterClass="hashtable" resultClass="lectinning">
|
||||
select a.lectno,a.cmno,a.isrebate
|
||||
,a2.isseq,a2.sstime,a2.setime
|
||||
,a2.isseq,a2.cshape
|
||||
,case when a.sdate is null then a2.sstime else a.sdate end as sdate
|
||||
,case when a.edate is null then a2.setime else a.edate end as edate
|
||||
,b.cmino,b.iseq,b.isonline,b.ititle,b.sttime,b.idate,b.ist,b.iet,b.icontent
|
||||
,scd.estart,scd.eend,com.cname
|
||||
,cp.istatus preistatus
|
||||
,c.totstudy,c.istatus,c.stime, c.lectno existslectinning
|
||||
,case when b.isonline=1 then d.tfurl else null end tfurl
|
||||
|
|
@ -180,6 +183,8 @@
|
|||
left outer join fileinfo df on b.isonline=1 and df.fgno=d.fgnotf and df.isdel=0
|
||||
left outer join fileinfo df3 on b.isonline=0 and df3.fgno=b.fgnotf and df3.isdel=0
|
||||
left outer join ctpage e on e.ctno=d.ctno and e.pseq=1
|
||||
left outer join cminningscd scd on a.cmisno = scd.cmisno
|
||||
left outer join comcode com on scd.studyplace = com.ccode
|
||||
where a.lectno=#lectno# and a.userno=#userno#
|
||||
<isNotNull property="notstudy">and ifnull(c.istatus,0) < 2 and a2.sstime < now() and a2.setime > now()</isNotNull>
|
||||
order by b.iseq
|
||||
|
|
|
|||
|
|
@ -1024,7 +1024,8 @@
|
|||
,c.tyear intval,c.tseq intval2,b.cshape intval3,0 intval4,0 intval5,a.isrebate intval6,a.cmno intval7,0 intval8
|
||||
,a.lectno longval,0 longval2
|
||||
,b.cname strval,null strval2,null strval3
|
||||
,b.sstime time,b.setime time2
|
||||
,case when a.sdate is null then b.sstime else a.sdate end as time
|
||||
,case when a.edate is null then b.setime else a.edate end as time2
|
||||
,d.estart time3,d.eend time4
|
||||
,row_number() over(order by b.setime desc) rno
|
||||
from lect a
|
||||
|
|
@ -1046,7 +1047,8 @@
|
|||
,1 intval,c.iseq intval2,b.classno intval3,0 intval4,0 intval5,0 intval6,a.cmno intval7,0 intval8
|
||||
,a.lectno longval
|
||||
,b.cname strval,null strval2,null strval3
|
||||
,b.sstime time,b.setime time2
|
||||
,case when a.sdate is null then b.sstime else a.sdate end as time
|
||||
,case when a.edate is null then b.setime else a.edate end as time2
|
||||
,row_number() over(partition by a.cmno order by c.iseq) rno2
|
||||
,row_number() over(order by b.setime) rno
|
||||
from lect a
|
||||
|
|
@ -1175,12 +1177,12 @@
|
|||
</update>
|
||||
<select id="lect.mylectures" parameterClass="hashtable" resultClass="lect">
|
||||
select a.lectno,a.cmno,a.userno,a.isrebate,a.iscomplete
|
||||
,case when a.sdate is null then b.sstime else a.sdate end as sdate
|
||||
,case when a.edate is null then b.setime else a.edate end as edate
|
||||
,b.cmno,b.cname,b.cshape
|
||||
|
||||
<!--,case when a.ispc=1 then pc.sstime else b.sstime end sstime
|
||||
,case when a.ispc=1 then pc.setime else b.setime end setime-->
|
||||
,b.sstime,b.setime
|
||||
|
||||
,b.classno,b.isrefund
|
||||
,c.tyear,c.tseq
|
||||
,e.isgroup,e.payno
|
||||
|
|
@ -1203,6 +1205,8 @@
|
|||
<isNotNull property="cshape">and b.cshape=#cshape#</isNotNull>
|
||||
union all
|
||||
select a.lectno,a.cmno,a.userno,a.isrebate,a.iscomplete
|
||||
,case when a.sdate is null then b.sstime else a.sdate end as sdate
|
||||
,case when a.edate is null then b.setime else a.edate end as edate
|
||||
,b.cmno,b.cname,b.cshape,b.sstime,b.setime,b.classno,b.isrefund
|
||||
,c.tyear,c.tseq
|
||||
,e.isgroup,e.payno
|
||||
|
|
@ -1222,6 +1226,8 @@
|
|||
<isNotNull property="cshape">and b.cshape=#cshape#</isNotNull>
|
||||
union all
|
||||
select a.lectno,a.cmno,a.userno,a.isrebate,a.iscomplete
|
||||
,case when a.sdate is null then b.sstime else a.sdate end as sdate
|
||||
,case when a.edate is null then b.setime else a.edate end as edate
|
||||
,b.cmno,b.cname,b.cshape,b.sstime,b.setime,b.classno,b.isrefund
|
||||
,c.tyear,c.tseq
|
||||
,e.isgroup,e.payno
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ namespace NP.FO.Controllers
|
|||
public ActionResult Lecture(VMMy vm)
|
||||
{
|
||||
ViewBag.reporturl = GetConfig("reporturl");
|
||||
vm.Lects = Dao.Get<Lect>("lect.mylectures", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "cgcode", vm.intval > 0 ? TestCode3 : null }, { "cshape", vm.stringval } });
|
||||
vm.Lects = Dao.Get<Lect>("lect.mylectures", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "cgcode", vm.intval > 0 ? TestCode3 : null }, { "cshape", vm.stringval } }).Where(x=>x.edate >= DateTime.Now).ToList();
|
||||
return View(vm);
|
||||
}
|
||||
public ActionResult CertPrint(VMMy vm)
|
||||
|
|
|
|||
|
|
@ -106,10 +106,17 @@
|
|||
<h5>[@(d.iseq)회] @d.ititle</h5>
|
||||
<dl>
|
||||
<dt>@(d.isonline == 0 && d.istatus == 2 ? "출석완료" : d.isonline == 0 && d.idate < DateTime.Now ? "결석" : d.isonline == 0 ? "출석전" : d.stime == null ? "학습전(0%)" : d.istatus == 2 ? "학습완료" : string.Format("학습중({0}%)", d.sttime > 0 ? (d.totstudy * 100 / (d.sttime * 60)) : 0))</dt>
|
||||
<dd><span>@(d.isonline == 0 ? "강의시작일" : "강의기간")</span> : @(d.isonline == 0 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : (d.sstime.ToString("MM/dd") + " ~ " + d.setime.ToString("MM/dd")))</dd>
|
||||
<dd><span>@(d.isonline == 0 ? (d.cshape !=2 ? "강의시작일" : "집체교육") : "강의기간")</span> : @(d.isonline == 0 ? (d.cshape != 2 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : d.eend.ToString("MM/dd")) : (d.sdate.ToString("MM/dd") + " ~ " + d.edate.ToString("MM/dd")))</dd>
|
||||
@if (d.isonline == 0)
|
||||
{
|
||||
<dd style="margin-left:10px;"><span style="color:#222">강의실</span> : @(d.icontent??"-")</dd>
|
||||
if (d.cshape != 2)
|
||||
{
|
||||
<dd style="margin-left:10px;"><span style="color:#222">강의실</span> : @(d.icontent ?? "-")</dd>
|
||||
}
|
||||
else
|
||||
{
|
||||
<dd style="margin-left:10px;"><span style="color:#222">장소</span> : @(d.cname ?? "-")</dd>
|
||||
}
|
||||
}
|
||||
</dl>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@
|
|||
<b>@d.cname (@(d.classno))</b>
|
||||
</h5>
|
||||
<dl class="ltaDl">
|
||||
<dt class="@(d.setime > DateTime.Now ? "ltaDlbk" : "ltaDlred")">@(d.setime > DateTime.Now ? "수강기간 학습중" : "종료")</dt>
|
||||
<dt class="@(d.edate > DateTime.Now ? "ltaDlbk" : "ltaDlred")">@(d.edate > DateTime.Now ? "수강기간 학습중" : "종료")</dt>
|
||||
<dd>
|
||||
수강기간 : @d.sstime.Value.ToString("yy-MM-dd") ~ @d.setime.Value.ToString("yy-MM-dd")
|
||||
수강기간 : @d.sdate.Value.ToString("yy-MM-dd") ~ @d.edate.Value.ToString("yy-MM-dd")
|
||||
@if (d.cshape == 2 && d.estart > Convert.ToDateTime("1900-01-01") && d.eend > Convert.ToDateTime("1900-01-01"))
|
||||
{
|
||||
@:| 집체교육기간 : @("[" + d.studyplacename + "] " + string.Format("{0}", d.estart.ToString("yy-MM-dd")))
|
||||
|
|
|
|||
13
Model/CM.cs
13
Model/CM.cs
|
|
@ -1024,6 +1024,14 @@ namespace NP.Model
|
|||
public DateTime? etime { get; set; }
|
||||
public DateTime? sdate { get; set; }
|
||||
public DateTime? edate { get; set; }
|
||||
public String sdateymd
|
||||
{
|
||||
get { return sdate != null ? Convert.ToDateTime(sdate).ToShortDateString() : null; }
|
||||
}
|
||||
public String edateymd
|
||||
{
|
||||
get { return edate != null ? Convert.ToDateTime(edate).ToShortDateString() : null; }
|
||||
}
|
||||
public String sip { get; set; }
|
||||
public String eip { get; set; }
|
||||
public int ispaied { get; set; }
|
||||
|
|
@ -2890,6 +2898,10 @@ namespace NP.Model
|
|||
public int isrebate { get; set; }
|
||||
public DateTime sstime { get; set; }
|
||||
public DateTime setime { get; set; }
|
||||
public DateTime sdate { get; set; }
|
||||
public DateTime edate { get; set; }
|
||||
public DateTime estart { get; set; }
|
||||
public DateTime eend { get; set; }
|
||||
public int isseq { get; set; }
|
||||
public int preistatus { get; set; }
|
||||
public Int64 precmino { get; set; }
|
||||
|
|
@ -2898,6 +2910,7 @@ namespace NP.Model
|
|||
/// lect회차 존재여부
|
||||
/// </summary>
|
||||
public String existslectinning { get; set; }
|
||||
public String cname { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
Loading…
Reference in New Issue