@@ -4,6 +4,7 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using Learun.Application.TwoDevelopment.LR_CodeDemo; | using Learun.Application.TwoDevelopment.LR_CodeDemo; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | ||||
{ | { | ||||
@@ -47,6 +48,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 主页面-学工查看 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexOfTeacher() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -72,6 +82,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListOfTeacher(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = stuCancelDisciplineManagementIBLL.GetPageListOfTeacher(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取表单数据 | /// 获取表单数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -129,8 +161,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
var userInfo = LoginUserInfo.Get(); | |||||
StuCancelDisciplineManagementEntity entity = strEntity.ToObject<StuCancelDisciplineManagementEntity>(); | StuCancelDisciplineManagementEntity entity = strEntity.ToObject<StuCancelDisciplineManagementEntity>(); | ||||
entity.CheckStatus = "0"; | entity.CheckStatus = "0"; | ||||
entity.CreateTime = DateTime.Now; | |||||
entity.CreateUserId = userInfo.userId; | |||||
entity.CreateUserNo = userInfo.account; | |||||
stuCancelDisciplineManagementIBLL.SaveEntity(keyValue,entity); | stuCancelDisciplineManagementIBLL.SaveEntity(keyValue,entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -48,6 +48,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 主页面-学生查看 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexOfStudent() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -3,21 +3,17 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuCancelDisciplineManagement" > | |||||
<div class="lr-form-item-title">申请人</div> | |||||
<input id="CreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | |||||
<div class="lr-form-item-title">事情经过<font face="宋体">*</font></div> | |||||
<textarea id="Things" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuCancelDisciplineManagement" > | |||||
<div class="lr-form-item-title">申请时间</div> | |||||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | |||||
<div class="lr-form-item-title">撤销原因<font face="宋体">*</font></div> | |||||
<textarea id="Reason" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement" > | |||||
<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="StuCancelDisciplineManagement" > | |||||
<div class="lr-form-item-title">撤销原因</div> | |||||
<textarea id="Reason" class="form-control" style="height:100px;" ></textarea> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | |||||
<div class="lr-form-item-title">证明材料</div> | |||||
<div id="Files"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Form.js") |
@@ -6,6 +6,7 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var DisciplineId = request('DisciplineId');//违纪表主键 | |||||
// 设置权限 | // 设置权限 | ||||
var setAuthorize; | var setAuthorize; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
@@ -42,9 +43,7 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#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')); | |||||
$('#Files').lrUploader(); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -90,6 +89,8 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | var formData = $('body').lrGetFormData(); | ||||
//违纪表主键 | |||||
formData.DisciplineId = DisciplineId; | |||||
if (!!processId) { | if (!!processId) { | ||||
formData.ProcessId = processId; | formData.ProcessId = processId; | ||||
} | } | ||||
@@ -3,21 +3,17 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuCancelDisciplineManagement"> | |||||
<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-6 lr-form-item" data-table="StuCancelDisciplineManagement"> | |||||
<div class="lr-form-item-title">申请时间</div> | |||||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | |||||
<div class="lr-form-item-title">事情经过<font face="宋体">*</font></div> | |||||
<textarea id="Things" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | ||||
<div class="lr-form-item-title">事情经过</div> | |||||
<textarea id="Things" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||||
<div class="lr-form-item-title">撤销原因<font face="宋体">*</font></div> | |||||
<textarea id="Reason" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuCancelDisciplineManagement"> | ||||
<div class="lr-form-item-title">撤销原因</div> | |||||
<textarea id="Reason" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||||
<div class="lr-form-item-title">证明材料</div> | |||||
<div id="Files"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/FormView.js") |
@@ -6,6 +6,7 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var DisciplineId = request('DisciplineId');//违纪表主键 | |||||
// 设置权限 | // 设置权限 | ||||
var setAuthorize; | var setAuthorize; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
@@ -43,9 +44,7 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#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')); | |||||
$('#Files').lrUploader(); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -90,6 +89,8 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | var formData = $('body').lrGetFormData(); | ||||
//违纪表主键 | |||||
formData.DisciplineId = DisciplineId; | |||||
if(!!processId){ | if(!!processId){ | ||||
formData.ProcessId =processId; | formData.ProcessId =processId; | ||||
} | } | ||||
@@ -13,8 +13,8 @@ | |||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学生姓名</div> | |||||
<input id="StuName" type="text" class="form-control"/> | |||||
<div class="lr-form-item-title">处分类别</div> | |||||
<input id="SType" type="text" class="form-control"/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -25,7 +25,7 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 申请撤销</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
</div> | </div> | ||||
@@ -21,27 +21,43 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
$('#SType').lrDataItemSelect({ code: 'DisType' }); | |||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form', | |||||
width: 1000, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
var res = false; | |||||
// 验证数据 | |||||
res = top[id].validForm(); | |||||
// 保存数据 | |||||
if (res) { | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
} | |||||
return res; | |||||
var DisciplineId = $('#gridtable').jfGridValue('DisciplineId'); | |||||
if (learun.checkrow(DisciplineId)) { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (keyValue != null) { | |||||
learun.alert.warning("已申请撤销,请点击编辑!"); | |||||
return false; | |||||
} | } | ||||
}); | |||||
//判断违纪的审核时间,达到半年后,才可申请撤销; | |||||
var DisciplineCheckTime = $('#gridtable').jfGridValue('DisciplineCheckTime'); | |||||
var DisciplineCheckTimeDate = new Date(DisciplineCheckTime); | |||||
if (new Date() <= DisciplineCheckTimeDate.setMonth(DisciplineCheckTimeDate.getMonth()+6)) { | |||||
learun.alert.warning("违纪的审核时间未达到半年,不可以申请撤销!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form?DisciplineId=' + DisciplineId, | |||||
width: 800, | |||||
height: 600, | |||||
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 () { | $('#lr_edit').on('click', function () { | ||||
@@ -56,7 +72,7 @@ var bootstrap = function ($, learun) { | |||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/Form?keyValue=' + keyValue, | ||||
width: 1000, | |||||
width: 800, | |||||
height: 600, | height: 600, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
@@ -99,7 +115,7 @@ var bootstrap = function ($, learun) { | |||||
id: 'formview', | id: 'formview', | ||||
title: '查看', | title: '查看', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/FormView?keyValue=' + keyValue, | url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/FormView?keyValue=' + keyValue, | ||||
width: 1000, | |||||
width: 800, | |||||
height: 600, | height: 600, | ||||
btn: null | btn: null | ||||
}); | }); | ||||
@@ -127,26 +143,54 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | { | ||||
label: "申请人", name: "CreateUserId", width: 100, align: "left", | |||||
label: "违纪学生", name: "StuNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('user', { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | key: value, | ||||
keyId: 'stuno', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data.name); | |||||
callback(_data['stuname']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "申请时间", name: "CreateTime", width: 120, align: "left" }, | |||||
{ label: "事情经过", name: "Things", width: 150, align: "left" }, | |||||
{ | |||||
label: "处分类别", name: "SType", width: 80, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'DisType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "违纪审核时间", name: "DisciplineCheckTime", width: 120, align: "left" }, | |||||
{ label: "违纪事情经过", name: "DisciplineThings", width: 200, align: "left" }, | |||||
{ label: "申请撤销时间", name: "CreateTime", width: 120, align: "left" }, | |||||
{ label: "撤销事情经过", name: "Things", width: 200, align: "left" }, | |||||
{ label: "撤销原因", name: "Reason", width: 150, align: "left" }, | { label: "撤销原因", name: "Reason", width: 150, 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>"; | |||||
label: "撤销审核状态", name: "CheckStatus", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
if (row.Id == null || row.Id == undefined || row.Id == "") { | |||||
callback(""); | |||||
} else { | |||||
if (value == "1") { | |||||
callback("<span class=\"label label-warning\">审核中</span>"); | |||||
} else if (value == "2") { | |||||
callback("<span class=\"label label-success\">审核通过</span>"); | |||||
} else if (value == "3") { | |||||
callback("<span class=\"label label-danger\">审核未通过</span>"); | |||||
} else { | |||||
callback("<span class=\"label label-default\">草稿</span>"); | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
], | ], | ||||
@@ -158,6 +202,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.StuNo = learun.clientdata.get(['userinfo']).account; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -0,0 +1,40 @@ | |||||
@{ | |||||
/**/ | |||||
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> | |||||
<input id="SType" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">违纪学生</div> | |||||
<div id="StuNo"></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_view" 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/StuCancelDisciplineManagement/IndexOfTeacher.js") |
@@ -0,0 +1,128 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-04-14 11:52 | |||||
* 描 述:学生撤销违纪管理 | |||||
*/ | |||||
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); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#SType').lrDataItemSelect({ code: 'DisType' }); | |||||
$('#StuNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "StuNo", | |||||
text: "StuName" | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/FormView?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 600, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelDisciplineManagement/GetPageListOfTeacher', | |||||
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: "SType", width: 80, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'DisType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "违纪审核时间", name: "DisciplineCheckTime", width: 120, align: "left" }, | |||||
{ label: "违纪事情经过", name: "DisciplineThings", width: 200, align: "left" }, | |||||
{ label: "申请撤销时间", name: "CreateTime", width: 120, align: "left" }, | |||||
{ label: "撤销事情经过", name: "Things", width: 200, align: "left" }, | |||||
{ label: "撤销原因", name: "Reason", width: 150, align: "left" }, | |||||
{ | |||||
label: "撤销审核状态", name: "CheckStatus", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
if (row.Id == null || row.Id == undefined || row.Id == "") { | |||||
callback(""); | |||||
} else { | |||||
if (value == "1") { | |||||
callback("<span class=\"label label-warning\">审核中</span>"); | |||||
} else if (value == "2") { | |||||
callback("<span class=\"label label-success\">审核通过</span>"); | |||||
} else if (value == "3") { | |||||
callback("<span class=\"label label-danger\">审核未通过</span>"); | |||||
} else { | |||||
callback("<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: 'StuCancelDisciplineManagement',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -24,8 +24,8 @@ | |||||
<input id="DealTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#DealTime').trigger('change'); } })" /> | <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> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | <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 class="lr-form-item-title">事情经过<font face="宋体">*</font></div> | |||||
<textarea id="Things" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | ||||
<div class="lr-form-item-title">学生态度</div> | <div class="lr-form-item-title">学生态度</div> | ||||
@@ -24,8 +24,8 @@ | |||||
<input id="DealTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#DealTime').trigger('change'); } })" /> | <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> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | <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 class="lr-form-item-title">事情经过<font face="宋体">*</font></div> | |||||
<textarea id="Things" class="form-control" style="height:100px;" readonly="readonly" isvalid="yes" checkexpession="NotNull"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | ||||
<div class="lr-form-item-title">学生态度</div> | <div class="lr-form-item-title">学生态度</div> | ||||
@@ -94,7 +94,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | |||||
page.search(); | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
@@ -109,7 +109,7 @@ var bootstrap = function ($, learun) { | |||||
title: '查看', | title: '查看', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/FormView?keyValue=' + keyValue, | url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/FormView?keyValue=' + keyValue, | ||||
width: 1000, | width: 1000, | ||||
height: 600, | |||||
height: 800, | |||||
btn: null | btn: null | ||||
}); | }); | ||||
} | } | ||||
@@ -235,6 +235,11 @@ var bootstrap = function ($, learun) { | |||||
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>"; | 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>"; | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "是否申请撤销", name: "CancelId", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return (cellvalue != null && cellvalue != undefined && cellvalue != "") ? "是" : "否"; | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isPage: true, | isPage: true, | ||||
@@ -0,0 +1,36 @@ | |||||
@{ | |||||
/**/ | |||||
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="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_view" 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/IndexOfStudent.js") |
@@ -0,0 +1,159 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-03-26 15:23 | |||||
* 描 述:学生违纪管理 | |||||
*/ | |||||
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); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 查看 | |||||
$('#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: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetPageList', | |||||
headData: [ | |||||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ | |||||
label: "处分类别", name: "SType", width: 80, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'DisType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
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: "GenderNo", width: 50, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "男" : "女"; | |||||
} | |||||
}, | |||||
{ label: "电话", name: "Mobile", width: 100, align: "left" }, | |||||
{ | |||||
label: "院系", name: "DeptNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "majorno", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "classno", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "处理老师", name: "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: "SchoolOpinion", 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>"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否申请撤销", name: "CancelId", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return (cellvalue != null && cellvalue != undefined && cellvalue != "") ? "是" : "否"; | |||||
} | |||||
}, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
sidx: "CreateTime desc" | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StuNo = learun.clientdata.get(['userinfo']).account; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -1027,6 +1027,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexOfThree.js" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexOfThree.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexOfTwo.js" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexOfTwo.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexInStuScore.js" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexInStuScore.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelDisciplineManagement\IndexOfTeacher.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\IndexOfStudent.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuFellowship\FormView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfStudent.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfStudent.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfThree.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfThree.js" /> | ||||
@@ -8298,6 +8300,8 @@ | |||||
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Index.cshtml" /> | <Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\Index.cshtml" /> | ||||
<Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\StampDetailIndex.cshtml" /> | <Content Include="Areas\LR_NewWorkFlow\Views\StampPersonal\StampDetailIndex.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreRank.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreRank.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\IndexOfStudent.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelDisciplineManagement\IndexOfTeacher.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuCancelDisciplineManagementEntity> GetPageListOfTeacher(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuCancelDisciplineManagementService.GetPageListOfTeacher(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取StuCancelDisciplineManagement表实体数据 | /// 获取StuCancelDisciplineManagement表实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("CREATEUSERID")] | [Column("CREATEUSERID")] | ||||
public string CreateUserId { get; set; } | public string CreateUserId { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 创建用户编号 | |||||
/// </summary> | |||||
[Column("CREATEUSERNO")] | |||||
public string CreateUserNo { get; set; } | |||||
/// <summary> | |||||
/// 创建时间 | /// 创建时间 | ||||
/// </summary> | /// </summary> | ||||
[Column("CREATETIME")] | [Column("CREATETIME")] | ||||
@@ -64,6 +69,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("PROCESSID")] | [Column("PROCESSID")] | ||||
public string ProcessId { get; set; } | public string ProcessId { get; set; } | ||||
/// <summary> | |||||
/// 附件 | |||||
/// </summary> | |||||
[Column("FILES")] | |||||
public string Files { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -84,6 +94,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
/// <summary> | |||||
/// 违纪表主键 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string DisciplineId { get; set; } | |||||
/// <summary> | |||||
/// 违纪学生 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// 违纪时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? DisciplineTime { get; set; } | |||||
/// <summary> | |||||
/// 事情经过 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string DisciplineThings { get; set; } | |||||
/// <summary> | |||||
/// 处分类型 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string SType { get; set; } | |||||
/// <summary> | |||||
/// 违纪审核时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? DisciplineCheckTime { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -23,6 +23,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<StuCancelDisciplineManagementEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<StuCancelDisciplineManagementEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<StuCancelDisciplineManagementEntity> GetPageListOfTeacher(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取StuCancelDisciplineManagement表实体数据 | /// 获取StuCancelDisciplineManagement表实体数据 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -29,19 +29,66 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var basedbname = BaseRepository().getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM StuCancelDisciplineManagement t "); | |||||
strSql.Append(" left join " + basedbname + ".dbo.LR_Base_User u on t.CreateUserId=u.F_UserId "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
strSql.Append("select d.Id as DisciplineId,d.DisciplineTime,d.Things as DisciplineThings,d.SType,d.StuNo,d.CheckTime as DisciplineCheckTime,t.* "); | |||||
strSql.Append(" from StuDisciplineManagement d "); | |||||
strSql.Append(" left join StuCancelDisciplineManagement t on d.CancelId=t.Id "); | |||||
strSql.Append(" WHERE 1=1 and d.CheckStatus='2' "); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["StuName"].IsEmpty()) | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND u.F_RealName like @StuName "); | |||||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND d.StuNo = @StuNo "); | |||||
} | |||||
if (!queryParam["SType"].IsEmpty()) | |||||
{ | |||||
dp.Add("SType", queryParam["SType"].ToString(), DbType.String); | |||||
strSql.Append(" AND d.SType = @SType "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuCancelDisciplineManagementEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
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<StuCancelDisciplineManagementEntity> GetPageListOfTeacher(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("select d.Id as DisciplineId,d.DisciplineTime,d.Things as DisciplineThings,d.SType,d.StuNo,d.CheckTime as DisciplineCheckTime,t.* "); | |||||
strSql.Append(" from StuCancelDisciplineManagement t "); | |||||
strSql.Append(" left join StuDisciplineManagement d on d.CancelId=t.Id "); | |||||
strSql.Append(" WHERE 1=1 and t.CheckStatus='2' "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND d.StuNo = @StuNo "); | |||||
} | |||||
if (!queryParam["SType"].IsEmpty()) | |||||
{ | |||||
dp.Add("SType", queryParam["SType"].ToString(), DbType.String); | |||||
strSql.Append(" AND d.SType = @SType "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<StuCancelDisciplineManagementEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuCancelDisciplineManagementEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
@@ -152,6 +199,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
entity.Create(); | entity.Create(); | ||||
this.BaseRepository("CollegeMIS").Insert(entity); | this.BaseRepository("CollegeMIS").Insert(entity); | ||||
//违纪表赋值撤销违纪主键字段 | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuDisciplineManagement set CancelId='{entity.Id}' where Id='{entity.DisciplineId}' "); | |||||
} | } | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -104,6 +104,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("STYPE")] | [Column("STYPE")] | ||||
public string SType { get; set; } | public string SType { get; set; } | ||||
/// <summary> | |||||
/// 撤销违纪管理主键 | |||||
/// </summary> | |||||
[Column("CANCELID")] | |||||
public string CancelId { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||