diff --git a/BO/BO.csproj b/BO/BO.csproj index 4dbb2d4..89c0b2f 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -671,6 +671,7 @@ + diff --git a/BO/Controllers/croomController.cs b/BO/Controllers/croomController.cs index 8ae54e4..1dfb413 100644 --- a/BO/Controllers/croomController.cs +++ b/BO/Controllers/croomController.cs @@ -133,6 +133,7 @@ namespace NP.BO.Controllers { //검색조건 var ht = new System.Collections.Hashtable() { { "cmno", vm.intval} }; + ht.Add("isready", 0); //0:신청중; 2:수강중; 3:수강취소 //0:결제대기; 1:입금대기; 2:결제완료; 3:결제취소; 4:환불신청; 5:부분환불; 6:전액환불 if (vm.addstringval == "8") @@ -181,6 +182,49 @@ namespace NP.BO.Controllers } return View(vm); } + public ActionResult cmstandbylects(VMCM vm) + { + //대기승인 시점으로부터 48시간이 지났음에도 '결제대기' 상태일 경우 취소처리 + Dao.Save("lect.drop2day", new System.Collections.Hashtable() { { "cmno", vm.intval }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }); + + vm.CM = Dao.Get("cm.cm", new System.Collections.Hashtable() { { "cmno", vm.intval } }).First(); + vm.pagerowcount = 100; + var ht = SetHash(vm); + ht.Add("cmno", vm.CM.cmno); + ht.Add("isready", 1); + //0:신청중; 2:수강중; 3:수강취소 + //0:결제대기; 1:입금대기; 2:결제완료; 3:결제취소; 4:환불신청; 5:부분환불; 6:전액환불 + if (vm.addstringval == "4") + { + ht.Add("statusin", "0,2,4"); + } + else if (vm.addstringval == "5") + { + ht.Add("statusin", "5,8,9"); + } + else + { + ht.Add("status", vm.addstringval); + } + ht.Add("paystatusnotin", "0,42,66"); + switch (vm.addstringval2) + { + case "0": ht.Add("paystatus", 21); break; + case "1": ht.Add("paystatus", 22); break; + case "2": ht.Add("paystatus", 1); ht.Add("rstatus", 0); break; + case "3": ht.Add("paystatus", 41); break; + case "4": ht.Add("refundcall", 1); break; + case "5": ht.Add("rstatus", 1); break; + case "6": ht.Add("rstatus", 2); break; + case "7": ht.Add("paystatus", 53); break; + + default: break; + } + vm.Lects = Dao.Get("lect.lects", ht); + vm.pagetotalcount = GetCount(vm.Lects.FirstOrDefault()); + + return View(vm); + } public ActionResult cmlectattprint(VMCM vm) { ViewBag.PopupMenuName = "출석부출력"; diff --git a/BO/Views/croom/cmlects.cshtml b/BO/Views/croom/cmlects.cshtml index 631a6ac..0ecc335 100644 --- a/BO/Views/croom/cmlects.cshtml +++ b/BO/Views/croom/cmlects.cshtml @@ -13,9 +13,32 @@ @(Model.CM.rsrename) / @(Model.CM.sssename) (@(Model.CM.ssseterm)일) +
+ +
+ @(Model.CM.quotastr) +
+
+
+ +
+ @(Model.CM.countlect)명 +
+
+
+ +
+ @(Model.CM.countstandby)명 +
+
- +
신청자 명단
@@ -55,7 +78,7 @@ @d.rnorvt @d.asname @(d.cnoname)(@d.cnoid) - @d.username@Html.Raw(string.IsNullOrEmpty(d.fileurl)?"": (" ")) + @d.username@Html.Raw(string.IsNullOrEmpty(d.fileurl)?"": (" ")) @d.cdtymd @d.statusname @d.pstatusname @@ -76,17 +99,17 @@ - + @**@ - - @if(Model.CM.cgno != 10) + + @*@if(Model.CM.cgno != 10) { - } + }*@ - + @**@ - + @**@
고객사
사업장과의관계
사업장과의관계
이름(ID)
직위/부서
직위
공정거래업무경력
이메일
회사전화번호
회사전화번호
휴대전화번호
연합회 교육이력
연합회 교육이력
경력증명서
심사여부@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "3:신청중;4:승인;5:미승인" }, { "checked", 3 }, { "name", "status" } })
@@ -149,7 +172,7 @@ $("#asname").text(ds[0]); $("#assignuser").text(ds[8]); $("#usernameid").text(ds[1] + "(" + ds[2] + ")"); - $("#positiondepart").text(ds[3] + " / " + ds[4]); + $("#positiondepart").text(ds[3]); $("#ckfcfyear").text(ds[9]); $("#email").text(ds[5]); $("#telno").text(ds[6]); diff --git a/BO/Views/croom/lectcms.cshtml b/BO/Views/croom/lectcms.cshtml index bb07793..9248639 100644 --- a/BO/Views/croom/lectcms.cshtml +++ b/BO/Views/croom/lectcms.cshtml @@ -41,7 +41,9 @@ 유형 강좌명 신청기간 - (전체신청인원/완료/입금대기/결제대기) + 제한인원 + 수강인원 + @*(전체신청인원/완료/입금대기/결제대기)*@ @@ -55,7 +57,9 @@ @d.cshapename @d.cnameclassno @d.rsrename - @string.Format("( {0} / {1} / {2} / {3} )", d.countlect.ToString("#,0"),d.countsuccess.ToString("#,0"),d.countstanbydraw.ToString("#,0"),d.countstanbypay.ToString("#,0")) + @d.quotastr + @d.countsuccess + @*@string.Format("( {0} / {1} / {2} / {3} )", d.countlect.ToString("#,0"),d.countsuccess.ToString("#,0"),d.countstanbydraw.ToString("#,0"),d.countstanbypay.ToString("#,0"))*@ } diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index 6a1397f..8f643f9 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -31,6 +31,37 @@ namespace NP.Base.Controllers return JsonOK(Dao.Save("lect.status", new Hashtable() { { "lectno", lectno }, { "status", status }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } [HttpPost] + public JsonResult LectStatus3(Int64 lectno, int status, int pstatus) + { + if (pstatus == 1) + { + return JsonBack(new JsonRtn() { code = -1 }); + } + return JsonOK(Dao.Save("lect.status3", new Hashtable() { { "lectno", lectno }, { "status", status }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); + } + [HttpPost] + public JsonResult LectStatus2(string lectnos, int status, string cname, string emailinfos) + { + int rtn = Dao.Save("lect.status2", new Hashtable() { { "lectnos", lectnos }, { "status", status }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }); + + if (rtn > 0 && status == 4 && !string.IsNullOrEmpty(emailinfos)) + { + string[] mails = emailinfos.Split(','); + foreach (var item in mails) + { + var masteremail = GetConfig("masteremail"); + var senderemail = masteremail.Split(';')[0]; + if (!string.IsNullOrEmpty(item.Split(':')[1])) + { + string[] mailContents = { item.Split(':')[0], cname, DateTime.Now.ToString("yyyy-MM-dd hh:mm") }; + SendMailTemplate("2", senderemail, "영남건설기술교육원", item.Split(':')[1], "[영남건설기술교육원]대기중인 강좌의 수강승인 처리안내", mailContents, null, null); + } + } + } + + return JsonOK(rtn); + } + [HttpPost] public JsonResult CMForChange(int cmno) { return JsonBack(Dao.Get("lect.cmforchange", cmno)); @@ -927,5 +958,6 @@ namespace NP.Base.Controllers { return JsonOK(Dao.Save("lect.completetime.change", new Hashtable() { { "lectno", lectno }, { "completetime", completetime }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } + } } \ No newline at end of file diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 1b209c5..6e4e4c1 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -171,15 +171,25 @@ order by a.rno diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index a0a02eb..d9d541f 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -89,16 +89,16 @@ order by b.username select b.cmno,b.cname,b.classno,b.cshape ,t.tyear,t.tseq @@ -1327,6 +1359,20 @@ ) a + + update pay a + inner join lect b on b.payno = a.payno and b.cmno = #cmno# and b.ischanged=0 and ifnull(b.isready,0) = 1 and b.status = 4 and DATE_ADD(b.oktime, INTERVAL 2 DAY) < + set a.pstatus = 52, a.udt = now(), a.uno = #uno#, a.uip = #uip#; + + update payitem a + inner join pay b on b.payno = a.payno and b.pstatus = 52 + inner join lect c on c.payno = b.payno and c.cmno = #cmno# and c.ischanged=0 and ifnull(c.isready,0) = 1 and c.status = 4 and DATE_ADD(c.oktime, INTERVAL 2 DAY) < + set a.pstatus = b.pstatus, a.udt = now(), a.uno = #uno#, a.uip = #uip#; + + update lect + set status = 5, oktime = now(), udt = now(), uno = #uno#, uip = #uip# + where cmno = #cmno# and ifnull(isready,0) = 1 and ischanged=0 and status = 4 and DATE_ADD(oktime, INTERVAL 2 DAY) < + diff --git a/Model/CM.cs b/Model/CM.cs index 655370e..81f322f 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -156,7 +156,7 @@ namespace NP.Model { get { - return rstime == null && retime == null ? "" : string.Format("{0}~{1}", rstime == null ? "" : rstime.Value.ToString("yy.MM.dd"), retime == null ? "" : retime.Value.ToString("yy.MM.dd")); + return rstime == null && retime == null ? "" : string.Format("{0}~{1}", rstime == null ? "" : rstime.Value.ToString("yyyy-MM-dd"), retime == null ? "" : retime.Value.ToString("yyyy-MM-dd")); } } @@ -807,6 +807,27 @@ namespace NP.Model } } } + public String pstatusname3 + { + get + { + switch (pstatus) + { + case 1: + case 21: + case 22: + case 53: + return "수강승인"; + case 41: + case 42: + case 43: + case 52: + return "수강취소"; + case 51: return "대기중"; + default: return "-"; + } + } + } /// /// fklectpayitem 결제상품키 payitem.pino ///