교육운영>수료관리 페이지 추가 (중간저장)

This commit is contained in:
lch 2021-06-23 09:11:34 +00:00
parent 93dd5185c6
commit 3498031958
7 changed files with 949 additions and 4 deletions

View File

@ -675,12 +675,12 @@
<Content Include="Views\cm\cmregeduschedule.cshtml" />
<Content Include="Views\croom\cmstandbylects.cshtml" />
<Content Include="Views\croom\Documents.cshtml" />
<Content Include="Views\croom\documentspast.cshtml" />
<Content Include="Views\croom\asrpop.cshtml" />
<Content Include="Views\data\learns5.cshtml" />
<Content Include="Views\data\learns6.cshtml" />
<Content Include="Views\data\learns7.cshtml" />
<Content Include="Views\Shared\Partial\CMScdBox.cshtml" />
<Content Include="Views\croom\completions.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View File

@ -1003,6 +1003,62 @@ namespace NP.BO.Controllers
}
return View(vm);
}
public ActionResult completions(VMCRoom vm)
{
vm.Completions = InitM<Completion>();
vm.CGs = Dao.Get<CG>("cm.cgs", new System.Collections.Hashtable() { { "isuse", 1 }, { "isdel", 0 } });
vm.ComCodes = GetComCodes("typeman,typeedu,typegrade,typejob,studyplace");
vm.stringval8 = vm.stringval8 ?? DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01");
vm.stringval9 = vm.stringval9 ?? DateTime.Now.AddMonths(1).ToString("yyyy-MM-01");
var ht = SetHash(vm);
ht.Add("tyear", vm.stringval);
ht.Add("pcgno", vm.stringval2);
ht.Add("cgno", vm.stringval3);
ht.Add("cshape", vm.stringval4);
ht.Add("typeman", vm.stringval5);
ht.Add("studyplace", vm.stringval6);
ht.Add("typejob", vm.stringval7);
ht.Add("sdate", vm.stringval8);
ht.Add("edate", vm.stringval9);
ht.Add("typegrade", vm.stringval10);
ht.Add("typeedu", vm.stringval11);
vm.Completions = Dao.Get<Completion>("cr.completions", ht);
vm.pagetotalcount = GetCount(vm.Completions.FirstOrDefault());
foreach (var completion in vm.Completions)
{
completion.typeeduName = vm.ComCodes.Where(w=> w.ccode == completion.typeedu).FirstOrDefault()?.cname;
completion.typegradeName = vm.ComCodes.Where(w => w.ccode == completion.typegrade).FirstOrDefault()?.cname;
completion.typejobName = vm.ComCodes.Where(w => w.ccode == completion.typejob).FirstOrDefault()?.cname;
completion.typemanName = vm.ComCodes.Where(w => w.ccode == completion.typeman).FirstOrDefault()?.cname;
completion.studyplaceName = vm.ComCodes.Where(w => w.ccode == completion.studyplace).FirstOrDefault()?.cname;
}
if (vm.isexceldown == 1)
{
vm.Completions = Dao.Get<Completion>("cr.completions", ht);
foreach (var completion in vm.Completions)
{
completion.typeeduName = vm.ComCodes.Where(w => w.ccode == completion.typeedu).FirstOrDefault()?.cname;
completion.typegradeName = vm.ComCodes.Where(w => w.ccode == completion.typegrade).FirstOrDefault()?.cname;
completion.typejobName = vm.ComCodes.Where(w => w.ccode == completion.typejob).FirstOrDefault()?.cname;
completion.typemanName = vm.ComCodes.Where(w => w.ccode == completion.typeman).FirstOrDefault()?.cname;
completion.studyplaceName = vm.ComCodes.Where(w => w.ccode == completion.studyplace).FirstOrDefault()?.cname;
}
return ExportExcel(
new String[] { "교육상위분류","교육하위분류","교육유형","이름","주민번호","기술인분류","교육구분","교육목적","등급","직무분야","과정명","수료번호","업체명","업체주소","사업자등록번호",
"고용보험관리번호","업태","종목","대표자","교육시작일","교육종료일","교육이수시간","소속협회","학력","직위","교육생연락처","업체담당자","업체담당당자 연락처","교육비",
"환급액","환급은행명","환급계좌" ,"환급계좌예금주","계산서이메일","교육연도","교육장"},
new String[] { "pcgname", "cgname", "cshapename", "username", "userpnostr", "typemanName", "edukind", "typeeduName", "typegradeName", "typejobName", "cname", "completeno", "asname",
"companyaddr", "brno", "eino", "btype", "bkind", "ceoname", "sdateymd2","edateymd2","studytime","association","slevelName","uduty","mobile","mname","mphone",
"payamt","rbankamt","rbank","rbankaccnum","tbankuser","taxemail","tyear", "studyplaceName"},
vm.Completions,
"수료관리", null, ",0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,");
}
return View(vm);
}
}
}

View File

@ -0,0 +1,495 @@
@model NP.Model.VMCRoom
<form id="mform" method="post">
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
<div class="table-responsive">
<table class="table b-t b-light viewtable">
<colgroup>
<col style="width:15%" />
<col style="width:35%" />
<col style="width:15%" />
<col />
</colgroup>
<tbody id="searchtbody">
<tr>
<th>교육년도</th>
<td>
<div class="col-md-12">
<select id="stringval" name="stringval" class="form-control">
<option value="">-년도선택</option>
@for (int i = 2021; i <= DateTime.Now.Year; i++)
{
<option value="@i" @(Model.stringval == i.ToString() ? "selected" : "")>@(i)년</option>
}
</select>
</div>
</td>
<th>과정분류</th>
<td>
<div class="col-md-6">
@Html.Partial("./Partial/Select", Model.CGs.Where(w => w.pcgno == null), new ViewDataDictionary { { "name", "stringval2" }, { "selected", Model.stringval2 }, { "style", "width: 100%" }, { "df", ":-상위분류" } })
</div>
<div class="col-md-6">
@Html.Partial("./Partial/Select", Model.CGs.Where(w => w.pcgno != null && w.pcgno.ToString() == Model.stringval2), new ViewDataDictionary { { "name", "stringval3" }, { "selected", Model.stringval3 }, { "style", "width: 100%;" }, { "df", ":-분류" } })
</div>
</td>
</tr>
<tr>
<th>교육유형</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "1:교육장교육;2:온라인교육" }, { "name", "stringval4" }, { "selected", Model.stringval4 }, { "style", "width: 100%" }, { "df", ":-유형선택" } })
</div>
</td>
<th>기술인분류</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typeman"), new ViewDataDictionary { { "name", "stringval5" }, { "selected", Model.stringval5 }, { "style", "width: 100%" }, { "df", ":-기술인분류" } })
</div>
</td>
</tr>
<tr>
<th>교육장</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "studyplace"), new ViewDataDictionary { { "name", "stringval6" }, { "selected", Model.stringval6 }, { "style", "width: 100%" }, { "df", ":-교육장구분" } })
</div>
</td>
<th>직무분야</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typejob"), new ViewDataDictionary { { "name", "stringval7" }, { "selected", Model.stringval7 }, { "style", "width: 100%" }, { "df", ":-직무분야" } })
</div>
</td>
</tr>
<tr>
<th>학습기간</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval8) ? (DateTime?)null : Convert.ToDateTime(Model.stringval8), new ViewDataDictionary { { "name", "stringval8" } }) ~
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval9) ? (DateTime?)null : Convert.ToDateTime(Model.stringval9), new ViewDataDictionary { { "name", "stringval9" } })
</div>
</td>
<th>등급</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typegrade"), new ViewDataDictionary { { "name", "stringval10" }, { "selected", Model.stringval10 }, { "style", "width: 100%" }, { "df", ":-등급" } })
</div>
</td>
</tr>
<tr>
<th>검색단어</th>
<td>
<div class="col-md-4">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "username:이름;userpno:주민등록번호;completeno:수료번호;asname:업체명;brno:사업자등록번호" }, { "name", "searchtype" }, { "selected", Model.searchtype }, { "style", "width: 100%" }, { "df", ":-유형선택" } })
</div>
<div class="col-md-8">
@Html.Partial("./Partial/Text", Model.stringval12, Helpers.DicText(new NP.Model.TextDic() { Name = "searchtext", Value = Model.searchtext, PH = "단어를 입력하세요.", CssClass = "ff" }))
</div>
</td>
<th>교육목적</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typeedu"), new ViewDataDictionary { { "name", "stringval11" }, { "selected", Model.stringval11 }, { "style", "width: 100%" }, { "df", ":-교육목적" } })
</div>
</td>
</tr>
</table>
</div>
</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>
</div><br />
<div class="tar buttonbox">
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
</div>
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light" style="width:5000px">
<thead>
<tr>
<th>수정</th>
<th>교육상위분류</th>
<th>교육하위분류</th>
<th>교육유형</th>
<th>사용자ID</th>
<th>이름</th>
<th>주민번호</th>
<th>기술인분류</th>
<th>교육구분</th>
<th>교육목적</th>
<th>등급</th>
<th>직무분야</th>
<th>과정명</th>
<th>수료번호</th>
<th>업체명</th>
<th>업체주소</th>
<th>사업자등록번호</th>
<th>고용보험관리번호</th>
<th>업태</th>
<th>종목</th>
<th>대표자</th>
<th>교육시작일</th>
<th>교육종료일</th>
<th>교육이수시간</th>
<th>소속협회</th>
<th>학력</th>
<th>직위</th>
<th>교육생연락처</th>
<th>업체담당자</th>
<th>업체담당자연락처</th>
<th>교육비</th>
<th>환급액</th>
<th>환급은행명</th>
<th>환급계좌</th>
<th>환급계좌예금주</th>
<th>계산서이메일</th>
<th>교육연도</th>
<th>교육장</th>
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var item in Model.Completions)
{
<tr>
<td class="link"><a href="#" onclick="viewdocument(@item.lectno)">[수정]</a></td>
<td>@item.pcgname</td>
<td>@item.cgname</td>
<td>@item.cshapename</td>
<td>@item.userid</td>
<td>@item.username</td>
<td>@item.userpnostr</td>
<td>@item.typemanName</td>
<td>@item.edukind</td>
<td>@item.typeeduName</td>
<td>@item.typegradeName</td>
<td>@item.typejobName</td>
<td>@item.cname</td>
<td>@item.completeno</td>
<td>@item.asname</td>
<td>@item.companyaddr </td>
<td>@item.brno</td>
<td>@item.eino</td>
<td>@item.btype</td>
<td>@item.bkind</td>
<td>@item.ceoname</td>
<td>@Convert.ToDateTime(@item.sdate).ToShortDateString()</td>
<td>@Convert.ToDateTime(@item.edate).ToShortDateString()</td>
<td>@item.studytime</td>
<td>@item.association</td>
<td>@item.slevelName</td>
<td>@item.uduty</td>
<td>@item.mobile</td>
<td>@item.mname</td>
<td>@item.mphone</td>
<td>@item.payamt</td>
<td>@item.rbankamt</td>
<td>@item.rbank</td>
<td>@item.rbankaccnum</td>
<td>@item.tbankuser</td>
<td>@item.taxemail</td>
<td>@item.tyear</td>
<td>@item.studyplaceName</td>
</tr>
}
</tbody>
</table>
</div>
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
</section>
</form>
<div id="documentbox" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px;bottom: 30px; 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>
<input type="hidden" id="document_no" name="document.no" />
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col />
</colgroup>
<tr>
<th>과정분류</th>
<td>
</td>
<th>교육유형</th>
<td>
</td>
</tr>
<tr>
<th>이름</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.username", Style = "width:100%;" }))
</td>
<th>주민번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.userpno", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>기술인분류</th>
<td>
</td>
<th>교육구분</th>
<td>
</td>
</tr>
<tr>
<th>교육목적</th>
<td>
</td>
<th>등급</th>
<td>
</td>
</tr>
<tr>
<th>직무분야</th>
<td>
</td>
<th>과정명</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.cgname", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>수료번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.completeno", Style = "width:100%;" }))
</td>
<th>업체명</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.companyname", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>업체주소</th>
<td colspan="3">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.companyaddr", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>사업자등록번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.brno", Style = "width:100%;" }))
</td>
<th>고용보험관리번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.eino", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>업태</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.btype", Style = "width:100%;" }))
</td>
<th>종목</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.bkind", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>대표자</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.ceoname", Style = "width:100%;" }))
</td>
<th>교육일시작일</th>
<td>
@Html.Partial("./Partial/Date", null, new ViewDataDictionary { { "name", "document.ssdate" } })
</td>
</tr>
<tr>
<th>교육일종료일</th>
<td>
@Html.Partial("./Partial/Date", null, new ViewDataDictionary { { "name", "document.sedate" } })
</td>
<th>교육이수시간</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.sctime", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>소속협회</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.assign", Style = "width:100%;" }))
</td>
<th>학력</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.slevel", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>직위</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.uduty", Style = "width:100%;" }))
</td>
<th>교육생연락처</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.phone", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>업체담당자</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.mname", Style = "width:100%;" }))
</td>
<th>업체담당자연락처</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.mphone", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>교육비</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.sprice", Style = "width:100%;" }))
</td>
<th>환급액</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rprice", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>환급은행명</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rbank", Style = "width:100%;" }))
</td>
<th>환급계좌</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rbankno", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>환급계좌예금주</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rbankuser", Style = "width:100%;" }))
</td>
<th>계산서이메일</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.taxemail", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>교육연도</th>
<td>
</td>
<th>구분</th>
<td>
</td>
</tr>
</table>
<div class="findboxbtnbox" id="btnsave">
<a href="#" class="btn btn-primary" onclick="update();">수정</a>
</div>
</div>
@section scriptsHeader{
@Html.Partial("./Partial/ScriptDate")
}
@section scripts{
<script>
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");
});
});
var _bindcdnocid = "";
function bindcgno(id, cid) {
_bindcdnocid = cid;
$("#" + cid + " option:gt(0)").remove();
if ($("#" + id).val() != "") {
$.each(_cgs.split(';'), function (i, d) {
if (d.split(':')[0] == $("#" + id).val()) {
$("#" + _bindcdnocid).append("<option value=\"" + d.split(':')[1] + "\">" + d.split(':')[2] + "</option>");
}
});
}
}
function jsonDateToString(jsonDate) {
var date = new Date(parseInt(jsonDate.replace(/(^.*\()|([+-].*$)/g, '')));
var yyyy = String(date.getFullYear());
var MM = (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1) : String(date.getMonth() + 1);
var dd = date.getDate() < 10 ? "0" + date.getDate() : String(date.getDate());
return yyyy + "-" + MM + "-" + dd;;
}
function viewdocument(no) {
//capp("/acommon/DocumnetsPast", { no: no }, "cbviewdocument",null,null,true);
}
function cbviewdocument() {
if (capResult.code == 1000) {
for (key in capResult.obj) {
if (key == "ssdate" || key == "sedate") {
capResult.obj[key] = jsonDateToString(capResult.obj[key]);
} else if (key == "userpno") {
capResult.obj[key] = capResult.obj[key].substr(0, 6) + "-" + capResult.obj[key].substr(6);
}
$("#document_" + key).val(capResult.obj[key]);
}
bglayer(); $("#documentbox").slideDown("fast");
} else {
msgadmin2();
}
}
function update() {
if ($("#document_username").val() == "") {
$("#document_username").focus();
msg2("이름을 입력해주세요.");
} else if ($("#document_userpno").val() == "") {
$("#document_userpno").focus();
msg2("주민번호를 입력해주세요.");
} else if (!$.isNumeric($("#document_userpno").val().replace(/-/gi, "")) || $("#document_userpno").val().replace(/-/gi, "").length != 13) {
$("#document_userpno").focus();
msg2("잘못된 주민번호입니다.");
} else if (!$.isNumeric($("#document_brno").val())) {
$("#document_brno").focus();
msg2("사업자등록번호는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_eino").val())) {
$("#document_eino").focus();
msg2("고용보험관리번호는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_sctime").val())) {
$("#document_sctime").focus();
msg2("교육이수시간은 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_sprice").val())) {
$("#document_sprice").focus();
msg2("교육비는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_rprice").val())) {
$("#document_rprice").focus();
msg2("환급액은 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_rbankno").val())) {
$("#document_rbankno").focus();
msg2("환급계좌는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_syear").val())) {
$("#document_syear").focus();
msg2("교육년도는 숫자만 입력가능합니다.");
} else {
if (confirm("과거 증빙서류를 수정하시겠습니까??")) {
var data = {};
$.each($("#documentbox input, #documentbox select"), function () {
data[this.name.replace(/document./gi, "")] = this.value;
});
capp("/acommon/DocumnetsPastUpdate", data, "cbupdate");
}
}
}
function cbupdate() {
if (capResult.code == 1000) {
msgok(1, "", true);
submit("mform", 800, true);
} else {
msgadmin2();
}
}
</script>
}

View File

@ -173,8 +173,8 @@ create table users (
,vssn varchar(100)
,di varchar(100)
,ci varchar(100)
,ischkat TINYINT(4) NOT NULL DEFAULT 0,
,authplatform TINYINT(4) NOT NULL DEFAULT 0,
,ischkat TINYINT(4) NOT NULL DEFAULT 0
,authplatform TINYINT(4) NOT NULL DEFAULT 0
,primary key(userno));
create table errors (
@ -740,6 +740,7 @@ create table pplog (
,uduty varchar (20)
,slevel tinyint
,isaccommodation tinyint
,association VARCHAR(100) NULL DEFAULT NULL
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
,primary key(pplno));
@ -889,6 +890,7 @@ create table payitem (
,rbank varchar (50) null
,rbankaccnum varbinary (200) null
,tbankuser varchar (30) null
,rbankamt` INT(11) NOT NULL DEFAULT '0'
,fgno bigint
,cartno bigint
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL

View File

@ -3,6 +3,7 @@
<alias>
<typeAlias alias="document" type="NP.Model.document, NP.Model" />
<typeAlias alias="textvalue" type="NP.Model.textvalue, NP.Model" />
<typeAlias alias="completion" type="NP.Model.Completion, NP.Model" />
</alias>
<cacheModels>
<cacheModel id="croomCache" implementation="LRU" >
@ -1512,5 +1513,63 @@
from lectinningpage
where lectno = #lectno# and cmino = #cmino# and cpno = #cpno#
</select>
<select id="cr.completions" parameterClass="hashtable" resultClass="completion">
select a.*
from (
select
l.lectno,l.iscomplete,l.completetime,l.completeno,l.sdate,l.edate,l.cdt,l.cno,l.udt,l.uno,l.uip
,cm.cgno,cm.studytime,cm.cshape,cm.cname,cm.studyplace
,t.tyear
,cg.cgname,cg.pcgno
,pcg.cgname as pcgname
,u.userno,u.userid,u.username,u.uduty,u.slevel
,CAST(AES_DECRYPT(UNHEX(u.userpno), <include refid="sql.digest"></include>) AS char) as userpno
,CAST(AES_DECRYPT(UNHEX(u.mobile), <include refid="sql.digest"></include>) AS char) as mobile
,CAST(AES_DECRYPT(UNHEX(u.email), <include refid="sql.digest"></include>) AS char) as email
,pi.tbankuser as tbankuser,pi.rbank,pi.pino,pi.rbankamt
,CAST(AES_DECRYPT(UNHEX(pi.rbankaccnum), <include refid="sql.digest"></include>) AS char) as rbankaccnum
,p.payamt
,pp.pplno,pp.typeman,pp.typeedu,pp.typegrade,pp.typejob
,pp.asname,pp.post,pp.address1,pp.address2,pp.brno,pp.eino,pp.btype,pp.bkind,pp.ceoname,pp.mname,pp.association
,CAST(AES_DECRYPT(UNHEX(pp.mphone), <include refid="sql.digest"></include>) AS char) as mphone
,CAST(AES_DECRYPT(UNHEX(pp.taxemail), <include refid="sql.digest"></include>) AS char) as taxemail
,row_number() over(order by l.lectno desc) rno
,count(l.lectno) over() pagetotalcount
from lect l
left outer join cm cm on cm.cmno = l.cmno
left outer join term t on t.tmno=cm.tmno
left outer join cg cg on cg.cgno = cm.cgno
left outer join cg pcg on pcg.cgno = cg.pcgno
left outer join users u on u.userno = l.userno
left outer join pay p on p.payno = l.payno
left outer join payitem pi on pi.payno = p.payno
left outer join pplog pp on pp.pplno = p.pplno
where l.iscomplete = 1
<isNotNull property="sdate" prepend="and">l.sdate &gt;= #sdate#</isNotNull>
<isNotNull property="edate" prepend="and">l.edate &lt;= #edate#</isNotNull>
<isNotNull property="tyear" prepend="and">t.tyear=#tyear#</isNotNull>
<isNotNull property="cgno" prepend="and">cg.cgno=#cgno#</isNotNull>
<isNotNull property="pcgno" prepend="and">cg.pcgno=#pcgno#</isNotNull>
<isNotNull property="cshape" prepend="and">cm.cshape=#cshape#</isNotNull>
<isNotNull property="typeman" prepend="and">pp.typeman=#typeman#</isNotNull>
<isNotNull property="edukind" prepend="and">pp.edukind=#edukind#</isNotNull>
<isNotNull property="typeedu" prepend="and">pp.typeedu=#typeedu#</isNotNull>
<isNotNull property="typegrade" prepend="and">pp.typegrade=#typegrade#</isNotNull>
<isNotNull property="typejob" prepend="and">pp.typejob=#typejob#</isNotNull>
<isNotNull property="searchtype">
<isNotNull property="searchtext">
<isEqual property="searchtype" compareValue="username" prepend="and"> u.username like concat('%',#searchtext#,'%')</isEqual>
<isEqual property="searchtype" compareValue="userpno" prepend="and">
u.userpno = HEX(AES_ENCRYPT(replace(#searchtext#,'-',''), <include refid="sql.digest"></include>))
</isEqual>
<isEqual property="searchtype" compareValue="completeno" prepend="and"> l.completeno like concat('%',#searchtext#,'%')</isEqual>
<isEqual property="searchtype" compareValue="asname" prepend="and"> pp.asname like concat('%',#searchtext#,'%')</isEqual>
<isEqual property="searchtype" compareValue="brno" prepend="and"> pp.brno like concat('%',#searchtext#,'%')</isEqual>
</isNotNull>
</isNotNull>
) a
<include refid="sql.pagedynamic"></include>
order by a.rno
</select>
</statements>
</sqlMap>

View File

@ -3489,4 +3489,336 @@ namespace NP.Model
public int? termend { get; set; }
public int? peopleend { get; set; }
}
/// <summary>
/// 수료정보
/// </summary>
[Serializable]
public class Completion : BaseModel
{
/// <summary>
/// 수강키
/// </summary>
public Int64 lectno { get; set; }
/// <summary>
/// 수료여부 null:미처리,0:미수료,1:수료
/// </summary>
public int? iscomplete { get; set; }
/// <summary>
/// 수료여부명
/// </summary>
public String iscompletename
{
get
{
return iscomplete == 1 ? "수료" : iscomplete == 0 ? "미수료" : "-";
}
}
/// <summary>
/// 수료시간
/// </summary>
public DateTime? completetime { get; set; }
/// <summary>
/// 수료번호
/// </summary>
public String completeno { get; set; }
/// <summary>
/// 과정분류키
/// </summary>
public int cgno { get; set; }
/// <summary>
/// 과정분류명
/// </summary>
public String cgname { get; set; }
/// <summary>
/// 상위분류키
/// </summary>
public int pcgno { get; set; }
/// <summary>
/// 상위분류명
/// </summary>
public String pcgname { get; set; }
/// <summary>
/// 과정명
/// </summary>
public String cname { get; set; }
/// <summary>
/// 학습시간 단위: Hour
/// </summary>
public int studytime { get; set; }
/// <summary>
/// 학습장소
/// </summary>
public int studyplace { get; set; }
/// <summary>
/// 학습장소
/// </summary>
public string studyplaceName { get; set; }
/// <summary>
/// 강의유형 0: 온라인, 1: 교육장, 2: 혼합(온+오프)
/// </summary>
public int cshape { get; set; }
public String cshapename
{
get
{
return cshape == 0 ? "온라인" : cshape == 1 ? "교육장 교육" : cshape == 2 ? "온라인 교육" : "-";
}
}
/// <summary>
/// userno
/// </summary>
public String userno { get; set; }
/// <summary>
/// userid
/// </summary>
public String userid { get; set; }
/// <summary>
/// 이름
/// </summary>
public String username { get; set; }
/// <summary>
/// 주민번호
/// </summary>
public String userpno { get; set; }
public String userpnostr
{
get
{
return userpno != null && userpno.Length > 7 ? userpno.Insert(6, "-") : userpno;
}
}
/// <summary>
/// 교육생연락처
/// </summary>
public String mobile { get; set; }
/// <summary>
/// 교육생이메일
/// </summary>
public String email { get; set; }
/// <summary>
/// 소속협회
/// </summary>
public String association { get; set; }
/// <summary>
/// 학력
/// </summary>
public int slevel { get; set; }
/// <summary>
/// 학력명
/// </summary>
public String slevelName
{
get
{
string name = string.Empty;
switch (slevel)
{
case 0:
name = "기타";
break;
case 1:
name = "고졸";
break;
case 2:
name = "학사";
break;
case 3:
name = "석사";
break;
case 4:
name = "박사";
break;
default:
break;
}
//null,0:기타;1:고졸,2:학사;3:석사;4:박사
return name;
}
}
/// <summary>
/// 직위
/// </summary>
public String uduty { get; set; }
/// <summary>
/// 기술인분류
/// </summary>
public int typeman { get; set; }
/// <summary>
/// 교육구분
/// </summary>
public String edukind
{
get
{
return typeeduName == null ? "" : typeeduName.Contains("기본교육") ? "기본" : "전문";
}
}
/// <summary>
/// 교육목적
/// </summary>
public int typeedu { get; set; }
/// <summary>
/// 등급
/// </summary>
public int typegrade { get; set; }
/// <summary>
/// 직무분야
/// </summary>
public int typejob { get; set; }
/// <summary>
/// 기술인분류
/// </summary>
public String typemanName { get; set; }
/// <summary>
/// 교육목적
/// </summary>
public String typeeduName { get; set; }
/// <summary>
/// 등급
/// </summary>
public String typegradeName { get; set; }
/// <summary>
/// 직무분야
/// </summary>
public String typejobName { get; set; }
/// <summary>
/// 업체소속키
/// </summary>
public int asno { get; set; }
/// <summary>
/// 업체법인명
/// </summary>
public String asname { get; set; }
/// <summary>
/// 업체대표자명
/// </summary>
public String ceoname { get; set; }
/// <summary>
/// 업체사업자등록번호
/// </summary>
public String brno { get; set; }
/// <summary>
/// 업체고용보험관리번호
/// </summary>
public String eino { get; set; }
/// <summary>
/// 업체업태
/// </summary>
public String btype { get; set; }
/// <summary>
/// 업체종목
/// </summary>
public String bkind { get; set; }
/// <summary>
/// 업체우편번호
/// </summary>
public String post { get; set; }
/// <summary>
/// 업체주소
/// </summary>
public String address1 { get; set; }
/// <summary>
/// 업체상세주소
/// </summary>
public String address2 { get; set; }
/// <summary>
/// 업체주소
/// </summary>
public String companyaddr
{
get
{
return $"{post} {address1} {address2}";
}
}
/// <summary>
/// 업체담당자
/// </summary>
public String mname { get; set; }
/// <summary>
/// 업체담당자연락처
/// </summary>
public String mphone { get; set; }
/// <summary>
/// 계산서 이메일
/// </summary>
public String taxemail { get; set; }
/// <summary>
/// 교육시작일
/// </summary>
public DateTime? sdate { get; set; }
public String sdateymd
{
get
{
return sdate != null ? sdate.Value.ToString("yyyy-MM-dd") : null;
}
}
public String sdateymd2
{
get
{
return sdate != null ? sdate.Value.ToString("yyyyMMdd") : null;
}
}
/// <summary>
/// 교육시작일(엑셀매칭용)
/// </summary>
public string sdatestring { get; set; }
/// <summary>
/// 교육종료일
/// </summary>
public DateTime? edate { get; set; }
public String edateymd
{
get
{
return edate != null ? edate.Value.ToString("yyyy-MM-dd") : null;
}
}
public String edateymd2
{
get
{
return edate != null ? edate.Value.ToString("yyyyMMdd") : null;
}
}
/// <summary>
/// 교육종료일(엑셀매칭용)
/// </summary>
public string edatestring { get; set; }
/// <summary>
/// 교육비
/// </summary>
public String payamt { get; set; }
/// <summary>
/// 환급은행명
/// </summary>
public String rbank { get; set; }
/// <summary>
/// 환급계좌
/// </summary>
public String rbankaccnum { get; set; }
/// <summary>
/// 환급계좌예금주
/// </summary>
public String tbankuser { get; set; }
/// <summary>
/// 환급액
/// </summary>
public int rbankamt { get; set; }
/// <summary>
/// 교육연도
/// </summary>
public String tyear { get; set; }
/// <summary>
/// payitem.pino
/// </summary>
public Int64 pino { get; set; }
/// <summary>
/// pplog.pplno
/// </summary>
public Int64 pplno { get; set; }
}
}

View File

@ -58,5 +58,6 @@ namespace NP.Model
public IList<PayTax> PayTaxes2 { get; set; }
public IList<PayItem> PayTaxItem { get; set; }
public IList<Lect> Lects { get; set; }
public IList<Completion> Completions { get; set; }
}
}