diff --git a/Base/Controller/FCommon.cs b/Base/Controller/FCommon.cs index b67d697..29244ad 100644 --- a/Base/Controller/FCommon.cs +++ b/Base/Controller/FCommon.cs @@ -283,6 +283,8 @@ namespace NP.Base.Controllers ppllog.rbankacc = Request["rbankacc"].ToString(); if (!string.IsNullOrEmpty(Request["rbankowner"])) ppllog.rbankowner = Request["rbankowner"].ToString(); + if (!string.IsNullOrEmpty(Request["isaccommodation"])) + ppllog.isaccommodation = Convert.ToInt32(Request["isaccommodation"].ToString()); ppllog.asname = vm.Assign.asname; ppllog.brno = vm.Assign.brno.IndexOf("-") > 0 ? vm.Assign.brno.Replace("-", "") : vm.Assign.brno; diff --git a/Base/Controller/FCommonPay.cs b/Base/Controller/FCommonPay.cs index 12ec30e..5e25306 100644 --- a/Base/Controller/FCommonPay.cs +++ b/Base/Controller/FCommonPay.cs @@ -180,8 +180,8 @@ namespace NP.Base.Controllers uip = GetUserIP(), ispg = 1, userno = SUserInfo.UserNo, - orgamt = vm.PPLog.infee, - payamt = vm.PPLog.infee, + orgamt = vm.PPLog.isaccommodation == 1 ? vm.PPLog.infee + vm.PPLog.accommofee : vm.PPLog.infee, + payamt = vm.PPLog.isaccommodation == 1 ? vm.PPLog.infee + vm.PPLog.accommofee : vm.PPLog.infee, iscashrct = vm.ptype == 1 ? 0 : vm.iscashrct, cashrcthp = vm.ptype == 1 ? null : vm.cashrcthp, pplno = vm.pplno, @@ -194,8 +194,8 @@ namespace NP.Base.Controllers itemno = vm.cmno, pcnt = 1, userno = SUserInfo.UserNo, - orgamt = vm.PPLog.infee, - payamt = vm.PPLog.infee, + orgamt = vm.PPLog.isaccommodation == 1 ? vm.PPLog.infee + vm.PPLog.accommofee : vm.PPLog.infee, + payamt = vm.PPLog.isaccommodation == 1 ? vm.PPLog.infee + vm.PPLog.accommofee : vm.PPLog.infee, isrebate = vm.PPLog.isrebate??0, rbank = vm.PPLog.rbankname, rbankaccnum = vm.PPLog.rbankacc, @@ -282,9 +282,9 @@ namespace NP.Base.Controllers { pi.rstime = lects.Where(w => w.cmno == pi.itemno).First().rstime; pi.retime = lects.Where(w => w.cmno == pi.itemno).First().retime; - pi.orgamt = lects.Where(w => w.cmno == pi.itemno).First().infee; - pi.discamt = lects.Where(w => w.cmno == pi.itemno).First().infee - lects.Where(w => w.cmno == pi.itemno).First().payamt; - pi.payamt = lects.Where(w => w.cmno == pi.itemno).First().payamt; + pi.orgamt = vm.PPLog.isaccommodation == 1 ? lects.Where(w => w.cmno == pi.itemno).First().infee + lects.Where(w => w.cmno == pi.itemno).First().accommofee : lects.Where(w => w.cmno == pi.itemno).First().infee; + pi.payamt = vm.PPLog.isaccommodation == 1 ? lects.Where(w => w.cmno == pi.itemno).First().payamt + lects.Where(w => w.cmno == pi.itemno).First().accommofee : lects.Where(w => w.cmno == pi.itemno).First().payamt; + pi.discamt = pi.orgamt - pi.payamt; // lects.Where(w => w.cmno == pi.itemno).First().infee - lects.Where(w => w.cmno == pi.itemno).First().payamt; } } } diff --git a/Dao/DB/DB1.Scheme.txt b/Dao/DB/DB1.Scheme.txt index d6272c1..8d69562 100644 --- a/Dao/DB/DB1.Scheme.txt +++ b/Dao/DB/DB1.Scheme.txt @@ -724,7 +724,8 @@ create table pplog ( ,uaddress2 varchar (200) ,isassignuser tinyint not null default 1 ,uduty varchar (20) - ,slevel tinyint + ,slevel tinyint + ,isaccommodation tinyint ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL ,primary key(pplno)); diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 03464a8..0042941 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -1597,7 +1597,7 @@ select a.cmno,a.cname,a.quota,a.rstime,a.retime ,b.status - ,a.infee,a.outfee,case when ua.isjoin=1 then a.infee else a.infee end payamt + ,a.infee,a.outfee,case when ua.isjoin=1 then a.infee else a.infee end payamt ,a.accommofee ,count(d.userno) countlect from cm a inner join users u on u.userno=#userno# @@ -284,7 +284,7 @@ update pay a inner join users b on b.userno=a.userno - set a.ptype=#ptype#,a.paylimit=#paylimit#,a.orgamt=#orgamt#,a.payamt=#payamt# + set a.ptype=#ptype#,a.paylimit=#paylimit#,a.orgamt=#orgamt#,a.payamt=#payamt#,a.isbill=#isbill# where a.payno=#payno# and a.userno=#userno# and a.pstatus=21; update payitem a @@ -294,7 +294,7 @@ - select a.pplno,a.isready,a.cmno,a.cmisno,a.isrebate,a.rbankname,a.rbankacc,a.rbankowner + select a.pplno,a.isready,a.cmno,a.cmisno,a.isrebate,a.rbankname,a.rbankacc,a.rbankowner,a.isaccommodation ,b.payno,b.pstatus - ,a2.infee + ,a2.infee,a2.accommofee from pplog a inner join cm a2 on a2.cmno=a.cmno left outer join pay b on b.pplno=a.pplno @@ -890,7 +890,7 @@ where a.cmno=#cmno# and a.isready=1 and a.status=6 +

신청강좌

- 결제금액 : @Model.CM.infee.ToString("#,0") 원 + @if (Model.PPLog.isaccommodation != 1) + { + 결제금액:@Model.CM.infee.ToString("#,0") + } + else + { + 결제금액:@((Model.CM.infee + Model.CM.accommofee).ToString("#,0"))원 (합숙 : @(Model.CM.accommofee.ToString("#,0"))원 포함) + }
diff --git a/Model/CM.cs b/Model/CM.cs index 556db5f..1130b73 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -1027,6 +1027,10 @@ namespace NP.Model /// 비회원수강료 /// public int outfee { get; set; } + /// + /// 합숙비용 + /// + public int accommofee { get; set; } public DateTime? rstime { get; set; } public DateTime? retime { get; set; } public int kfcfyear { get; set; } diff --git a/Model/PPLog.cs b/Model/PPLog.cs index 1c13e04..f2e2e88 100644 --- a/Model/PPLog.cs +++ b/Model/PPLog.cs @@ -54,5 +54,7 @@ namespace NP.Model public Int64 payno { get; set; } public int pstatus { get; set; } public int infee { get; set; } + public int accommofee { get; set; } + public int? isaccommodation { get; set; } } } diff --git a/Model/Pay.cs b/Model/Pay.cs index c63fc5d..2f93ca3 100644 --- a/Model/Pay.cs +++ b/Model/Pay.cs @@ -219,6 +219,7 @@ namespace NP.Model /// 계산서발행여부 /// public int isbill { get; set; } + public int? isaccommodation { get; set; } //public Xpay xpay { get; set; } public String mid { get; set; }