@@ -0,0 +1,128 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-07-23 17:28 | |||||
/// 描 述:请假类型 | |||||
/// </summary> | |||||
public class DtStuTypeController : MvcControllerBase | |||||
{ | |||||
private DtStuTypeIBLL dtStuTypeIBLL = new DtStuTypeBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = dtStuTypeIBLL.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 DtStuTypeData = dtStuTypeIBLL.GetDtStuTypeEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
DtStuType = DtStuTypeData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
dtStuTypeIBLL.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) | |||||
{ | |||||
DtStuTypeEntity entity = strEntity.ToObject<DtStuTypeEntity>(); | |||||
var NameList = dtStuTypeIBLL.GetTypeNameList(keyValue,entity.TypeName); | |||||
var NoList = dtStuTypeIBLL.GetTypeNoList(keyValue,entity.TypeNo); | |||||
if (NameList == null && NoList == null) | |||||
{ | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
dtStuTypeIBLL.SaveEntity(keyValue, entity); | |||||
} | |||||
else | |||||
{ | |||||
return Fail("保存失败,类型或名称不能重复"); | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -38,7 +38,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 编辑 | // 编辑 | ||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('LSGZQDDM'); | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
@@ -54,7 +54,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('LSGZQDDM'); | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
@@ -112,12 +112,12 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}}, | }}, | ||||
{ label: "开始时间", name: "BeginDate", width: 100, align: "left"}, | |||||
{ label: "结束时间", name: "EndDate", width: 100, align: "left"}, | |||||
{ label: "开始时间", name: "BeginDate", width: 200, align: "left"}, | |||||
{ label: "结束时间", name: "EndDate", width: 200, align: "left"}, | |||||
{ label: "申请理由", name: "LeaveReason", width: 100, align: "left"}, | { label: "申请理由", name: "LeaveReason", width: 100, align: "left"}, | ||||
{ label: "流程Id", name: "processId", width: 100, align: "left"}, | { label: "流程Id", name: "processId", width: 100, align: "left"}, | ||||
], | ], | ||||
mainId:'LSGZQDDM', | |||||
mainId:'Id', | |||||
isPage: true | isPage: true | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
@@ -0,0 +1,19 @@ | |||||
@{ | |||||
ViewBag.Title = "请假类型"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="DtStuType" > | |||||
<div class="lr-form-item-title">类型编码<font face="宋体">*</font></div> | |||||
<input id="TypeNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="DtStuType" > | |||||
<div class="lr-form-item-title">类型名称<font face="宋体">*</font></div> | |||||
<input id="TypeName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="DtStuType" > | |||||
<div class="lr-form-item-title">有效</div> | |||||
<div id="IsValid" ></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtStuType/Form.js") |
@@ -0,0 +1,52 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-07-23 17:28 | |||||
* 描 述:请假类型 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#IsValid').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#IsValid').lrselectSet("true"); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtStuType/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/DtStuType/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,37 @@ | |||||
@{ | |||||
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="TypeName" type="text" class="form-control" /> | |||||
</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> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtStuType/Index.js") |
@@ -0,0 +1,103 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-07-23 17:28 | |||||
* 描 述:请假类型 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 200); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/DtStuType/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/DtStuType/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var IsValid = $('#gridtable').jfGridValue('IsValid'); | |||||
if (IsValid) { | |||||
learun.alert.warning("当前项目有效,不能删除!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DtStuType/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/DtStuType/GetPageList', | |||||
headData: [ | |||||
{ label: "类型编码", name: "TypeNo", width: 200, align: "left" }, | |||||
{ label: "类型名称", name: "TypeName", width: 200, align: "left" }, | |||||
{ | |||||
label: "有效", name: "IsValid", width: 300, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
} | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -830,6 +830,7 @@ | |||||
<Compile Include="Areas\CustomFunction\Controllers\VehicleInfoController.cs" /> | <Compile Include="Areas\CustomFunction\Controllers\VehicleInfoController.cs" /> | ||||
<Compile Include="Areas\CustomFunction\Controllers\VehicleCostController.cs" /> | <Compile Include="Areas\CustomFunction\Controllers\VehicleCostController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\DtStuLeaveController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\DtStuLeaveController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\DtStuTypeController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6485,6 +6486,10 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\DtStuLeave\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\DtStuLeave\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\DtStuLeave\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\DtStuLeave\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\DtStuLeave\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\DtStuLeave\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\DtStuType\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\LR_Desktop\Models\" /> | <Folder Include="Areas\LR_Desktop\Models\" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-07-23 17:28 | |||||
/// 描 述:请假类型 | |||||
/// </summary> | |||||
public class DtStuTypeMap : EntityTypeConfiguration<DtStuTypeEntity> | |||||
{ | |||||
public DtStuTypeMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("DTSTUTYPE"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -579,6 +579,7 @@ | |||||
<Compile Include="CustomFunction\VehicleInfoMap.cs" /> | <Compile Include="CustomFunction\VehicleInfoMap.cs" /> | ||||
<Compile Include="CustomFunction\VehicleCostMap.cs" /> | <Compile Include="CustomFunction\VehicleCostMap.cs" /> | ||||
<Compile Include="EducationalAdministration\DtStuLeaveMap.cs" /> | <Compile Include="EducationalAdministration\DtStuLeaveMap.cs" /> | ||||
<Compile Include="EducationalAdministration\DtStuTypeMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -32,16 +32,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | strSql.Append(@" | ||||
t.LSGZQDDM, | |||||
t.CreateUserDeptNo, | |||||
t.CreateUserClassNo, | |||||
t.CreateUserName, | |||||
t.LeaveType, | |||||
t.BeginDate, | |||||
t.EndDate, | |||||
t.LeaveReason, | |||||
t.processId | |||||
"); | |||||
t.Id, | |||||
t.CreateUserDeptNo, | |||||
t.CreateUserClassNo, | |||||
t.CreateUserName, | |||||
t.LeaveType, | |||||
t.BeginDate, | |||||
t.EndDate, | |||||
t.LeaveReason, | |||||
t.processId | |||||
"); | |||||
strSql.Append(" FROM DtStuLeave t "); | strSql.Append(" FROM DtStuLeave t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
@@ -49,20 +49,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["CreateUserDeptNo"].IsEmpty()) | if (!queryParam["CreateUserDeptNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("CreateUserDeptNo",queryParam["CreateUserDeptNo"].ToString(), DbType.String); | |||||
dp.Add("CreateUserDeptNo", queryParam["CreateUserDeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CreateUserDeptNo = @CreateUserDeptNo "); | strSql.Append(" AND t.CreateUserDeptNo = @CreateUserDeptNo "); | ||||
} | } | ||||
if (!queryParam["CreateUserClassNo"].IsEmpty()) | if (!queryParam["CreateUserClassNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("CreateUserClassNo",queryParam["CreateUserClassNo"].ToString(), DbType.String); | |||||
dp.Add("CreateUserClassNo", queryParam["CreateUserClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CreateUserClassNo = @CreateUserClassNo "); | strSql.Append(" AND t.CreateUserClassNo = @CreateUserClassNo "); | ||||
} | } | ||||
if (!queryParam["LeaveType"].IsEmpty()) | if (!queryParam["LeaveType"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("LeaveType",queryParam["LeaveType"].ToString(), DbType.String); | |||||
dp.Add("LeaveType", queryParam["LeaveType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.LeaveType = @LeaveType "); | strSql.Append(" AND t.LeaveType = @LeaveType "); | ||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<DtStuLeaveEntity>(strSql.ToString(),dp, pagination); | |||||
return this.BaseRepository("CollegeMIS").FindList<DtStuLeaveEntity>(strSql.ToString(), dp, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -88,17 +88,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | |||||
t.LSGZQDDM, | |||||
t.CreateUserDeptNo, | |||||
t.CreateUserClassNo, | |||||
t.CreateUserName, | |||||
t.LeaveType, | |||||
t.BeginDate, | |||||
t.EndDate, | |||||
t.LeaveReason, | |||||
t.processId | |||||
"); | |||||
strSql.Append(@" | |||||
t.CreateUserDeptNo, | |||||
t.CreateUserClassNo, | |||||
t.CreateUserName, | |||||
t.LeaveType, | |||||
t.BeginDate, | |||||
t.EndDate, | |||||
t.LeaveReason, | |||||
t.processId | |||||
"); | |||||
strSql.Append(" FROM DtStuLeave t "); | strSql.Append(" FROM DtStuLeave t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
@@ -106,20 +105,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["CreateUserDeptNo"].IsEmpty()) | if (!queryParam["CreateUserDeptNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("CreateUserDeptNo",queryParam["CreateUserDeptNo"].ToString(), DbType.String); | |||||
dp.Add("CreateUserDeptNo", queryParam["CreateUserDeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CreateUserDeptNo = @CreateUserDeptNo "); | strSql.Append(" AND t.CreateUserDeptNo = @CreateUserDeptNo "); | ||||
} | } | ||||
if (!queryParam["CreateUserClassNo"].IsEmpty()) | if (!queryParam["CreateUserClassNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("CreateUserClassNo",queryParam["CreateUserClassNo"].ToString(), DbType.String); | |||||
dp.Add("CreateUserClassNo", queryParam["CreateUserClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CreateUserClassNo = @CreateUserClassNo "); | strSql.Append(" AND t.CreateUserClassNo = @CreateUserClassNo "); | ||||
} | } | ||||
if (!queryParam["LeaveType"].IsEmpty()) | if (!queryParam["LeaveType"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("LeaveType",queryParam["LeaveType"].ToString(), DbType.String); | |||||
dp.Add("LeaveType", queryParam["LeaveType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.LeaveType = @LeaveType "); | strSql.Append(" AND t.LeaveType = @LeaveType "); | ||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<DtStuLeaveEntity>(strSql.ToString(),dp); | |||||
return this.BaseRepository("CollegeMIS").FindList<DtStuLeaveEntity>(strSql.ToString(), dp); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -171,7 +170,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<DtStuLeaveEntity>(t=>t.Id == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<DtStuLeaveEntity>(t => t.Id == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -191,7 +190,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public void SaveEntity( string keyValue, DtStuLeaveEntity entity) | |||||
public void SaveEntity(string keyValue, DtStuLeaveEntity entity) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
@@ -0,0 +1,173 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-07-23 17:28 | |||||
/// 描 述:请假类型 | |||||
/// </summary> | |||||
public class DtStuTypeBLL : DtStuTypeIBLL | |||||
{ | |||||
private DtStuTypeService dtStuTypeService = new DtStuTypeService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<DtStuTypeEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return dtStuTypeService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public DtStuTypeEntity GetDtStuTypeEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return dtStuTypeService.GetDtStuTypeEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public DtStuTypeEntity GetTypeNameList(string keyValue,string TypeName) | |||||
{ | |||||
try | |||||
{ | |||||
return dtStuTypeService.GetTypeNameList(keyValue,TypeName); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public DtStuTypeEntity GetTypeNoList(string keyValue,string TypeNo) | |||||
{ | |||||
try | |||||
{ | |||||
return dtStuTypeService.GetTypeNoList(keyValue,TypeNo); | |||||
} | |||||
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 | |||||
{ | |||||
dtStuTypeService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, DtStuTypeEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
dtStuTypeService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,65 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-07-23 17:28 | |||||
/// 描 述:请假类型 | |||||
/// </summary> | |||||
public class DtStuTypeEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 类型编码 | |||||
/// </summary> | |||||
[Column("TYPENO")] | |||||
public string TypeNo { get; set; } | |||||
/// <summary> | |||||
/// 类型名称 | |||||
/// </summary> | |||||
[Column("TYPENAME")] | |||||
public string TypeName { get; set; } | |||||
/// <summary> | |||||
/// 有效 | |||||
/// </summary> | |||||
[Column("ISVALID")] | |||||
public bool? IsValid { get; set; } | |||||
/// <summary> | |||||
/// 备注 | |||||
/// </summary> | |||||
[Column("DEMO")] | |||||
public string Demo { 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,60 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-07-23 17:28 | |||||
/// 描 述:请假类型 | |||||
/// </summary> | |||||
public interface DtStuTypeIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<DtStuTypeEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
DtStuTypeEntity GetDtStuTypeEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="TypeName">主键</param> | |||||
/// <returns></returns> | |||||
DtStuTypeEntity GetTypeNameList(string keyValue, string TypeName); | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="TypeNo">主键</param> | |||||
/// <returns></returns> | |||||
DtStuTypeEntity GetTypeNoList(string keyValue ,string TypeNo); | |||||
#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, DtStuTypeEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,200 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-07-23 17:28 | |||||
/// 描 述:请假类型 | |||||
/// </summary> | |||||
public class DtStuTypeService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<DtStuTypeEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.TypeNo, | |||||
t.TypeName, | |||||
t.IsValid | |||||
"); | |||||
strSql.Append(" FROM DtStuType t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["TypeName"].IsEmpty()) | |||||
{ | |||||
dp.Add("TypeName", "%" + queryParam["TypeName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.TypeName Like @TypeName "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<DtStuTypeEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public DtStuTypeEntity GetDtStuTypeEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<DtStuTypeEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="TypeNo">主键</param> | |||||
/// <returns></returns> | |||||
public DtStuTypeEntity GetTypeNameList(string keyValue, string TypeName) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<DtStuTypeEntity>(o => o.Id != keyValue && o.TypeName == TypeName); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取DtStuType表实体数据 | |||||
/// </summary> | |||||
/// <param name="TypeNo">主键</param> | |||||
/// <returns></returns> | |||||
public DtStuTypeEntity GetTypeNoList(string keyValue, string TypeNo) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<DtStuTypeEntity>(o => o.Id != keyValue && o.TypeNo == TypeNo); | |||||
} | |||||
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<DtStuTypeEntity>(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> | |||||
public void SaveEntity(string keyValue, DtStuTypeEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1734,6 +1734,10 @@ | |||||
<Compile Include="EducationalAdministration\DtStuLeave\DtStuLeaveService.cs" /> | <Compile Include="EducationalAdministration\DtStuLeave\DtStuLeaveService.cs" /> | ||||
<Compile Include="EducationalAdministration\DtStuLeave\DtStuLeaveBLL.cs" /> | <Compile Include="EducationalAdministration\DtStuLeave\DtStuLeaveBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\DtStuLeave\DtStuLeaveIBLL.cs" /> | <Compile Include="EducationalAdministration\DtStuLeave\DtStuLeaveIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeService.cs" /> | |||||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\DtStuType\DtStuTypeIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||