@@ -0,0 +1,158 @@ | |||
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; | |||
using Learun.Application.Base.SystemModule; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-07-11 14:34 | |||
/// 描 述:宿舍调换申请 | |||
/// </summary> | |||
public class Acc_DormitoryChangeController : MvcControllerBase | |||
{ | |||
private Acc_DormitoryChangeIBLL acc_DormitoryChangeIBLL = new Acc_DormitoryChangeBLL(); | |||
private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL(); | |||
#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 = acc_DormitoryChangeIBLL.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 Acc_DormitoryChangeData = acc_DormitoryChangeIBLL.GetAcc_DormitoryChangeEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Acc_DormitoryChange = Acc_DormitoryChangeData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Acc_DormitoryChangeData = acc_DormitoryChangeIBLL.GetEntityByProcessId(processId); | |||
var jsonData = new | |||
{ | |||
Acc_DormitoryChange = Acc_DormitoryChangeData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
acc_DormitoryChangeIBLL.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) | |||
{ | |||
Acc_DormitoryChangeEntity entity = strEntity.ToObject<Acc_DormitoryChangeEntity>(); | |||
if (entity.HisDormitory == entity.Dormitory && entity.HisUnit == entity.Unit && entity.HisFloor == entity.Floor | |||
&& entity.HisRId == entity.RId) | |||
{ | |||
return Fail("新宿舍请勿选择与旧宿舍一致"); | |||
} | |||
acc_DormitoryChangeIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SubmitForm(string status, string processId, string keyValue) | |||
{ | |||
acc_DormitoryChangeIBLL.SubmitEntity(status, processId, keyValue); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
ViewBag.Title = "宿舍调换申请"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">宿舍楼<font face="宋体">*</font></div> | |||
<div id="HisDormitory" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">新宿舍楼<font face="宋体">*</font></div> | |||
<div id="Dormitory" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">单元<font face="宋体">*</font></div> | |||
<div id="HisUnit" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">新单元<font face="宋体">*</font></div> | |||
<div id="Unit" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">楼层<font face="宋体">*</font></div> | |||
<div id="HisFloor" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">新楼层<font face="宋体">*</font></div> | |||
<div id="Floor" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">宿舍<font face="宋体">*</font></div> | |||
<div id="HisRId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">新宿舍<font face="宋体">*</font></div> | |||
<div id="RId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">原因<font face="宋体">*</font></div> | |||
<textarea id="Reason" class="form-control" style="height:50px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryChange"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Acc_DormitoryChange/Form.js") |
@@ -0,0 +1,191 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-07-11 14:34 | |||
* 描 述:宿舍调换申请 | |||
*/ | |||
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 () { | |||
$('#HisDormitory').lrDataSourceSelect({ | |||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||
if (item) { | |||
$('#HisUnit').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#HisUnit').lrselect({ | |||
text: 'name', | |||
value: 'id', | |||
select: function (item) { | |||
if (item) { | |||
$('#HisFloor').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#HisFloor').lrselect({ | |||
text: 'name', | |||
value: 'id', | |||
select: function (item) { | |||
if (item) { | |||
$('#HisRId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#HisRId').lrselect({ | |||
text: 'name', | |||
value: 'id', | |||
allowSearch: true | |||
}) | |||
$('#Dormitory').lrDataSourceSelect({ | |||
code: 'Acc_DormitoryData', value: 'id', text: 'name', select: function (item) { | |||
if (item) { | |||
$('#Unit').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'Acc_UnitData', strWhere: "ParentID='" + item.id + "' order by name" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Unit').lrselect({ | |||
text: 'name', | |||
value: 'id', | |||
select: function (item) { | |||
if (item) { | |||
$('#Floor').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'Acc_FloorData', strWhere: "ParentID='" + item.id + "' order by name" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Floor').lrselect({ | |||
text: 'name', | |||
value: 'id', | |||
select: function (item) { | |||
if (item) { | |||
$('#RId').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'Acc_RoomData', strWhere: "ParentID='" + item.id + "' order by name" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#RId').lrselect({ | |||
text: 'name', | |||
value: 'id', | |||
allowSearch: true | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/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/Acc_DormitoryChange/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 == 'Acc_DormitoryChange' && 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 IdentityName = learun.clientdata.get(['userinfo']).Description; | |||
if (IdentityName != "学生") { | |||
learun.alert.warning("当前提交者非学生!!!"); | |||
return false; | |||
} | |||
var formData = $('#form').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,54 @@ | |||
@{ | |||
ViewBag.Title = "宿舍调换申请"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<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-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="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></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_print" class="btn btn-default"><i class="fa fa-print"></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/Acc_DormitoryChange/Index.js") |
@@ -0,0 +1,389 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-07-11 14:34 | |||
* 描 述:宿舍调换申请 | |||
*/ | |||
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(); | |||
}); | |||
$('#DeptNo').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||
}); | |||
} | |||
else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#ClassNo').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').on("click", | |||
function () { | |||
var data = $('#DeptNo').lrselectGet(); | |||
if (!data) { | |||
learun.alert.error('请先选择系'); | |||
} | |||
}); | |||
$('#ClassNo').on("click", | |||
function () { | |||
var data1 = $('#DeptNo').lrselectGet(); | |||
var data2 = $('#MajorNo').lrselectGet(); | |||
if (!data1 || !data2) { | |||
learun.alert.error('请先选择系和专业'); | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/Form', | |||
width: 600, | |||
height: 450, | |||
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('Status'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 450, | |||
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('Status'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/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/Acc_DormitoryChange/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('Status'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/SubmitForm', { keyValue: keyValue, status: "1", processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Acc_DormitoryChange/GetPageList', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", 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: "Reason", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "原宿舍楼", name: "HisDormitory", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_DormitoryData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原单元", name: "Unit", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_UnitData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原楼层", name: "Floor", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_FloorData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原宿舍", name: "RId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_RoomData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新宿舍楼", name: "Dormitory", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_DormitoryData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新单元", name: "Unit", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_UnitData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新楼层", name: "Floor", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_FloorData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新宿舍", name: "RId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Acc_RoomData', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "审批状态", name: "Status", width: 100, align: "center", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 0) { | |||
return '<span class=\"label label-default\">草稿</span>'; | |||
} if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">同意</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-primary\">不同意</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
sidx: 'CreateTime', | |||
sord: 'desc', | |||
isPage: true | |||
}); | |||
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: 'DorChange',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -839,6 +839,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamTeacherTimeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchTimeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchStuController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Acc_DormitoryChangeController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6586,6 +6587,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchStu\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -6,7 +6,7 @@ | |||
<typeAlias alias="MySql" type="Learun.DataBase.MySqlEx.Database,Learun.DataBase.MySqlEx" /> | |||
<typeAlias alias="Oracle" type="Learun.DataBase.Oracle.Database,Learun.DataBase.Oracle" /> | |||
<!--工作流接口--> | |||
<!--工作流接口--> | |||
<typeAlias alias="INodeMethod" type="Learun.Application.WorkFlow.INodeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="NodeMethod" type="Learun.Application.WorkFlow.NodeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AssetsInfoApplyMethod" type="Learun.Application.WorkFlow.Ass_AssetsInfoApplyMethod,Learun.Application.WorkFlow" /> | |||
@@ -37,6 +37,7 @@ | |||
<typeAlias alias="ArrangeLessonTermAttemperMethod" type="Learun.Application.WorkFlow.ArrangeLessonTermAttemperMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Acc_DormitoryChangeMethod" type="Learun.Application.WorkFlow.Acc_DormitoryChangeMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
@@ -85,7 +86,8 @@ | |||
<type type="IWorkFlowMethod" mapTo="ArrangeLessonTermAttemperMethod" name="ArrangeLessonTermAttemperMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Acc_DormitoryChangeMethod" name="Acc_DormitoryChangeMethod"></type> | |||
</container> | |||
<container name="TsIOCcontainer"> | |||
@@ -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-07-11 14:34 | |||
/// 描 述:宿舍调换申请 | |||
/// </summary> | |||
public class Acc_DormitoryChangeMap : EntityTypeConfiguration<Acc_DormitoryChangeEntity> | |||
{ | |||
public Acc_DormitoryChangeMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("ACC_DORMITORYCHANGE"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -593,6 +593,7 @@ | |||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTimeMap.cs" /> | |||
<Compile Include="EducationalAdministration\HealthPunchTimeMap.cs" /> | |||
<Compile Include="EducationalAdministration\HealthPunchStuMap.cs" /> | |||
<Compile Include="EducationalAdministration\Acc_DormitoryChangeMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,193 @@ | |||
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-07-11 14:34 | |||
/// 描 述:宿舍调换申请 | |||
/// </summary> | |||
public class Acc_DormitoryChangeBLL : Acc_DormitoryChangeIBLL | |||
{ | |||
private Acc_DormitoryChangeService acc_DormitoryChangeService = new Acc_DormitoryChangeService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Acc_DormitoryChangeEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return acc_DormitoryChangeService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Acc_DormitoryChange表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Acc_DormitoryChangeEntity GetAcc_DormitoryChangeEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return acc_DormitoryChangeService.GetAcc_DormitoryChangeEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
public Acc_DormitoryChangeEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return acc_DormitoryChangeService.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 | |||
{ | |||
acc_DormitoryChangeService.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, Acc_DormitoryChangeEntity entity) | |||
{ | |||
try | |||
{ | |||
acc_DormitoryChangeService.SaveEntity(keyValue, entity); | |||
} | |||
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 SubmitEntity(string status, string processId, string keyValue) | |||
{ | |||
try | |||
{ | |||
acc_DormitoryChangeService.SubmitEntity(status, processId, keyValue); | |||
} | |||
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) | |||
{ | |||
try | |||
{ | |||
acc_DormitoryChangeService.ChangeStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,156 @@ | |||
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-07-11 14:34 | |||
/// 描 述:宿舍调换申请 | |||
/// </summary> | |||
public class Acc_DormitoryChangeEntity | |||
{ | |||
#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> | |||
/// Sex | |||
/// </summary> | |||
[Column("SEX")] | |||
public bool? Sex { get; set; } | |||
/// <summary> | |||
/// Grade | |||
/// </summary> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// ClassNo | |||
/// </summary> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// MajorNo | |||
/// </summary> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// DeptNo | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// F_School | |||
/// </summary> | |||
[Column("F_SCHOOL")] | |||
public string F_School { get; set; } | |||
/// <summary> | |||
/// Remark | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// ProcessId | |||
/// </summary> | |||
[Column("PROCESSID")] | |||
public string ProcessId { get; set; } | |||
/// <summary> | |||
/// 宿舍楼 | |||
/// </summary> | |||
[Column("DORMITORY")] | |||
public string Dormitory { get; set; } | |||
/// <summary> | |||
/// 单元 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// Floor | |||
/// </summary> | |||
[Column("FLOOR")] | |||
public string Floor { get; set; } | |||
/// <summary> | |||
/// RId | |||
/// </summary> | |||
[Column("RID")] | |||
public string RId { get; set; } | |||
/// <summary> | |||
/// Reason | |||
/// </summary> | |||
[Column("REASON")] | |||
public string Reason { get; set; } | |||
/// <summary> | |||
/// HisDormitory | |||
/// </summary> | |||
[Column("HISDORMITORY")] | |||
public string HisDormitory { get; set; } | |||
/// <summary> | |||
/// HisUnit | |||
/// </summary> | |||
[Column("HISUNIT")] | |||
public string HisUnit { get; set; } | |||
/// <summary> | |||
/// HisFloor | |||
/// </summary> | |||
[Column("HISFLOOR")] | |||
public string HisFloor { get; set; } | |||
/// <summary> | |||
/// HisRId | |||
/// </summary> | |||
[Column("HISRID")] | |||
public string HisRId { get; set; } | |||
/// <summary> | |||
/// 状态 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int? Status { get; set; } | |||
/// <summary> | |||
/// CheckTime | |||
/// </summary> | |||
[Column("CHECKTIME")] | |||
public DateTime? CheckTime { 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,64 @@ | |||
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-07-11 14:34 | |||
/// 描 述:宿舍调换申请 | |||
/// </summary> | |||
public interface Acc_DormitoryChangeIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Acc_DormitoryChangeEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Acc_DormitoryChange表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Acc_DormitoryChangeEntity GetAcc_DormitoryChangeEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
Acc_DormitoryChangeEntity 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, Acc_DormitoryChangeEntity entity); | |||
void SubmitEntity(string status, string processId, string keyValue); | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void ChangeStatusByProcessId(string status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,272 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-07-11 14:34 | |||
/// 描 述:宿舍调换申请 | |||
/// </summary> | |||
public class Acc_DormitoryChangeService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Acc_DormitoryChangeEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM Acc_DormitoryChange t "); | |||
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 t.StuNo like @StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", "" + queryParam["DeptNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.DeptNo=@DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", "" + queryParam["MajorNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.MajorNo=@MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.ClassNo=@ClassNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", "" + queryParam["Grade"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.Grade=@Grade "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryChangeEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Acc_DormitoryChange表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Acc_DormitoryChangeEntity GetAcc_DormitoryChangeEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Acc_DormitoryChangeEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
public Acc_DormitoryChangeEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Acc_DormitoryChangeEntity>(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<Acc_DormitoryChangeEntity>(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, Acc_DormitoryChangeEntity entity) | |||
{ | |||
entity.Status = 0; | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
var UserList = LoginUserInfo.Get(); | |||
if (UserList.Description == "学生") | |||
{ | |||
var StuList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>().FirstOrDefault(x => x.StuNo == UserList.account); | |||
entity.F_School = StuList.F_SchoolId; | |||
entity.DeptNo = StuList.DeptNo; | |||
entity.MajorNo = StuList.MajorNo; | |||
entity.ClassNo = StuList.ClassNo; | |||
entity.Grade = StuList.Grade; | |||
entity.Sex = StuList.GenderNo; | |||
entity.StuName = StuList.StuName; entity.CreateTime = DateTime.Now; | |||
entity.StuNo = StuList.StuNo; | |||
} | |||
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="entity">实体</param> | |||
/// <returns></returns> | |||
public void SubmitEntity(string status, string processId, string keyValue) | |||
{ | |||
try | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update Acc_DormitoryChange set Status='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
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) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update Acc_DormitoryChange set Status='" + status + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1802,6 +1802,10 @@ | |||
<Compile Include="EducationalAdministration\HealthPunchStu\HealthPunchStuService.cs" /> | |||
<Compile Include="EducationalAdministration\HealthPunchStu\HealthPunchStuBLL.cs" /> | |||
<Compile Include="EducationalAdministration\HealthPunchStu\HealthPunchStuIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeService.cs" /> | |||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -101,6 +101,7 @@ | |||
<Compile Include="NodeMethod\TeacherCancelLeaveManageMethod.cs" /> | |||
<Compile Include="NodeMethod\StuDisciplineManageMethod.cs" /> | |||
<Compile Include="NodeMethod\StuLeaveManagementMethod.cs" /> | |||
<Compile Include="NodeMethod\Acc_DormitoryChangeMethod.cs" /> | |||
<Compile Include="NodeMethod\TeacherOvertimeManageMethod.cs" /> | |||
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" /> | |||
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | |||
@@ -0,0 +1,28 @@ | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
namespace Learun.Application.WorkFlow | |||
{ | |||
public class Acc_DormitoryChangeMethod : IWorkFlowMethod | |||
{ | |||
Acc_DormitoryChangeIBLL acc_DormitoryChangeIBLL = new Acc_DormitoryChangeBLL(); | |||
public void Execute(WfMethodParameter parameter) | |||
{ | |||
if (parameter.code == "agree") | |||
{ | |||
acc_DormitoryChangeIBLL.ChangeStatusByProcessId("2", parameter.processId); | |||
} | |||
else | |||
{ | |||
acc_DormitoryChangeIBLL.ChangeStatusByProcessId("3", parameter.processId); | |||
} | |||
} | |||
} | |||
} |