@@ -78,6 +78,19 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetListSum(string queryJson) | |||||
{ | |||||
var data = finaChargeStuOrderIBLL.GetListSum(queryJson).TotalSJAmount; | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | /// 获取表单数据 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -58,6 +58,9 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item"> | |||||
<div style="line-height:28px;margin-left:20px;">缴费金额合计:<span id="TotalSJAmount">0</span>元</div> | |||||
</div> | |||||
</div> | </div> | ||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
@@ -223,7 +223,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
{ label: "年级", name: "Grade", width: 80, align: "left" }, | { label: "年级", name: "Grade", width: 80, align: "left" }, | ||||
{ label: "缴费年度", name: "YearNo", width: 80, align: "left" }, | { label: "缴费年度", name: "YearNo", width: 80, align: "left" }, | ||||
{ label: "订单编号", name: "orderid", width: 150, align: "left"}, | |||||
{ label: "订单编号", name: "orderid", width: 150, align: "left" }, | |||||
{ | { | ||||
label: "收费标准", name: "YJAmount", width: 100, align: "left", formatter: function (cellvalue) { | label: "收费标准", name: "YJAmount", width: 100, align: "left", formatter: function (cellvalue) { | ||||
return cellvalue.toFixed(2); | return cellvalue.toFixed(2); | ||||
@@ -244,43 +244,49 @@ var bootstrap = function ($, learun) { | |||||
return cellvalue.toFixed(2); | return cellvalue.toFixed(2); | ||||
} | } | ||||
}, | }, | ||||
{ label: "缴费状态", name: "Status", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'PayStatus', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "订单生成时间", name: "PlaceOrderTime", width: 150, align: "left"}, | |||||
{ label: "付款时间", name: "PayTime", width: 150, align: "left"}, | |||||
{ label: "支付方式", name: "PayMode", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'PayMode', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "订单来源", name: "OrderType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'OrderType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "银行订单号", name: "BankOrder", width: 100, align: "left"}, | |||||
{ | |||||
label: "缴费状态", name: "Status", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'PayStatus', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "订单生成时间", name: "PlaceOrderTime", width: 150, align: "left" }, | |||||
{ label: "付款时间", name: "PayTime", width: 150, align: "left" }, | |||||
{ | |||||
label: "支付方式", name: "PayMode", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'PayMode', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "订单来源", name: "OrderType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'OrderType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "银行订单号", name: "BankOrder", width: 100, align: "left" }, | |||||
], | ], | ||||
mainId:'Id', | |||||
mainId: 'Id', | |||||
isPage: true, | isPage: true, | ||||
sidx:'PlaceOrderTime desc' | |||||
sidx: 'PlaceOrderTime desc' | |||||
}); | }); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
@@ -288,7 +294,15 @@ var bootstrap = function ($, learun) { | |||||
param.StartTime = startTime; | param.StartTime = startTime; | ||||
param.EndTime = endTime; | param.EndTime = endTime; | ||||
param.YearNo = $('#YearNo').lrselectGet(); | param.YearNo = $('#YearNo').lrselectGet(); | ||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
//计算缴费金额合计 | |||||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuOrder/GetListSum?queryJson=' + JSON.stringify(param), function (data) { | |||||
if (data) { | |||||
$("#TotalSJAmount").html(data.toFixed(2)); | |||||
} else { | |||||
$("#TotalSJAmount").html(0); | |||||
} | |||||
}); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表数据的金额合计 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public FinaChargeStuOrderEntity GetListSum(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return finaChargeStuOrderService.GetListSum(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取FinaChargeStuOrder表实体数据 | /// 获取FinaChargeStuOrder表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -147,7 +171,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
finaChargeStuOrderService.SaveOrderData( entity,list); | |||||
finaChargeStuOrderService.SaveOrderData(entity, list); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -126,6 +126,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
public string Grade { get; set; } | public string Grade { get; set; } | ||||
[NotMapped] | [NotMapped] | ||||
public string Mobile { get; set; } | public string Mobile { get; set; } | ||||
/// <summary> | |||||
/// 缴费金额合计 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public decimal TotalSJAmount { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FinaChargeStuOrderEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<FinaChargeStuOrderEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | /// <summary> | ||||
/// 获取列表数据的金额合计 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
FinaChargeStuOrderEntity GetListSum(string queryJson); | |||||
/// <summary> | |||||
/// 获取FinaChargeStuOrder表实体数据 | /// 获取FinaChargeStuOrder表实体数据 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -114,6 +114,93 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表数据的金额合计 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public FinaChargeStuOrderEntity GetListSum(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT SUM(t.SJAmount) as TotalSJAmount "); | |||||
strSql.Append(" FROM FinaChargeStuOrder t left join FinaChargeStudent b on t.StuNo=b.StuNo "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.PlaceOrderTime >= @startTime AND t.PlaceOrderTime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["YearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("YearNo", "%" + queryParam["YearNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.YearNo Like @YearNo "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||||
} | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND b.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["MajorNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND b.MajorNo = @MajorNo "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND b.ClassNo = @ClassNo "); | |||||
} | |||||
if (!queryParam["Grade"].IsEmpty()) | |||||
{ | |||||
dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND b.Grade Like @Grade "); | |||||
} | |||||
if (!queryParam["Status"].IsEmpty()) | |||||
{ | |||||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Status = @Status "); | |||||
} | |||||
if (!queryParam["PayMode"].IsEmpty()) | |||||
{ | |||||
dp.Add("PayMode", queryParam["PayMode"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.PayMode = @PayMode "); | |||||
} | |||||
if (!queryParam["OrderType"].IsEmpty()) | |||||
{ | |||||
dp.Add("OrderType", queryParam["OrderType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.OrderType = @OrderType "); | |||||
} | |||||
if (!queryParam["BankOrder"].IsEmpty()) | |||||
{ | |||||
dp.Add("BankOrder", "%" + queryParam["BankOrder"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.BankOrder Like @BankOrder "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindEntity<FinaChargeStuOrderEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取FinaChargeStuOrder表实体数据 | /// 获取FinaChargeStuOrder表实体数据 | ||||
/// </summary> | /// </summary> | ||||