@@ -0,0 +1,153 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using Learun.Application.TwoDevelopment.LR_CodeDemo; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-14 11:52 | |||
/// 描 述:学生撤销违纪管理 | |||
/// </summary> | |||
public class StuDisciplineManagementController : MvcControllerBase | |||
{ | |||
private StuDisciplineManagementIBLL stuDisciplineManagementIBLL = new StuDisciplineManagementBLL(); | |||
#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 FormView() | |||
{ | |||
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 = stuDisciplineManagementIBLL.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 StuDisciplineManagementData = stuDisciplineManagementIBLL.GetStuDisciplineManagementEntity( keyValue ); | |||
var jsonData = new { | |||
StuDisciplineManagement = StuDisciplineManagementData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var StuDisciplineManagementData = stuDisciplineManagementIBLL.GetEntityByProcessId( processId ); | |||
var jsonData = new { | |||
StuDisciplineManagement = StuDisciplineManagementData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
stuDisciplineManagementIBLL.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) | |||
{ | |||
StuDisciplineManagementEntity entity = strEntity.ToObject<StuDisciplineManagementEntity>(); | |||
entity.CheckStatus = "0"; | |||
stuDisciplineManagementIBLL.SaveEntity(keyValue,entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoSubmit(string keyValue, string status, string processId) | |||
{ | |||
stuDisciplineManagementIBLL.DoSubmit(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "学生违纪管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">违纪学生<font face="宋体">*</font></div> | |||
<div id="StuNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">违纪时间<font face="宋体">*</font></div> | |||
<input id="DisciplineTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#DisciplineTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">处理老师<font face="宋体">*</font></div> | |||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">处理时间</div> | |||
<input id="DealTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#DealTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">事情经过</div> | |||
<textarea id="Things" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">学生态度</div> | |||
<textarea id="StudentAttitude" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">班主任意见</div> | |||
<textarea id="TeacherOpinion" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement" > | |||
<div class="lr-form-item-title">家长意见</div> | |||
<textarea id="ParentsOpinion" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.js") |
@@ -0,0 +1,113 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-03-26 15:23 | |||
* 描 述:学生违纪管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if (!!data) { | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#StuNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||
param: { strWhere: "1=1 " }, | |||
value: "StuNo", | |||
text: "StuName" | |||
}); | |||
//$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'StuDisciplineManagement' && data[id]) { | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "学生违纪管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">违纪学生<font face="宋体">*</font></div> | |||
<div id="StuNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">违纪时间<font face="宋体">*</font></div> | |||
<input id="DisciplineTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">处理老师<font face="宋体">*</font></div> | |||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">处理时间</div> | |||
<input id="DealTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">事情经过</div> | |||
<textarea id="Things" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">学生态度</div> | |||
<textarea id="StudentAttitude" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">班主任意见</div> | |||
<textarea id="TeacherOpinion" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">家长意见</div> | |||
<textarea id="ParentsOpinion" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/FormView.js") |
@@ -0,0 +1,113 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-03-26 15:23 | |||
* 描 述:学生违纪管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if (!!data) { | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#StuNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||
param: { strWhere: "1=1 " }, | |||
value: "StuNo", | |||
text: "StuName" | |||
}); | |||
//$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'StuDisciplineManagement' && data[id]) { | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
/**/ | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">违纪学生</div> | |||
<div id="StuNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">处理老师</div> | |||
<div id="EmpNo"></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> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js") |
@@ -0,0 +1,207 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-03-26 15:23 | |||
* 描 述:学生违纪管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#StuNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||
param: { strWhere: "1=1 " }, | |||
value: "StuNo", | |||
text: "StuName" | |||
}); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DoSubmit', { keyValue: keyValue, status: "1", processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetPageList', | |||
headData: [ | |||
{ | |||
label: "违纪学生", name: "StuNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
key: value, | |||
keyId: 'stuno', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "违纪时间", name: "DisciplineTime", width: 120, align: "left" }, | |||
{ | |||
label: "处理老师", name: "EmpNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "处理时间", name: "DealTime", width: 120, align: "left" }, | |||
{ label: "事情经过", name: "Things", width: 200, align: "left" }, | |||
{ label: "学生态度", name: "StudentAttitude", width: 100, align: "left" }, | |||
{ label: "班主任意见", name: "TeacherOpinion", width: 100, align: "left" }, | |||
{ label: "家长意见", name: "ParentsOpinion", width: 100, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-warning\">审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">审核通过</span>" : cellvalue == "3" ? "<span class=\"label label-danger\">审核未通过</span>" : "<span class=\"label label-default\">草稿</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: "CreateTime desc" | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (!!res) { | |||
if (res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: 'StuDisciplineManagement',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -337,6 +337,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipxjController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ScoreStatisticsController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuAttendanceController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuDisciplineManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuCancelDisciplineManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuCancelLeaveManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" /> | |||
@@ -1081,6 +1082,9 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\AmountForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\HelpChange.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IndexHelpChange.js" /> | |||
@@ -7658,6 +7662,9 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormOut.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormReturn.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\IndexReport.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\Index.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-03-26 15:23 | |||
/// 描 述:学生违纪管理 | |||
/// </summary> | |||
public class StuCancelDisciplineManagementMap : EntityTypeConfiguration<StuCancelDisciplineManagementEntity> | |||
{ | |||
public StuCancelDisciplineManagementMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("STUCANCELDISCIPLINEMANAGEMENT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -10,7 +10,7 @@ namespace Learun.Application.Mapping | |||
/// 日 期:2021-03-26 15:23 | |||
/// 描 述:学生违纪管理 | |||
/// </summary> | |||
public class StuDisciplineManagementMap : EntityTypeConfiguration<StuCancelDisciplineManagementEntity> | |||
public class StuDisciplineManagementMap : EntityTypeConfiguration<StuDisciplineManagementEntity> | |||
{ | |||
public StuDisciplineManagementMap() | |||
{ | |||
@@ -91,6 +91,7 @@ | |||
<Compile Include="EducationalAdministration\ScholarshipMap.cs" /> | |||
<Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuCancleDisciplineManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuGrantMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" /> | |||
@@ -0,0 +1,194 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-14 11:52 | |||
/// 描 述:学生撤销违纪管理 | |||
/// </summary> | |||
public class StuDisciplineManagementBLL : StuDisciplineManagementIBLL | |||
{ | |||
private StuDisciplineManagementService stuDisciplineManagementService = new StuDisciplineManagementService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuDisciplineManagementEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuDisciplineManagementService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuDisciplineManagement表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public StuDisciplineManagementEntity GetStuDisciplineManagementEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return stuDisciplineManagementService.GetStuDisciplineManagementEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
public StuDisciplineManagementEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return stuDisciplineManagementService.GetEntityByProcessId(processId); | |||
} | |||
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 | |||
{ | |||
stuDisciplineManagementService.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, StuDisciplineManagementEntity entity) | |||
{ | |||
try | |||
{ | |||
stuDisciplineManagementService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoSubmit(string keyValue, string status, string processId) | |||
{ | |||
try | |||
{ | |||
stuDisciplineManagementService.DoSubmit(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||
{ | |||
try | |||
{ | |||
stuDisciplineManagementService.ChangeStatusByProcessId(status, processId, userId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-14 11:52 | |||
/// 描 述:学生撤销违纪管理 | |||
/// </summary> | |||
public class StuDisciplineManagementEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 事情经过 | |||
/// </summary> | |||
[Column("THINGS")] | |||
public string Things { get; set; } | |||
/// <summary> | |||
/// StuNo | |||
/// </summary> | |||
[Column("STUNO")] | |||
public string StuNo { get; set; } | |||
/// <summary> | |||
/// 创建用户 | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public string CheckStatus { get; set; } | |||
/// <summary> | |||
/// 审核备注 | |||
/// </summary> | |||
[Column("CHECKREMARK")] | |||
public string CheckRemark { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CHECKTIME")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 流程Id | |||
/// </summary> | |||
[Column("PROCESSID")] | |||
public string ProcessId { get; set; } | |||
/// <summary> | |||
/// DisciplineTime | |||
/// </summary> | |||
[Column("DISCIPLINETIME")] | |||
public DateTime? DisciplineTime { get; set; } | |||
/// <summary> | |||
/// DealTime | |||
/// </summary> | |||
[Column("DEALTIME")] | |||
public DateTime? DealTime { get; set; } | |||
/// <summary> | |||
/// StudentAttitude | |||
/// </summary> | |||
[Column("STUDENTATTITUDE")] | |||
public string StudentAttitude { get; set; } | |||
/// <summary> | |||
/// TEACHEROPINION | |||
/// </summary> | |||
[Column("TEACHEROPINION")] | |||
public string TeacherOpinion { get; set; } | |||
/// <summary> | |||
/// ParentsOpinion | |||
/// </summary> | |||
[Column("PARENTSOPINION")] | |||
public string ParentsOpinion { get; set; } | |||
/// <summary> | |||
/// EmpNo | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { 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,66 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-14 11:52 | |||
/// 描 述:学生撤销违纪管理 | |||
/// </summary> | |||
public interface StuDisciplineManagementIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<StuDisciplineManagementEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取StuDisciplineManagement表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
StuDisciplineManagementEntity GetStuDisciplineManagementEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
StuDisciplineManagementEntity GetEntityByProcessId(string processId); | |||
#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, StuDisciplineManagementEntity entity); | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DoSubmit(string keyValue, string status, string processId); | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void ChangeStatusByProcessId(string status, string processId, string userId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,223 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-14 11:52 | |||
/// 描 述:学生撤销违纪管理 | |||
/// </summary> | |||
public class StuDisciplineManagementService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuDisciplineManagementEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var basedbname = BaseRepository().getDbConnection().Database; | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.* "); | |||
strSql.Append(" FROM StuDisciplineManagement t "); | |||
strSql.Append(" left join " + basedbname + ".dbo.LR_Base_User u on t.CreateUserId=u.F_UserId "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND u.StuNo =StuNo "); | |||
} | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND u.EmpNo =EmpNo "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuDisciplineManagementEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuDisciplineManagement表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public StuDisciplineManagementEntity GetStuDisciplineManagementEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<StuDisciplineManagementEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
public StuDisciplineManagementEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<StuDisciplineManagementEntity>(t => t.ProcessId == processId); | |||
} | |||
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<StuDisciplineManagementEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, StuDisciplineManagementEntity 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 DoSubmit(string keyValue, string status, string processId) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuDisciplineManagement set CheckStatus='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuDisciplineManagement set CheckStatus='" + status + "',CheckUserId='" + userId + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -200,6 +200,10 @@ | |||
<Compile Include="EducationalAdministration\ScoreStatistics\ScoreStatisticsIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ScoreStatistics\ScoreStatisticsService.cs" /> | |||
<Compile Include="EducationalAdministration\SignUpHelper.cs" /> | |||
<Compile Include="EducationalAdministration\StuDisciplineManagement\StuDisciplineManagementBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuDisciplineManagement\StuDisciplineManagementEntity.cs" /> | |||
<Compile Include="EducationalAdministration\StuDisciplineManagement\StuDisciplineManagementIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuDisciplineManagement\StuDisciplineManagementService.cs" /> | |||
<Compile Include="EducationalAdministration\StuCancelDisciplineManagement\StuCancelDisciplineManagementBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuCancelDisciplineManagement\StuCancelDisciplineManagementEntity.cs" /> | |||
<Compile Include="EducationalAdministration\StuCancelDisciplineManagement\StuCancelDisciplineManagementIBLL.cs" /> | |||