@@ -0,0 +1,132 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-03-09 15:33 | |||||
/// 描 述:学生证打印 | |||||
/// </summary> | |||||
public class StuCardInfoController : MvcControllerBase | |||||
{ | |||||
private StuCardInfoIBLL stuCardInfoIBLL = new StuCardInfoBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <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 = stuCardInfoIBLL.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 StuCardInfoData = stuCardInfoIBLL.GetStuCardInfoEntity( keyValue ); | |||||
var jsonData = new { | |||||
StuCardInfo = StuCardInfoData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
stuCardInfoIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
StuCardInfoEntity entity = strEntity.ToObject<StuCardInfoEntity>(); | |||||
stuCardInfoIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 启用/禁用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="status"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CheckForm(string keyValue, int status) | |||||
{ | |||||
stuCardInfoIBLL.CheckEntity(keyValue, status); | |||||
return Success("操作成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,63 @@ | |||||
@{ | |||||
ViewBag.Title = "学生证打印"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuCardInfo"> | |||||
<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-6 lr-form-item" data-table="StuCardInfo"> | |||||
<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-6 lr-form-item" data-table="StuCardInfo"> | |||||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||||
<div id="Gender" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuCardInfo"> | |||||
<div class="lr-form-item-title">出生日期<font face="宋体">*</font></div> | |||||
<input id="Birthday" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Birthday').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuCardInfo"> | |||||
<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="StuCardInfo"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||||
<div id="Major" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuCardInfo"> | |||||
<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="StuCardInfo"> | |||||
<div class="lr-form-item-title">目的地<font face="宋体">*</font></div> | |||||
<div id="Destination" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuCardInfo"> | |||||
<div class="lr-form-item-title">发证日期<font face="宋体">*</font></div> | |||||
<input id="OpeningDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#OpeningDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuCardInfo"> | |||||
<div class="lr-form-item-title">到期时间<font face="宋体">*</font></div> | |||||
<input id="ExpiryDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExpiryDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCardInfo"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="StuCardInfo" style="display: none; "> | |||||
<div class="lr-form-item-title">审核标记</div> | |||||
<input id="Status" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="StuCardInfo" style="display: none; "> | |||||
<div class="lr-form-item-title">当前信息</div> | |||||
<input id="CreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="StuCardInfo" style="display: none; "> | |||||
<div class="lr-form-item-title">当前信息</div> | |||||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCardInfo/Form.js") |
@@ -0,0 +1,126 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-03-09 15:33 | |||||
* 描 述:学生证打印 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
//监听学号 | |||||
$("#StuNo").on('blur', function () { | |||||
var StuNo = $(this).val(); | |||||
if (StuNo) { | |||||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + StuNo, '', function (data) { | |||||
if (data) { | |||||
$("#StuNo").val(data.StuNo); | |||||
$("#StuName").val(data.StuName); | |||||
$("#Gender").lrselectSet(data.GenderNo); | |||||
$("#Birthday").val(data.Birthday); | |||||
$("#DeptNo").lrselectSet(data.DeptNo); | |||||
$("#Major").lrselectSet(data.MajorNo); | |||||
$("#ClassNo").lrselectSet(data.ClassNo); | |||||
} else { | |||||
learun.alert.warning("学生不存在!"); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
$('#Gender').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Major').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
$('#Destination').lrDataSourceSelect({ code: 'DIC_CITY', value: 'ccode', text: 'cname' }); | |||||
$('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||||
$('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName); | |||||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuCardInfo/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]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
$('#Status').val('0'); | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuCardInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,66 @@ | |||||
@{ | |||||
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="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 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="Gender"></div> | |||||
</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="Major"></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="Destination"></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_check" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-unlock"></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/StuCardInfo/Index.js") |
@@ -0,0 +1,321 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-03-09 15:33 | |||||
* 描 述:学生证打印 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 240, 400); | |||||
//监听学号 | |||||
$("#StuNo").on('blur', function () { | |||||
var StuNo = $(this).val(); | |||||
if (StuNo) { | |||||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + StuNo, '', function (data) { | |||||
if (data) { | |||||
$("#StuNo").val(data.StuNo); | |||||
$("#StuName").val(data.StuName); | |||||
$("#Gender").lrselectSet(data.GenderNo); | |||||
$("#Birthday").val(data.Birthday); | |||||
$("#DeptNo").lrselectSet(data.DeptNo); | |||||
$("#Major").lrselectSet(data.MajorNo); | |||||
$("#ClassNo").lrselectSet(data.ClassNo); | |||||
} else { | |||||
learun.alert.warning("学生不存在!"); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
$('#Gender').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#Major').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
$('#Destination').lrDataSourceSelect({ code: 'DIC_CITY', value: 'ccode', text: 'cname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCardInfo/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCardInfo/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status.indexOf('1') != -1) { | |||||
learun.alert.warning("选中记录中包含已审核项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuCardInfo/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//审核 | |||||
$('#lr_check').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status.indexOf('1') != -1) { | |||||
learun.alert.warning("选中记录中包含已审核项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认审核该项?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuCardInfo/CheckForm', { keyValue: keyValue, Status: 1 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//去审 | |||||
$('#lr_cancel').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
var StatusArr = Status.split(','); | |||||
if ($.inArray('0', StatusArr) != -1 || $.inArray('', StatusArr) != -1) { | |||||
learun.alert.warning("选中记录中包含未审核项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认取消审核该项?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuCardInfo/CheckForm', { keyValue: keyValue, Status: 0 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCardInfo/GetPageList', | |||||
headData: [ | |||||
{ label: "学号", name: "StuNo", width: 200, align: "left" }, | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "Gender", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "男" : "女"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "出生日期", name: "Birthday", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
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: "Major", 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: "Destination", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||||
key: value, | |||||
keyId: 'ccode', | |||||
callback: function (_data) { | |||||
callback(_data['cname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "发证日期", name: "OpeningDate", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
label: "到期时间", name: "ExpiryDate", width: 100, align: "left", | |||||
formatter: function (value) { | |||||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
{ | |||||
label: "审核标记", name: "Status", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||||
} | |||||
}, | |||||
], | |||||
mainId: 'ID', | |||||
isPage: true, | |||||
isMultiselect: true, | |||||
sidx: 'CreateTime desc' | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -128,7 +128,7 @@ | |||||
}, | }, | ||||
filters: { | filters: { | ||||
sex: function (value) { | sex: function (value) { | ||||
return value ? "男生" : "女生"; | |||||
return value ? "男" : "女"; | |||||
}, | }, | ||||
company: function (value) { | company: function (value) { | ||||
@@ -844,6 +844,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInOutController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\TextBookInOutController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuCardInfoController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6687,6 +6688,10 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookOut\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormOut.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormOut.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormOut.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormOut.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuCardInfo\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | <Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-03-09 15:33 | |||||
/// 描 述:学生证打印 | |||||
/// </summary> | |||||
public class StuCardInfoMap : EntityTypeConfiguration<StuCardInfoEntity> | |||||
{ | |||||
public StuCardInfoMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("STUCARDINFO"); | |||||
//主键 | |||||
this.HasKey(t => t.ID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -598,6 +598,7 @@ | |||||
<Compile Include="EducationalAdministration\TextbookInOutMap.cs" /> | <Compile Include="EducationalAdministration\TextbookInOutMap.cs" /> | ||||
<Compile Include="EducationalAdministration\TextBookInMap.cs" /> | <Compile Include="EducationalAdministration\TextBookInMap.cs" /> | ||||
<Compile Include="EducationalAdministration\TextBookOutMap.cs" /> | <Compile Include="EducationalAdministration\TextBookOutMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuCardInfoMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,148 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-03-09 15:33 | |||||
/// 描 述:学生证打印 | |||||
/// </summary> | |||||
public class StuCardInfoBLL : StuCardInfoIBLL | |||||
{ | |||||
private StuCardInfoService stuCardInfoService = new StuCardInfoService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuCardInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuCardInfoService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取StuCardInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public StuCardInfoEntity GetStuCardInfoEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return stuCardInfoService.GetStuCardInfoEntity(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 | |||||
{ | |||||
stuCardInfoService.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> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, StuCardInfoEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
stuCardInfoService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核去审核 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void CheckEntity(string keyValue,int Status) | |||||
{ | |||||
try | |||||
{ | |||||
stuCardInfoService.CheckEntity(keyValue, Status); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,115 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-03-09 15:33 | |||||
/// 描 述:学生证打印 | |||||
/// </summary> | |||||
public class StuCardInfoEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string ID { get; set; } | |||||
/// <summary> | |||||
/// StuNo | |||||
/// </summary> | |||||
[Column("STUNO")] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// StuName | |||||
/// </summary> | |||||
[Column("STUNAME")] | |||||
public string StuName { get; set; } | |||||
/// <summary> | |||||
/// Gender | |||||
/// </summary> | |||||
[Column("GENDER")] | |||||
public bool? Gender { get; set; } | |||||
/// <summary> | |||||
/// Birthday | |||||
/// </summary> | |||||
[Column("BIRTHDAY")] | |||||
public string Birthday { get; set; } | |||||
/// <summary> | |||||
/// DeptNo | |||||
/// </summary> | |||||
[Column("DEPTNO")] | |||||
public string DeptNo { get; set; } | |||||
/// <summary> | |||||
/// Major | |||||
/// </summary> | |||||
[Column("MAJOR")] | |||||
public string Major { get; set; } | |||||
/// <summary> | |||||
/// ClassNo | |||||
/// </summary> | |||||
[Column("CLASSNO")] | |||||
public string ClassNo { get; set; } | |||||
/// <summary> | |||||
/// OpeningDate | |||||
/// </summary> | |||||
[Column("OPENINGDATE")] | |||||
public DateTime? OpeningDate { get; set; } | |||||
/// <summary> | |||||
/// ExpiryDate | |||||
/// </summary> | |||||
[Column("EXPIRYDATE")] | |||||
public DateTime? ExpiryDate { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// CreateUserId | |||||
/// </summary> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// Destination | |||||
/// </summary> | |||||
[Column("DESTINATION")] | |||||
public string Destination { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// Status | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int? Status { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ID = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ID = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,54 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-03-09 15:33 | |||||
/// 描 述:学生证打印 | |||||
/// </summary> | |||||
public interface StuCardInfoIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<StuCardInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取StuCardInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
StuCardInfoEntity GetStuCardInfoEntity(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, StuCardInfoEntity entity); | |||||
/// <summary> | |||||
/// 审核去审核 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void CheckEntity(string keyValue,int Status); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,244 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-03-09 15:33 | |||||
/// 描 述:学生证打印 | |||||
/// </summary> | |||||
public class StuCardInfoService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuCardInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" * "); | |||||
strSql.Append(" FROM StuCardInfo t "); | |||||
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.CreateTime >= @startTime AND t.CreateTime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.StuNo = @StuNo "); | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuName Like @StuName "); | |||||
} | |||||
if (!queryParam["Gender"].IsEmpty()) | |||||
{ | |||||
dp.Add("Gender", queryParam["Gender"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Gender = @Gender "); | |||||
} | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["Major"].IsEmpty()) | |||||
{ | |||||
dp.Add("Major", queryParam["Major"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Major = @Major "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||||
} | |||||
if (!queryParam["Destination"].IsEmpty()) | |||||
{ | |||||
dp.Add("Destination", queryParam["Destination"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Destination = @Destination "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuCardInfoEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取StuCardInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public StuCardInfoEntity GetStuCardInfoEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuCardInfoEntity>(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) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
//单个删除 | |||||
//this.BaseRepository("CollegeMIS").Delete<StuInfoBasicEntity>(t => t.StuId == keyValue); | |||||
//多个删除 | |||||
var keyValueArr = keyValue.Split(','); | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
db.Delete<StuCardInfoEntity>(t => t.ID == item); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, StuCardInfoEntity 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> | |||||
/// <param name="status"></param> | |||||
public void CheckEntity(string keyValue, int status) | |||||
{ | |||||
var db = BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var keyValueArr = keyValue.Split(','); | |||||
List<StuCardInfoEntity> StuCardEntity = new List<StuCardInfoEntity>(); | |||||
if (status == 1) | |||||
{ | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
var list = this.BaseRepository("CollegeMIS").FindEntity<StuCardInfoEntity>(x => x.ID == item); | |||||
if (list != null) | |||||
{ | |||||
list.Status = 1; | |||||
StuCardEntity.Add(list); | |||||
} | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
var list = this.BaseRepository("CollegeMIS").FindEntity<StuCardInfoEntity>(x => x.ID == item); | |||||
if (list != null) | |||||
{ | |||||
list.Status = 0; | |||||
StuCardEntity.Add(list); | |||||
} | |||||
} | |||||
} | |||||
db.Update(StuCardEntity); | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1822,6 +1822,10 @@ | |||||
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutService.cs" /> | <Compile Include="EducationalAdministration\TextBookOut\TextBookOutService.cs" /> | ||||
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutBLL.cs" /> | <Compile Include="EducationalAdministration\TextBookOut\TextBookOutBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutIBLL.cs" /> | <Compile Include="EducationalAdministration\TextBookOut\TextBookOutIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoService.cs" /> | |||||
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuCardInfo\StuCardInfoIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||