<기능개선>
1. PMS NO : {4561}
2. (주요)작업내용
(1) Base/Controller/FOCommon.cs
- pcmno 파라메터 추가
(2) Dao/MyBatis/Maps/Lect.xml
- 조건 조회 쿼리 변경
(3) FO/Views/Course/SmartSearch.cshtml
- pcmno 파라메터 추가
This commit is contained in:
parent
bded65921f
commit
be128c7713
|
|
@ -538,7 +538,7 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult GetCheckLectIs(string man, string cgcode, string edu, string grade, int cmno)
|
public JsonResult GetCheckLectIs(string man, string cgcode, string edu, string grade, int cmno, int pcmno)
|
||||||
{
|
{
|
||||||
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
// 29:기본교육 ,30:최초교육 ,31:계속교육 ,32:안전관리계속교육(16시간) ,33:PQ가점교육 ,34:기타교육 ,35:승급교육
|
||||||
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
// 36:초급 ,37:중급 ,38:고급 ,39:특급
|
||||||
|
|
@ -592,17 +592,17 @@ where t1.status = 1 and t4.pstatus= 1
|
||||||
|
|
||||||
if ((edu == "31" || edu == "35") && (grade == "38" || grade == "39")) // 계속교육, 승급교육 && 고급, 특급
|
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 } });
|
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();
|
rst = lectCount.First();
|
||||||
}
|
}
|
||||||
else if((cgcode == "103" || cgcode == "104") && edu == "30") // 최초
|
else if((cgcode == "103" || cgcode == "104") && edu == "30") // 최초
|
||||||
{
|
{
|
||||||
var lectCount = Dao.Get<int>("lect.count.user3", new Hashtable() { { "userno", userno }, { "cmno", cmno } });
|
var lectCount = Dao.Get<int>("lect.count.user3", new Hashtable() { { "userno", userno }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
rst = lectCount.First();
|
rst = lectCount.First();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "cmno", cmno } });
|
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "cmno", cmno }, { "pcmno", pcmno } });
|
||||||
rst = lectCount.First();
|
rst = lectCount.First();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1968,7 +1968,9 @@
|
||||||
order by e.qno,e.qino
|
order by e.qno,e.qino
|
||||||
</select>
|
</select>
|
||||||
<select id="lect.count.user" parameterClass="hashtable" resultClass="int">
|
<select id="lect.count.user" parameterClass="hashtable" resultClass="int">
|
||||||
select count(t1.lectno) * (case when t2.pcmno = (select pcmno from cm where cmno=#cmno#) then -1 else 1 end) <!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
|
select max(lectCnt) * min(checkNum)
|
||||||
|
from (
|
||||||
|
select count(t1.lectno) as lectCnt, 1 as checkNum
|
||||||
from lect t1
|
from lect t1
|
||||||
inner join cm t2 on t1.cmno = t2.cmno
|
inner join cm t2 on t1.cmno = t2.cmno
|
||||||
inner join cg t3 on t2.cgno= t3.cgno
|
inner join cg t3 on t2.cgno= t3.cgno
|
||||||
|
|
@ -1983,10 +1985,19 @@
|
||||||
<isNotEqual property="cgcode" compareValue="105">and t3.cgcode in (103,104)</isNotEqual>
|
<isNotEqual property="cgcode" compareValue="105">and t3.cgcode in (103,104)</isNotEqual>
|
||||||
<Equal property="cgcode" compareValue="105">and t3.cgcode = 105</Equal>
|
<Equal property="cgcode" compareValue="105">and t3.cgcode = 105</Equal>
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
|
union
|
||||||
|
select 0 as lectCnt, (case when count(t1.lectno) > 0 then -1 else 1 end) as checkNum
|
||||||
|
from lect t1
|
||||||
|
inner join cm t2 on t1.cmno = t2.cmno
|
||||||
|
inner join cg t3 on t2.cgno= t3.cgno
|
||||||
|
where t2.isdel= 0 and t2.isuse= 1 and t2.ismaster = 0 and t1.userno = #userno# and t2.pcmno = #pcmno#
|
||||||
|
)t
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="lect.count.user2" parameterClass="hashtable" resultClass="int">
|
<select id="lect.count.user2" parameterClass="hashtable" resultClass="int">
|
||||||
select count(t1.lectno) * (case when t2.pcmno = (select pcmno from cm where cmno=#cmno#) then -1 else 1 end)<!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
|
select max(lectCnt) * min(checkNum)
|
||||||
|
from (
|
||||||
|
select count(t1.lectno) as lectCnt, 1 as checkNum
|
||||||
from lect t1
|
from lect t1
|
||||||
inner join cm t2 on t1.cmno = t2.cmno
|
inner join cm t2 on t1.cmno = t2.cmno
|
||||||
inner join cg t3 on t2.cgno= t3.cgno
|
inner join cg t3 on t2.cgno= t3.cgno
|
||||||
|
|
@ -1994,10 +2005,19 @@
|
||||||
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
|
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
|
||||||
where (t1.status = 1 or t1.status = 2) and (t4.pstatus= 1 or t4.pstatus=22) and t3.cgcode in (103,104,105) and t5.typegrade = #grade# and t5.typeedu = #edu#
|
where (t1.status = 1 or t1.status = 2) and (t4.pstatus= 1 or t4.pstatus=22) and t3.cgcode in (103,104,105) and t5.typegrade = #grade# and t5.typeedu = #edu#
|
||||||
and t1.userno = #userno# and t5.typeman = 28
|
and t1.userno = #userno# and t5.typeman = 28
|
||||||
|
union
|
||||||
|
select 0 as lectCnt, (case when count(t1.lectno) > 0 then -1 else 1 end) as checkNum
|
||||||
|
from lect t1
|
||||||
|
inner join cm t2 on t1.cmno = t2.cmno
|
||||||
|
inner join cg t3 on t2.cgno= t3.cgno
|
||||||
|
where t2.isdel= 0 and t2.isuse= 1 and t2.ismaster = 0 and t1.userno = #userno# and t2.pcmno = #pcmno#
|
||||||
|
)t
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="lect.count.user3" parameterClass="hashtable" resultClass="int">
|
<select id="lect.count.user3" parameterClass="hashtable" resultClass="int">
|
||||||
select count(t1.lectno) * (case when t2.pcmno = (select pcmno from cm where cmno=#cmno#) then -1 else 1 end)<!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
|
select max(lectCnt) * min(checkNum)
|
||||||
|
from (
|
||||||
|
select count(t1.lectno) as lectCnt, 1 as checkNum
|
||||||
from lect t1
|
from lect t1
|
||||||
inner join cm t2 on t1.cmno = t2.cmno
|
inner join cm t2 on t1.cmno = t2.cmno
|
||||||
inner join cg t3 on t2.cgno= t3.cgno
|
inner join cg t3 on t2.cgno= t3.cgno
|
||||||
|
|
@ -2005,6 +2025,13 @@
|
||||||
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
|
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
|
||||||
where (t1.status = 1 or t1.status = 2) and (t4.pstatus= 1 or t4.pstatus=22) and t3.cgcode in (103,104) and t5.typeedu = 30
|
where (t1.status = 1 or t1.status = 2) and (t4.pstatus= 1 or t4.pstatus=22) and t3.cgcode in (103,104) and t5.typeedu = 30
|
||||||
and t1.userno = #userno# and t5.typeman = 28
|
and t1.userno = #userno# and t5.typeman = 28
|
||||||
|
union
|
||||||
|
select 0 as lectCnt, (case when count(t1.lectno) > 0 then -1 else 1 end) as checkNum
|
||||||
|
from lect t1
|
||||||
|
inner join cm t2 on t1.cmno = t2.cmno
|
||||||
|
inner join cg t3 on t2.cgno= t3.cgno
|
||||||
|
where t2.isdel= 0 and t2.isuse= 1 and t2.ismaster = 0 and t1.userno = #userno# and t2.pcmno = #pcmno#
|
||||||
|
)t
|
||||||
</select>
|
</select>
|
||||||
</statements>
|
</statements>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@
|
||||||
|
|
||||||
function applyClass(cmno, pcmno) {
|
function applyClass(cmno, pcmno) {
|
||||||
if (@ViewBag.SSUserNo > 0) {
|
if (@ViewBag.SSUserNo > 0) {
|
||||||
checkLectComplete(cmno, "@Model.stringval3", "@Model.stringval4", "@Model.stringval5", $("#pcmno_" + pcmno + "_cgcode").val(), "chkLect");
|
checkLectComplete(cmno, "@Model.stringval3", "@Model.stringval4", "@Model.stringval5", $("#pcmno_" + pcmno + "_cgcode").val(), pcmno, "chkLect");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
msg("로그인 후 신청 할 수 있습니다.");
|
msg("로그인 후 신청 할 수 있습니다.");
|
||||||
|
|
@ -376,9 +376,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkLectComplete(cmno, man, edu, grade, cgcode) {
|
function checkLectComplete(cmno, man, edu, grade, cgcode, pcmno) {
|
||||||
_cmno = cmno;
|
_cmno = cmno;
|
||||||
capp("/focommon/GetCheckLectIs", { cmno: cmno, man: man, edu: edu, grade: grade, cgcode: cgcode }, "chkLect"); // 1
|
capp("/focommon/GetCheckLectIs", { cmno: cmno, man: man, edu: edu, grade: grade, cgcode: cgcode, pcmno: pcmno }, "chkLect"); // 1
|
||||||
@*capResult.code == code;*@
|
@*capResult.code == code;*@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue