6714. 집합교육 출석 메뉴 기능 변경
This commit is contained in:
parent
b91bc92831
commit
f044c66bde
|
|
@ -517,23 +517,39 @@ namespace NP.BO.Controllers
|
|||
vm.pagetotalcount = GetCount(vm.LectInnings.FirstOrDefault());
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 교육운영 > 집합교육 출석
|
||||
/// </summary>
|
||||
/// <param name="vm"></param>
|
||||
/// <returns></returns>
|
||||
public ActionResult attscds(VMLect vm)
|
||||
{
|
||||
vm.ComCodes = GetComCodes("studyplace");
|
||||
ViewBag.reporturl = GetConfig("reporturl");
|
||||
|
||||
var ht = SetHash(vm);
|
||||
ht.Add("edate", vm.stringval);
|
||||
ht.Add("cname", vm.stringval2);
|
||||
ht.Add("studyplace", vm.stringval3);
|
||||
ht.Add("stringval17", vm.stringval17);
|
||||
ht.Add("edate", vm.stringval); // 교육종료일
|
||||
ht.Add("cname", vm.stringval2); // 과정명
|
||||
ht.Add("studyplace", vm.stringval3); // 교육장
|
||||
ht.Add("stringval17", vm.stringval17); // 출석여부
|
||||
ht.Add("stringval4", vm.stringval4); // 출석일
|
||||
ht.Add("stringval5", vm.stringval5); // 교육유형
|
||||
ht.Add("stringval6", vm.stringval6); // 수료여부
|
||||
|
||||
if (vm.isexceldown == 1)
|
||||
{
|
||||
vm.Lects = Dao.Get<Lect>("lect.lectinnings.forattscd2", ht);
|
||||
//return ExportExcel(
|
||||
// new String[] { "No", "운영기수", "교육장", "과정명", "교육생(ID)", "교육시작일", "교육종료일", "출석일", "집합교육출석여부", "수료여부" },
|
||||
// new String[] { "rnorvt", "sseqstr", "studyplacename", "cname", "usernameid", "sdatestr", "edatestr", "stimestr", "istatusname", "iscompletename" },
|
||||
// vm.Lects,
|
||||
// "attscds_" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day);
|
||||
|
||||
if (vm.Lects.Any())
|
||||
{
|
||||
// cshapename가 이미 설정되어 있다. cshapename2에 cshapename의 앞 3글자만 저장
|
||||
vm.Lects.ToList().ForEach(i =>
|
||||
{
|
||||
i.cshapename2 = (!string.IsNullOrEmpty(i.cshapename) && i.cshapename.Length > 3) ? i.cshapename.Substring(0, 3) : i.cshapename;
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.excellog != null)
|
||||
{
|
||||
vm.excellog.userno = SUserInfo.UserNo;
|
||||
|
|
@ -541,11 +557,12 @@ namespace NP.BO.Controllers
|
|||
|
||||
Dao.Save("excellog.in", vm.excellog);
|
||||
}
|
||||
|
||||
return ExportExcel(
|
||||
new String[] { "No", "교육장", "아이디", "교육생이름", "교육생 전화번호", "이메일", "과정명", "기술인분류", "교육목적", "등급", "직무분야", "전문분야", "교육시작일", "교육종료일", "출석일", "집합교육출석여부", "수료여부" },
|
||||
new String[] { "rnorvt", "studyplacename", "userid", "username", "mobile", "email", "cname", "zstring0", "zstring1", "zstring2", "zstring4", "zstring5", "sdatestr", "edatestr", "zstring3", "istatusname", "iscompletename" },
|
||||
new string[] { "No", "교육장", "아이디", "교육생이름", "교육생 전화번호", "이메일", "교육유형", "과정명", "기술인분류", "교육목적", "등급", "직무분야", "전문분야", "교육시작일", "교육종료일", "출석일", "집합교육출석여부", "수료여부" },
|
||||
new string[] { "rnorvt", "studyplacename", "userid", "username", "mobile", "email", "cshapename2", "cname", "zstring0", "zstring1", "zstring2", "zstring4", "zstring5", "sdatestr", "edatestr", "zstring3", "istatusname", "iscompletename" },
|
||||
vm.Lects,
|
||||
"attscds_" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day);
|
||||
$"attscds_{DateTime.Now.Year}{DateTime.Now.Month}{DateTime.Now.Day}");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -553,8 +570,10 @@ namespace NP.BO.Controllers
|
|||
vm.Lects = Dao.Get<Lect>("lect.lectinnings.forattscd", ht);
|
||||
vm.pagetotalcount = GetCount(vm.Lects.FirstOrDefault());
|
||||
}
|
||||
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
public ActionResult grades(NP.Model.VMCM vm)
|
||||
{
|
||||
vm.IsAdmin = SUserInfo.IsAdmin;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,28 @@
|
|||
@model NP.Model.VMLect
|
||||
@{
|
||||
/*
|
||||
// stringval : 교육종료일
|
||||
// stringval4 : 출석일
|
||||
// stringval3 : 교육장
|
||||
// stringval2 : 과정명
|
||||
// stringval17 : 출석여부
|
||||
// stringval5 : 교육유형
|
||||
// stringval6 : 수료여부
|
||||
*/
|
||||
}
|
||||
|
||||
<form id="mform" method="post">
|
||||
<input type="hidden" id="mform_tabidx" name="tabidx" value="@Model.tabidx" />
|
||||
|
||||
<!-- 검색영역 -->
|
||||
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
|
||||
@*@Html.Partial("./Partial/SearchCaption")*@
|
||||
<div class="table-responsive">
|
||||
<table class="table b-t b-light viewtable">
|
||||
<colgroup>
|
||||
<col width="15%" />
|
||||
<col width="35%" />
|
||||
<col width="15%" />
|
||||
<col width="*" />
|
||||
<col />
|
||||
<col style="width:15%" />
|
||||
<col style="width:35%" />
|
||||
<col style="width:15%" />
|
||||
<col style="width:auto" />
|
||||
</colgroup>
|
||||
<tbody id="searchtbody">
|
||||
<tr>
|
||||
|
|
@ -29,10 +41,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>과정명</th>
|
||||
<th>출석일</th>
|
||||
<td>
|
||||
<div class="col-md-12">
|
||||
@Html.Partial("./Partial/Text", Model.stringval2, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval2", Value = Model.stringval2 }))
|
||||
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval4) ? (DateTime?)null : Convert.ToDateTime(Model.stringval4), new ViewDataDictionary { { "name", "stringval4" } })
|
||||
</div>
|
||||
</td>
|
||||
<th>교육장</th>
|
||||
|
|
@ -42,11 +54,39 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<th>과정명</th>
|
||||
<td>
|
||||
<div class="col-md-12">
|
||||
@Html.Partial("./Partial/Text", Model.stringval2, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval2", Value = Model.stringval2 }))
|
||||
</div>
|
||||
</td>
|
||||
<th>수료여부</th>
|
||||
<td>
|
||||
<div class="col-md-12">
|
||||
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "name", "stringval6" }, { "selected", Model.stringval6 }, { "valuetext", ":전체;1:수료;0:미수료" } })
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>교육유형</th>
|
||||
<td>
|
||||
<div class="col-md-12">
|
||||
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "name", "stringval5" }, { "selected", Model.stringval5 }, { "valuetext", ":전체;1:교육장;2:온라인" } })
|
||||
</div>
|
||||
</td>
|
||||
<th style="display:none;"> </th>
|
||||
<td style="display:none;">
|
||||
<div class="col-md-12">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div style="text-align: left; border-bottom: 1px solid #ddd; padding-bottom: 5px;">
|
||||
<span style="color:red; font-weight:bold;">* 온라인 교육만 해당되며, 교육장교육은 검색되지 않습니다. 교육장교육은 <u>성적처리</u> 기능을 이용해주세요.</span>
|
||||
<!-- // 검색영역 -->
|
||||
<div style="text-align: left; border-bottom: 1px solid #ddd; padding-bottom: 5px;">
|
||||
<div style="text-align:right;">
|
||||
<button class="btn btn-default btn-s-xs" type="button" onclick="javascript:submit();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
|
|
@ -54,15 +94,17 @@
|
|||
<br />
|
||||
<section class="panel panel-default">
|
||||
@Html.HiddenFor(m => m.intval2)
|
||||
|
||||
<!-- List 버튼영역 -->
|
||||
<div style="padding:5px 10px; text-align:right;">
|
||||
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "onchange", "submit()" }, { "name", "stringval17" }, { "selected", Model.stringval17 }, { "valuetext", ":출석여부;0:미입력;2:출석" }, { "style", "vertical-align: middle" } })
|
||||
@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-danger" onclick="save(0);">결석처리</a>
|
||||
<a href="#" class="btn btn-danger" onclick="save(1);">미입력처리</a>
|
||||
<a href="#" onclick="javascript:callComment('mform', '/croom/attscds', 'tbody1', 'attscds', 23);" class="btn btn-s-xs btn-success">엑셀 다운로드</a>
|
||||
<a href="javascript:;" class="btn btn-primary" onclick="save(2);" style=" text-align:right">출석처리</a>
|
||||
<a href="javascript:;" class="btn btn-danger" onclick="save(0);">결석처리</a>
|
||||
<a href="javascript:;" class="btn btn-danger" onclick="save(1);">미입력처리</a>
|
||||
<a href="javascript:;" onclick="javascript:callComment('mform', '/croom/attscds', 'tbody1', 'attscds', 23);" class="btn btn-s-xs btn-success">엑셀 다운로드</a>
|
||||
</div>
|
||||
<!-- // List 버튼영역 -->
|
||||
<!-- List -->
|
||||
<div class="table-responsive" id="excel1">
|
||||
<table class="table table-striped b-t b-light">
|
||||
<thead>
|
||||
|
|
@ -71,6 +113,7 @@
|
|||
<th width="20">No</th>
|
||||
<th width="60">운영기수</th>
|
||||
<th>교육장</th>
|
||||
<th>교육유형</th>
|
||||
<th>과정명</th>
|
||||
<th>교육생(ID)</th>
|
||||
<th>교육시작일</th>
|
||||
|
|
@ -88,6 +131,7 @@
|
|||
<td>@d.rnorvt</td>
|
||||
<td>@d.sseqstr</td>
|
||||
<td>@d.studyplacename</td>
|
||||
<td>@((!string.IsNullOrEmpty(d.cshapename) && d.cshapename.Length > 3) ? d.cshapename.Substring(0,3) : d.cshapename)</td>
|
||||
<td>@d.cname</td>
|
||||
<td>@d.usernameid</td>
|
||||
<td>@d.sdatestr </td>
|
||||
|
|
@ -95,7 +139,7 @@
|
|||
{
|
||||
if (d.iscomplete != 1)
|
||||
{
|
||||
<td class="link text-center"><a href="#" onclick="javascript: openScd(@d.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
|
||||
<td class="link text-center"><a href="javascript:;" onclick="javascript: openScd(@d.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -122,36 +166,47 @@
|
|||
</table>
|
||||
</div>
|
||||
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
|
||||
<!--// List -->
|
||||
</section>
|
||||
</form>
|
||||
@Html.Partial("./Partial/ExcelCommentBox")
|
||||
<div id="scdbox" class="findbox draggable regbox" style="width: 500px; z-index: 1041; top: 60px; overflow: auto;">
|
||||
<h4><i class="fa fa-bars"></i> <span id="pcap">교육일정변경</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
||||
<h4><i class="fa fa-bars"></i> <span id="pcap">교육일정변경</span><a href="javascript:;" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
||||
<ul id="ulScd"></ul>
|
||||
<div class="findboxbtnbox" id="btnsavelect">
|
||||
<a href="#" class="btn btn-primary" onclick="updateScd();">선택완료</a>
|
||||
<a href="javascript:;" class="btn btn-primary" onclick="updateScd();">선택완료</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section styles{
|
||||
<style type="text/css">
|
||||
</style>
|
||||
<style type="text/css"></style>
|
||||
}
|
||||
|
||||
@section scriptsHeader{
|
||||
@Html.Partial("./Partial/FileScript")
|
||||
@Html.Partial("./Partial/ScriptDate")
|
||||
@Html.Partial("./Partial/ScdScript")
|
||||
}
|
||||
|
||||
@section scripts{
|
||||
<script>
|
||||
var _authtype = 1;
|
||||
var _lectno;
|
||||
function viewcert(lectno) {
|
||||
_lectno = lectno;
|
||||
capp("/acommon/authkey", { authtype: _authtype, jobkey: lectno }, "cbauthkey");
|
||||
}
|
||||
function cbauthkey() {
|
||||
if (capResult.code == 1000) {
|
||||
@*var pop = window.open('@ViewBag.fronturl/Open/CertPrint?userno=@ViewBag.SSUserNo&authtype=' + _authtype + '&randkey=' + capResult.obj, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");*@
|
||||
var _lectno;
|
||||
|
||||
function viewcert(lectno) {
|
||||
_lectno = lectno;
|
||||
capp(
|
||||
"/acommon/authkey",
|
||||
{
|
||||
authtype: _authtype,
|
||||
jobkey: lectno
|
||||
},
|
||||
"cbauthkey"
|
||||
);
|
||||
}
|
||||
|
||||
function cbauthkey() {
|
||||
if (capResult.code == 1000) {
|
||||
var pop = window.open('@ViewBag.reporturl/certification.aspx?lectno='+_lectno, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");
|
||||
if (pop == null) {
|
||||
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
||||
|
|
@ -162,39 +217,57 @@
|
|||
var amsg;
|
||||
function save(no) {
|
||||
let attrdate = $("#stringval").val();
|
||||
if (no == 2) { amsg = "출석"; }
|
||||
else if (no == 0) { amsg = "결석"; }
|
||||
else { amsg = "미입력"; }
|
||||
switch (no) {
|
||||
case 2: amsg = "출석"; break;
|
||||
case 0: amsg = "결석"; break;
|
||||
default: amsg = "미입력"; break;
|
||||
}
|
||||
|
||||
if ($("#tbody1 tr input.autocheck:checked").length < 1) {
|
||||
msg(amsg + "처리할 교육생을 선택해주세요.");
|
||||
} else if (confirm("선택한 교육생을 " + amsg + "처리하시겠습니까?")) {
|
||||
msg(`${amsg} 처리할 교육생을 선택해주세요.`);
|
||||
}
|
||||
else if (confirm(`선택한 교육생을 ${amsg} 처리하시겠습니까?`)) {
|
||||
|
||||
var userinfos = "";
|
||||
var cuis = "";
|
||||
|
||||
$.each($("#tbody1 tr input.autocheck:checked"), function (i, c) {
|
||||
if ($(c).attr("data-cmino") == "" || $(c).attr("data-cmino") < 1) {
|
||||
cuis += "," + $(c).attr("data-usernameid");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
userinfos += "," + $(c).attr("data-cmino") + ":" + $(c).val();
|
||||
}
|
||||
});
|
||||
|
||||
userinfos = userinfos.substr(1);
|
||||
cuis = cuis.substr(1);
|
||||
|
||||
if (cuis != "") {
|
||||
msg(cuis + "교육생들은 " + amsg + "처리가 불가능합니다.");
|
||||
} else {
|
||||
capp("/acommon/offattscdsave", { userinfos: userinfos, istatus: no, attrdate: attrdate, attr: no }, "cboffattscdsave");
|
||||
msg(`${cuis} 교육생들은 ${amsg} 처리가 불가능합니다.`);
|
||||
}
|
||||
else {
|
||||
capp(
|
||||
"/acommon/offattscdsave",
|
||||
{
|
||||
userinfos: userinfos,
|
||||
istatus: no,
|
||||
attrdate: attrdate,
|
||||
attr: no
|
||||
},
|
||||
"cboffattscdsave");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cboffattscdsave() {
|
||||
if (capResult.code == 1000) {
|
||||
msgf2("저장했습니다.", "submit('mform', 0, true)");
|
||||
} else { msgdev(true); }
|
||||
}
|
||||
else {
|
||||
msgdev(true);
|
||||
}
|
||||
}
|
||||
//function excldown() {
|
||||
// $("#intval2").val(1);
|
||||
// $("#mform").submit();
|
||||
//}
|
||||
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
|
@ -779,151 +779,197 @@
|
|||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.rno
|
||||
</select>
|
||||
<select id="lect.lectinnings.forattscd" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,c.cmino,c.cmno,c.cshape,c.cname,b2.isoffabs
|
||||
,a.isrebate,p.payoktime,a.iscomplete, a.stime
|
||||
,a.sdate,a.edate, date_format(g.stime, '%Y-%m-%d') zstring3
|
||||
,a.cmisno
|
||||
,c.sseq,f.cname studyplacename
|
||||
,c.estart,c.eend
|
||||
,e.userno,e.userid, e.username
|
||||
,g.istatus
|
||||
,row_number() over(order by e.username) rno
|
||||
,count(a.cdt) over() pagetotalcount
|
||||
from lect a
|
||||
inner join pay p on p.payno = a.payno
|
||||
inner join (
|
||||
select c.cmno, c.cshape, c.cname, ci.cmino,d.cmisno,d.sseq,d.estart,d.eend,d.studyplace
|
||||
from cm c
|
||||
inner join cminning ci on c.cmno = ci.cmno
|
||||
inner join cminningscd d on d.cmino = ci.cmino
|
||||
where c.cshape=2 and ci.isscd=1 and ifnull(ci.scdtype, 0) =0
|
||||
) c on c.cmno = a.cmno and c.cmisno = a.cmisno
|
||||
inner join cmev b2 on b2.cmno = c.cmno
|
||||
inner join users e on e.userno = a.userno
|
||||
left outer join comcode f on f.ccode = c.studyplace and f.isuse =1
|
||||
left outer join lectinning g on g.cmino = c.cmino and g.lectno = a.lectno
|
||||
where a.status=1 and a.ischanged=0
|
||||
<isNotNull property="edate">and date_format(a.edate,'%Y%m%d') = date_format(#edate#,'%Y%m%d')</isNotNull>
|
||||
<isNotNull property="cname">and c.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="studyplace">and c.studyplace = #studyplace#</isNotNull>
|
||||
<isNotNull property="stringval17">
|
||||
<isEqual property="stringval17" compareValue="0">and g.istatus is null</isEqual>
|
||||
<isEqual property="stringval17" compareValue="2">and g.istatus = 2 </isEqual>
|
||||
</isNotNull>
|
||||
<isNotEmpty property="searchtext">
|
||||
<isEqual property="searchtype" compareValue="usernamestr">and e.username like concat('%',#searchtext#,'%')</isEqual>
|
||||
<isEqual property="searchtype" compareValue="useridstr">and e.userid like concat('%',#searchtext#,'%')</isEqual>
|
||||
</isNotEmpty>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.rno
|
||||
</select>
|
||||
<select id="lect.lectinnings.forattscd2_old" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,c.cmino,b.cmno,b.cshape,b.cname,b2.isoffabs
|
||||
,a.isrebate,p.payoktime,a.iscomplete, a.stime
|
||||
,a.sdate,a.edate
|
||||
,a.cmisno
|
||||
,d.sseq,f.cname studyplacename
|
||||
,d.estart,d.eend
|
||||
,e.userno,e.userid, e.username
|
||||
,g.istatus
|
||||
,cc.cname zstring0
|
||||
,cc2.cname zstring1
|
||||
,cc3.cname zstring2
|
||||
,CAST(AES_DECRYPT(UNHEX(e.mobile), 'np123@!') AS CHAR) mobile
|
||||
,CAST(AES_DECRYPT(UNHEX(e.email), 'np123@!') AS CHAR) email
|
||||
,row_number() over(order by a.cdt desc,e.username) rno
|
||||
,count(a.cdt) over() pagetotalcount
|
||||
from lect a
|
||||
inner join pay p on p.payno = a.payno
|
||||
INNER JOIN pplog pp ON p.pplno = pp.pplno
|
||||
INNER JOIN comcode cc ON pp.typeman = cc.ccode
|
||||
INNER JOIN comcode cc2 ON pp.typeedu = cc2.ccode
|
||||
INNER JOIN comcode cc3 ON pp.typegrade = cc3.ccode
|
||||
inner join cm b on b.cmno = a.cmno
|
||||
inner join cmev b2 on b2.cmno = b.cmno
|
||||
inner join cminning c on c.cmno = b.cmno
|
||||
left outer join cminningscd d on d.cmisno = a.cmisno and d.cmino = c.cmino
|
||||
inner join users e on e.userno = a.userno
|
||||
left outer join comcode f on f.ccode = d.studyplace and f.isuse =1
|
||||
left outer join lectinning g on g.cmino = c.cmino and g.lectno = a.lectno
|
||||
where a.status=1 and a.ischanged=0 and c.isscd=1 and c.scdtype=0 and b.cshape=2
|
||||
<isNotNull property="edate">and date_format(a.edate,'%Y%m%d') = date_format(#edate#,'%Y%m%d')</isNotNull>
|
||||
<isNotNull property="cname">and b.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="studyplace">and d.studyplace = #studyplace#</isNotNull>
|
||||
<isNotNull property="stringval17">
|
||||
<isEqual property="stringval17" compareValue="0">and g.istatus is null</isEqual>
|
||||
<isEqual property="stringval17" compareValue="2">and g.istatus = 2 </isEqual>
|
||||
</isNotNull>
|
||||
<isNotEmpty property="searchtext">
|
||||
<isEqual property="searchtype" compareValue="usernamestr">and e.username like concat('%',#searchtext#,'%')</isEqual>
|
||||
<isEqual property="searchtype" compareValue="useridstr">and e.userid like concat('%',#searchtext#,'%')</isEqual>
|
||||
</isNotEmpty>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.username
|
||||
</select>
|
||||
<select id="lect.lectinnings.forattscd2" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,c.cmino,c.cmno,c.cshape,c.cname,b2.isoffabs
|
||||
,a.isrebate,p.payoktime,a.iscomplete, a.stime
|
||||
,a.sdate,a.edate, date_format(g.stime, '%Y-%m-%d') zstring3
|
||||
,a.cmisno
|
||||
,c.sseq,f.cname studyplacename
|
||||
,c.estart,c.eend
|
||||
,e.userno,e.userid, e.username
|
||||
,CAST(AES_DECRYPT(UNHEX(e.mobile), <include refid="sql.digest"></include>) AS char) mobile
|
||||
,CAST(AES_DECRYPT(UNHEX(e.email), <include refid="sql.digest"></include>) AS char) email
|
||||
,g.istatus
|
||||
,cc.cname zstring0
|
||||
,cc2.cname zstring1
|
||||
,cc3.cname zstring2
|
||||
,(case when cc4.cname is null then '-' else cc4.cname end) zstring4
|
||||
,(case when cc5.cname is null then '-' else cc5.cname end) zstring5
|
||||
,row_number() over(order by a.cdt desc,e.username) rno
|
||||
,count(a.cdt) over() pagetotalcount
|
||||
from lect a
|
||||
inner join pay p on p.payno = a.payno
|
||||
INNER JOIN pplog pp ON p.pplno = pp.pplno
|
||||
INNER JOIN comcode cc ON pp.typeman = cc.ccode
|
||||
INNER JOIN comcode cc2 ON pp.typeedu = cc2.ccode
|
||||
INNER JOIN comcode cc3 ON pp.typegrade = cc3.ccode
|
||||
LEFT OUTER JOIN comcode cc4 ON pp.typejob = cc4.ccode
|
||||
LEFT OUTER JOIN comcode cc5 ON pp.typejobitem = cc5.ccode
|
||||
inner join (
|
||||
select c.cmno, c.cshape, c.cname, ci.cmino,d.cmisno,d.sseq,d.estart,d.eend,d.studyplace
|
||||
from cm c
|
||||
inner join cminning ci on c.cmno = ci.cmno
|
||||
inner join cminningscd d on d.cmino = ci.cmino
|
||||
where c.ismaster = 0 and c.isdel = 0 and c.cshape=2 and ci.isscd=1 and ifnull(ci.scdtype, 0) =0
|
||||
) c on c.cmno = a.cmno and c.cmisno = a.cmisno
|
||||
inner join cmev b2 on b2.cmno = c.cmno
|
||||
inner join users e on e.userno = a.userno
|
||||
left outer join comcode f on f.ccode = c.studyplace and f.isuse =1
|
||||
left outer join lectinning g on g.cmino = c.cmino and g.lectno = a.lectno
|
||||
where a.status=1 and a.ischanged=0
|
||||
<isNotNull property="edate">and date_format(a.edate,'%Y%m%d') = date_format(#edate#,'%Y%m%d')</isNotNull>
|
||||
<isNotNull property="cname">and c.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="studyplace">and c.studyplace = #studyplace#</isNotNull>
|
||||
<isNotNull property="stringval17">
|
||||
<isEqual property="stringval17" compareValue="0">and g.istatus is null</isEqual>
|
||||
<isEqual property="stringval17" compareValue="2">and g.istatus = 2 </isEqual>
|
||||
</isNotNull>
|
||||
<isNotEmpty property="searchtext">
|
||||
<isEqual property="searchtype" compareValue="usernamestr">and e.username like concat('%',#searchtext#,'%')</isEqual>
|
||||
<isEqual property="searchtype" compareValue="useridstr">and e.userid like concat('%',#searchtext#,'%')</isEqual>
|
||||
</isNotEmpty>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.username
|
||||
</select>
|
||||
<select id="lect.atts" parameterClass="hashtable" resultClass="lect">
|
||||
|
||||
<!-- 교육운영 > 집합교육 출석 > 리스트-->
|
||||
<select id="lect.lectinnings.forattscd" parameterClass="hashtable" resultClass="lect">
|
||||
SELECT
|
||||
a.*
|
||||
FROM (
|
||||
SELECT
|
||||
a.lectno
|
||||
,a.isrebate,p.payoktime,a.iscomplete, a.stime
|
||||
,c.cmino,c.cmno,c.cshape,c.cname
|
||||
,b2.isoffabs
|
||||
,a.sdate,a.edate
|
||||
,DATE_FORMAT(g.stime, '%Y-%m-%d') zstring3
|
||||
,a.cmisno
|
||||
,c.sseq,f.cname studyplacename
|
||||
,c.estart,c.eend
|
||||
,e.userno,e.userid, e.username
|
||||
,g.istatus
|
||||
,ROW_NUMBER() OVER(ORDER BY e.username) rno
|
||||
,COUNT(a.cdt) OVER() pagetotalcount
|
||||
FROM lect a
|
||||
INNER JOIN pay p ON p.payno = a.payno
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
c.cmno, c.cshape, c.cname
|
||||
,ci.cmino
|
||||
,d.cmisno,d.sseq,d.estart,d.eend,d.studyplace
|
||||
FROM cm c
|
||||
INNER JOIN cminning ci ON c.cmno = ci.cmno
|
||||
INNER JOIN cminningscd d ON d.cmino = ci.cmino
|
||||
WHERE
|
||||
ci.isscd = 1
|
||||
AND IFNULL(ci.scdtype, 0) = 0
|
||||
) c ON c.cmno = a.cmno and c.cmisno = a.cmisno
|
||||
INNER JOIN cmev b2 ON b2.cmno = c.cmno
|
||||
INNER JOIN users e ON e.userno = a.userno
|
||||
LEFT OUTER JOIN comcode f ON f.ccode = c.studyplace AND f.isuse =1
|
||||
LEFT OUTER JOIN lectinning g ON g.cmino = c.cmino AND g.lectno = a.lectno
|
||||
WHERE
|
||||
a.status=1
|
||||
AND a.ischanged=0
|
||||
<isNotNull property="edate">AND DATE_FORMAT(a.edate,'%Y%m%d') = DATE_FORMAT(#edate#,'%Y%m%d')</isNotNull>
|
||||
<isNotNull property="cname">AND c.cname LIKE CONCAT('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="studyplace">AND c.studyplace = #studyplace#</isNotNull>
|
||||
<isNotNull property="stringval17">
|
||||
<isEqual property="stringval17" compareValue="0">AND g.istatus IS NULL</isEqual>
|
||||
<isEqual property="stringval17" compareValue="2">AND g.istatus = 2</isEqual>
|
||||
</isNotNull>
|
||||
<isNotEmpty property="searchtext">
|
||||
<isEqual property="searchtype" compareValue="usernamestr">AND e.username LIKE CONCAT('%',#searchtext#,'%')</isEqual>
|
||||
<isEqual property="searchtype" compareValue="useridstr">AND e.userid LIKE CONCAT('%',#searchtext#,'%')</isEqual>
|
||||
</isNotEmpty>
|
||||
<isNotNull property="stringval4">
|
||||
AND (g.stime BETWEEN CONCAT(#stringval4#, ' 00:00:00') AND CONCAT(#stringval4#, ' 23:59:59') )
|
||||
</isNotNull>
|
||||
<isNotNull property="stringval5">AND c.cshape = #stringval5#</isNotNull>
|
||||
<isNotNull property="stringval6">
|
||||
<isEqual property="stringval6" compareValue="1">AND a.iscomplete = 1</isEqual>
|
||||
<isEqual property="stringval6" compareValue="0">AND (a.iscomplete != 1 OR a.iscomplete IS NULL)</isEqual>
|
||||
</isNotNull>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
ORDER BY a.rno
|
||||
</select>
|
||||
|
||||
<!-- 교육운영 > 집합교육 출석 > 엑셀다운-->
|
||||
<select id="lect.lectinnings.forattscd2" parameterClass="hashtable" resultClass="lect">
|
||||
SELECT
|
||||
a.*
|
||||
FROM (
|
||||
SELECT
|
||||
a.lectno, c.cmino, c.cmno, c.cshape, c.cname, b2.isoffabs,
|
||||
a.isrebate, p.payoktime, a.iscomplete, a.stime,
|
||||
a.sdate, a.edate,
|
||||
DATE_FORMAT(g.stime, '%Y-%m-%d') zstring3,
|
||||
a.cmisno, c.sseq, f.cname AS studyplacename,
|
||||
c.estart, c.eend,
|
||||
e.userno, e.userid, e.username,
|
||||
CAST(AES_DECRYPT(UNHEX(e.mobile), <include refid="sql.digest"></include>) AS CHAR) mobile,
|
||||
CAST(AES_DECRYPT(UNHEX(e.email), <include refid="sql.digest"></include>) AS CHAR) email,
|
||||
g.istatus,
|
||||
cc.cname zstring0,
|
||||
cc2.cname zstring1,
|
||||
cc3.cname zstring2,
|
||||
(CASE WHEN cc4.cname IS NULL THEN '-' ELSE cc4.cname END) zstring4,
|
||||
(CASE WHEN cc5.cname IS NULL THEN '-' ELSE cc5.cname END) zstring5,
|
||||
ROW_NUMBER() OVER(ORDER BY a.cdt DESC, e.username) rno,
|
||||
COUNT(a.cdt) OVER() pagetotalcount
|
||||
FROM lect a
|
||||
INNER JOIN pay p ON p.payno = a.payno
|
||||
INNER JOIN pplog pp ON p.pplno = pp.pplno
|
||||
INNER JOIN comcode cc ON pp.typeman = cc.ccode
|
||||
INNER JOIN comcode cc2 ON pp.typeedu = cc2.ccode
|
||||
INNER JOIN comcode cc3 ON pp.typegrade = cc3.ccode
|
||||
LEFT OUTER JOIN comcode cc4 ON pp.typejob = cc4.ccode
|
||||
LEFT OUTER JOIN comcode cc5 ON pp.typejobitem = cc5.ccode
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
c.cmno, c.cshape, c.cname, ci.cmino
|
||||
,d.cmisno, d.sseq, d.estart, d.eend, d.studyplace
|
||||
FROM cm c
|
||||
INNER JOIN cminning ci ON c.cmno = ci.cmno
|
||||
INNER JOIN cminningscd d ON d.cmino = ci.cmino
|
||||
WHERE
|
||||
c.ismaster = 0
|
||||
AND c.isdel = 0
|
||||
AND ci.isscd = 1
|
||||
AND IFNULL(ci.scdtype, 0) = 0
|
||||
) c ON c.cmno = a.cmno AND c.cmisno = a.cmisno
|
||||
INNER JOIN cmev b2 ON b2.cmno = c.cmno
|
||||
INNER JOIN users e ON e.userno = a.userno
|
||||
LEFT OUTER JOIN comcode f ON f.ccode = c.studyplace AND f.isuse =1
|
||||
LEFT OUTER JOIN lectinning g ON g.cmino = c.cmino AND g.lectno = a.lectno
|
||||
WHERE
|
||||
a.status = 1
|
||||
AND a.ischanged = 0
|
||||
<isNotNull property="edate">AND DATE_FORMAT(a.edate,'%Y%m%d') = DATE_FORMAT(#edate#,'%Y%m%d')</isNotNull>
|
||||
<isNotNull property="cname">AND c.cname LIKE CONCAT('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="studyplace">AND c.studyplace = #studyplace#</isNotNull>
|
||||
<isNotNull property="stringval17">
|
||||
<isEqual property="stringval17" compareValue="0">AND g.istatus is null</isEqual>
|
||||
<isEqual property="stringval17" compareValue="2">AND g.istatus = 2 </isEqual>
|
||||
</isNotNull>
|
||||
<isNotEmpty property="searchtext">
|
||||
<isEqual property="searchtype" compareValue="usernamestr">AND e.username like concat('%',#searchtext#,'%')</isEqual>
|
||||
<isEqual property="searchtype" compareValue="useridstr">AND e.userid like concat('%',#searchtext#,'%')</isEqual>
|
||||
</isNotEmpty>
|
||||
<isNotNull property="stringval4">
|
||||
AND (g.stime BETWEEN CONCAT(#stringval4#, ' 00:00:00') AND CONCAT(#stringval4#, ' 23:59:59') )
|
||||
</isNotNull>
|
||||
<isNotNull property="stringval5">AND c.cshape = #stringval5#</isNotNull>
|
||||
<isNotNull property="stringval6">
|
||||
<isEqual property="stringval6" compareValue="1">AND a.iscomplete = 1</isEqual>
|
||||
<isEqual property="stringval6" compareValue="0">AND (a.iscomplete != 1 OR a.iscomplete IS NULL)</isEqual>
|
||||
</isNotNull>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
ORDER BY a.username
|
||||
</select>
|
||||
|
||||
<!--
|
||||
<select id="lect.lectinnings.forattscd2_old" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,c.cmino,b.cmno,b.cshape,b.cname,b2.isoffabs
|
||||
,a.isrebate,p.payoktime,a.iscomplete, a.stime
|
||||
,a.sdate,a.edate
|
||||
,a.cmisno
|
||||
,d.sseq,f.cname studyplacename
|
||||
,d.estart,d.eend
|
||||
,e.userno,e.userid, e.username
|
||||
,g.istatus
|
||||
,cc.cname zstring0
|
||||
,cc2.cname zstring1
|
||||
,cc3.cname zstring2
|
||||
,CAST(AES_DECRYPT(UNHEX(e.mobile), 'np123@!') AS CHAR) mobile
|
||||
,CAST(AES_DECRYPT(UNHEX(e.email), 'np123@!') AS CHAR) email
|
||||
,row_number() over(order by a.cdt desc,e.username) rno
|
||||
,count(a.cdt) over() pagetotalcount
|
||||
from lect a
|
||||
inner join pay p on p.payno = a.payno
|
||||
INNER JOIN pplog pp ON p.pplno = pp.pplno
|
||||
INNER JOIN comcode cc ON pp.typeman = cc.ccode
|
||||
INNER JOIN comcode cc2 ON pp.typeedu = cc2.ccode
|
||||
INNER JOIN comcode cc3 ON pp.typegrade = cc3.ccode
|
||||
inner join cm b on b.cmno = a.cmno
|
||||
inner join cmev b2 on b2.cmno = b.cmno
|
||||
inner join cminning c on c.cmno = b.cmno
|
||||
left outer join cminningscd d on d.cmisno = a.cmisno and d.cmino = c.cmino
|
||||
inner join users e on e.userno = a.userno
|
||||
left outer join comcode f on f.ccode = d.studyplace and f.isuse =1
|
||||
left outer join lectinning g on g.cmino = c.cmino and g.lectno = a.lectno
|
||||
where a.status=1 and a.ischanged=0 and c.isscd=1 and c.scdtype=0 and b.cshape=2
|
||||
<isNotNull property="edate">and date_format(a.edate,'%Y%m%d') = date_format(#edate#,'%Y%m%d')</isNotNull>
|
||||
<isNotNull property="cname">and b.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="studyplace">and d.studyplace = #studyplace#</isNotNull>
|
||||
<isNotNull property="stringval17">
|
||||
<isEqual property="stringval17" compareValue="0">and g.istatus is null</isEqual>
|
||||
<isEqual property="stringval17" compareValue="2">and g.istatus = 2 </isEqual>
|
||||
</isNotNull>
|
||||
<isNotEmpty property="searchtext">
|
||||
<isEqual property="searchtype" compareValue="usernamestr">and e.username like concat('%',#searchtext#,'%')</isEqual>
|
||||
<isEqual property="searchtype" compareValue="useridstr">and e.userid like concat('%',#searchtext#,'%')</isEqual>
|
||||
</isNotEmpty>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.username
|
||||
</select>
|
||||
-->
|
||||
|
||||
<select id="lect.atts" parameterClass="hashtable" resultClass="lect">
|
||||
select a.lectno,a.isrebate,a.attrate,a.stime,a.sip,a.etime,a.eip
|
||||
,b.username,b.userid,b.userno
|
||||
,c.asname
|
||||
|
|
@ -942,6 +988,7 @@
|
|||
,c.asname
|
||||
order by rno
|
||||
</select>
|
||||
|
||||
<select id="lect.lectinnings.bycmino" parameterClass="hashtable" resultClass="lectinning">
|
||||
select b.lectno,a.cmino
|
||||
,u.userno,u.userid,u.username
|
||||
|
|
@ -965,6 +1012,7 @@
|
|||
group by b.lectno,a.cmino,u.userno,u.userid,u.username,ua.asname,c.stime,c.etime,c.istatus
|
||||
order by u.username
|
||||
</select>
|
||||
|
||||
<select id="lect.lectinningpages" parameterClass="hashtable" resultClass="lectinningpage">
|
||||
select a.lectno,b.cmino,d.logno,f.sstime,f.setime
|
||||
,b.iseq,b.isonline,b.ititle,b.atime
|
||||
|
|
@ -1010,6 +1058,7 @@
|
|||
</dynamic>
|
||||
order by cdt desc
|
||||
</select>
|
||||
|
||||
<select id="lect.pagelogs_page_OLD" parameterClass="hashtable" resultClass="pagelog">
|
||||
select a.cdt,a.uip,b.pagename,a.loginfo
|
||||
from (
|
||||
|
|
|
|||
Loading…
Reference in New Issue