@@ -47,6 +47,13 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||||
#region 获取数据 | #region 获取数据 | ||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetYearTree() | |||||
{ | |||||
var data = finaChargeStuYearIBLL.GetTree(); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -24,12 +24,24 @@ | |||||
<input id="StuNo" type="text" class="form-control"/> | <input id="StuNo" type="text" class="form-control"/> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">缴费年度</div> | |||||
<input id="FSYear" type="text" class="form-control"/> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="StuName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">身份证号</div> | |||||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">缴费状态</div> | |||||
<div id="PayFeeStatus"></div> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -42,7 +54,6 @@ | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 生成缴费信息</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 生成缴费信息</a> | ||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 退费</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 退费</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 作废</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
// 初始化左侧树形数据 | // 初始化左侧树形数据 | ||||
$('#dataTree').lrtree({ | $('#dataTree').lrtree({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree', | |||||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYear/GetYearTree', | |||||
nodeClick: function (item) { | nodeClick: function (item) { | ||||
fSYear = item.value; | fSYear = item.value; | ||||
page.search(); | page.search(); | ||||
@@ -24,7 +24,10 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | |||||
}, 250, 400); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#PayFeeStatus').lrDataItemSelect({ code: 'PayStatus' }); | $('#PayFeeStatus').lrDataItemSelect({ code: 'PayStatus' }); | ||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
@@ -43,13 +46,13 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
// 编辑 | |||||
// 退费 | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('FSYId'); | var keyValue = $('#gridtable').jfGridValue('FSYId'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | |||||
title: '退费', | |||||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYear/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYear/Form?keyValue=' + keyValue, | ||||
width: 600, | width: 600, | ||||
height: 400, | height: 400, | ||||
@@ -59,19 +62,6 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('FSYId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYear/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -7,6 +7,48 @@ | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学号</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="StuName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">收费项目名称</div> | |||||
<input id="ChargeItemName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">收费项目编号</div> | |||||
<input id="ChargeItemCode" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">缴费年度</div> | |||||
<div id="FSYear"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">缴费状态</div> | |||||
<div id="PayFeeStatus"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">收费项目类型</div> | |||||
<div id="ChargeItemType"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | |||||
</div> | |||||
</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"> | ||||
@@ -5,6 +5,7 @@ | |||||
* 描 述:FinaChargeStuYearItem | * 描 述:FinaChargeStuYearItem | ||||
*/ | */ | ||||
var refreshGirdData; | var refreshGirdData; | ||||
var sYear; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
@@ -13,6 +14,18 @@ var bootstrap = function ($, learun) { | |||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#SYear').lrselect({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
var now = new Date(); | |||||
sYear = now.getFullYear(); | |||||
$('#SYear').lrselectSet(sYear); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#PayFeeStatus').lrDataItemSelect({ code: 'PayStatus' }); | |||||
$('#ChargeItemType').lrDataItemSelect({ code: 'ChargeItemType' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -46,11 +59,11 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 删除 | |||||
// 作废 | |||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('FSYIId'); | var keyValue = $('#gridtable').jfGridValue('FSYIId'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
learun.layerConfirm('是否确认作废该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/DeleteForm', { keyValue: keyValue}, function () { | learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/DeleteForm', { keyValue: keyValue}, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -62,9 +75,38 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/GetPageList', | url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStuYearItem/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "缴费年度", name: "FSYear", width: 100, align: "left" }, | |||||
{ label: "收费项目编号", name: "ChargeItemCode", width: 100, align: "left"}, | { label: "收费项目编号", name: "ChargeItemCode", width: 100, align: "left"}, | ||||
{ label: "收费项名称", name: "ChargeItemName", width: 100, align: "left"}, | { label: "收费项名称", name: "ChargeItemName", width: 100, align: "left"}, | ||||
{ label: "收费项目类型", name: "ChargeItemType", width: 100, align: "left", | { label: "收费项目类型", name: "ChargeItemType", width: 100, align: "left", | ||||
@@ -77,8 +119,9 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}}, | }}, | ||||
{ label: "应缴金额", name: "Standard", width: 100, align: "left"}, | |||||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left"}, | |||||
{ label: "收费标准", name: "Standard", width: 100, align: "left"}, | |||||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, | |||||
{ label: "应缴余额", name: "FSBlance", width: 100, align: "left" }, | |||||
{ label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | { label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op,$cell) { | formatterAsync: function (callback, value, row, op,$cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
@@ -88,7 +131,14 @@ var bootstrap = function ($, learun) { | |||||
callback(_data.text); | callback(_data.text); | ||||
} | } | ||||
}); | }); | ||||
}}, | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否作废", name: "F_DeleteMark", width: 100, align: "left", | |||||
formatter: function (cellvalue, rowObject) { | |||||
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
} | |||||
], | ], | ||||
mainId:'FSYIId', | mainId:'FSYIId', | ||||
isPage: true | isPage: true | ||||
@@ -97,6 +147,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.SYear = sYear; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -138,6 +138,41 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
} | } | ||||
} | } | ||||
public List<TreeModel> GetTree() | |||||
{ | |||||
try | |||||
{ | |||||
var list = finaChargeStuYearService.GetYearList(); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (var item in list) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id =item.FSYear.ToString(), | |||||
text = item.FSYear.ToString(), | |||||
value = item.FSYear.ToString(), | |||||
showcheck = false, | |||||
checkstate = 0, | |||||
isexpand = true, | |||||
parentId = "" | |||||
}; | |||||
treeList.Add(node); | |||||
} | |||||
return treeList.ToTree(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -69,6 +69,18 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] | |||||
public string DeptNo { get; set; } | |||||
[NotMapped] | |||||
public string MajorNo { get; set; } | |||||
[NotMapped] | |||||
public string ClassNo { get; set; } | |||||
[NotMapped] | |||||
public string Grade { get; set; } | |||||
[NotMapped] | |||||
public string IdentityCardNo { get; set; } | |||||
[NotMapped] | |||||
public string StuName { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
#endregion | #endregion | ||||
void SaveGenerateByCondition(FinaChargeStuYearEntity entity); | void SaveGenerateByCondition(FinaChargeStuYearEntity entity); | ||||
List<TreeModel> GetTree(); | |||||
} | } | ||||
} | } |
@@ -31,30 +31,46 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.FSYId, | |||||
t.StuNo, | |||||
t.FSYear, | |||||
t.YJAmount, | |||||
t.SJAmount, | |||||
t.FSBlance, | |||||
t.PayFeeStatus | |||||
"); | |||||
strSql.Append(" FROM FinaChargeStuYear t "); | |||||
strSql.Append("SELECT t.*,b.DeptNo,b.MajorNo,b.ClassNo,b.Grade,b.IdentityCardNo,b.StuName "); | |||||
strSql.Append(" FROM FinaChargeStuYear t left join FinaChargeStudent b on t.StuNo=b.StuNo "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["StuNo"].IsEmpty()) | if (!queryParam["StuNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||||
dp.Add("StuNo", "" + queryParam["StuNo"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND b.StuNo = @StuNo "); | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND b.StuName Like @StuName "); | |||||
} | |||||
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["IdentityCardNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("IdentityCardNo", "" + queryParam["IdentityCardNo"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND b.IdentityCardNo = @IdentityCardNo "); | |||||
} | } | ||||
if (!queryParam["FSYear"].IsEmpty()) | if (!queryParam["FSYear"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("FSYear", "%" + queryParam["FSYear"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.FSYear Like @FSYear "); | |||||
dp.Add("FSYear", "" + queryParam["FSYear"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.FSYear = @FSYear "); | |||||
} | } | ||||
if (!queryParam["PayFeeStatus"].IsEmpty()) | if (!queryParam["PayFeeStatus"].IsEmpty()) | ||||
{ | { | ||||
@@ -265,5 +281,26 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<FinaChargeStuYearEntity> GetYearList() | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("select [FSYear] from [dbo].[FinaChargeStuYear] group by [FSYear] order by[FSYear] "); | |||||
return this.BaseRepository("CollegeMIS").FindList<FinaChargeStuYearEntity>(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -110,6 +110,16 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] | |||||
public string StuNo { get; set; } | |||||
[NotMapped] | |||||
public string StuName { get; set; } | |||||
[NotMapped] | |||||
public string MajorNo { get; set; } | |||||
[NotMapped] | |||||
public string ClassNo { get; set; } | |||||
[NotMapped] | |||||
public string DeptNo { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -30,21 +30,47 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.FSYIId, | |||||
t.ChargeItemCode, | |||||
t.ChargeItemName, | |||||
t.ChargeItemType, | |||||
t.Standard, | |||||
t.SJAmount, | |||||
t.PayFeeStatus | |||||
"); | |||||
strSql.Append(" FROM FinaChargeStuYearItem t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
strSql.Append("SELECT t.*,b.StuNo,b.StuName,b.MajorNo,b.ClassNo,b.DeptNo,b.IdentityCardNo "); | |||||
strSql.Append(" FROM FinaChargeStuYearItem t left join FinaChargeStuYear a on t.FSYId=a.FSYId left join FinaChargeStudent b on a.StuNo=b.StuNo "); | |||||
strSql.Append(" WHERE 1=1 and b.F_CheckMark=1 "); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", "" + queryParam["StuNo"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND b.StuNo = @StuNo "); | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND b.StuName Like @StuName "); | |||||
} | |||||
if (!queryParam["MajorNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("MajorNo", "" + queryParam["MajorNo"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND b.MajorNo = @MajorNo "); | |||||
} | |||||
if (!queryParam["FSYear"].IsEmpty()) | |||||
{ | |||||
dp.Add("FSYear", "" + queryParam["FSYear"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND a.FSYear = @FSYear "); | |||||
} | |||||
if (!queryParam["ChargeItemCode"].IsEmpty()) | |||||
{ | |||||
dp.Add("ChargeItemCode", "%" + queryParam["ChargeItemCode"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.ChargeItemCode Like @ChargeItemCode "); | |||||
} | |||||
if (!queryParam["ChargeItemName"].IsEmpty()) | |||||
{ | |||||
dp.Add("ChargeItemName", "%" + queryParam["ChargeItemName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.ChargeItemName Like @ChargeItemName "); | |||||
} | |||||
if (!queryParam["ChargeItemType"].IsEmpty()) | |||||
{ | |||||
dp.Add("ChargeItemType", "" + queryParam["ChargeItemType"].ToString() + "", DbType.String); | |||||
strSql.Append(" AND t.ChargeItemType = @ChargeItemType "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<FinaChargeStuYearItemEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<FinaChargeStuYearItemEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||