------------------------------------------------------------
<기능개선> 1. PMS NO : 2. (주요)작업내용 (1) 202212 추가개발건 일괄 커밋
This commit is contained in:
parent
5781d0a575
commit
b38e869e7c
|
|
@ -621,6 +621,7 @@ namespace NP.BO.Controllers
|
|||
if (searchCheck)
|
||||
{
|
||||
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" } });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
var selectedcmno;
|
||||
var selectedLectno;
|
||||
var selectedCmisno;
|
||||
var selectedCmisno;
|
||||
var scdallCheck = false;
|
||||
var scdReturnType = "base";
|
||||
|
||||
function setScd2(cmno) {
|
||||
capp("/acommon/GetScdForMixEdu", { cmno: cmno, iscmlects : 1 }, "renderScd2");
|
||||
capp("/acommon/GetScdForMixEdu", { cmno: cmno, iscmlects: 1, scdallCheck: (scdallCheck ? 1 : 0) }, "renderScd2");
|
||||
}
|
||||
|
||||
function renderScd2() {
|
||||
|
|
@ -42,6 +44,7 @@
|
|||
var ulScd = $("#ulScd");
|
||||
ulScd.empty();
|
||||
var seq = 0;
|
||||
let tempVal = "";
|
||||
$.each(capResult.obj, function (i, d) {
|
||||
var li = $("<li />");
|
||||
//if (d.isEnd == true) {
|
||||
|
|
@ -54,19 +57,19 @@
|
|||
}
|
||||
else {
|
||||
if (seq == 0) {
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "' data-date='" + d.estartShortDateString + "' data-scdInfoSummary='" + d.scdInfoSummary + "'>" + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
|
||||
}
|
||||
else {
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "' data-date='" + d.estartShortDateString + "' data-scdInfoSummary='" + d.scdInfoSummary + "'>" + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (seq == 0) {
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "</label>");
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "' data-date='" + d.estartShortDateString + "' data-scdInfoSummary='" + d.scdInfoSummary + "'>" + d.scdInfoSummary + "</label>");
|
||||
}
|
||||
else {
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "</label>");
|
||||
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "' data-date='" + d.estartShortDateString + "' data-scdInfoSummary='" + d.scdInfoSummary + "'>" + d.scdInfoSummary + "</label>");
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
|
@ -74,12 +77,21 @@
|
|||
ulScd.append(li);
|
||||
});
|
||||
|
||||
$("input:radio[name='rdoScds']:radio[value='" + selectedCmisno + "']").prop('checked', true);
|
||||
switch (scdReturnType) {
|
||||
case "ur":
|
||||
tempVal = $("#lect_" + selectedLectno + "_cmisno").data("cmisno")
|
||||
$("input:radio[name='rdoScds']:radio[value='" + tempVal + "']").prop('checked', true);
|
||||
break;
|
||||
default:
|
||||
$("input:radio[name='rdoScds']:radio[value='" + selectedCmisno + "']").prop('checked', true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
function openScd(cmno, lectno, cmisno) {
|
||||
selectedcmno = cmno;
|
||||
selectedLectno = lectno;
|
||||
selectedCmisno = cmisno;
|
||||
|
||||
$.when(
|
||||
setScd()
|
||||
).done(function () {
|
||||
|
|
@ -90,20 +102,59 @@
|
|||
});
|
||||
}
|
||||
|
||||
function updateScd() {
|
||||
if (confirm("교육일정을 변경하시겠습니까?")) {
|
||||
var cmisno = $("input:radio[name=rdoScds]:checked").val();
|
||||
capp("/acommon/LectScdChange", { lectno: selectedLectno, cmisno: cmisno }, "afterUpdateScd");
|
||||
}
|
||||
function updateScd() {
|
||||
|
||||
switch (scdReturnType) {
|
||||
case "completions":
|
||||
let scdDate = $("input:radio[name=rdoScds]:checked").data("date");
|
||||
let scdInfoSummary = $("input:radio[name=rdoScds]:checked").data("scdInfoSummary");
|
||||
$("#completion_estart").val(scdDate);
|
||||
$("#bglayer2").hide();
|
||||
$("#scdbox").hide();
|
||||
//var data = { value: $(this).val(), text: $(this).data("text"), estart: $(this).data("estart") };
|
||||
var data = { value: $("input:radio[name=rdoScds]:checked").val(), text: scdInfoSummary, estart: scdDate };
|
||||
bindCMScd(data);
|
||||
break;
|
||||
default:
|
||||
if (confirm("교육일정을 변경하시겠습니까?")) {
|
||||
var cmisno = $("input:radio[name=rdoScds]:checked").val();
|
||||
selectedCmisno = cmisno;
|
||||
capp("/acommon/LectScdChange", { lectno: selectedLectno, cmisno: cmisno }, "afterUpdateScd");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
function afterUpdateScd() {
|
||||
if (capResult.code > 0) {
|
||||
msgok(1, "", true);
|
||||
submit("mform", 800, true);
|
||||
|
||||
if (scdReturnType == "base") {
|
||||
msgok(1, "", true);
|
||||
submit("mform", 800, true);
|
||||
}
|
||||
else if (scdReturnType == "ur") {
|
||||
$("#scdbox").slideUp('fast')
|
||||
setCmisno();
|
||||
msg2("저장되었습니다.", 0, null, "");
|
||||
}
|
||||
else if (scdReturnType == "completions") {
|
||||
$("#scdbox").slideUp('fast')
|
||||
msg2("저장되었습니다.", 0, null, "");
|
||||
}
|
||||
}
|
||||
else {
|
||||
msg("관리자에게 문의하세요.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
function setCmisno() {
|
||||
switch (scdReturnType) {
|
||||
case "ur":
|
||||
$("#lect_" + selectedLectno + "_cmisno").data("cmisno", selectedCmisno)
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -207,7 +207,6 @@
|
|||
$(".troff").show();
|
||||
$(".idoff").show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function save() {
|
||||
|
|
|
|||
|
|
@ -311,6 +311,8 @@
|
|||
submit();
|
||||
}
|
||||
});
|
||||
|
||||
scdallCheck = true;
|
||||
setScd2(@Model.CM.cmno);
|
||||
});
|
||||
function leave() {
|
||||
|
|
|
|||
|
|
@ -101,9 +101,9 @@
|
|||
</section>
|
||||
<div style="text-align: right; border-bottom: 1px solid #ddd; padding-bottom: 5px;">
|
||||
<button class="btn btn-default btn-s-xs" type="button" onclick="javascript:submit();"><i class="fa fa-search"></i></button>
|
||||
@* <a href="#" onclick="javascript:exceldown('mform', '/croom/completions', 'tbody1', 'completions');" class="btn btn-default btn-s-xs" style="margin-left: 5px;">엑셀다운로드</a>*@
|
||||
@* <a href="#" onclick="javascript:exceldown('mform', '/croom/completions', 'tbody1', 'completions');" class="btn btn-default btn-s-xs" style="margin-left: 5px;">엑셀다운로드</a>*@
|
||||
<a href="#" onclick="javascript:callComment('mform', '/croom/completions', 'tbody1', 'completions');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
|
||||
</div><br />
|
||||
</div><br />
|
||||
<div class="tar buttonbox">
|
||||
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
|
||||
</div>
|
||||
|
|
@ -396,11 +396,25 @@
|
|||
<a href="#" class="btn btn-primary" onclick="update();">수정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bglayer2" style="display: none;">
|
||||
<div class="progress progress-xs progress-striped active" style="position: absolute; top: 40%; left: 30%; right: 30%; height: 20px; display: none;">
|
||||
<div class="progress-bar progress-bar-danger" data-toggle="tooltip" data-original-title="30%" style="width: 100%">processing...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postlayer" class="daumpost">
|
||||
<a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a>
|
||||
</div>
|
||||
<div id="scdbox" class="findbox draggable regbox" style="width: 400px; z-index: 2001; top: 100px;left:300px; overflow: auto;">
|
||||
<h4><i class="fa fa-bars"></i> <span id="pcap">교육일정변경</span><a href="#" class="btn btn-default btn-xs f-r closethisbox2">닫기</a></h4>
|
||||
<ul id="ulScd"></ul>
|
||||
<div class="findboxbtnbox" id="btnsavelect">
|
||||
<a href="#" class="btn btn-primary" onclick="updateScd();">선택완료</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("./Partial/AssignBox2", "bindAssign;고객사 검색;1")
|
||||
@Html.Partial("./Partial/CMScdBox2", "bindCMScd;교육일정선택;1")
|
||||
@*@Html.Partial("./Partial/CMScdBox2", "bindCMScd;교육일정선택;1")*@
|
||||
@Html.Partial("./Partial/ScdScript", "bindCMScd;교육일정선택;1")
|
||||
@section scriptsHeader{
|
||||
@Html.Partial("./Partial/ScriptDate")
|
||||
@Html.Partial("./Partial/ScriptPost")
|
||||
|
|
@ -409,17 +423,33 @@
|
|||
@section scripts{
|
||||
<script src="~/js/moment.js"></script>
|
||||
<script>
|
||||
// /Partial/ScdScript의 완료시 표현방식 구분
|
||||
scdReturnType = "completions";
|
||||
|
||||
var _cgs = '@(string.Join(";", Model.CGs.Select(s=>string.Format("{0}:{1}:{2}", s.pcgno??0, s.cgno, s.cgname))))';
|
||||
$(document).ready(function () {
|
||||
$("#stringval2").on("change", function () {
|
||||
bindcgno("stringval2", "stringval3");
|
||||
});
|
||||
|
||||
/*기존 scd
|
||||
$("#btnfindscdshow").on("click", function () {
|
||||
var cmno = $("#completion_cmno").val();
|
||||
if (cmno != "") {
|
||||
findcmscdshow(cmno);
|
||||
}
|
||||
});*/
|
||||
$("#btnfindscdshow").on("click", function () {
|
||||
var cmno = $("#completion_cmno").val();
|
||||
var lectno = $("#completion_lectno").val();
|
||||
var cmisno = $("#completion_cmisno").val();
|
||||
|
||||
if (cmno != "") {
|
||||
$("#bglayer2").show()
|
||||
openScd(cmno,lectno,cmisno)
|
||||
}
|
||||
});
|
||||
|
||||
$("#completion_typejob").on("change", function () {
|
||||
$(".jobTypeItems").css("display", "none")
|
||||
let seltypeJobGroup = "typejob" + $(this).val();
|
||||
|
|
@ -429,10 +459,16 @@
|
|||
})
|
||||
|
||||
})
|
||||
|
||||
$(".closethisbox2").on("click", function () {
|
||||
$("#bglayer2").hide()
|
||||
$("#scdbox").hide();
|
||||
})
|
||||
});
|
||||
function bindCMScd(data) {
|
||||
$("#completion_cmisno").val(data.value);
|
||||
$("#completion_estart").val(moment(data.estart).format('YYYY-MM-DD'));
|
||||
//$("#completion_estart").val(moment(data.estart).format('YYYY-MM-DD'));
|
||||
$("#completion_estart").val(data.estart);
|
||||
}
|
||||
function bindAssign(data) {
|
||||
$("#completion_asno").val(data.asno);
|
||||
|
|
|
|||
|
|
@ -145,46 +145,46 @@
|
|||
{
|
||||
if(d.iscomplete != 1)
|
||||
{
|
||||
<td class="link text-center"><a href="#" onclick="javascript: openScd(@Model.CM.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
|
||||
<td class="link text-center">[1] <a href="#" onclick="javascript: openScd(@Model.CM.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@d.eend.ToShortDateString()</td>
|
||||
<td>[2] @d.eend.ToShortDateString()</td>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@d.edate.Value.ToShortDateString()</td>
|
||||
<td>[3] @d.edate.Value.ToShortDateString()</td>
|
||||
}
|
||||
@if (!ViewBag.IsSubAdmin96)
|
||||
{
|
||||
<td class="link text-center"><a onclick="viewatt(@d.lectno)" href="#">@d.attrate %</a></td>
|
||||
<td class="link text-center">[4] <a onclick="viewatt(@d.lectno)" href="#">@d.attrate %</a></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td class="link text-center">@d.attrate %</td>
|
||||
<td class="link text-center">[5] @d.attrate %</td>
|
||||
}
|
||||
@*<td>@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>*@
|
||||
<td>@(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
|
||||
<td>@(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
|
||||
<td style="display:none;">@( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>
|
||||
<td>@(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString())</td>
|
||||
<td>[6] @(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
|
||||
<td>[7] @(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
|
||||
<td style="display:none;">[8] @( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>
|
||||
<td>[9] @(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString())</td>
|
||||
@*<td>@((d.isrebate == 1 && Model.CMEV.midrfd < 1) || (d.isrebate == 0 && Model.CMEV.mid < 1) ? "-" : d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>
|
||||
<td>@((d.isrebate == 1 && Model.CMEV.finalrfd < 1) || (d.isrebate == 0 && Model.CMEV.final < 1) ? "-" : d.ex1cnt < 1 ? "-" : d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
|
||||
<td>@((d.isrebate == 1 && Model.CMEV.subjectrfd < 1) || (d.isrebate == 0 && Model.CMEV.subject < 1) ? "-" : d.sd0cnt < 1 ? "-" : d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
|
||||
<td>@((d.isrebate == 1 && Model.CMEV.discussrfd < 1) || (d.isrebate == 0 && Model.CMEV.discuss < 1) ? "-" : d.sd1cnt < 1 ? "-" : d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>*@
|
||||
@if (Model.CMEV.isoffabs == 1)
|
||||
{
|
||||
<td class="link text-center"><a href="#" onclick="save4();">@d.istatusname</a></td>
|
||||
<td class="link text-center">[10] <a href="#" onclick="save4();">@d.istatusname</a></td>
|
||||
}
|
||||
<td>@(d.rs0lectcnt) / @(d.rs0cnt)</td>
|
||||
<td>[11] @(d.rs0lectcnt) / @(d.rs0cnt)</td>
|
||||
@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" : "")">[12] @Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename)</td>
|
||||
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">[13] @Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename)</td>
|
||||
}
|
||||
@*<td><a style="@(d.iscomplete == 1 ? "":"display:none;")" href="#" class="btn btn-select btn-xxs" onclick="changecompt('@(d.completetime != null ? d.completetime.Value.ToString("yyyy-MM-dd") : "0001-01-01")','@d.username','@d.userid',@d.lectno,'@d.cshape')">변경</a></td>*@
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@
|
|||
|
||||
<td class="link text-center" style="cursor:pointer"><a href="#" onclick="gopay(0, @item.payno, @item.userno)">@item.pstatusname</a></td>
|
||||
<td>@item.iscompletename</td>
|
||||
<td class="link text-center"><a href="#" onclick="javascript: openScd(@item.cmno,@item.lectno,@item.cmisno);">[변경]</a></td>
|
||||
<td class="link text-center"><a href="#" onclick="javascript: openScd(@item.cmno,@item.lectno,@item.cmisno);" id="lect_@(item.lectno)_cmisno" data-cmisno="@item.cmisno">[변경]</a></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
|
@ -438,7 +438,7 @@
|
|||
@Html.Partial("./Partial/ScriptPost")
|
||||
@Html.Partial("./Partial/FileScript")
|
||||
@Html.Partial("./Partial/ScriptDate")
|
||||
@Html.Partial("./Partial/ScdScript2")
|
||||
@Html.Partial("./Partial/ScdScript")
|
||||
|
||||
@Html.Partial("./Partial/CMScdBox2", "bindCMScd;교육일정선택;1")
|
||||
@if (Model.viewname == "professor")
|
||||
|
|
@ -454,6 +454,9 @@
|
|||
@section scripts{
|
||||
<script src="~/js/moment.js"></script>
|
||||
<script>
|
||||
// /Partial/ScdScript의 완료시 표현방식 구분
|
||||
scdReturnType = "ur";
|
||||
|
||||
function gotab(idx) {
|
||||
$("#tabidx").val(idx);
|
||||
$("#lectbox, #regbox, #profbox, #boardbox, #lectbox2").hide();
|
||||
|
|
|
|||
|
|
@ -1750,9 +1750,9 @@ namespace NP.Base.Controllers
|
|||
/// <param name="iscmlects"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public JsonResult GetScdForMixEdu(int cmno, int iscmlects = 0)
|
||||
public JsonResult GetScdForMixEdu(int cmno, int iscmlects = 0, int scdallCheck = 0)
|
||||
{
|
||||
var result = Dao.Get<CMinningscd>("cm.cminningscds.applyedu.admin", new System.Collections.Hashtable() { { "cmno", cmno }});
|
||||
var result = Dao.Get<CMinningscd>("cm.cminningscds.applyedu.admin" + (scdallCheck > 0 ? "2" : ""), new System.Collections.Hashtable() { { "cmno", cmno } });
|
||||
foreach (var item in result)
|
||||
{
|
||||
item.scdInfoSummary = string.Format("[{0}] {1}", item.studyplacename, item.estart.ToString("yyyy년 MM월 dd일 ddd요일 HH:mm"));
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ namespace NP.Base.Controllers
|
|||
return JsonOK(Dao.Save("lect.reexam", new System.Collections.Hashtable() { { "exno", exno }, { "lectno", lectno }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }) > 2 ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult delfileOk(int sdno, Int64 lectno)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1897,7 +1897,7 @@
|
|||
from
|
||||
(
|
||||
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,case when c.scdtype =1 then '온라인' else e.cname end studyplacename
|
||||
,case when date_format(d.setime,'%Y%m%d') = date_format(a.estart,'%Y%m%d') then 1 else 0 end isselected
|
||||
from cminningscd a
|
||||
|
|
@ -1917,7 +1917,37 @@
|
|||
and a.remainPeople > 0-->
|
||||
order by a.estart
|
||||
</select>
|
||||
|
||||
|
||||
<select id="cm.cminningscds.applyedu.admin2" parameterClass="hashtable" resultClass="cminningscd">
|
||||
select a.*
|
||||
from (
|
||||
select
|
||||
a.cmisno,a.cmino,a.estart,a.eend,a.quota,a.cdt,a.udt,a.studyplace,a.studyplacename,a.startmonth
|
||||
,a.remainPeople
|
||||
,a.isselected
|
||||
,case when a.remainPeople <= 0 then 0 else 1 end isend
|
||||
from
|
||||
(
|
||||
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 in (1,2) and z.ischanged=0)) remainPeople
|
||||
,a.studyplace,case when c.scdtype =1 then '온라인' else e.cname end studyplacename
|
||||
,case when date_format(d.setime,'%Y%m%d') = date_format(a.estart,'%Y%m%d') then 1 else 0 end isselected
|
||||
from cminningscd a
|
||||
left outer join cminning c on c.cmino = a.cmino
|
||||
left outer join cm d on d.cmno = c.cmno
|
||||
left outer join comcode e on e.ccode = a.studyplace
|
||||
<dynamic prepend="where">
|
||||
<isNotNull property="cmno" prepend="and">c.cmno=#cmno#</isNotNull>
|
||||
</dynamic>
|
||||
)a
|
||||
<dynamic prepend="where">
|
||||
<isNotNull property="month" prepend="and">a.startmonth=#month#</isNotNull>
|
||||
</dynamic>
|
||||
) a
|
||||
<!--20220803
|
||||
and a.remainPeople > 0-->
|
||||
order by a.estart
|
||||
</select>
|
||||
<select id="cm.cminningscds.applyedu" parameterClass="hashtable" resultClass="cminningscd">
|
||||
select a.*
|
||||
from (
|
||||
|
|
@ -1935,7 +1965,7 @@
|
|||
from
|
||||
(
|
||||
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,case when c.scdtype =1 then '온라인' else e.cname end studyplacename
|
||||
,case when date_format(d.setime,'%Y%m%d') = date_format(a.estart,'%Y%m%d') then 1 else 0 end isselected
|
||||
,c.scdtype
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@
|
|||
order by a.rno
|
||||
|
||||
</select>
|
||||
<select id="grade.lectgradesToAll" parameterClass="hashtable" resultClass="lect">
|
||||
<select id="grade.lectgradesToAll_old" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,b.userno,b.payno
|
||||
|
|
@ -965,6 +965,358 @@
|
|||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.rno
|
||||
|
||||
</select>
|
||||
<select id="grade.lectgradesToAll" parameterClass="hashtable" resultClass="lect">
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,b.userno,b.payno
|
||||
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">c.cname,c.cmno,u.username</isNull> ) rno
|
||||
,count(a.lectno) over() pagetotalcount
|
||||
,b.isrebate
|
||||
,case when ppl.asname is not null then ppl.asname else ua.asname end asname
|
||||
,ppl.brno,ppl.ceoname,ppl.post,ppl.address1,ppl.address2,ppl.btype,ppl.bkind,ppl.eino,ppl.mname,ppl.association
|
||||
,CAST(AES_DECRYPT(UNHEX(ppl.mphone), <include refid="sql.digest"></include>) AS char) mphone
|
||||
,CAST(AES_DECRYPT(UNHEX(ppl.taxemail), <include refid="sql.digest"></include>) AS char) taxemail
|
||||
,u.username,u.userid,u.slevel,u.uduty
|
||||
,b.iscomplete,b.completetime,b.completeno,b.sdate,b.edate
|
||||
,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), <include refid="sql.digest"></include>) AS char) mobile
|
||||
,b.cmisno
|
||||
,p.payoktime,p.payamt
|
||||
,c.cshape,c.sstime,c.cmno,c.cname,c.classno,c.studytime
|
||||
,t.tyear
|
||||
,cg.cgname,cg.pcgno,pcg.cgname as pcgname
|
||||
,d.isoffabs
|
||||
,b.attrate
|
||||
,a.apoint
|
||||
,a.ex0cnt,a.ex0lectcnt,a.ex0lectpoint,a.mpoint
|
||||
,a.ex1cnt,a.ex1lectcnt,a.ex1lectpoint,a.fpoint
|
||||
,a.sd0cnt,a.sd0lectcnt,a.sd0lectpoint,a.spoint
|
||||
,a.sd1cnt,a.sd1lectcnt,a.sd1lectpoint,a.dpoint
|
||||
,a.rs0cnt,a.rs0lectcnt,a.rs0lectpoint
|
||||
,a.ispassat
|
||||
,e.sseq,e.estart,e.eend,e.studyplace
|
||||
,f.istatus
|
||||
,cc.cname studyplacename
|
||||
,tm.cname typemanname, te.cname typeeduname
|
||||
,tg.cname typegradename, tj.cname typejobname
|
||||
,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
|
||||
,CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), <include refid="sql.digest"></include>) AS char) as rbankaccnum
|
||||
from (
|
||||
select a.lectno
|
||||
,(b.attrate / 100) * (case when b.isrebate=1 then d.attendrfd else d.attend end / 100) * 100 apoint
|
||||
,a.ex0cnt,a.ex0lectcnt,a.ex0lectpoint,(a.ex0lectpoint / 100) * (case when b.isrebate=1 then d.midrfd else d.mid end / 100) * 100 mpoint
|
||||
,a.ex1cnt,a.ex1lectcnt,a.ex1lectpoint,(a.ex1lectpoint / 100) * (case when b.isrebate=1 then d.finalrfd else d.final end / 100) * 100 fpoint
|
||||
,a.sd0cnt,a.sd0lectcnt,a.sd0lectpoint,(a.sd0lectpoint / 100) * (case when b.isrebate=1 then d.subjectrfd else d.subject end / 100) * 100 spoint
|
||||
,a.sd1cnt,a.sd1lectcnt,a.sd1lectpoint,(a.sd1lectpoint / 100) * (case when b.isrebate=1 then d.discussrfd else d.discuss end / 100) * 100 dpoint
|
||||
,a.rs0cnt,a.rs0lectcnt,a.rs0lectpoint
|
||||
,case when case when b.isrebate=1 then d.attendcutrfd else d.attendcut end <= b.attrate then 1 else 0 end ispassa
|
||||
,case when case when b.isrebate=1 then d.midcutrfd else d.midcut end <= a.ex0lectpoint then 1 else 0 end ispassm
|
||||
,case when case when b.isrebate=1 then d.finalcutrfd else d.finalcut end <= a.ex1lectpoint then 1 else 0 end ispassf
|
||||
,case when case when b.isrebate=1 then d.subjectcutrfd else d.subjectcut end <= a.sd0lectpoint then 1 else 0 end ispasss
|
||||
,case when case when b.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 b.isrebate=1 then d.attendcutrfd else d.attendcut end <= b.attrate then 1 else 0 end =1 and
|
||||
case when case when b.isrebate=1 then d.midcutrfd else d.midcut end <= a.ex0lectpoint then 1 else 0 end =1 and
|
||||
case when case when b.isrebate=1 then d.finalcutrfd else d.finalcut end <= a.ex1lectpoint then 1 else 0 end =1 and
|
||||
case when case when b.isrebate=1 then d.subjectcutrfd else d.subjectcut end <= a.sd0lectpoint then 1 else 0 end =1 and
|
||||
case when case when b.isrebate=1 then d.discusscutrfd else d.discusscut end <= a.sd1lectpoint then 1 else 0 end =1 and
|
||||
case when case when b.isrebate=1 then d.cutrfd else d.cut end <=
|
||||
((b.attrate / 100) * (case when b.isrebate=1 then d.attendrfd else d.attend end / 100 * 100))
|
||||
+((a.ex0lectpoint / 100) * (case when b.isrebate=1 then d.midrfd else d.mid end / 100)* 100)
|
||||
+((a.ex1lectpoint / 100) * (case when b.isrebate=1 then d.finalrfd else d.final end / 100)* 100)
|
||||
+((a.sd0lectpoint / 100) * (case when b.isrebate=1 then d.subjectrfd else d.subject end / 100)* 100)
|
||||
+((a.sd1lectpoint / 100) * (case when b.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 a.lectno
|
||||
,sum(ex0cnt) ex0cnt,sum(ex0lectcnt) ex0lectcnt,sum(ex0lectpoint) ex0lectpoint
|
||||
,sum(ex1cnt) ex1cnt,sum(ex1lectcnt) ex1lectcnt,sum(ex1lectpoint) ex1lectpoint
|
||||
,sum(sd0cnt) sd0cnt,sum(sd0lectcnt) sd0lectcnt,sum(sd0lectpoint) sd0lectpoint
|
||||
,sum(sd1cnt) sd1cnt,sum(sd1lectcnt) sd1lectcnt,sum(sd1lectpoint) sd1lectpoint
|
||||
,sum(rs0cnt) rs0cnt,sum(rs0lectcnt) rs0lectcnt,sum(rs0lectpoint) rs0lectpoint
|
||||
,sum(at0cnt) at0cnt,sum(at0lectcnt) at0lectcnt
|
||||
from (
|
||||
select a.lectno
|
||||
,count(b.exno) ex0cnt,count(c.lectno) ex0lectcnt,avg(ifnull(c.tpoint,0) / b.tpoint * 100) ex0lectpoint
|
||||
,0 ex1cnt,0 ex1lectcnt,0 ex1lectpoint
|
||||
,0 sd0cnt,0 sd0lectcnt,0 sd0lectpoint
|
||||
,0 sd1cnt,0 sd1lectcnt,0 sd1lectpoint
|
||||
,0 rs0cnt,0 rs0lectcnt,0 rs0lectpoint
|
||||
,0 at0cnt,0 at0lectcnt
|
||||
from (
|
||||
select b.lectno,a.cmno
|
||||
from cm a
|
||||
inner join cm a2 on a.pcmno = a2.cmno
|
||||
inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0
|
||||
inner join users c on c.userno=b.userno and c.status=1
|
||||
inner join pay p on p.payno=b.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
where a.ismaster=0 and a.isdel=0
|
||||
<isNotNull property="usernamestr" prepend="and">c.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||
<isNotNull property="useridstr" prepend="and">c.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||
<isNotEmpty property="usernameid" prepend="and">(c.userid like concat('%',#usernameid#,'%') or c.username like concat('%',#usernameid#,'%') or c.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
|
||||
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
|
||||
|
||||
<isNotNull property="cmno" >and a.cmno = #cmno#</isNotNull>
|
||||
<isNotNull property="cname" >and a2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
) a
|
||||
left outer join cmex b on b.cmno=a.cmno and b.extype=0 and b.isdel=0
|
||||
left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno
|
||||
group by a.lectno
|
||||
|
||||
union all
|
||||
|
||||
select a.lectno
|
||||
,0,0,0
|
||||
,count(b.exno),count(c.lectno),avg(ifnull(c.tpoint,0) / b.tpoint * 100)
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0
|
||||
from (
|
||||
select b.lectno,a.cmno
|
||||
from cm a
|
||||
inner join cm a2 on a.pcmno = a2.cmno
|
||||
inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0
|
||||
inner join users c on c.userno=b.userno and c.status=1
|
||||
inner join pay p on p.payno=b.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
where a.ismaster=0 and a.isdel=0
|
||||
<isNotNull property="usernamestr" prepend="and">c.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||
<isNotNull property="useridstr" prepend="and">c.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||
<isNotEmpty property="usernameid" prepend="and">(c.userid like concat('%',#usernameid#,'%') or c.username like concat('%',#usernameid#,'%') or c.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
|
||||
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
|
||||
|
||||
<isNotNull property="cmno" >and a.cmno = #cmno#</isNotNull>
|
||||
<isNotNull property="cname" >and a2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
) a
|
||||
left outer join cmex b on b.cmno=a.cmno and b.extype=1 and b.isdel=0
|
||||
left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno
|
||||
group by a.lectno
|
||||
|
||||
union all
|
||||
|
||||
select a.lectno
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,count(b.sdno),count(c.lectno),avg(ifnull(c.cpoint,0) / b.tpoint * 100)
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0
|
||||
from (
|
||||
select b.lectno,a.cmno
|
||||
from cm a
|
||||
inner join cm a2 on a.pcmno = a2.cmno
|
||||
inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0
|
||||
inner join users c on c.userno=b.userno and c.status=1
|
||||
inner join pay p on p.payno=b.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
where a.ismaster=0 and a.isdel=0
|
||||
<isNotNull property="usernamestr" prepend="and">c.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||
<isNotNull property="useridstr" prepend="and">c.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||
<isNotEmpty property="usernameid" prepend="and">(c.userid like concat('%',#usernameid#,'%') or c.username like concat('%',#usernameid#,'%') or c.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
|
||||
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
|
||||
|
||||
<isNotNull property="cmno" >and a.cmno = #cmno#</isNotNull>
|
||||
<isNotNull property="cname" >and a2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
) a
|
||||
left outer join cmsd b on b.cmno=a.cmno and b.sdtype=0 and b.isdel=0
|
||||
left outer join lectsd c on c.lectno=a.lectno and c.sdno=b.sdno
|
||||
group by a.lectno
|
||||
|
||||
union all
|
||||
|
||||
select a.lectno
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,count(b.sdno),count(c.lectno),avg(ifnull(c.cpoint,0) / b.tpoint * 100)
|
||||
,0,0,0
|
||||
,0,0
|
||||
from (
|
||||
select b.lectno,a.cmno
|
||||
from cm a
|
||||
inner join cm a2 on a.pcmno = a2.cmno
|
||||
inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0
|
||||
inner join users c on c.userno=b.userno and c.status=1
|
||||
inner join pay p on p.payno=b.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
where a.ismaster=0 and a.isdel=0
|
||||
<isNotNull property="usernamestr" prepend="and">c.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||
<isNotNull property="useridstr" prepend="and">c.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||
<isNotEmpty property="usernameid" prepend="and">(c.userid like concat('%',#usernameid#,'%') or c.username like concat('%',#usernameid#,'%') or c.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
|
||||
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
|
||||
|
||||
<isNotNull property="cmno" >and a.cmno = #cmno#</isNotNull>
|
||||
<isNotNull property="cname" >and a2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
) a
|
||||
left outer join cmsd b on b.cmno=a.cmno and b.sdtype=1 and b.isdel=0
|
||||
left outer join lectsd c on c.lectno=a.lectno and c.sdno=b.sdno
|
||||
group by a.lectno
|
||||
|
||||
union all
|
||||
|
||||
select a.lectno
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,count(b.rsno),count(c.lectno),0
|
||||
,0,0
|
||||
from (
|
||||
select b.lectno,a.cmno
|
||||
from cm a
|
||||
inner join cm a2 on a.pcmno = a2.cmno
|
||||
inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0
|
||||
inner join users c on c.userno=b.userno and c.status=1
|
||||
inner join pay p on p.payno=b.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
where a.ismaster=0 and a.isdel=0
|
||||
<isNotNull property="usernamestr" prepend="and">c.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||
<isNotNull property="useridstr" prepend="and">c.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||
<isNotEmpty property="usernameid" prepend="and">(c.userid like concat('%',#usernameid#,'%') or c.username like concat('%',#usernameid#,'%') or c.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
|
||||
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
|
||||
|
||||
<isNotNull property="cmno" >and a.cmno = #cmno#</isNotNull>
|
||||
<isNotNull property="cname" >and a2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
) a
|
||||
left outer join cmrs b on b.cmno=a.cmno and b.rstype=0 and b.isdel=0
|
||||
left outer join lectrs c on c.lectno=a.lectno and c.rsno=b.rsno
|
||||
group by a.lectno
|
||||
|
||||
union all
|
||||
|
||||
select a.lectno
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,0,0,0
|
||||
,count(b.cmino),count(c.lectno)
|
||||
from (
|
||||
select b.lectno,a.cmno
|
||||
from cm a
|
||||
inner join cm a2 on a.pcmno = a2.cmno
|
||||
inner join lect b on b.cmno=a.cmno and b.status=1 and b.ischanged=0
|
||||
inner join users c on c.userno=b.userno and c.status=1
|
||||
inner join pay p on p.payno=b.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
where a.ismaster=0 and a.isdel=0
|
||||
<isNotNull property="usernamestr" prepend="and">c.username like concat('%',#usernamestr#,'%')</isNotNull>
|
||||
<isNotNull property="useridstr" prepend="and">c.userid like concat('%',#useridstr#,'%')</isNotNull>
|
||||
<isNotEmpty property="usernameid" prepend="and">(c.userid like concat('%',#usernameid#,'%') or c.username like concat('%',#usernameid#,'%') or c.usernameeng like concat('%',#usernameid#,'%')) </isNotEmpty>
|
||||
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.cmisno = #cmisno#</isNotNull> <isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when a.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
|
||||
<isNotNull property="studyplace" prepend="and">e.studyplace = #studyplace#</isNotNull>
|
||||
|
||||
<isNotNull property="cmno" >and a.cmno = #cmno#</isNotNull>
|
||||
<isNotNull property="cname" >and a2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when a.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when a.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
) a
|
||||
left outer join cminning b on b.cmno=a.cmno and b.isonline =0 and b.isscd = 1
|
||||
left outer join lectinning c on c.cmino=b.cmino and c.lectno = a.lectno and c.istatus = 2
|
||||
group by a.lectno
|
||||
) a
|
||||
group by a.lectno
|
||||
) a
|
||||
inner join lect b on b.lectno=a.lectno
|
||||
inner join cmev d on d.cmno=b.cmno
|
||||
) a
|
||||
inner join lect b on b.lectno=a.lectno
|
||||
inner join pay p on p.payno=b.payno
|
||||
inner join users u on u.userno=b.userno
|
||||
left outer join assign ua on ua.asno=u.asno
|
||||
inner join cm c on c.cmno=b.cmno
|
||||
inner join cm c2 on c2.cmno=c.pcmno
|
||||
inner join cmev d on d.cmno=c.cmno
|
||||
left outer join term t on t.tmno = c.tmno
|
||||
left outer join cg cg on cg.cgno = c.cgno
|
||||
left outer join cg pcg on pcg.cgno = cg.pcgno
|
||||
left outer join payitem pi on pi.payno = p.payno
|
||||
left outer join cminningscd e on e.cmisno = b.cmisno
|
||||
left outer join lectinning f on f.lectno = b.lectno and f.cmino = e.cmino
|
||||
left outer join comcode cc on cc.ccode = e.studyplace and cc.isuse=1
|
||||
left outer join pplog ppl on ppl.pplno = p.pplno
|
||||
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
|
||||
<dynamic prepend="where">
|
||||
<isNotNull property="cshape" prepend="and">c.cshape = #cshape#</isNotNull>
|
||||
<isNotNull property="studyplace" prepend="and">e.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">c2.cname like concat('%',#cname#,'%')</isNotNull>
|
||||
<isNotNull property="cnamestr" prepend="and">c.cname like concat('%',#cnamestr#,'%')</isNotNull>
|
||||
<isNotNull property="iscomplete" prepend="and">ifnull(b.iscomplete,0)=#iscomplete#</isNotNull>
|
||||
<isNotNull property="cmisno" prepend="and">b.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">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>
|
||||
<isNotEmpty property="sdateall" prepend="and">(case when c.cshape = 0 and b.isrebate = 0 then p.payoktime else b.sdate end) >= date_format(#sdateall#,'%Y-%m-%d 00:00:00')</isNotEmpty>
|
||||
<isNotEmpty property="edateall" prepend="and">(case when c.cshape = 2 then e.eend else b.edate end) <= date_format(#edateall#,'%Y-%m-%d 23:59:59')</isNotEmpty>
|
||||
<isNotNull property="asname" prepend="and">ua.asname like concat('%',#asname#,'%')</isNotNull>
|
||||
<isNotNull property="edate" prepend="and">date_format((case when c.cshape = 2 and e.eend is not null then e.eend else b.edate end),'%Y-%m-%d') = #edate#</isNotNull>
|
||||
<isNotNull property="mobile" prepend="and">cast(AES_DECRYPT(UNHEX(u.mobile), 'np123@!' ) as char) like concat('%',#mobile#,'%')</isNotNull>
|
||||
</dynamic>
|
||||
) a
|
||||
<include refid="sql.pagedynamic"></include>
|
||||
order by a.rno
|
||||
|
||||
</select>
|
||||
<update id="grade.lectcomplete.abs" parameterClass="hashtable">
|
||||
update lect set <include refid="sql.up"></include>
|
||||
|
|
|
|||
|
|
@ -1164,6 +1164,63 @@
|
|||
order by rand();-->
|
||||
|
||||
</update>
|
||||
|
||||
<update id="lect.reexam.manulset" parameterClass="hashtable">
|
||||
<!--update lectex set estart=null,eend=null,eip=null,tpoint=0,recount=recount+1,entercount=0,cblock=0 where lectno=#lectno# and exno=#exno#;-->
|
||||
<isNotEmpty property="qdiff">
|
||||
update cmexlayer
|
||||
set qcount=#qcount#
|
||||
where exno=#exno# and qdiff=#qdiff#;
|
||||
</isNotEmpty>
|
||||
|
||||
|
||||
lectno not in (
|
||||
select le.lectno
|
||||
from lectexq le
|
||||
inner join lect l on le.lectno = l.lectno
|
||||
inner join users u on l.userno = u.userno
|
||||
where le.exno = #exno#
|
||||
group by le.lectno, u.userid
|
||||
)
|
||||
|
||||
|
||||
|
||||
delete from lectexq where lectno=#lectno# and exno=#exno# and eqno in (
|
||||
select a.eqno
|
||||
from (
|
||||
select b.eqno
|
||||
from cmex a
|
||||
inner join lectexq b on b.lectno=#lectno# and b.exno=a.exno
|
||||
where a.exno=#exno# and a.eqtype=1
|
||||
) a
|
||||
);
|
||||
|
||||
insert into lectexq (lectno,exno,eqno,cpoint,dpoint,qseq,<include refid="sql.inc"></include>)
|
||||
select a.lectno,a.exno,a.eqno,0,a.rpoint,row_number() over(order by case when a.israndq=0 then a.qseq else rand() end),<include refid="sql.inv"></include>
|
||||
from (
|
||||
select a.*
|
||||
from (
|
||||
select a.lectno,a.exno,d.eqno,c.israndq,el.qcount,d.rpoint,d.qseq,rank() over(partition by el.qdiff,el.cc1,el.cc2,el.cc3,el.cc4,el.cc5 order by rand()) rank
|
||||
from (select #lectno# lectno, #exno# exno) a
|
||||
left outer join lectex b on b.lectno=a.lectno and b.exno=a.exno
|
||||
inner join cmex c on c.exno=a.exno and c.eqtype=1
|
||||
inner join cmexlayer el on el.exno=c.exno and el.qcount > 0
|
||||
inner join cmexq d on d.exno=el.exno
|
||||
inner join question e on e.qno=d.qno
|
||||
and e.qdiff=case when el.qdiff=0 then e.qdiff else el.qdiff end
|
||||
and e.cc1=case when el.cc1=0 then e.cc1 else el.cc1 end
|
||||
and e.cc2=case when el.cc2=0 then e.cc2 else el.cc2 end
|
||||
and e.cc3=case when el.cc3=0 then e.cc3 else el.cc3 end
|
||||
and e.cc4=case when el.cc4=0 then e.cc4 else el.cc4 end
|
||||
and e.cc5=case when el.cc5=0 then e.cc5 else el.cc5 end
|
||||
<!--where b.lectno is null-->
|
||||
) a
|
||||
where a.rank <= a.qcount
|
||||
) a
|
||||
order by rand()
|
||||
</update>
|
||||
|
||||
|
||||
<select id="lect.reexam.log" parameterClass="hashtable" resultClass="lectex">
|
||||
select a.*
|
||||
from (
|
||||
|
|
|
|||
|
|
@ -294,6 +294,7 @@ namespace NP.FO.Controllers
|
|||
}
|
||||
vm.BoardCMTs = Dao.Get<BoardCMT>("cr.lectsdboardcmt", vm.LectSDBoard.bno);
|
||||
return CView(vm);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue