<기능개선>
1. PMS NO : 2. (주요)작업내용 (1) 과제,최종평가,출결 lect의 각 point에 상대 점수 기록 및 성적처리(전체 포함)리스트 반영 쿼리 개선 (일괄 업로드)
This commit is contained in:
parent
7b9adc6866
commit
04d24fe453
|
|
@ -619,11 +619,19 @@ namespace NP.BO.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchCheck)
|
if (searchCheck)
|
||||||
|
{
|
||||||
|
if (SUserInfo.UserNo != 27460)
|
||||||
{
|
{
|
||||||
vm.Lects = Dao.Get<Lect>("grade.lectgradesToAll", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } });
|
vm.Lects = Dao.Get<Lect>("grade.lectgradesToAll", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } });
|
||||||
//vm.Lects = Dao.Get<Lect>("grade.lectgrades", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } });
|
//vm.Lects = Dao.Get<Lect>("grade.lectgrades", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
vm.Lects = Dao.Get<Lect>("grade.lectgradesToAll2", new System.Collections.Hashtable() { { "cmno", vm.CM.cmno }, { "ustatus", 1 }, { "isrebate", vm.addstringval }, { "iscomplete", vm.addstringval2 }, { "cmisno", vm.addstringval3 }, { "ispasss", vm.addstringval4 }, { "ispassa", vm.addstringval5 }, { "ispassex", vm.addstringval6 }, { "usernameid", vm.addstringval7 }, { "orderby", "ua.asname,ua.asno,u.username" } });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
vm.Lects = new List<Lect>();
|
vm.Lects = new List<Lect>();
|
||||||
}
|
}
|
||||||
|
|
@ -777,7 +785,14 @@ namespace NP.BO.Controllers
|
||||||
|
|
||||||
//ht.Add("ustatus", 1);
|
//ht.Add("ustatus", 1);
|
||||||
ht.Add("orderby", "ua.asname,ua.asno,u.username");
|
ht.Add("orderby", "ua.asname,ua.asno,u.username");
|
||||||
|
if (SUserInfo.UserNo != 27460)
|
||||||
|
{
|
||||||
vm.Lects = Dao.Get<Lect>("grade.lectgradesToAll", ht);
|
vm.Lects = Dao.Get<Lect>("grade.lectgradesToAll", ht);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vm.Lects = Dao.Get<Lect>("grade.lectgradesToAll2", ht);
|
||||||
|
}
|
||||||
if (vm.isexceldown == 1)
|
if (vm.isexceldown == 1)
|
||||||
{
|
{
|
||||||
return ExportExcel(
|
return ExportExcel(
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
<th width="80">교육장소</th>
|
<th width="80">교육장소</th>
|
||||||
<th>교육종료일</th>
|
<th>교육종료일</th>
|
||||||
<th>제한인원</th>
|
<th>제한인원</th>
|
||||||
<th>등록인원</th>
|
<th>등록인원(완료/대기)</th>
|
||||||
<th>최근수정일</th>
|
<th>최근수정일</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
<td>@item.studyplacename</td>
|
<td>@item.studyplacename</td>
|
||||||
<td class="link"><a href="#" onclick="regscd(@item.cmino, @item.cmisno)">@item.estart ~ @item.eend</a></td>
|
<td class="link"><a href="#" onclick="regscd(@item.cmino, @item.cmisno)">@item.estart ~ @item.eend</a></td>
|
||||||
<td>@item.quotastr</td>
|
<td>@item.quotastr</td>
|
||||||
<td>@item.regmem</td>
|
<td>@item.regmem / @item.zstring0</td>
|
||||||
<td>@item.udt</td>
|
<td>@item.udt</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
|
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
|
||||||
<a href="#" class="btn btn-primary" onclick="save(2);" style=" text-align:right">출석처리</a>
|
<a href="#" class="btn btn-primary" onclick="save(2);" style=" text-align:right">출석처리</a>
|
||||||
<a href="#" class="btn btn-danger" onclick="save(0);">결석처리</a>
|
<a href="#" class="btn btn-danger" onclick="save(0);">결석처리</a>
|
||||||
<a href="#" class="btn btn-danger" onclick="save(-1);">미입력처리</a>
|
<a href="#" class="btn btn-danger" onclick="save(1);">미입력처리</a>
|
||||||
<a href="#" class="btn btn-primary" onclick="excldown();">엑셀 다운로드</a>
|
<a href="#" class="btn btn-primary" onclick="excldown();">엑셀 다운로드</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive" id="excel1">
|
<div class="table-responsive" id="excel1">
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,11 @@
|
||||||
{
|
{
|
||||||
<td class="link text-center">[10] <a href="#" onclick="save4();">@d.istatusname</a></td>
|
<td class="link text-center">[10] <a href="#" onclick="save4();">@d.istatusname</a></td>
|
||||||
}
|
}
|
||||||
<td>[11] @(d.rs0lectcnt) / @(d.rs0cnt)</td>
|
<td>
|
||||||
|
[11] @(d.rs0cnt == 0 ? 0 : 1) / @(d.rs0cnt == 0 ? 0 :(d.rs0cnt/ d.rs0cnt))
|
||||||
|
|
|
||||||
|
@(d.rs0lectcnt) / @(d.rs0cnt)
|
||||||
|
</td>
|
||||||
@if (!ViewBag.IsSubAdmin96)
|
@if (!ViewBag.IsSubAdmin96)
|
||||||
{
|
{
|
||||||
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">[12] @Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
|
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">[12] @Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,8 @@
|
||||||
{
|
{
|
||||||
<td class="text-center">-</td>
|
<td class="text-center">-</td>
|
||||||
}
|
}
|
||||||
<td>@(d.rs0lectcnt) / @(d.rs0cnt)</td>
|
@*<td>@(d.rs0lectcnt) / @(d.rs0cnt)</td>*@
|
||||||
|
<td>@(d.rs0lectcnt > 0 ? 1 : 0) / @(d.rs0cnt > 0 ? 1 : 0)</td>
|
||||||
@if (!ViewBag.IsSubAdmin96)
|
@if (!ViewBag.IsSubAdmin96)
|
||||||
{
|
{
|
||||||
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
|
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
|
||||||
|
|
|
||||||
|
|
@ -609,6 +609,7 @@ namespace NP.Base.Controllers
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult offattscdsave(int istatus,String userinfos, int attr = -999)
|
public JsonResult offattscdsave(int istatus,String userinfos, int attr = -999)
|
||||||
{
|
{
|
||||||
|
bool attrUpdateCheck = false; // 데이터 처리여부
|
||||||
var lectnos = "";
|
var lectnos = "";
|
||||||
var cmi = new CMInning() { Ds = new List<CMInning>() { }, uno = SUserInfo.UserNo, uip = GetUserIP() };
|
var cmi = new CMInning() { Ds = new List<CMInning>() { }, uno = SUserInfo.UserNo, uip = GetUserIP() };
|
||||||
if (string.IsNullOrEmpty(userinfos))
|
if (string.IsNullOrEmpty(userinfos))
|
||||||
|
|
@ -639,13 +640,43 @@ namespace NP.Base.Controllers
|
||||||
cmi.uip = GetUserIP();
|
cmi.uip = GetUserIP();
|
||||||
cmi.zstring0 = attr.ToString();
|
cmi.zstring0 = attr.ToString();
|
||||||
|
|
||||||
if (attr == 2)
|
switch(attr)
|
||||||
{
|
{
|
||||||
return JsonOK(Dao.Save("att.scd.nowdate", cmi));
|
case 0:
|
||||||
|
// 결석처리
|
||||||
|
cmi.istatus = attr;
|
||||||
|
attrUpdateCheck = true;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// 미입력처리
|
||||||
|
cmi.istatus = null;
|
||||||
|
attrUpdateCheck = true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// 출석처리
|
||||||
|
cmi.istatus = attr;
|
||||||
|
attrUpdateCheck = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// 결석처리
|
||||||
|
attrUpdateCheck = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attrUpdateCheck)
|
||||||
|
{
|
||||||
|
if(attr == 2)
|
||||||
|
{
|
||||||
|
return JsonOK(Dao.Save("att.scd.setattr", cmi));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return JsonOK(Dao.Save("att.scd.attrnull", cmi));
|
return JsonOK(Dao.Save("att.scd.setattrnull", cmi));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return JsonOK(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -901,7 +932,8 @@ namespace NP.Base.Controllers
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult LectSDSaveToAdmin(LectSD d)
|
public JsonResult LectSDSaveToAdmin(LectSD d)
|
||||||
{
|
{
|
||||||
d.uno = SUserInfo.UserNo; d.uip = GetUserIP();
|
d.uno = SUserInfo.UserNo;
|
||||||
|
d.uip = GetUserIP();
|
||||||
d.isproduct = GetConfig("isstaging") == "1" ? (int?)null : 1;
|
d.isproduct = GetConfig("isstaging") == "1" ? (int?)null : 1;
|
||||||
if (Request.Files.GetMultiple("fgno").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0)
|
if (Request.Files.GetMultiple("fgno").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,43 @@
|
||||||
,a.ispce=case when a.ispce is null then 1 else a.ispce end;
|
,a.ispce=case when a.ispce is null then 1 else a.ispce end;
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="att.scd.nowdate" parameterClass="cminning">
|
<update id="att.scd.setattr" parameterClass="cminning">
|
||||||
|
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
|
||||||
|
select a.lectno,b.cmino,0,<include refid="sql.now"></include>,<include refid="sql.now"></include>,#istatus#,<include refid="sql.now"></include>,null,#uno#,<include refid="sql.inv"></include>
|
||||||
|
from lect a
|
||||||
|
inner join cminning b on b.cmno=a.cmno
|
||||||
|
left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino
|
||||||
|
where a.lectno in ($lectnos$) and a.status=1 and b.isonline = 0 and b.isscd = 1 and a.ischanged=0 and c.lectno is null;
|
||||||
|
|
||||||
|
update lectinning lni
|
||||||
|
inner join lect l on lni.lectno = l.lectno
|
||||||
|
inner join cminning cmi on lni.cmino = cmi.cmino
|
||||||
|
inner join (
|
||||||
|
<iterate property="Ds" open="" conjunction="union all" close=""> select #Ds[].lectno# lectno,#Ds[].cmino# cmino,#Ds[].istatus# istatus </iterate>
|
||||||
|
) a on lni.lectno = a.lectno and lni.cmino = a.cmino
|
||||||
|
set lni.stime=now(),lni.etime=now(), lni.istatus = #istatus#
|
||||||
|
where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1;
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="att.scd.setattrnull" parameterClass="cminning">
|
||||||
|
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
|
||||||
|
select a.lectno,b.cmino,0,null,null,#istatus#,<include refid="sql.now"></include>,null,#uno#,<include refid="sql.inv"></include>
|
||||||
|
from lect a
|
||||||
|
inner join cminning b on b.cmno=a.cmno
|
||||||
|
left outer join lectinning c on c.lectno=a.lectno and c.cmino=b.cmino
|
||||||
|
where a.lectno in ($lectnos$) and a.status=1 and b.isonline = 0 and b.isscd = 1 and a.ischanged=0 and c.lectno is null;
|
||||||
|
|
||||||
|
update lectinning lni
|
||||||
|
inner join lect l on lni.lectno = l.lectno
|
||||||
|
inner join cminning cmi on lni.cmino = cmi.cmino
|
||||||
|
inner join (
|
||||||
|
<iterate property="Ds" open="" conjunction="union all" close=""> select #Ds[].lectno# lectno,#Ds[].cmino# cmino,#Ds[].istatus# istatus </iterate>
|
||||||
|
) a on lni.lectno = a.lectno and lni.cmino = a.cmino
|
||||||
|
set lni.stime=null,lni.etime=null, lni.istatus = #istatus#
|
||||||
|
where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1;
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--<update id="att.scd.nowdate" parameterClass="cminning">
|
||||||
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
|
insert into lectinning(lectno,cmino,totstudy,stime,etime,istatus,statustime,statusreason,statususerno,<include refid="sql.inc"></include>)
|
||||||
select a.lectno,b.cmino,0,<include refid="sql.now"></include>,<include refid="sql.now"></include>,2,<include refid="sql.now"></include>,null,#uno#,<include refid="sql.inv"></include>
|
select a.lectno,b.cmino,0,<include refid="sql.now"></include>,<include refid="sql.now"></include>,2,<include refid="sql.now"></include>,null,#uno#,<include refid="sql.inv"></include>
|
||||||
from lect a
|
from lect a
|
||||||
|
|
@ -164,7 +200,7 @@
|
||||||
<isEqual property="zstring0" compareValue="0">, lni.istatus = 0</isEqual>
|
<isEqual property="zstring0" compareValue="0">, lni.istatus = 0</isEqual>
|
||||||
|
|
||||||
where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1
|
where l.status = 1 and cmi.isonline = 0 and cmi.isscd = 1
|
||||||
</update>
|
</update>-->
|
||||||
|
|
||||||
<update id="att.att.in" parameterClass="hashtable">
|
<update id="att.att.in" parameterClass="hashtable">
|
||||||
update lectinning set <include refid="sql.up"></include>
|
update lectinning set <include refid="sql.up"></include>
|
||||||
|
|
@ -240,7 +276,7 @@
|
||||||
inner join cmev ce on a.cmno = ce.cmno
|
inner join cmev ce on a.cmno = ce.cmno
|
||||||
set a.attrate=b.attrate
|
set a.attrate=b.attrate
|
||||||
,a.apoint = (((b.attrate / 100) * ce.attend / 100)* 100)
|
,a.apoint = (((b.attrate / 100) * ce.attend / 100)* 100)
|
||||||
,a.tpoint = (((b.attrate / 100) * ce.attend / 100)* 100) + ifnull(a.mpoint, 0) + ifnull(a.fpoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0)
|
,a.tpoint = round((((b.attrate / 100) * ce.attend / 100)* 100) + ifnull(a.mpoint, 0) + ifnull(a.fpoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0),0)
|
||||||
,a.stime=case when a.stime is null then <include refid="sql.now"></include> else a.stime end
|
,a.stime=case when a.stime is null then <include refid="sql.now"></include> else a.stime end
|
||||||
,a.etime=case when a.etime is null then <include refid="sql.now"></include> else a.etime end
|
,a.etime=case when a.etime is null then <include refid="sql.now"></include> else a.etime end
|
||||||
,a.sip=case when a.sip is null then #uip# else a.sip end
|
,a.sip=case when a.sip is null then #uip# else a.sip end
|
||||||
|
|
|
||||||
|
|
@ -549,6 +549,7 @@
|
||||||
,b.scdtype
|
,b.scdtype
|
||||||
,case when b.scdtype =1 then '온라인' else c.cname end studyplacename
|
,case when b.scdtype =1 then '온라인' else c.cname end studyplacename
|
||||||
,(select count(z.lectno) cnt from lect z where a.cmisno = z.cmisno and z.status =1 and z.ischanged=0) regmem
|
,(select count(z.lectno) cnt from lect z where a.cmisno = z.cmisno and z.status =1 and z.ischanged=0) regmem
|
||||||
|
,(select count(z.lectno) cnt from lect z where a.cmisno = z.cmisno and z.status =2 and z.ischanged=0) zstring0
|
||||||
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.estart</isNull>) scdseq
|
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.estart</isNull>) scdseq
|
||||||
,count(a.cmisno) over() totalnum
|
,count(a.cmisno) over() totalnum
|
||||||
from cminningscd a
|
from cminningscd a
|
||||||
|
|
@ -2008,7 +2009,7 @@
|
||||||
from
|
from
|
||||||
(
|
(
|
||||||
select a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt,month(a.estart) startmonth
|
select a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt,month(a.estart) startmonth
|
||||||
,(a.quota - (select count(z.lectno) cnt from lect z where a.cmisno = z.cmisno and z.status =1 and z.ischanged=0)) remainPeople
|
,(a.quota - (select count(z.lectno) cnt from lect z where a.cmisno = z.cmisno and z.status in (1,2) and z.ischanged=0)) remainPeople
|
||||||
,a.studyplace, e.cname studyplacename
|
,a.studyplace, e.cname studyplacename
|
||||||
,case when f.cmisno = a.cmisno then 1 else 0 end isselected, d.cmno,d.pcmno,cg.cgcode
|
,case when f.cmisno = a.cmisno then 1 else 0 end isselected, d.cmno,d.pcmno,cg.cgcode
|
||||||
from cminningscd a
|
from cminningscd a
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
inner join cmev ce on a.cmno = ce.cmno
|
inner join cmev ce on a.cmno = ce.cmno
|
||||||
set a.attrate=b.attrate
|
set a.attrate=b.attrate
|
||||||
,a.apoint = (((b.attrate / 100) * ce.attend / 100)* 100)
|
,a.apoint = (((b.attrate / 100) * ce.attend / 100)* 100)
|
||||||
,a.tpoint = (((b.attrate / 100) * ce.attend / 100)* 100) + ifnull(a.mpoint, 0) + ifnull(a.fpoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0)
|
,a.tpoint = round((((b.attrate / 100) * ce.attend / 100)* 100) + ifnull(a.mpoint, 0) + ifnull(a.fpoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0),0)
|
||||||
,a.etime=now()
|
,a.etime=now()
|
||||||
,a.eip=#uip#
|
,a.eip=#uip#
|
||||||
,a.ispce=#ispc#
|
,a.ispce=#ispc#
|
||||||
|
|
@ -624,7 +624,7 @@
|
||||||
,a.cblock=#cblock#
|
,a.cblock=#cblock#
|
||||||
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null;
|
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null;
|
||||||
|
|
||||||
<!--최종평가, lect.fpoint, 진도율 환산점수 update #xodus-->
|
<!--최종평가, lect.fpoint, 최종평가 환산점수 update #xodus-->
|
||||||
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
|
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
|
||||||
<isEqual property="extype" compareValue="1">
|
<isEqual property="extype" compareValue="1">
|
||||||
update lect a
|
update lect a
|
||||||
|
|
@ -677,7 +677,7 @@
|
||||||
<!--, a.overtime=case when #zstring20# is null then a.overtime else now() end-->
|
<!--, a.overtime=case when #zstring20# is null then a.overtime else now() end-->
|
||||||
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null;
|
where a.lectno=#lectno# and a.exno=#exno# and a.eend is null;
|
||||||
|
|
||||||
<!--최종평가, lect.fpoint, 진도율 환산점수 update #xodus-->
|
<!--최종평가, lect.fpoint, 최종평가 환산점수 update #xodus-->
|
||||||
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
|
<!--최종평가 수정일 경우, 영남은 중간 평가가 없다. 중간평가는 ce.extype = 0 -->
|
||||||
<isEqual property="extype" compareValue="1">
|
<isEqual property="extype" compareValue="1">
|
||||||
update lect a
|
update lect a
|
||||||
|
|
|
||||||
|
|
@ -1003,6 +1003,7 @@
|
||||||
,date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') edatestring
|
,date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') edatestring
|
||||||
,pi.tbankuser rbankuser,pi.rbank,pi.pino,pi.rbankamt
|
,pi.tbankuser rbankuser,pi.rbank,pi.pino,pi.rbankamt
|
||||||
,CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), <include refid="sql.digest"></include>) AS char) as rbankaccnum
|
,CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), <include refid="sql.digest"></include>) AS char) as rbankaccnum
|
||||||
|
, date_format(f.stime, '%Y-%m-%d') zstring3
|
||||||
from (
|
from (
|
||||||
select a.lectno
|
select a.lectno
|
||||||
,(b.attrate / 100) * (case when b.isrebate=1 then d.attendrfd else d.attend end / 100) * 100 apoint
|
,(b.attrate / 100) * (case when b.isrebate=1 then d.attendrfd else d.attend end / 100) * 100 apoint
|
||||||
|
|
@ -1329,6 +1330,171 @@
|
||||||
<include refid="sql.pagedynamic"></include>
|
<include refid="sql.pagedynamic"></include>
|
||||||
order by a.rno
|
order by a.rno
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<!--#xodus-->
|
||||||
|
<select id="grade.lectgradesToAll2" parameterClass="hashtable" resultClass="lect">
|
||||||
|
select *
|
||||||
|
from (
|
||||||
|
SELECT a.*
|
||||||
|
, (CASE WHEN ppl.asname IS NOT NULL THEN ppl.asname ELSE ua.asname END) asname
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(ppl.mphone), 'np123@!' ) AS CHAR) mphone
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(ppl.taxemail), 'np123@!' ) AS CHAR) taxemail
|
||||||
|
,ppl.brno,ppl.ceoname,ppl.post,ppl.address1,ppl.address2,ppl.btype,ppl.bkind,ppl.eino,ppl.mname,ppl.association
|
||||||
|
,tm.cname typemanname, te.cname typeeduname
|
||||||
|
,tg.cname typegradename, tj.cname typejobname
|
||||||
|
,date_format((case when a.cshape = 2 and a.eend is not null then a.eend else a.edate end),'%Y-%m-%d') edatestring
|
||||||
|
,pi.tbankuser rbankuser,pi.rbank,pi.pino,pi.rbankamt
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), 'np123@!' ) AS char) as rbankaccnum
|
||||||
|
, date_format(f.stime, '%Y-%m-%d') zstring3
|
||||||
|
,row_number() over(order by ua.asname,ua.asno,a.username ) rno
|
||||||
|
,count(a.lectno) over() pagetotalcount
|
||||||
|
FROM (
|
||||||
|
SELECT a.*
|
||||||
|
,(a.attrate / 100) * (CASE WHEN a.isrebate=1 THEN d.attendrfd ELSE d.attend END / 100) * 100 apoint
|
||||||
|
,d.isoffabs,t.tyear
|
||||||
|
,cg.cgname,cg.pcgno,pcg.cgname as pcgname
|
||||||
|
,cc.cname studyplacename
|
||||||
|
,(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.attendcutrfd ELSE d.attendcut END) <= a.attrate THEN 1 ELSE 0 END )ispassa
|
||||||
|
,(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.midcutrfd ELSE d.midcut END) <= a.ex0lectpoint THEN 1 ELSE 0 END) ispassm
|
||||||
|
,(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.finalcutrfd ELSE d.finalcut END) <= a.ex1lectpoint THEN 1 ELSE 0 END) ispassf
|
||||||
|
,(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.subjectcutrfd ELSE d.subjectcut END) <= a.sd0lectpoint THEN 1 ELSE 0 END) ispasss
|
||||||
|
,(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.discusscutrfd ELSE d.discusscut END) <= a.sd1lectpoint THEN 1 ELSE 0 END) ispassd
|
||||||
|
,(CASE WHEN (CASE WHEN IFNULL(d.isoffabs,0)=1 THEN IFNULL(a.at0cnt,0) ELSE 0 END) <= IFNULL(a.at0lectcnt,0) THEN 1 ELSE 0 END) ispassat
|
||||||
|
<!--,(CASE WHEN
|
||||||
|
(CASE WHEN (CASE WHEN IFNULL(d.isoffabs,0)=1 THEN IFNULL(a.at0cnt,0) ELSE 0 END) <= IFNULL(a.at0lectcnt,0) THEN 1 ELSE 0 END) = 1 AND
|
||||||
|
(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.attendcutrfd ELSE d.attendcut END) <= a.attrate THEN 1 ELSE 0 END )=1 AND
|
||||||
|
(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.midcutrfd ELSE d.midcut END) <= a.ex0lectpoint THEN 1 ELSE 0 END) =1 AND
|
||||||
|
(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.finalcutrfd ELSE d.finalcut END) <= a.ex1lectpoint THEN 1 ELSE 0 END) =1 AND
|
||||||
|
(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.subjectcutrfd ELSE d.subjectcut END) <= a.sd0lectpoint THEN 1 ELSE 0 END) =1 AND
|
||||||
|
(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.discusscutrfd ELSE d.discusscut END) <= a.sd1lectpoint THEN 1 ELSE 0 END) =1 AND
|
||||||
|
(CASE WHEN (CASE WHEN a.isrebate=1 THEN d.cutrfd ELSE d.cut END <=
|
||||||
|
((a.attrate / 100) * (CASE WHEN a.isrebate=1 THEN d.attendrfd ELSE d.attend END / 100 * 100))
|
||||||
|
+((a.ex0lectpoint / 100) * (CASE WHEN a.isrebate=1 THEN d.midrfd ELSE d.mid END / 100)* 100)
|
||||||
|
+((a.ex1lectpoint / 100) * (CASE WHEN a.isrebate=1 THEN d.finalrfd ELSE d.final END / 100)* 100)
|
||||||
|
+((a.sd0lectpoint / 100) * (CASE WHEN a.isrebate=1 THEN d.subjectrfd ELSE d.subject END / 100)* 100)
|
||||||
|
+((a.sd1lectpoint / 100) * (CASE WHEN a.isrebate=1 THEN d.discussrfd ELSE d.discuss END / 100)* 100) THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END) ispass-->
|
||||||
|
,case when
|
||||||
|
case when case when ifnull(d.isoffabs,0)=1 then ifnull(a.at0cnt,0) else 0 end <= ifnull(a.at0lectcnt,0) then 1 else 0 end = 1 and
|
||||||
|
case when case when a.isrebate=1 then d.attendcutrfd else d.attendcut end <= a.attrate then 1 else 0 end =1 and
|
||||||
|
case when case when a.isrebate=1 then d.midcutrfd else d.midcut end <= a.ex0lectpoint then 1 else 0 end =1 and
|
||||||
|
case when case when a.isrebate=1 then d.finalcutrfd else d.finalcut end <= a.ex1lectpoint then 1 else 0 end =1 and
|
||||||
|
case when case when a.isrebate=1 then d.subjectcutrfd else d.subjectcut end <= a.sd0lectpoint then 1 else 0 end =1 and
|
||||||
|
case when case when a.isrebate=1 then d.discusscutrfd else d.discusscut end <= a.sd1lectpoint then 1 else 0 end =1 and
|
||||||
|
case when case when a.isrebate=1 then d.cutrfd else d.cut end <=
|
||||||
|
((a.attrate / 100) * (case when a.isrebate=1 then d.attendrfd else d.attend end / 100 * 100))
|
||||||
|
+((a.ex0lectpoint / 100) * (case when a.isrebate=1 then d.midrfd else d.mid end / 100)* 100)
|
||||||
|
+((a.ex1lectpoint / 100) * (case when a.isrebate=1 then d.finalrfd else d.final end / 100)* 100)
|
||||||
|
+((a.sd0lectpoint / 100) * (case when a.isrebate=1 then d.subjectrfd else d.subject end / 100)* 100)
|
||||||
|
+((a.sd1lectpoint / 100) * (case when a.isrebate=1 then d.discussrfd else d.discuss end / 100)* 100) then 1 else 0 end = 1 then 1 else 0 end ispass
|
||||||
|
FROM (
|
||||||
|
SELECT l.lectno, c.cmno, c.cgno, u.userid, u.username, u.userno, u.asno,u.slevel,u.uduty
|
||||||
|
,concat(substring(CAST(AES_DECRYPT(UNHEX(u.userpno),<include refid="sql.digest"></include>) as char),1,6),'-',substring(CAST(AES_DECRYPT(UNHEX(u.userpno),<include refid="sql.digest"></include>) as char),7,7)) userpno
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) AS CHAR) mobile
|
||||||
|
, l.attrate, l.mpoint, l.fpoint, l.spoint, l.dpoint, l.isrebate, l.iscomplete, l.completetime, l.completeno,l.sdate,l.edate, l.cmisno
|
||||||
|
, c.cshape, c.sstime,c.cname,c.classno,c.studytime, c.tmno
|
||||||
|
,cis.sseq,cis.estart,cis.eend,cis.studyplace, li.istatus, li.cmino
|
||||||
|
, p.payno, p.payamt
|
||||||
|
, (CASE WHEN IFNULL(ce.exno,0) = 0 THEN 0 ELSE 1 END) AS ex0cnt<!-- 최종평가-->
|
||||||
|
, (CASE WHEN IFNULL(le.lectno,0) = 0 THEN 0 ELSE 1 END) AS ex0lectcnt <!-- 최종평가-->
|
||||||
|
, AVG(IFNULL(le.tpoint,0) / ce.tpoint * 100) ex0lectpoint <!-- 최종평가-->
|
||||||
|
, (CASE WHEN IFNULL(ce2.exno,0) = 0 THEN 0 ELSE 1 END) AS ex1cnt<!-- 중간평가-->
|
||||||
|
, (CASE WHEN IFNULL(le2.lectno,0) = 0 THEN 0 ELSE 1 END) AS ex1lectcnt <!-- 중간평가-->
|
||||||
|
, AVG(IFNULL(le2.tpoint,0) / ce2.tpoint * 100) ex1lectpoint
|
||||||
|
, SUM(CASE WHEN IFNULL(cs.sdno,0) = 0 THEN 0 ELSE 1 END) AS sd0cnt <!-- `과제제출`-->
|
||||||
|
, SUM(CASE WHEN IFNULL(ls.lectno,0) = 0 THEN 0 ELSE 1 END) AS sd0lectcnt <!-- `과제제출`-->
|
||||||
|
, ROUND(AVG(IFNULL(ls.cpoint,0)),0) AS sd0lectpoint <!-- `과제평균`-->
|
||||||
|
, (CASE WHEN IFNULL(cs2.sdno,0) = 0 THEN 0 ELSE 1 END) AS sd1cnt <!-- `토론제출`-->
|
||||||
|
, (CASE WHEN IFNULL(ls2.lectno,0) = 0 THEN 0 ELSE 1 END) AS sd1lectcnt <!-- `토론제출`-->
|
||||||
|
, AVG(IFNULL(ls2.cpoint,0) / cs2.tpoint * 100) sd1lectpoint
|
||||||
|
, (CASE WHEN IFNULL(cr.rsno,0) = 0 THEN 0 ELSE 1 END) AS rs0cnt <!-- `설문제출`-->
|
||||||
|
, SUM(CASE WHEN IFNULL(lt.lectno,0) = 0 THEN 0 ELSE 1 END) AS rs0lectcnt
|
||||||
|
, (CASE WHEN IFNULL(lt.lectno,0) = 0 THEN 0 ELSE 1 END) AS rs0lectpoint <!-- `설문제출`-->
|
||||||
|
,COUNT(ci.cmino) at0cnt, COUNT(li.lectno) at0lectcnt
|
||||||
|
, p.payoktime
|
||||||
|
, p.pplno
|
||||||
|
FROM lect l
|
||||||
|
INNER JOIN cm c ON l.cmno = c.cmno
|
||||||
|
LEFT OUTER JOIN cminningscd cis ON l.cmisno = cis.cmisno
|
||||||
|
INNER JOIN users u ON l.userno = u.userno
|
||||||
|
INNER JOIN pay p ON p.payno = l.payno
|
||||||
|
<!--최종평가-->
|
||||||
|
LEFT OUTER JOIN cmex ce ON l.cmno = ce.cmno AND ce.extype = 0 AND ce.isdel = 0
|
||||||
|
LEFT OUTER JOIN lectex le ON l.lectno = le.lectno AND ce.exno = le.exno
|
||||||
|
<!--중간평가-->
|
||||||
|
LEFT OUTER JOIN cmex ce2 ON l.cmno = ce2.cmno AND ce2.extype = 1 AND ce2.isdel = 0
|
||||||
|
LEFT OUTER JOIN lectex le2 ON l.lectno = le2.lectno AND ce2.exno = le2.exno
|
||||||
|
<!--과제-->
|
||||||
|
LEFT OUTER JOIN cmsd cs ON l.cmno = cs.cmno AND cs.sdtype = 0 AND cs.isdel = 0
|
||||||
|
LEFT OUTER JOIN lectsd ls ON l.lectno = ls.lectno AND cs.sdno = ls.sdno
|
||||||
|
<!--토론-->
|
||||||
|
LEFT OUTER JOIN cmsd cs2 ON l.cmno = cs2.cmno AND cs2.sdtype = 1 AND cs2.isdel = 0
|
||||||
|
LEFT OUTER JOIN lectsd ls2 ON l.lectno = ls2.lectno AND cs2.sdno = ls2.sdno
|
||||||
|
<!--설문-->
|
||||||
|
LEFT OUTER JOIN cmrs cr ON l.cmno = cr.cmno AND cr.rstype = 0 AND cr.isdel = 0
|
||||||
|
LEFT OUTER JOIN lectrs lt ON l.lectno = lt.lectno AND cr.rsno = lt.rsno
|
||||||
|
<!--집합출석-->
|
||||||
|
LEFT OUTER JOIN cminning ci ON l.cmno=ci.cmno AND ci.isonline =0 AND ci.isscd = 1
|
||||||
|
LEFT OUTER JOIN lectinning li ON ci.cmino = li.cmino AND l.lectno = li.lectno AND li.istatus = 2
|
||||||
|
|
||||||
|
WHERE u.status = 1 AND c.ismaster=0 AND c.isdel=0 AND l.status = 1 AND l.ischanged = 0
|
||||||
|
<isNotNull property="usernamestr" prepend="and">u.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||||
|
<isNotNull property="useridstr" prepend="and">u.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||||
|
<isNotEmpty property="usernameid" prepend="and">(u.userid like concat('%',#usernameid#,'%') or u.username like concat('%',#usernameid#,'%') or u.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||||
|
<isNotNull property="iscomplete" prepend="and">ifnull(l.iscomplete,0)=#iscomplete#</isNotNull>
|
||||||
|
<isNotNull property="cmisno" prepend="and">l.cmisno = #cmisno#</isNotNull>
|
||||||
|
<isNotEmpty property="sdateall" prepend="and">(case when c.cshape = 0 and l.isrebate = 0 then p.payoktime else l.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||||
|
<isNotEmpty property="edateall" prepend="and">(case when c.cshape = 2 then cis.eend else l.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||||
|
<isNotNull property="edate" prepend="and">date_format((case when c.cshape = 2 and cis.eend is not null then cis.eend else l.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||||
|
<isNotNull property="edate1" prepend="and">(case when c.cshape = 2 and cis.eend is not null then cis.eend else l.edate end) >= #edate1#</isNotNull>
|
||||||
|
<isNotNull property="edate2" prepend="and">(case when c.cshape = 2 and cis.eend is not null then cis.eend else l.edate end) <= #edate2#</isNotNull>
|
||||||
|
<isNotNull property="studyplace" prepend="and">cis.studyplace = #studyplace#</isNotNull>
|
||||||
|
<isNotNull property="cmno" >and l.cmno = #cmno#</isNotNull>
|
||||||
|
<isNotNull property="cname" >and c.cname like concat('%',#cname#,'%')</isNotNull>
|
||||||
|
<isNotEmpty property="sdateall" prepend="and">(case when c.cshape = 0 and l.isrebate = 0 then p.payoktime else l.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||||
|
<isNotEmpty property="edateall" prepend="and">(case when c.cshape = 2 then cis.eend else l.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||||
|
GROUP BY l.lectno
|
||||||
|
) a
|
||||||
|
INNER JOIN cmev d ON a.cmno=d.cmno
|
||||||
|
LEFT OUTER JOIN term t ON t.tmno = a.tmno
|
||||||
|
LEFT OUTER JOIN cg cg ON a.cgno = cg.cgno
|
||||||
|
LEFT OUTER JOIN cg pcg ON cg.pcgno = pcg.cgno
|
||||||
|
left outer join comcode cc on cc.ccode = a.studyplace and cc.isuse=1
|
||||||
|
) a
|
||||||
|
LEFT OUTER JOIN pplog ppl ON ppl.pplno = a.pplno
|
||||||
|
LEFT OUTER JOIN assign ua ON ua.asno=a.asno
|
||||||
|
left outer join comcode tm on tm.ccode = ppl.typeman
|
||||||
|
left outer join comcode te on te.ccode = ppl.typeedu
|
||||||
|
left outer join comcode tg on tg.ccode = ppl.typegrade
|
||||||
|
left outer join comcode tj on tj.ccode = ppl.typejob
|
||||||
|
inner join payitem pi on a.payno = pi.payno
|
||||||
|
left outer join lectinning f on a.lectno = f.lectno and a.cmino = f.cmino
|
||||||
|
<dynamic prepend="where">
|
||||||
|
<isNotNull property="cshape" prepend="and">a.cshape = #cshape#</isNotNull>
|
||||||
|
<isNotNull property="studyplace" prepend="and">a.studyplace = #studyplace#</isNotNull>
|
||||||
|
<isNotNull property="est1not" prepend="and">a.ex0lectcnt < a.ex0cnt</isNotNull>
|
||||||
|
<isNotNull property="est2not" prepend="and">a.ex1lectcnt < a.ex1cnt</isNotNull>
|
||||||
|
<isNotNull property="est11not" prepend="and">a.sd0lectcnt < a.sd0cnt</isNotNull>
|
||||||
|
<isNotNull property="est12not" prepend="and">a.sd1lectcnt < a.sd1cnt</isNotNull>
|
||||||
|
<isNotNull property="est21not" prepend="and">a.rs0lectcnt < a.rs0cnt</isNotNull>
|
||||||
|
<isNotNull property="cname" prepend="and">a.pcgname like concat('%',#cname#,'%')</isNotNull>
|
||||||
|
<isNotNull property="cnamestr" prepend="and">a.cname like concat('%',#cnamestr#,'%')</isNotNull>
|
||||||
|
<isNotNull property="iscomplete" prepend="and">ifnull(a.iscomplete,0)=#iscomplete#</isNotNull>
|
||||||
|
<isNotNull property="cmisno" prepend="and">a.cmisno = #cmisno#</isNotNull>
|
||||||
|
<isNotNull property="ispasss" prepend="and">((a.sd0cnt > 0 and a.sd0lectcnt > 0))</isNotNull>
|
||||||
|
<isNotNull property="ispassa" prepend="and">a.ispassa = #ispassa#</isNotNull>
|
||||||
|
<isNotNull property="ispassex" prepend="and">(a.ispassm = #ispassex# and a.ispassf = #ispassex#) </isNotNull>
|
||||||
|
<isNotNull property="usernamestr" prepend="and">a.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||||
|
<isNotNull property="useridstr" prepend="and">a.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||||
|
<isNotEmpty property="usernameid" prepend="and">(a.userid like concat('%',#usernameid#,'%') or a.username like concat('%',#usernameid#,'%') or u.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||||
|
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and a.isrebate = 0 then a.payoktime else a.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||||
|
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then a.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||||
|
<isNotNull property="asname" prepend="and">a.asname like concat('%',#asname#,'%')</isNotNull>
|
||||||
|
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and a.eend is not null then a.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||||
|
<isNotNull property="mobile" prepend="and">a.mobile like concat('%',#mobile#,'%')</isNotNull>
|
||||||
|
</dynamic>
|
||||||
|
)a
|
||||||
|
<include refid="sql.pagedynamic"></include>
|
||||||
|
order by a.rno
|
||||||
</select>
|
</select>
|
||||||
<update id="grade.lectcomplete.abs" parameterClass="hashtable">
|
<update id="grade.lectcomplete.abs" parameterClass="hashtable">
|
||||||
update lect set <include refid="sql.up"></include>
|
update lect set <include refid="sql.up"></include>
|
||||||
|
|
|
||||||
|
|
@ -1145,7 +1145,7 @@
|
||||||
inner join cmev cv on a.cmno = cv.cmno
|
inner join cmev cv on a.cmno = cv.cmno
|
||||||
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
|
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
|
||||||
,a.fpoint = 0
|
,a.fpoint = 0
|
||||||
,a.tpoint = 0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0)
|
,a.tpoint = round(0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.mpoint, 0),0)
|
||||||
where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#;
|
where ce.extype = 1 and a.lectno=#lectno# and le.exno = #exno#;
|
||||||
</isEqual>
|
</isEqual>
|
||||||
<isEqual property="extype" compareValue="0">
|
<isEqual property="extype" compareValue="0">
|
||||||
|
|
@ -1155,7 +1155,7 @@
|
||||||
inner join cmev cv on a.cmno = cv.cmno
|
inner join cmev cv on a.cmno = cv.cmno
|
||||||
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
|
set a.udt=<include refid="sql.now"></include>,a.uno=#uno#,a.uip=#uip#
|
||||||
,a.mpoint = 0
|
,a.mpoint = 0
|
||||||
,a.tpoint = 0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.fpoint, 0)
|
,a.tpoint = round(0 + ifnull(a.apoint, 0) + ifnull(a.spoint, 0) + ifnull(a.dpoint, 0) + ifnull(a.fpoint, 0))
|
||||||
where ce.extype = 0 and a.lectno=#lectno# and le.exno = #exno#;
|
where ce.extype = 0 and a.lectno=#lectno# and le.exno = #exno#;
|
||||||
</isEqual>
|
</isEqual>
|
||||||
<!--delete from lectexq where lectno=#lectno# and exno=#exno# and eqno in (
|
<!--delete from lectexq where lectno=#lectno# and exno=#exno# and eqno in (
|
||||||
|
|
@ -1568,7 +1568,42 @@
|
||||||
,<include refid="sql.inv"></include>
|
,<include refid="sql.inv"></include>
|
||||||
from (select 1 col1) a
|
from (select 1 col1) a
|
||||||
left outer join lectsd b on b.lectno=#lectno# and b.sdno=#sdno#
|
left outer join lectsd b on b.lectno=#lectno# and b.sdno=#sdno#
|
||||||
where b.lectno is null
|
where b.lectno is null;
|
||||||
|
|
||||||
|
<!--과제(중복시 아래 avg로 처리됨),, lect.spoint, 과제 환산점수 update #xodus-->
|
||||||
|
update lect l
|
||||||
|
inner join cm c on l.cmno = c.cmno and c.isdel = 0
|
||||||
|
inner join users u on l.userno = u.userno and u.status = 1
|
||||||
|
left outer join cmsd cs on cs.cmno=c.cmno and cs.sdtype=0 and cs.isdel=0
|
||||||
|
inner join cmev ce on c.cmno = ce.cmno
|
||||||
|
left outer join (
|
||||||
|
select lectno, avg(cpoint) as cpoint
|
||||||
|
from lectsd ls
|
||||||
|
INNER JOIN cmsd cs ON ls.sdno = cs.sdno AND cs.isdel = 0
|
||||||
|
where lectno = #lectno#
|
||||||
|
) ls on l.lectno=ls.lectno
|
||||||
|
set l.udt = now(), l.uno=#uno#, l.uip=#uip#
|
||||||
|
,l.spoint = round(((ifnull(ls.cpoint,0) / 100) * ce.subject),0)
|
||||||
|
,l.tpoint = round(((ifnull(ls.cpoint,0) / 100) * ce.subject),0) + ifnull(l.apoint, 0) + ifnull(l.fpoint, 0) + ifnull(l.dpoint, 0) + ifnull(l.mpoint, 0)
|
||||||
|
where cs.sdtype = 0 and l.lectno = #lectno#;
|
||||||
|
|
||||||
|
<!--토론(중복시 아래 avg로 처리됨), lect.spoint, 토론 환산점수 update #xodus-->
|
||||||
|
update lect l
|
||||||
|
inner join cm c on l.cmno = c.cmno and c.isdel = 0
|
||||||
|
inner join users u on l.userno = u.userno and u.status = 1
|
||||||
|
left outer join cmsd cs on cs.cmno=c.cmno and cs.sdtype=1 and cs.isdel=0
|
||||||
|
inner join cmev ce on c.cmno = ce.cmno
|
||||||
|
left outer join (
|
||||||
|
select lectno, avg(cpoint) as cpoint
|
||||||
|
from lectsd ls
|
||||||
|
INNER JOIN cmsd cs ON ls.sdno = cs.sdno AND cs.isdel = 0
|
||||||
|
where lectno = #lectno#
|
||||||
|
) ls on l.lectno=ls.lectno
|
||||||
|
set l.udt = now(), l.uno=#uno#, l.uip=#uip#
|
||||||
|
,l.spoint = round(((ifnull(ls.cpoint,0) / 100) * ce.discuss),0)
|
||||||
|
,l.tpoint = round(((ifnull(ls.cpoint,0) / 100) * ce.discuss),0) + ifnull(l.apoint, 0) + ifnull(l.fpoint, 0) + ifnull(l.dpoint, 0) + ifnull(l.mpoint, 0)
|
||||||
|
where cs.sdtype = 1 and l.lectno = #lectno#;
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
<update id="lect.lectsd.savebatch" parameterClass="lectsd">
|
<update id="lect.lectsd.savebatch" parameterClass="lectsd">
|
||||||
update lectsd set <include refid="sql.up"></include>
|
update lectsd set <include refid="sql.up"></include>
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@
|
||||||
<add key="daokey" value="ynictelms2020" />
|
<add key="daokey" value="ynictelms2020" />
|
||||||
|
|
||||||
<!--<add key="configpath" value="Product" />-->
|
<!--<add key="configpath" value="Product" />-->
|
||||||
<!--<add key="configpath" value="ProductDev" />-->
|
<add key="configpath" value="ProductDev" />
|
||||||
<add key="configpath" value="Staging" />
|
<!--<add key="configpath" value="Staging" />-->
|
||||||
|
|
||||||
<add key="thumbnailexe" value="D:\\dev_tool\\ffmpeg.exe" />
|
<add key="thumbnailexe" value="D:\\dev_tool\\ffmpeg.exe" />
|
||||||
|
|
||||||
|
|
|
||||||
15
Model/CM.cs
15
Model/CM.cs
|
|
@ -1340,15 +1340,16 @@ namespace NP.Model
|
||||||
public String istatusname
|
public String istatusname
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
|
||||||
if(string.IsNullOrWhiteSpace(zstring3))
|
|
||||||
{
|
{
|
||||||
return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실";
|
return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실";
|
||||||
}
|
//if (string.IsNullOrWhiteSpace(zstring3))
|
||||||
else
|
//{
|
||||||
{
|
// return istatus == null ? "미입력" : istatus == 2 ? "출석" : istatus == 0 ? "결석" : "입실";
|
||||||
return "출석";
|
//}
|
||||||
}
|
//else
|
||||||
|
//{
|
||||||
|
// return "출석";
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue