<기능개선>

1. PMS NO : 
2. (주요)작업내용 
(1) 추가개발건(1) 완료
This commit is contained in:
jity7777 2022-03-16 01:23:00 +00:00
parent 5395b96686
commit db0d0c8d6a
10 changed files with 214 additions and 81 deletions

View File

@ -56,16 +56,17 @@
<div>
<div>
<ul>
<li id="lijob"><a href="javascript: schIpt('5', '63', '토목'); ">토목</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '64', '건축'); ">건축</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '65', '기계'); ">기계</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '66', '조경'); ">조경</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '67', '환경'); ">환경</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '68', '광업'); ">광업</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '69', '안전관리'); ">안전관리</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '70', '도시교통'); ">도시교통</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '71', '전기전자'); ">전기전자</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '72', '건설지원'); ">건설지원</a></li>
<li id="lijob63" name="typejob" data="토목"><a href="javascript: schIpt('5', '63', '토목'); " >토목</a></li>
<li id="lijob64" name="typejob" data="건축"><a href="javascript: schIpt('5', '64', '건축'); " >건축</a></li>
<li id="lijob65" name="typejob" data="기계"><a href="javascript: schIpt('5', '65', '기계'); " >기계</a></li>
<li id="lijob66" name="typejob" data="조경"><a href="javascript: schIpt('5', '66', '조경'); " >조경</a></li>
<li id="lijob67" name="typejob" data="환경"><a href="javascript: schIpt('5', '67', '환경'); " >환경</a></li>
<li id="lijob68" name="typejob" data="광업"><a href="javascript: schIpt('5', '68', '광업'); " >광업</a></li>
<li id="lijob69" name="typejob" data="안전관리"><a href="javascript: schIpt('5', '69', '안전관리'); " >안전관리</a></li>
<li id="lijob70" name="typejob" data="도시교통"><a href="javascript: schIpt('5', '70', '도시교통'); " >도시교통</a></li>
<li id="lijob71" name="typejob" data="전기전자"><a href="javascript: schIpt('5', '71', '전기전자'); " >전기전자</a></li>
<li id="lijob72" name="typejob" data="건설지원"><a href="javascript: schIpt('5', '72', '건설지원'); " >건설지원</a></li>
<li id="lijob83" name="typejob" data="품질관리"><a href="javascript: schIpt('5', '83', '품질관리'); " >품질관리</a></li>
</ul>
</div>
</div>
@ -107,7 +108,7 @@
<li id="lijob68"><a href="javascript: schIpt('6', '138', '화약류관리'); ">화약류관리</a></li>
<li id="lijob69"><a href="javascript: schIpt('6', '140', '건설안전'); ">건설안전</a></li>
<li id="lijob70"><a href="javascript: schIpt('6', '145', '교통'); ">교통</a></li>
<li id="lijob71"><a href="javascript: schIpt('6', '146', '철도신호.'); ">철도신호.</a></li>
<li id="lijob71"><a href="javascript: schIpt('6', '146', '철도신호'); ">철도신호</a></li>
<li id="lijob72"><a href="javascript: schIpt('6', '149', '건설 마케팅'); ">건설 마케팅</a></li>
<li id="lijob67"><a href="javascript: schIpt('6', '132', '수질관리'); ">수질관리</a></li>
<li id="lijob68"><a href="javascript: schIpt('6', '139', '광산보안'); ">광산보안</a></li>

View File

@ -15,7 +15,8 @@ namespace NP.BO.Controllers
{
public ActionResult lectreg(NP.Model.VMCM vm)
{
vm.ComCodes = GetComCodes("typeman,typeedu,typegrade,typejob,studyplace");
ViewBag.JobTypeItems = "typejob63,typejob64,typejob65,typejob66,typejob67,typejob68,typejob69,typejob70,typejob71,typejob72,typejob83";
vm.ComCodes = GetComCodes("typeman,typeedu,typegrade,typejob,studyplace," + ViewBag.JobTypeItems);
vm.IsAdmin = SUserInfo.IsAdmin;
vm.IsSiteAdmin = SUserInfo.IsSiteAdmin;
return View(vm);

View File

@ -101,7 +101,7 @@
+ r.typeedu + ":"
+ r.typegrade + ":"
+ r.typejob + ":"
+ r.typejob + ":"
+ r.typejobitem + ":"
+ r.isaccommodation + ":"
+ r.sssetermname + ":"
+ getint(r.accommofee)

View File

@ -1,4 +1,7 @@
@model NP.Model.VMCM
@{
string[] jobItems = ViewBag.JobTypeItems.ToString().Split(',');
}
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal">
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 개별등록<span class=""></span></strong></header>
@ -45,12 +48,18 @@
<div class="col-sm-8 col-md-10" id="div-typejobs">
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
<div class="form-group">
<label class="col-sm-4 col-md-2 control-label">전문분야</label>
<div class="col-sm-8 col-md-10" id="div-typejobitems">
</div>
</div>
<div class="div-isaccommodation" style="display:none;">
<div class="line line-dashed line-lg pull-in"></div>
<div class="form-group">
<label class="col-sm-4 col-md-2 control-label">합숙여부</label>
<div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "name", "isaccommodation" }, { "checked", 0} })
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "name", "isaccommodation" }, { "checked", 0 } })
</div>
</div>
</div>
@ -59,7 +68,7 @@
<div class="form-group">
<label class="col-sm-4 col-md-2 control-label">환급여부</label>
<div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:환급;0:비환급" }, { "name", "isrebate" }, { "checked", 1} })
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:환급;0:비환급" }, { "name", "isrebate" }, { "checked", 1 } })
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
@ -108,12 +117,12 @@
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
<div class="form-group">
<label class="col-sm-4 col-md-2 control-label">소속선택</label>
<div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "0:개인;1:업체" }, { "name", "iscompany" }, { "checked", 0} })
</div>
<div class="form-group">
<label class="col-sm-4 col-md-2 control-label">소속선택</label>
<div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "0:개인;1:업체" }, { "name", "iscompany" }, { "checked", 0 } })
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
<div id="olduser">
<div class="form-group">
@ -185,7 +194,12 @@
<script>
var cmboxtmno = 0;
var cmboxnotcmno = "";
$(document).ready(function () {
$("[name='typejob']").on("click", function () {
console.log("id : " + $(this).attr("id"))
});
$("input[name='ptype']").on("click", function () {
if ($(this).val() == "6") {
$("#payamt").val(0);
@ -256,19 +270,28 @@
$(".div-cmscd").show();
} else {
$(".div-isrebate").hide();
$(".div-cmscd").hide();
$(".div-cStringtringscJoind").hide();
}
var types = @Html.Raw(Json.Encode(Model.ComCodes.Select(s=> new { cgroup = s.cgroup, ccode = s.ccode, cname = s.cname})));
var typesJobItems = @Html.Raw(Json.Encode(@Model.ComCodes.Where(c => jobItems.Contains(c.cgroup)).Select(s => new { cgroup = s.cgroup, ccode = s.ccode, cname = s.cname })));
var typemans = v[11].split(",");
var typeedus = v[12].split(",");
var typegrades = v[13].split(",");
var typejobs = v[14].split(",");
var typejobsItems = v[15].split(",");
$("#div-typemans").html(radiohtml(types, typemans));
$("#div-typeedus").html(radiohtml(types, typeedus));
$("#div-typegrades").html(radiohtml(types, typegrades));
$("#div-typejobs").html(radiohtml(types, typejobs));
$("#div-typejobitems").html(radiohtml2(typesJobItems, typejobsItems));
//let htmlStr = ''
//for (let idx in typejobs) {
// htmlStr += '<input type='' typejobs[idx].cname
//}
var isaccommodation = v[16];
if (isaccommodation == 1) {
@ -277,18 +300,50 @@
$(".div-isaccommodation").hide();
}
}
function radiohtml2(types, ccodes) {
var html = "";
$.each(types, function (index, type) {
if (ccodes.indexOf(type.ccode.toString()) > -1) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' style='display:none' /><label style='vertical-align: sub;display:none;padding-right:7px' name='" + type.cgroup + "_names' for='" + type.cgroup + type.ccode + "' >&nbsp;" + type.cname + "</label>";
}
});
return html;
}
function radiohtml(types, ccodes) {
var html = "";
$.each(ccodes, function (index, ccode) {
$.each(types, function (index, type) {
if (type.ccode == ccode) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' /><label style='vertical-align: sub;' for='" + type.cgroup + type.ccode + "'>&nbsp;" + type.cname + "</label>&nbsp;";
return false;
}
$.each(types, function (index, type) {
if (type.cgroup == "typejob") {
if (type.ccode == ccode) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' onchange=\"jobItemView(this)\" /><label style='vertical-align: sub;' for='" + type.cgroup + type.ccode + "'>&nbsp;" + type.cname + "</label>&nbsp;";
return false;
}
}
else {
if (type.ccode == ccode) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' /><label style='vertical-align: sub;' for='" + type.cgroup + type.ccode + "'>&nbsp;" + type.cname + "</label>&nbsp;";
return false;
}
}
});
});
return html;
}
function jobItemView(obj) {
$("#div-typejobitems input:radio").css("display", "none")
$("#div-typejobitems label").css("display", "none")
let name = $(obj).attr("id")
$("[name='" + name + "']").css("display", "")
$("[name='" + name + "_names']").css("display", "")
}
function bindUser(vs) {
var v = vs.split(':');
setv("userid", v[7]);
@ -354,6 +409,7 @@
pplog.typeedu = getrv("typeedu");
pplog.typegrade = getrv("typegrade");
pplog.typejob = getrv("typejob");
pplog.typejobItem = getrv("typejob" + pplog.typejob);
pplog.cmisno = val("cmisno");
pplog.isaccommodation = getrv("isaccommodation");
pplog.isrebate = getrv("isrebate");
@ -364,6 +420,8 @@
pplog.userno = val("userno");
pplog.asno = val("asno");
capp("/acommon/lectreg", { ptype: getrv("ptype"), payamt: intval("payamt"), pplog: pplog }, "cbsave");
console.log(JSON.stringify(pplog))
}
}
function cbsave() {

View File

@ -625,10 +625,13 @@ namespace NP.Base.Controllers
result += "\t\t\t\t\t<ul>\n";
foreach (var item2 in items)
{
tempStr = "";
if (item == 4)
{
tempStr = "typejob" + item2.ccode;
item2.refcode = item2.ccode.ToString();
printCheck = true;
/*
tempCount = list.Where(c => c.cgroup == tempStr).Count();
if (tempCount > 0)
@ -639,7 +642,7 @@ namespace NP.Base.Controllers
{
printCheck = false;
}
*/
}
else
{
@ -648,7 +651,15 @@ namespace NP.Base.Controllers
if (printCheck)
{
result += "\t\t\t\t\t\t<li id=\"" + item2.cgroup.Replace("type", "li") + item2.refcode + "\"><a href=\"javascript: schIpt('" + (item + 1) + "', '" + item2.ccode + "', '" + item2.cname + "'); \">" + item2.cname + "</a></li>\n";
if(tempStr != "")
{
result += "\t\t\t\t\t\t<li id=\"" + item2.cgroup.Replace("type", "li") + item2.refcode + "\" name=\"typejob\" data=\"" + item2.cname + "\"><a href=\"javascript: schIpt('" + (item + 1) + "', '" + item2.ccode + "', '" + item2.cname + "'); \" >" + item2.cname + "</a></li>\n";
}
else
{
result += "\t\t\t\t\t\t<li id=\"" + item2.cgroup.Replace("type", "li") + item2.refcode + "\"><a href=\"javascript: schIpt('" + (item + 1) + "', '" + item2.ccode + "', '" + item2.cname + "'); \">" + item2.cname + "</a></li>\n";
}
}
}

View File

@ -543,7 +543,7 @@ namespace NP.Base.Controllers
int result = 0; // 0 이면 수강 가능, 그외 수강 불가
int userno = SUserInfo.UserNo;
string[] cgcodes = { "103", "104", "105" };
string[] edus = { "53", "54", "58" }; // 최초교육, 계속교육, 승급교육
string[] edus = { "53", "54", "58", "59", "60" }; // 최초교육, 계속교육, 승급교육
// 등급 59: 초급, 60: 중급, 61: 고급, 62: 특급
if (man == "51" && cgcodes.Contains(cgcode) && edus.Contains(edu))
{
@ -580,8 +580,23 @@ from lect t1
where t1.status = 1 and t4.pstatus= 1
and t3.cgcode = 103 -- and t1.userno=82 -- 82,5,31
*/
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu } });
rst = lectCount.First();
if((edu == "54" || edu == "58") && (grade == "61" || grade == "62")) // 계속교육, 승급교육 && 고급, 특급
{
var lectCount = Dao.Get<int>("lect.count.user2", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "grade", grade } });
rst = lectCount.First();
}
else if((cgcode == "103" || cgcode == "104") && edu == "53")
{
var lectCount = Dao.Get<int>("lect.count.user3", new Hashtable() { { "userno", userno } });
rst = lectCount.First();
}
else
{
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu } });
rst = lectCount.First();
}
}
result = rst == 0 ? 0 : 1;//

View File

@ -1927,11 +1927,36 @@
inner join cg t3 on t2.cgno= t3.cgno
inner join pay t4 on t1.payno = t4.payno
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
where t1.status = 1 and t4.pstatus= 1 and t3.cgcode = #cgcode#
where t1.status = 1 and t4.pstatus= 1
<isNotNull property="userno">and t1.userno = #userno#</isNotNull>
<isNotEmpty property="edu">
<isNotEqual property="edu" compareValue="53">and t5.typegrade in (61,62)</isNotEqual>
</isNotEmpty>
<isNotEmpty property="cgcode">
<isNotEqual property="cgcode" compareValue="105">and t3.cgcode in (103,104)</isNotEqual>
<Equal property="cgcode" compareValue="105">and t3.cgcode = 105</Equal>
</isNotEmpty>
</select>
<select id="lect.count.user2" parameterClass="hashtable" resultClass="int">
select count(t1.lectno) <!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
from lect t1
inner join cm t2 on t1.cmno = t2.cmno
inner join cg t3 on t2.cgno= t3.cgno
inner join pay t4 on t1.payno = t4.payno
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
where t1.status = 1 and t4.pstatus= 1 and t3.cgcode in (103,104,105) and t5.typegrade = #grade# and t5.typeedu = #edu#
and t1.userno = #userno#
</select>
<select id="lect.count.user3" parameterClass="hashtable" resultClass="int">
select count(t1.lectno) <!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
from lect t1
inner join cm t2 on t1.cmno = t2.cmno
inner join cg t3 on t2.cgno= t3.cgno
inner join pay t4 on t1.payno = t4.payno
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
where t1.status = 1 and t4.pstatus= 1 and t3.cgcode in (103,104) and t5.typeedu = 53
and t1.userno = #userno#
</select>
</statements>
</sqlMap>

View File

@ -762,13 +762,13 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>49399</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>https://ynicte.com</IISUrl>
<IISUrl>https://www.ynicte.com</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>True</UseCustomServer>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>https://ynicte.com</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>

View File

@ -368,7 +368,7 @@
function applyClass(cmno, pcmno) {
if (@ViewBag.SSUserNo > 0) {
checkLectComplete(cmno, "@Model.stringval3", "@Model.stringval5", "@Model.stringval5", $("#pcmno_" + pcmno + "_cgcode").val(), "chkLect");
checkLectComplete(cmno, "@Model.stringval3", "@Model.stringval4", "@Model.stringval5", $("#pcmno_" + pcmno + "_cgcode").val(), "chkLect");
}
else {
msg("로그인 후 신청 할 수 있습니다.");

View File

@ -301,7 +301,7 @@
if ($("#stringval4").val() == "") { msg("교육목적을 입력하세요."); $("#stringval4").focus(); return; }
if ($("#stringval5").val() == "") { msg("등급을 입력하세요."); $("#stringval5").focus(); return; }
if ($("#stringval6").val() == "") { msg("직무분야를 입력하세요."); $("#stringval6").focus(); return; }
if ($("#stringval7").val() == "") { msg("전문분야를 입력하세요."); $("#stringval6").focus(); return; }
if ($("#stringval7").val() == "" && $("#msSel6 div").css("display") != 'none') { msg("전문분야를 입력하세요."); $("#stringval6").focus(); return; }
}
else if ($("#stringval").val() == "1") {
if ($("#stringval2").val() == "") { msg("교육유형을 입력하세요."); $("#stringval2").focus(); return; }
@ -331,7 +331,7 @@
msg('교육목적을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel5') {
msg('등급을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel6') {
} else if ($(this).parent().attr('id') == 'msSel6' ) {
msg('전문분야를 선택해주세요.');
}
}
@ -341,7 +341,7 @@
}
});
function schIpt(num, code, name) {
let tempStr = "";
switch (num) {
case '1':
$('#msSel2 > span').text("기술인분류");
@ -378,7 +378,22 @@
$('.msSel > span').removeClass('on');
$('#msSel' + (Number(num) + 1)).removeClass('disable');
$('#msSel' + (Number(num) + 1)).addClass('active');
$('#msSel' + (Number(num) + 1) + ' > div').slideDown(300);
let tempCnt = 0;
$('#msSel' + (Number(num) + 1) + ' div ul li').each(function(){
if ($(this).css("display") != 'none') {
++tempCnt;
}
})
if (tempCnt > 0) {
$('#msSel' + (Number(num) + 1)).removeClass("disable")
$('#msSel' + (Number(num) + 1) + ' > div').slideDown(300);
}
else {
$('#msSel' + (Number(num) + 1)).addClass("disable")
}
if (num == 2) {
$("#liedu04").hide();
@ -402,14 +417,21 @@
$("#liedu04").show();
}
if (num == 2 && name == "품질관리기술인") {
$("#msSel5 li a").each(function (i, d) {
/*$("#msSel5 li a").each(function (i, d) {
if (d.text != "품질관리") {
var item = d.closest("li").id;
$("#" + item).hide();
//var item = d.closest("li").id;
$("#lijob" + code).hide();
}
});*/
$("#msSel5 li").each(function () {
$(this).hide();
});
$("[name='typejob'][data='품질관리']").show()
} else if (num == 2 && name != "품질관리기술인") {
$("#lijob11").hide();
$("#msSel5 li").each(function () {
$(this).show();
});
$("[name='typejob'][data='품질관리']").hide()
}
if (num == 3) {
@ -432,7 +454,7 @@
});
}
}
}// else if (num == 5 &&
}
function initSearch() {