6477 - 스마트검색 신규 작업본이 작용되지 않아야 하는 상황, 기존 작업물들로 롤백처리
This commit is contained in:
parent
b7651669a1
commit
6efe9f5036
|
|
@ -655,94 +655,259 @@ namespace NP.Base.Controllers
|
||||||
|
|
||||||
|
|
||||||
// pms: 5640 적용
|
// pms: 5640 적용
|
||||||
|
//public int CheckUserLect(string man, string cgcode, string edu, string grade, int cmno, int pcmno, long userno)
|
||||||
|
//{
|
||||||
|
// int result = 0; // 1:신청불가, 0:신청가능
|
||||||
|
// int rst = 0;
|
||||||
|
|
||||||
|
// string[] cgcodes = new string[0];
|
||||||
|
// string[] edus = new string[0];
|
||||||
|
|
||||||
|
// // 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
||||||
|
// // 36:초급 ,37:중급 ,38:고급 ,39:특급
|
||||||
|
// cgcodes = "102,103,104,105".Split(','); // 직무분야:(102), 역량강화:(103,104), 전문분야(105)
|
||||||
|
// edus = "30,31,35".Split(','); // 최초교육, 계속교육, 승급교육
|
||||||
|
|
||||||
|
// // man == 28 : 건설사업관리기술인(typeman)
|
||||||
|
// if (man == "28" && cgcodes.Contains(cgcode) && edus.Contains(edu))
|
||||||
|
// {
|
||||||
|
// switch(cgcode)
|
||||||
|
// {
|
||||||
|
// case "102": // 직무분야
|
||||||
|
// if(edu == "35" && (grade == "38" || grade == "39")) // 승급교육 && (고급 || 특급)
|
||||||
|
// {
|
||||||
|
// // '(역량강화 또는 전문분야) + 직무분야' 조건에 의하여 직무분야 1건이상 신청불가
|
||||||
|
// rst = Dao.Get<int>("lect.count.user6", new Hashtable() { { "userno", userno }, { "pcmno", pcmno } }).First();
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case "103": // 역량강화
|
||||||
|
// case "104":
|
||||||
|
// switch (edu)
|
||||||
|
// {
|
||||||
|
// case "30": // 최초교육
|
||||||
|
// // 1건이상 신청불가
|
||||||
|
// rst = Dao.Get<int>("lect.count.user5", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "grade", grade }, { "cmno", cmno }, { "pcmno", pcmno } }).First();
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case "31": // 계속교육
|
||||||
|
// if(grade == "36" || grade == "37") // 초급 || 중급
|
||||||
|
// {
|
||||||
|
// result = 1; // 신청불가
|
||||||
|
// }
|
||||||
|
// // 그외는 제한 없음
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case "35": // 승급교육
|
||||||
|
// if(grade == "38" || grade == "39")
|
||||||
|
// {
|
||||||
|
// // '(역량강화 또는 전문분야) + 직무분야' 조건에 의하여 역량강화 또는 전문분야중 1건이상 신청불가
|
||||||
|
// rst = Dao.Get<int>("lect.count.user6", new Hashtable() { { "userno", userno }, { "pcmno", pcmno } }).First();
|
||||||
|
// }
|
||||||
|
// // 그외는 제한 없음
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case "105": // 전문분야
|
||||||
|
// switch(edu)
|
||||||
|
// {
|
||||||
|
// case "30": // 최초교육
|
||||||
|
// result = 1; // 신청불가
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case "31": // 계속교육
|
||||||
|
// if (grade == "36" || grade == "37") // 초급 || 중급
|
||||||
|
// {
|
||||||
|
// result = 1; // 신청불가
|
||||||
|
// }
|
||||||
|
// // 그외는 제한 없음
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case "35": // 승급교육
|
||||||
|
// if (grade == "36" || grade == "37") // 초급 || 중급
|
||||||
|
// {
|
||||||
|
// result = 1; // 신청불가
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// // '(역량강화 또는 전문분야) + 직무분야' 조건에 의하여 역량강화 또는 전문분야중 1건이상 신청불가
|
||||||
|
// rst = Dao.Get<int>("lect.count.user6", new Hashtable() { { "userno", userno }, { "pcmno", pcmno } }).First();
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (result == 0)
|
||||||
|
// {
|
||||||
|
// //-1= 짧은문구, smartSearch에서 오류중 짧은문구 처리할 경우 -1를 곱하여 0이하값 만들어야함
|
||||||
|
// result = rst == 0 ? 0 : ((rst > 0) ? 1 : -1); //
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return result;
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
public int CheckUserLect(string man, string cgcode, string edu, string grade, int cmno, int pcmno, long userno)
|
public int CheckUserLect(string man, string cgcode, string edu, string grade, int cmno, int pcmno, long userno)
|
||||||
{
|
{
|
||||||
int result = 0; // 1:신청불가, 0:신청가능
|
int result = 0;
|
||||||
int rst = 0;
|
int rst = 0;
|
||||||
|
|
||||||
string[] cgcodes = new string[0];
|
string[] cgcodes = new string[0];
|
||||||
string[] edus = new string[0];
|
string[] edus = new string[0];
|
||||||
|
|
||||||
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
if (DateTime.Now > DateTime.Parse("2030-01-02 00:00"))// ### ty 2024년 추가건이나 현재 적용대기로 전달 받음
|
||||||
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
{
|
||||||
cgcodes = "102,103,104,105".Split(','); // 직무분야:(102), 역량강화:(103,104), 전문분야(105)
|
// ### ty 2024년 적용!!!
|
||||||
edus = "30,31,35".Split(','); // 최초교육, 계속교육, 승급교육
|
|
||||||
|
|
||||||
// man == 28 : 건설사업관리기술인(typeman)
|
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
||||||
if (man == "28" && cgcodes.Contains(cgcode) && edus.Contains(edu))
|
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
||||||
{
|
cgcodes = "103,104,105".Split(',');
|
||||||
switch(cgcode)
|
edus = "30,31,35,107,108".Split(','); // 최초교육, 계속교육, 승급교육
|
||||||
|
|
||||||
|
// man == 28 : 건설사업관리기술인(typeman)
|
||||||
|
if (man == "28" && cgcodes.Contains(cgcode) && edus.Contains(edu))
|
||||||
{
|
{
|
||||||
case "102": // 직무분야
|
// 계속교육(31)
|
||||||
if(edu == "35" && (grade == "38" || grade == "39")) // 승급교육 && (고급 || 특급)
|
if ((edu == "31" || edu == "107" || edu == "108") && (cgcode == "103" || cgcode == "104" || cgcode == "105") && (grade == "36" || grade == "37")) // 계속교육, (103 or 104 or 105), (초급 or 중급)
|
||||||
|
{
|
||||||
|
result = 1; // 신청불가
|
||||||
|
}
|
||||||
|
// 계속교육(31)
|
||||||
|
else if ((edu == "31" || edu == "107" || edu == "108") && (cgcode == "103" || cgcode == "104" || cgcode == "105") && (grade == "38" || grade == "39")) // 계속교육, (103 or 104 or 105), (고급 or 특급)
|
||||||
|
{
|
||||||
|
rst = 0; // 신청가능
|
||||||
|
}
|
||||||
|
// 최초교육(30)
|
||||||
|
else if (edu == "30" && cgcode == "105") // 최초교육, 전문분야(105)
|
||||||
|
{
|
||||||
|
result = 1; // 신청불가
|
||||||
|
}
|
||||||
|
// 승급교육(35)
|
||||||
|
else if (edu == "35" && cgcode == "105" && (grade == "36" || grade == "37")) // 최초교육, 전문분야(105), 36:초급 ,37:중급
|
||||||
|
{
|
||||||
|
result = 1; // 신청불가
|
||||||
|
}// 승급교육(35)
|
||||||
|
else if (edu == "35" && (cgcode == "103" || cgcode == "104") && (grade == "36" || grade == "37")) // 승급교육 , 103,104, 36:초급 ,37:중급
|
||||||
|
{
|
||||||
|
rst = 0; // 신청가능
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
// 갯수를 가져오기
|
||||||
|
/*
|
||||||
|
* 기본 설계 쿼리
|
||||||
|
select 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 = 103 -- and t1.userno=82 -- 82,5,31
|
||||||
|
|
||||||
|
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
||||||
|
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
||||||
|
*/
|
||||||
|
|
||||||
|
// "lect.count.user2" > 103,104,105
|
||||||
|
// "lect.count.user3" > 103,104
|
||||||
|
|
||||||
|
// 최초교육(30) , (103,104),
|
||||||
|
if (edu == "30" && (cgcode == "103" || cgcode == "104"))
|
||||||
{
|
{
|
||||||
// '(역량강화 또는 전문분야) + 직무분야' 조건에 의하여 직무분야 1건이상 신청불가
|
var lectCount = Dao.Get<int>("lect.count.user3", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "grade", grade }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
rst = Dao.Get<int>("lect.count.user6", new Hashtable() { { "userno", userno }, { "pcmno", pcmno } }).First();
|
rst = lectCount.First();
|
||||||
}
|
}
|
||||||
break;
|
// 승급교육(35), 38:고급 ,39:특급
|
||||||
|
else if (edu == "35" && (grade == "38" || grade == "39"))
|
||||||
case "103": // 역량강화
|
|
||||||
case "104":
|
|
||||||
switch (edu)
|
|
||||||
{
|
{
|
||||||
case "30": // 최초교육
|
var lectCount = Dao.Get<int>("lect.count.user2", new Hashtable() { { "userno", userno }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
// 1건이상 신청불가
|
rst = lectCount.First();
|
||||||
rst = Dao.Get<int>("lect.count.user5", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "grade", grade }, { "cmno", cmno }, { "pcmno", pcmno } }).First();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "31": // 계속교육
|
|
||||||
if(grade == "36" || grade == "37") // 초급 || 중급
|
|
||||||
{
|
|
||||||
result = 1; // 신청불가
|
|
||||||
}
|
|
||||||
// 그외는 제한 없음
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "35": // 승급교육
|
|
||||||
if(grade == "38" || grade == "39")
|
|
||||||
{
|
|
||||||
// '(역량강화 또는 전문분야) + 직무분야' 조건에 의하여 역량강화 또는 전문분야중 1건이상 신청불가
|
|
||||||
rst = Dao.Get<int>("lect.count.user6", new Hashtable() { { "userno", userno }, { "pcmno", pcmno } }).First();
|
|
||||||
}
|
|
||||||
// 그외는 제한 없음
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
|
|
||||||
case "105": // 전문분야
|
}
|
||||||
switch(edu)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
||||||
|
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
||||||
|
cgcodes = "103,104,105".Split(',');
|
||||||
|
edus = "30,31,35".Split(','); // 최초교육, 계속교육, 승급교육
|
||||||
|
|
||||||
|
// man == 28 : 건설사업관리기술인(typeman)
|
||||||
|
if (man == "28" && cgcodes.Contains(cgcode) && edus.Contains(edu))
|
||||||
|
{
|
||||||
|
// 계속교육(31)
|
||||||
|
if (edu == "31" && (cgcode == "103" || cgcode == "104") && (grade == "36" || grade == "37")) // 계속교육, (103 or 104), (초급 or 중급)
|
||||||
|
{
|
||||||
|
result = 1; // 신청불가
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 갯수를 가져오기
|
||||||
|
// 최초교육(30)
|
||||||
|
if (edu == "30" && cgcode == "105") // 최초교육 , 105
|
||||||
{
|
{
|
||||||
case "30": // 최초교육
|
rst = 0; // 신청가능
|
||||||
result = 1; // 신청불가
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "31": // 계속교육
|
|
||||||
if (grade == "36" || grade == "37") // 초급 || 중급
|
|
||||||
{
|
|
||||||
result = 1; // 신청불가
|
|
||||||
}
|
|
||||||
// 그외는 제한 없음
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "35": // 승급교육
|
|
||||||
if (grade == "36" || grade == "37") // 초급 || 중급
|
|
||||||
{
|
|
||||||
result = 1; // 신청불가
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// '(역량강화 또는 전문분야) + 직무분야' 조건에 의하여 역량강화 또는 전문분야중 1건이상 신청불가
|
|
||||||
rst = Dao.Get<int>("lect.count.user6", new Hashtable() { { "userno", userno }, { "pcmno", pcmno } }).First();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
// 계속교육(31)
|
||||||
|
else if (edu == "31" && cgcode == "105" && (grade == "36" || grade == "37")) // 계속교육, 105, (초급 or 중급)
|
||||||
|
{
|
||||||
|
rst = 0; // 신청가능
|
||||||
|
}
|
||||||
|
// 승급교육(35)
|
||||||
|
else if (edu == "35" && (cgcode == "103" || cgcode == "104" || cgcode == "105") && (grade == "36" || grade == "37")) // 승급교육, (103 or 104 or 105), (초급 or 중급)
|
||||||
|
{
|
||||||
|
rst = 0; // 신청가능
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* 기본 설계 쿼리
|
||||||
|
select 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 = 103 -- and t1.userno=82 -- 82,5,31
|
||||||
|
|
||||||
|
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
||||||
|
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
||||||
|
*/
|
||||||
|
// "lect.count.user2" > 103,104,105
|
||||||
|
// "lect.count.user3" > 103,104
|
||||||
|
if ((edu == "31" || edu == "35") && (grade == "38" || grade == "39")) // 계속교육, 승급교육 && 고급, 특급
|
||||||
|
{
|
||||||
|
var lectCount = Dao.Get<int>("lect.count.user2", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "grade", grade }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
|
rst = lectCount.First();
|
||||||
|
}
|
||||||
|
else if ((cgcode == "103" || cgcode == "104") && edu == "30") // 최초
|
||||||
|
{
|
||||||
|
var lectCount = Dao.Get<int>("lect.count.user3", new Hashtable() { { "userno", userno }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
|
rst = lectCount.First();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
|
rst = lectCount.First();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
{
|
{
|
||||||
//-1= 짧은문구, smartSearch에서 오류중 짧은문구 처리할 경우 -1를 곱하여 0이하값 만들어야함
|
//-1= 짧은 문구
|
||||||
result = rst == 0 ? 0 : ((rst > 0) ? 1 : -1); //
|
result = rst == 0 ? 0 : ((rst > 0) ? 1 : -1); //
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -750,6 +915,7 @@ namespace NP.Base.Controllers
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int CheckUserLectOld_backukp241007(string man, string cgcode, string edu, string grade, int cmno, int pcmno, long userno)
|
public int CheckUserLectOld_backukp241007(string man, string cgcode, string edu, string grade, int cmno, int pcmno, long userno)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
|
||||||
|
|
@ -362,6 +362,7 @@
|
||||||
msg("로그인 후 진행 할 수 있습니다.", null, null, null, "location.href='" + '/Account/Index' + "'");
|
msg("로그인 후 진행 할 수 있습니다.", null, null, null, "location.href='" + '/Account/Index' + "'");
|
||||||
return;
|
return;
|
||||||
}*@
|
}*@
|
||||||
|
|
||||||
if ($("#liTab1").hasClass("current")) {
|
if ($("#liTab1").hasClass("current")) {
|
||||||
$("#stringval").val("0");
|
$("#stringval").val("0");
|
||||||
}
|
}
|
||||||
|
|
@ -396,12 +397,17 @@
|
||||||
let sch2 = $("#sch2").val();
|
let sch2 = $("#sch2").val();
|
||||||
let sch3 = $("#sch3").val();
|
let sch3 = $("#sch3").val();
|
||||||
let sch4 = $("#sch4").val();
|
let sch4 = $("#sch4").val();
|
||||||
if (sch2 == "28" && (sch3 == "31" || sch3 == "35") && (sch4 == "38" || sch4 == "39")) {
|
|
||||||
addConfirm(sch3)
|
|
||||||
}
|
// 2025-02-26 아래 주석은 추후에 해제 할 수 있음 현재는 msg() 만 보임
|
||||||
else {
|
//if (sch2 == "28" && (sch3 == "31" || sch3 == "35") && (sch4 == "38" || sch4 == "39")) {
|
||||||
msg("<span style=\"font-size: 16pt;\">지금 입력하신 신청 정보에 맞는 교육과정들이 검색 되었습니다.<br><br>다음페이지에 검색된 교육과정이 확인됩니다.</span>", null, null, null, "goToCoursePage()");
|
// addConfirm(sch3)
|
||||||
}
|
//}
|
||||||
|
//else {
|
||||||
|
// msg("<span style=\"font-size: 16pt;\">지금 입력하신 신청 정보에 맞는 교육과정들이 검색 되었습니다.<br><br>다음페이지에 검색된 교육과정이 확인됩니다.</span>", null, null, null, "goToCoursePage()");
|
||||||
|
//}
|
||||||
|
|
||||||
|
msg("<span style=\"font-size: 16pt;\">지금 입력하신 신청 정보에 맞는 교육과정들이 검색 되었습니다.<br><br>다음페이지에 검색된 교육과정이 확인됩니다.</span>", null, null, null, "goToCoursePage()");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.msSel span').click(function () {
|
$('.msSel span').click(function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue