diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs
index ed8b173..336d1cb 100644
--- a/Base/Controller/ACommonCRoom.cs
+++ b/Base/Controller/ACommonCRoom.cs
@@ -513,7 +513,6 @@ namespace NP.Base.Controllers
var cancelcount = 0;
foreach (var lect in lects)
{
- // #수료확인 #xodus 작업범위아님
var ispass = Dao.Get
("grade.ispass", new Hashtable() { { "lectno", lect.lectno } }).FirstOrDefault().ispass;
if (ispass == 1)
{
@@ -1818,11 +1817,26 @@ namespace NP.Base.Controllers
{
var result = Dao.Get("cm.cminningscds.applyedu.admin" + (scdallCheck > 0 ? "2" : ""), new System.Collections.Hashtable() { { "cmno", cmno } });
//var result = Dao.Get("cm.cminningscds.applyedu.admin", new System.Collections.Hashtable() { { "cmno", cmno } });
+
+ IList result2 = new List();
+ if (result.Count() > 0)
+ {
+ long cmino = result.First().cmino;
+ result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino } });
+ }
+
foreach (var item in result)
{
item.scdInfoSummary = string.Format("[{0}] {1}", item.studyplacename, item.estart.ToString("yyyy년 MM월 dd일 ddd요일 HH:mm"));
if (item.estart < DateTime.Now)
item.isEnd = true;
+
+ if(result2.Count() > 0)
+ {
+ item.intv1 = result2.Where(c => c.cmino == item.cmino && c.cmisno == item.cmisno && c.intv1 == 2).Count();
+ item.remainPeople += item.intv1;
+ }
+
}
if (iscmlects == 1)
diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs
index 8c1ad73..7f8ef8a 100644
--- a/Base/Controller/FOCommon.cs
+++ b/Base/Controller/FOCommon.cs
@@ -538,9 +538,17 @@ namespace NP.Base.Controllers
hsData.Add("studyplace", studyPlace);
var result = Dao.Get("cm.cminningscds.applyedu" + (lectno != null ? ".lectno" : ""), hsData);
+ IList result2 = new List();
+ if (result.Count() > 0)
+ {
+ long cmino = result.First().cmino;
+ result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino } });
+ }
+
hsData.Clear();
hsData.Add("cmno", cmno);
var resultTmp = Dao.Get("cm.cms", hsData).FirstOrDefault();
+
//var result = Dao.Get("cm.cminningscds.applyedu"+(lectno != null ? ".lectno" : ""), new System.Collections.Hashtable() { { "cmno", cmno },{"lectno",lectno }, { "month", (month == null) ? null : month } });
DateTime now = DateTime.Now;
result = result.Where(c => c.estart > now.AddYears(-1) && c.estart < now.AddYears(1)).ToList();
@@ -560,6 +568,12 @@ namespace NP.Base.Controllers
if (item.estart < Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")))
item.isEnd = true;
+
+ if (result2.Count() > 0)
+ {
+ item.intv1 = result2.Where(c => c.cmino == item.cmino && c.cmisno == item.cmisno && c.intv1 == 2).Count();
+ item.remainPeople += item.intv1;
+ }
}
return JsonBack(result);
@@ -659,9 +673,17 @@ where t1.status = 1 and t4.pstatus= 1
///
///
[HttpPost]
- public JsonResult CheckQtyScd(int cmisno)
+ public JsonResult CheckQtyScd(int cmno, int cmino, int cmisno)
{
var pass = Dao.Get("cm.cminningscdcheck", new System.Collections.Hashtable() { { "cmisno", cmisno }}).First();
+ IList result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino }, { "cmisno", cmisno } });
+
+ if(result2.Count() > 0)
+ {
+ int addPass = result2.Where(c => c.intv1 == 2).Count();
+ pass += addPass;
+ }
+
if (pass == 0)
{
return JsonBack(new JsonRtn() { code = 0, msg = "해당 일정은 모집 인원이 마감되었습니다." });
@@ -681,9 +703,21 @@ where t1.status = 1 and t4.pstatus= 1
///
///
[HttpPost]
- public JsonResult UpdateScd(int cmisno, int lectno)
+ public JsonResult UpdateScd(int cmno, int cmino, int cmisno, int lectno)
{
var pass = Dao.Get("cm.cminningscdcheck", new System.Collections.Hashtable() { { "cmisno", cmisno } }).First();
+
+ IList result2 = new List();
+
+ result2 = Dao.Get("cm.cminningscds.attr2Check", new System.Collections.Hashtable() { { "cmno", cmno }, { "cmino", cmino } });
+
+ if (result2.Count() > 0)
+ {
+ int tempInt = result2.Where(c => c.cmino == cmino && c.cmisno == cmisno && c.intv1 == 2).Count();
+ pass += tempInt;
+ }
+
+
if (pass == 0)
return JsonBack(new JsonRtn() { code = 0, msg = "해당 일정은 모집 인원이 마감되었습니다." });
else if (pass > 0)
diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml
index 3533cdb..6f1283e 100644
--- a/Dao/MyBatis/Maps/CM.xml
+++ b/Dao/MyBatis/Maps/CM.xml
@@ -1919,7 +1919,7 @@
and a.remainPeople > 0-->
order by a.estart
-
+
+
+
+
diff --git a/Dao/MyBatis/Maps/Grade.xml b/Dao/MyBatis/Maps/Grade.xml
index 84d3217..5bc74c2 100644
--- a/Dao/MyBatis/Maps/Grade.xml
+++ b/Dao/MyBatis/Maps/Grade.xml
@@ -20,27 +20,27 @@
,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 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 (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
+ (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
diff --git a/FO/Views/Course/ApplyPay.cshtml b/FO/Views/Course/ApplyPay.cshtml
index 6c4593f..55216c7 100644
--- a/FO/Views/Course/ApplyPay.cshtml
+++ b/FO/Views/Course/ApplyPay.cshtml
@@ -256,7 +256,7 @@
@Html.Partial("./Partial/ScriptDate")
}
-
+
diff --git a/FO/Views/My/LectureOn.cshtml b/FO/Views/My/LectureOn.cshtml
index 5e745ea..b07b544 100644
--- a/FO/Views/My/LectureOn.cshtml
+++ b/FO/Views/My/LectureOn.cshtml
@@ -117,7 +117,9 @@
$('#layermessage')
msg("■ 일정변경은 같은 교육과정에서만 가능합니다
- 일정변경 가능
설계시공 최초 전문B교육 -> 설계시공 최초 전문B교육
- 일정변경 불가
설계시공 최초 전문B교육 -> 설계시공 최초 전문A교육
■ 변경 할 일정이 접수마감 인 경우 해당 일정으로 변경이 불가능 합니다.");
}
- var vLectno;
+ var vLectno;
+ var _cmno = 0;
+ var _cmino = 0;
function pc(lectno,userno) {
if (lectno < 1) {
@@ -132,6 +134,7 @@
function openScd(cmno, lectno, cshape) {
vLectno = lectno
$(".mpgPop").show();
+ _cmno = cmno;
setScd(cmno, cshape);
}
function setScd(cmno, cshape) {
@@ -196,6 +199,10 @@
$.each(capResult.obj, function (i, d) {
var li = $("");
+ if (d.cmisno == 12763) {
+ var kk = "13";
+ }
+
if (dateStyle == "style2") {
d.scdInfoSummary = d.scdInfoSummary + "까지"
}
@@ -206,6 +213,9 @@
}
var pData = $("");
+ _cmno = d.cmno;
+ _cmino = d.cmino;
+
//var aApplyClass = $("", { "onclick": "javascript:applyClassEdu(" + d.cmno + ", " + d.pcmno + ", " + d.cmino + ", " + d.cmisno + ");" });
/*var spanApplyClass = $("", { "class": "smtlChkBtn smtlChk03", "style": "font-size:18px" });*/
/*var spanApplyClass = $("", { "style": "font-size:18px" });*/
@@ -231,12 +241,12 @@
if (d.isselected == 1) {
//spanApplyClass.text("수강신청");
//aApplyClass.append(spanApplyClass);
- pData.html("");
+ pData.html("" + strStudyPlacename + " [접수중] " + radioEduDay + " checked> " + d.scdInfoSummary + " (" + d.remainPeople + "명 남음)");
}
else {
//spanApplyClass.text("수강신청");
//aApplyClass.append(spanApplyClass);
- pData.html("" + strStudyPlacename + " [접수중] " + radioEduDay + "'> " + d.scdInfoSummary + " (" + d.remainPeople + "명 남음) " + "");
+ pData.html("" + strStudyPlacename + " [접수중] " + radioEduDay + "'> " + d.scdInfoSummary + " (" + d.remainPeople + "명 남음) " + "");
//pData.append(aApplyClass);
}
}
@@ -263,6 +273,8 @@
ulScd.append(li);
noDisPlay = false;
notContentsCheck = true;
+ _cmino = 0;
+ _cmno = 0;
}
li.append(pData);
@@ -275,6 +287,8 @@
li.append(" - 선택 가능한 교육종료일이 없습니다.");
ulScd.append(li);
notContentsCheck = true;
+ _cmino = 0;
+ _cmno = 0;
}
if (notContentsCheck) {
@@ -342,7 +356,7 @@
msg("선택한 일정이 없습니다.");
return;
}
- capp("/focommon/UpdateScd", { cmisno: cmisno, lectno: lectno }, "scdSave");
+ capp("/focommon/UpdateScd", { cmisno: cmisno, lectno: lectno, cmno: _cmno, cmino: _cmino }, "scdSave");
}
}
function scdSave() {
diff --git a/Model/BaseModel.cs b/Model/BaseModel.cs
index 9e26311..d6dfddd 100644
--- a/Model/BaseModel.cs
+++ b/Model/BaseModel.cs
@@ -164,9 +164,9 @@ namespace NP.Model
//public String fgkey { get; set; }
//public DateTime? date1 { get; set; }
//public DateTime? date2 { get; set; }
- //public int intv1 { get; set; }
- //public int intv2 { get; set; }
- //public int intv3 { get; set; }
+ public int intv1 { get; set; }
+ public int intv2 { get; set; }
+ public int intv3 { get; set; }
//public Int64? longv1 { get; set; }
//public Int64? longv2 { get; set; }
//public Int64? longv3 { get; set; }
diff --git a/Model/VMCM.cs b/Model/VMCM.cs
index 8a16af5..c3d8c41 100644
--- a/Model/VMCM.cs
+++ b/Model/VMCM.cs
@@ -22,6 +22,7 @@ namespace NP.Model
public IList CMInnings { get; set; }
public IList Books { get; set; }
public IList CMInningscds { get; set; }
+ public IList CMInningscds2 { get; set; }
public Book Book { get; set; }
public CMEV CMEV { get; set; }
public IList ESTs { get; set; }