Browse Source

缴费学生信息功能完善

西昌缴费二期
fzp 1 year ago
parent
commit
b46de8da77
6 changed files with 332 additions and 81 deletions
  1. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeStudentController.cs
  2. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStudent/Index.cshtml
  3. +109
    -74
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStudent/Index.js
  4. +76
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentBLL.cs
  5. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentIBLL.cs
  6. +104
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentService.cs

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeStudentController.cs View File

@@ -80,7 +80,36 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
#endregion

#region 提交数据
[HttpPost]
[AjaxOnly]
public ActionResult Lock(string keyValue)
{
finaChargeStudentIBLL.Lock(keyValue);
return Success("审核成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult UnLock(string keyValue)
{
finaChargeStudentIBLL.UnLock(keyValue);
return Success("去审核成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult ImportForm()
{
finaChargeStudentIBLL.ImportForm();
return Success("导入成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult UpdateForm()
{
finaChargeStudentIBLL.UpdateForm();
return Success("更新成功!");
}
/// <summary>
/// 删除实体数据
/// </summary>
@@ -90,6 +119,12 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
//判断有无余额数据
var stuchargeinfo = finaChargeStudentIBLL.GetFinaChargeStudentEntity(keyValue);
if (stuchargeinfo.FSBlance!=0)
{
return Fail("本学生存在缴费数据,不能删除。请核对!");
}
finaChargeStudentIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}


+ 4
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStudent/Index.cshtml View File

@@ -43,9 +43,11 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;导入学生</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-edit"></i>&nbsp;更新学生信息</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;审核</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;去审核</a>
</div>
</div>
</div>


+ 109
- 74
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStudent/Index.js View File

@@ -16,49 +16,76 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 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' });
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
learun.layerConfirm('是否确认导入!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/ImportForm', {}, function () {
refreshGirdData();
});
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
learun.layerConfirm('是否确认更新!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/UpdateForm', {},function () {
refreshGirdData();
});
}
});
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FSId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
//启用
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FSId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
var CheckMark = $('#gridtable').jfGridValue('F_CheckMark').toString();
if (CheckMark.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/Lock', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//停用
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FSId');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('F_CheckMark').toString();
if (CheckMark.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已去审项目!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/UnLock', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -68,66 +95,74 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeStudent/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 100, align: "left"},
{ label: "姓名", name: "StuName", width: 100, align: "left"},
{ label: "性别", name: "GenderNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'usersexbit',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "身份证号", name: "IdentityCardNo", width: 100, align: "left"},
{ label: "系部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}},
{ 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: "Mobile", width: 100, align: "left"},
{ label: "学生总余额", name: "FSBlance", width: 100, align: "left"},
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{
label: "性别", name: "GenderNo", width: 80, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "男" : "女";
}
},
{ label: "身份证号", name: "IdentityCardNo", width: 200, align: "left" },
{
label: "系部", name: "DeptNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 200, 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: 200, 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: "Mobile", width: 100, align: "left" },
{ label: "学生总余额", name: "FSBlance", width: 100, align: "left" },
{
label: "审核标志", name: "F_CheckMark", width: 80, align: "left", formatter: function (cellvalue, rowObject) {
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId:'FSId',
mainId: 'FSId',
isMultiselect: true,
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 76
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentBLL.cs View File

@@ -119,6 +119,82 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
}
}

public void Lock(string keyValue)
{
try
{
finaChargeStudentService.Lock(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void UnLock(string keyValue)
{
try
{
finaChargeStudentService.UnLock(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void ImportForm()
{
try
{
finaChargeStudentService.ImportForm();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void UpdateForm()
{
try
{
finaChargeStudentService.UpdateForm();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentIBLL.cs View File

@@ -44,5 +44,9 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
void SaveEntity(string keyValue, FinaChargeStudentEntity entity);
#endregion

void Lock(string keyValue);
void UnLock(string keyValue);
void ImportForm();
void UpdateForm();
}
}

+ 104
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStudent/FinaChargeStudentService.cs View File

@@ -65,20 +65,20 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String);
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String);
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo",queryParam["ClassNo"].ToString(), DbType.String);
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
return this.BaseRepository("CollegeMIS").FindList<FinaChargeStudentEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<FinaChargeStudentEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -129,7 +129,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
this.BaseRepository("CollegeMIS").Delete<FinaChargeStudentEntity>(t=>t.FSId == keyValue);
this.BaseRepository("CollegeMIS").Delete<FinaChargeStudentEntity>(t => t.FSId == keyValue);
}
catch (Exception ex)
{
@@ -179,5 +179,104 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement

#endregion

public void Lock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//单个启用
//this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set CheckMark=1 where ClassId='" + keyValue + "'");

//多个启用
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update FinaChargeStudent set F_CheckMark=1 where FSId='" + item + "'");
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void UnLock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//单个停用
//this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set CheckMark=0 where ClassId='" + keyValue + "'");

//多个停用
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update FinaChargeStudent set F_CheckMark=0 where FSId='" + item + "'");
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void ImportForm()
{
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql(@"insert into FinaChargeStudent(FSId, StuNo, StuName, GenderNo, IdentityCardNo, DeptNo, MajorNo, ClassNo, Mobile, FSBlance, F_CheckMark)
select newid(), stuno, stuname, genderno, identitycardno, deptno, majorno, classno, mobile, 0, 1 from StuInfoBasic a where a.checkmark = 1 and stuno not in(select stuno from FinaChargeStudent)");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void UpdateForm()
{
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql(@"update [FinaChargeStudent] set StuName=a.StuName,GenderNo=a.GenderNo,IdentityCardNo=a.IdentityCardNo,DeptNo=a.DeptNo, MajorNo=a.MajorNo, ClassNo=a.ClassNo, Mobile=a.Mobile
from StuInfoBasic a left join [FinaChargeStudent] b on a.stuno=b.stuno");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

Loading…
Cancel
Save