@@ -0,0 +1,149 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Web.Mvc; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-10-13 10:31 | |||
/// 描 述:教材领取清单及费用核算 | |||
/// </summary> | |||
public class BookPayDetailController : MvcControllerBase | |||
{ | |||
private BookPayDetailIBLL bookPayDetailIBLL = new BookPayDetailBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormClass() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList(string queryJson) | |||
{ | |||
var data = bookPayDetailIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = bookPayDetailIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var BookPayDetailData = bookPayDetailIBLL.GetEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
BookPayDetail = BookPayDetailData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
bookPayDetailIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, BookPayDetailEntity entity) | |||
{ | |||
bookPayDetailIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ClassForm(string classno,string bookno,string AcademicYearNo,string Semester) | |||
{ | |||
bookPayDetailIBLL.ClassEntity(classno, bookno, AcademicYearNo, Semester); | |||
return Success("生成成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,71 @@ | |||
@{ | |||
ViewBag.Title = "教材领取清单及费用核算"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">身份证<font face="宋体">*</font></div> | |||
<input id="IdCardNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | |||
<div id="Grade" isvalid="yes" checkexpession="NotNull" readonly></div> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">书籍<font face="宋体">*</font></div> | |||
<input id="BookName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">编号</div> | |||
<input id="BookNo" type="text" class="form-control" readonly/> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">数量<font face="宋体">*</font></div> | |||
<input id="Number" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" value="1" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">按时缴费<font face="宋体">*</font></div> | |||
<div id="IsPay" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">缴费时间<font face="宋体">*</font></div> | |||
<input id="PayTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#PayTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">价格</div> | |||
<input id="Price" type="number" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">备注<font face="宋体">*</font></div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPayDetail/Form.js") |
@@ -0,0 +1,183 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-13 10:31 | |||
* 描 述:教材管理学生收费 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initData(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$('#IsPay').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#BookName').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo', | |||
param: { strWhere: " IsDel = '0' and IsValid ='true' " }, | |||
height: 800, | |||
width: 1100, | |||
selectWord: 'textbookname', | |||
value: 'textbookname', | |||
text: 'textbookname', | |||
headData: | |||
[ | |||
{ label: "教材号", name: "publishno", width: 150, align: "left" }, | |||
{ label: "教材名称", name: "textbookname", width: 150, align: "left" }, | |||
{ label: "教材名称", name: "textbookno", width: 150, align: "left" }, | |||
{ label: "作者", name: "firstauthor", width: 150, align: "left" }, | |||
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" }, | |||
{ label: "出版社", name: "publisher", width: 100, align: "left" }, | |||
{ | |||
label: "教材类型", name: "textbooktype", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'TextBookType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "教材性质", name: "textbooknature", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'TextBookNature', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "价格", name: "price", width: 50, align: "left" }, | |||
{ label: "版次", name: "edition", width: 100, align: "left" }, | |||
{ label: "印次", name: "impression", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
////赋值 | |||
$("#Price").val(item.price); | |||
$("#BookNo").val(item.textbookno); | |||
$("#BookName").val(item.textbookname); | |||
} | |||
}); | |||
$('#StuNo').lrGirdSelect({ | |||
// 字段 | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
selectWord: 'stuname', | |||
value: 'stuno', | |||
text: 'stuno', | |||
headData: [ | |||
{ 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: "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: "grade", width: 100, align: "left" }, | |||
{ label: "身份证", name: "identitycardno", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
$("#StuNo").val(item.stuno); | |||
$("#StuName").val(item.stuname); | |||
$("#DeptNo").lrselectSet(item.deptno); | |||
$("#MajorNo").lrselectSet(item.majorno); | |||
$("#ClassNo").lrselectSet(item.classno); | |||
$("#Grade").lrselectSet(item.grade); | |||
$("#IdCardNo").val(item.identitycardno); | |||
} | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "教材领取清单及费用核算"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">书籍<font face="宋体">*</font></div> | |||
<input id="BookName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">编号<font face="宋体">*</font></div> | |||
<input id="BookNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="BookPayDetail"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPayDetail/FormClass.js") |
@@ -0,0 +1,106 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-13 10:31 | |||
* 描 述:教材管理学生收费 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initData(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname',allowSearch: true,maxHeight: 200, }); | |||
$('#BookName').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo', | |||
param: { strWhere: " IsDel = '0' and IsValid ='true' " }, | |||
height: 800, | |||
width: 1100, | |||
selectWord: 'textbookname', | |||
value: 'textbookname', | |||
text: 'textbookname', | |||
headData: | |||
[ | |||
{ label: "教材号", name: "publishno", width: 150, align: "left" }, | |||
{ label: "教材名称", name: "textbookname", width: 150, align: "left" }, | |||
{ label: "教材名称", name: "textbookno", width: 150, align: "left" }, | |||
{ label: "作者", name: "firstauthor", width: 150, align: "left" }, | |||
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" }, | |||
{ label: "出版社", name: "publisher", width: 100, align: "left" }, | |||
{ | |||
label: "教材类型", name: "textbooktype", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'TextBookType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "教材性质", name: "textbooknature", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'TextBookNature', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "价格", name: "price", width: 50, align: "left" }, | |||
{ label: "版次", name: "edition", width: 100, align: "left" }, | |||
{ label: "印次", name: "impression", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
////赋值 | |||
$("#BookNo").val(item.textbookno); | |||
$("#BookName").val(item.textbookname); | |||
} | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/ClassForm', { classno: postData.ClassNo,bookno:postData.BookNo,AcademicYearNo:postData.AcademicYearNo,Semester:postData.Semester },function (res) { | |||
var index = top.layer.getFrameIndex(window.name); | |||
top.layer.close(index); | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,70 @@ | |||
@{ | |||
ViewBag.Title = "教材管理学生收费"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<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> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<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> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年级</div> | |||
<div id="Grade"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">按时缴费</div> | |||
<div id="IsPay"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<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> 新增</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> | |||
<a id="lr_class" class="btn btn-default"><i class="fa fa-plus"></i> 按班级生成</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPayDetail/Index.js") |
@@ -0,0 +1,198 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-13 10:31 | |||
* 描 述:教材管理学生收费 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||
$('#IsPay').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/BookPayDetail/Form', | |||
width: 800, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/BookPayDetail/Form?keyValue=' + keyValue, | |||
width: 800, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 生成 | |||
$('#lr_class').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/BookPayDetail/FormClass', | |||
width: 400, | |||
height: 350, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/BookPayDetail/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/BookPayDetail/GetPageList', | |||
headData: [ | |||
{ label: '编号', name: 'BookNo', width: 80, align: "left" }, | |||
{ label: '书籍', name: 'BookName', width: 200, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 100, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 100, align: "left" }, | |||
{ label: '学号', name: 'StuNo', width: 100, 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: 150, 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: 150, 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: 'CreateUser', width: 200, align: "left" }, | |||
//{ | |||
// label: '创建时间', name: 'CreateTime', width: 200, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||
// } | |||
//}, | |||
//{ label: '修改人员', name: 'ModifyUserId', width: 200, align: "left" }, | |||
//{ | |||
// label: '修改时间', name: 'ModifyDate', width: 200, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||
// } | |||
//}, | |||
{ | |||
label: '按时缴费', name: 'IsPay', width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-danger\">否</span>"; | |||
} | |||
}, | |||
//{ | |||
// label: '支付时间', name: 'PayTime', width: 200, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||
// } | |||
//}, | |||
{ label: '价格', name: 'Price', width: 100, align: "left" ,statistics: true }, | |||
{ label: '数量', name: 'Number', width: 100, align: "left" ,statistics: true }, | |||
{ label: '备注', name: 'Rremark', width: 200, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'BookName,AcademicYearNo,Semester,DeptNo,MajorNo,ClassNo,Grade,StuName desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -320,6 +320,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\AwardAndPunishmentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\AwardPunishInfoController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\BookPayDetailController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\BookPutInController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\BookReturnController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\CertificateManageController.cs" /> | |||
@@ -1057,6 +1058,9 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\FormClass.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPutIn\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPutIn\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookReturn\Form.js" /> | |||
@@ -1104,6 +1108,9 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\FundsApply\StatsIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuArriveSchool\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuArriveSchool\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\FormClass.cshtml" /> | |||
<None Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\SeatForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" /> | |||
@@ -0,0 +1,33 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data.Entity.ModelConfiguration; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace Learun.Application.Mapping.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-03-06 17:19 | |||
/// 描 述:通讯录 | |||
/// </summary> | |||
public class AddressBookMap : EntityTypeConfiguration<BookPayDetailEntity> | |||
{ | |||
public AddressBookMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("BOOKPAYDETAIL"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} |
@@ -75,6 +75,7 @@ | |||
<Compile Include="EducationalAdministration\ArrangeLessonTermAttemperMap.cs" /> | |||
<Compile Include="EducationalAdministration\AwardAndPunishmentMap.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfoMap.cs" /> | |||
<Compile Include="EducationalAdministration\BookPayDetailMap.cs" /> | |||
<Compile Include="EducationalAdministration\Book_putininfoMap.cs" /> | |||
<Compile Include="EducationalAdministration\Book_returninfoMap.cs" /> | |||
<Compile Include="EducationalAdministration\Book_borrowinfoMap.cs" /> | |||
@@ -0,0 +1,169 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-10-13 10:31 | |||
/// 描 述:教材领取清单及费用核算 | |||
/// </summary> | |||
public class BookPayDetailBLL : BookPayDetailIBLL | |||
{ | |||
private BookPayDetailService bookPayDetailService = new BookPayDetailService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<BookPayDetailEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return bookPayDetailService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<BookPayDetailEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return bookPayDetailService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public BookPayDetailEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return bookPayDetailService.GetEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
bookPayDetailService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, BookPayDetailEntity entity) | |||
{ | |||
try | |||
{ | |||
bookPayDetailService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void ClassEntity(string ClassNo, string Book,string AcademicYearNo, string Semester) | |||
{ | |||
try | |||
{ | |||
bookPayDetailService.ClassEntity(ClassNo, Book, AcademicYearNo, Semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,169 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-10-13 10:31 | |||
/// 描 述:教材领取清单及费用核算 | |||
/// </summary> | |||
public class BookPayDetailEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// BookNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("BOOKNO")] | |||
public string BookNo { get; set; } | |||
/// <summary> | |||
/// BookName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("BOOKNAME")] | |||
public string BookName { get; set; } | |||
/// <summary> | |||
/// 学年 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// 学期 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("SEMESTER")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// DeptNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// MajorNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// ClassNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// CLASSNO | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// StuName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// StuNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("STUNO")] | |||
public string StuNo { get; set; } | |||
/// <summary> | |||
/// CreateUser | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CREATEUSER")] | |||
public string CreateUser { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// ModifyUserId | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("MODIFYUSERID")] | |||
public string ModifyUserId { get; set; } | |||
/// <summary> | |||
/// ModifyDate | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("MODIFYDATE")] | |||
public DateTime? ModifyDate { get; set; } | |||
/// <summary> | |||
/// Rremark | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("RREMARK")] | |||
public string Rremark { get; set; } | |||
/// <summary> | |||
/// IsPay | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("ISPAY")] | |||
public bool? IsPay { get; set; } | |||
/// <summary> | |||
/// PayTime | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("PAYTIME")] | |||
public DateTime? PayTime { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// Number | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("NUMBER")] | |||
public decimal? Number { get; set; } | |||
/// <summary> | |||
/// IDCARDNO | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("IDCARDNO")] | |||
public string IdCardNo { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateUser = LoginUserInfo.Get().userId; | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
this.ModifyUserId = LoginUserInfo.Get().userId; | |||
this.ModifyDate = DateTime.Now; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,57 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-10-13 10:31 | |||
/// 描 述:教材领取清单及费用核算 | |||
/// </summary> | |||
public interface BookPayDetailIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<BookPayDetailEntity> GetList( string queryJson ); | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<BookPayDetailEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
BookPayDetailEntity GetEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, BookPayDetailEntity entity); | |||
void ClassEntity(string classno,string bookno,string AcademicYearNo, string Semester); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,287 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-10-13 10:31 | |||
/// 描 述:教材领取清单及费用核算 | |||
/// </summary> | |||
public class BookPayDetailService : RepositoryFactory | |||
{ | |||
#region 构造函数和属性 | |||
private string fieldSql; | |||
/// <summary> | |||
/// 构造方法 | |||
/// </summary> | |||
public BookPayDetailService() | |||
{ | |||
fieldSql = @" t.* "; | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">条件参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<BookPayDetailEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
//参考写法 | |||
//var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
//var dp = new DynamicParameters(new { }); | |||
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(fieldSql); | |||
strSql.Append(" FROM BookPayDetail t "); | |||
return this.BaseRepository("CollegeMIS").FindList<BookPayDetailEntity>(strSql.ToString()); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表分页数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">条件参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<BookPayDetailEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(fieldSql); | |||
strSql.Append(" FROM BookPayDetail t where 1=1"); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["IsPay"].IsEmpty()) | |||
{ | |||
dp.Add("IsPay", queryParam["IsPay"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsPay = @IsPay "); | |||
} | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||
} | |||
if (!queryParam["Semester"].IsEmpty()) | |||
{ | |||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Semester = @Semester "); | |||
} | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuNo like @StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
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); | |||
strSql.Append(" AND t.MajorNo=@MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.ClassNo=@ClassNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString() + DbType.String); | |||
strSql.Append(" AND t.Grade=@Grade "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<BookPayDetailEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public BookPayDetailEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<BookPayDetailEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<BookPayDetailEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// </summary> | |||
public void SaveEntity(string keyValue, BookPayDetailEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void ClassEntity(string Class, string book, string AcademicYearNo, string Semester) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var entity = db.FindEntity<TextBookInfoEntity>(x => x.TextBookNo == book); | |||
if (entity != null) | |||
{ | |||
var ss = new List<BookPayDetailEntity>(); | |||
var list = db.FindList<StuInfoBasicEntity>(x => x.CheckMark == "1" && x.ClassNo == Class).ToList(); | |||
if (list != null) | |||
{ | |||
for (int i = 0; i < list.Count(); i++) | |||
{ | |||
var inserts = new BookPayDetailEntity(); | |||
inserts.BookNo = entity.TextBookNo; | |||
inserts.BookName = entity.TextBookName; | |||
inserts.AcademicYearNo = AcademicYearNo; | |||
inserts.Semester = Semester; | |||
inserts.DeptNo = list[i].DeptNo; | |||
inserts.MajorNo = list[i].MajorNo; | |||
inserts.ClassNo = list[i].ClassNo; | |||
inserts.Grade = list[i].Grade; | |||
inserts.IdCardNo = list[i].IdentityCardNo; | |||
inserts.StuName = list[i].StuName; | |||
inserts.StuNo = list[i].StuNo; | |||
inserts.IsPay = false; | |||
inserts.Price = entity.Price; | |||
inserts.Number = 1; | |||
inserts.Create(); | |||
ss.Add(inserts); | |||
} | |||
} | |||
db.Insert(ss); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -125,6 +125,10 @@ | |||
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoService.cs" /> | |||
<Compile Include="EducationalAdministration\BCdCultureDegree\BCdCultureDegreeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\BookPayDetail\BookPayDetailBLL.cs" /> | |||
<Compile Include="EducationalAdministration\BookPayDetail\BookPayDetailEntity.cs" /> | |||
<Compile Include="EducationalAdministration\BookPayDetail\BookPayDetailIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\BookPayDetail\BookPayDetailService.cs" /> | |||
<Compile Include="EducationalAdministration\BookPutIn\BookPutInBLL.cs" /> | |||
<Compile Include="EducationalAdministration\BookPutIn\BookPutInIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\BookPutIn\BookPutInService.cs" /> | |||