diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs index b14c7d041..a98ea19b1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs @@ -624,6 +624,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetPayFeeDetail(string keyValue) { var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); + //当前年度缴费记录 + var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, DateTime.Now.Year); var FinaChargesStandardList = new List(); if (!string.IsNullOrEmpty(StuInfoFreshData.ClassNo) && !string.IsNullOrEmpty(StuInfoFreshData.MajorNo)) { @@ -639,7 +641,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { StuInfoFreshData = StuInfoFreshData, FinaChargesStandardList = FinaChargesStandardList, - PayFeeTotal = PayFeeTotal + PayFeeTotal = PayFeeTotal, + YJAmount = FeeOrderList.Sum(x => x.SJAmount) }; return Success(jsonData); } @@ -1237,9 +1240,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpPost] [AjaxOnly] - public ActionResult PayFeeQRCode(string keyValue, string strEntity) + public ActionResult PayFeeQRCode(string keyValue, string strEntity, string detailList) { StuInfoFreshEntity entity = strEntity.ToObject(); + List list = detailList.ToObject>(); var model = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); var imgUrl = ""; Random ran = new Random(); @@ -1287,10 +1291,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers if (!string.IsNullOrEmpty(imgUrl)) { - model.PayFeeDetail = entity.PayFeeDetail; - model.PayMoney = entity.PayMoney; + // model.PayFeeDetail = entity.PayFeeDetail; + // model.PayMoney = entity.PayMoney; model.LoanMoney = entity.LoanMoney; - stuInfoFreshIBLL.SaveEntity(keyValue, model); + model.orderid = orderid; + stuInfoFreshIBLL.SaveFeeData(keyValue, model, list); } return Success(imgUrl); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml index dfd317d8d..61a2ed876 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.cshtml @@ -28,7 +28,11 @@ } .tableLeft { - width: 30%; + width: 20%; + font-weight: bold; + } + .tableCenter { + width: 55%; }
@@ -36,7 +40,7 @@
支付
-
查询
+ @*
查询
*@
取消
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js index 55dd46335..76a250e9c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/PayFeeForm.js @@ -7,6 +7,7 @@ var acceptClick; var keyValue = request('keyValue'); var PayFeeTotal = 0;//应交费用 +var YJAmount = 0;//已交费用 var bootstrap = function ($, learun) { "use strict"; var page = { @@ -21,40 +22,26 @@ var bootstrap = function ($, learun) { if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { return learun.alert.warning("所交费用超出应交费用!"); } - var detail = ""; - $('.paydetail').each(function (i, item) { - detail += $(this).attr('id') + "!" + $(this).attr('value') + '&'; - }); - detail = detail.substring(0, detail.length - 1); - var param = {}; - param.LoanMoney = $('#LoanMoney').val(); - param.PayFeeDetail = detail; - param.PayMoney = $('#PayMoney').html(); - //console.log('asd', JSON.stringify(param)); - //$('#qrcodeImg').attr('src', "/Content/images/QRCode/2022070505103378891.jpg"); - //return; - learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode?keyValue=' + keyValue, { strEntity: JSON.stringify(param) }, function (res) { - learun.loading(false); - console.log(res); - $('#qrcodeImg').attr('src', res.info); - //if (res.code == learun.httpCode.success) { - // if (!!callback) { - // callback(res); - // } - // learun.alert.success(res.info); - //} - //else { - // learun.alert.error(res.info); - // learun.httpErrorLog(res.info); - //} - //layer.close(layer.index); - }); + if (YJAmount > 0) { + learun.layerConfirm('当前年度已存在缴费记录,是否继续缴费!', + function (res) { + if (!res) { + return false; + } else { + page.getQRCode(); + } + }); + } else { + page.getQRCode(); + } + }); //取消缴费 $('#cancelPayFee').click(function () { - learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsPayFee', { keyValue: keyValue, status: 0 }, function () { - learun.frameTab.currentIframe().refreshGirdData(); - }); + learun.layerClose(window.name); + //learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsPayFee', { keyValue: keyValue, status: 0 }, function () { + // learun.frameTab.currentIframe().refreshGirdData(); + //}); }); //计算实交金额 @@ -63,7 +50,11 @@ var bootstrap = function ($, learun) { function () { var num = 0; $(".paydetail").each(function (i, item) { - num += parseFloat($(this).val()); + var val = 0; + if (!!$(this).val()) { + val = parseFloat($(this).val()); + } + num += val; }); $('#PayMoney').html(num); }); @@ -91,21 +82,54 @@ var bootstrap = function ($, learun) { } }); PayFeeTotal = parseFloat(data['PayFeeTotal']); - var html = "学号" + StuInfoFresh.StuNo + ""; - html += "姓名 " + StuInfoFresh.StuName + ""; - html += "班级" + className + ""; - html += "系别" + deptName + ""; - html += '缴费项目应交费用本次实交'; + YJAmount = parseFloat(data['YJAmount']); + var html = "学号" + StuInfoFresh.StuNo + ""; + html += "姓名 " + StuInfoFresh.StuName + ""; + html += "班级" + className + ""; + html += "系别" + deptName + ""; + html += '缴费项目应交费用本次实交'; $.each(data['FinaChargesStandardList'], function (i, item) { - html += '' + item.ChargeItemName + '' + item.Standard + '元'; + html += '' + item.ChargeItemName + '' + item.Standard + '元'; }); - html += '合计' + data['PayFeeTotal'] + '元' + data['PayFeeTotal'] + ''; - html += '贷款金额'; - html += '已交金额'; + html += '合计' + data['PayFeeTotal'] + '元' + data['PayFeeTotal'] + ''; + html += '贷款金额'; + html += '已交金额' + YJAmount + ''; $('#PayFeeDetail').html(html); }); } + }, + getQRCode: function () { + var list = []; + var detail = ""; + $('.paydetail').each(function (i, item) { + var value = 0; + if (!!$(this).val()) { + value = parseFloat($(this).val()); + } + detail += $(this).attr('id') + "!" + value + '&'; + var entity = { + Id: learun.newGuid(), + ChargeItemName: ($(this).attr('data-name')).replace(/^\s*|\s*$/g, ""), + ChargeItemID: $(this).attr('id'), + YJAmount: $(this).attr('data-amount'), + SJAmount: value + }; + list.push(entity); + }); + detail = detail.substring(0, detail.length - 1); + var param = {}; + param.LoanMoney = $('#LoanMoney').val(); + param.PayFeeDetail = detail; + param.PayMoney = $('#PayMoney').html(); + + learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode?keyValue=' + keyValue, { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) }, function (res) { + learun.loading(false); + //console.log(res); + $('#qrcodeImg').attr('src', res.info); + }); } }; + + page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEnrollFeeOrderDetailMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEnrollFeeOrderDetailMap.cs new file mode 100644 index 000000000..71b1b66fd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEnrollFeeOrderDetailMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-07-17 11:20 + /// 描 述:新生录取管理 + /// + public class StuEnrollFeeOrderDetailMap : EntityTypeConfiguration + { + public StuEnrollFeeOrderDetailMap() + { + #region 表、主键 + //表 + this.ToTable("STUENROLLFEEORDERDETAIL"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEnrollFeeOrderMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEnrollFeeOrderMap.cs new file mode 100644 index 000000000..f8f9cde6c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEnrollFeeOrderMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-07-17 11:20 + /// 描 述:新生录取管理 + /// + public class StuEnrollFeeOrderMap : EntityTypeConfiguration + { + public StuEnrollFeeOrderMap() + { + #region 表、主键 + //表 + this.ToTable("STUENROLLFEEORDER"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 24bb0b26e..3cedc2de8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -93,6 +93,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnrollFeeOrder/StuEnrollFeeOrderEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnrollFeeOrder/StuEnrollFeeOrderEntity.cs new file mode 100644 index 000000000..f9364c5d6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnrollFeeOrder/StuEnrollFeeOrderEntity.cs @@ -0,0 +1,82 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 新生缴费单 + /// + public class StuEnrollFeeOrderEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 年度 + /// + [Column("YEARNO")] + public int? YearNo { get; set; } + /// + /// 学号 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// orderid + /// + [Column("ORDERID")] + public string orderid { get; set; } + /// + /// 应交金额 + /// + [Column("YJAMOUNT")] + public decimal? YJAmount { get; set; } + /// + /// 实交金额 + /// + [Column("SJAMOUNT")] + public decimal? SJAmount { get; set; } + /// + /// 下单时间 + /// + [Column("PLACEORDERTIME")] + public DateTime? PlaceOrderTime { get; set; } + /// + /// 缴费状态 + /// + [Column("STATUS")] + public int? Status { get; set; } + /// + /// 付款时间 + /// + [Column("PAYTIME")] + public DateTime? PayTime { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnrollFeeOrderDetail/StuEnrollFeeOrderDetailEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnrollFeeOrderDetail/StuEnrollFeeOrderDetailEntity.cs new file mode 100644 index 000000000..712f0a977 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnrollFeeOrderDetail/StuEnrollFeeOrderDetailEntity.cs @@ -0,0 +1,67 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 新生缴费明细 + /// + public class StuEnrollFeeOrderDetailEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 订单主表 + /// + [Column("ORDERID")] + public string OrderId { get; set; } + /// + /// 费用名称 + /// + [Column("CHARGEITEMNAME")] + public string ChargeItemName { get; set; } + /// + /// 费用Id + /// + [Column("CHARGEITEMID")] + public string ChargeItemID { get; set; } + /// + /// 应交金额 + /// + [Column("YJAMOUNT")] + public decimal? YJAmount { get; set; } + /// + /// 实交金额 + /// + [Column("SJAMOUNT")] + public decimal? SJAmount { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs index f0d81fed9..6ce5593dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs @@ -183,6 +183,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetFeeOrderList(string StuNo, int year) + { + try + { + return stuInfoFreshService.GetFeeOrderList(StuNo, year); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取StuInfoFresh表实体数据 /// 主键 @@ -500,6 +519,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + + public void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List list) + { + try + { + stuInfoFreshService.SaveFeeData(keyValue, entity, list); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs index 70e4b6e6c..72491cce9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs @@ -620,16 +620,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string BankLocation { get; set; } - /// - /// 缴费明细 - /// - [Column("PAYFEEDETAIL")] - public string PayFeeDetail { get; set; } - /// - /// 缴费金额 - /// - [Column("PAYMONEY")] - public decimal? PayMoney { get; set; } + ///// + ///// 缴费明细 + ///// + //[Column("PAYFEEDETAIL")] + //public string PayFeeDetail { get; set; } + ///// + ///// 缴费金额 + ///// + //[Column("PAYMONEY")] + //public decimal? PayMoney { get; set; } /// /// 贷款金额 /// @@ -666,6 +666,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 额外字段 /// + /// 缴费单id + /// + [NotMapped] + public string orderid { get; set; } + /// + /// 缴费明细 + /// + [NotMapped] + public string PayFeeDetail { get; set; } + + /// + /// 缴费金额 + /// + [NotMapped] + public decimal? PayMoney { get; set; } + /// /// 系名称 /// [NotMapped] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs index 46f4460ce..accc856d0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs @@ -61,6 +61,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// StuInfoFreshEntity GetStuInfoFreshEntity(string keyValue); + IEnumerable GetFeeOrderList(string StuNo, int year); /// /// 获取StuInfoFresh表实体数据 @@ -134,6 +135,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SaveEntity(string keyValue, StuInfoFreshEntity entity); + void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List list); #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs index d98219818..9986d6643 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs @@ -542,6 +542,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取学生今年的缴费记录 + /// + /// + /// + /// + public IEnumerable GetFeeOrderList(string StuNo, int year) + { + try + { + //缴费状态=1 + return this.BaseRepository("CollegeMIS").FindList(x => x.StuNo == StuNo && x.YearNo == year && x.Status == 1); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取StuInfoFresh表实体数据 /// 主键 @@ -1054,6 +1080,56 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 新生缴费保存 + /// + /// + /// + /// + public void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List list) + { + var db = this.BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + db.Update(entity); + + //保存缴费数据 + var order = new StuEnrollFeeOrderEntity(); + order.Create(); + order.YearNo = DateTime.Now.Year; + order.StuNo = entity.StuNo; + order.orderid = entity.orderid; + order.YJAmount = list.Sum(x => x.YJAmount); + order.SJAmount = list.Sum(x => x.SJAmount); + order.PlaceOrderTime = DateTime.Now; + order.Status = 0; + db.Insert(order); + foreach (var detail in list) + { + detail.OrderId = order.Id; + db.Insert(detail); + } + } + + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 4030d19f4..570fe40fe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -218,6 +218,8 @@ + +