@@ -624,6 +624,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult GetPayFeeDetail(string keyValue) | public ActionResult GetPayFeeDetail(string keyValue) | ||||
{ | { | ||||
var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); | var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); | ||||
//当前年度缴费记录 | |||||
var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, DateTime.Now.Year); | |||||
var FinaChargesStandardList = new List<FinaChargesStandardEntity>(); | var FinaChargesStandardList = new List<FinaChargesStandardEntity>(); | ||||
if (!string.IsNullOrEmpty(StuInfoFreshData.ClassNo) && !string.IsNullOrEmpty(StuInfoFreshData.MajorNo)) | if (!string.IsNullOrEmpty(StuInfoFreshData.ClassNo) && !string.IsNullOrEmpty(StuInfoFreshData.MajorNo)) | ||||
{ | { | ||||
@@ -639,7 +641,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
StuInfoFreshData = StuInfoFreshData, | StuInfoFreshData = StuInfoFreshData, | ||||
FinaChargesStandardList = FinaChargesStandardList, | FinaChargesStandardList = FinaChargesStandardList, | ||||
PayFeeTotal = PayFeeTotal | |||||
PayFeeTotal = PayFeeTotal, | |||||
YJAmount = FeeOrderList.Sum(x => x.SJAmount) | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
@@ -1237,9 +1240,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult PayFeeQRCode(string keyValue, string strEntity) | |||||
public ActionResult PayFeeQRCode(string keyValue, string strEntity, string detailList) | |||||
{ | { | ||||
StuInfoFreshEntity entity = strEntity.ToObject<StuInfoFreshEntity>(); | StuInfoFreshEntity entity = strEntity.ToObject<StuInfoFreshEntity>(); | ||||
List<StuEnrollFeeOrderDetailEntity> list = detailList.ToObject<List<StuEnrollFeeOrderDetailEntity>>(); | |||||
var model = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); | var model = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); | ||||
var imgUrl = ""; | var imgUrl = ""; | ||||
Random ran = new Random(); | Random ran = new Random(); | ||||
@@ -1287,10 +1291,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
if (!string.IsNullOrEmpty(imgUrl)) | if (!string.IsNullOrEmpty(imgUrl)) | ||||
{ | { | ||||
model.PayFeeDetail = entity.PayFeeDetail; | |||||
model.PayMoney = entity.PayMoney; | |||||
// model.PayFeeDetail = entity.PayFeeDetail; | |||||
// model.PayMoney = entity.PayMoney; | |||||
model.LoanMoney = entity.LoanMoney; | model.LoanMoney = entity.LoanMoney; | ||||
stuInfoFreshIBLL.SaveEntity(keyValue, model); | |||||
model.orderid = orderid; | |||||
stuInfoFreshIBLL.SaveFeeData(keyValue, model, list); | |||||
} | } | ||||
return Success(imgUrl); | return Success(imgUrl); | ||||
@@ -28,7 +28,11 @@ | |||||
} | } | ||||
.tableLeft { | .tableLeft { | ||||
width: 30%; | |||||
width: 20%; | |||||
font-weight: bold; | |||||
} | |||||
.tableCenter { | |||||
width: 55%; | |||||
} | } | ||||
</style> | </style> | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
@@ -36,7 +40,7 @@ | |||||
<table class="table table-bordered" id="PayFeeDetail"></table> | <table class="table table-bordered" id="PayFeeDetail"></table> | ||||
<div id="btnBox"> | <div id="btnBox"> | ||||
<div id="confirmPayFee" class="btn btn-primary">支付</div> | <div id="confirmPayFee" class="btn btn-primary">支付</div> | ||||
<div id="searchPayFee" class="btn btn-success">查询</div> | |||||
@*<div id="searchPayFee" class="btn btn-success">查询</div>*@ | |||||
<div id="cancelPayFee" class="btn btn-default">取消</div> | <div id="cancelPayFee" class="btn btn-default">取消</div> | ||||
</div> | </div> | ||||
</div> | </div> |
@@ -7,6 +7,7 @@ | |||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var PayFeeTotal = 0;//应交费用 | var PayFeeTotal = 0;//应交费用 | ||||
var YJAmount = 0;//已交费用 | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
@@ -21,40 +22,26 @@ var bootstrap = function ($, learun) { | |||||
if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { | if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { | ||||
return learun.alert.warning("所交费用超出应交费用!"); | 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 () { | $('#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 () { | function () { | ||||
var num = 0; | var num = 0; | ||||
$(".paydetail").each(function (i, item) { | $(".paydetail").each(function (i, item) { | ||||
num += parseFloat($(this).val()); | |||||
var val = 0; | |||||
if (!!$(this).val()) { | |||||
val = parseFloat($(this).val()); | |||||
} | |||||
num += val; | |||||
}); | }); | ||||
$('#PayMoney').html(num); | $('#PayMoney').html(num); | ||||
}); | }); | ||||
@@ -91,21 +82,54 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
PayFeeTotal = parseFloat(data['PayFeeTotal']); | PayFeeTotal = parseFloat(data['PayFeeTotal']); | ||||
var html = "<tr><td class=\"tableLeft\">学号</td><td class=\"tableLeft\">" + StuInfoFresh.StuNo + "</td><td class=\"tableRight qrcode\" rowspan=\"4\"><img id='qrcodeImg'/></td></tr>"; | |||||
html += "<tr><td>姓名</td> <td>" + StuInfoFresh.StuName + "</td></tr>"; | |||||
html += "<tr><td>班级</td><td>" + className + "</td></tr>"; | |||||
html += "<tr><td>系别</td><td>" + deptName + "</td></tr>"; | |||||
html += '<tr><td>缴费项目</td><td>应交费用</td><td>本次实交</td></tr>'; | |||||
YJAmount = parseFloat(data['YJAmount']); | |||||
var html = "<tr><td class=\"tableLeft\">学号</td><td class=\"tableCenter\">" + StuInfoFresh.StuNo + "</td><td class=\"tableRight qrcode\" rowspan=\"4\"><img id='qrcodeImg'/></td></tr>"; | |||||
html += "<tr><td class=\"tableLeft\">姓名</td> <td>" + StuInfoFresh.StuName + "</td></tr>"; | |||||
html += "<tr><td class=\"tableLeft\">班级</td><td>" + className + "</td></tr>"; | |||||
html += "<tr><td class=\"tableLeft\">系别</td><td>" + deptName + "</td></tr>"; | |||||
html += '<tr style="border-top: 10px solid blue;"><td class=\"tableLeft\">缴费项目</td><td class=\"tableLeft\">应交费用</td><td class=\"tableLeft\">本次实交</td></tr>'; | |||||
$.each(data['FinaChargesStandardList'], function (i, item) { | $.each(data['FinaChargesStandardList'], function (i, item) { | ||||
html += '<tr><td>' + item.ChargeItemName + '</td><td>' + item.Standard + '元</td><td><input id="' + item.ChargeItemID + '" type="number" class="form-control paydetail" value="' + item.Standard + '" /></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">' + item.ChargeItemName + '</td><td>' + item.Standard + '元</td><td><input id="' + item.ChargeItemID + '" data-amount="' + item.Standard + '" data-name="' + item.ChargeItemName + '" type="number" class="form-control paydetail" value="' + item.Standard + '" /></td></tr>'; | |||||
}); | }); | ||||
html += '<tr><td>合计</td><td>' + data['PayFeeTotal'] + '元</td><td><span id="PayMoney">' + data['PayFeeTotal'] + '</span></td></tr>'; | |||||
html += '<tr><td>贷款金额</td><td colspan="2"><input id="LoanMoney" type="number" class="form-control" /></td></tr>'; | |||||
html += '<tr><td>已交金额</td><td colspan="2"></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">合计</td><td>' + data['PayFeeTotal'] + '元</td><td><span id="PayMoney">' + data['PayFeeTotal'] + '</span></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">贷款金额</td><td colspan="2"><input id="LoanMoney" type="number" class="form-control" value="' + StuInfoFresh.LoanMoney + '" /></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">已交金额</td><td colspan="2">' + YJAmount + '</td></tr>'; | |||||
$('#PayFeeDetail').html(html); | $('#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(); | page.init(); | ||||
} | } |
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-07-17 11:20 | |||||
/// 描 述:新生录取管理 | |||||
/// </summary> | |||||
public class StuEnrollFeeOrderDetailMap : EntityTypeConfiguration<StuEnrollFeeOrderDetailEntity> | |||||
{ | |||||
public StuEnrollFeeOrderDetailMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("STUENROLLFEEORDERDETAIL"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-07-17 11:20 | |||||
/// 描 述:新生录取管理 | |||||
/// </summary> | |||||
public class StuEnrollFeeOrderMap : EntityTypeConfiguration<StuEnrollFeeOrderEntity> | |||||
{ | |||||
public StuEnrollFeeOrderMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("STUENROLLFEEORDER"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -93,6 +93,8 @@ | |||||
<Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | <Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | <Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" /> | <Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollFeeOrderDetailMap.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollFeeOrderMap.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollScoreMap.cs" /> | <Compile Include="EducationalAdministration\StuEnrollScoreMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuGrantMap.cs" /> | <Compile Include="EducationalAdministration\StuGrantMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | <Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | ||||
@@ -0,0 +1,82 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 新生缴费单 | |||||
/// </summary> | |||||
public class StuEnrollFeeOrderEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 年度 | |||||
/// </summary> | |||||
[Column("YEARNO")] | |||||
public int? YearNo { get; set; } | |||||
/// <summary> | |||||
/// 学号 | |||||
/// </summary> | |||||
[Column("STUNO")] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// orderid | |||||
/// </summary> | |||||
[Column("ORDERID")] | |||||
public string orderid { get; set; } | |||||
/// <summary> | |||||
/// 应交金额 | |||||
/// </summary> | |||||
[Column("YJAMOUNT")] | |||||
public decimal? YJAmount { get; set; } | |||||
/// <summary> | |||||
/// 实交金额 | |||||
/// </summary> | |||||
[Column("SJAMOUNT")] | |||||
public decimal? SJAmount { get; set; } | |||||
/// <summary> | |||||
/// 下单时间 | |||||
/// </summary> | |||||
[Column("PLACEORDERTIME")] | |||||
public DateTime? PlaceOrderTime { get; set; } | |||||
/// <summary> | |||||
/// 缴费状态 | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int? Status { get; set; } | |||||
/// <summary> | |||||
/// 付款时间 | |||||
/// </summary> | |||||
[Column("PAYTIME")] | |||||
public DateTime? PayTime { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,67 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 新生缴费明细 | |||||
/// </summary> | |||||
public class StuEnrollFeeOrderDetailEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 订单主表 | |||||
/// </summary> | |||||
[Column("ORDERID")] | |||||
public string OrderId { get; set; } | |||||
/// <summary> | |||||
/// 费用名称 | |||||
/// </summary> | |||||
[Column("CHARGEITEMNAME")] | |||||
public string ChargeItemName { get; set; } | |||||
/// <summary> | |||||
/// 费用Id | |||||
/// </summary> | |||||
[Column("CHARGEITEMID")] | |||||
public string ChargeItemID { get; set; } | |||||
/// <summary> | |||||
/// 应交金额 | |||||
/// </summary> | |||||
[Column("YJAMOUNT")] | |||||
public decimal? YJAmount { get; set; } | |||||
/// <summary> | |||||
/// 实交金额 | |||||
/// </summary> | |||||
[Column("SJAMOUNT")] | |||||
public decimal? SJAmount { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -183,6 +183,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public IEnumerable<StuEnrollFeeOrderEntity> GetFeeOrderList(string StuNo, int year) | |||||
{ | |||||
try | |||||
{ | |||||
return stuInfoFreshService.GetFeeOrderList(StuNo, year); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取StuInfoFresh表实体数据 | /// 获取StuInfoFresh表实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -500,6 +519,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List<StuEnrollFeeOrderDetailEntity> list) | |||||
{ | |||||
try | |||||
{ | |||||
stuInfoFreshService.SaveFeeData(keyValue, entity, list); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -620,16 +620,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
public string BankLocation { get; set; } | public string BankLocation { get; set; } | ||||
/// <summary> | |||||
/// 缴费明细 | |||||
/// </summary> | |||||
[Column("PAYFEEDETAIL")] | |||||
public string PayFeeDetail { get; set; } | |||||
/// <summary> | |||||
/// 缴费金额 | |||||
/// </summary> | |||||
[Column("PAYMONEY")] | |||||
public decimal? PayMoney { get; set; } | |||||
///// <summary> | |||||
///// 缴费明细 | |||||
///// </summary> | |||||
//[Column("PAYFEEDETAIL")] | |||||
//public string PayFeeDetail { get; set; } | |||||
///// <summary> | |||||
///// 缴费金额 | |||||
///// </summary> | |||||
//[Column("PAYMONEY")] | |||||
//public decimal? PayMoney { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 贷款金额 | /// 贷款金额 | ||||
/// </summary> | /// </summary> | ||||
@@ -666,6 +666,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#region 额外字段 | #region 额外字段 | ||||
/// <summary> | /// <summary> | ||||
/// 缴费单id | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string orderid { get; set; } | |||||
/// <summary> | |||||
/// 缴费明细 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string PayFeeDetail { get; set; } | |||||
/// <summary> | |||||
/// 缴费金额 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public decimal? PayMoney { get; set; } | |||||
/// <summary> | |||||
/// 系名称 | /// 系名称 | ||||
/// </summary> | /// </summary> | ||||
[NotMapped] | [NotMapped] | ||||
@@ -61,6 +61,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
StuInfoFreshEntity GetStuInfoFreshEntity(string keyValue); | StuInfoFreshEntity GetStuInfoFreshEntity(string keyValue); | ||||
IEnumerable<StuEnrollFeeOrderEntity> GetFeeOrderList(string StuNo, int year); | |||||
/// <summary> | /// <summary> | ||||
/// 获取StuInfoFresh表实体数据 | /// 获取StuInfoFresh表实体数据 | ||||
@@ -134,6 +135,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void SaveEntity(string keyValue, StuInfoFreshEntity entity); | void SaveEntity(string keyValue, StuInfoFreshEntity entity); | ||||
void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List<StuEnrollFeeOrderDetailEntity> list); | |||||
#endregion | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -542,6 +542,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取学生今年的缴费记录 | |||||
/// </summary> | |||||
/// <param name="StuNo"></param> | |||||
/// <param name="year"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuEnrollFeeOrderEntity> GetFeeOrderList(string StuNo, int year) | |||||
{ | |||||
try | |||||
{ | |||||
//缴费状态=1 | |||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollFeeOrderEntity>(x => x.StuNo == StuNo && x.YearNo == year && x.Status == 1); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取StuInfoFresh表实体数据 | /// 获取StuInfoFresh表实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -1054,6 +1080,56 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 新生缴费保存 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="entity"></param> | |||||
/// <param name="list"></param> | |||||
public void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List<StuEnrollFeeOrderDetailEntity> 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 | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -218,6 +218,8 @@ | |||||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordEntity.cs" /> | <Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordIBLL.cs" /> | <Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordService.cs" /> | <Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordService.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollFeeOrderDetail\StuEnrollFeeOrderDetailEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollFeeOrder\StuEnrollFeeOrderEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreBLL.cs" /> | <Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreEntity.cs" /> | <Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreIBLL.cs" /> | <Compile Include="EducationalAdministration\StuEnrollScore\StuEnrollScoreIBLL.cs" /> | ||||